From c5fd1ab882076447fba5b7bff98fb1853f9677d7 Mon Sep 17 00:00:00 2001 From: satujalur <98323567+satujalur@users.noreply.github.com> Date: Wed, 19 Oct 2022 19:55:47 +0700 Subject: [PATCH 1/6] hapus semua isi ci2 --- donjo-sys/.htaccess | 1 - donjo-sys/core/Benchmark.php | 119 - donjo-sys/core/CodeIgniter.php | 403 ---- donjo-sys/core/Common.php | 560 ----- donjo-sys/core/Config.php | 380 --- donjo-sys/core/Controller.php | 65 - donjo-sys/core/Exceptions.php | 194 -- donjo-sys/core/Hooks.php | 249 -- donjo-sys/core/Input.php | 866 ------- donjo-sys/core/Lang.php | 161 -- donjo-sys/core/Loader.php | 1249 ---------- donjo-sys/core/Model.php | 58 - donjo-sys/core/Output.php | 575 ----- donjo-sys/core/Router.php | 523 ---- donjo-sys/core/Security.php | 902 ------- donjo-sys/core/URI.php | 655 ------ donjo-sys/core/Utf8.php | 166 -- donjo-sys/core/index.html | 10 - donjo-sys/database/DB.php | 163 -- donjo-sys/database/DB_active_rec.php | 2046 ---------------- donjo-sys/database/DB_cache.php | 196 -- donjo-sys/database/DB_driver.php | 1411 ----------- donjo-sys/database/DB_forge.php | 383 --- donjo-sys/database/DB_result.php | 411 ---- donjo-sys/database/DB_utility.php | 415 ---- .../database/drivers/cubrid/cubrid_driver.php | 793 ------- .../database/drivers/cubrid/cubrid_forge.php | 289 --- .../database/drivers/cubrid/cubrid_result.php | 203 -- .../drivers/cubrid/cubrid_utility.php | 109 - donjo-sys/database/drivers/cubrid/index.html | 10 - donjo-sys/database/drivers/index.html | 10 - donjo-sys/database/drivers/mssql/index.html | 10 - .../database/drivers/mssql/mssql_driver.php | 668 ------ .../database/drivers/mssql/mssql_forge.php | 249 -- .../database/drivers/mssql/mssql_result.php | 170 -- .../database/drivers/mssql/mssql_utility.php | 89 - donjo-sys/database/drivers/mysql/index.html | 10 - .../database/drivers/mysql/mysql_driver.php | 769 ------ .../database/drivers/mysql/mysql_forge.php | 274 --- .../database/drivers/mysql/mysql_result.php | 175 -- .../database/drivers/mysql/mysql_utility.php | 211 -- donjo-sys/database/drivers/mysqli/index.html | 10 - .../database/drivers/mysqli/mysqli_driver.php | 767 ------ .../database/drivers/mysqli/mysqli_forge.php | 259 -- .../database/drivers/mysqli/mysqli_result.php | 175 -- .../drivers/mysqli/mysqli_utility.php | 88 - donjo-sys/database/drivers/oci8/index.html | 10 - .../database/drivers/oci8/oci8_driver.php | 809 ------- .../database/drivers/oci8/oci8_forge.php | 249 -- .../database/drivers/oci8/oci8_result.php | 218 -- .../database/drivers/oci8/oci8_utility.php | 88 - donjo-sys/database/drivers/odbc/index.html | 10 - .../database/drivers/odbc/odbc_driver.php | 638 ----- .../database/drivers/odbc/odbc_forge.php | 267 --- .../database/drivers/odbc/odbc_result.php | 229 -- .../database/drivers/odbc/odbc_utility.php | 104 - donjo-sys/database/drivers/pdo/index.html | 10 - donjo-sys/database/drivers/pdo/pdo_driver.php | 812 ------- donjo-sys/database/drivers/pdo/pdo_forge.php | 267 --- donjo-sys/database/drivers/pdo/pdo_result.php | 184 -- .../database/drivers/pdo/pdo_utility.php | 104 - donjo-sys/database/drivers/postgre/index.html | 10 - .../drivers/postgre/postgre_driver.php | 704 ------ .../drivers/postgre/postgre_forge.php | 300 --- .../drivers/postgre/postgre_result.php | 170 -- .../drivers/postgre/postgre_utility.php | 89 - donjo-sys/database/drivers/sqlite/index.html | 10 - .../database/drivers/sqlite/sqlite_driver.php | 659 ------ .../database/drivers/sqlite/sqlite_forge.php | 266 --- .../database/drivers/sqlite/sqlite_result.php | 180 -- .../drivers/sqlite/sqlite_utility.php | 97 - donjo-sys/database/drivers/sqlsrv/index.html | 10 - .../database/drivers/sqlsrv/sqlsrv_driver.php | 604 ----- .../database/drivers/sqlsrv/sqlsrv_forge.php | 246 -- .../database/drivers/sqlsrv/sqlsrv_result.php | 170 -- .../drivers/sqlsrv/sqlsrv_utility.php | 89 - donjo-sys/database/index.html | 10 - donjo-sys/fonts/index.html | 10 - donjo-sys/fonts/texb.ttf | Bin 143830 -> 0 bytes donjo-sys/helpers/array_helper.php | 120 - donjo-sys/helpers/captcha_helper.php | 336 --- donjo-sys/helpers/cookie_helper.php | 104 - donjo-sys/helpers/date_helper.php | 612 ----- donjo-sys/helpers/directory_helper.php | 81 - donjo-sys/helpers/download_helper.php | 107 - donjo-sys/helpers/email_helper.php | 63 - donjo-sys/helpers/file_helper.php | 480 ---- donjo-sys/helpers/form_helper.php | 1055 --------- donjo-sys/helpers/html_helper.php | 437 ---- donjo-sys/helpers/index.html | 10 - donjo-sys/helpers/inflector_helper.php | 204 -- donjo-sys/helpers/language_helper.php | 59 - donjo-sys/helpers/number_helper.php | 77 - donjo-sys/helpers/path_helper.php | 73 - donjo-sys/helpers/security_helper.php | 129 - donjo-sys/helpers/smiley_helper.php | 282 --- donjo-sys/helpers/string_helper.php | 308 --- donjo-sys/helpers/text_helper.php | 527 ----- donjo-sys/helpers/typography_helper.php | 94 - donjo-sys/helpers/url_helper.php | 595 ----- donjo-sys/helpers/xml_helper.php | 72 - donjo-sys/index.html | 10 - donjo-sys/language/english/calendar_lang.php | 51 - donjo-sys/language/english/date_lang.php | 61 - donjo-sys/language/english/db_lang.php | 29 - donjo-sys/language/english/email_lang.php | 24 - .../language/english/form_validation_lang.php | 29 - donjo-sys/language/english/ftp_lang.php | 18 - donjo-sys/language/english/imglib_lang.php | 24 - donjo-sys/language/english/index.html | 10 - donjo-sys/language/english/migration_lang.php | 13 - donjo-sys/language/english/number_lang.php | 10 - donjo-sys/language/english/profiler_lang.php | 25 - donjo-sys/language/english/unit_test_lang.php | 25 - donjo-sys/language/english/upload_lang.php | 22 - donjo-sys/language/index.html | 10 - donjo-sys/libraries/Cache/Cache.php | 216 -- .../libraries/Cache/drivers/Cache_apc.php | 147 -- .../libraries/Cache/drivers/Cache_dummy.php | 126 - .../libraries/Cache/drivers/Cache_file.php | 193 -- .../Cache/drivers/Cache_memcached.php | 214 -- donjo-sys/libraries/Cache/drivers/index.html | 10 - donjo-sys/libraries/Cache/index.html | 10 - donjo-sys/libraries/Calendar.php | 476 ---- donjo-sys/libraries/Cart.php | 552 ----- donjo-sys/libraries/Driver.php | 228 -- donjo-sys/libraries/Email.php | 2093 ----------------- donjo-sys/libraries/Encrypt.php | 501 ---- donjo-sys/libraries/Form_validation.php | 1383 ----------- donjo-sys/libraries/Ftp.php | 660 ------ donjo-sys/libraries/Image_lib.php | 1538 ------------ donjo-sys/libraries/Javascript.php | 872 ------- donjo-sys/libraries/Log.php | 115 - donjo-sys/libraries/Migration.php | 330 --- donjo-sys/libraries/Pagination.php | 341 --- donjo-sys/libraries/Parser.php | 213 -- donjo-sys/libraries/Profiler.php | 559 ----- donjo-sys/libraries/Session.php | 794 ------- donjo-sys/libraries/Sha1.php | 252 -- donjo-sys/libraries/Table.php | 532 ----- donjo-sys/libraries/Trackback.php | 549 ----- donjo-sys/libraries/Typography.php | 409 ---- donjo-sys/libraries/Unit_test.php | 384 --- donjo-sys/libraries/Upload.php | 1109 --------- donjo-sys/libraries/User_agent.php | 550 ----- donjo-sys/libraries/Xmlrpc.php | 1424 ----------- donjo-sys/libraries/Xmlrpcs.php | 613 ----- donjo-sys/libraries/Zip.php | 424 ---- donjo-sys/libraries/index.html | 10 - donjo-sys/libraries/javascript/Jquery.php | 1072 --------- donjo-sys/libraries/javascript/index.html | 10 - 151 files changed, 50217 deletions(-) delete mode 100644 donjo-sys/.htaccess delete mode 100644 donjo-sys/core/Benchmark.php delete mode 100644 donjo-sys/core/CodeIgniter.php delete mode 100644 donjo-sys/core/Common.php delete mode 100644 donjo-sys/core/Config.php delete mode 100644 donjo-sys/core/Controller.php delete mode 100644 donjo-sys/core/Exceptions.php delete mode 100644 donjo-sys/core/Hooks.php delete mode 100644 donjo-sys/core/Input.php delete mode 100644 donjo-sys/core/Lang.php delete mode 100644 donjo-sys/core/Loader.php delete mode 100644 donjo-sys/core/Model.php delete mode 100644 donjo-sys/core/Output.php delete mode 100644 donjo-sys/core/Router.php delete mode 100644 donjo-sys/core/Security.php delete mode 100644 donjo-sys/core/URI.php delete mode 100644 donjo-sys/core/Utf8.php delete mode 100644 donjo-sys/core/index.html delete mode 100644 donjo-sys/database/DB.php delete mode 100644 donjo-sys/database/DB_active_rec.php delete mode 100644 donjo-sys/database/DB_cache.php delete mode 100644 donjo-sys/database/DB_driver.php delete mode 100644 donjo-sys/database/DB_forge.php delete mode 100644 donjo-sys/database/DB_result.php delete mode 100644 donjo-sys/database/DB_utility.php delete mode 100644 donjo-sys/database/drivers/cubrid/cubrid_driver.php delete mode 100644 donjo-sys/database/drivers/cubrid/cubrid_forge.php delete mode 100644 donjo-sys/database/drivers/cubrid/cubrid_result.php delete mode 100644 donjo-sys/database/drivers/cubrid/cubrid_utility.php delete mode 100644 donjo-sys/database/drivers/cubrid/index.html delete mode 100644 donjo-sys/database/drivers/index.html delete mode 100644 donjo-sys/database/drivers/mssql/index.html delete mode 100644 donjo-sys/database/drivers/mssql/mssql_driver.php delete mode 100644 donjo-sys/database/drivers/mssql/mssql_forge.php delete mode 100644 donjo-sys/database/drivers/mssql/mssql_result.php delete mode 100644 donjo-sys/database/drivers/mssql/mssql_utility.php delete mode 100644 donjo-sys/database/drivers/mysql/index.html delete mode 100644 donjo-sys/database/drivers/mysql/mysql_driver.php delete mode 100644 donjo-sys/database/drivers/mysql/mysql_forge.php delete mode 100644 donjo-sys/database/drivers/mysql/mysql_result.php delete mode 100644 donjo-sys/database/drivers/mysql/mysql_utility.php delete mode 100644 donjo-sys/database/drivers/mysqli/index.html delete mode 100644 donjo-sys/database/drivers/mysqli/mysqli_driver.php delete mode 100644 donjo-sys/database/drivers/mysqli/mysqli_forge.php delete mode 100644 donjo-sys/database/drivers/mysqli/mysqli_result.php delete mode 100644 donjo-sys/database/drivers/mysqli/mysqli_utility.php delete mode 100644 donjo-sys/database/drivers/oci8/index.html delete mode 100644 donjo-sys/database/drivers/oci8/oci8_driver.php delete mode 100644 donjo-sys/database/drivers/oci8/oci8_forge.php delete mode 100644 donjo-sys/database/drivers/oci8/oci8_result.php delete mode 100644 donjo-sys/database/drivers/oci8/oci8_utility.php delete mode 100644 donjo-sys/database/drivers/odbc/index.html delete mode 100644 donjo-sys/database/drivers/odbc/odbc_driver.php delete mode 100644 donjo-sys/database/drivers/odbc/odbc_forge.php delete mode 100644 donjo-sys/database/drivers/odbc/odbc_result.php delete mode 100644 donjo-sys/database/drivers/odbc/odbc_utility.php delete mode 100644 donjo-sys/database/drivers/pdo/index.html delete mode 100644 donjo-sys/database/drivers/pdo/pdo_driver.php delete mode 100644 donjo-sys/database/drivers/pdo/pdo_forge.php delete mode 100644 donjo-sys/database/drivers/pdo/pdo_result.php delete mode 100644 donjo-sys/database/drivers/pdo/pdo_utility.php delete mode 100644 donjo-sys/database/drivers/postgre/index.html delete mode 100644 donjo-sys/database/drivers/postgre/postgre_driver.php delete mode 100644 donjo-sys/database/drivers/postgre/postgre_forge.php delete mode 100644 donjo-sys/database/drivers/postgre/postgre_result.php delete mode 100644 donjo-sys/database/drivers/postgre/postgre_utility.php delete mode 100644 donjo-sys/database/drivers/sqlite/index.html delete mode 100644 donjo-sys/database/drivers/sqlite/sqlite_driver.php delete mode 100644 donjo-sys/database/drivers/sqlite/sqlite_forge.php delete mode 100644 donjo-sys/database/drivers/sqlite/sqlite_result.php delete mode 100644 donjo-sys/database/drivers/sqlite/sqlite_utility.php delete mode 100644 donjo-sys/database/drivers/sqlsrv/index.html delete mode 100644 donjo-sys/database/drivers/sqlsrv/sqlsrv_driver.php delete mode 100644 donjo-sys/database/drivers/sqlsrv/sqlsrv_forge.php delete mode 100644 donjo-sys/database/drivers/sqlsrv/sqlsrv_result.php delete mode 100644 donjo-sys/database/drivers/sqlsrv/sqlsrv_utility.php delete mode 100644 donjo-sys/database/index.html delete mode 100644 donjo-sys/fonts/index.html delete mode 100644 donjo-sys/fonts/texb.ttf delete mode 100644 donjo-sys/helpers/array_helper.php delete mode 100644 donjo-sys/helpers/captcha_helper.php delete mode 100644 donjo-sys/helpers/cookie_helper.php delete mode 100644 donjo-sys/helpers/date_helper.php delete mode 100644 donjo-sys/helpers/directory_helper.php delete mode 100644 donjo-sys/helpers/download_helper.php delete mode 100644 donjo-sys/helpers/email_helper.php delete mode 100644 donjo-sys/helpers/file_helper.php delete mode 100644 donjo-sys/helpers/form_helper.php delete mode 100644 donjo-sys/helpers/html_helper.php delete mode 100644 donjo-sys/helpers/index.html delete mode 100644 donjo-sys/helpers/inflector_helper.php delete mode 100644 donjo-sys/helpers/language_helper.php delete mode 100644 donjo-sys/helpers/number_helper.php delete mode 100644 donjo-sys/helpers/path_helper.php delete mode 100644 donjo-sys/helpers/security_helper.php delete mode 100644 donjo-sys/helpers/smiley_helper.php delete mode 100644 donjo-sys/helpers/string_helper.php delete mode 100644 donjo-sys/helpers/text_helper.php delete mode 100644 donjo-sys/helpers/typography_helper.php delete mode 100644 donjo-sys/helpers/url_helper.php delete mode 100644 donjo-sys/helpers/xml_helper.php delete mode 100644 donjo-sys/index.html delete mode 100644 donjo-sys/language/english/calendar_lang.php delete mode 100644 donjo-sys/language/english/date_lang.php delete mode 100644 donjo-sys/language/english/db_lang.php delete mode 100644 donjo-sys/language/english/email_lang.php delete mode 100644 donjo-sys/language/english/form_validation_lang.php delete mode 100644 donjo-sys/language/english/ftp_lang.php delete mode 100644 donjo-sys/language/english/imglib_lang.php delete mode 100644 donjo-sys/language/english/index.html delete mode 100644 donjo-sys/language/english/migration_lang.php delete mode 100644 donjo-sys/language/english/number_lang.php delete mode 100644 donjo-sys/language/english/profiler_lang.php delete mode 100644 donjo-sys/language/english/unit_test_lang.php delete mode 100644 donjo-sys/language/english/upload_lang.php delete mode 100644 donjo-sys/language/index.html delete mode 100644 donjo-sys/libraries/Cache/Cache.php delete mode 100644 donjo-sys/libraries/Cache/drivers/Cache_apc.php delete mode 100644 donjo-sys/libraries/Cache/drivers/Cache_dummy.php delete mode 100644 donjo-sys/libraries/Cache/drivers/Cache_file.php delete mode 100644 donjo-sys/libraries/Cache/drivers/Cache_memcached.php delete mode 100644 donjo-sys/libraries/Cache/drivers/index.html delete mode 100644 donjo-sys/libraries/Cache/index.html delete mode 100644 donjo-sys/libraries/Calendar.php delete mode 100644 donjo-sys/libraries/Cart.php delete mode 100644 donjo-sys/libraries/Driver.php delete mode 100644 donjo-sys/libraries/Email.php delete mode 100644 donjo-sys/libraries/Encrypt.php delete mode 100644 donjo-sys/libraries/Form_validation.php delete mode 100644 donjo-sys/libraries/Ftp.php delete mode 100644 donjo-sys/libraries/Image_lib.php delete mode 100644 donjo-sys/libraries/Javascript.php delete mode 100644 donjo-sys/libraries/Log.php delete mode 100644 donjo-sys/libraries/Migration.php delete mode 100644 donjo-sys/libraries/Pagination.php delete mode 100644 donjo-sys/libraries/Parser.php delete mode 100644 donjo-sys/libraries/Profiler.php delete mode 100644 donjo-sys/libraries/Session.php delete mode 100644 donjo-sys/libraries/Sha1.php delete mode 100644 donjo-sys/libraries/Table.php delete mode 100644 donjo-sys/libraries/Trackback.php delete mode 100644 donjo-sys/libraries/Typography.php delete mode 100644 donjo-sys/libraries/Unit_test.php delete mode 100644 donjo-sys/libraries/Upload.php delete mode 100644 donjo-sys/libraries/User_agent.php delete mode 100644 donjo-sys/libraries/Xmlrpc.php delete mode 100644 donjo-sys/libraries/Xmlrpcs.php delete mode 100644 donjo-sys/libraries/Zip.php delete mode 100644 donjo-sys/libraries/index.html delete mode 100644 donjo-sys/libraries/javascript/Jquery.php delete mode 100644 donjo-sys/libraries/javascript/index.html diff --git a/donjo-sys/.htaccess b/donjo-sys/.htaccess deleted file mode 100644 index 14249c50b..000000000 --- a/donjo-sys/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all \ No newline at end of file diff --git a/donjo-sys/core/Benchmark.php b/donjo-sys/core/Benchmark.php deleted file mode 100644 index daffa2923..000000000 --- a/donjo-sys/core/Benchmark.php +++ /dev/null @@ -1,119 +0,0 @@ -marker[$name] = microtime(); - } - - // -------------------------------------------------------------------- - - /** - * Calculates the time difference between two marked points. - * - * If the first parameter is empty this function instead returns the - * {elapsed_time} pseudo-variable. This permits the full system - * execution time to be shown in a template. The output class will - * swap the real value for this variable. - * - * @access public - * @param string a particular marked point - * @param string a particular marked point - * @param integer the number of decimal places - * @return mixed - */ - function elapsed_time($point1 = '', $point2 = '', $decimals = 4) - { - if ($point1 == '') - { - return '{elapsed_time}'; - } - - if ( ! isset($this->marker[$point1])) - { - return ''; - } - - if ( ! isset($this->marker[$point2])) - { - $this->marker[$point2] = microtime(); - } - - list($sm, $ss) = explode(' ', $this->marker[$point1]); - list($em, $es) = explode(' ', $this->marker[$point2]); - - return number_format(($em + $es) - ($sm + $ss), $decimals); - } - - // -------------------------------------------------------------------- - - /** - * Memory Usage - * - * This function returns the {memory_usage} pseudo-variable. - * This permits it to be put it anywhere in a template - * without the memory being calculated until the end. - * The output class will swap the real value for this variable. - * - * @access public - * @return string - */ - function memory_usage() - { - return '{memory_usage}'; - } - -} - -// END CI_Benchmark class - -/* End of file Benchmark.php */ -/* Location: ./system/core/Benchmark.php */ \ No newline at end of file diff --git a/donjo-sys/core/CodeIgniter.php b/donjo-sys/core/CodeIgniter.php deleted file mode 100644 index af3d743b9..000000000 --- a/donjo-sys/core/CodeIgniter.php +++ /dev/null @@ -1,403 +0,0 @@ - $assign_to_config['subclass_prefix'])); - } - -/* - * ------------------------------------------------------ - * Set a liberal script execution time limit - * ------------------------------------------------------ - */ - if (function_exists("set_time_limit") == TRUE AND @ini_get("safe_mode") == 0) - { - @set_time_limit(300); - } - -/* - * ------------------------------------------------------ - * Start the timer... tick tock tick tock... - * ------------------------------------------------------ - */ - $BM =& load_class('Benchmark', 'core'); - $BM->mark('total_execution_time_start'); - $BM->mark('loading_time:_base_classes_start'); - -/* - * ------------------------------------------------------ - * Instantiate the hooks class - * ------------------------------------------------------ - */ - $EXT =& load_class('Hooks', 'core'); - -/* - * ------------------------------------------------------ - * Is there a "pre_system" hook? - * ------------------------------------------------------ - */ - $EXT->_call_hook('pre_system'); - -/* - * ------------------------------------------------------ - * Instantiate the config class - * ------------------------------------------------------ - */ - $CFG =& load_class('Config', 'core'); - - // Do we have any manually set config items in the index.php file? - if (isset($assign_to_config)) - { - $CFG->_assign_to_config($assign_to_config); - } - -/* - * ------------------------------------------------------ - * Instantiate the UTF-8 class - * ------------------------------------------------------ - * - * Note: Order here is rather important as the UTF-8 - * class needs to be used very early on, but it cannot - * properly determine if UTf-8 can be supported until - * after the Config class is instantiated. - * - */ - - $UNI =& load_class('Utf8', 'core'); - -/* - * ------------------------------------------------------ - * Instantiate the URI class - * ------------------------------------------------------ - */ - $URI =& load_class('URI', 'core'); - -/* - * ------------------------------------------------------ - * Instantiate the routing class and set the routing - * ------------------------------------------------------ - */ - $RTR =& load_class('Router', 'core'); - $RTR->_set_routing(); - - // Set any routing overrides that may exist in the main index file - if (isset($routing)) - { - $RTR->_set_overrides($routing); - } - -/* - * ------------------------------------------------------ - * Instantiate the output class - * ------------------------------------------------------ - */ - $OUT =& load_class('Output', 'core'); - -/* - * ------------------------------------------------------ - * Is there a valid cache file? If so, we're done... - * ------------------------------------------------------ - */ - if ($EXT->_call_hook('cache_override') === FALSE) - { - if ($OUT->_display_cache($CFG, $URI) == TRUE) - { - exit; - } - } - -/* - * ----------------------------------------------------- - * Load the security class for xss and csrf support - * ----------------------------------------------------- - */ - $SEC =& load_class('Security', 'core'); - -/* - * ------------------------------------------------------ - * Load the Input class and sanitize globals - * ------------------------------------------------------ - */ - $IN =& load_class('Input', 'core'); - -/* - * ------------------------------------------------------ - * Load the Language class - * ------------------------------------------------------ - */ - $LANG =& load_class('Lang', 'core'); - -/* - * ------------------------------------------------------ - * Load the app controller and local controller - * ------------------------------------------------------ - * - */ - // Load the base controller class - require BASEPATH.'core/Controller.php'; - - function &get_instance() - { - return CI_Controller::get_instance(); - } - - - if (file_exists(APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php')) - { - require APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php'; - } - - // Load the local application controller - // Note: The Router class automatically validates the controller path using the router->_validate_request(). - // If this include fails it means that the default controller in the Routes.php file is not resolving to something valid. - if ( ! file_exists(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().'.php')) - { - show_error('Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.'); - } - - include(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().'.php'); - - // Set a mark point for benchmarking - $BM->mark('loading_time:_base_classes_end'); - -/* - * ------------------------------------------------------ - * Security check - * ------------------------------------------------------ - * - * None of the functions in the app controller or the - * loader class can be called via the URI, nor can - * controller functions that begin with an underscore - */ - $class = $RTR->fetch_class(); - $method = $RTR->fetch_method(); - - if ( ! class_exists($class) - OR strncmp($method, '_', 1) == 0 - OR in_array(strtolower($method), array_map('strtolower', get_class_methods('CI_Controller'))) - ) - { - if ( ! empty($RTR->routes['404_override'])) - { - $x = explode('/', $RTR->routes['404_override']); - $class = $x[0]; - $method = (isset($x[1]) ? $x[1] : 'index'); - if ( ! class_exists($class)) - { - if ( ! file_exists(APPPATH.'controllers/'.$class.'.php')) - { - show_404("{$class}/{$method}"); - } - - include_once(APPPATH.'controllers/'.$class.'.php'); - } - } - else - { - show_404("{$class}/{$method}"); - } - } - -/* - * ------------------------------------------------------ - * Is there a "pre_controller" hook? - * ------------------------------------------------------ - */ - $EXT->_call_hook('pre_controller'); - -/* - * ------------------------------------------------------ - * Instantiate the requested controller - * ------------------------------------------------------ - */ - // Mark a start point so we can benchmark the controller - $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_start'); - - $CI = new $class(); - -/* - * ------------------------------------------------------ - * Is there a "post_controller_constructor" hook? - * ------------------------------------------------------ - */ - $EXT->_call_hook('post_controller_constructor'); - -/* - * ------------------------------------------------------ - * Call the requested method - * ------------------------------------------------------ - */ - // Is there a "remap" function? If so, we call it instead - if (method_exists($CI, '_remap')) - { - $CI->_remap($method, array_slice($URI->rsegments, 2)); - } - else - { - // is_callable() returns TRUE on some versions of PHP 5 for private and protected - // methods, so we'll use this workaround for consistent behavior - if ( ! in_array(strtolower($method), array_map('strtolower', get_class_methods($CI)))) - { - // Check and see if we are using a 404 override and use it. - if ( ! empty($RTR->routes['404_override'])) - { - $x = explode('/', $RTR->routes['404_override']); - $class = $x[0]; - $method = (isset($x[1]) ? $x[1] : 'index'); - if ( ! class_exists($class)) - { - if ( ! file_exists(APPPATH.'controllers/'.$class.'.php')) - { - show_404("{$class}/{$method}"); - } - - include_once(APPPATH.'controllers/'.$class.'.php'); - unset($CI); - $CI = new $class(); - } - } - else - { - show_404("{$class}/{$method}"); - } - } - - // Call the requested method. - // Any URI segments present (besides the class/function) will be passed to the method for convenience - call_user_func_array(array(&$CI, $method), array_slice($URI->rsegments, 2)); - } - - - // Mark a benchmark end point - $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_end'); - -/* - * ------------------------------------------------------ - * Is there a "post_controller" hook? - * ------------------------------------------------------ - */ - $EXT->_call_hook('post_controller'); - -/* - * ------------------------------------------------------ - * Send the final rendered output to the browser - * ------------------------------------------------------ - */ - if ($EXT->_call_hook('display_override') === FALSE) - { - $OUT->_display(); - } - -/* - * ------------------------------------------------------ - * Is there a "post_system" hook? - * ------------------------------------------------------ - */ - $EXT->_call_hook('post_system'); - -/* - * ------------------------------------------------------ - * Close the DB connection if one exists - * ------------------------------------------------------ - */ - if (class_exists('CI_DB') AND isset($CI->db)) - { - $CI->db->close(); - } - - -/* End of file CodeIgniter.php */ -/* Location: ./system/core/CodeIgniter.php */ \ No newline at end of file diff --git a/donjo-sys/core/Common.php b/donjo-sys/core/Common.php deleted file mode 100644 index 5e56aa094..000000000 --- a/donjo-sys/core/Common.php +++ /dev/null @@ -1,560 +0,0 @@ - 0) - { - foreach ($replace as $key => $val) - { - if (isset($config[$key])) - { - $config[$key] = $val; - } - } - } - - $_config[0] =& $config; - return $_config[0]; - } -} - -// ------------------------------------------------------------------------ - -/** -* Returns the specified config item -* -* @access public -* @return mixed -*/ -if ( ! function_exists('config_item')) -{ - function config_item($item) - { - static $_config_item = array(); - - if ( ! isset($_config_item[$item])) - { - $config =& get_config(); - - if ( ! isset($config[$item])) - { - return FALSE; - } - $_config_item[$item] = $config[$item]; - } - - return $_config_item[$item]; - } -} - -// ------------------------------------------------------------------------ - -/** -* Error Handler -* -* This function lets us invoke the exception class and -* display errors using the standard error template located -* in application/errors/errors.php -* This function will send the error page directly to the -* browser and exit. -* -* @access public -* @return void -*/ -if ( ! function_exists('show_error')) -{ - function show_error($message, $status_code = 500, $heading = 'An Error Was Encountered') - { - $_error =& load_class('Exceptions', 'core'); - echo $_error->show_error($heading, $message, 'error_general', $status_code); - exit; - } -} - -// ------------------------------------------------------------------------ - -/** -* 404 Page Handler -* -* This function is similar to the show_error() function above -* However, instead of the standard error template it displays -* 404 errors. -* -* @access public -* @return void -*/ -if ( ! function_exists('show_404')) -{ - function show_404($page = '', $log_error = TRUE) - { - $_error =& load_class('Exceptions', 'core'); - $_error->show_404($page, $log_error); - exit; - } -} - -// ------------------------------------------------------------------------ - -/** -* Error Logging Interface -* -* We use this as a simple mechanism to access the logging -* class and send messages to be logged. -* -* @access public -* @return void -*/ -if ( ! function_exists('log_message')) -{ - function log_message($level = 'error', $message, $php_error = FALSE) - { - static $_log; - - if (config_item('log_threshold') == 0) - { - return; - } - - $_log =& load_class('Log'); - $_log->write_log($level, $message, $php_error); - } -} - -// ------------------------------------------------------------------------ - -/** - * Set HTTP Status Header - * - * @access public - * @param int the status code - * @param string - * @return void - */ -if ( ! function_exists('set_status_header')) -{ - function set_status_header($code = 200, $text = '') - { - $stati = array( - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 307 => 'Temporary Redirect', - - 400 => 'Bad Request', - 401 => 'Unauthorized', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported' - ); - - if ($code == '' OR ! is_numeric($code)) - { - show_error('Status codes must be numeric', 500); - } - - if (isset($stati[$code]) AND $text == '') - { - $text = $stati[$code]; - } - - if ($text == '') - { - show_error('No status text available. Please check your status code number or supply your own message text.', 500); - } - - $server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : FALSE; - - if (substr(php_sapi_name(), 0, 3) == 'cgi') - { - header("Status: {$code} {$text}", TRUE); - } - elseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0') - { - header($server_protocol." {$code} {$text}", TRUE, $code); - } - else - { - header("HTTP/1.1 {$code} {$text}", TRUE, $code); - } - } -} - -// -------------------------------------------------------------------- - -/** -* Exception Handler -* -* This is the custom exception handler that is declaired at the top -* of Codeigniter.php. The main reason we use this is to permit -* PHP errors to be logged in our own log files since the user may -* not have access to server logs. Since this function -* effectively intercepts PHP errors, however, we also need -* to display errors based on the current error_reporting level. -* We do that with the use of a PHP error template. -* -* @access private -* @return void -*/ -if ( ! function_exists('_exception_handler')) -{ - function _exception_handler($severity, $message, $filepath, $line) - { - // We don't bother with "strict" notices since they tend to fill up - // the log file with excess information that isn't normally very helpful. - if ($severity == E_STRICT) - { - return; - } - - $_error =& load_class('Exceptions', 'core'); - - // Should we display the error? We'll get the current error_reporting - // level and add its bits with the severity bits to find out. - if (($severity & error_reporting()) == $severity) - { - $_error->show_php_error($severity, $message, $filepath, $line); - } - - // Should we log the error? No? We're done... - if (config_item('log_threshold') == 0) - { - return; - } - - $_error->log_exception($severity, $message, $filepath, $line); - } -} - -// -------------------------------------------------------------------- - -/** - * Remove Invisible Characters - * - * This prevents sandwiching null characters - * between ascii characters, like Java\0script. - * - * @access public - * @param string - * @return string - */ -if ( ! function_exists('remove_invisible_characters')) -{ - function remove_invisible_characters($str, $url_encoded = TRUE) - { - $non_displayables = array(); - - // every control character except newline (dec 10) - // carriage return (dec 13), and horizontal tab (dec 09) - - if ($url_encoded) - { - $non_displayables[] = '/%0[0-8bcef]/'; // url encoded 00-08, 11, 12, 14, 15 - $non_displayables[] = '/%1[0-9a-f]/'; // url encoded 16-31 - } - - $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127 - - do - { - $str = preg_replace($non_displayables, '', $str, -1, $count); - } - while ($count); - - return $str; - } -} - -// ------------------------------------------------------------------------ - -/** -* Returns HTML escaped variable -* -* @access public -* @param mixed -* @return mixed -*/ -if ( ! function_exists('html_escape')) -{ - function html_escape($var) - { - if (is_array($var)) - { - return array_map('html_escape', $var); - } - else - { - return htmlspecialchars($var, ENT_QUOTES, config_item('charset')); - } - } -} - -/* End of file Common.php */ -/* Location: ./system/core/Common.php */ \ No newline at end of file diff --git a/donjo-sys/core/Config.php b/donjo-sys/core/Config.php deleted file mode 100644 index 6051b1d8a..000000000 --- a/donjo-sys/core/Config.php +++ /dev/null @@ -1,380 +0,0 @@ -config =& get_config(); - log_message('debug', "Config Class Initialized"); - - // Set the base_url automatically if none was provided - if ($this->config['base_url'] == '') - { - if (isset($_SERVER['SERVER_ADDR'])) - { - $base_url = (empty($_SERVER['HTTPS']) OR strtolower($_SERVER['HTTPS']) === 'off') ? 'http' : 'https'; - $base_url .= '://'.$_SERVER['SERVER_ADDR']; - $base_url .= substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], basename($_SERVER['SCRIPT_FILENAME']))); - } - - else - { - $base_url = 'http://localhost/'; - } - - $this->set_item('base_url', $base_url); - } - } - - // -------------------------------------------------------------------- - - /** - * Load Config File - * - * @access public - * @param string the config file name - * @param boolean if configuration values should be loaded into their own section - * @param boolean true if errors should just return false, false if an error message should be displayed - * @return boolean if the file was loaded correctly - */ - function load($file = '', $use_sections = FALSE, $fail_gracefully = FALSE) - { - $file = ($file == '') ? 'config' : str_replace('.php', '', $file); - $found = FALSE; - $loaded = FALSE; - - $check_locations = defined('ENVIRONMENT') - ? array(ENVIRONMENT.'/'.$file, $file) - : array($file); - - foreach ($this->_config_paths as $path) - { - foreach ($check_locations as $location) - { - $file_path = $path.'config/'.$location.'.php'; - - if (in_array($file_path, $this->is_loaded, TRUE)) - { - $loaded = TRUE; - continue 2; - } - - if (file_exists($file_path)) - { - $found = TRUE; - break; - } - } - - if ($found === FALSE) - { - continue; - } - - include($file_path); - - if ( ! isset($config) OR ! is_array($config)) - { - if ($fail_gracefully === TRUE) - { - return FALSE; - } - show_error('Your '.$file_path.' file does not appear to contain a valid configuration array.'); - } - - if ($use_sections === TRUE) - { - if (isset($this->config[$file])) - { - $this->config[$file] = array_merge($this->config[$file], $config); - } - else - { - $this->config[$file] = $config; - } - } - else - { - $this->config = array_merge($this->config, $config); - } - - $this->is_loaded[] = $file_path; - unset($config); - - $loaded = TRUE; - log_message('debug', 'Config file loaded: '.$file_path); - break; - } - - if ($loaded === FALSE) - { - if ($fail_gracefully === TRUE) - { - return FALSE; - } - show_error('The configuration file '.$file.'.php does not exist.'); - } - - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Fetch a config file item - * - * - * @access public - * @param string the config item name - * @param string the index name - * @param bool - * @return string - */ - function item($item, $index = '') - { - if ($index == '') - { - if ( ! isset($this->config[$item])) - { - return FALSE; - } - - $pref = $this->config[$item]; - } - else - { - if ( ! isset($this->config[$index])) - { - return FALSE; - } - - if ( ! isset($this->config[$index][$item])) - { - return FALSE; - } - - $pref = $this->config[$index][$item]; - } - - return $pref; - } - - // -------------------------------------------------------------------- - - /** - * Fetch a config file item - adds slash after item (if item is not empty) - * - * @access public - * @param string the config item name - * @param bool - * @return string - */ - function slash_item($item) - { - if ( ! isset($this->config[$item])) - { - return FALSE; - } - if( trim($this->config[$item]) == '') - { - return ''; - } - - return rtrim($this->config[$item], '/').'/'; - } - - // -------------------------------------------------------------------- - - /** - * Site URL - * Returns base_url . index_page [. uri_string] - * - * @access public - * @param string the URI string - * @return string - */ - function site_url($uri = '') - { - if ($uri == '') - { - return $this->slash_item('base_url').$this->item('index_page'); - } - - if ($this->item('enable_query_strings') == FALSE) - { - $suffix = ($this->item('url_suffix') == FALSE) ? '' : $this->item('url_suffix'); - return $this->slash_item('base_url').$this->slash_item('index_page').$this->_uri_string($uri).$suffix; - } - else - { - return $this->slash_item('base_url').$this->item('index_page').'?'.$this->_uri_string($uri); - } - } - - // ------------------------------------------------------------- - - /** - * Base URL - * Returns base_url [. uri_string] - * - * @access public - * @param string $uri - * @return string - */ - function base_url($uri = '') - { - return $this->slash_item('base_url').ltrim($this->_uri_string($uri), '/'); - } - - // ------------------------------------------------------------- - - /** - * Build URI string for use in Config::site_url() and Config::base_url() - * - * @access protected - * @param $uri - * @return string - */ - protected function _uri_string($uri) - { - if ($this->item('enable_query_strings') == FALSE) - { - if (is_array($uri)) - { - $uri = implode('/', $uri); - } - $uri = trim($uri, '/'); - } - else - { - if (is_array($uri)) - { - $i = 0; - $str = ''; - foreach ($uri as $key => $val) - { - $prefix = ($i == 0) ? '' : '&'; - $str .= $prefix.$key.'='.$val; - $i++; - } - $uri = $str; - } - } - return $uri; - } - - // -------------------------------------------------------------------- - - /** - * System URL - * - * @access public - * @return string - */ - function system_url() - { - $x = explode("/", preg_replace("|/*(.+?)/*$|", "\\1", BASEPATH)); - return $this->slash_item('base_url').end($x).'/'; - } - - // -------------------------------------------------------------------- - - /** - * Set a config file item - * - * @access public - * @param string the config item key - * @param string the config item value - * @return void - */ - function set_item($item, $value) - { - $this->config[$item] = $value; - } - - // -------------------------------------------------------------------- - - /** - * Assign to Config - * - * This function is called by the front controller (CodeIgniter.php) - * after the Config class is instantiated. It permits config items - * to be assigned or overriden by variables contained in the index.php file - * - * @access private - * @param array - * @return void - */ - function _assign_to_config($items = array()) - { - if (is_array($items)) - { - foreach ($items as $key => $val) - { - $this->set_item($key, $val); - } - } - } -} - -// END CI_Config class - -/* End of file Config.php */ -/* Location: ./system/core/Config.php */ diff --git a/donjo-sys/core/Controller.php b/donjo-sys/core/Controller.php deleted file mode 100644 index e05362ca7..000000000 --- a/donjo-sys/core/Controller.php +++ /dev/null @@ -1,65 +0,0 @@ - $class) - { - $this->$var =& load_class($class); - } - - $this->load =& load_class('Loader', 'core'); - - $this->load->initialize(); - - log_message('debug', "Controller Class Initialized"); - } - - public static function &get_instance() - { - return self::$instance; - } -} -// END Controller class - -/* End of file Controller.php */ -/* Location: ./system/core/Controller.php */ \ No newline at end of file diff --git a/donjo-sys/core/Exceptions.php b/donjo-sys/core/Exceptions.php deleted file mode 100644 index 4ca2fafb5..000000000 --- a/donjo-sys/core/Exceptions.php +++ /dev/null @@ -1,194 +0,0 @@ - 'Error', - E_WARNING => 'Warning', - E_PARSE => 'Parsing Error', - E_NOTICE => 'Notice', - E_CORE_ERROR => 'Core Error', - E_CORE_WARNING => 'Core Warning', - E_COMPILE_ERROR => 'Compile Error', - E_COMPILE_WARNING => 'Compile Warning', - E_USER_ERROR => 'User Error', - E_USER_WARNING => 'User Warning', - E_USER_NOTICE => 'User Notice', - E_STRICT => 'Runtime Notice' - ); - - - /** - * Constructor - */ - public function __construct() - { - $this->ob_level = ob_get_level(); - // Note: Do not log messages from this constructor. - } - - // -------------------------------------------------------------------- - - /** - * Exception Logger - * - * This function logs PHP generated error messages - * - * @access private - * @param string the error severity - * @param string the error string - * @param string the error filepath - * @param string the error line number - * @return string - */ - function log_exception($severity, $message, $filepath, $line) - { - $severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity]; - - log_message('error', 'Severity: '.$severity.' --> '.$message. ' '.$filepath.' '.$line, TRUE); - } - - // -------------------------------------------------------------------- - - /** - * 404 Page Not Found Handler - * - * @access private - * @param string the page - * @param bool log error yes/no - * @return string - */ - function show_404($page = '', $log_error = TRUE) - { - $heading = "404 Page Not Found"; - $message = "The page you requested was not found."; - - // By default we log this, but allow a dev to skip it - if ($log_error) - { - log_message('error', '404 Page Not Found --> '.$page); - } - - echo $this->show_error($heading, $message, 'error_404', 404); - exit; - } - - // -------------------------------------------------------------------- - - /** - * General Error Page - * - * This function takes an error message as input - * (either as a string or an array) and displays - * it using the specified template. - * - * @access private - * @param string the heading - * @param string the message - * @param string the template name - * @param int the status code - * @return string - */ - function show_error($heading, $message, $template = 'error_general', $status_code = 500) - { - set_status_header($status_code); - - $message = '

'.implode('

', ( ! is_array($message)) ? array($message) : $message).'

'; - - if (ob_get_level() > $this->ob_level + 1) - { - ob_end_flush(); - } - ob_start(); - include(APPPATH.'errors/'.$template.'.php'); - $buffer = ob_get_contents(); - ob_end_clean(); - return $buffer; - } - - // -------------------------------------------------------------------- - - /** - * Native PHP error handler - * - * @access private - * @param string the error severity - * @param string the error string - * @param string the error filepath - * @param string the error line number - * @return string - */ - function show_php_error($severity, $message, $filepath, $line) - { - $severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity]; - - $filepath = str_replace("\\", "/", $filepath); - - // For safety reasons we do not show the full file path - if (FALSE !== strpos($filepath, '/')) - { - $x = explode('/', $filepath); - $filepath = $x[count($x)-2].'/'.end($x); - } - - if (ob_get_level() > $this->ob_level + 1) - { - ob_end_flush(); - } - ob_start(); - include(APPPATH.'errors/error_php.php'); - $buffer = ob_get_contents(); - ob_end_clean(); - echo $buffer; - } - - -} -// END Exceptions Class - -/* End of file Exceptions.php */ -/* Location: ./system/core/Exceptions.php */ \ No newline at end of file diff --git a/donjo-sys/core/Hooks.php b/donjo-sys/core/Hooks.php deleted file mode 100644 index 4dbabb87b..000000000 --- a/donjo-sys/core/Hooks.php +++ /dev/null @@ -1,249 +0,0 @@ -_initialize(); - log_message('debug', "Hooks Class Initialized"); - } - - // -------------------------------------------------------------------- - - /** - * Initialize the Hooks Preferences - * - * @access private - * @return void - */ - function _initialize() - { - $CFG =& load_class('Config', 'core'); - - // If hooks are not enabled in the config file - // there is nothing else to do - - if ($CFG->item('enable_hooks') == FALSE) - { - return; - } - - // Grab the "hooks" definition file. - // If there are no hooks, we're done. - - if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/hooks.php')) - { - include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'); - } - elseif (is_file(APPPATH.'config/hooks.php')) - { - include(APPPATH.'config/hooks.php'); - } - - - if ( ! isset($hook) OR ! is_array($hook)) - { - return; - } - - $this->hooks =& $hook; - $this->enabled = TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Call Hook - * - * Calls a particular hook - * - * @access private - * @param string the hook name - * @return mixed - */ - function _call_hook($which = '') - { - if ( ! $this->enabled OR ! isset($this->hooks[$which])) - { - return FALSE; - } - - if (isset($this->hooks[$which][0]) AND is_array($this->hooks[$which][0])) - { - foreach ($this->hooks[$which] as $val) - { - $this->_run_hook($val); - } - } - else - { - $this->_run_hook($this->hooks[$which]); - } - - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Run Hook - * - * Runs a particular hook - * - * @access private - * @param array the hook details - * @return bool - */ - function _run_hook($data) - { - if ( ! is_array($data)) - { - return FALSE; - } - - // ----------------------------------- - // Safety - Prevents run-away loops - // ----------------------------------- - - // If the script being called happens to have the same - // hook call within it a loop can happen - - if ($this->in_progress == TRUE) - { - return; - } - - // ----------------------------------- - // Set file path - // ----------------------------------- - - if ( ! isset($data['filepath']) OR ! isset($data['filename'])) - { - return FALSE; - } - - $filepath = APPPATH.$data['filepath'].'/'.$data['filename']; - - if ( ! file_exists($filepath)) - { - return FALSE; - } - - // ----------------------------------- - // Set class/function name - // ----------------------------------- - - $class = FALSE; - $function = FALSE; - $params = ''; - - if (isset($data['class']) AND $data['class'] != '') - { - $class = $data['class']; - } - - if (isset($data['function'])) - { - $function = $data['function']; - } - - if (isset($data['params'])) - { - $params = $data['params']; - } - - if ($class === FALSE AND $function === FALSE) - { - return FALSE; - } - - // ----------------------------------- - // Set the in_progress flag - // ----------------------------------- - - $this->in_progress = TRUE; - - // ----------------------------------- - // Call the requested class and/or function - // ----------------------------------- - - if ($class !== FALSE) - { - if ( ! class_exists($class)) - { - require($filepath); - } - - $HOOK = new $class; - $HOOK->$function($params); - } - else - { - if ( ! function_exists($function)) - { - require($filepath); - } - - $function($params); - } - - $this->in_progress = FALSE; - return TRUE; - } - -} - -// END CI_Hooks class - -/* End of file Hooks.php */ -/* Location: ./system/core/Hooks.php */ \ No newline at end of file diff --git a/donjo-sys/core/Input.php b/donjo-sys/core/Input.php deleted file mode 100644 index 40305745a..000000000 --- a/donjo-sys/core/Input.php +++ /dev/null @@ -1,866 +0,0 @@ -_allow_get_array = (config_item('allow_get_array') === TRUE); - $this->_enable_xss = (config_item('global_xss_filtering') === TRUE); - $this->_enable_csrf = (config_item('csrf_protection') === TRUE); - - global $SEC; - $this->security =& $SEC; - - // Do we need the UTF-8 class? - if (UTF8_ENABLED === TRUE) - { - global $UNI; - $this->uni =& $UNI; - } - - // Sanitize global arrays - $this->_sanitize_globals(); - } - - // -------------------------------------------------------------------- - - /** - * Fetch from array - * - * This is a helper function to retrieve values from global arrays - * - * @access private - * @param array - * @param string - * @param bool - * @return string - */ - function _fetch_from_array(&$array, $index = '', $xss_clean = FALSE) - { - if ( ! isset($array[$index])) - { - return FALSE; - } - - if ($xss_clean === TRUE) - { - return $this->security->xss_clean($array[$index]); - } - - return $array[$index]; - } - - // -------------------------------------------------------------------- - - /** - * Fetch an item from the GET array - * - * @access public - * @param string - * @param bool - * @return string - */ - function get($index = NULL, $xss_clean = FALSE) - { - // Check if a field has been provided - if ($index === NULL AND ! empty($_GET)) - { - $get = array(); - - // loop through the full _GET array - foreach (array_keys($_GET) as $key) - { - $get[$key] = $this->_fetch_from_array($_GET, $key, $xss_clean); - } - return $get; - } - - return $this->_fetch_from_array($_GET, $index, $xss_clean); - } - - // -------------------------------------------------------------------- - - /** - * Fetch an item from the POST array - * - * @access public - * @param string - * @param bool - * @return string - */ - function post($index = NULL, $xss_clean = FALSE) - { - // Check if a field has been provided - if ($index === NULL AND ! empty($_POST)) - { - $post = array(); - - // Loop through the full _POST array and return it - foreach (array_keys($_POST) as $key) - { - $post[$key] = $this->_fetch_from_array($_POST, $key, $xss_clean); - } - return $post; - } - - return $this->_fetch_from_array($_POST, $index, $xss_clean); - } - - - // -------------------------------------------------------------------- - - /** - * Fetch an item from either the GET array or the POST - * - * @access public - * @param string The index key - * @param bool XSS cleaning - * @return string - */ - function get_post($index = '', $xss_clean = FALSE) - { - if ( ! isset($_POST[$index]) ) - { - return $this->get($index, $xss_clean); - } - else - { - return $this->post($index, $xss_clean); - } - } - - // -------------------------------------------------------------------- - - /** - * Fetch an item from the COOKIE array - * - * @access public - * @param string - * @param bool - * @return string - */ - function cookie($index = '', $xss_clean = FALSE) - { - return $this->_fetch_from_array($_COOKIE, $index, $xss_clean); - } - - // ------------------------------------------------------------------------ - - /** - * Set cookie - * - * Accepts six parameter, or you can submit an associative - * array in the first parameter containing all the values. - * - * @access public - * @param mixed - * @param string the value of the cookie - * @param string the number of seconds until expiration - * @param string the cookie domain. Usually: .yourdomain.com - * @param string the cookie path - * @param string the cookie prefix - * @param bool true makes the cookie secure - * @return void - */ - function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE) - { - if (is_array($name)) - { - // always leave 'name' in last place, as the loop will break otherwise, due to $$item - foreach (array('value', 'expire', 'domain', 'path', 'prefix', 'secure', 'name') as $item) - { - if (isset($name[$item])) - { - $$item = $name[$item]; - } - } - } - - if ($prefix == '' AND config_item('cookie_prefix') != '') - { - $prefix = config_item('cookie_prefix'); - } - if ($domain == '' AND config_item('cookie_domain') != '') - { - $domain = config_item('cookie_domain'); - } - if ($path == '/' AND config_item('cookie_path') != '/') - { - $path = config_item('cookie_path'); - } - if ($secure == FALSE AND config_item('cookie_secure') != FALSE) - { - $secure = config_item('cookie_secure'); - } - - if ( ! is_numeric($expire)) - { - $expire = time() - 86500; - } - else - { - $expire = ($expire > 0) ? time() + $expire : 0; - } - - setcookie($prefix.$name, $value, $expire, $path, $domain, $secure); - } - - // -------------------------------------------------------------------- - - /** - * Fetch an item from the SERVER array - * - * @access public - * @param string - * @param bool - * @return string - */ - function server($index = '', $xss_clean = FALSE) - { - return $this->_fetch_from_array($_SERVER, $index, $xss_clean); - } - - // -------------------------------------------------------------------- - - /** - * Fetch the IP Address - * - * @return string - */ - public function ip_address() - { - if ($this->ip_address !== FALSE) - { - return $this->ip_address; - } - - $proxy_ips = config_item('proxy_ips'); - if ( ! empty($proxy_ips)) - { - $proxy_ips = explode(',', str_replace(' ', '', $proxy_ips)); - foreach (array('HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'HTTP_X_CLIENT_IP', 'HTTP_X_CLUSTER_CLIENT_IP') as $header) - { - if (($spoof = $this->server($header)) !== FALSE) - { - // Some proxies typically list the whole chain of IP - // addresses through which the client has reached us. - // e.g. client_ip, proxy_ip1, proxy_ip2, etc. - if (strpos($spoof, ',') !== FALSE) - { - $spoof = explode(',', $spoof, 2); - $spoof = $spoof[0]; - } - - if ( ! $this->valid_ip($spoof)) - { - $spoof = FALSE; - } - else - { - break; - } - } - } - - $this->ip_address = ($spoof !== FALSE && in_array($_SERVER['REMOTE_ADDR'], $proxy_ips, TRUE)) - ? $spoof : $_SERVER['REMOTE_ADDR']; - } - else - { - $this->ip_address = $_SERVER['REMOTE_ADDR']; - } - - if ( ! $this->valid_ip($this->ip_address)) - { - $this->ip_address = '0.0.0.0'; - } - - return $this->ip_address; - } - - // -------------------------------------------------------------------- - - /** - * Validate IP Address - * - * @access public - * @param string - * @param string ipv4 or ipv6 - * @return bool - */ - public function valid_ip($ip, $which = '') - { - $which = strtolower($which); - - // First check if filter_var is available - if (is_callable('filter_var')) - { - switch ($which) { - case 'ipv4': - $flag = FILTER_FLAG_IPV4; - break; - case 'ipv6': - $flag = FILTER_FLAG_IPV6; - break; - default: - $flag = ''; - break; - } - - return (bool) filter_var($ip, FILTER_VALIDATE_IP, $flag); - } - - if ($which !== 'ipv6' && $which !== 'ipv4') - { - if (strpos($ip, ':') !== FALSE) - { - $which = 'ipv6'; - } - elseif (strpos($ip, '.') !== FALSE) - { - $which = 'ipv4'; - } - else - { - return FALSE; - } - } - - $func = '_valid_'.$which; - return $this->$func($ip); - } - - // -------------------------------------------------------------------- - - /** - * Validate IPv4 Address - * - * Updated version suggested by Geert De Deckere - * - * @access protected - * @param string - * @return bool - */ - protected function _valid_ipv4($ip) - { - $ip_segments = explode('.', $ip); - - // Always 4 segments needed - if (count($ip_segments) !== 4) - { - return FALSE; - } - // IP can not start with 0 - if ($ip_segments[0][0] == '0') - { - return FALSE; - } - - // Check each segment - foreach ($ip_segments as $segment) - { - // IP segments must be digits and can not be - // longer than 3 digits or greater then 255 - if ($segment == '' OR preg_match("/[^0-9]/", $segment) OR $segment > 255 OR strlen($segment) > 3) - { - return FALSE; - } - } - - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Validate IPv6 Address - * - * @access protected - * @param string - * @return bool - */ - protected function _valid_ipv6($str) - { - // 8 groups, separated by : - // 0-ffff per group - // one set of consecutive 0 groups can be collapsed to :: - - $groups = 8; - $collapsed = FALSE; - - $chunks = array_filter( - preg_split('/(:{1,2})/', $str, NULL, PREG_SPLIT_DELIM_CAPTURE) - ); - - // Rule out easy nonsense - if (current($chunks) == ':' OR end($chunks) == ':') - { - return FALSE; - } - - // PHP supports IPv4-mapped IPv6 addresses, so we'll expect those as well - if (strpos(end($chunks), '.') !== FALSE) - { - $ipv4 = array_pop($chunks); - - if ( ! $this->_valid_ipv4($ipv4)) - { - return FALSE; - } - - $groups--; - } - - while ($seg = array_pop($chunks)) - { - if ($seg[0] == ':') - { - if (--$groups == 0) - { - return FALSE; // too many groups - } - - if (strlen($seg) > 2) - { - return FALSE; // long separator - } - - if ($seg == '::') - { - if ($collapsed) - { - return FALSE; // multiple collapsed - } - - $collapsed = TRUE; - } - } - elseif (preg_match("/[^0-9a-f]/i", $seg) OR strlen($seg) > 4) - { - return FALSE; // invalid segment - } - } - - return $collapsed OR $groups == 1; - } - - // -------------------------------------------------------------------- - - /** - * User Agent - * - * @access public - * @return string - */ - function user_agent() - { - if ($this->user_agent !== FALSE) - { - return $this->user_agent; - } - - $this->user_agent = ( ! isset($_SERVER['HTTP_USER_AGENT'])) ? FALSE : $_SERVER['HTTP_USER_AGENT']; - - return $this->user_agent; - } - - // -------------------------------------------------------------------- - - /** - * Sanitize Globals - * - * This function does the following: - * - * Unsets $_GET data (if query strings are not enabled) - * - * Unsets all globals if register_globals is enabled - * - * Standardizes newline characters to \n - * - * @access private - * @return void - */ - function _sanitize_globals() - { - // It would be "wrong" to unset any of these GLOBALS. - $protected = array('_SERVER', '_GET', '_POST', '_FILES', '_REQUEST', - '_SESSION', '_ENV', 'GLOBALS', 'HTTP_RAW_POST_DATA', - 'system_folder', 'application_folder', 'BM', 'EXT', - 'CFG', 'URI', 'RTR', 'OUT', 'IN'); - - // Unset globals for securiy. - // This is effectively the same as register_globals = off - foreach (array($_GET, $_POST, $_COOKIE) as $global) - { - if ( ! is_array($global)) - { - if ( ! in_array($global, $protected)) - { - global $$global; - $$global = NULL; - } - } - else - { - foreach ($global as $key => $val) - { - if ( ! in_array($key, $protected)) - { - global $$key; - $$key = NULL; - } - } - } - } - - // Is $_GET data allowed? If not we'll set the $_GET to an empty array - if ($this->_allow_get_array == FALSE) - { - $_GET = array(); - } - else - { - if (is_array($_GET) AND count($_GET) > 0) - { - foreach ($_GET as $key => $val) - { - $_GET[$this->_clean_input_keys($key)] = $this->_clean_input_data($val); - } - } - } - - // Clean $_POST Data - if (is_array($_POST) AND count($_POST) > 0) - { - foreach ($_POST as $key => $val) - { - $_POST[$this->_clean_input_keys($key)] = $this->_clean_input_data($val); - } - } - - // Clean $_COOKIE Data - if (is_array($_COOKIE) AND count($_COOKIE) > 0) - { - // Also get rid of specially treated cookies that might be set by a server - // or silly application, that are of no use to a CI application anyway - // but that when present will trip our 'Disallowed Key Characters' alarm - // http://www.ietf.org/rfc/rfc2109.txt - // note that the key names below are single quoted strings, and are not PHP variables - unset($_COOKIE['$Version']); - unset($_COOKIE['$Path']); - unset($_COOKIE['$Domain']); - - // Work-around for PHP bug #66827 (https://bugs.php.net/bug.php?id=66827) - // - // The session ID sanitizer doesn't check for the value type and blindly does - // an implicit cast to string, which triggers an 'Array to string' E_NOTICE. - $sess_cookie_name = config_item('cookie_prefix').config_item('sess_cookie_name'); - if (isset($_COOKIE[$sess_cookie_name]) && ! is_string($_COOKIE[$sess_cookie_name])) - { - unset($_COOKIE[$sess_cookie_name]); - } - - foreach ($_COOKIE as $key => $val) - { - // _clean_input_data() has been reported to break encrypted cookies - if ($key === $sess_cookie_name && config_item('sess_encrypt_cookie')) - { - continue; - } - - $_COOKIE[$this->_clean_input_keys($key)] = $this->_clean_input_data($val); - } - } - - // Sanitize PHP_SELF - $_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']); - - - // CSRF Protection check on HTTP requests - if ($this->_enable_csrf == TRUE && ! $this->is_cli_request()) - { - $this->security->csrf_verify(); - } - - log_message('debug', "Global POST and COOKIE data sanitized"); - } - - // -------------------------------------------------------------------- - - /** - * Clean Input Data - * - * This is a helper function. It escapes data and - * standardizes newline characters to \n - * - * @access private - * @param string - * @return string - */ - function _clean_input_data($str) - { - if (is_array($str)) - { - $new_array = array(); - foreach ($str as $key => $val) - { - $new_array[$this->_clean_input_keys($key)] = $this->_clean_input_data($val); - } - return $new_array; - } - - /* We strip slashes if magic quotes is on to keep things consistent - - NOTE: In PHP 5.4 get_magic_quotes_gpc() will always return 0 and - it will probably not exist in future versions at all. - */ - if ( ! is_php('5.4') && get_magic_quotes_gpc()) - { - $str = stripslashes($str); - } - - // Clean UTF-8 if supported - if (UTF8_ENABLED === TRUE) - { - $str = $this->uni->clean_string($str); - } - - // Remove control characters - $str = remove_invisible_characters($str); - - // Should we filter the input data? - if ($this->_enable_xss === TRUE) - { - $str = $this->security->xss_clean($str); - } - - // Standardize newlines if needed - if ($this->_standardize_newlines == TRUE) - { - if (strpos($str, "\r") !== FALSE) - { - $str = str_replace(array("\r\n", "\r", "\r\n\n"), PHP_EOL, $str); - } - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Clean Keys - * - * This is a helper function. To prevent malicious users - * from trying to exploit keys we make sure that keys are - * only named with alpha-numeric text and a few other items. - * - * @access private - * @param string - * @return string - */ - function _clean_input_keys($str) - { - if ( ! preg_match("/^[a-z0-9:_\/-]+$/i", $str)) - { - exit('Disallowed Key Characters.'); - } - - // Clean UTF-8 if supported - if (UTF8_ENABLED === TRUE) - { - $str = $this->uni->clean_string($str); - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Request Headers - * - * In Apache, you can simply call apache_request_headers(), however for - * people running other webservers the function is undefined. - * - * @param bool XSS cleaning - * - * @return array - */ - public function request_headers($xss_clean = FALSE) - { - // Look at Apache go! - if (function_exists('apache_request_headers')) - { - $headers = apache_request_headers(); - } - else - { - $headers['Content-Type'] = (isset($_SERVER['CONTENT_TYPE'])) ? $_SERVER['CONTENT_TYPE'] : @getenv('CONTENT_TYPE'); - - foreach ($_SERVER as $key => $val) - { - if (strncmp($key, 'HTTP_', 5) === 0) - { - $headers[substr($key, 5)] = $this->_fetch_from_array($_SERVER, $key, $xss_clean); - } - } - } - - // take SOME_HEADER and turn it into Some-Header - foreach ($headers as $key => $val) - { - $key = str_replace('_', ' ', strtolower($key)); - $key = str_replace(' ', '-', ucwords($key)); - - $this->headers[$key] = $val; - } - - return $this->headers; - } - - // -------------------------------------------------------------------- - - /** - * Get Request Header - * - * Returns the value of a single member of the headers class member - * - * @param string array key for $this->headers - * @param boolean XSS Clean or not - * @return mixed FALSE on failure, string on success - */ - public function get_request_header($index, $xss_clean = FALSE) - { - if (empty($this->headers)) - { - $this->request_headers(); - } - - if ( ! isset($this->headers[$index])) - { - return FALSE; - } - - if ($xss_clean === TRUE) - { - return $this->security->xss_clean($this->headers[$index]); - } - - return $this->headers[$index]; - } - - // -------------------------------------------------------------------- - - /** - * Is ajax Request? - * - * Test to see if a request contains the HTTP_X_REQUESTED_WITH header - * - * @return boolean - */ - public function is_ajax_request() - { - return ($this->server('HTTP_X_REQUESTED_WITH') === 'XMLHttpRequest'); - } - - // -------------------------------------------------------------------- - - /** - * Is cli Request? - * - * Test to see if a request was made from the command line - * - * @return bool - */ - public function is_cli_request() - { - return (php_sapi_name() === 'cli' OR defined('STDIN')); - } - -} - -/* End of file Input.php */ -/* Location: ./system/core/Input.php */ \ No newline at end of file diff --git a/donjo-sys/core/Lang.php b/donjo-sys/core/Lang.php deleted file mode 100644 index 28497034a..000000000 --- a/donjo-sys/core/Lang.php +++ /dev/null @@ -1,161 +0,0 @@ -is_loaded, TRUE)) - { - return; - } - - $config =& get_config(); - - if ($idiom == '') - { - $deft_lang = ( ! isset($config['language'])) ? 'english' : $config['language']; - $idiom = ($deft_lang == '') ? 'english' : $deft_lang; - } - - // Determine where the language file is and load it - if ($alt_path != '' && file_exists($alt_path.'language/'.$idiom.'/'.$langfile)) - { - include($alt_path.'language/'.$idiom.'/'.$langfile); - } - else - { - $found = FALSE; - - foreach (get_instance()->load->get_package_paths(TRUE) as $package_path) - { - if (file_exists($package_path.'language/'.$idiom.'/'.$langfile)) - { - include($package_path.'language/'.$idiom.'/'.$langfile); - $found = TRUE; - break; - } - } - - if ($found !== TRUE) - { - show_error('Unable to load the requested language file: language/'.$idiom.'/'.$langfile); - } - } - - - if ( ! isset($lang)) - { - log_message('error', 'Language file contains no data: language/'.$idiom.'/'.$langfile); - return; - } - - if ($return == TRUE) - { - return $lang; - } - - $this->is_loaded[] = $langfile; - $this->language = array_merge($this->language, $lang); - unset($lang); - - log_message('debug', 'Language file loaded: language/'.$idiom.'/'.$langfile); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Fetch a single line of text from the language array - * - * @access public - * @param string $line the language line - * @return string - */ - function line($line = '') - { - $value = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line]; - - // Because killer robots like unicorns! - if ($value === FALSE) - { - log_message('error', 'Could not find the language line "'.$line.'"'); - } - - return $value; - } - -} -// END Language Class - -/* End of file Lang.php */ -/* Location: ./system/core/Lang.php */ diff --git a/donjo-sys/core/Loader.php b/donjo-sys/core/Loader.php deleted file mode 100644 index 40090db6e..000000000 --- a/donjo-sys/core/Loader.php +++ /dev/null @@ -1,1249 +0,0 @@ - 'unit', - 'user_agent' => 'agent'); - - /** - * Constructor - * - * Sets the path to the view files and gets the initial output buffering level - */ - public function __construct() - { - $this->_ci_ob_level = ob_get_level(); - $this->_ci_library_paths = array(APPPATH, BASEPATH); - $this->_ci_helper_paths = array(APPPATH, BASEPATH); - $this->_ci_model_paths = array(APPPATH); - $this->_ci_view_paths = array(APPPATH.'views/' => TRUE); - - log_message('debug', "Loader Class Initialized"); - } - - // -------------------------------------------------------------------- - - /** - * Initialize the Loader - * - * This method is called once in CI_Controller. - * - * @param array - * @return object - */ - public function initialize() - { - $this->_ci_classes = array(); - $this->_ci_loaded_files = array(); - $this->_ci_models = array(); - $this->_base_classes =& is_loaded(); - - $this->_ci_autoloader(); - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Is Loaded - * - * A utility function to test if a class is in the self::$_ci_classes array. - * This function returns the object name if the class tested for is loaded, - * and returns FALSE if it isn't. - * - * It is mainly used in the form_helper -> _get_validation_object() - * - * @param string class being checked for - * @return mixed class object name on the CI SuperObject or FALSE - */ - public function is_loaded($class) - { - if (isset($this->_ci_classes[$class])) - { - return $this->_ci_classes[$class]; - } - - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Class Loader - * - * This function lets users load and instantiate classes. - * It is designed to be called from a user's app controllers. - * - * @param string the name of the class - * @param mixed the optional parameters - * @param string an optional object name - * @return void - */ - public function library($library = '', $params = NULL, $object_name = NULL) - { - if (is_array($library)) - { - foreach ($library as $class) - { - $this->library($class, $params); - } - - return; - } - - if ($library == '' OR isset($this->_base_classes[$library])) - { - return FALSE; - } - - if ( ! is_null($params) && ! is_array($params)) - { - $params = NULL; - } - - $this->_ci_load_class($library, $params, $object_name); - } - - // -------------------------------------------------------------------- - - /** - * Model Loader - * - * This function lets users load and instantiate models. - * - * @param string the name of the class - * @param string name for the model - * @param bool database connection - * @return void - */ - public function model($model, $name = '', $db_conn = FALSE) - { - if (is_array($model)) - { - foreach ($model as $babe) - { - $this->model($babe); - } - return; - } - - if ($model == '') - { - return; - } - - $path = ''; - - // Is the model in a sub-folder? If so, parse out the filename and path. - if (($last_slash = strrpos($model, '/')) !== FALSE) - { - // The path is in front of the last slash - $path = substr($model, 0, $last_slash + 1); - - // And the model name behind it - $model = substr($model, $last_slash + 1); - } - - if ($name == '') - { - $name = $model; - } - - if (in_array($name, $this->_ci_models, TRUE)) - { - return; - } - - $CI =& get_instance(); - if (isset($CI->$name)) - { - show_error('The model name you are loading is the name of a resource that is already being used: '.$name); - } - - $model = strtolower($model); - - foreach ($this->_ci_model_paths as $mod_path) - { - if ( ! file_exists($mod_path.'models/'.$path.$model.'.php')) - { - continue; - } - - if ($db_conn !== FALSE AND ! class_exists('CI_DB')) - { - if ($db_conn === TRUE) - { - $db_conn = ''; - } - - $CI->load->database($db_conn, FALSE, TRUE); - } - - if ( ! class_exists('CI_Model')) - { - load_class('Model', 'core'); - } - - require_once($mod_path.'models/'.$path.$model.'.php'); - - $model = ucfirst($model); - - $CI->$name = new $model(); - - $this->_ci_models[] = $name; - return; - } - - // couldn't find the model - show_error('Unable to locate the model you have specified: '.$model); - } - - // -------------------------------------------------------------------- - - /** - * Database Loader - * - * @param string the DB credentials - * @param bool whether to return the DB object - * @param bool whether to enable active record (this allows us to override the config setting) - * @return object - */ - public function database($params = '', $return = FALSE, $active_record = NULL) - { - // Grab the super object - $CI =& get_instance(); - - // Do we even need to load the database class? - if (class_exists('CI_DB') AND $return == FALSE AND $active_record == NULL AND isset($CI->db) AND is_object($CI->db)) - { - return FALSE; - } - - require_once(BASEPATH.'database/DB.php'); - - if ($return === TRUE) - { - return DB($params, $active_record); - } - - // Initialize the db variable. Needed to prevent - // reference errors with some configurations - $CI->db = ''; - - // Load the DB class - $CI->db =& DB($params, $active_record); - } - - // -------------------------------------------------------------------- - - /** - * Load the Utilities Class - * - * @return string - */ - public function dbutil() - { - if ( ! class_exists('CI_DB')) - { - $this->database(); - } - - $CI =& get_instance(); - - // for backwards compatibility, load dbforge so we can extend dbutils off it - // this use is deprecated and strongly discouraged - $CI->load->dbforge(); - - require_once(BASEPATH.'database/DB_utility.php'); - require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_utility.php'); - $class = 'CI_DB_'.$CI->db->dbdriver.'_utility'; - - $CI->dbutil = new $class(); - } - - // -------------------------------------------------------------------- - - /** - * Load the Database Forge Class - * - * @return string - */ - public function dbforge() - { - if ( ! class_exists('CI_DB')) - { - $this->database(); - } - - $CI =& get_instance(); - - require_once(BASEPATH.'database/DB_forge.php'); - require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_forge.php'); - $class = 'CI_DB_'.$CI->db->dbdriver.'_forge'; - - $CI->dbforge = new $class(); - } - - // -------------------------------------------------------------------- - - /** - * Load View - * - * This function is used to load a "view" file. It has three parameters: - * - * 1. The name of the "view" file to be included. - * 2. An associative array of data to be extracted for use in the view. - * 3. TRUE/FALSE - whether to return the data or load it. In - * some cases it's advantageous to be able to return data so that - * a developer can process it in some way. - * - * @param string - * @param array - * @param bool - * @return void - */ - public function view($view, $vars = array(), $return = FALSE) - { - return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return)); - } - - // -------------------------------------------------------------------- - - /** - * Load File - * - * This is a generic file loader - * - * @param string - * @param bool - * @return string - */ - public function file($path, $return = FALSE) - { - return $this->_ci_load(array('_ci_path' => $path, '_ci_return' => $return)); - } - - // -------------------------------------------------------------------- - - /** - * Set Variables - * - * Once variables are set they become available within - * the controller class and its "view" files. - * - * @param array - * @param string - * @return void - */ - public function vars($vars = array(), $val = '') - { - if ($val != '' AND is_string($vars)) - { - $vars = array($vars => $val); - } - - $vars = $this->_ci_object_to_array($vars); - - if (is_array($vars) AND count($vars) > 0) - { - foreach ($vars as $key => $val) - { - $this->_ci_cached_vars[$key] = $val; - } - } - } - - // -------------------------------------------------------------------- - - /** - * Get Variable - * - * Check if a variable is set and retrieve it. - * - * @param array - * @return void - */ - public function get_var($key) - { - return isset($this->_ci_cached_vars[$key]) ? $this->_ci_cached_vars[$key] : NULL; - } - - // -------------------------------------------------------------------- - - /** - * Load Helper - * - * This function loads the specified helper file. - * - * @param mixed - * @return void - */ - public function helper($helpers = array()) - { - foreach ($this->_ci_prep_filename($helpers, '_helper') as $helper) - { - if (isset($this->_ci_helpers[$helper])) - { - continue; - } - - $ext_helper = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.'.php'; - - // Is this a helper extension request? - if (file_exists($ext_helper)) - { - $base_helper = BASEPATH.'helpers/'.$helper.'.php'; - - if ( ! file_exists($base_helper)) - { - show_error('Unable to load the requested file: helpers/'.$helper.'.php'); - } - - include_once($ext_helper); - include_once($base_helper); - - $this->_ci_helpers[$helper] = TRUE; - log_message('debug', 'Helper loaded: '.$helper); - continue; - } - - // Try to load the helper - foreach ($this->_ci_helper_paths as $path) - { - if (file_exists($path.'helpers/'.$helper.'.php')) - { - include_once($path.'helpers/'.$helper.'.php'); - - $this->_ci_helpers[$helper] = TRUE; - log_message('debug', 'Helper loaded: '.$helper); - break; - } - } - - // unable to load the helper - if ( ! isset($this->_ci_helpers[$helper])) - { - show_error('Unable to load the requested file: helpers/'.$helper.'.php'); - } - } - } - - // -------------------------------------------------------------------- - - /** - * Load Helpers - * - * This is simply an alias to the above function in case the - * user has written the plural form of this function. - * - * @param array - * @return void - */ - public function helpers($helpers = array()) - { - $this->helper($helpers); - } - - // -------------------------------------------------------------------- - - /** - * Loads a language file - * - * @param array - * @param string - * @return void - */ - public function language($file = array(), $lang = '') - { - $CI =& get_instance(); - - if ( ! is_array($file)) - { - $file = array($file); - } - - foreach ($file as $langfile) - { - $CI->lang->load($langfile, $lang); - } - } - - // -------------------------------------------------------------------- - - /** - * Loads a config file - * - * @param string - * @param bool - * @param bool - * @return void - */ - public function config($file = '', $use_sections = FALSE, $fail_gracefully = FALSE) - { - $CI =& get_instance(); - $CI->config->load($file, $use_sections, $fail_gracefully); - } - - // -------------------------------------------------------------------- - - /** - * Driver - * - * Loads a driver library - * - * @param string the name of the class - * @param mixed the optional parameters - * @param string an optional object name - * @return void - */ - public function driver($library = '', $params = NULL, $object_name = NULL) - { - if ( ! class_exists('CI_Driver_Library')) - { - // we aren't instantiating an object here, that'll be done by the Library itself - require BASEPATH.'libraries/Driver.php'; - } - - if ($library == '') - { - return FALSE; - } - - // We can save the loader some time since Drivers will *always* be in a subfolder, - // and typically identically named to the library - if ( ! strpos($library, '/')) - { - $library = ucfirst($library).'/'.$library; - } - - return $this->library($library, $params, $object_name); - } - - // -------------------------------------------------------------------- - - /** - * Add Package Path - * - * Prepends a parent path to the library, model, helper, and config path arrays - * - * @param string - * @param boolean - * @return void - */ - public function add_package_path($path, $view_cascade=TRUE) - { - $path = rtrim($path, '/').'/'; - - array_unshift($this->_ci_library_paths, $path); - array_unshift($this->_ci_model_paths, $path); - array_unshift($this->_ci_helper_paths, $path); - - $this->_ci_view_paths = array($path.'views/' => $view_cascade) + $this->_ci_view_paths; - - // Add config file path - $config =& $this->_ci_get_component('config'); - array_unshift($config->_config_paths, $path); - } - - // -------------------------------------------------------------------- - - /** - * Get Package Paths - * - * Return a list of all package paths, by default it will ignore BASEPATH. - * - * @param string - * @return void - */ - public function get_package_paths($include_base = FALSE) - { - return $include_base === TRUE ? $this->_ci_library_paths : $this->_ci_model_paths; - } - - // -------------------------------------------------------------------- - - /** - * Remove Package Path - * - * Remove a path from the library, model, and helper path arrays if it exists - * If no path is provided, the most recently added path is removed. - * - * @param type - * @param bool - * @return type - */ - public function remove_package_path($path = '', $remove_config_path = TRUE) - { - $config =& $this->_ci_get_component('config'); - - if ($path == '') - { - $void = array_shift($this->_ci_library_paths); - $void = array_shift($this->_ci_model_paths); - $void = array_shift($this->_ci_helper_paths); - $void = array_shift($this->_ci_view_paths); - $void = array_shift($config->_config_paths); - } - else - { - $path = rtrim($path, '/').'/'; - foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var) - { - if (($key = array_search($path, $this->{$var})) !== FALSE) - { - unset($this->{$var}[$key]); - } - } - - if (isset($this->_ci_view_paths[$path.'views/'])) - { - unset($this->_ci_view_paths[$path.'views/']); - } - - if (($key = array_search($path, $config->_config_paths)) !== FALSE) - { - unset($config->_config_paths[$key]); - } - } - - // make sure the application default paths are still in the array - $this->_ci_library_paths = array_unique(array_merge($this->_ci_library_paths, array(APPPATH, BASEPATH))); - $this->_ci_helper_paths = array_unique(array_merge($this->_ci_helper_paths, array(APPPATH, BASEPATH))); - $this->_ci_model_paths = array_unique(array_merge($this->_ci_model_paths, array(APPPATH))); - $this->_ci_view_paths = array_merge($this->_ci_view_paths, array(APPPATH.'views/' => TRUE)); - $config->_config_paths = array_unique(array_merge($config->_config_paths, array(APPPATH))); - } - - // -------------------------------------------------------------------- - - /** - * Loader - * - * This function is used to load views and files. - * Variables are prefixed with _ci_ to avoid symbol collision with - * variables made available to view files - * - * @param array - * @return void - */ - protected function _ci_load($_ci_data) - { - // Set the default data variables - foreach (array('_ci_view', '_ci_vars', '_ci_path', '_ci_return') as $_ci_val) - { - $$_ci_val = ( ! isset($_ci_data[$_ci_val])) ? FALSE : $_ci_data[$_ci_val]; - } - - $file_exists = FALSE; - - // Set the path to the requested file - if ($_ci_path != '') - { - $_ci_x = explode('/', $_ci_path); - $_ci_file = end($_ci_x); - } - else - { - $_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION); - $_ci_file = ($_ci_ext == '') ? $_ci_view.'.php' : $_ci_view; - - foreach ($this->_ci_view_paths as $view_file => $cascade) - { - if (file_exists($view_file.$_ci_file)) - { - $_ci_path = $view_file.$_ci_file; - $file_exists = TRUE; - break; - } - - if ( ! $cascade) - { - break; - } - } - } - - if ( ! $file_exists && ! file_exists($_ci_path)) - { - show_error('Unable to load the requested file: '.$_ci_file); - } - - // This allows anything loaded using $this->load (views, files, etc.) - // to become accessible from within the Controller and Model functions. - - $_ci_CI =& get_instance(); - foreach (get_object_vars($_ci_CI) as $_ci_key => $_ci_var) - { - if ( ! isset($this->$_ci_key)) - { - $this->$_ci_key =& $_ci_CI->$_ci_key; - } - } - - /* - * Extract and cache variables - * - * You can either set variables using the dedicated $this->load_vars() - * function or via the second parameter of this function. We'll merge - * the two types and cache them so that views that are embedded within - * other views can have access to these variables. - */ - if (is_array($_ci_vars)) - { - $this->_ci_cached_vars = array_merge($this->_ci_cached_vars, $_ci_vars); - } - extract($this->_ci_cached_vars); - - /* - * Buffer the output - * - * We buffer the output for two reasons: - * 1. Speed. You get a significant speed boost. - * 2. So that the final rendered template can be - * post-processed by the output class. Why do we - * need post processing? For one thing, in order to - * show the elapsed page load time. Unless we - * can intercept the content right before it's sent to - * the browser and then stop the timer it won't be accurate. - */ - ob_start(); - - // If the PHP installation does not support short tags we'll - // do a little string replacement, changing the short tags - // to standard PHP echo statements. - - if ((bool) @ini_get('short_open_tag') === FALSE AND config_item('rewrite_short_tags') == TRUE) - { - echo eval('?>'.preg_replace("/;*\s*\?>/", "; ?>", str_replace(' $this->_ci_ob_level + 1) - { - ob_end_flush(); - } - else - { - $_ci_CI->output->append_output(ob_get_contents()); - @ob_end_clean(); - } - } - - // -------------------------------------------------------------------- - - /** - * Load class - * - * This function loads the requested class. - * - * @param string the item that is being loaded - * @param mixed any additional parameters - * @param string an optional object name - * @return void - */ - protected function _ci_load_class($class, $params = NULL, $object_name = NULL) - { - // Get the class name, and while we're at it trim any slashes. - // The directory path can be included as part of the class name, - // but we don't want a leading slash - $class = str_replace('.php', '', trim($class, '/')); - - // Was the path included with the class name? - // We look for a slash to determine this - $subdir = ''; - if (($last_slash = strrpos($class, '/')) !== FALSE) - { - // Extract the path - $subdir = substr($class, 0, $last_slash + 1); - - // Get the filename from the path - $class = substr($class, $last_slash + 1); - } - - // We'll test for both lowercase and capitalized versions of the file name - foreach (array(ucfirst($class), strtolower($class)) as $class) - { - $subclass = APPPATH.'libraries/'.$subdir.config_item('subclass_prefix').$class.'.php'; - - // Is this a class extension request? - if (file_exists($subclass)) - { - $baseclass = BASEPATH.'libraries/'.ucfirst($class).'.php'; - - if ( ! file_exists($baseclass)) - { - log_message('error', "Unable to load the requested class: ".$class); - show_error("Unable to load the requested class: ".$class); - } - - // Safety: Was the class already loaded by a previous call? - if (in_array($subclass, $this->_ci_loaded_files)) - { - // Before we deem this to be a duplicate request, let's see - // if a custom object name is being supplied. If so, we'll - // return a new instance of the object - if ( ! is_null($object_name)) - { - $CI =& get_instance(); - if ( ! isset($CI->$object_name)) - { - return $this->_ci_init_class($class, config_item('subclass_prefix'), $params, $object_name); - } - } - - $is_duplicate = TRUE; - log_message('debug', $class." class already loaded. Second attempt ignored."); - return; - } - - include_once($baseclass); - include_once($subclass); - $this->_ci_loaded_files[] = $subclass; - - return $this->_ci_init_class($class, config_item('subclass_prefix'), $params, $object_name); - } - - // Lets search for the requested library file and load it. - $is_duplicate = FALSE; - foreach ($this->_ci_library_paths as $path) - { - $filepath = $path.'libraries/'.$subdir.$class.'.php'; - - // Does the file exist? No? Bummer... - if ( ! file_exists($filepath)) - { - continue; - } - - // Safety: Was the class already loaded by a previous call? - if (in_array($filepath, $this->_ci_loaded_files)) - { - // Before we deem this to be a duplicate request, let's see - // if a custom object name is being supplied. If so, we'll - // return a new instance of the object - if ( ! is_null($object_name)) - { - $CI =& get_instance(); - if ( ! isset($CI->$object_name)) - { - return $this->_ci_init_class($class, '', $params, $object_name); - } - } - - $is_duplicate = TRUE; - log_message('debug', $class." class already loaded. Second attempt ignored."); - return; - } - - include_once($filepath); - $this->_ci_loaded_files[] = $filepath; - return $this->_ci_init_class($class, '', $params, $object_name); - } - - } // END FOREACH - - // One last attempt. Maybe the library is in a subdirectory, but it wasn't specified? - if ($subdir == '') - { - $path = strtolower($class).'/'.$class; - return $this->_ci_load_class($path, $params); - } - - // If we got this far we were unable to find the requested class. - // We do not issue errors if the load call failed due to a duplicate request - if ($is_duplicate == FALSE) - { - log_message('error', "Unable to load the requested class: ".$class); - show_error("Unable to load the requested class: ".$class); - } - } - - // -------------------------------------------------------------------- - - /** - * Instantiates a class - * - * @param string - * @param string - * @param bool - * @param string an optional object name - * @return null - */ - protected function _ci_init_class($class, $prefix = '', $config = FALSE, $object_name = NULL) - { - // Is there an associated config file for this class? Note: these should always be lowercase - if ($config === NULL) - { - // Fetch the config paths containing any package paths - $config_component = $this->_ci_get_component('config'); - - if (is_array($config_component->_config_paths)) - { - // Break on the first found file, thus package files - // are not overridden by default paths - foreach ($config_component->_config_paths as $path) - { - // We test for both uppercase and lowercase, for servers that - // are case-sensitive with regard to file names. Check for environment - // first, global next - if (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.strtolower($class).'.php')) - { - include($path .'config/'.ENVIRONMENT.'/'.strtolower($class).'.php'); - break; - } - elseif (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php')) - { - include($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'); - break; - } - elseif (file_exists($path .'config/'.strtolower($class).'.php')) - { - include($path .'config/'.strtolower($class).'.php'); - break; - } - elseif (file_exists($path .'config/'.ucfirst(strtolower($class)).'.php')) - { - include($path .'config/'.ucfirst(strtolower($class)).'.php'); - break; - } - } - } - } - - if ($prefix == '') - { - if (class_exists('CI_'.$class)) - { - $name = 'CI_'.$class; - } - elseif (class_exists(config_item('subclass_prefix').$class)) - { - $name = config_item('subclass_prefix').$class; - } - else - { - $name = $class; - } - } - else - { - $name = $prefix.$class; - } - - // Is the class name valid? - if ( ! class_exists($name)) - { - log_message('error', "Non-existent class: ".$name); - show_error("Non-existent class: ".$class); - } - - // Set the variable name we will assign the class to - // Was a custom class name supplied? If so we'll use it - $class = strtolower($class); - - if (is_null($object_name)) - { - $classvar = ( ! isset($this->_ci_varmap[$class])) ? $class : $this->_ci_varmap[$class]; - } - else - { - $classvar = $object_name; - } - - // Save the class name and object name - $this->_ci_classes[$class] = $classvar; - - // Instantiate the class - $CI =& get_instance(); - if ($config !== NULL) - { - $CI->$classvar = new $name($config); - } - else - { - $CI->$classvar = new $name; - } - } - - // -------------------------------------------------------------------- - - /** - * Autoloader - * - * The config/autoload.php file contains an array that permits sub-systems, - * libraries, and helpers to be loaded automatically. - * - * @param array - * @return void - */ - private function _ci_autoloader() - { - if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload.php')) - { - include(APPPATH.'config/'.ENVIRONMENT.'/autoload.php'); - } - else - { - include(APPPATH.'config/autoload.php'); - } - - if ( ! isset($autoload)) - { - return FALSE; - } - - // Autoload packages - if (isset($autoload['packages'])) - { - foreach ($autoload['packages'] as $package_path) - { - $this->add_package_path($package_path); - } - } - - // Load any custom config file - if (count($autoload['config']) > 0) - { - $CI =& get_instance(); - foreach ($autoload['config'] as $key => $val) - { - $CI->config->load($val); - } - } - - // Autoload helpers and languages - foreach (array('helper', 'language') as $type) - { - if (isset($autoload[$type]) AND count($autoload[$type]) > 0) - { - $this->$type($autoload[$type]); - } - } - - // A little tweak to remain backward compatible - // The $autoload['core'] item was deprecated - if ( ! isset($autoload['libraries']) AND isset($autoload['core'])) - { - $autoload['libraries'] = $autoload['core']; - } - - // Load libraries - if (isset($autoload['libraries']) AND count($autoload['libraries']) > 0) - { - // Load the database driver. - if (in_array('database', $autoload['libraries'])) - { - $this->database(); - $autoload['libraries'] = array_diff($autoload['libraries'], array('database')); - } - - // Load all other libraries - foreach ($autoload['libraries'] as $item) - { - $this->library($item); - } - } - - // Autoload models - if (isset($autoload['model'])) - { - $this->model($autoload['model']); - } - } - - // -------------------------------------------------------------------- - - /** - * Object to Array - * - * Takes an object as input and converts the class variables to array key/vals - * - * @param object - * @return array - */ - protected function _ci_object_to_array($object) - { - return (is_object($object)) ? get_object_vars($object) : $object; - } - - // -------------------------------------------------------------------- - - /** - * Get a reference to a specific library or model - * - * @param string - * @return bool - */ - protected function &_ci_get_component($component) - { - $CI =& get_instance(); - return $CI->$component; - } - - // -------------------------------------------------------------------- - - /** - * Prep filename - * - * This function preps the name of various items to make loading them more reliable. - * - * @param mixed - * @param string - * @return array - */ - protected function _ci_prep_filename($filename, $extension) - { - if ( ! is_array($filename)) - { - return array(strtolower(str_replace('.php', '', str_replace($extension, '', $filename)).$extension)); - } - else - { - foreach ($filename as $key => $val) - { - $filename[$key] = strtolower(str_replace('.php', '', str_replace($extension, '', $val)).$extension); - } - - return $filename; - } - } -} - -/* End of file Loader.php */ -/* Location: ./system/core/Loader.php */ \ No newline at end of file diff --git a/donjo-sys/core/Model.php b/donjo-sys/core/Model.php deleted file mode 100644 index 9bbb1fcdf..000000000 --- a/donjo-sys/core/Model.php +++ /dev/null @@ -1,58 +0,0 @@ -$key; - } -} -// END Model Class - -/* End of file Model.php */ -/* Location: ./system/core/Model.php */ \ No newline at end of file diff --git a/donjo-sys/core/Output.php b/donjo-sys/core/Output.php deleted file mode 100644 index fc88f6e57..000000000 --- a/donjo-sys/core/Output.php +++ /dev/null @@ -1,575 +0,0 @@ -_zlib_oc = @ini_get('zlib.output_compression'); - - // Get mime types for later - if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) - { - include APPPATH.'config/'.ENVIRONMENT.'/mimes.php'; - } - else - { - include APPPATH.'config/mimes.php'; - } - - - $this->mime_types = $mimes; - - log_message('debug', "Output Class Initialized"); - } - - // -------------------------------------------------------------------- - - /** - * Get Output - * - * Returns the current output string - * - * @access public - * @return string - */ - function get_output() - { - return $this->final_output; - } - - // -------------------------------------------------------------------- - - /** - * Set Output - * - * Sets the output string - * - * @access public - * @param string - * @return void - */ - function set_output($output) - { - $this->final_output = $output; - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Append Output - * - * Appends data onto the output string - * - * @access public - * @param string - * @return void - */ - function append_output($output) - { - if ($this->final_output == '') - { - $this->final_output = $output; - } - else - { - $this->final_output .= $output; - } - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Set Header - * - * Lets you set a server header which will be outputted with the final display. - * - * Note: If a file is cached, headers will not be sent. We need to figure out - * how to permit header data to be saved with the cache data... - * - * @access public - * @param string - * @param bool - * @return void - */ - function set_header($header, $replace = TRUE) - { - // If zlib.output_compression is enabled it will compress the output, - // but it will not modify the content-length header to compensate for - // the reduction, causing the browser to hang waiting for more data. - // We'll just skip content-length in those cases. - - if ($this->_zlib_oc && strncasecmp($header, 'content-length', 14) == 0) - { - return; - } - - $this->headers[] = array($header, $replace); - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Set Content Type Header - * - * @access public - * @param string extension of the file we're outputting - * @return void - */ - function set_content_type($mime_type) - { - if (strpos($mime_type, '/') === FALSE) - { - $extension = ltrim($mime_type, '.'); - - // Is this extension supported? - if (isset($this->mime_types[$extension])) - { - $mime_type =& $this->mime_types[$extension]; - - if (is_array($mime_type)) - { - $mime_type = current($mime_type); - } - } - } - - $header = 'Content-Type: '.$mime_type; - - $this->headers[] = array($header, TRUE); - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Set HTTP Status Header - * moved to Common procedural functions in 1.7.2 - * - * @access public - * @param int the status code - * @param string - * @return void - */ - function set_status_header($code = 200, $text = '') - { - set_status_header($code, $text); - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Enable/disable Profiler - * - * @access public - * @param bool - * @return void - */ - function enable_profiler($val = TRUE) - { - $this->enable_profiler = (is_bool($val)) ? $val : TRUE; - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Set Profiler Sections - * - * Allows override of default / config settings for Profiler section display - * - * @access public - * @param array - * @return void - */ - function set_profiler_sections($sections) - { - foreach ($sections as $section => $enable) - { - $this->_profiler_sections[$section] = ($enable !== FALSE) ? TRUE : FALSE; - } - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Set Cache - * - * @access public - * @param integer - * @return void - */ - function cache($time) - { - $this->cache_expiration = ( ! is_numeric($time)) ? 0 : $time; - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Display Output - * - * All "view" data is automatically put into this variable by the controller class: - * - * $this->final_output - * - * This function sends the finalized output data to the browser along - * with any server headers and profile data. It also stops the - * benchmark timer so the page rendering speed and memory usage can be shown. - * - * @access public - * @param string - * @return mixed - */ - function _display($output = '') - { - // Note: We use globals because we can't use $CI =& get_instance() - // since this function is sometimes called by the caching mechanism, - // which happens before the CI super object is available. - global $BM, $CFG; - - // Grab the super object if we can. - if (class_exists('CI_Controller')) - { - $CI =& get_instance(); - } - - // -------------------------------------------------------------------- - - // Set the output data - if ($output == '') - { - $output =& $this->final_output; - } - - // -------------------------------------------------------------------- - - // Do we need to write a cache file? Only if the controller does not have its - // own _output() method and we are not dealing with a cache file, which we - // can determine by the existence of the $CI object above - if ($this->cache_expiration > 0 && isset($CI) && ! method_exists($CI, '_output')) - { - $this->_write_cache($output); - } - - // -------------------------------------------------------------------- - - // Parse out the elapsed time and memory usage, - // then swap the pseudo-variables with the data - - $elapsed = $BM->elapsed_time('total_execution_time_start', 'total_execution_time_end'); - - if ($this->parse_exec_vars === TRUE) - { - $memory = ( ! function_exists('memory_get_usage')) ? '0' : round(memory_get_usage()/1024/1024, 2).'MB'; - - $output = str_replace('{elapsed_time}', $elapsed, $output); - $output = str_replace('{memory_usage}', $memory, $output); - } - - // -------------------------------------------------------------------- - - // Is compression requested? - if ($CFG->item('compress_output') === TRUE && $this->_zlib_oc == FALSE) - { - if (extension_loaded('zlib')) - { - if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) AND strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE) - { - ob_start('ob_gzhandler'); - } - } - } - - // -------------------------------------------------------------------- - - // Are there any server headers to send? - if (count($this->headers) > 0) - { - foreach ($this->headers as $header) - { - @header($header[0], $header[1]); - } - } - - // -------------------------------------------------------------------- - - // Does the $CI object exist? - // If not we know we are dealing with a cache file so we'll - // simply echo out the data and exit. - if ( ! isset($CI)) - { - echo $output; - log_message('debug', "Final output sent to browser"); - log_message('debug', "Total execution time: ".$elapsed); - return TRUE; - } - - // -------------------------------------------------------------------- - - // Do we need to generate profile data? - // If so, load the Profile class and run it. - if ($this->enable_profiler == TRUE) - { - $CI->load->library('profiler'); - - if ( ! empty($this->_profiler_sections)) - { - $CI->profiler->set_sections($this->_profiler_sections); - } - - // If the output data contains closing and tags - // we will remove them and add them back after we insert the profile data - if (preg_match("|.*?|is", $output)) - { - $output = preg_replace("|.*?|is", '', $output); - $output .= $CI->profiler->run(); - $output .= ''; - } - else - { - $output .= $CI->profiler->run(); - } - } - - // -------------------------------------------------------------------- - - // Does the controller contain a function named _output()? - // If so send the output there. Otherwise, echo it. - if (method_exists($CI, '_output')) - { - $CI->_output($output); - } - else - { - echo $output; // Send it to the browser! - } - - log_message('debug', "Final output sent to browser"); - log_message('debug', "Total execution time: ".$elapsed); - } - - // -------------------------------------------------------------------- - - /** - * Write a Cache File - * - * @access public - * @param string - * @return void - */ - function _write_cache($output) - { - $CI =& get_instance(); - $path = $CI->config->item('cache_path'); - - $cache_path = ($path == '') ? APPPATH.'cache/' : $path; - - if ( ! is_dir($cache_path) OR ! is_really_writable($cache_path)) - { - log_message('error', "Unable to write cache file: ".$cache_path); - return; - } - - $uri = $CI->config->item('base_url'). - $CI->config->item('index_page'). - $CI->uri->uri_string(); - - $cache_path .= md5($uri); - - if ( ! $fp = @fopen($cache_path, FOPEN_WRITE_CREATE_DESTRUCTIVE)) - { - log_message('error', "Unable to write cache file: ".$cache_path); - return; - } - - $expire = time() + ($this->cache_expiration * 60); - - if (flock($fp, LOCK_EX)) - { - fwrite($fp, $expire.'TS--->'.$output); - flock($fp, LOCK_UN); - } - else - { - log_message('error', "Unable to secure a file lock for file at: ".$cache_path); - return; - } - fclose($fp); - @chmod($cache_path, FILE_WRITE_MODE); - - log_message('debug', "Cache file written: ".$cache_path); - } - - // -------------------------------------------------------------------- - - /** - * Update/serve a cached file - * - * @access public - * @param object config class - * @param object uri class - * @return void - */ - function _display_cache(&$CFG, &$URI) - { - $cache_path = ($CFG->item('cache_path') == '') ? APPPATH.'cache/' : $CFG->item('cache_path'); - - // Build the file path. The file name is an MD5 hash of the full URI - $uri = $CFG->item('base_url'). - $CFG->item('index_page'). - $URI->uri_string; - - $filepath = $cache_path.md5($uri); - - if ( ! @file_exists($filepath)) - { - return FALSE; - } - - if ( ! $fp = @fopen($filepath, FOPEN_READ)) - { - return FALSE; - } - - flock($fp, LOCK_SH); - - $cache = ''; - if (filesize($filepath) > 0) - { - $cache = fread($fp, filesize($filepath)); - } - - flock($fp, LOCK_UN); - fclose($fp); - - // Strip out the embedded timestamp - if ( ! preg_match("/(\d+TS--->)/", $cache, $match)) - { - return FALSE; - } - - // Has the file expired? If so we'll delete it. - if (time() >= trim(str_replace('TS--->', '', $match['1']))) - { - if (is_really_writable($cache_path)) - { - @unlink($filepath); - log_message('debug', "Cache file has expired. File deleted"); - return FALSE; - } - } - - // Display the cache - $this->_display(str_replace($match['0'], '', $cache)); - log_message('debug', "Cache file is current. Sending it to browser."); - return TRUE; - } - - -} -// END Output Class - -/* End of file Output.php */ -/* Location: ./system/core/Output.php */ \ No newline at end of file diff --git a/donjo-sys/core/Router.php b/donjo-sys/core/Router.php deleted file mode 100644 index b39dc163d..000000000 --- a/donjo-sys/core/Router.php +++ /dev/null @@ -1,523 +0,0 @@ -config =& load_class('Config', 'core'); - $this->uri =& load_class('URI', 'core'); - log_message('debug', "Router Class Initialized"); - } - - // -------------------------------------------------------------------- - - /** - * Set the route mapping - * - * This function determines what should be served based on the URI request, - * as well as any "routes" that have been set in the routing config file. - * - * @access private - * @return void - */ - function _set_routing() - { - // Are query strings enabled in the config file? Normally CI doesn't utilize query strings - // since URI segments are more search-engine friendly, but they can optionally be used. - // If this feature is enabled, we will gather the directory/class/method a little differently - $segments = array(); - if ($this->config->item('enable_query_strings') === TRUE AND isset($_GET[$this->config->item('controller_trigger')])) - { - if (isset($_GET[$this->config->item('directory_trigger')])) - { - $this->set_directory(trim($this->uri->_filter_uri($_GET[$this->config->item('directory_trigger')]))); - $segments[] = $this->fetch_directory(); - } - - if (isset($_GET[$this->config->item('controller_trigger')])) - { - $this->set_class(trim($this->uri->_filter_uri($_GET[$this->config->item('controller_trigger')]))); - $segments[] = $this->fetch_class(); - } - - if (isset($_GET[$this->config->item('function_trigger')])) - { - $this->set_method(trim($this->uri->_filter_uri($_GET[$this->config->item('function_trigger')]))); - $segments[] = $this->fetch_method(); - } - } - - // Load the routes.php file. - if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/routes.php')) - { - include(APPPATH.'config/'.ENVIRONMENT.'/routes.php'); - } - elseif (is_file(APPPATH.'config/routes.php')) - { - include(APPPATH.'config/routes.php'); - } - - $this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route; - unset($route); - - // Set the default controller so we can display it in the event - // the URI doesn't correlated to a valid controller. - $this->default_controller = ( ! isset($this->routes['default_controller']) OR $this->routes['default_controller'] == '') ? FALSE : strtolower($this->routes['default_controller']); - - // Were there any query string segments? If so, we'll validate them and bail out since we're done. - if (count($segments) > 0) - { - return $this->_validate_request($segments); - } - - // Fetch the complete URI string - $this->uri->_fetch_uri_string(); - - // Is there a URI string? If not, the default controller specified in the "routes" file will be shown. - if ($this->uri->uri_string == '') - { - return $this->_set_default_controller(); - } - - // Do we need to remove the URL suffix? - $this->uri->_remove_url_suffix(); - - // Compile the segments into an array - $this->uri->_explode_segments(); - - // Parse any custom routing that may exist - $this->_parse_routes(); - - // Re-index the segment array so that it starts with 1 rather than 0 - $this->uri->_reindex_segments(); - } - - // -------------------------------------------------------------------- - - /** - * Set the default controller - * - * @access private - * @return void - */ - function _set_default_controller() - { - if ($this->default_controller === FALSE) - { - show_error("Unable to determine what should be displayed. A default route has not been specified in the routing file."); - } - // Is the method being specified? - if (strpos($this->default_controller, '/') !== FALSE) - { - $x = explode('/', $this->default_controller); - - $this->set_class($x[0]); - $this->set_method($x[1]); - $this->_set_request($x); - } - else - { - $this->set_class($this->default_controller); - $this->set_method('index'); - $this->_set_request(array($this->default_controller, 'index')); - } - - // re-index the routed segments array so it starts with 1 rather than 0 - $this->uri->_reindex_segments(); - - log_message('debug', "No URI present. Default controller set."); - } - - // -------------------------------------------------------------------- - - /** - * Set the Route - * - * This function takes an array of URI segments as - * input, and sets the current class/method - * - * @access private - * @param array - * @param bool - * @return void - */ - function _set_request($segments = array()) - { - $segments = $this->_validate_request($segments); - - if (count($segments) == 0) - { - return $this->_set_default_controller(); - } - - $this->set_class($segments[0]); - - if (isset($segments[1])) - { - // A standard method request - $this->set_method($segments[1]); - } - else - { - // This lets the "routed" segment array identify that the default - // index method is being used. - $segments[1] = 'index'; - } - - // Update our "routed" segment array to contain the segments. - // Note: If there is no custom routing, this array will be - // identical to $this->uri->segments - $this->uri->rsegments = $segments; - } - - // -------------------------------------------------------------------- - - /** - * Validates the supplied segments. Attempts to determine the path to - * the controller. - * - * @access private - * @param array - * @return array - */ - function _validate_request($segments) - { - if (count($segments) == 0) - { - return $segments; - } - - // Does the requested controller exist in the root folder? - if (file_exists(APPPATH.'controllers/'.$segments[0].'.php')) - { - return $segments; - } - - // Is the controller in a sub-folder? - if (is_dir(APPPATH.'controllers/'.$segments[0])) - { - // Set the directory and remove it from the segment array - $this->set_directory($segments[0]); - $segments = array_slice($segments, 1); - - if (count($segments) > 0) - { - // Does the requested controller exist in the sub-folder? - if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$segments[0].'.php')) - { - if ( ! empty($this->routes['404_override'])) - { - $x = explode('/', $this->routes['404_override']); - - $this->set_directory(''); - $this->set_class($x[0]); - $this->set_method(isset($x[1]) ? $x[1] : 'index'); - - return $x; - } - else - { - show_404($this->fetch_directory().$segments[0]); - } - } - } - else - { - // Is the method being specified in the route? - if (strpos($this->default_controller, '/') !== FALSE) - { - $x = explode('/', $this->default_controller); - - $this->set_class($x[0]); - $this->set_method($x[1]); - } - else - { - $this->set_class($this->default_controller); - $this->set_method('index'); - } - - // Does the default controller exist in the sub-folder? - if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$this->default_controller.'.php')) - { - $this->directory = ''; - return array(); - } - - } - - return $segments; - } - - - // If we've gotten this far it means that the URI does not correlate to a valid - // controller class. We will now see if there is an override - if ( ! empty($this->routes['404_override'])) - { - $x = explode('/', $this->routes['404_override']); - - $this->set_class($x[0]); - $this->set_method(isset($x[1]) ? $x[1] : 'index'); - - return $x; - } - - - // Nothing else to do at this point but show a 404 - show_404($segments[0]); - } - - // -------------------------------------------------------------------- - - /** - * Parse Routes - * - * This function matches any routes that may exist in - * the config/routes.php file against the URI to - * determine if the class/method need to be remapped. - * - * @access private - * @return void - */ - function _parse_routes() - { - // Turn the segment array into a URI string - $uri = implode('/', $this->uri->segments); - - // Is there a literal match? If so we're done - if (isset($this->routes[$uri])) - { - return $this->_set_request(explode('/', $this->routes[$uri])); - } - - // Loop through the route array looking for wild-cards - foreach ($this->routes as $key => $val) - { - // Convert wild-cards to RegEx - $key = str_replace(':any', '.+', str_replace(':num', '[0-9]+', $key)); - - // Does the RegEx match? - if (preg_match('#^'.$key.'$#', $uri)) - { - // Do we have a back-reference? - if (strpos($val, '$') !== FALSE AND strpos($key, '(') !== FALSE) - { - $val = preg_replace('#^'.$key.'$#', $val, $uri); - } - - return $this->_set_request(explode('/', $val)); - } - } - - // If we got this far it means we didn't encounter a - // matching route so we'll set the site default route - $this->_set_request($this->uri->segments); - } - - // -------------------------------------------------------------------- - - /** - * Set the class name - * - * @access public - * @param string - * @return void - */ - function set_class($class) - { - $this->class = str_replace(array('/', '.'), '', $class); - } - - // -------------------------------------------------------------------- - - /** - * Fetch the current class - * - * @access public - * @return string - */ - function fetch_class() - { - return $this->class; - } - - // -------------------------------------------------------------------- - - /** - * Set the method name - * - * @access public - * @param string - * @return void - */ - function set_method($method) - { - $this->method = $method; - } - - // -------------------------------------------------------------------- - - /** - * Fetch the current method - * - * @access public - * @return string - */ - function fetch_method() - { - if ($this->method == $this->fetch_class()) - { - return 'index'; - } - - return $this->method; - } - - // -------------------------------------------------------------------- - - /** - * Set the directory name - * - * @access public - * @param string - * @return void - */ - function set_directory($dir) - { - $this->directory = str_replace(array('/', '.'), '', $dir).'/'; - } - - // -------------------------------------------------------------------- - - /** - * Fetch the sub-directory (if any) that contains the requested controller class - * - * @access public - * @return string - */ - function fetch_directory() - { - return $this->directory; - } - - // -------------------------------------------------------------------- - - /** - * Set the controller overrides - * - * @access public - * @param array - * @return null - */ - function _set_overrides($routing) - { - if ( ! is_array($routing)) - { - return; - } - - if (isset($routing['directory'])) - { - $this->set_directory($routing['directory']); - } - - if (isset($routing['controller']) AND $routing['controller'] != '') - { - $this->set_class($routing['controller']); - } - - if (isset($routing['function'])) - { - $routing['function'] = ($routing['function'] == '') ? 'index' : $routing['function']; - $this->set_method($routing['function']); - } - } - - -} -// END Router Class - -/* End of file Router.php */ -/* Location: ./system/core/Router.php */ \ No newline at end of file diff --git a/donjo-sys/core/Security.php b/donjo-sys/core/Security.php deleted file mode 100644 index a30488fac..000000000 --- a/donjo-sys/core/Security.php +++ /dev/null @@ -1,902 +0,0 @@ - '[removed]', - 'document.write' => '[removed]', - '.parentNode' => '[removed]', - '.innerHTML' => '[removed]', - '-moz-binding' => '[removed]', - '' => '-->', - ' '<![CDATA[', - '' => '<comment>' - ); - - /* never allowed, regex replacement */ - /** - * List of never allowed regex replacement - * - * @var array - * @access protected - */ - protected $_never_allowed_regex = array( - 'javascript\s*:', - '(document|(document\.)?window)\.(location|on\w*)', - 'expression\s*(\(|&\#40;)', // CSS and IE - 'vbscript\s*:', // IE, surprise! - 'wscript\s*:', // IE - 'jscript\s*:', // IE - 'vbs\s*:', // IE - 'Redirect\s+30\d:', - "([\"'])?data\s*:[^\\1]*?base64[^\\1]*?,[^\\1]*?\\1?" - ); - - /** - * Constructor - * - * @return void - */ - public function __construct() - { - // Is CSRF protection enabled? - if (config_item('csrf_protection') === TRUE) - { - // CSRF config - foreach (array('csrf_expire', 'csrf_token_name', 'csrf_cookie_name') as $key) - { - if (FALSE !== ($val = config_item($key))) - { - $this->{'_'.$key} = $val; - } - } - - // Append application specific cookie prefix - if (config_item('cookie_prefix')) - { - $this->_csrf_cookie_name = config_item('cookie_prefix').$this->_csrf_cookie_name; - } - - // Set the CSRF hash - $this->_csrf_set_hash(); - } - - log_message('debug', "Security Class Initialized"); - } - - // -------------------------------------------------------------------- - - /** - * Verify Cross Site Request Forgery Protection - * - * @return object - */ - public function csrf_verify() - { - // If it's not a POST request we will set the CSRF cookie - if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST') - { - return $this->csrf_set_cookie(); - } - - // Do the tokens exist in both the _POST and _COOKIE arrays? - if ( ! isset($_POST[$this->_csrf_token_name], $_COOKIE[$this->_csrf_cookie_name])) - { - $this->csrf_show_error(); - } - - // Do the tokens match? - if ($_POST[$this->_csrf_token_name] != $_COOKIE[$this->_csrf_cookie_name]) - { - $this->csrf_show_error(); - } - - // We kill this since we're done and we don't want to - // polute the _POST array - unset($_POST[$this->_csrf_token_name]); - - // Nothing should last forever - unset($_COOKIE[$this->_csrf_cookie_name]); - $this->_csrf_set_hash(); - $this->csrf_set_cookie(); - - log_message('debug', 'CSRF token verified'); - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Set Cross Site Request Forgery Protection Cookie - * - * @return object - */ - public function csrf_set_cookie() - { - $expire = time() + $this->_csrf_expire; - $secure_cookie = (config_item('cookie_secure') === TRUE) ? 1 : 0; - - if ($secure_cookie && (empty($_SERVER['HTTPS']) OR strtolower($_SERVER['HTTPS']) === 'off')) - { - return FALSE; - } - - setcookie($this->_csrf_cookie_name, $this->_csrf_hash, $expire, config_item('cookie_path'), config_item('cookie_domain'), $secure_cookie); - - log_message('debug', "CRSF cookie Set"); - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Show CSRF Error - * - * @return void - */ - public function csrf_show_error() - { - show_error('The action you have requested is not allowed.'); - } - - // -------------------------------------------------------------------- - - /** - * Get CSRF Hash - * - * Getter Method - * - * @return string self::_csrf_hash - */ - public function get_csrf_hash() - { - return $this->_csrf_hash; - } - - // -------------------------------------------------------------------- - - /** - * Get CSRF Token Name - * - * Getter Method - * - * @return string self::csrf_token_name - */ - public function get_csrf_token_name() - { - return $this->_csrf_token_name; - } - - // -------------------------------------------------------------------- - - /** - * XSS Clean - * - * Sanitizes data so that Cross Site Scripting Hacks can be - * prevented. This function does a fair amount of work but - * it is extremely thorough, designed to prevent even the - * most obscure XSS attempts. Nothing is ever 100% foolproof, - * of course, but I haven't been able to get anything passed - * the filter. - * - * Note: This function should only be used to deal with data - * upon submission. It's not something that should - * be used for general runtime processing. - * - * This function was based in part on some code and ideas I - * got from Bitflux: http://channel.bitflux.ch/wiki/XSS_Prevention - * - * To help develop this script I used this great list of - * vulnerabilities along with a few other hacks I've - * harvested from examining vulnerabilities in other programs: - * http://ha.ckers.org/xss.html - * - * @param mixed string or array - * @param bool - * @return string - */ - public function xss_clean($str, $is_image = FALSE) - { - // Is the string an array? - if (is_array($str)) - { - while (list($key) = each($str)) - { - $str[$key] = $this->xss_clean($str[$key]); - } - - return $str; - } - - //Remove Invisible Characters - $str = remove_invisible_characters($str); - - /* - * URL Decode - * - * Just in case stuff like this is submitted: - * - * Google - * - * Note: Use rawurldecode() so it does not remove plus signs - */ - do - { - $str = rawurldecode($str); - } - while (preg_match('/%[0-9a-f]{2,}/i', $str)); - - /* - * Convert character entities to ASCII - * - * This permits our tests below to work reliably. - * We only convert entities that are within tags since - * these are the ones that will pose security problems. - */ - $str = preg_replace_callback("/[^a-z0-9>]+[a-z0-9]+=([\'\"]).*?\\1/si", array($this, '_convert_attribute'), $str); - $str = preg_replace_callback('/<\w+.*/si', array($this, '_decode_entity'), $str); - - // Remove Invisible Characters Again! - $str = remove_invisible_characters($str); - - /* - * Convert all tabs to spaces - * - * This prevents strings like this: ja vascript - * NOTE: we deal with spaces between characters later. - * NOTE: preg_replace was found to be amazingly slow here on - * large blocks of data, so we use str_replace. - */ - $str = str_replace("\t", ' ', $str); - - // Capture converted string for later comparison - $converted_string = $str; - - // Remove Strings that are never allowed - $str = $this->_do_never_allowed($str); - - /* - * Makes PHP tags safe - * - * Note: XML tags are inadvertently replaced too: - * - * '), array('<?', '?>'), $str); - } - - /* - * Compact any exploded words - * - * This corrects words like: j a v a s c r i p t - * These words are compacted back to their correct state. - */ - $words = array( - 'javascript', 'expression', 'vbscript', 'jscript', 'wscript', - 'vbs', 'script', 'base64', 'applet', 'alert', 'document', - 'write', 'cookie', 'window', 'confirm', 'prompt', 'eval' - ); - - foreach ($words as $word) - { - $word = implode('\s*', str_split($word)).'\s*'; - - // We only want to do this when it is followed by a non-word character - // That way valid stuff like "dealer to" does not become "dealerto" - $str = preg_replace_callback('#('.substr($word, 0, -3).')(\W)#is', array($this, '_compact_exploded_words'), $str); - } - - /* - * Remove disallowed Javascript in links or img tags - * We used to do some version comparisons and use of stripos(), - * but it is dog slow compared to these simplified non-capturing - * preg_match(), especially if the pattern exists in the string - * - * Note: It was reported that not only space characters, but all in - * the following pattern can be parsed as separators between a tag name - * and its attributes: [\d\s"\'`;,\/\=\(\x00\x0B\x09\x0C] - * ... however, remove_invisible_characters() above already strips the - * hex-encoded ones, so we'll skip them below. - */ - do - { - $original = $str; - - if (preg_match('/]+([^>]*?)(?:>|$)#si', array($this, '_js_link_removal'), $str); - } - - if (preg_match('/]*?)(?:\s?/?>|$)#si', array($this, '_js_img_removal'), $str); - } - - if (preg_match('/script|xss/i', $str)) - { - $str = preg_replace('##si', '[removed]', $str); - } - } - while($original !== $str); - unset($original); - - /* - * Sanitize naughty HTML elements - * - * If a tag containing any of the words in the list - * below is found, the tag gets converted to entities. - * - * So this: - * Becomes: <blink> - */ - $pattern = '#' - .'<((?/*\s*)(?[a-z0-9]+)(?=[^a-z0-9]|$)' // tag start and name, followed by a non-tag character - .'[^\s\042\047a-z0-9>/=]*' // a valid attribute character immediately after the tag would count as a separator - // optional attributes - .'(?(?:[\s\042\047/=]*' // non-attribute characters, excluding > (tag close) for obvious reasons - .'[^\s\042\047>/=]+' // attribute characters - // optional attribute-value - .'(?:\s*=' // attribute-value separator - .'(?:[^\s\042\047=><`]+|\s*\042[^\042]*\042|\s*\047[^\047]*\047|\s*(?U:[^\s\042\047=><`]*))' // single, double or non-quoted value - .')?' // end optional attribute-value group - .')*)' // end optional attributes group - .'[^>]*)(?\>)?#isS'; - - // Note: It would be nice to optimize this for speed, BUT - // only matching the naughty elements here results in - // false positives and in turn - vulnerabilities! - do - { - $old_str = $str; - $str = preg_replace_callback($pattern, array($this, '_sanitize_naughty_html'), $str); - } - while ($old_str !== $str); - unset($old_str); - - /* - * Sanitize naughty scripting elements - * - * Similar to above, only instead of looking for - * tags it looks for PHP and JavaScript commands - * that are disallowed. Rather than removing the - * code, it simply converts the parenthesis to entities - * rendering the code un-executable. - * - * For example: eval('some code') - * Becomes: eval('some code') - */ - $str = preg_replace( - '#(alert|prompt|confirm|cmd|passthru|eval|exec|expression|system|fopen|fsockopen|file|file_get_contents|readfile|unlink)(\s*)\((.*?)\)#si', - '\\1\\2(\\3)', - $str - ); - - // Final clean up - // This adds a bit of extra precaution in case - // something got through the above filters - $str = $this->_do_never_allowed($str); - - /* - * Images are Handled in a Special Way - * - Essentially, we want to know that after all of the character - * conversion is done whether any unwanted, likely XSS, code was found. - * If not, we return TRUE, as the image is clean. - * However, if the string post-conversion does not matched the - * string post-removal of XSS, then it fails, as there was unwanted XSS - * code found and removed/changed during processing. - */ - - if ($is_image === TRUE) - { - return ($str === $converted_string); - } - - log_message('debug', "XSS Filtering completed"); - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Random Hash for protecting URLs - * - * @return string - */ - public function xss_hash() - { - if ($this->_xss_hash == '') - { - mt_srand(); - $this->_xss_hash = md5(time() + mt_rand(0, 1999999999)); - } - - return $this->_xss_hash; - } - - // -------------------------------------------------------------------- - - /** - * HTML Entities Decode - * - * This function is a replacement for html_entity_decode() - * - * The reason we are not using html_entity_decode() by itself is because - * while it is not technically correct to leave out the semicolon - * at the end of an entity most browsers will still interpret the entity - * correctly. html_entity_decode() does not convert entities without - * semicolons, so we are left with our own little solution here. Bummer. - * - * @param string - * @param string - * @return string - */ - public function entity_decode($str, $charset='UTF-8') - { - if (strpos($str, '&') === FALSE) - { - return $str; - } - - static $_entities; - - isset($charset) OR $charset = strtoupper(config_item('charset')); - $flag = is_php('5.4') - ? ENT_COMPAT | ENT_HTML5 - : ENT_COMPAT; - - do - { - $str_compare = $str; - - // Decode standard entities, avoiding false positives - if (preg_match_all('/\&[a-z]{2,}(?![a-z;])/i', $str, $matches)) - { - if ( ! isset($_entities)) - { - $_entities = array_map( - 'strtolower', - is_php('5.3.4') - ? get_html_translation_table(HTML_ENTITIES, $flag, $charset) - : get_html_translation_table(HTML_ENTITIES, $flag) - ); - - // If we're not on PHP 5.4+, add the possibly dangerous HTML 5 - // entities to the array manually - if ($flag === ENT_COMPAT) - { - $_entities[':'] = ':'; - $_entities['('] = '('; - $_entities[')'] = ')'; - $_entities["\n"] = '&newline;'; - $_entities["\t"] = '&tab;'; - } - } - - $replace = array(); - $matches = array_unique(array_map('strtolower', $matches[0])); - foreach ($matches as &$match) - { - if (($char = array_search($match.';', $_entities, TRUE)) !== FALSE) - { - $replace[$match] = $char; - } - } - - $str = str_ireplace(array_keys($replace), array_values($replace), $str); - } - - // Decode numeric & UTF16 two byte entities - $str = html_entity_decode( - preg_replace('/(&#(?:x0*[0-9a-f]{2,5}(?![0-9a-f;])|(?:0*\d{2,4}(?![0-9;]))))/iS', '$1;', $str), - $flag, - $charset - ); - } - while ($str_compare !== $str); - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Filename Security - * - * @param string - * @param bool - * @return string - */ - public function sanitize_filename($str, $relative_path = FALSE) - { - $bad = array( - '../', '', '<', '>', - "'", '"', '&', '$', '#', - '{', '}', '[', ']', '=', - ';', '?', '%20', '%22', - '%3c', // < - '%253c', // < - '%3e', // > - '%0e', // > - '%28', // ( - '%29', // ) - '%2528', // ( - '%26', // & - '%24', // $ - '%3f', // ? - '%3b', // ; - '%3d' // = - ); - - if ( ! $relative_path) - { - $bad[] = './'; - $bad[] = '/'; - } - - $str = remove_invisible_characters($str, FALSE); - - do - { - $old = $str; - $str = str_replace($bad, '', $str); - } - while ($old !== $str); - - return stripslashes($str); - } - - // ---------------------------------------------------------------- - - /** - * Compact Exploded Words - * - * Callback function for xss_clean() to remove whitespace from - * things like j a v a s c r i p t - * - * @param type - * @return type - */ - protected function _compact_exploded_words($matches) - { - return preg_replace('/\s+/s', '', $matches[1]).$matches[2]; - } - - // -------------------------------------------------------------------- - - /** - * Sanitize Naughty HTML - * - * Callback function for xss_clean() to remove naughty HTML elements - * - * @param array - * @return string - */ - protected function _sanitize_naughty_html($matches) - { - static $naughty_tags = array( - 'alert', 'prompt', 'confirm', 'applet', 'audio', 'basefont', 'base', 'behavior', 'bgsound', - 'blink', 'body', 'embed', 'expression', 'form', 'frameset', 'frame', 'head', 'html', 'ilayer', - 'iframe', 'input', 'button', 'select', 'isindex', 'layer', 'link', 'meta', 'keygen', 'object', - 'plaintext', 'style', 'script', 'textarea', 'title', 'math', 'video', 'svg', 'xml', 'xss' - ); - - static $evil_attributes = array( - 'on\w+', 'style', 'xmlns', 'formaction', 'form', 'xlink:href', 'FSCommand', 'seekSegmentTime' - ); - - // First, escape unclosed tags - if (empty($matches['closeTag'])) - { - return '<'.$matches[1]; - } - // Is the element that we caught naughty? If so, escape it - elseif (in_array(strtolower($matches['tagName']), $naughty_tags, TRUE)) - { - return '<'.$matches[1].'>'; - } - // For other tags, see if their attributes are "evil" and strip those - elseif (isset($matches['attributes'])) - { - // We'll store the already fitlered attributes here - $attributes = array(); - - // Attribute-catching pattern - $attributes_pattern = '#' - .'(?[^\s\042\047>/=]+)' // attribute characters - // optional attribute-value - .'(?:\s*=(?[^\s\042\047=><`]+|\s*\042[^\042]*\042|\s*\047[^\047]*\047|\s*(?U:[^\s\042\047=><`]*)))' // attribute-value separator - .'#i'; - - // Blacklist pattern for evil attribute names - $is_evil_pattern = '#^('.implode('|', $evil_attributes).')$#i'; - - // Each iteration filters a single attribute - do - { - // Strip any non-alpha characters that may preceed an attribute. - // Browsers often parse these incorrectly and that has been a - // of numerous XSS issues we've had. - $matches['attributes'] = preg_replace('#^[^a-z]+#i', '', $matches['attributes']); - - if ( ! preg_match($attributes_pattern, $matches['attributes'], $attribute, PREG_OFFSET_CAPTURE)) - { - // No (valid) attribute found? Discard everything else inside the tag - break; - } - - if ( - // Is it indeed an "evil" attribute? - preg_match($is_evil_pattern, $attribute['name'][0]) - // Or does it have an equals sign, but no value and not quoted? Strip that too! - OR (trim($attribute['value'][0]) === '') - ) - { - $attributes[] = 'xss=removed'; - } - else - { - $attributes[] = $attribute[0][0]; - } - - $matches['attributes'] = substr($matches['attributes'], $attribute[0][1] + strlen($attribute[0][0])); - } - while ($matches['attributes'] !== ''); - - $attributes = empty($attributes) - ? '' - : ' '.implode(' ', $attributes); - return '<'.$matches['slash'].$matches['tagName'].$attributes.'>'; - } - - return $matches[0]; - } - - // -------------------------------------------------------------------- - - /** - * JS Link Removal - * - * Callback function for xss_clean() to sanitize links - * This limits the PCRE backtracks, making it more performance friendly - * and prevents PREG_BACKTRACK_LIMIT_ERROR from being triggered in - * PHP 5.2+ on link-heavy strings - * - * @param array - * @return string - */ - protected function _js_link_removal($match) - { - return str_replace( - $match[1], - preg_replace( - '#href=.*?(?:(?:alert|prompt|confirm)(?:\(|&\#40;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|_filter_attributes($match[1]) - ), - $match[0] - ); - } - - // -------------------------------------------------------------------- - - /** - * JS Image Removal - * - * Callback function for xss_clean() to sanitize image tags - * This limits the PCRE backtracks, making it more performance friendly - * and prevents PREG_BACKTRACK_LIMIT_ERROR from being triggered in - * PHP 5.2+ on image tag heavy strings - * - * @param array - * @return string - */ - protected function _js_img_removal($match) - { - return str_replace( - $match[1], - preg_replace( - '#src=.*?(?:(?:alert|prompt|confirm|eval)(?:\(|&\#40;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|_filter_attributes($match[1]) - ), - $match[0] - ); - } - - // -------------------------------------------------------------------- - - /** - * Attribute Conversion - * - * Used as a callback for XSS Clean - * - * @param array - * @return string - */ - protected function _convert_attribute($match) - { - return str_replace(array('>', '<', '\\'), array('>', '<', '\\\\'), $match[0]); - } - - // -------------------------------------------------------------------- - - /** - * Filter Attributes - * - * Filters tag attributes for consistency and safety - * - * @param string - * @return string - */ - protected function _filter_attributes($str) - { - $out = ''; - - if (preg_match_all('#\s*[a-z\-]+\s*=\s*(\042|\047)([^\\1]*?)\\1#is', $str, $matches)) - { - foreach ($matches[0] as $match) - { - $out .= preg_replace("#/\*.*?\*/#s", '', $match); - } - } - - return $out; - } - - // -------------------------------------------------------------------- - - /** - * HTML Entity Decode Callback - * - * Used as a callback for XSS Clean - * - * @param array - * @return string - */ - protected function _decode_entity($match) - { - // Protect GET variables in URLs - // 901119URL5918AMP18930PROTECT8198 - $match = preg_replace('|\&([a-z\_0-9\-]+)\=([a-z\_0-9\-/]+)|i', $this->xss_hash().'\\1=\\2', $match[0]); - - // Decode, then un-protect URL GET vars - return str_replace( - $this->xss_hash(), - '&', - $this->entity_decode($match, strtoupper(config_item('charset'))) - ); - } - - // ---------------------------------------------------------------------- - - /** - * Do Never Allowed - * - * A utility function for xss_clean() - * - * @param string - * @return string - */ - protected function _do_never_allowed($str) - { - $str = str_replace(array_keys($this->_never_allowed_str), $this->_never_allowed_str, $str); - - foreach ($this->_never_allowed_regex as $regex) - { - $str = preg_replace('#'.$regex.'#is', '[removed]', $str); - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Set Cross Site Request Forgery Protection Cookie - * - * @return string - */ - protected function _csrf_set_hash() - { - if ($this->_csrf_hash == '') - { - // If the cookie exists we will use it's value. - // We don't necessarily want to regenerate it with - // each page load since a page could contain embedded - // sub-pages causing this feature to fail - if (isset($_COOKIE[$this->_csrf_cookie_name]) && - preg_match('#^[0-9a-f]{32}$#iS', $_COOKIE[$this->_csrf_cookie_name]) === 1) - { - return $this->_csrf_hash = $_COOKIE[$this->_csrf_cookie_name]; - } - - return $this->_csrf_hash = md5(uniqid(rand(), TRUE)); - } - - return $this->_csrf_hash; - } - -} - -/* End of file Security.php */ -/* Location: ./system/core/Security.php */ diff --git a/donjo-sys/core/URI.php b/donjo-sys/core/URI.php deleted file mode 100644 index a66cd7152..000000000 --- a/donjo-sys/core/URI.php +++ /dev/null @@ -1,655 +0,0 @@ -config =& load_class('Config', 'core'); - log_message('debug', "URI Class Initialized"); - } - - - // -------------------------------------------------------------------- - - /** - * Get the URI String - * - * @access private - * @return string - */ - function _fetch_uri_string() - { - if (strtoupper($this->config->item('uri_protocol')) == 'AUTO') - { - // Is the request coming from the command line? - if (php_sapi_name() == 'cli' or defined('STDIN')) - { - $this->_set_uri_string($this->_parse_cli_args()); - return; - } - - // Let's try the REQUEST_URI first, this will work in most situations - if ($uri = $this->_detect_uri()) - { - $this->_set_uri_string($uri); - return; - } - - // Is there a PATH_INFO variable? - // Note: some servers seem to have trouble with getenv() so we'll test it two ways - $path = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO'); - if (trim($path, '/') != '' && $path != "/".SELF) - { - $this->_set_uri_string($path); - return; - } - - // No PATH_INFO?... What about QUERY_STRING? - $path = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING'); - if (trim($path, '/') != '') - { - $this->_set_uri_string($path); - return; - } - - // As a last ditch effort lets try using the $_GET array - if (is_array($_GET) && count($_GET) == 1 && trim(key($_GET), '/') != '') - { - $this->_set_uri_string(key($_GET)); - return; - } - - // We've exhausted all our options... - $this->uri_string = ''; - return; - } - - $uri = strtoupper($this->config->item('uri_protocol')); - - if ($uri == 'REQUEST_URI') - { - $this->_set_uri_string($this->_detect_uri()); - return; - } - elseif ($uri == 'CLI') - { - $this->_set_uri_string($this->_parse_cli_args()); - return; - } - - $path = (isset($_SERVER[$uri])) ? $_SERVER[$uri] : @getenv($uri); - $this->_set_uri_string($path); - } - - // -------------------------------------------------------------------- - - /** - * Set the URI String - * - * @access public - * @param string - * @return string - */ - function _set_uri_string($str) - { - // Filter out control characters - $str = remove_invisible_characters($str, FALSE); - - // If the URI contains only a slash we'll kill it - $this->uri_string = ($str == '/') ? '' : $str; - } - - // -------------------------------------------------------------------- - - /** - * Detects the URI - * - * This function will detect the URI automatically and fix the query string - * if necessary. - * - * @access private - * @return string - */ - private function _detect_uri() - { - if ( ! isset($_SERVER['REQUEST_URI']) OR ! isset($_SERVER['SCRIPT_NAME'])) - { - return ''; - } - - $uri = $_SERVER['REQUEST_URI']; - if (strpos($uri, $_SERVER['SCRIPT_NAME']) === 0) - { - $uri = substr($uri, strlen($_SERVER['SCRIPT_NAME'])); - } - elseif (strpos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0) - { - $uri = substr($uri, strlen(dirname($_SERVER['SCRIPT_NAME']))); - } - - // This section ensures that even on servers that require the URI to be in the query string (Nginx) a correct - // URI is found, and also fixes the QUERY_STRING server var and $_GET array. - if (strncmp($uri, '?/', 2) === 0) - { - $uri = substr($uri, 2); - } - $parts = preg_split('#\?#i', $uri, 2); - $uri = $parts[0]; - if (isset($parts[1])) - { - $_SERVER['QUERY_STRING'] = $parts[1]; - parse_str($_SERVER['QUERY_STRING'], $_GET); - } - else - { - $_SERVER['QUERY_STRING'] = ''; - $_GET = array(); - } - - if ($uri == '/' || empty($uri)) - { - return '/'; - } - - $uri = parse_url($uri, PHP_URL_PATH); - - // Do some final cleaning of the URI and return it - return str_replace(array('//', '../'), '/', trim($uri, '/')); - } - - // -------------------------------------------------------------------- - - /** - * Parse cli arguments - * - * Take each command line argument and assume it is a URI segment. - * - * @access private - * @return string - */ - private function _parse_cli_args() - { - $args = array_slice($_SERVER['argv'], 1); - - return $args ? '/' . implode('/', $args) : ''; - } - - // -------------------------------------------------------------------- - - /** - * Filter segments for malicious characters - * - * @access private - * @param string - * @return string - */ - function _filter_uri($str) - { - if ($str != '' && $this->config->item('permitted_uri_chars') != '' && $this->config->item('enable_query_strings') == FALSE) - { - // preg_quote() in PHP 5.3 escapes -, so the str_replace() and addition of - to preg_quote() is to maintain backwards - // compatibility as many are unaware of how characters in the permitted_uri_chars will be parsed as a regex pattern - if ( ! preg_match("|^[".str_replace(array('\\-', '\-'), '-', preg_quote($this->config->item('permitted_uri_chars'), '-'))."]+$|i", $str)) - { - show_error('The URI you submitted has disallowed characters.', 400); - } - } - - // Convert programatic characters to entities - $bad = array('$', '(', ')', '%28', '%29'); - $good = array('$', '(', ')', '(', ')'); - - return str_replace($bad, $good, $str); - } - - // -------------------------------------------------------------------- - - /** - * Remove the suffix from the URL if needed - * - * @access private - * @return void - */ - function _remove_url_suffix() - { - if ($this->config->item('url_suffix') != "") - { - $this->uri_string = preg_replace("|".preg_quote($this->config->item('url_suffix'))."$|", "", $this->uri_string); - } - } - - // -------------------------------------------------------------------- - - /** - * Explode the URI Segments. The individual segments will - * be stored in the $this->segments array. - * - * @access private - * @return void - */ - function _explode_segments() - { - foreach (explode("/", preg_replace("|/*(.+?)/*$|", "\\1", $this->uri_string)) as $val) - { - // Filter segments for security - $val = trim($this->_filter_uri($val)); - - if ($val != '') - { - $this->segments[] = $val; - } - } - } - - // -------------------------------------------------------------------- - /** - * Re-index Segments - * - * This function re-indexes the $this->segment array so that it - * starts at 1 rather than 0. Doing so makes it simpler to - * use functions like $this->uri->segment(n) since there is - * a 1:1 relationship between the segment array and the actual segments. - * - * @access private - * @return void - */ - function _reindex_segments() - { - array_unshift($this->segments, NULL); - array_unshift($this->rsegments, NULL); - unset($this->segments[0]); - unset($this->rsegments[0]); - } - - // -------------------------------------------------------------------- - - /** - * Fetch a URI Segment - * - * This function returns the URI segment based on the number provided. - * - * @access public - * @param integer - * @param bool - * @return string - */ - function segment($n, $no_result = FALSE) - { - return ( ! isset($this->segments[$n])) ? $no_result : $this->segments[$n]; - } - - // -------------------------------------------------------------------- - - /** - * Fetch a URI "routed" Segment - * - * This function returns the re-routed URI segment (assuming routing rules are used) - * based on the number provided. If there is no routing this function returns the - * same result as $this->segment() - * - * @access public - * @param integer - * @param bool - * @return string - */ - function rsegment($n, $no_result = FALSE) - { - return ( ! isset($this->rsegments[$n])) ? $no_result : $this->rsegments[$n]; - } - - // -------------------------------------------------------------------- - - /** - * Generate a key value pair from the URI string - * - * This function generates and associative array of URI data starting - * at the supplied segment. For example, if this is your URI: - * - * example.com/user/search/name/joe/location/UK/gender/male - * - * You can use this function to generate an array with this prototype: - * - * array ( - * name => joe - * location => UK - * gender => male - * ) - * - * @access public - * @param integer the starting segment number - * @param array an array of default values - * @return array - */ - function uri_to_assoc($n = 3, $default = array()) - { - return $this->_uri_to_assoc($n, $default, 'segment'); - } - /** - * Identical to above only it uses the re-routed segment array - * - * @access public - * @param integer the starting segment number - * @param array an array of default values - * @return array - * - */ - function ruri_to_assoc($n = 3, $default = array()) - { - return $this->_uri_to_assoc($n, $default, 'rsegment'); - } - - // -------------------------------------------------------------------- - - /** - * Generate a key value pair from the URI string or Re-routed URI string - * - * @access private - * @param integer the starting segment number - * @param array an array of default values - * @param string which array we should use - * @return array - */ - function _uri_to_assoc($n = 3, $default = array(), $which = 'segment') - { - if ($which == 'segment') - { - $total_segments = 'total_segments'; - $segment_array = 'segment_array'; - } - else - { - $total_segments = 'total_rsegments'; - $segment_array = 'rsegment_array'; - } - - if ( ! is_numeric($n)) - { - return $default; - } - - if (isset($this->keyval[$n])) - { - return $this->keyval[$n]; - } - - if ($this->$total_segments() < $n) - { - if (count($default) == 0) - { - return array(); - } - - $retval = array(); - foreach ($default as $val) - { - $retval[$val] = FALSE; - } - return $retval; - } - - $segments = array_slice($this->$segment_array(), ($n - 1)); - - $i = 0; - $lastval = ''; - $retval = array(); - foreach ($segments as $seg) - { - if ($i % 2) - { - $retval[$lastval] = $seg; - } - else - { - $retval[$seg] = FALSE; - $lastval = $seg; - } - - $i++; - } - - if (count($default) > 0) - { - foreach ($default as $val) - { - if ( ! array_key_exists($val, $retval)) - { - $retval[$val] = FALSE; - } - } - } - - // Cache the array for reuse - $this->keyval[$n] = $retval; - return $retval; - } - - // -------------------------------------------------------------------- - - /** - * Generate a URI string from an associative array - * - * - * @access public - * @param array an associative array of key/values - * @return array - */ - function assoc_to_uri($array) - { - $temp = array(); - foreach ((array)$array as $key => $val) - { - $temp[] = $key; - $temp[] = $val; - } - - return implode('/', $temp); - } - - // -------------------------------------------------------------------- - - /** - * Fetch a URI Segment and add a trailing slash - * - * @access public - * @param integer - * @param string - * @return string - */ - function slash_segment($n, $where = 'trailing') - { - return $this->_slash_segment($n, $where, 'segment'); - } - - // -------------------------------------------------------------------- - - /** - * Fetch a URI Segment and add a trailing slash - * - * @access public - * @param integer - * @param string - * @return string - */ - function slash_rsegment($n, $where = 'trailing') - { - return $this->_slash_segment($n, $where, 'rsegment'); - } - - // -------------------------------------------------------------------- - - /** - * Fetch a URI Segment and add a trailing slash - helper function - * - * @access private - * @param integer - * @param string - * @param string - * @return string - */ - function _slash_segment($n, $where = 'trailing', $which = 'segment') - { - $leading = '/'; - $trailing = '/'; - - if ($where == 'trailing') - { - $leading = ''; - } - elseif ($where == 'leading') - { - $trailing = ''; - } - - return $leading.$this->$which($n).$trailing; - } - - // -------------------------------------------------------------------- - - /** - * Segment Array - * - * @access public - * @return array - */ - function segment_array() - { - return $this->segments; - } - - // -------------------------------------------------------------------- - - /** - * Routed Segment Array - * - * @access public - * @return array - */ - function rsegment_array() - { - return $this->rsegments; - } - - // -------------------------------------------------------------------- - - /** - * Total number of segments - * - * @access public - * @return integer - */ - function total_segments() - { - return count($this->segments); - } - - // -------------------------------------------------------------------- - - /** - * Total number of routed segments - * - * @access public - * @return integer - */ - function total_rsegments() - { - return count($this->rsegments); - } - - // -------------------------------------------------------------------- - - /** - * Fetch the entire URI string - * - * @access public - * @return string - */ - function uri_string() - { - return $this->uri_string; - } - - - // -------------------------------------------------------------------- - - /** - * Fetch the entire Re-routed URI string - * - * @access public - * @return string - */ - function ruri_string() - { - return '/'.implode('/', $this->rsegment_array()); - } - -} -// END URI Class - -/* End of file URI.php */ -/* Location: ./system/core/URI.php */ \ No newline at end of file diff --git a/donjo-sys/core/Utf8.php b/donjo-sys/core/Utf8.php deleted file mode 100644 index efb78ce1a..000000000 --- a/donjo-sys/core/Utf8.php +++ /dev/null @@ -1,166 +0,0 @@ -item('charset') == 'UTF-8' // Application charset must be UTF-8 - ) - { - log_message('debug', "UTF-8 Support Enabled"); - - define('UTF8_ENABLED', TRUE); - - // set internal encoding for multibyte string functions if necessary - // and set a flag so we don't have to repeatedly use extension_loaded() - // or function_exists() - if (extension_loaded('mbstring')) - { - define('MB_ENABLED', TRUE); - mb_internal_encoding('UTF-8'); - } - else - { - define('MB_ENABLED', FALSE); - } - } - else - { - log_message('debug', "UTF-8 Support Disabled"); - define('UTF8_ENABLED', FALSE); - } - } - - // -------------------------------------------------------------------- - - /** - * Clean UTF-8 strings - * - * Ensures strings are UTF-8 - * - * @access public - * @param string - * @return string - */ - function clean_string($str) - { - if ($this->_is_ascii($str) === FALSE) - { - $str = @iconv('UTF-8', 'UTF-8//IGNORE', $str); - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Remove ASCII control characters - * - * Removes all ASCII control characters except horizontal tabs, - * line feeds, and carriage returns, as all others can cause - * problems in XML - * - * @access public - * @param string - * @return string - */ - function safe_ascii_for_xml($str) - { - return remove_invisible_characters($str, FALSE); - } - - // -------------------------------------------------------------------- - - /** - * Convert to UTF-8 - * - * Attempts to convert a string to UTF-8 - * - * @access public - * @param string - * @param string - input encoding - * @return string - */ - function convert_to_utf8($str, $encoding) - { - if (function_exists('iconv')) - { - $str = @iconv($encoding, 'UTF-8', $str); - } - elseif (function_exists('mb_convert_encoding')) - { - $str = @mb_convert_encoding($str, 'UTF-8', $encoding); - } - else - { - return FALSE; - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Is ASCII? - * - * Tests if a string is standard 7-bit ASCII or not - * - * @access public - * @param string - * @return bool - */ - function _is_ascii($str) - { - return (preg_match('/[^\x00-\x7F]/S', $str) == 0); - } - - // -------------------------------------------------------------------- - -} -// End Utf8 Class - -/* End of file Utf8.php */ -/* Location: ./system/core/Utf8.php */ \ No newline at end of file diff --git a/donjo-sys/core/index.html b/donjo-sys/core/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/core/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/database/DB.php b/donjo-sys/database/DB.php deleted file mode 100644 index bb3db3d17..000000000 --- a/donjo-sys/database/DB.php +++ /dev/null @@ -1,163 +0,0 @@ - $dns['scheme'], - 'hostname' => (isset($dns['host'])) ? rawurldecode($dns['host']) : '', - 'username' => (isset($dns['user'])) ? rawurldecode($dns['user']) : '', - 'password' => (isset($dns['pass'])) ? rawurldecode($dns['pass']) : '', - 'database' => (isset($dns['path'])) ? rawurldecode(substr($dns['path'], 1)) : '' - ); - - // were additional config items set? - if (isset($dns['query'])) - { - parse_str($dns['query'], $extra); - - foreach ($extra as $key => $val) - { - // booleans please - if (strtoupper($val) == "TRUE") - { - $val = TRUE; - } - elseif (strtoupper($val) == "FALSE") - { - $val = FALSE; - } - - $params[$key] = $val; - } - } - } - - // No DB specified yet? Beat them senseless... - if ( ! isset($params['dbdriver']) OR $params['dbdriver'] == '') - { - show_error('You have not selected a database type to connect to.'); - } - - // Load the DB classes. Note: Since the active record class is optional - // we need to dynamically create a class that extends proper parent class - // based on whether we're using the active record class or not. - // Kudos to Paul for discovering this clever use of eval() - - if ($active_record_override !== NULL) - { - $active_record = $active_record_override; - } - - require_once(BASEPATH.'database/DB_driver.php'); - - if ( ! isset($active_record) OR $active_record == TRUE) - { - require_once(BASEPATH.'database/DB_active_rec.php'); - - if ( ! class_exists('CI_DB')) - { - eval('class CI_DB extends CI_DB_active_record { }'); - } - } - else - { - if ( ! class_exists('CI_DB')) - { - eval('class CI_DB extends CI_DB_driver { }'); - } - } - - require_once(BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].'_driver.php'); - - // Instantiate the DB adapter - $driver = 'CI_DB_'.$params['dbdriver'].'_driver'; - $DB = new $driver($params); - - if ($DB->autoinit == TRUE) - { - $DB->initialize(); - } - - if (isset($params['stricton']) && $params['stricton'] == TRUE) - { - $DB->query('SET SESSION sql_mode="STRICT_ALL_TABLES"'); - } - - return $DB; -} - - - -/* End of file DB.php */ -/* Location: ./system/database/DB.php */ \ No newline at end of file diff --git a/donjo-sys/database/DB_active_rec.php b/donjo-sys/database/DB_active_rec.php deleted file mode 100644 index 33e2ea27a..000000000 --- a/donjo-sys/database/DB_active_rec.php +++ /dev/null @@ -1,2046 +0,0 @@ -ar_select[] = $val; - $this->ar_no_escape[] = $escape; - - if ($this->ar_caching === TRUE) - { - $this->ar_cache_select[] = $val; - $this->ar_cache_exists[] = 'select'; - $this->ar_cache_no_escape[] = $escape; - } - } - } - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Select Max - * - * Generates a SELECT MAX(field) portion of a query - * - * @param string the field - * @param string an alias - * @return object - */ - public function select_max($select = '', $alias = '') - { - return $this->_max_min_avg_sum($select, $alias, 'MAX'); - } - - // -------------------------------------------------------------------- - - /** - * Select Min - * - * Generates a SELECT MIN(field) portion of a query - * - * @param string the field - * @param string an alias - * @return object - */ - public function select_min($select = '', $alias = '') - { - return $this->_max_min_avg_sum($select, $alias, 'MIN'); - } - - // -------------------------------------------------------------------- - - /** - * Select Average - * - * Generates a SELECT AVG(field) portion of a query - * - * @param string the field - * @param string an alias - * @return object - */ - public function select_avg($select = '', $alias = '') - { - return $this->_max_min_avg_sum($select, $alias, 'AVG'); - } - - // -------------------------------------------------------------------- - - /** - * Select Sum - * - * Generates a SELECT SUM(field) portion of a query - * - * @param string the field - * @param string an alias - * @return object - */ - public function select_sum($select = '', $alias = '') - { - return $this->_max_min_avg_sum($select, $alias, 'SUM'); - } - - // -------------------------------------------------------------------- - - /** - * Processing Function for the four functions above: - * - * select_max() - * select_min() - * select_avg() - * select_sum() - * - * @param string the field - * @param string an alias - * @return object - */ - protected function _max_min_avg_sum($select = '', $alias = '', $type = 'MAX') - { - if ( ! is_string($select) OR $select == '') - { - $this->display_error('db_invalid_query'); - } - - $type = strtoupper($type); - - if ( ! in_array($type, array('MAX', 'MIN', 'AVG', 'SUM'))) - { - show_error('Invalid function type: '.$type); - } - - if ($alias == '') - { - $alias = $this->_create_alias_from_table(trim($select)); - } - - $sql = $type.'('.$this->_protect_identifiers(trim($select)).') AS '.$alias; - - $this->ar_select[] = $sql; - - if ($this->ar_caching === TRUE) - { - $this->ar_cache_select[] = $sql; - $this->ar_cache_exists[] = 'select'; - } - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Determines the alias name based on the table - * - * @param string - * @return string - */ - protected function _create_alias_from_table($item) - { - if (strpos($item, '.') !== FALSE) - { - return end(explode('.', $item)); - } - - return $item; - } - - // -------------------------------------------------------------------- - - /** - * DISTINCT - * - * Sets a flag which tells the query string compiler to add DISTINCT - * - * @param bool - * @return object - */ - public function distinct($val = TRUE) - { - $this->ar_distinct = (is_bool($val)) ? $val : TRUE; - return $this; - } - - // -------------------------------------------------------------------- - - /** - * From - * - * Generates the FROM portion of the query - * - * @param mixed can be a string or array - * @return object - */ - public function from($from) - { - foreach ((array) $from as $val) - { - if (strpos($val, ',') !== FALSE) - { - foreach (explode(',', $val) as $v) - { - $v = trim($v); - $this->_track_aliases($v); - - $this->ar_from[] = $this->_protect_identifiers($v, TRUE, NULL, FALSE); - - if ($this->ar_caching === TRUE) - { - $this->ar_cache_from[] = $this->_protect_identifiers($v, TRUE, NULL, FALSE); - $this->ar_cache_exists[] = 'from'; - } - } - - } - else - { - $val = trim($val); - - // Extract any aliases that might exist. We use this information - // in the _protect_identifiers to know whether to add a table prefix - $this->_track_aliases($val); - - $this->ar_from[] = $this->_protect_identifiers($val, TRUE, NULL, FALSE); - - if ($this->ar_caching === TRUE) - { - $this->ar_cache_from[] = $this->_protect_identifiers($val, TRUE, NULL, FALSE); - $this->ar_cache_exists[] = 'from'; - } - } - } - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Join - * - * Generates the JOIN portion of the query - * - * @param string - * @param string the join condition - * @param string the type of join - * @return object - */ - public function join($table, $cond, $type = '') - { - if ($type != '') - { - $type = strtoupper(trim($type)); - - if ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'))) - { - $type = ''; - } - else - { - $type .= ' '; - } - } - - // Extract any aliases that might exist. We use this information - // in the _protect_identifiers to know whether to add a table prefix - $this->_track_aliases($table); - - // Strip apart the condition and protect the identifiers - if (preg_match('/([\w\.]+)([\W\s]+)(.+)/', $cond, $match)) - { - $match[1] = $this->_protect_identifiers($match[1]); - $match[3] = $this->_protect_identifiers($match[3]); - - $cond = $match[1].$match[2].$match[3]; - } - - // Assemble the JOIN statement - $join = $type.'JOIN '.$this->_protect_identifiers($table, TRUE, NULL, FALSE).' ON '.$cond; - - $this->ar_join[] = $join; - if ($this->ar_caching === TRUE) - { - $this->ar_cache_join[] = $join; - $this->ar_cache_exists[] = 'join'; - } - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Where - * - * Generates the WHERE portion of the query. Separates - * multiple calls with AND - * - * @param mixed - * @param mixed - * @return object - */ - public function where($key, $value = NULL, $escape = TRUE) - { - return $this->_where($key, $value, 'AND ', $escape); - } - - // -------------------------------------------------------------------- - - /** - * OR Where - * - * Generates the WHERE portion of the query. Separates - * multiple calls with OR - * - * @param mixed - * @param mixed - * @return object - */ - public function or_where($key, $value = NULL, $escape = TRUE) - { - return $this->_where($key, $value, 'OR ', $escape); - } - - // -------------------------------------------------------------------- - - /** - * Where - * - * Called by where() or or_where() - * - * @param mixed - * @param mixed - * @param string - * @return object - */ - protected function _where($key, $value = NULL, $type = 'AND ', $escape = NULL) - { - if ( ! is_array($key)) - { - $key = array($key => $value); - } - - // If the escape value was not set will will base it on the global setting - if ( ! is_bool($escape)) - { - $escape = $this->_protect_identifiers; - } - - foreach ($key as $k => $v) - { - $prefix = (count($this->ar_where) == 0 AND count($this->ar_cache_where) == 0) ? '' : $type; - - if (is_null($v) && ! $this->_has_operator($k)) - { - // value appears not to have been set, assign the test to IS NULL - $k .= ' IS NULL'; - } - - if ( ! is_null($v)) - { - if ($escape === TRUE) - { - $k = $this->_protect_identifiers($k, FALSE, $escape); - - $v = ' '.$this->escape($v); - } - - if ( ! $this->_has_operator($k)) - { - $k .= ' = '; - } - } - else - { - $k = $this->_protect_identifiers($k, FALSE, $escape); - } - - $this->ar_where[] = $prefix.$k.$v; - - if ($this->ar_caching === TRUE) - { - $this->ar_cache_where[] = $prefix.$k.$v; - $this->ar_cache_exists[] = 'where'; - } - - } - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Where_in - * - * Generates a WHERE field IN ('item', 'item') SQL query joined with - * AND if appropriate - * - * @param string The field to search - * @param array The values searched on - * @return object - */ - public function where_in($key = NULL, $values = NULL) - { - return $this->_where_in($key, $values); - } - - // -------------------------------------------------------------------- - - /** - * Where_in_or - * - * Generates a WHERE field IN ('item', 'item') SQL query joined with - * OR if appropriate - * - * @param string The field to search - * @param array The values searched on - * @return object - */ - public function or_where_in($key = NULL, $values = NULL) - { - return $this->_where_in($key, $values, FALSE, 'OR '); - } - - // -------------------------------------------------------------------- - - /** - * Where_not_in - * - * Generates a WHERE field NOT IN ('item', 'item') SQL query joined - * with AND if appropriate - * - * @param string The field to search - * @param array The values searched on - * @return object - */ - public function where_not_in($key = NULL, $values = NULL) - { - return $this->_where_in($key, $values, TRUE); - } - - // -------------------------------------------------------------------- - - /** - * Where_not_in_or - * - * Generates a WHERE field NOT IN ('item', 'item') SQL query joined - * with OR if appropriate - * - * @param string The field to search - * @param array The values searched on - * @return object - */ - public function or_where_not_in($key = NULL, $values = NULL) - { - return $this->_where_in($key, $values, TRUE, 'OR '); - } - - // -------------------------------------------------------------------- - - /** - * Where_in - * - * Called by where_in, where_in_or, where_not_in, where_not_in_or - * - * @param string The field to search - * @param array The values searched on - * @param boolean If the statement would be IN or NOT IN - * @param string - * @return object - */ - protected function _where_in($key = NULL, $values = NULL, $not = FALSE, $type = 'AND ') - { - if ($key === NULL OR $values === NULL) - { - return; - } - - if ( ! is_array($values)) - { - $values = array($values); - } - - $not = ($not) ? ' NOT' : ''; - - foreach ($values as $value) - { - $this->ar_wherein[] = $this->escape($value); - } - - $prefix = (count($this->ar_where) == 0) ? '' : $type; - - $where_in = $prefix . $this->_protect_identifiers($key) . $not . " IN (" . implode(", ", $this->ar_wherein) . ") "; - - $this->ar_where[] = $where_in; - if ($this->ar_caching === TRUE) - { - $this->ar_cache_where[] = $where_in; - $this->ar_cache_exists[] = 'where'; - } - - // reset the array for multiple calls - $this->ar_wherein = array(); - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Like - * - * Generates a %LIKE% portion of the query. Separates - * multiple calls with AND - * - * @param mixed - * @param mixed - * @return object - */ - public function like($field, $match = '', $side = 'both') - { - return $this->_like($field, $match, 'AND ', $side); - } - - // -------------------------------------------------------------------- - - /** - * Not Like - * - * Generates a NOT LIKE portion of the query. Separates - * multiple calls with AND - * - * @param mixed - * @param mixed - * @return object - */ - public function not_like($field, $match = '', $side = 'both') - { - return $this->_like($field, $match, 'AND ', $side, 'NOT'); - } - - // -------------------------------------------------------------------- - - /** - * OR Like - * - * Generates a %LIKE% portion of the query. Separates - * multiple calls with OR - * - * @param mixed - * @param mixed - * @return object - */ - public function or_like($field, $match = '', $side = 'both') - { - return $this->_like($field, $match, 'OR ', $side); - } - - // -------------------------------------------------------------------- - - /** - * OR Not Like - * - * Generates a NOT LIKE portion of the query. Separates - * multiple calls with OR - * - * @param mixed - * @param mixed - * @return object - */ - public function or_not_like($field, $match = '', $side = 'both') - { - return $this->_like($field, $match, 'OR ', $side, 'NOT'); - } - - // -------------------------------------------------------------------- - - /** - * Like - * - * Called by like() or orlike() - * - * @param mixed - * @param mixed - * @param string - * @return object - */ - protected function _like($field, $match = '', $type = 'AND ', $side = 'both', $not = '') - { - if ( ! is_array($field)) - { - $field = array($field => $match); - } - - foreach ($field as $k => $v) - { - $k = $this->_protect_identifiers($k); - - $prefix = (count($this->ar_like) == 0) ? '' : $type; - - $v = $this->escape_like_str($v); - - if ($side == 'none') - { - $like_statement = $prefix." $k $not LIKE '{$v}'"; - } - elseif ($side == 'before') - { - $like_statement = $prefix." $k $not LIKE '%{$v}'"; - } - elseif ($side == 'after') - { - $like_statement = $prefix." $k $not LIKE '{$v}%'"; - } - else - { - $like_statement = $prefix." $k $not LIKE '%{$v}%'"; - } - - // some platforms require an escape sequence definition for LIKE wildcards - if ($this->_like_escape_str != '') - { - $like_statement = $like_statement.sprintf($this->_like_escape_str, $this->_like_escape_chr); - } - - $this->ar_like[] = $like_statement; - if ($this->ar_caching === TRUE) - { - $this->ar_cache_like[] = $like_statement; - $this->ar_cache_exists[] = 'like'; - } - - } - return $this; - } - - // -------------------------------------------------------------------- - - /** - * GROUP BY - * - * @param string - * @return object - */ - public function group_by($by) - { - if (is_string($by)) - { - $by = explode(',', $by); - } - - foreach ($by as $val) - { - $val = trim($val); - - if ($val != '') - { - $this->ar_groupby[] = $this->_protect_identifiers($val); - - if ($this->ar_caching === TRUE) - { - $this->ar_cache_groupby[] = $this->_protect_identifiers($val); - $this->ar_cache_exists[] = 'groupby'; - } - } - } - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Sets the HAVING value - * - * Separates multiple calls with AND - * - * @param string - * @param string - * @return object - */ - public function having($key, $value = '', $escape = TRUE) - { - return $this->_having($key, $value, 'AND ', $escape); - } - - // -------------------------------------------------------------------- - - /** - * Sets the OR HAVING value - * - * Separates multiple calls with OR - * - * @param string - * @param string - * @return object - */ - public function or_having($key, $value = '', $escape = TRUE) - { - return $this->_having($key, $value, 'OR ', $escape); - } - - // -------------------------------------------------------------------- - - /** - * Sets the HAVING values - * - * Called by having() or or_having() - * - * @param string - * @param string - * @return object - */ - protected function _having($key, $value = '', $type = 'AND ', $escape = TRUE) - { - if ( ! is_array($key)) - { - $key = array($key => $value); - } - - foreach ($key as $k => $v) - { - $prefix = (count($this->ar_having) == 0) ? '' : $type; - - if ($escape === TRUE) - { - $k = $this->_protect_identifiers($k); - } - - if ( ! $this->_has_operator($k)) - { - $k .= ' = '; - } - - if ($v != '') - { - $v = ' '.$this->escape($v); - } - - $this->ar_having[] = $prefix.$k.$v; - if ($this->ar_caching === TRUE) - { - $this->ar_cache_having[] = $prefix.$k.$v; - $this->ar_cache_exists[] = 'having'; - } - } - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Sets the ORDER BY value - * - * @param string - * @param string direction: asc or desc - * @return object - */ - public function order_by($orderby, $direction = '') - { - if (strtolower($direction) == 'random') - { - $orderby = ''; // Random results want or don't need a field name - $direction = $this->_random_keyword; - } - elseif (trim($direction) != '') - { - $direction = (in_array(strtoupper(trim($direction)), array('ASC', 'DESC'), TRUE)) ? ' '.$direction : ' ASC'; - } - - - if (strpos($orderby, ',') !== FALSE) - { - $temp = array(); - foreach (explode(',', $orderby) as $part) - { - $part = trim($part); - if ( ! in_array($part, $this->ar_aliased_tables)) - { - $part = $this->_protect_identifiers(trim($part)); - } - - $temp[] = $part; - } - - $orderby = implode(', ', $temp); - } - else if ($direction != $this->_random_keyword) - { - $orderby = $this->_protect_identifiers($orderby); - } - - $orderby_statement = $orderby.$direction; - - $this->ar_orderby[] = $orderby_statement; - if ($this->ar_caching === TRUE) - { - $this->ar_cache_orderby[] = $orderby_statement; - $this->ar_cache_exists[] = 'orderby'; - } - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Sets the LIMIT value - * - * @param integer the limit value - * @param integer the offset value - * @return object - */ - public function limit($value, $offset = '') - { - $this->ar_limit = (int) $value; - - if ($offset != '') - { - $this->ar_offset = (int) $offset; - } - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Sets the OFFSET value - * - * @param integer the offset value - * @return object - */ - public function offset($offset) - { - $this->ar_offset = (int) $offset; - return $this; - } - - // -------------------------------------------------------------------- - - /** - * The "set" function. Allows key/value pairs to be set for inserting or updating - * - * @param mixed - * @param string - * @param boolean - * @return object - */ - public function set($key, $value = '', $escape = TRUE) - { - $key = $this->_object_to_array($key); - - if ( ! is_array($key)) - { - $key = array($key => $value); - } - - foreach ($key as $k => $v) - { - if ($escape === FALSE) - { - $this->ar_set[$this->_protect_identifiers($k)] = $v; - } - else - { - $this->ar_set[$this->_protect_identifiers($k, FALSE, TRUE)] = $this->escape($v); - } - } - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Get - * - * Compiles the select statement based on the other functions called - * and runs the query - * - * @param string the table - * @param string the limit clause - * @param string the offset clause - * @return object - */ - public function get($table = '', $limit = null, $offset = null) - { - if ($table != '') - { - $this->_track_aliases($table); - $this->from($table); - } - - if ( ! is_null($limit)) - { - $this->limit($limit, $offset); - } - - $sql = $this->_compile_select(); - - $result = $this->query($sql); - $this->_reset_select(); - return $result; - } - - /** - * "Count All Results" query - * - * Generates a platform-specific query string that counts all records - * returned by an Active Record query. - * - * @param string - * @return string - */ - public function count_all_results($table = '') - { - if ($table != '') - { - $this->_track_aliases($table); - $this->from($table); - } - - $sql = $this->_compile_select($this->_count_string . $this->_protect_identifiers('numrows')); - - $query = $this->query($sql); - $this->_reset_select(); - - if ($query->num_rows() == 0) - { - return 0; - } - - $row = $query->row(); - return (int) $row->numrows; - } - - // -------------------------------------------------------------------- - - /** - * Get_Where - * - * Allows the where clause, limit and offset to be added directly - * - * @param string the where clause - * @param string the limit clause - * @param string the offset clause - * @return object - */ - public function get_where($table = '', $where = null, $limit = null, $offset = null) - { - if ($table != '') - { - $this->from($table); - } - - if ( ! is_null($where)) - { - $this->where($where); - } - - if ( ! is_null($limit)) - { - $this->limit($limit, $offset); - } - - $sql = $this->_compile_select(); - - $result = $this->query($sql); - $this->_reset_select(); - return $result; - } - - // -------------------------------------------------------------------- - - /** - * Insert_Batch - * - * Compiles batch insert strings and runs the queries - * - * @param string the table to retrieve the results from - * @param array an associative array of insert values - * @return object - */ - public function insert_batch($table = '', $set = NULL) - { - if ( ! is_null($set)) - { - $this->set_insert_batch($set); - } - - if (count($this->ar_set) == 0) - { - if ($this->db_debug) - { - //No valid data array. Folds in cases where keys and values did not match up - return $this->display_error('db_must_use_set'); - } - return FALSE; - } - - if ($table == '') - { - if ( ! isset($this->ar_from[0])) - { - if ($this->db_debug) - { - return $this->display_error('db_must_set_table'); - } - return FALSE; - } - - $table = $this->ar_from[0]; - } - - // Batch this baby - for ($i = 0, $total = count($this->ar_set); $i < $total; $i = $i + 100) - { - - $sql = $this->_insert_batch($this->_protect_identifiers($table, TRUE, NULL, FALSE), $this->ar_keys, array_slice($this->ar_set, $i, 100)); - - //echo $sql; - - $this->query($sql); - } - - $this->_reset_write(); - - - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * The "set_insert_batch" function. Allows key/value pairs to be set for batch inserts - * - * @param mixed - * @param string - * @param boolean - * @return object - */ - public function set_insert_batch($key, $value = '', $escape = TRUE) - { - $key = $this->_object_to_array_batch($key); - - if ( ! is_array($key)) - { - $key = array($key => $value); - } - - $keys = array_keys(current($key)); - sort($keys); - - foreach ($key as $row) - { - if (count(array_diff($keys, array_keys($row))) > 0 OR count(array_diff(array_keys($row), $keys)) > 0) - { - // batch function above returns an error on an empty array - $this->ar_set[] = array(); - return; - } - - ksort($row); // puts $row in the same order as our keys - - if ($escape === FALSE) - { - $this->ar_set[] = '('.implode(',', $row).')'; - } - else - { - $clean = array(); - - foreach ($row as $value) - { - $clean[] = $this->escape($value); - } - - $this->ar_set[] = '('.implode(',', $clean).')'; - } - } - - foreach ($keys as $k) - { - $this->ar_keys[] = $this->_protect_identifiers($k); - } - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Insert - * - * Compiles an insert string and runs the query - * - * @param string the table to insert data into - * @param array an associative array of insert values - * @return object - */ - function insert($table = '', $set = NULL) - { - if ( ! is_null($set)) - { - $this->set($set); - } - - if (count($this->ar_set) == 0) - { - if ($this->db_debug) - { - return $this->display_error('db_must_use_set'); - } - return FALSE; - } - - if ($table == '') - { - if ( ! isset($this->ar_from[0])) - { - if ($this->db_debug) - { - return $this->display_error('db_must_set_table'); - } - return FALSE; - } - - $table = $this->ar_from[0]; - } - - $sql = $this->_insert($this->_protect_identifiers($table, TRUE, NULL, FALSE), array_keys($this->ar_set), array_values($this->ar_set)); - - $this->_reset_write(); - return $this->query($sql); - } - - // -------------------------------------------------------------------- - - /** - * Replace - * - * Compiles an replace into string and runs the query - * - * @param string the table to replace data into - * @param array an associative array of insert values - * @return object - */ - public function replace($table = '', $set = NULL) - { - if ( ! is_null($set)) - { - $this->set($set); - } - - if (count($this->ar_set) == 0) - { - if ($this->db_debug) - { - return $this->display_error('db_must_use_set'); - } - return FALSE; - } - - if ($table == '') - { - if ( ! isset($this->ar_from[0])) - { - if ($this->db_debug) - { - return $this->display_error('db_must_set_table'); - } - return FALSE; - } - - $table = $this->ar_from[0]; - } - - $sql = $this->_replace($this->_protect_identifiers($table, TRUE, NULL, FALSE), array_keys($this->ar_set), array_values($this->ar_set)); - - $this->_reset_write(); - return $this->query($sql); - } - - // -------------------------------------------------------------------- - - /** - * Update - * - * Compiles an update string and runs the query - * - * @param string the table to retrieve the results from - * @param array an associative array of update values - * @param mixed the where clause - * @return object - */ - public function update($table = '', $set = NULL, $where = NULL, $limit = NULL) - { - // Combine any cached components with the current statements - $this->_merge_cache(); - - if ( ! is_null($set)) - { - $this->set($set); - } - - if (count($this->ar_set) == 0) - { - if ($this->db_debug) - { - return $this->display_error('db_must_use_set'); - } - return FALSE; - } - - if ($table == '') - { - if ( ! isset($this->ar_from[0])) - { - if ($this->db_debug) - { - return $this->display_error('db_must_set_table'); - } - return FALSE; - } - - $table = $this->ar_from[0]; - } - - if ($where != NULL) - { - $this->where($where); - } - - if ($limit != NULL) - { - $this->limit($limit); - } - - $sql = $this->_update($this->_protect_identifiers($table, TRUE, NULL, FALSE), $this->ar_set, $this->ar_where, $this->ar_orderby, $this->ar_limit); - - $this->_reset_write(); - return $this->query($sql); - } - - - // -------------------------------------------------------------------- - - /** - * Update_Batch - * - * Compiles an update string and runs the query - * - * @param string the table to retrieve the results from - * @param array an associative array of update values - * @param string the where key - * @return object - */ - public function update_batch($table = '', $set = NULL, $index = NULL) - { - // Combine any cached components with the current statements - $this->_merge_cache(); - - if (is_null($index)) - { - if ($this->db_debug) - { - return $this->display_error('db_must_use_index'); - } - - return FALSE; - } - - if ( ! is_null($set)) - { - $this->set_update_batch($set, $index); - } - - if (count($this->ar_set) == 0) - { - if ($this->db_debug) - { - return $this->display_error('db_must_use_set'); - } - - return FALSE; - } - - if ($table == '') - { - if ( ! isset($this->ar_from[0])) - { - if ($this->db_debug) - { - return $this->display_error('db_must_set_table'); - } - return FALSE; - } - - $table = $this->ar_from[0]; - } - - // Batch this baby - for ($i = 0, $total = count($this->ar_set); $i < $total; $i = $i + 100) - { - $sql = $this->_update_batch($this->_protect_identifiers($table, TRUE, NULL, FALSE), array_slice($this->ar_set, $i, 100), $this->_protect_identifiers($index), $this->ar_where); - - $this->query($sql); - } - - $this->_reset_write(); - } - - // -------------------------------------------------------------------- - - /** - * The "set_update_batch" function. Allows key/value pairs to be set for batch updating - * - * @param array - * @param string - * @param boolean - * @return object - */ - public function set_update_batch($key, $index = '', $escape = TRUE) - { - $key = $this->_object_to_array_batch($key); - - if ( ! is_array($key)) - { - // @todo error - } - - foreach ($key as $k => $v) - { - $index_set = FALSE; - $clean = array(); - - foreach ($v as $k2 => $v2) - { - if ($k2 == $index) - { - $index_set = TRUE; - } - else - { - $not[] = $k2.'-'.$v2; - } - - if ($escape === FALSE) - { - $clean[$this->_protect_identifiers($k2)] = $v2; - } - else - { - $clean[$this->_protect_identifiers($k2)] = $this->escape($v2); - } - } - - if ($index_set == FALSE) - { - return $this->display_error('db_batch_missing_index'); - } - - $this->ar_set[] = $clean; - } - - return $this; - } - - // -------------------------------------------------------------------- - - /** - * Empty Table - * - * Compiles a delete string and runs "DELETE FROM table" - * - * @param string the table to empty - * @return object - */ - public function empty_table($table = '') - { - if ($table == '') - { - if ( ! isset($this->ar_from[0])) - { - if ($this->db_debug) - { - return $this->display_error('db_must_set_table'); - } - return FALSE; - } - - $table = $this->ar_from[0]; - } - else - { - $table = $this->_protect_identifiers($table, TRUE, NULL, FALSE); - } - - $sql = $this->_delete($table); - - $this->_reset_write(); - - return $this->query($sql); - } - - // -------------------------------------------------------------------- - - /** - * Truncate - * - * Compiles a truncate string and runs the query - * If the database does not support the truncate() command - * This function maps to "DELETE FROM table" - * - * @param string the table to truncate - * @return object - */ - public function truncate($table = '') - { - if ($table == '') - { - if ( ! isset($this->ar_from[0])) - { - if ($this->db_debug) - { - return $this->display_error('db_must_set_table'); - } - return FALSE; - } - - $table = $this->ar_from[0]; - } - else - { - $table = $this->_protect_identifiers($table, TRUE, NULL, FALSE); - } - - $sql = $this->_truncate($table); - - $this->_reset_write(); - - return $this->query($sql); - } - - // -------------------------------------------------------------------- - - /** - * Delete - * - * Compiles a delete string and runs the query - * - * @param mixed the table(s) to delete from. String or array - * @param mixed the where clause - * @param mixed the limit clause - * @param boolean - * @return object - */ - public function delete($table = '', $where = '', $limit = NULL, $reset_data = TRUE) - { - // Combine any cached components with the current statements - $this->_merge_cache(); - - if ($table == '') - { - if ( ! isset($this->ar_from[0])) - { - if ($this->db_debug) - { - return $this->display_error('db_must_set_table'); - } - return FALSE; - } - - $table = $this->ar_from[0]; - } - elseif (is_array($table)) - { - foreach ($table as $single_table) - { - $this->delete($single_table, $where, $limit, FALSE); - } - - $this->_reset_write(); - return; - } - else - { - $table = $this->_protect_identifiers($table, TRUE, NULL, FALSE); - } - - if ($where != '') - { - $this->where($where); - } - - if ($limit != NULL) - { - $this->limit($limit); - } - - if (count($this->ar_where) == 0 && count($this->ar_wherein) == 0 && count($this->ar_like) == 0) - { - if ($this->db_debug) - { - return $this->display_error('db_del_must_use_where'); - } - - return FALSE; - } - - $sql = $this->_delete($table, $this->ar_where, $this->ar_like, $this->ar_limit); - - if ($reset_data) - { - $this->_reset_write(); - } - - return $this->query($sql); - } - - // -------------------------------------------------------------------- - - /** - * DB Prefix - * - * Prepends a database prefix if one exists in configuration - * - * @param string the table - * @return string - */ - public function dbprefix($table = '') - { - if ($table == '') - { - $this->display_error('db_table_name_required'); - } - - return $this->dbprefix.$table; - } - - // -------------------------------------------------------------------- - - /** - * Set DB Prefix - * - * Set's the DB Prefix to something new without needing to reconnect - * - * @param string the prefix - * @return string - */ - public function set_dbprefix($prefix = '') - { - return $this->dbprefix = $prefix; - } - - // -------------------------------------------------------------------- - - /** - * Track Aliases - * - * Used to track SQL statements written with aliased tables. - * - * @param string The table to inspect - * @return string - */ - protected function _track_aliases($table) - { - if (is_array($table)) - { - foreach ($table as $t) - { - $this->_track_aliases($t); - } - return; - } - - // Does the string contain a comma? If so, we need to separate - // the string into discreet statements - if (strpos($table, ',') !== FALSE) - { - return $this->_track_aliases(explode(',', $table)); - } - - // if a table alias is used we can recognize it by a space - if (strpos($table, " ") !== FALSE) - { - // if the alias is written with the AS keyword, remove it - $table = preg_replace('/\s+AS\s+/i', ' ', $table); - - // Grab the alias - $table = trim(strrchr($table, " ")); - - // Store the alias, if it doesn't already exist - if ( ! in_array($table, $this->ar_aliased_tables)) - { - $this->ar_aliased_tables[] = $table; - } - } - } - - // -------------------------------------------------------------------- - - /** - * Compile the SELECT statement - * - * Generates a query string based on which functions were used. - * Should not be called directly. The get() function calls it. - * - * @return string - */ - protected function _compile_select($select_override = FALSE) - { - // Combine any cached components with the current statements - $this->_merge_cache(); - - // ---------------------------------------------------------------- - - // Write the "select" portion of the query - - if ($select_override !== FALSE) - { - $sql = $select_override; - } - else - { - $sql = ( ! $this->ar_distinct) ? 'SELECT ' : 'SELECT DISTINCT '; - - if (count($this->ar_select) == 0) - { - $sql .= '*'; - } - else - { - // Cycle through the "select" portion of the query and prep each column name. - // The reason we protect identifiers here rather then in the select() function - // is because until the user calls the from() function we don't know if there are aliases - foreach ($this->ar_select as $key => $val) - { - $no_escape = isset($this->ar_no_escape[$key]) ? $this->ar_no_escape[$key] : NULL; - $this->ar_select[$key] = $this->_protect_identifiers($val, FALSE, $no_escape); - } - - $sql .= implode(', ', $this->ar_select); - } - } - - // ---------------------------------------------------------------- - - // Write the "FROM" portion of the query - - if (count($this->ar_from) > 0) - { - $sql .= "\nFROM "; - - $sql .= $this->_from_tables($this->ar_from); - } - - // ---------------------------------------------------------------- - - // Write the "JOIN" portion of the query - - if (count($this->ar_join) > 0) - { - $sql .= "\n"; - - $sql .= implode("\n", $this->ar_join); - } - - // ---------------------------------------------------------------- - - // Write the "WHERE" portion of the query - - if (count($this->ar_where) > 0 OR count($this->ar_like) > 0) - { - $sql .= "\nWHERE "; - } - - $sql .= implode("\n", $this->ar_where); - - // ---------------------------------------------------------------- - - // Write the "LIKE" portion of the query - - if (count($this->ar_like) > 0) - { - if (count($this->ar_where) > 0) - { - $sql .= "\nAND "; - } - - $sql .= implode("\n", $this->ar_like); - } - - // ---------------------------------------------------------------- - - // Write the "GROUP BY" portion of the query - - if (count($this->ar_groupby) > 0) - { - $sql .= "\nGROUP BY "; - - $sql .= implode(', ', $this->ar_groupby); - } - - // ---------------------------------------------------------------- - - // Write the "HAVING" portion of the query - - if (count($this->ar_having) > 0) - { - $sql .= "\nHAVING "; - $sql .= implode("\n", $this->ar_having); - } - - // ---------------------------------------------------------------- - - // Write the "ORDER BY" portion of the query - - if (count($this->ar_orderby) > 0) - { - $sql .= "\nORDER BY "; - $sql .= implode(', ', $this->ar_orderby); - - if ($this->ar_order !== FALSE) - { - $sql .= ($this->ar_order == 'desc') ? ' DESC' : ' ASC'; - } - } - - // ---------------------------------------------------------------- - - // Write the "LIMIT" portion of the query - - if (is_numeric($this->ar_limit)) - { - $sql .= "\n"; - $sql = $this->_limit($sql, $this->ar_limit, $this->ar_offset); - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Object to Array - * - * Takes an object as input and converts the class variables to array key/vals - * - * @param object - * @return array - */ - public function _object_to_array($object) - { - if ( ! is_object($object)) - { - return $object; - } - - $array = array(); - foreach (get_object_vars($object) as $key => $val) - { - // There are some built in keys we need to ignore for this conversion - if ( ! is_object($val) && ! is_array($val) && $key != '_parent_name') - { - $array[$key] = $val; - } - } - - return $array; - } - - // -------------------------------------------------------------------- - - /** - * Object to Array - * - * Takes an object as input and converts the class variables to array key/vals - * - * @param object - * @return array - */ - public function _object_to_array_batch($object) - { - if ( ! is_object($object)) - { - return $object; - } - - $array = array(); - $out = get_object_vars($object); - $fields = array_keys($out); - - foreach ($fields as $val) - { - // There are some built in keys we need to ignore for this conversion - if ($val != '_parent_name') - { - - $i = 0; - foreach ($out[$val] as $data) - { - $array[$i][$val] = $data; - $i++; - } - } - } - - return $array; - } - - // -------------------------------------------------------------------- - - /** - * Start Cache - * - * Starts AR caching - * - * @return void - */ - public function start_cache() - { - $this->ar_caching = TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Stop Cache - * - * Stops AR caching - * - * @return void - */ - public function stop_cache() - { - $this->ar_caching = FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Flush Cache - * - * Empties the AR cache - * - * @access public - * @return void - */ - public function flush_cache() - { - $this->_reset_run(array( - 'ar_cache_select' => array(), - 'ar_cache_from' => array(), - 'ar_cache_join' => array(), - 'ar_cache_where' => array(), - 'ar_cache_like' => array(), - 'ar_cache_groupby' => array(), - 'ar_cache_having' => array(), - 'ar_cache_orderby' => array(), - 'ar_cache_set' => array(), - 'ar_cache_exists' => array(), - 'ar_cache_no_escape' => array() - )); - } - - // -------------------------------------------------------------------- - - /** - * Merge Cache - * - * When called, this function merges any cached AR arrays with - * locally called ones. - * - * @return void - */ - protected function _merge_cache() - { - if (count($this->ar_cache_exists) == 0) - { - return; - } - - foreach ($this->ar_cache_exists as $val) - { - $ar_variable = 'ar_'.$val; - $ar_cache_var = 'ar_cache_'.$val; - - if (count($this->$ar_cache_var) == 0) - { - continue; - } - - $this->$ar_variable = array_unique(array_merge($this->$ar_cache_var, $this->$ar_variable)); - } - - // If we are "protecting identifiers" we need to examine the "from" - // portion of the query to determine if there are any aliases - if ($this->_protect_identifiers === TRUE AND count($this->ar_cache_from) > 0) - { - $this->_track_aliases($this->ar_from); - } - - $this->ar_no_escape = $this->ar_cache_no_escape; - } - - // -------------------------------------------------------------------- - - /** - * Resets the active record values. Called by the get() function - * - * @param array An array of fields to reset - * @return void - */ - protected function _reset_run($ar_reset_items) - { - foreach ($ar_reset_items as $item => $default_value) - { - if ( ! in_array($item, $this->ar_store_array)) - { - $this->$item = $default_value; - } - } - } - - // -------------------------------------------------------------------- - - /** - * Resets the active record values. Called by the get() function - * - * @return void - */ - protected function _reset_select() - { - $ar_reset_items = array( - 'ar_select' => array(), - 'ar_from' => array(), - 'ar_join' => array(), - 'ar_where' => array(), - 'ar_like' => array(), - 'ar_groupby' => array(), - 'ar_having' => array(), - 'ar_orderby' => array(), - 'ar_wherein' => array(), - 'ar_aliased_tables' => array(), - 'ar_no_escape' => array(), - 'ar_distinct' => FALSE, - 'ar_limit' => FALSE, - 'ar_offset' => FALSE, - 'ar_order' => FALSE, - ); - - $this->_reset_run($ar_reset_items); - } - - // -------------------------------------------------------------------- - - /** - * Resets the active record "write" values. - * - * Called by the insert() update() insert_batch() update_batch() and delete() functions - * - * @return void - */ - protected function _reset_write() - { - $ar_reset_items = array( - 'ar_set' => array(), - 'ar_from' => array(), - 'ar_where' => array(), - 'ar_like' => array(), - 'ar_orderby' => array(), - 'ar_keys' => array(), - 'ar_limit' => FALSE, - 'ar_order' => FALSE - ); - - $this->_reset_run($ar_reset_items); - } -} - -/* End of file DB_active_rec.php */ -/* Location: ./system/database/DB_active_rec.php */ \ No newline at end of file diff --git a/donjo-sys/database/DB_cache.php b/donjo-sys/database/DB_cache.php deleted file mode 100644 index 4551c1e61..000000000 --- a/donjo-sys/database/DB_cache.php +++ /dev/null @@ -1,196 +0,0 @@ -CI - // and load the file helper since we use it a lot - $this->CI =& get_instance(); - $this->db =& $db; - $this->CI->load->helper('file'); - } - - // -------------------------------------------------------------------- - - /** - * Set Cache Directory Path - * - * @access public - * @param string the path to the cache directory - * @return bool - */ - function check_path($path = '') - { - if ($path == '') - { - if ($this->db->cachedir == '') - { - return $this->db->cache_off(); - } - - $path = $this->db->cachedir; - } - - // Add a trailing slash to the path if needed - $path = preg_replace("/(.+?)\/*$/", "\\1/", $path); - - if ( ! is_dir($path) OR ! is_really_writable($path)) - { - // If the path is wrong we'll turn off caching - return $this->db->cache_off(); - } - - $this->db->cachedir = $path; - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Retrieve a cached query - * - * The URI being requested will become the name of the cache sub-folder. - * An MD5 hash of the SQL statement will become the cache file name - * - * @access public - * @return string - */ - function read($sql) - { - if ( ! $this->check_path()) - { - return $this->db->cache_off(); - } - - $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1); - - $segment_two = ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2); - - $filepath = $this->db->cachedir.$segment_one.'+'.$segment_two.'/'.md5($sql); - - if (FALSE === ($cachedata = read_file($filepath))) - { - return FALSE; - } - - return unserialize($cachedata); - } - - // -------------------------------------------------------------------- - - /** - * Write a query to a cache file - * - * @access public - * @return bool - */ - function write($sql, $object) - { - if ( ! $this->check_path()) - { - return $this->db->cache_off(); - } - - $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1); - - $segment_two = ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2); - - $dir_path = $this->db->cachedir.$segment_one.'+'.$segment_two.'/'; - - $filename = md5($sql); - - if ( ! @is_dir($dir_path)) - { - if ( ! @mkdir($dir_path, DIR_WRITE_MODE)) - { - return FALSE; - } - - @chmod($dir_path, DIR_WRITE_MODE); - } - - if (write_file($dir_path.$filename, serialize($object)) === FALSE) - { - return FALSE; - } - - @chmod($dir_path.$filename, FILE_WRITE_MODE); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Delete cache files within a particular directory - * - * @access public - * @return bool - */ - function delete($segment_one = '', $segment_two = '') - { - if ($segment_one == '') - { - $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1); - } - - if ($segment_two == '') - { - $segment_two = ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2); - } - - $dir_path = $this->db->cachedir.$segment_one.'+'.$segment_two.'/'; - - delete_files($dir_path, TRUE); - } - - // -------------------------------------------------------------------- - - /** - * Delete all existing cache files - * - * @access public - * @return bool - */ - function delete_all() - { - delete_files($this->db->cachedir, TRUE); - } - -} - - -/* End of file DB_cache.php */ -/* Location: ./system/database/DB_cache.php */ \ No newline at end of file diff --git a/donjo-sys/database/DB_driver.php b/donjo-sys/database/DB_driver.php deleted file mode 100644 index b6c1e34be..000000000 --- a/donjo-sys/database/DB_driver.php +++ /dev/null @@ -1,1411 +0,0 @@ - $val) - { - $this->$key = $val; - } - } - - log_message('debug', 'Database Driver Class Initialized'); - } - - // -------------------------------------------------------------------- - - /** - * Initialize Database Settings - * - * @access private Called by the constructor - * @param mixed - * @return void - */ - function initialize() - { - // If an existing connection resource is available - // there is no need to connect and select the database - if (is_resource($this->conn_id) OR is_object($this->conn_id)) - { - return TRUE; - } - - // ---------------------------------------------------------------- - - // Connect to the database and set the connection ID - $this->conn_id = ($this->pconnect == FALSE) ? $this->db_connect() : $this->db_pconnect(); - - // No connection resource? Throw an error - if ( ! $this->conn_id) - { - log_message('error', 'Unable to connect to the database'); - - if ($this->db_debug) - { - $this->display_error('db_unable_to_connect'); - } - return FALSE; - } - - // ---------------------------------------------------------------- - - // Select the DB... assuming a database name is specified in the config file - if ($this->database != '') - { - if ( ! $this->db_select()) - { - log_message('error', 'Unable to select database: '.$this->database); - - if ($this->db_debug) - { - $this->display_error('db_unable_to_select', $this->database); - } - return FALSE; - } - else - { - // We've selected the DB. Now we set the character set - if ( ! $this->db_set_charset($this->char_set, $this->dbcollat)) - { - return FALSE; - } - - return TRUE; - } - } - - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Set client character set - * - * @access public - * @param string - * @param string - * @return resource - */ - function db_set_charset($charset, $collation) - { - if ( ! $this->_db_set_charset($this->char_set, $this->dbcollat)) - { - log_message('error', 'Unable to set database connection charset: '.$this->char_set); - - if ($this->db_debug) - { - $this->display_error('db_unable_to_set_charset', $this->char_set); - } - - return FALSE; - } - - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * The name of the platform in use (mysql, mssql, etc...) - * - * @access public - * @return string - */ - function platform() - { - return $this->dbdriver; - } - - // -------------------------------------------------------------------- - - /** - * Database Version Number. Returns a string containing the - * version of the database being used - * - * @access public - * @return string - */ - function version() - { - if (FALSE === ($sql = $this->_version())) - { - if ($this->db_debug) - { - return $this->display_error('db_unsupported_function'); - } - return FALSE; - } - - // Some DBs have functions that return the version, and don't run special - // SQL queries per se. In these instances, just return the result. - $driver_version_exceptions = array('oci8', 'sqlite', 'cubrid'); - - if (in_array($this->dbdriver, $driver_version_exceptions)) - { - return $sql; - } - else - { - $query = $this->query($sql); - return $query->row('ver'); - } - } - - // -------------------------------------------------------------------- - - /** - * Execute the query - * - * Accepts an SQL string as input and returns a result object upon - * successful execution of a "read" type query. Returns boolean TRUE - * upon successful execution of a "write" type query. Returns boolean - * FALSE upon failure, and if the $db_debug variable is set to TRUE - * will raise an error. - * - * @access public - * @param string An SQL query string - * @param array An array of binding data - * @return mixed - */ - function query($sql, $binds = FALSE, $return_object = TRUE) - { - if ($sql == '') - { - if ($this->db_debug) - { - log_message('error', 'Invalid query: '.$sql); - return $this->display_error('db_invalid_query'); - } - return FALSE; - } - - // Verify table prefix and replace if necessary - if ( ($this->dbprefix != '' AND $this->swap_pre != '') AND ($this->dbprefix != $this->swap_pre) ) - { - $sql = preg_replace("/(\W)".$this->swap_pre."(\S+?)/", "\\1".$this->dbprefix."\\2", $sql); - } - - // Compile binds if needed - if ($binds !== FALSE) - { - $sql = $this->compile_binds($sql, $binds); - } - - // Is query caching enabled? If the query is a "read type" - // we will load the caching class and return the previously - // cached query if it exists - if ($this->cache_on == TRUE AND stristr($sql, 'SELECT')) - { - if ($this->_cache_init()) - { - $this->load_rdriver(); - if (FALSE !== ($cache = $this->CACHE->read($sql))) - { - return $cache; - } - } - } - - // Save the query for debugging - if ($this->save_queries == TRUE) - { - $this->queries[] = $sql; - } - - // Start the Query Timer - $time_start = list($sm, $ss) = explode(' ', microtime()); - - // Run the Query - if (FALSE === ($this->result_id = $this->simple_query($sql))) - { - if ($this->save_queries == TRUE) - { - $this->query_times[] = 0; - } - - // This will trigger a rollback if transactions are being used - $this->_trans_status = FALSE; - - if ($this->db_debug) - { - // grab the error number and message now, as we might run some - // additional queries before displaying the error - $error_no = $this->_error_number(); - $error_msg = $this->_error_message(); - - // We call this function in order to roll-back queries - // if transactions are enabled. If we don't call this here - // the error message will trigger an exit, causing the - // transactions to remain in limbo. - $this->trans_complete(); - - // Log and display errors - log_message('error', 'Query error: '.$error_msg); - return $this->display_error( - array( - 'Error Number: '.$error_no, - $error_msg, - $sql - ) - ); - } - - return FALSE; - } - - // Stop and aggregate the query time results - $time_end = list($em, $es) = explode(' ', microtime()); - $this->benchmark += ($em + $es) - ($sm + $ss); - - if ($this->save_queries == TRUE) - { - $this->query_times[] = ($em + $es) - ($sm + $ss); - } - - // Increment the query counter - $this->query_count++; - - // Was the query a "write" type? - // If so we'll simply return true - if ($this->is_write_type($sql) === TRUE) - { - // If caching is enabled we'll auto-cleanup any - // existing files related to this particular URI - if ($this->cache_on == TRUE AND $this->cache_autodel == TRUE AND $this->_cache_init()) - { - $this->CACHE->delete(); - } - - return TRUE; - } - - // Return TRUE if we don't need to create a result object - // Currently only the Oracle driver uses this when stored - // procedures are used - if ($return_object !== TRUE) - { - return TRUE; - } - - // Load and instantiate the result driver - - $driver = $this->load_rdriver(); - $RES = new $driver(); - $RES->conn_id = $this->conn_id; - $RES->result_id = $this->result_id; - - if ($this->dbdriver == 'oci8') - { - $RES->stmt_id = $this->stmt_id; - $RES->curs_id = NULL; - $RES->limit_used = $this->limit_used; - $this->stmt_id = FALSE; - } - - // oci8 vars must be set before calling this - $RES->num_rows = $RES->num_rows(); - - // Is query caching enabled? If so, we'll serialize the - // result object and save it to a cache file. - if ($this->cache_on == TRUE AND $this->_cache_init()) - { - // We'll create a new instance of the result object - // only without the platform specific driver since - // we can't use it with cached data (the query result - // resource ID won't be any good once we've cached the - // result object, so we'll have to compile the data - // and save it) - $CR = new CI_DB_result(); - $CR->num_rows = $RES->num_rows(); - $CR->result_object = $RES->result_object(); - $CR->result_array = $RES->result_array(); - - // Reset these since cached objects can not utilize resource IDs. - $CR->conn_id = NULL; - $CR->result_id = NULL; - - $this->CACHE->write($sql, $CR); - } - - return $RES; - } - - // -------------------------------------------------------------------- - - /** - * Load the result drivers - * - * @access public - * @return string the name of the result class - */ - function load_rdriver() - { - $driver = 'CI_DB_'.$this->dbdriver.'_result'; - - if ( ! class_exists($driver)) - { - include_once(BASEPATH.'database/DB_result.php'); - include_once(BASEPATH.'database/drivers/'.$this->dbdriver.'/'.$this->dbdriver.'_result.php'); - } - - return $driver; - } - - // -------------------------------------------------------------------- - - /** - * Simple Query - * This is a simplified version of the query() function. Internally - * we only use it when running transaction commands since they do - * not require all the features of the main query() function. - * - * @access public - * @param string the sql query - * @return mixed - */ - function simple_query($sql) - { - if ( ! $this->conn_id) - { - $this->initialize(); - } - - return $this->_execute($sql); - } - - // -------------------------------------------------------------------- - - /** - * Disable Transactions - * This permits transactions to be disabled at run-time. - * - * @access public - * @return void - */ - function trans_off() - { - $this->trans_enabled = FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Enable/disable Transaction Strict Mode - * When strict mode is enabled, if you are running multiple groups of - * transactions, if one group fails all groups will be rolled back. - * If strict mode is disabled, each group is treated autonomously, meaning - * a failure of one group will not affect any others - * - * @access public - * @return void - */ - function trans_strict($mode = TRUE) - { - $this->trans_strict = is_bool($mode) ? $mode : TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Start Transaction - * - * @access public - * @return void - */ - function trans_start($test_mode = FALSE) - { - if ( ! $this->trans_enabled) - { - return FALSE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - $this->_trans_depth += 1; - return; - } - - $this->trans_begin($test_mode); - } - - // -------------------------------------------------------------------- - - /** - * Complete Transaction - * - * @access public - * @return bool - */ - function trans_complete() - { - if ( ! $this->trans_enabled) - { - return FALSE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 1) - { - $this->_trans_depth -= 1; - return TRUE; - } - - // The query() function will set this flag to FALSE in the event that a query failed - if ($this->_trans_status === FALSE) - { - $this->trans_rollback(); - - // If we are NOT running in strict mode, we will reset - // the _trans_status flag so that subsequent groups of transactions - // will be permitted. - if ($this->trans_strict === FALSE) - { - $this->_trans_status = TRUE; - } - - log_message('debug', 'DB Transaction Failure'); - return FALSE; - } - - $this->trans_commit(); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Lets you retrieve the transaction flag to determine if it has failed - * - * @access public - * @return bool - */ - function trans_status() - { - return $this->_trans_status; - } - - // -------------------------------------------------------------------- - - /** - * Compile Bindings - * - * @access public - * @param string the sql statement - * @param array an array of bind data - * @return string - */ - function compile_binds($sql, $binds) - { - if (strpos($sql, $this->bind_marker) === FALSE) - { - return $sql; - } - - if ( ! is_array($binds)) - { - $binds = array($binds); - } - - // Get the sql segments around the bind markers - $segments = explode($this->bind_marker, $sql); - - // The count of bind should be 1 less then the count of segments - // If there are more bind arguments trim it down - if (count($binds) >= count($segments)) { - $binds = array_slice($binds, 0, count($segments)-1); - } - - // Construct the binded query - $result = $segments[0]; - $i = 0; - foreach ($binds as $bind) - { - $result .= $this->escape($bind); - $result .= $segments[++$i]; - } - - return $result; - } - - // -------------------------------------------------------------------- - - /** - * Determines if a query is a "write" type. - * - * @access public - * @param string An SQL query string - * @return boolean - */ - function is_write_type($sql) - { - if ( ! preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD DATA|COPY|ALTER|GRANT|REVOKE|LOCK|UNLOCK)\s+/i', $sql)) - { - return FALSE; - } - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Calculate the aggregate query elapsed time - * - * @access public - * @param integer The number of decimal places - * @return integer - */ - function elapsed_time($decimals = 6) - { - return number_format($this->benchmark, $decimals); - } - - // -------------------------------------------------------------------- - - /** - * Returns the total number of queries - * - * @access public - * @return integer - */ - function total_queries() - { - return $this->query_count; - } - - // -------------------------------------------------------------------- - - /** - * Returns the last query that was executed - * - * @access public - * @return void - */ - function last_query() - { - return end($this->queries); - } - - // -------------------------------------------------------------------- - - /** - * "Smart" Escape String - * - * Escapes data based on type - * Sets boolean and null types - * - * @access public - * @param string - * @return mixed - */ - function escape($str) - { - if (is_string($str)) - { - $str = "'".$this->escape_str($str)."'"; - } - elseif (is_bool($str)) - { - $str = ($str === FALSE) ? 0 : 1; - } - elseif (is_null($str)) - { - $str = 'NULL'; - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Escape LIKE String - * - * Calls the individual driver for platform - * specific escaping for LIKE conditions - * - * @access public - * @param string - * @return mixed - */ - function escape_like_str($str) - { - return $this->escape_str($str, TRUE); - } - - // -------------------------------------------------------------------- - - /** - * Primary - * - * Retrieves the primary key. It assumes that the row in the first - * position is the primary key - * - * @access public - * @param string the table name - * @return string - */ - function primary($table = '') - { - $fields = $this->list_fields($table); - - if ( ! is_array($fields)) - { - return FALSE; - } - - return current($fields); - } - - // -------------------------------------------------------------------- - - /** - * Returns an array of table names - * - * @access public - * @return array - */ - function list_tables($constrain_by_prefix = FALSE) - { - // Is there a cached result? - if (isset($this->data_cache['table_names'])) - { - return $this->data_cache['table_names']; - } - - if (FALSE === ($sql = $this->_list_tables($constrain_by_prefix))) - { - if ($this->db_debug) - { - return $this->display_error('db_unsupported_function'); - } - return FALSE; - } - - $retval = array(); - $query = $this->query($sql); - - if ($query->num_rows() > 0) - { - foreach ($query->result_array() as $row) - { - if (isset($row['TABLE_NAME'])) - { - $retval[] = $row['TABLE_NAME']; - } - else - { - $retval[] = array_shift($row); - } - } - } - - $this->data_cache['table_names'] = $retval; - return $this->data_cache['table_names']; - } - - // -------------------------------------------------------------------- - - /** - * Determine if a particular table exists - * @access public - * @return boolean - */ - function table_exists($table_name) - { - return ( ! in_array($this->_protect_identifiers($table_name, TRUE, FALSE, FALSE), $this->list_tables())) ? FALSE : TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Fetch MySQL Field Names - * - * @access public - * @param string the table name - * @return array - */ - function list_fields($table = '') - { - // Is there a cached result? - if (isset($this->data_cache['field_names'][$table])) - { - return $this->data_cache['field_names'][$table]; - } - - if ($table == '') - { - if ($this->db_debug) - { - return $this->display_error('db_field_param_missing'); - } - return FALSE; - } - - if (FALSE === ($sql = $this->_list_columns($table))) - { - if ($this->db_debug) - { - return $this->display_error('db_unsupported_function'); - } - return FALSE; - } - - $query = $this->query($sql); - - $retval = array(); - foreach ($query->result_array() as $row) - { - if (isset($row['COLUMN_NAME'])) - { - $retval[] = $row['COLUMN_NAME']; - } - else - { - $retval[] = current($row); - } - } - - $this->data_cache['field_names'][$table] = $retval; - return $this->data_cache['field_names'][$table]; - } - - // -------------------------------------------------------------------- - - /** - * Determine if a particular field exists - * @access public - * @param string - * @param string - * @return boolean - */ - function field_exists($field_name, $table_name) - { - return ( ! in_array($field_name, $this->list_fields($table_name))) ? FALSE : TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Returns an object with field data - * - * @access public - * @param string the table name - * @return object - */ - function field_data($table = '') - { - if ($table == '') - { - if ($this->db_debug) - { - return $this->display_error('db_field_param_missing'); - } - return FALSE; - } - - $query = $this->query($this->_field_data($this->_protect_identifiers($table, TRUE, NULL, FALSE))); - - return $query->field_data(); - } - - // -------------------------------------------------------------------- - - /** - * Generate an insert string - * - * @access public - * @param string the table upon which the query will be performed - * @param array an associative array data of key/values - * @return string - */ - function insert_string($table, $data) - { - $fields = array(); - $values = array(); - - foreach ($data as $key => $val) - { - $fields[] = $this->_escape_identifiers($key); - $values[] = $this->escape($val); - } - - return $this->_insert($this->_protect_identifiers($table, TRUE, NULL, FALSE), $fields, $values); - } - - // -------------------------------------------------------------------- - - /** - * Generate an update string - * - * @access public - * @param string the table upon which the query will be performed - * @param array an associative array data of key/values - * @param mixed the "where" statement - * @return string - */ - function update_string($table, $data, $where) - { - if ($where == '') - { - return false; - } - - $fields = array(); - foreach ($data as $key => $val) - { - $fields[$this->_protect_identifiers($key)] = $this->escape($val); - } - - if ( ! is_array($where)) - { - $dest = array($where); - } - else - { - $dest = array(); - foreach ($where as $key => $val) - { - $prefix = (count($dest) == 0) ? '' : ' AND '; - - if ($val !== '') - { - if ( ! $this->_has_operator($key)) - { - $key .= ' ='; - } - - $val = ' '.$this->escape($val); - } - - $dest[] = $prefix.$key.$val; - } - } - - return $this->_update($this->_protect_identifiers($table, TRUE, NULL, FALSE), $fields, $dest); - } - - // -------------------------------------------------------------------- - - /** - * Tests whether the string has an SQL operator - * - * @access private - * @param string - * @return bool - */ - function _has_operator($str) - { - $str = trim($str); - if ( ! preg_match("/(\s|<|>|!|=|is null|is not null)/i", $str)) - { - return FALSE; - } - - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Enables a native PHP function to be run, using a platform agnostic wrapper. - * - * @access public - * @param string the function name - * @param mixed any parameters needed by the function - * @return mixed - */ - function call_function($function) - { - $driver = ($this->dbdriver == 'postgre') ? 'pg_' : $this->dbdriver.'_'; - - if (FALSE === strpos($driver, $function)) - { - $function = $driver.$function; - } - - if ( ! function_exists($function)) - { - if ($this->db_debug) - { - return $this->display_error('db_unsupported_function'); - } - return FALSE; - } - else - { - $args = (func_num_args() > 1) ? array_splice(func_get_args(), 1) : null; - if (is_null($args)) - { - return call_user_func($function); - } - else - { - return call_user_func_array($function, $args); - } - } - } - - // -------------------------------------------------------------------- - - /** - * Set Cache Directory Path - * - * @access public - * @param string the path to the cache directory - * @return void - */ - function cache_set_path($path = '') - { - $this->cachedir = $path; - } - - // -------------------------------------------------------------------- - - /** - * Enable Query Caching - * - * @access public - * @return void - */ - function cache_on() - { - $this->cache_on = TRUE; - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Disable Query Caching - * - * @access public - * @return void - */ - function cache_off() - { - $this->cache_on = FALSE; - return FALSE; - } - - - // -------------------------------------------------------------------- - - /** - * Delete the cache files associated with a particular URI - * - * @access public - * @return void - */ - function cache_delete($segment_one = '', $segment_two = '') - { - if ( ! $this->_cache_init()) - { - return FALSE; - } - return $this->CACHE->delete($segment_one, $segment_two); - } - - // -------------------------------------------------------------------- - - /** - * Delete All cache files - * - * @access public - * @return void - */ - function cache_delete_all() - { - if ( ! $this->_cache_init()) - { - return FALSE; - } - - return $this->CACHE->delete_all(); - } - - // -------------------------------------------------------------------- - - /** - * Initialize the Cache Class - * - * @access private - * @return void - */ - function _cache_init() - { - if (is_object($this->CACHE) AND class_exists('CI_DB_Cache')) - { - return TRUE; - } - - if ( ! class_exists('CI_DB_Cache')) - { - if ( ! @include(BASEPATH.'database/DB_cache.php')) - { - return $this->cache_off(); - } - } - - $this->CACHE = new CI_DB_Cache($this); // pass db object to support multiple db connections and returned db objects - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Close DB Connection - * - * @access public - * @return void - */ - function close() - { - if (is_resource($this->conn_id) OR is_object($this->conn_id)) - { - $this->_close($this->conn_id); - } - $this->conn_id = FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Display an error message - * - * @access public - * @param string the error message - * @param string any "swap" values - * @param boolean whether to localize the message - * @return string sends the application/error_db.php template - */ - function display_error($error = '', $swap = '', $native = FALSE) - { - $LANG =& load_class('Lang', 'core'); - $LANG->load('db'); - - $heading = $LANG->line('db_error_heading'); - - if ($native == TRUE) - { - $message = $error; - } - else - { - $message = ( ! is_array($error)) ? array(str_replace('%s', $swap, $LANG->line($error))) : $error; - } - - // Find the most likely culprit of the error by going through - // the backtrace until the source file is no longer in the - // database folder. - - $trace = debug_backtrace(); - - foreach ($trace as $call) - { - if (isset($call['file']) && strpos($call['file'], BASEPATH.'database') === FALSE) - { - // Found it - use a relative path for safety - $message[] = 'Filename: '.str_replace(array(BASEPATH, APPPATH), '', $call['file']); - $message[] = 'Line Number: '.$call['line']; - - break; - } - } - - $error =& load_class('Exceptions', 'core'); - echo $error->show_error($heading, $message, 'error_db'); - exit; - } - - // -------------------------------------------------------------------- - - /** - * Protect Identifiers - * - * This function adds backticks if appropriate based on db type - * - * @access private - * @param mixed the item to escape - * @return mixed the item with backticks - */ - function protect_identifiers($item, $prefix_single = FALSE) - { - return $this->_protect_identifiers($item, $prefix_single); - } - - // -------------------------------------------------------------------- - - /** - * Protect Identifiers - * - * This function is used extensively by the Active Record class, and by - * a couple functions in this class. - * It takes a column or table name (optionally with an alias) and inserts - * the table prefix onto it. Some logic is necessary in order to deal with - * column names that include the path. Consider a query like this: - * - * SELECT * FROM hostname.database.table.column AS c FROM hostname.database.table - * - * Or a query with aliasing: - * - * SELECT m.member_id, m.member_name FROM members AS m - * - * Since the column name can include up to four segments (host, DB, table, column) - * or also have an alias prefix, we need to do a bit of work to figure this out and - * insert the table prefix (if it exists) in the proper position, and escape only - * the correct identifiers. - * - * @access private - * @param string - * @param bool - * @param mixed - * @param bool - * @return string - */ - function _protect_identifiers($item, $prefix_single = FALSE, $protect_identifiers = NULL, $field_exists = TRUE) - { - if ( ! is_bool($protect_identifiers)) - { - $protect_identifiers = $this->_protect_identifiers; - } - - if (is_array($item)) - { - $escaped_array = array(); - - foreach ($item as $k => $v) - { - $escaped_array[$this->_protect_identifiers($k)] = $this->_protect_identifiers($v); - } - - return $escaped_array; - } - - // Convert tabs or multiple spaces into single spaces - $item = preg_replace('/[\t ]+/', ' ', $item); - - // If the item has an alias declaration we remove it and set it aside. - // Basically we remove everything to the right of the first space - if (strpos($item, ' ') !== FALSE) - { - $alias = strstr($item, ' '); - $item = substr($item, 0, - strlen($alias)); - } - else - { - $alias = ''; - } - - // This is basically a bug fix for queries that use MAX, MIN, etc. - // If a parenthesis is found we know that we do not need to - // escape the data or add a prefix. There's probably a more graceful - // way to deal with this, but I'm not thinking of it -- Rick - if (strpos($item, '(') !== FALSE) - { - return $item.$alias; - } - - // Break the string apart if it contains periods, then insert the table prefix - // in the correct location, assuming the period doesn't indicate that we're dealing - // with an alias. While we're at it, we will escape the components - if (strpos($item, '.') !== FALSE) - { - $parts = explode('.', $item); - - // Does the first segment of the exploded item match - // one of the aliases previously identified? If so, - // we have nothing more to do other than escape the item - if (in_array($parts[0], $this->ar_aliased_tables)) - { - if ($protect_identifiers === TRUE) - { - foreach ($parts as $key => $val) - { - if ( ! in_array($val, $this->_reserved_identifiers)) - { - $parts[$key] = $this->_escape_identifiers($val); - } - } - - $item = implode('.', $parts); - } - return $item.$alias; - } - - // Is there a table prefix defined in the config file? If not, no need to do anything - if ($this->dbprefix != '') - { - // We now add the table prefix based on some logic. - // Do we have 4 segments (hostname.database.table.column)? - // If so, we add the table prefix to the column name in the 3rd segment. - if (isset($parts[3])) - { - $i = 2; - } - // Do we have 3 segments (database.table.column)? - // If so, we add the table prefix to the column name in 2nd position - elseif (isset($parts[2])) - { - $i = 1; - } - // Do we have 2 segments (table.column)? - // If so, we add the table prefix to the column name in 1st segment - else - { - $i = 0; - } - - // This flag is set when the supplied $item does not contain a field name. - // This can happen when this function is being called from a JOIN. - if ($field_exists == FALSE) - { - $i++; - } - - // Verify table prefix and replace if necessary - if ($this->swap_pre != '' && strncmp($parts[$i], $this->swap_pre, strlen($this->swap_pre)) === 0) - { - $parts[$i] = preg_replace("/^".$this->swap_pre."(\S+?)/", $this->dbprefix."\\1", $parts[$i]); - } - - // We only add the table prefix if it does not already exist - if (substr($parts[$i], 0, strlen($this->dbprefix)) != $this->dbprefix) - { - $parts[$i] = $this->dbprefix.$parts[$i]; - } - - // Put the parts back together - $item = implode('.', $parts); - } - - if ($protect_identifiers === TRUE) - { - $item = $this->_escape_identifiers($item); - } - - return $item.$alias; - } - - // Is there a table prefix? If not, no need to insert it - if ($this->dbprefix != '') - { - // Verify table prefix and replace if necessary - if ($this->swap_pre != '' && strncmp($item, $this->swap_pre, strlen($this->swap_pre)) === 0) - { - $item = preg_replace("/^".$this->swap_pre."(\S+?)/", $this->dbprefix."\\1", $item); - } - - // Do we prefix an item with no segments? - if ($prefix_single == TRUE AND substr($item, 0, strlen($this->dbprefix)) != $this->dbprefix) - { - $item = $this->dbprefix.$item; - } - } - - if ($protect_identifiers === TRUE AND ! in_array($item, $this->_reserved_identifiers)) - { - $item = $this->_escape_identifiers($item); - } - - return $item.$alias; - } - - // -------------------------------------------------------------------- - - /** - * Dummy method that allows Active Record class to be disabled - * - * This function is used extensively by every db driver. - * - * @return void - */ - protected function _reset_select() - { - } - -} - -/* End of file DB_driver.php */ -/* Location: ./system/database/DB_driver.php */ \ No newline at end of file diff --git a/donjo-sys/database/DB_forge.php b/donjo-sys/database/DB_forge.php deleted file mode 100644 index cf63ee1e9..000000000 --- a/donjo-sys/database/DB_forge.php +++ /dev/null @@ -1,383 +0,0 @@ -db - $CI =& get_instance(); - $this->db =& $CI->db; - log_message('debug', "Database Forge Class Initialized"); - } - - // -------------------------------------------------------------------- - - /** - * Create database - * - * @access public - * @param string the database name - * @return bool - */ - function create_database($db_name) - { - $sql = $this->_create_database($db_name); - - if (is_bool($sql)) - { - return $sql; - } - - return $this->db->query($sql); - } - - // -------------------------------------------------------------------- - - /** - * Drop database - * - * @access public - * @param string the database name - * @return bool - */ - function drop_database($db_name) - { - $sql = $this->_drop_database($db_name); - - if (is_bool($sql)) - { - return $sql; - } - - return $this->db->query($sql); - } - - // -------------------------------------------------------------------- - - /** - * Add Key - * - * @access public - * @param string key - * @param string type - * @return void - */ - function add_key($key = '', $primary = FALSE) - { - if (is_array($key)) - { - foreach ($key as $one) - { - $this->add_key($one, $primary); - } - - return; - } - - if ($key == '') - { - show_error('Key information is required for that operation.'); - } - - if ($primary === TRUE) - { - $this->primary_keys[] = $key; - } - else - { - $this->keys[] = $key; - } - } - - // -------------------------------------------------------------------- - - /** - * Add Field - * - * @access public - * @param string collation - * @return void - */ - function add_field($field = '') - { - if ($field == '') - { - show_error('Field information is required.'); - } - - if (is_string($field)) - { - if ($field == 'id') - { - $this->add_field(array( - 'id' => array( - 'type' => 'INT', - 'constraint' => 9, - 'auto_increment' => TRUE - ) - )); - $this->add_key('id', TRUE); - } - else - { - if (strpos($field, ' ') === FALSE) - { - show_error('Field information is required for that operation.'); - } - - $this->fields[] = $field; - } - } - - if (is_array($field)) - { - $this->fields = array_merge($this->fields, $field); - } - - } - - // -------------------------------------------------------------------- - - /** - * Create Table - * - * @access public - * @param string the table name - * @return bool - */ - function create_table($table = '', $if_not_exists = FALSE) - { - if ($table == '') - { - show_error('A table name is required for that operation.'); - } - - if (count($this->fields) == 0) - { - show_error('Field information is required.'); - } - - $sql = $this->_create_table($this->db->dbprefix.$table, $this->fields, $this->primary_keys, $this->keys, $if_not_exists); - - $this->_reset(); - return $this->db->query($sql); - } - - // -------------------------------------------------------------------- - - /** - * Drop Table - * - * @access public - * @param string the table name - * @return bool - */ - function drop_table($table_name) - { - $sql = $this->_drop_table($this->db->dbprefix.$table_name); - - if (is_bool($sql)) - { - return $sql; - } - - return $this->db->query($sql); - } - - // -------------------------------------------------------------------- - - /** - * Rename Table - * - * @access public - * @param string the old table name - * @param string the new table name - * @return bool - */ - function rename_table($table_name, $new_table_name) - { - if ($table_name == '' OR $new_table_name == '') - { - show_error('A table name is required for that operation.'); - } - - $sql = $this->_rename_table($this->db->dbprefix.$table_name, $this->db->dbprefix.$new_table_name); - return $this->db->query($sql); - } - - // -------------------------------------------------------------------- - - /** - * Column Add - * - * @access public - * @param string the table name - * @param string the column name - * @param string the column definition - * @return bool - */ - function add_column($table = '', $field = array(), $after_field = '') - { - if ($table == '') - { - show_error('A table name is required for that operation.'); - } - - // add field info into field array, but we can only do one at a time - // so we cycle through - - foreach ($field as $k => $v) - { - $this->add_field(array($k => $field[$k])); - - if (count($this->fields) == 0) - { - show_error('Field information is required.'); - } - - $sql = $this->_alter_table('ADD', $this->db->dbprefix.$table, $this->fields, $after_field); - - $this->_reset(); - - if ($this->db->query($sql) === FALSE) - { - return FALSE; - } - } - - return TRUE; - - } - - // -------------------------------------------------------------------- - - /** - * Column Drop - * - * @access public - * @param string the table name - * @param string the column name - * @return bool - */ - function drop_column($table = '', $column_name = '') - { - - if ($table == '') - { - show_error('A table name is required for that operation.'); - } - - if ($column_name == '') - { - show_error('A column name is required for that operation.'); - } - - $sql = $this->_alter_table('DROP', $this->db->dbprefix.$table, $column_name); - - return $this->db->query($sql); - } - - // -------------------------------------------------------------------- - - /** - * Column Modify - * - * @access public - * @param string the table name - * @param string the column name - * @param string the column definition - * @return bool - */ - function modify_column($table = '', $field = array()) - { - if ($table == '') - { - show_error('A table name is required for that operation.'); - } - - // add field info into field array, but we can only do one at a time - // so we cycle through - - foreach ($field as $k => $v) - { - // If no name provided, use the current name - if ( ! isset($field[$k]['name'])) - { - $field[$k]['name'] = $k; - } - - $this->add_field(array($k => $field[$k])); - - if (count($this->fields) == 0) - { - show_error('Field information is required.'); - } - - $sql = $this->_alter_table('CHANGE', $this->db->dbprefix.$table, $this->fields); - - $this->_reset(); - - if ($this->db->query($sql) === FALSE) - { - return FALSE; - } - } - - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Reset - * - * Resets table creation vars - * - * @access private - * @return void - */ - function _reset() - { - $this->fields = array(); - $this->keys = array(); - $this->primary_keys = array(); - } - -} - -/* End of file DB_forge.php */ -/* Location: ./system/database/DB_forge.php */ \ No newline at end of file diff --git a/donjo-sys/database/DB_result.php b/donjo-sys/database/DB_result.php deleted file mode 100644 index d397fb44c..000000000 --- a/donjo-sys/database/DB_result.php +++ /dev/null @@ -1,411 +0,0 @@ -result_array(); - else if ($type == 'object') return $this->result_object(); - else return $this->custom_result_object($type); - } - - // -------------------------------------------------------------------- - - /** - * Custom query result. - * - * @param class_name A string that represents the type of object you want back - * @return array of objects - */ - public function custom_result_object($class_name) - { - if (array_key_exists($class_name, $this->custom_result_object)) - { - return $this->custom_result_object[$class_name]; - } - - if ($this->result_id === FALSE OR $this->num_rows() == 0) - { - return array(); - } - - // add the data to the object - $this->_data_seek(0); - $result_object = array(); - - while ($row = $this->_fetch_object()) - { - $object = new $class_name(); - - foreach ($row as $key => $value) - { - $object->$key = $value; - } - - $result_object[] = $object; - } - - // return the array - return $this->custom_result_object[$class_name] = $result_object; - } - - // -------------------------------------------------------------------- - - /** - * Query result. "object" version. - * - * @access public - * @return object - */ - public function result_object() - { - if (count($this->result_object) > 0) - { - return $this->result_object; - } - - // In the event that query caching is on the result_id variable - // will return FALSE since there isn't a valid SQL resource so - // we'll simply return an empty array. - if ($this->result_id === FALSE OR $this->num_rows() == 0) - { - return array(); - } - - $this->_data_seek(0); - while ($row = $this->_fetch_object()) - { - $this->result_object[] = $row; - } - - return $this->result_object; - } - - // -------------------------------------------------------------------- - - /** - * Query result. "array" version. - * - * @access public - * @return array - */ - public function result_array() - { - if (count($this->result_array) > 0) - { - return $this->result_array; - } - - // In the event that query caching is on the result_id variable - // will return FALSE since there isn't a valid SQL resource so - // we'll simply return an empty array. - if ($this->result_id === FALSE OR $this->num_rows() == 0) - { - return array(); - } - - $this->_data_seek(0); - while ($row = $this->_fetch_assoc()) - { - $this->result_array[] = $row; - } - - return $this->result_array; - } - - // -------------------------------------------------------------------- - - /** - * Query result. Acts as a wrapper function for the following functions. - * - * @access public - * @param string - * @param string can be "object" or "array" - * @return mixed either a result object or array - */ - public function row($n = 0, $type = 'object') - { - if ( ! is_numeric($n)) - { - // We cache the row data for subsequent uses - if ( ! is_array($this->row_data)) - { - $this->row_data = $this->row_array(0); - } - - // array_key_exists() instead of isset() to allow for MySQL NULL values - if (array_key_exists($n, $this->row_data)) - { - return $this->row_data[$n]; - } - // reset the $n variable if the result was not achieved - $n = 0; - } - - if ($type == 'object') return $this->row_object($n); - else if ($type == 'array') return $this->row_array($n); - else return $this->custom_row_object($n, $type); - } - - // -------------------------------------------------------------------- - - /** - * Assigns an item into a particular column slot - * - * @access public - * @return object - */ - public function set_row($key, $value = NULL) - { - // We cache the row data for subsequent uses - if ( ! is_array($this->row_data)) - { - $this->row_data = $this->row_array(0); - } - - if (is_array($key)) - { - foreach ($key as $k => $v) - { - $this->row_data[$k] = $v; - } - - return; - } - - if ($key != '' AND ! is_null($value)) - { - $this->row_data[$key] = $value; - } - } - - // -------------------------------------------------------------------- - - /** - * Returns a single result row - custom object version - * - * @access public - * @return object - */ - public function custom_row_object($n, $type) - { - $result = $this->custom_result_object($type); - - if (count($result) == 0) - { - return $result; - } - - if ($n != $this->current_row AND isset($result[$n])) - { - $this->current_row = $n; - } - - return $result[$this->current_row]; - } - - /** - * Returns a single result row - object version - * - * @access public - * @return object - */ - public function row_object($n = 0) - { - $result = $this->result_object(); - - if (count($result) == 0) - { - return $result; - } - - if ($n != $this->current_row AND isset($result[$n])) - { - $this->current_row = $n; - } - - return $result[$this->current_row]; - } - - // -------------------------------------------------------------------- - - /** - * Returns a single result row - array version - * - * @access public - * @return array - */ - public function row_array($n = 0) - { - $result = $this->result_array(); - - if (count($result) == 0) - { - return $result; - } - - if ($n != $this->current_row AND isset($result[$n])) - { - $this->current_row = $n; - } - - return $result[$this->current_row]; - } - - - // -------------------------------------------------------------------- - - /** - * Returns the "first" row - * - * @access public - * @return object - */ - public function first_row($type = 'object') - { - $result = $this->result($type); - - if (count($result) == 0) - { - return $result; - } - return $result[0]; - } - - // -------------------------------------------------------------------- - - /** - * Returns the "last" row - * - * @access public - * @return object - */ - public function last_row($type = 'object') - { - $result = $this->result($type); - - if (count($result) == 0) - { - return $result; - } - return $result[count($result) -1]; - } - - // -------------------------------------------------------------------- - - /** - * Returns the "next" row - * - * @access public - * @return object - */ - public function next_row($type = 'object') - { - $result = $this->result($type); - - if (count($result) == 0) - { - return $result; - } - - if (isset($result[$this->current_row + 1])) - { - ++$this->current_row; - } - - return $result[$this->current_row]; - } - - // -------------------------------------------------------------------- - - /** - * Returns the "previous" row - * - * @access public - * @return object - */ - public function previous_row($type = 'object') - { - $result = $this->result($type); - - if (count($result) == 0) - { - return $result; - } - - if (isset($result[$this->current_row - 1])) - { - --$this->current_row; - } - return $result[$this->current_row]; - } - - // -------------------------------------------------------------------- - - /** - * The following functions are normally overloaded by the identically named - * methods in the platform-specific driver -- except when query caching - * is used. When caching is enabled we do not load the other driver. - * These functions are primarily here to prevent undefined function errors - * when a cached result object is in use. They are not otherwise fully - * operational due to the unavailability of the database resource IDs with - * cached results. - */ - public function num_rows() { return $this->num_rows; } - public function num_fields() { return 0; } - public function list_fields() { return array(); } - public function field_data() { return array(); } - public function free_result() { return TRUE; } - protected function _data_seek() { return TRUE; } - protected function _fetch_assoc() { return array(); } - protected function _fetch_object() { return array(); } - -} -// END DB_result class - -/* End of file DB_result.php */ -/* Location: ./system/database/DB_result.php */ diff --git a/donjo-sys/database/DB_utility.php b/donjo-sys/database/DB_utility.php deleted file mode 100644 index 3032d9eea..000000000 --- a/donjo-sys/database/DB_utility.php +++ /dev/null @@ -1,415 +0,0 @@ -db - $CI =& get_instance(); - $this->db =& $CI->db; - - log_message('debug', "Database Utility Class Initialized"); - } - - // -------------------------------------------------------------------- - - /** - * List databases - * - * @access public - * @return bool - */ - function list_databases() - { - // Is there a cached result? - if (isset($this->data_cache['db_names'])) - { - return $this->data_cache['db_names']; - } - - $query = $this->db->query($this->_list_databases()); - $dbs = array(); - if ($query->num_rows() > 0) - { - foreach ($query->result_array() as $row) - { - $dbs[] = current($row); - } - } - - $this->data_cache['db_names'] = $dbs; - return $this->data_cache['db_names']; - } - - // -------------------------------------------------------------------- - - /** - * Determine if a particular database exists - * - * @access public - * @param string - * @return boolean - */ - function database_exists($database_name) - { - // Some databases won't have access to the list_databases() function, so - // this is intended to allow them to override with their own functions as - // defined in $driver_utility.php - if (method_exists($this, '_database_exists')) - { - return $this->_database_exists($database_name); - } - else - { - return ( ! in_array($database_name, $this->list_databases())) ? FALSE : TRUE; - } - } - - - // -------------------------------------------------------------------- - - /** - * Optimize Table - * - * @access public - * @param string the table name - * @return bool - */ - function optimize_table($table_name) - { - $sql = $this->_optimize_table($table_name); - - if (is_bool($sql)) - { - show_error('db_must_use_set'); - } - - $query = $this->db->query($sql); - $res = $query->result_array(); - - // Note: Due to a bug in current() that affects some versions - // of PHP we can not pass function call directly into it - return current($res); - } - - // -------------------------------------------------------------------- - - /** - * Optimize Database - * - * @access public - * @return array - */ - function optimize_database() - { - $result = array(); - foreach ($this->db->list_tables() as $table_name) - { - $sql = $this->_optimize_table($table_name); - - if (is_bool($sql)) - { - return $sql; - } - - $query = $this->db->query($sql); - - // Build the result array... - // Note: Due to a bug in current() that affects some versions - // of PHP we can not pass function call directly into it - $res = $query->result_array(); - $res = current($res); - $key = str_replace($this->db->database.'.', '', current($res)); - $keys = array_keys($res); - unset($res[$keys[0]]); - - $result[$key] = $res; - } - - return $result; - } - - // -------------------------------------------------------------------- - - /** - * Repair Table - * - * @access public - * @param string the table name - * @return bool - */ - function repair_table($table_name) - { - $sql = $this->_repair_table($table_name); - - if (is_bool($sql)) - { - return $sql; - } - - $query = $this->db->query($sql); - - // Note: Due to a bug in current() that affects some versions - // of PHP we can not pass function call directly into it - $res = $query->result_array(); - return current($res); - } - - // -------------------------------------------------------------------- - - /** - * Generate CSV from a query result object - * - * @access public - * @param object The query result object - * @param string The delimiter - comma by default - * @param string The newline character - \n by default - * @param string The enclosure - double quote by default - * @return string - */ - function csv_from_result($query, $delim = ",", $newline = "\n", $enclosure = '"') - { - if ( ! is_object($query) OR ! method_exists($query, 'list_fields')) - { - show_error('You must submit a valid result object'); - } - - $out = ''; - - // First generate the headings from the table column names - foreach ($query->list_fields() as $name) - { - $out .= $enclosure.str_replace($enclosure, $enclosure.$enclosure, $name).$enclosure.$delim; - } - - $out = rtrim($out); - $out .= $newline; - - // Next blast through the result array and build out the rows - foreach ($query->result_array() as $row) - { - foreach ($row as $item) - { - $out .= $enclosure.str_replace($enclosure, $enclosure.$enclosure, $item).$enclosure.$delim; - } - $out = rtrim($out); - $out .= $newline; - } - - return $out; - } - - // -------------------------------------------------------------------- - - /** - * Generate XML data from a query result object - * - * @access public - * @param object The query result object - * @param array Any preferences - * @return string - */ - function xml_from_result($query, $params = array()) - { - if ( ! is_object($query) OR ! method_exists($query, 'list_fields')) - { - show_error('You must submit a valid result object'); - } - - // Set our default values - foreach (array('root' => 'root', 'element' => 'element', 'newline' => "\n", 'tab' => "\t") as $key => $val) - { - if ( ! isset($params[$key])) - { - $params[$key] = $val; - } - } - - // Create variables for convenience - extract($params); - - // Load the xml helper - $CI =& get_instance(); - $CI->load->helper('xml'); - - // Generate the result - $xml = "<{$root}>".$newline; - foreach ($query->result_array() as $row) - { - $xml .= $tab."<{$element}>".$newline; - - foreach ($row as $key => $val) - { - $xml .= $tab.$tab."<{$key}>".xml_convert($val)."".$newline; - } - $xml .= $tab."".$newline; - } - $xml .= "".$newline; - - return $xml; - } - - // -------------------------------------------------------------------- - - /** - * Database Backup - * - * @access public - * @return void - */ - function backup($params = array()) - { - // If the parameters have not been submitted as an - // array then we know that it is simply the table - // name, which is a valid short cut. - if (is_string($params)) - { - $params = array('tables' => $params); - } - - // ------------------------------------------------------ - - // Set up our default preferences - $prefs = array( - 'tables' => array(), - 'ignore' => array(), - 'filename' => '', - 'format' => 'gzip', // gzip, zip, txt - 'add_drop' => TRUE, - 'add_insert' => TRUE, - 'newline' => "\n" - ); - - // Did the user submit any preferences? If so set them.... - if (count($params) > 0) - { - foreach ($prefs as $key => $val) - { - if (isset($params[$key])) - { - $prefs[$key] = $params[$key]; - } - } - } - - // ------------------------------------------------------ - - // Are we backing up a complete database or individual tables? - // If no table names were submitted we'll fetch the entire table list - if (count($prefs['tables']) == 0) - { - $prefs['tables'] = $this->db->list_tables(); - } - - // ------------------------------------------------------ - - // Validate the format - if ( ! in_array($prefs['format'], array('gzip', 'zip', 'txt'), TRUE)) - { - $prefs['format'] = 'txt'; - } - - // ------------------------------------------------------ - - // Is the encoder supported? If not, we'll either issue an - // error or use plain text depending on the debug settings - if (($prefs['format'] == 'gzip' AND ! @function_exists('gzencode')) - OR ($prefs['format'] == 'zip' AND ! @function_exists('gzcompress'))) - { - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_compression'); - } - - $prefs['format'] = 'txt'; - } - - // ------------------------------------------------------ - - // Set the filename if not provided - Only needed with Zip files - if ($prefs['filename'] == '' AND $prefs['format'] == 'zip') - { - $prefs['filename'] = (count($prefs['tables']) == 1) ? $prefs['tables'] : $this->db->database; - $prefs['filename'] .= '_'.date('Y-m-d_H-i', time()); - } - - // ------------------------------------------------------ - - // Was a Gzip file requested? - if ($prefs['format'] == 'gzip') - { - return gzencode($this->_backup($prefs)); - } - - // ------------------------------------------------------ - - // Was a text file requested? - if ($prefs['format'] == 'txt') - { - return $this->_backup($prefs); - } - - // ------------------------------------------------------ - - // Was a Zip file requested? - if ($prefs['format'] == 'zip') - { - // If they included the .zip file extension we'll remove it - if (preg_match("|.+?\.zip$|", $prefs['filename'])) - { - $prefs['filename'] = str_replace('.zip', '', $prefs['filename']); - } - - // Tack on the ".sql" file extension if needed - if ( ! preg_match("|.+?\.sql$|", $prefs['filename'])) - { - $prefs['filename'] .= '.sql'; - } - - // Load the Zip class and output it - - $CI =& get_instance(); - $CI->load->library('zip'); - $CI->zip->add_data($prefs['filename'], $this->_backup($prefs)); - return $CI->zip->get_zip(); - } - - } - -} - - -/* End of file DB_utility.php */ -/* Location: ./system/database/DB_utility.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/cubrid/cubrid_driver.php b/donjo-sys/database/drivers/cubrid/cubrid_driver.php deleted file mode 100644 index 08aa429e0..000000000 --- a/donjo-sys/database/drivers/cubrid/cubrid_driver.php +++ /dev/null @@ -1,793 +0,0 @@ -port == '') - { - $this->port = self::DEFAULT_PORT; - } - - $conn = cubrid_connect($this->hostname, $this->port, $this->database, $this->username, $this->password); - - if ($conn) - { - // Check if a user wants to run queries in dry, i.e. run the - // queries but not commit them. - if (isset($this->auto_commit) && ! $this->auto_commit) - { - cubrid_set_autocommit($conn, CUBRID_AUTOCOMMIT_FALSE); - } - else - { - cubrid_set_autocommit($conn, CUBRID_AUTOCOMMIT_TRUE); - $this->auto_commit = TRUE; - } - } - - return $conn; - } - - // -------------------------------------------------------------------- - - /** - * Persistent database connection - * In CUBRID persistent DB connection is supported natively in CUBRID - * engine which can be configured in the CUBRID Broker configuration - * file by setting the CCI_PCONNECT parameter to ON. In that case, all - * connections established between the client application and the - * server will become persistent. This is calling the same - * @cubrid_connect function will establish persisten connection - * considering that the CCI_PCONNECT is ON. - * - * @access private called by the base class - * @return resource - */ - function db_pconnect() - { - return $this->db_connect(); - } - - // -------------------------------------------------------------------- - - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @access public - * @return void - */ - function reconnect() - { - if (cubrid_ping($this->conn_id) === FALSE) - { - $this->conn_id = FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Select the database - * - * @access private called by the base class - * @return resource - */ - function db_select() - { - // In CUBRID there is no need to select a database as the database - // is chosen at the connection time. - // So, to determine if the database is "selected", all we have to - // do is ping the server and return that value. - return cubrid_ping($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Set client character set - * - * @access public - * @param string - * @param string - * @return resource - */ - function db_set_charset($charset, $collation) - { - // In CUBRID, there is no need to set charset or collation. - // This is why returning true will allow the application continue - // its normal process. - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Version number query string - * - * @access public - * @return string - */ - function _version() - { - // To obtain the CUBRID Server version, no need to run the SQL query. - // CUBRID PHP API provides a function to determin this value. - // This is why we also need to add 'cubrid' value to the list of - // $driver_version_exceptions array in DB_driver class in - // version() function. - return cubrid_get_server_info($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Execute the query - * - * @access private called by the base class - * @param string an SQL query - * @return resource - */ - function _execute($sql) - { - $sql = $this->_prep_query($sql); - return @cubrid_query($sql, $this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Prep the query - * - * If needed, each database adapter can prep the query string - * - * @access private called by execute() - * @param string an SQL query - * @return string - */ - function _prep_query($sql) - { - // No need to prepare - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Begin Transaction - * - * @access public - * @return bool - */ - function trans_begin($test_mode = FALSE) - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE; - - if (cubrid_get_autocommit($this->conn_id)) - { - cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_FALSE); - } - - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Commit Transaction - * - * @access public - * @return bool - */ - function trans_commit() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - cubrid_commit($this->conn_id); - - if ($this->auto_commit && ! cubrid_get_autocommit($this->conn_id)) - { - cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_TRUE); - } - - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Rollback Transaction - * - * @access public - * @return bool - */ - function trans_rollback() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - cubrid_rollback($this->conn_id); - - if ($this->auto_commit && ! cubrid_get_autocommit($this->conn_id)) - { - cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_TRUE); - } - - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Escape String - * - * @access public - * @param string - * @param bool whether or not the string will be used in a LIKE condition - * @return string - */ - function escape_str($str, $like = FALSE) - { - if (is_array($str)) - { - foreach ($str as $key => $val) - { - $str[$key] = $this->escape_str($val, $like); - } - - return $str; - } - - if (function_exists('cubrid_real_escape_string') AND is_resource($this->conn_id)) - { - $str = cubrid_real_escape_string($str, $this->conn_id); - } - else - { - $str = addslashes($str); - } - - // escape LIKE condition wildcards - if ($like === TRUE) - { - $str = str_replace(array('%', '_'), array('\\%', '\\_'), $str); - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Affected Rows - * - * @access public - * @return integer - */ - function affected_rows() - { - return @cubrid_affected_rows($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Insert ID - * - * @access public - * @return integer - */ - function insert_id() - { - return @cubrid_insert_id($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * "Count All" query - * - * Generates a platform-specific query string that counts all records in - * the specified table - * - * @access public - * @param string - * @return string - */ - function count_all($table = '') - { - if ($table == '') - { - return 0; - } - - $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); - - if ($query->num_rows() == 0) - { - return 0; - } - - $row = $query->row(); - $this->_reset_select(); - return (int) $row->numrows; - } - - // -------------------------------------------------------------------- - - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @access private - * @param boolean - * @return string - */ - function _list_tables($prefix_limit = FALSE) - { - $sql = "SHOW TABLES"; - - if ($prefix_limit !== FALSE AND $this->dbprefix != '') - { - $sql .= " LIKE '".$this->escape_like_str($this->dbprefix)."%'"; - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @access public - * @param string the table name - * @return string - */ - function _list_columns($table = '') - { - return "SHOW COLUMNS FROM ".$this->_protect_identifiers($table, TRUE, NULL, FALSE); - } - - // -------------------------------------------------------------------- - - /** - * Field data query - * - * Generates a platform-specific query so that the column data can be retrieved - * - * @access public - * @param string the table name - * @return object - */ - function _field_data($table) - { - return "SELECT * FROM ".$table." LIMIT 1"; - } - - // -------------------------------------------------------------------- - - /** - * The error message string - * - * @access private - * @return string - */ - function _error_message() - { - return cubrid_error($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * The error message number - * - * @access private - * @return integer - */ - function _error_number() - { - return cubrid_errno($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Escape the SQL Identifiers - * - * This function escapes column and table names - * - * @access private - * @param string - * @return string - */ - function _escape_identifiers($item) - { - if ($this->_escape_char == '') - { - return $item; - } - - foreach ($this->_reserved_identifiers as $id) - { - if (strpos($item, '.'.$id) !== FALSE) - { - $str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item); - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - } - - if (strpos($item, '.') !== FALSE) - { - $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; - } - else - { - $str = $this->_escape_char.$item.$this->_escape_char; - } - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - - // -------------------------------------------------------------------- - - /** - * From Tables - * - * This function implicitly groups FROM tables so there is no confusion - * about operator precedence in harmony with SQL standards - * - * @access public - * @param type - * @return type - */ - function _from_tables($tables) - { - if ( ! is_array($tables)) - { - $tables = array($tables); - } - - return '('.implode(', ', $tables).')'; - } - - // -------------------------------------------------------------------- - - /** - * Insert statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert($table, $keys, $values) - { - return "INSERT INTO ".$table." (\"".implode('", "', $keys)."\") VALUES (".implode(', ', $values).")"; - } - - // -------------------------------------------------------------------- - - - /** - * Replace statement - * - * Generates a platform-specific replace string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _replace($table, $keys, $values) - { - return "REPLACE INTO ".$table." (\"".implode('", "', $keys)."\") VALUES (".implode(', ', $values).")"; - } - - // -------------------------------------------------------------------- - - /** - * Insert_batch statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert_batch($table, $keys, $values) - { - return "INSERT INTO ".$table." (\"".implode('", "', $keys)."\") VALUES ".implode(', ', $values); - } - - // -------------------------------------------------------------------- - - - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @access public - * @param string the table name - * @param array the update data - * @param array the where clause - * @param array the orderby clause - * @param array the limit clause - * @return string - */ - function _update($table, $values, $where, $orderby = array(), $limit = FALSE) - { - foreach ($values as $key => $val) - { - $valstr[] = sprintf('"%s" = %s', $key, $val); - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):''; - - $sql = "UPDATE ".$table." SET ".implode(', ', $valstr); - - $sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : ''; - - $sql .= $orderby.$limit; - - return $sql; - } - - // -------------------------------------------------------------------- - - - /** - * Update_Batch statement - * - * Generates a platform-specific batch update string from the supplied data - * - * @access public - * @param string the table name - * @param array the update data - * @param array the where clause - * @return string - */ - function _update_batch($table, $values, $index, $where = NULL) - { - $ids = array(); - $where = ($where != '' AND count($where) >=1) ? implode(" ", $where).' AND ' : ''; - - foreach ($values as $key => $val) - { - $ids[] = $val[$index]; - - foreach (array_keys($val) as $field) - { - if ($field != $index) - { - $final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field]; - } - } - } - - $sql = "UPDATE ".$table." SET "; - $cases = ''; - - foreach ($final as $k => $v) - { - $cases .= $k.' = CASE '."\n"; - foreach ($v as $row) - { - $cases .= $row."\n"; - } - - $cases .= 'ELSE '.$k.' END, '; - } - - $sql .= substr($cases, 0, -2); - - $sql .= ' WHERE '.$where.$index.' IN ('.implode(',', $ids).')'; - - return $sql; - } - - // -------------------------------------------------------------------- - - - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * If the database does not support the truncate() command - * This function maps to "DELETE FROM table" - * - * @access public - * @param string the table name - * @return string - */ - function _truncate($table) - { - return "TRUNCATE ".$table; - } - - // -------------------------------------------------------------------- - - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @access public - * @param string the table name - * @param array the where clause - * @param string the limit clause - * @return string - */ - function _delete($table, $where = array(), $like = array(), $limit = FALSE) - { - $conditions = ''; - - if (count($where) > 0 OR count($like) > 0) - { - $conditions = "\nWHERE "; - $conditions .= implode("\n", $this->ar_where); - - if (count($where) > 0 && count($like) > 0) - { - $conditions .= " AND "; - } - $conditions .= implode("\n", $like); - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - return "DELETE FROM ".$table.$conditions.$limit; - } - - // -------------------------------------------------------------------- - - /** - * Limit string - * - * Generates a platform-specific LIMIT clause - * - * @access public - * @param string the sql query string - * @param integer the number of rows to limit the query to - * @param integer the offset value - * @return string - */ - function _limit($sql, $limit, $offset) - { - if ($offset == 0) - { - $offset = ''; - } - else - { - $offset .= ", "; - } - - return $sql."LIMIT ".$offset.$limit; - } - - // -------------------------------------------------------------------- - - /** - * Close DB Connection - * - * @access public - * @param resource - * @return void - */ - function _close($conn_id) - { - @cubrid_close($conn_id); - } - -} - - -/* End of file cubrid_driver.php */ -/* Location: ./system/database/drivers/cubrid/cubrid_driver.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/cubrid/cubrid_forge.php b/donjo-sys/database/drivers/cubrid/cubrid_forge.php deleted file mode 100644 index 73bfafe2b..000000000 --- a/donjo-sys/database/drivers/cubrid/cubrid_forge.php +++ /dev/null @@ -1,289 +0,0 @@ -$attributes) - { - // Numeric field names aren't allowed in databases, so if the key is - // numeric, we know it was assigned by PHP and the developer manually - // entered the field information, so we'll simply add it to the list - if (is_numeric($field)) - { - $sql .= "\n\t$attributes"; - } - else - { - $attributes = array_change_key_case($attributes, CASE_UPPER); - - $sql .= "\n\t\"" . $this->db->_protect_identifiers($field) . "\""; - - if (array_key_exists('NAME', $attributes)) - { - $sql .= ' '.$this->db->_protect_identifiers($attributes['NAME']).' '; - } - - if (array_key_exists('TYPE', $attributes)) - { - $sql .= ' '.$attributes['TYPE']; - - if (array_key_exists('CONSTRAINT', $attributes)) - { - switch ($attributes['TYPE']) - { - case 'decimal': - case 'float': - case 'numeric': - $sql .= '('.implode(',', $attributes['CONSTRAINT']).')'; - break; - case 'enum': // As of version 8.4.0 CUBRID does not support - // enum data type. - break; - case 'set': - $sql .= '("'.implode('","', $attributes['CONSTRAINT']).'")'; - break; - default: - $sql .= '('.$attributes['CONSTRAINT'].')'; - } - } - } - - if (array_key_exists('UNSIGNED', $attributes) && $attributes['UNSIGNED'] === TRUE) - { - //$sql .= ' UNSIGNED'; - // As of version 8.4.0 CUBRID does not support UNSIGNED INTEGER data type. - // Will be supported in the next release as a part of MySQL Compatibility. - } - - if (array_key_exists('DEFAULT', $attributes)) - { - $sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\''; - } - - if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE) - { - $sql .= ' AUTO_INCREMENT'; - } - - if (array_key_exists('UNIQUE', $attributes) && $attributes['UNIQUE'] === TRUE) - { - $sql .= ' UNIQUE'; - } - } - - // don't add a comma on the end of the last field - if (++$current_field_count < count($fields)) - { - $sql .= ','; - } - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Create Table - * - * @access private - * @param string the table name - * @param mixed the fields - * @param mixed primary key(s) - * @param mixed key(s) - * @param boolean should 'IF NOT EXISTS' be added to the SQL - * @return bool - */ - function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists) - { - $sql = 'CREATE TABLE '; - - if ($if_not_exists === TRUE) - { - //$sql .= 'IF NOT EXISTS '; - // As of version 8.4.0 CUBRID does not support this SQL syntax. - } - - $sql .= $this->db->_escape_identifiers($table)." ("; - - $sql .= $this->_process_fields($fields); - - // If there is a PK defined - if (count($primary_keys) > 0) - { - $key_name = "pk_" . $table . "_" . - $this->db->_protect_identifiers(implode('_', $primary_keys)); - - $primary_keys = $this->db->_protect_identifiers($primary_keys); - $sql .= ",\n\tCONSTRAINT " . $key_name . " PRIMARY KEY(" . implode(', ', $primary_keys) . ")"; - } - - if (is_array($keys) && count($keys) > 0) - { - foreach ($keys as $key) - { - if (is_array($key)) - { - $key_name = $this->db->_protect_identifiers(implode('_', $key)); - $key = $this->db->_protect_identifiers($key); - } - else - { - $key_name = $this->db->_protect_identifiers($key); - $key = array($key_name); - } - - $sql .= ",\n\tKEY \"{$key_name}\" (" . implode(', ', $key) . ")"; - } - } - - $sql .= "\n);"; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Drop Table - * - * @access private - * @return string - */ - function _drop_table($table) - { - return "DROP TABLE IF EXISTS ".$this->db->_escape_identifiers($table); - } - - // -------------------------------------------------------------------- - - /** - * Alter table query - * - * Generates a platform-specific query so that a table can be altered - * Called by add_column(), drop_column(), and column_alter(), - * - * @access private - * @param string the ALTER type (ADD, DROP, CHANGE) - * @param string the column name - * @param array fields - * @param string the field after which we should add the new field - * @return object - */ - function _alter_table($alter_type, $table, $fields, $after_field = '') - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table)." $alter_type "; - - // DROP has everything it needs now. - if ($alter_type == 'DROP') - { - return $sql.$this->db->_protect_identifiers($fields); - } - - $sql .= $this->_process_fields($fields); - - if ($after_field != '') - { - $sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field); - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Rename a table - * - * Generates a platform-specific query so that a table can be renamed - * - * @access private - * @param string the old table name - * @param string the new table name - * @return string - */ - function _rename_table($table_name, $new_table_name) - { - $sql = 'RENAME TABLE '.$this->db->_protect_identifiers($table_name)." AS ".$this->db->_protect_identifiers($new_table_name); - return $sql; - } - -} - -/* End of file cubrid_forge.php */ -/* Location: ./system/database/drivers/cubrid/cubrid_forge.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/cubrid/cubrid_result.php b/donjo-sys/database/drivers/cubrid/cubrid_result.php deleted file mode 100644 index 244e6b466..000000000 --- a/donjo-sys/database/drivers/cubrid/cubrid_result.php +++ /dev/null @@ -1,203 +0,0 @@ -result_id); - } - - // -------------------------------------------------------------------- - - /** - * Number of fields in the result set - * - * @access public - * @return integer - */ - function num_fields() - { - return @cubrid_num_fields($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @access public - * @return array - */ - function list_fields() - { - return cubrid_column_names($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @access public - * @return array - */ - function field_data() - { - $retval = array(); - - $tablePrimaryKeys = array(); - - while ($field = cubrid_fetch_field($this->result_id)) - { - $F = new stdClass(); - $F->name = $field->name; - $F->type = $field->type; - $F->default = $field->def; - $F->max_length = $field->max_length; - - // At this moment primary_key property is not returned when - // cubrid_fetch_field is called. The following code will - // provide a patch for it. primary_key property will be added - // in the next release. - - // TODO: later version of CUBRID will provide primary_key - // property. - // When PK is defined in CUBRID, an index is automatically - // created in the db_index system table in the form of - // pk_tblname_fieldname. So the following will count how many - // columns are there which satisfy this format. - // The query will search for exact single columns, thus - // compound PK is not supported. - $res = cubrid_query($this->conn_id, - "SELECT COUNT(*) FROM db_index WHERE class_name = '" . $field->table . - "' AND is_primary_key = 'YES' AND index_name = 'pk_" . - $field->table . "_" . $field->name . "'" - ); - - if ($res) - { - $row = cubrid_fetch_array($res, CUBRID_NUM); - $F->primary_key = ($row[0] > 0 ? 1 : null); - } - else - { - $F->primary_key = null; - } - - if (is_resource($res)) - { - cubrid_close_request($res); - $this->result_id = FALSE; - } - - $retval[] = $F; - } - - return $retval; - } - - // -------------------------------------------------------------------- - - /** - * Free the result - * - * @return null - */ - function free_result() - { - if(is_resource($this->result_id) || - get_resource_type($this->result_id) == "Unknown" && - preg_match('/Resource id #/', strval($this->result_id))) - { - cubrid_close_request($this->result_id); - $this->result_id = FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero - * - * @access private - * @return array - */ - function _data_seek($n = 0) - { - return cubrid_data_seek($this->result_id, $n); - } - - // -------------------------------------------------------------------- - - /** - * Result - associative array - * - * Returns the result set as an array - * - * @access private - * @return array - */ - function _fetch_assoc() - { - return cubrid_fetch_assoc($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Result - object - * - * Returns the result set as an object - * - * @access private - * @return object - */ - function _fetch_object() - { - return cubrid_fetch_object($this->result_id); - } - -} - - -/* End of file cubrid_result.php */ -/* Location: ./system/database/drivers/cubrid/cubrid_result.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/cubrid/cubrid_utility.php b/donjo-sys/database/drivers/cubrid/cubrid_utility.php deleted file mode 100644 index 4cd7bb586..000000000 --- a/donjo-sys/database/drivers/cubrid/cubrid_utility.php +++ /dev/null @@ -1,109 +0,0 @@ -conn_id) - { - return "SELECT '" . $this->database . "'"; - } - else - { - return FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Optimize table query - * - * Generates a platform-specific query so that a table can be optimized - * - * @access private - * @param string the table name - * @return object - * @link http://www.cubrid.org/manual/840/en/Optimize%20Database - */ - function _optimize_table($table) - { - // No SQL based support in CUBRID as of version 8.4.0. Database or - // table optimization can be performed using CUBRID Manager - // database administration tool. See the link above for more info. - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Repair table query - * - * Generates a platform-specific query so that a table can be repaired - * - * @access private - * @param string the table name - * @return object - * @link http://www.cubrid.org/manual/840/en/Checking%20Database%20Consistency - */ - function _repair_table($table) - { - // Not supported in CUBRID as of version 8.4.0. Database or - // table consistency can be checked using CUBRID Manager - // database administration tool. See the link above for more info. - return FALSE; - } - - // -------------------------------------------------------------------- - /** - * CUBRID Export - * - * @access private - * @param array Preferences - * @return mixed - */ - function _backup($params = array()) - { - // No SQL based support in CUBRID as of version 8.4.0. Database or - // table backup can be performed using CUBRID Manager - // database administration tool. - return $this->db->display_error('db_unsuported_feature'); - } -} - -/* End of file cubrid_utility.php */ -/* Location: ./system/database/drivers/cubrid/cubrid_utility.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/cubrid/index.html b/donjo-sys/database/drivers/cubrid/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/database/drivers/cubrid/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/database/drivers/index.html b/donjo-sys/database/drivers/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/database/drivers/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/database/drivers/mssql/index.html b/donjo-sys/database/drivers/mssql/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/database/drivers/mssql/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/database/drivers/mssql/mssql_driver.php b/donjo-sys/database/drivers/mssql/mssql_driver.php deleted file mode 100644 index f3d633caf..000000000 --- a/donjo-sys/database/drivers/mssql/mssql_driver.php +++ /dev/null @@ -1,668 +0,0 @@ -port != '') - { - $this->hostname .= ','.$this->port; - } - - return @mssql_connect($this->hostname, $this->username, $this->password); - } - - // -------------------------------------------------------------------- - - /** - * Persistent database connection - * - * @access private called by the base class - * @return resource - */ - function db_pconnect() - { - if ($this->port != '') - { - $this->hostname .= ','.$this->port; - } - - return @mssql_pconnect($this->hostname, $this->username, $this->password); - } - - // -------------------------------------------------------------------- - - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @access public - * @return void - */ - function reconnect() - { - // not implemented in MSSQL - } - - // -------------------------------------------------------------------- - - /** - * Select the database - * - * @access private called by the base class - * @return resource - */ - function db_select() - { - // Note: The brackets are required in the event that the DB name - // contains reserved characters - return @mssql_select_db('['.$this->database.']', $this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Set client character set - * - * @access public - * @param string - * @param string - * @return resource - */ - function db_set_charset($charset, $collation) - { - // @todo - add support if needed - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Execute the query - * - * @access private called by the base class - * @param string an SQL query - * @return resource - */ - function _execute($sql) - { - $sql = $this->_prep_query($sql); - return @mssql_query($sql, $this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Prep the query - * - * If needed, each database adapter can prep the query string - * - * @access private called by execute() - * @param string an SQL query - * @return string - */ - function _prep_query($sql) - { - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Begin Transaction - * - * @access public - * @return bool - */ - function trans_begin($test_mode = FALSE) - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE; - - $this->simple_query('BEGIN TRAN'); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Commit Transaction - * - * @access public - * @return bool - */ - function trans_commit() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $this->simple_query('COMMIT TRAN'); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Rollback Transaction - * - * @access public - * @return bool - */ - function trans_rollback() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $this->simple_query('ROLLBACK TRAN'); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Escape String - * - * @access public - * @param string - * @param bool whether or not the string will be used in a LIKE condition - * @return string - */ - function escape_str($str, $like = FALSE) - { - if (is_array($str)) - { - foreach ($str as $key => $val) - { - $str[$key] = $this->escape_str($val, $like); - } - - return $str; - } - - // Escape single quotes - $str = str_replace("'", "''", remove_invisible_characters($str)); - - // escape LIKE condition wildcards - if ($like === TRUE) - { - $str = str_replace( - array($this->_like_escape_chr, '%', '_'), - array($this->_like_escape_chr.$this->_like_escape_chr, $this->_like_escape_chr.'%', $this->_like_escape_chr.'_'), - $str - ); - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Affected Rows - * - * @access public - * @return integer - */ - function affected_rows() - { - return @mssql_rows_affected($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Insert ID - * - * Returns the last id created in the Identity column. - * - * @access public - * @return integer - */ - function insert_id() - { - $ver = self::_parse_major_version($this->version()); - $sql = ($ver >= 8 ? "SELECT SCOPE_IDENTITY() AS last_id" : "SELECT @@IDENTITY AS last_id"); - $query = $this->query($sql); - $row = $query->row(); - return $row->last_id; - } - - // -------------------------------------------------------------------- - - /** - * Parse major version - * - * Grabs the major version number from the - * database server version string passed in. - * - * @access private - * @param string $version - * @return int16 major version number - */ - function _parse_major_version($version) - { - preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)/', $version, $ver_info); - return $ver_info[1]; // return the major version b/c that's all we're interested in. - } - - // -------------------------------------------------------------------- - - /** - * Version number query string - * - * @access public - * @return string - */ - function _version() - { - return "SELECT @@VERSION AS ver"; - } - - // -------------------------------------------------------------------- - - /** - * "Count All" query - * - * Generates a platform-specific query string that counts all records in - * the specified database - * - * @access public - * @param string - * @return string - */ - function count_all($table = '') - { - if ($table == '') - { - return 0; - } - - $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); - - if ($query->num_rows() == 0) - { - return 0; - } - - $row = $query->row(); - $this->_reset_select(); - return (int) $row->numrows; - } - - // -------------------------------------------------------------------- - - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @access private - * @param boolean - * @return string - */ - function _list_tables($prefix_limit = FALSE) - { - $sql = "SELECT name FROM sysobjects WHERE type = 'U' ORDER BY name"; - - // for future compatibility - if ($prefix_limit !== FALSE AND $this->dbprefix != '') - { - //$sql .= " LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr); - return FALSE; // not currently supported - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * List column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @access private - * @param string the table name - * @return string - */ - function _list_columns($table = '') - { - return "SELECT * FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME = '".$table."'"; - } - - // -------------------------------------------------------------------- - - /** - * Field data query - * - * Generates a platform-specific query so that the column data can be retrieved - * - * @access public - * @param string the table name - * @return object - */ - function _field_data($table) - { - return "SELECT TOP 1 * FROM ".$table; - } - - // -------------------------------------------------------------------- - - /** - * The error message string - * - * @access private - * @return string - */ - function _error_message() - { - return mssql_get_last_message(); - } - - // -------------------------------------------------------------------- - - /** - * The error message number - * - * @access private - * @return integer - */ - function _error_number() - { - // Are error numbers supported? - return ''; - } - - // -------------------------------------------------------------------- - - /** - * Escape the SQL Identifiers - * - * This function escapes column and table names - * - * @access private - * @param string - * @return string - */ - function _escape_identifiers($item) - { - if ($this->_escape_char == '') - { - return $item; - } - - foreach ($this->_reserved_identifiers as $id) - { - if (strpos($item, '.'.$id) !== FALSE) - { - $str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item); - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - } - - if (strpos($item, '.') !== FALSE) - { - $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; - } - else - { - $str = $this->_escape_char.$item.$this->_escape_char; - } - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - - // -------------------------------------------------------------------- - - /** - * From Tables - * - * This function implicitly groups FROM tables so there is no confusion - * about operator precedence in harmony with SQL standards - * - * @access public - * @param type - * @return type - */ - function _from_tables($tables) - { - if ( ! is_array($tables)) - { - $tables = array($tables); - } - - return implode(', ', $tables); - } - - // -------------------------------------------------------------------- - - /** - * Insert statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert($table, $keys, $values) - { - return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; - } - - // -------------------------------------------------------------------- - - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @access public - * @param string the table name - * @param array the update data - * @param array the where clause - * @param array the orderby clause - * @param array the limit clause - * @return string - */ - function _update($table, $values, $where, $orderby = array(), $limit = FALSE) - { - foreach ($values as $key => $val) - { - $valstr[] = $key." = ".$val; - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):''; - - $sql = "UPDATE ".$table." SET ".implode(', ', $valstr); - - $sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : ''; - - $sql .= $orderby.$limit; - - return $sql; - } - - - // -------------------------------------------------------------------- - - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * If the database does not support the truncate() command - * This function maps to "DELETE FROM table" - * - * @access public - * @param string the table name - * @return string - */ - function _truncate($table) - { - return "TRUNCATE ".$table; - } - - // -------------------------------------------------------------------- - - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @access public - * @param string the table name - * @param array the where clause - * @param string the limit clause - * @return string - */ - function _delete($table, $where = array(), $like = array(), $limit = FALSE) - { - $conditions = ''; - - if (count($where) > 0 OR count($like) > 0) - { - $conditions = "\nWHERE "; - $conditions .= implode("\n", $this->ar_where); - - if (count($where) > 0 && count($like) > 0) - { - $conditions .= " AND "; - } - $conditions .= implode("\n", $like); - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - return "DELETE FROM ".$table.$conditions.$limit; - } - - // -------------------------------------------------------------------- - - /** - * Limit string - * - * Generates a platform-specific LIMIT clause - * - * @access public - * @param string the sql query string - * @param integer the number of rows to limit the query to - * @param integer the offset value - * @return string - */ - function _limit($sql, $limit, $offset) - { - $i = $limit + $offset; - - return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$i.' ', $sql); - } - - // -------------------------------------------------------------------- - - /** - * Close DB Connection - * - * @access public - * @param resource - * @return void - */ - function _close($conn_id) - { - @mssql_close($conn_id); - } - -} - - - -/* End of file mssql_driver.php */ -/* Location: ./system/database/drivers/mssql/mssql_driver.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/mssql/mssql_forge.php b/donjo-sys/database/drivers/mssql/mssql_forge.php deleted file mode 100644 index 579a8eef1..000000000 --- a/donjo-sys/database/drivers/mssql/mssql_forge.php +++ /dev/null @@ -1,249 +0,0 @@ -db->_escape_identifiers($table); - } - - // -------------------------------------------------------------------- - - /** - * Create Table - * - * @access private - * @param string the table name - * @param array the fields - * @param mixed primary key(s) - * @param mixed key(s) - * @param boolean should 'IF NOT EXISTS' be added to the SQL - * @return bool - */ - function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists) - { - $sql = 'CREATE TABLE '; - - if ($if_not_exists === TRUE) - { - $sql .= 'IF NOT EXISTS '; - } - - $sql .= $this->db->_escape_identifiers($table)." ("; - $current_field_count = 0; - - foreach ($fields as $field=>$attributes) - { - // Numeric field names aren't allowed in databases, so if the key is - // numeric, we know it was assigned by PHP and the developer manually - // entered the field information, so we'll simply add it to the list - if (is_numeric($field)) - { - $sql .= "\n\t$attributes"; - } - else - { - $attributes = array_change_key_case($attributes, CASE_UPPER); - - $sql .= "\n\t".$this->db->_protect_identifiers($field); - - $sql .= ' '.$attributes['TYPE']; - - if (array_key_exists('CONSTRAINT', $attributes)) - { - $sql .= '('.$attributes['CONSTRAINT'].')'; - } - - if (array_key_exists('UNSIGNED', $attributes) && $attributes['UNSIGNED'] === TRUE) - { - $sql .= ' UNSIGNED'; - } - - if (array_key_exists('DEFAULT', $attributes)) - { - $sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\''; - } - - if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE) - { - $sql .= ' AUTO_INCREMENT'; - } - } - - // don't add a comma on the end of the last field - if (++$current_field_count < count($fields)) - { - $sql .= ','; - } - } - - if (count($primary_keys) > 0) - { - $primary_keys = $this->db->_protect_identifiers($primary_keys); - $sql .= ",\n\tPRIMARY KEY (" . implode(', ', $primary_keys) . ")"; - } - - if (is_array($keys) && count($keys) > 0) - { - foreach ($keys as $key) - { - if (is_array($key)) - { - $key = $this->db->_protect_identifiers($key); - } - else - { - $key = array($this->db->_protect_identifiers($key)); - } - - $sql .= ",\n\tFOREIGN KEY (" . implode(', ', $key) . ")"; - } - } - - $sql .= "\n)"; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Alter table query - * - * Generates a platform-specific query so that a table can be altered - * Called by add_column(), drop_column(), and column_alter(), - * - * @access private - * @param string the ALTER type (ADD, DROP, CHANGE) - * @param string the column name - * @param string the table name - * @param string the column definition - * @param string the default value - * @param boolean should 'NOT NULL' be added - * @param string the field after which we should add the new field - * @return object - */ - function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '') - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table)." $alter_type ".$this->db->_protect_identifiers($column_name); - - // DROP has everything it needs now. - if ($alter_type == 'DROP') - { - return $sql; - } - - $sql .= " $column_definition"; - - if ($default_value != '') - { - $sql .= " DEFAULT \"$default_value\""; - } - - if ($null === NULL) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if ($after_field != '') - { - $sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field); - } - - return $sql; - - } - - // -------------------------------------------------------------------- - - /** - * Rename a table - * - * Generates a platform-specific query so that a table can be renamed - * - * @access private - * @param string the old table name - * @param string the new table name - * @return string - */ - function _rename_table($table_name, $new_table_name) - { - // I think this syntax will work, but can find little documentation on renaming tables in MSSQL - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table_name)." RENAME TO ".$this->db->_protect_identifiers($new_table_name); - return $sql; - } - -} - -/* End of file mssql_forge.php */ -/* Location: ./system/database/drivers/mssql/mssql_forge.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/mssql/mssql_result.php b/donjo-sys/database/drivers/mssql/mssql_result.php deleted file mode 100644 index 6ad24e4de..000000000 --- a/donjo-sys/database/drivers/mssql/mssql_result.php +++ /dev/null @@ -1,170 +0,0 @@ -result_id); - } - - // -------------------------------------------------------------------- - - /** - * Number of fields in the result set - * - * @access public - * @return integer - */ - function num_fields() - { - return @mssql_num_fields($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @access public - * @return array - */ - function list_fields() - { - $field_names = array(); - while ($field = mssql_fetch_field($this->result_id)) - { - $field_names[] = $field->name; - } - - return $field_names; - } - - // -------------------------------------------------------------------- - - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @access public - * @return array - */ - function field_data() - { - $retval = array(); - while ($field = mssql_fetch_field($this->result_id)) - { - $F = new stdClass(); - $F->name = $field->name; - $F->type = $field->type; - $F->max_length = $field->max_length; - $F->primary_key = 0; - $F->default = ''; - - $retval[] = $F; - } - - return $retval; - } - - // -------------------------------------------------------------------- - - /** - * Free the result - * - * @return null - */ - function free_result() - { - if (is_resource($this->result_id)) - { - mssql_free_result($this->result_id); - $this->result_id = FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero - * - * @access private - * @return array - */ - function _data_seek($n = 0) - { - return mssql_data_seek($this->result_id, $n); - } - - // -------------------------------------------------------------------- - - /** - * Result - associative array - * - * Returns the result set as an array - * - * @access private - * @return array - */ - function _fetch_assoc() - { - return mssql_fetch_assoc($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Result - object - * - * Returns the result set as an object - * - * @access private - * @return object - */ - function _fetch_object() - { - return mssql_fetch_object($this->result_id); - } - -} - - -/* End of file mssql_result.php */ -/* Location: ./system/database/drivers/mssql/mssql_result.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/mssql/mssql_utility.php b/donjo-sys/database/drivers/mssql/mssql_utility.php deleted file mode 100644 index 96014b908..000000000 --- a/donjo-sys/database/drivers/mssql/mssql_utility.php +++ /dev/null @@ -1,89 +0,0 @@ -db->display_error('db_unsuported_feature'); - } - -} - -/* End of file mssql_utility.php */ -/* Location: ./system/database/drivers/mssql/mssql_utility.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/mysql/index.html b/donjo-sys/database/drivers/mysql/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/database/drivers/mysql/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/database/drivers/mysql/mysql_driver.php b/donjo-sys/database/drivers/mysql/mysql_driver.php deleted file mode 100644 index 3f2a9a00a..000000000 --- a/donjo-sys/database/drivers/mysql/mysql_driver.php +++ /dev/null @@ -1,769 +0,0 @@ -port != '') - { - $this->hostname .= ':'.$this->port; - } - - return @mysql_connect($this->hostname, $this->username, $this->password, TRUE); - } - - // -------------------------------------------------------------------- - - /** - * Persistent database connection - * - * @access private called by the base class - * @return resource - */ - function db_pconnect() - { - if ($this->port != '') - { - $this->hostname .= ':'.$this->port; - } - - return @mysql_pconnect($this->hostname, $this->username, $this->password); - } - - // -------------------------------------------------------------------- - - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @access public - * @return void - */ - function reconnect() - { - if (mysql_ping($this->conn_id) === FALSE) - { - $this->conn_id = FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Select the database - * - * @access private called by the base class - * @return resource - */ - function db_select() - { - return @mysql_select_db($this->database, $this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Set client character set - * - * @access public - * @param string - * @param string - * @return resource - */ - function db_set_charset($charset, $collation) - { - if ( ! isset($this->use_set_names)) - { - // mysql_set_charset() requires PHP >= 5.2.3 and MySQL >= 5.0.7, use SET NAMES as fallback - $this->use_set_names = (version_compare(PHP_VERSION, '5.2.3', '>=') && version_compare(mysql_get_server_info(), '5.0.7', '>=')) ? FALSE : TRUE; - } - - if ($this->use_set_names === TRUE) - { - return @mysql_query("SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'", $this->conn_id); - } - else - { - return @mysql_set_charset($charset, $this->conn_id); - } - } - - // -------------------------------------------------------------------- - - /** - * Version number query string - * - * @access public - * @return string - */ - function _version() - { - return "SELECT version() AS ver"; - } - - // -------------------------------------------------------------------- - - /** - * Execute the query - * - * @access private called by the base class - * @param string an SQL query - * @return resource - */ - function _execute($sql) - { - $sql = $this->_prep_query($sql); - return @mysql_query($sql, $this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Prep the query - * - * If needed, each database adapter can prep the query string - * - * @access private called by execute() - * @param string an SQL query - * @return string - */ - function _prep_query($sql) - { - // "DELETE FROM TABLE" returns 0 affected rows This hack modifies - // the query so that it returns the number of affected rows - if ($this->delete_hack === TRUE) - { - if (preg_match('/^\s*DELETE\s+FROM\s+(\S+)\s*$/i', $sql)) - { - $sql = preg_replace("/^\s*DELETE\s+FROM\s+(\S+)\s*$/", "DELETE FROM \\1 WHERE 1=1", $sql); - } - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Begin Transaction - * - * @access public - * @return bool - */ - function trans_begin($test_mode = FALSE) - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE; - - $this->simple_query('SET AUTOCOMMIT=0'); - $this->simple_query('START TRANSACTION'); // can also be BEGIN or BEGIN WORK - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Commit Transaction - * - * @access public - * @return bool - */ - function trans_commit() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $this->simple_query('COMMIT'); - $this->simple_query('SET AUTOCOMMIT=1'); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Rollback Transaction - * - * @access public - * @return bool - */ - function trans_rollback() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $this->simple_query('ROLLBACK'); - $this->simple_query('SET AUTOCOMMIT=1'); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Escape String - * - * @access public - * @param string - * @param bool whether or not the string will be used in a LIKE condition - * @return string - */ - function escape_str($str, $like = FALSE) - { - if (is_array($str)) - { - foreach ($str as $key => $val) - { - $str[$key] = $this->escape_str($val, $like); - } - - return $str; - } - - $str = mysql_real_escape_string($str, $this->conn_id); - - // escape LIKE condition wildcards - if ($like === TRUE) - { - $str = str_replace(array('%', '_'), array('\\%', '\\_'), $str); - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Affected Rows - * - * @access public - * @return integer - */ - function affected_rows() - { - return @mysql_affected_rows($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Insert ID - * - * @access public - * @return integer - */ - function insert_id() - { - return @mysql_insert_id($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * "Count All" query - * - * Generates a platform-specific query string that counts all records in - * the specified database - * - * @access public - * @param string - * @return string - */ - function count_all($table = '') - { - if ($table == '') - { - return 0; - } - - $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); - - if ($query->num_rows() == 0) - { - return 0; - } - - $row = $query->row(); - $this->_reset_select(); - return (int) $row->numrows; - } - - // -------------------------------------------------------------------- - - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @access private - * @param boolean - * @return string - */ - function _list_tables($prefix_limit = FALSE) - { - $sql = "SHOW TABLES FROM ".$this->_escape_char.$this->database.$this->_escape_char; - - if ($prefix_limit !== FALSE AND $this->dbprefix != '') - { - $sql .= " LIKE '".$this->escape_like_str($this->dbprefix)."%'"; - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @access public - * @param string the table name - * @return string - */ - function _list_columns($table = '') - { - return "SHOW COLUMNS FROM ".$this->_protect_identifiers($table, TRUE, NULL, FALSE); - } - - // -------------------------------------------------------------------- - - /** - * Field data query - * - * Generates a platform-specific query so that the column data can be retrieved - * - * @access public - * @param string the table name - * @return object - */ - function _field_data($table) - { - return "DESCRIBE ".$table; - } - - // -------------------------------------------------------------------- - - /** - * The error message string - * - * @access private - * @return string - */ - function _error_message() - { - return mysql_error($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * The error message number - * - * @access private - * @return integer - */ - function _error_number() - { - return mysql_errno($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Escape the SQL Identifiers - * - * This function escapes column and table names - * - * @access private - * @param string - * @return string - */ - function _escape_identifiers($item) - { - if ($this->_escape_char == '') - { - return $item; - } - - foreach ($this->_reserved_identifiers as $id) - { - if (strpos($item, '.'.$id) !== FALSE) - { - $str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item); - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - } - - if (strpos($item, '.') !== FALSE) - { - $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; - } - else - { - $str = $this->_escape_char.$item.$this->_escape_char; - } - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - - // -------------------------------------------------------------------- - - /** - * From Tables - * - * This function implicitly groups FROM tables so there is no confusion - * about operator precedence in harmony with SQL standards - * - * @access public - * @param type - * @return type - */ - function _from_tables($tables) - { - if ( ! is_array($tables)) - { - $tables = array($tables); - } - - return '('.implode(', ', $tables).')'; - } - - // -------------------------------------------------------------------- - - /** - * Insert statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert($table, $keys, $values) - { - return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; - } - - // -------------------------------------------------------------------- - - - /** - * Replace statement - * - * Generates a platform-specific replace string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _replace($table, $keys, $values) - { - return "REPLACE INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; - } - - // -------------------------------------------------------------------- - - /** - * Insert_batch statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert_batch($table, $keys, $values) - { - return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values); - } - - // -------------------------------------------------------------------- - - - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @access public - * @param string the table name - * @param array the update data - * @param array the where clause - * @param array the orderby clause - * @param array the limit clause - * @return string - */ - function _update($table, $values, $where, $orderby = array(), $limit = FALSE) - { - foreach ($values as $key => $val) - { - $valstr[] = $key . ' = ' . $val; - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):''; - - $sql = "UPDATE ".$table." SET ".implode(', ', $valstr); - - $sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : ''; - - $sql .= $orderby.$limit; - - return $sql; - } - - // -------------------------------------------------------------------- - - - /** - * Update_Batch statement - * - * Generates a platform-specific batch update string from the supplied data - * - * @access public - * @param string the table name - * @param array the update data - * @param array the where clause - * @return string - */ - function _update_batch($table, $values, $index, $where = NULL) - { - $ids = array(); - $where = ($where != '' AND count($where) >=1) ? implode(" ", $where).' AND ' : ''; - - foreach ($values as $key => $val) - { - $ids[] = $val[$index]; - - foreach (array_keys($val) as $field) - { - if ($field != $index) - { - $final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field]; - } - } - } - - $sql = "UPDATE ".$table." SET "; - $cases = ''; - - foreach ($final as $k => $v) - { - $cases .= $k.' = CASE '."\n"; - foreach ($v as $row) - { - $cases .= $row."\n"; - } - - $cases .= 'ELSE '.$k.' END, '; - } - - $sql .= substr($cases, 0, -2); - - $sql .= ' WHERE '.$where.$index.' IN ('.implode(',', $ids).')'; - - return $sql; - } - - // -------------------------------------------------------------------- - - - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * If the database does not support the truncate() command - * This function maps to "DELETE FROM table" - * - * @access public - * @param string the table name - * @return string - */ - function _truncate($table) - { - return "TRUNCATE ".$table; - } - - // -------------------------------------------------------------------- - - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @access public - * @param string the table name - * @param array the where clause - * @param string the limit clause - * @return string - */ - function _delete($table, $where = array(), $like = array(), $limit = FALSE) - { - $conditions = ''; - - if (count($where) > 0 OR count($like) > 0) - { - $conditions = "\nWHERE "; - $conditions .= implode("\n", $this->ar_where); - - if (count($where) > 0 && count($like) > 0) - { - $conditions .= " AND "; - } - $conditions .= implode("\n", $like); - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - return "DELETE FROM ".$table.$conditions.$limit; - } - - // -------------------------------------------------------------------- - - /** - * Limit string - * - * Generates a platform-specific LIMIT clause - * - * @access public - * @param string the sql query string - * @param integer the number of rows to limit the query to - * @param integer the offset value - * @return string - */ - function _limit($sql, $limit, $offset) - { - if ($offset == 0) - { - $offset = ''; - } - else - { - $offset .= ", "; - } - - return $sql."LIMIT ".$offset.$limit; - } - - // -------------------------------------------------------------------- - - /** - * Close DB Connection - * - * @access public - * @param resource - * @return void - */ - function _close($conn_id) - { - @mysql_close($conn_id); - } - -} - - -/* End of file mysql_driver.php */ -/* Location: ./system/database/drivers/mysql/mysql_driver.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/mysql/mysql_forge.php b/donjo-sys/database/drivers/mysql/mysql_forge.php deleted file mode 100644 index 5bb9ccd1d..000000000 --- a/donjo-sys/database/drivers/mysql/mysql_forge.php +++ /dev/null @@ -1,274 +0,0 @@ -$attributes) - { - // Numeric field names aren't allowed in databases, so if the key is - // numeric, we know it was assigned by PHP and the developer manually - // entered the field information, so we'll simply add it to the list - if (is_numeric($field)) - { - $sql .= "\n\t$attributes"; - } - else - { - $attributes = array_change_key_case($attributes, CASE_UPPER); - - $sql .= "\n\t".$this->db->_protect_identifiers($field); - - if (array_key_exists('NAME', $attributes)) - { - $sql .= ' '.$this->db->_protect_identifiers($attributes['NAME']).' '; - } - - if (array_key_exists('TYPE', $attributes)) - { - $sql .= ' '.$attributes['TYPE']; - - if (array_key_exists('CONSTRAINT', $attributes)) - { - switch ($attributes['TYPE']) - { - case 'decimal': - case 'float': - case 'numeric': - $sql .= '('.implode(',', $attributes['CONSTRAINT']).')'; - break; - - case 'enum': - case 'set': - $sql .= '("'.implode('","', $attributes['CONSTRAINT']).'")'; - break; - - default: - $sql .= '('.$attributes['CONSTRAINT'].')'; - } - } - } - - if (array_key_exists('UNSIGNED', $attributes) && $attributes['UNSIGNED'] === TRUE) - { - $sql .= ' UNSIGNED'; - } - - if (array_key_exists('DEFAULT', $attributes)) - { - $sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\''; - } - - if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE) - { - $sql .= ' AUTO_INCREMENT'; - } - } - - // don't add a comma on the end of the last field - if (++$current_field_count < count($fields)) - { - $sql .= ','; - } - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Create Table - * - * @access private - * @param string the table name - * @param mixed the fields - * @param mixed primary key(s) - * @param mixed key(s) - * @param boolean should 'IF NOT EXISTS' be added to the SQL - * @return bool - */ - function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists) - { - $sql = 'CREATE TABLE '; - - if ($if_not_exists === TRUE) - { - $sql .= 'IF NOT EXISTS '; - } - - $sql .= $this->db->_escape_identifiers($table)." ("; - - $sql .= $this->_process_fields($fields); - - if (count($primary_keys) > 0) - { - $key_name = $this->db->_protect_identifiers(implode('_', $primary_keys)); - $primary_keys = $this->db->_protect_identifiers($primary_keys); - $sql .= ",\n\tPRIMARY KEY ".$key_name." (" . implode(', ', $primary_keys) . ")"; - } - - if (is_array($keys) && count($keys) > 0) - { - foreach ($keys as $key) - { - if (is_array($key)) - { - $key_name = $this->db->_protect_identifiers(implode('_', $key)); - $key = $this->db->_protect_identifiers($key); - } - else - { - $key_name = $this->db->_protect_identifiers($key); - $key = array($key_name); - } - - $sql .= ",\n\tKEY {$key_name} (" . implode(', ', $key) . ")"; - } - } - - $sql .= "\n) DEFAULT CHARACTER SET {$this->db->char_set} COLLATE {$this->db->dbcollat};"; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Drop Table - * - * @access private - * @return string - */ - function _drop_table($table) - { - return "DROP TABLE IF EXISTS ".$this->db->_escape_identifiers($table); - } - - // -------------------------------------------------------------------- - - /** - * Alter table query - * - * Generates a platform-specific query so that a table can be altered - * Called by add_column(), drop_column(), and column_alter(), - * - * @access private - * @param string the ALTER type (ADD, DROP, CHANGE) - * @param string the column name - * @param array fields - * @param string the field after which we should add the new field - * @return object - */ - function _alter_table($alter_type, $table, $fields, $after_field = '') - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table)." $alter_type "; - - // DROP has everything it needs now. - if ($alter_type == 'DROP') - { - return $sql.$this->db->_protect_identifiers($fields); - } - - $sql .= $this->_process_fields($fields); - - if ($after_field != '') - { - $sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field); - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Rename a table - * - * Generates a platform-specific query so that a table can be renamed - * - * @access private - * @param string the old table name - * @param string the new table name - * @return string - */ - function _rename_table($table_name, $new_table_name) - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table_name)." RENAME TO ".$this->db->_protect_identifiers($new_table_name); - return $sql; - } - -} - -/* End of file mysql_forge.php */ -/* Location: ./system/database/drivers/mysql/mysql_forge.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/mysql/mysql_result.php b/donjo-sys/database/drivers/mysql/mysql_result.php deleted file mode 100644 index 1ea5418ce..000000000 --- a/donjo-sys/database/drivers/mysql/mysql_result.php +++ /dev/null @@ -1,175 +0,0 @@ -result_id); - } - - // -------------------------------------------------------------------- - - /** - * Number of fields in the result set - * - * @access public - * @return integer - */ - function num_fields() - { - return @mysql_num_fields($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @access public - * @return array - */ - function list_fields() - { - $field_names = array(); - while ($field = mysql_fetch_field($this->result_id)) - { - $field_names[] = $field->name; - } - - return $field_names; - } - - // -------------------------------------------------------------------- - - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @access public - * @return array - */ - function field_data() - { - $retval = array(); - while ($field = mysql_fetch_object($this->result_id)) - { - preg_match('/([a-zA-Z]+)(\(\d+\))?/', $field->Type, $matches); - - $type = (array_key_exists(1, $matches)) ? $matches[1] : NULL; - $length = (array_key_exists(2, $matches)) ? preg_replace('/[^\d]/', '', $matches[2]) : NULL; - - $F = new stdClass(); - $F->name = $field->Field; - $F->type = $type; - $F->default = $field->Default; - $F->max_length = $length; - $F->primary_key = ( $field->Key == 'PRI' ? 1 : 0 ); - - $retval[] = $F; - } - - return $retval; - } - - // -------------------------------------------------------------------- - - /** - * Free the result - * - * @return null - */ - function free_result() - { - if (is_resource($this->result_id)) - { - mysql_free_result($this->result_id); - $this->result_id = FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero - * - * @access private - * @return array - */ - function _data_seek($n = 0) - { - return mysql_data_seek($this->result_id, $n); - } - - // -------------------------------------------------------------------- - - /** - * Result - associative array - * - * Returns the result set as an array - * - * @access private - * @return array - */ - function _fetch_assoc() - { - return mysql_fetch_assoc($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Result - object - * - * Returns the result set as an object - * - * @access private - * @return object - */ - function _fetch_object() - { - return mysql_fetch_object($this->result_id); - } - -} - - -/* End of file mysql_result.php */ -/* Location: ./system/database/drivers/mysql/mysql_result.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/mysql/mysql_utility.php b/donjo-sys/database/drivers/mysql/mysql_utility.php deleted file mode 100644 index c3cea6266..000000000 --- a/donjo-sys/database/drivers/mysql/mysql_utility.php +++ /dev/null @@ -1,211 +0,0 @@ -db->_escape_identifiers($table); - } - - // -------------------------------------------------------------------- - - /** - * Repair table query - * - * Generates a platform-specific query so that a table can be repaired - * - * @access private - * @param string the table name - * @return object - */ - function _repair_table($table) - { - return "REPAIR TABLE ".$this->db->_escape_identifiers($table); - } - - // -------------------------------------------------------------------- - /** - * MySQL Export - * - * @access private - * @param array Preferences - * @return mixed - */ - function _backup($params = array()) - { - if (count($params) == 0) - { - return FALSE; - } - - // Extract the prefs for simplicity - extract($params); - - // Build the output - $output = ''; - foreach ((array)$tables as $table) - { - // Is the table in the "ignore" list? - if (in_array($table, (array)$ignore, TRUE)) - { - continue; - } - - // Get the table schema - $query = $this->db->query("SHOW CREATE TABLE `".$this->db->database.'`.`'.$table.'`'); - - // No result means the table name was invalid - if ($query === FALSE) - { - continue; - } - - // Write out the table schema - $output .= '#'.$newline.'# TABLE STRUCTURE FOR: '.$table.$newline.'#'.$newline.$newline; - - if ($add_drop == TRUE) - { - $output .= 'DROP TABLE IF EXISTS '.$table.';'.$newline.$newline; - } - - $i = 0; - $result = $query->result_array(); - foreach ($result[0] as $val) - { - if ($i++ % 2) - { - $output .= $val.';'.$newline.$newline; - } - } - - // If inserts are not needed we're done... - if ($add_insert == FALSE) - { - continue; - } - - // Grab all the data from the current table - $query = $this->db->query("SELECT * FROM $table"); - - if ($query->num_rows() == 0) - { - continue; - } - - // Fetch the field names and determine if the field is an - // integer type. We use this info to decide whether to - // surround the data with quotes or not - - $i = 0; - $field_str = ''; - $is_int = array(); - while ($field = mysql_fetch_field($query->result_id)) - { - // Most versions of MySQL store timestamp as a string - $is_int[$i] = (in_array( - strtolower(mysql_field_type($query->result_id, $i)), - array('tinyint', 'smallint', 'mediumint', 'int', 'bigint'), //, 'timestamp'), - TRUE) - ) ? TRUE : FALSE; - - // Create a string of field names - $field_str .= '`'.$field->name.'`, '; - $i++; - } - - // Trim off the end comma - $field_str = preg_replace( "/, $/" , "" , $field_str); - - - // Build the insert string - foreach ($query->result_array() as $row) - { - $val_str = ''; - - $i = 0; - foreach ($row as $v) - { - // Is the value NULL? - if ($v === NULL) - { - $val_str .= 'NULL'; - } - else - { - // Escape the data if it's not an integer - if ($is_int[$i] == FALSE) - { - $val_str .= $this->db->escape($v); - } - else - { - $val_str .= $v; - } - } - - // Append a comma - $val_str .= ', '; - $i++; - } - - // Remove the comma at the end of the string - $val_str = preg_replace( "/, $/" , "" , $val_str); - - // Build the INSERT string - $output .= 'INSERT INTO '.$table.' ('.$field_str.') VALUES ('.$val_str.');'.$newline; - } - - $output .= $newline.$newline; - } - - return $output; - } -} - -/* End of file mysql_utility.php */ -/* Location: ./system/database/drivers/mysql/mysql_utility.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/mysqli/index.html b/donjo-sys/database/drivers/mysqli/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/database/drivers/mysqli/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/database/drivers/mysqli/mysqli_driver.php b/donjo-sys/database/drivers/mysqli/mysqli_driver.php deleted file mode 100644 index fb5003ed5..000000000 --- a/donjo-sys/database/drivers/mysqli/mysqli_driver.php +++ /dev/null @@ -1,767 +0,0 @@ -port != '') - { - return @mysqli_connect($this->hostname, $this->username, $this->password, $this->database, $this->port); - } - else - { - return @mysqli_connect($this->hostname, $this->username, $this->password, $this->database); - } - - } - - // -------------------------------------------------------------------- - - /** - * Persistent database connection - * - * @access private called by the base class - * @return resource - */ - function db_pconnect() - { - return $this->db_connect(); - } - - // -------------------------------------------------------------------- - - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @access public - * @return void - */ - function reconnect() - { - if (mysqli_ping($this->conn_id) === FALSE) - { - $this->conn_id = FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Select the database - * - * @access private called by the base class - * @return resource - */ - function db_select() - { - return @mysqli_select_db($this->conn_id, $this->database); - } - - // -------------------------------------------------------------------- - - /** - * Set client character set - * - * @access private - * @param string - * @param string - * @return resource - */ - function _db_set_charset($charset, $collation) - { - if ( ! isset($this->use_set_names)) - { - // mysqli_set_charset() requires MySQL >= 5.0.7, use SET NAMES as fallback - $this->use_set_names = (version_compare(mysqli_get_server_info($this->conn_id), '5.0.7', '>=')) ? FALSE : TRUE; - } - - if ($this->use_set_names === TRUE) - { - return @mysqli_query($this->conn_id, "SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'"); - } - else - { - return @mysqli_set_charset($this->conn_id, $charset); - } - } - - // -------------------------------------------------------------------- - - /** - * Version number query string - * - * @access public - * @return string - */ - function _version() - { - return "SELECT version() AS ver"; - } - - // -------------------------------------------------------------------- - - /** - * Execute the query - * - * @access private called by the base class - * @param string an SQL query - * @return resource - */ - function _execute($sql) - { - $sql = $this->_prep_query($sql); - $result = @mysqli_query($this->conn_id, $sql); - return $result; - } - - // -------------------------------------------------------------------- - - /** - * Prep the query - * - * If needed, each database adapter can prep the query string - * - * @access private called by execute() - * @param string an SQL query - * @return string - */ - function _prep_query($sql) - { - // "DELETE FROM TABLE" returns 0 affected rows This hack modifies - // the query so that it returns the number of affected rows - if ($this->delete_hack === TRUE) - { - if (preg_match('/^\s*DELETE\s+FROM\s+(\S+)\s*$/i', $sql)) - { - $sql = preg_replace("/^\s*DELETE\s+FROM\s+(\S+)\s*$/", "DELETE FROM \\1 WHERE 1=1", $sql); - } - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Begin Transaction - * - * @access public - * @return bool - */ - function trans_begin($test_mode = FALSE) - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE; - - $this->simple_query('SET AUTOCOMMIT=0'); - $this->simple_query('START TRANSACTION'); // can also be BEGIN or BEGIN WORK - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Commit Transaction - * - * @access public - * @return bool - */ - function trans_commit() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $this->simple_query('COMMIT'); - $this->simple_query('SET AUTOCOMMIT=1'); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Rollback Transaction - * - * @access public - * @return bool - */ - function trans_rollback() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $this->simple_query('ROLLBACK'); - $this->simple_query('SET AUTOCOMMIT=1'); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Escape String - * - * @access public - * @param string - * @param bool whether or not the string will be used in a LIKE condition - * @return string - */ - function escape_str($str, $like = FALSE) - { - if (is_array($str)) - { - foreach ($str as $key => $val) - { - $str[$key] = $this->escape_str($val, $like); - } - - return $str; - } - - - $str = mysqli_real_escape_string($this->conn_id, $str); - - // escape LIKE condition wildcards - if ($like === TRUE) - { - $str = str_replace(array('%', '_'), array('\\%', '\\_'), $str); - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Affected Rows - * - * @access public - * @return integer - */ - function affected_rows() - { - return @mysqli_affected_rows($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Insert ID - * - * @access public - * @return integer - */ - function insert_id() - { - return @mysqli_insert_id($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * "Count All" query - * - * Generates a platform-specific query string that counts all records in - * the specified database - * - * @access public - * @param string - * @return string - */ - function count_all($table = '') - { - if ($table == '') - { - return 0; - } - - $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); - - if ($query->num_rows() == 0) - { - return 0; - } - - $row = $query->row(); - $this->_reset_select(); - return (int) $row->numrows; - } - - // -------------------------------------------------------------------- - - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @access private - * @param boolean - * @return string - */ - function _list_tables($prefix_limit = FALSE) - { - $sql = "SHOW TABLES FROM ".$this->_escape_char.$this->database.$this->_escape_char; - - if ($prefix_limit !== FALSE AND $this->dbprefix != '') - { - $sql .= " LIKE '".$this->escape_like_str($this->dbprefix)."%'"; - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @access public - * @param string the table name - * @return string - */ - function _list_columns($table = '') - { - return "SHOW COLUMNS FROM ".$this->_protect_identifiers($table, TRUE, NULL, FALSE); - } - - // -------------------------------------------------------------------- - - /** - * Field data query - * - * Generates a platform-specific query so that the column data can be retrieved - * - * @access public - * @param string the table name - * @return object - */ - function _field_data($table) - { - return "DESCRIBE ".$table; - } - - // -------------------------------------------------------------------- - - /** - * The error message string - * - * @access private - * @return string - */ - function _error_message() - { - return mysqli_error($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * The error message number - * - * @access private - * @return integer - */ - function _error_number() - { - return mysqli_errno($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Escape the SQL Identifiers - * - * This function escapes column and table names - * - * @access private - * @param string - * @return string - */ - function _escape_identifiers($item) - { - if ($this->_escape_char == '') - { - return $item; - } - - foreach ($this->_reserved_identifiers as $id) - { - if (strpos($item, '.'.$id) !== FALSE) - { - $str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item); - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - } - - if (strpos($item, '.') !== FALSE) - { - $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; - } - else - { - $str = $this->_escape_char.$item.$this->_escape_char; - } - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - - // -------------------------------------------------------------------- - - /** - * From Tables - * - * This function implicitly groups FROM tables so there is no confusion - * about operator precedence in harmony with SQL standards - * - * @access public - * @param type - * @return type - */ - function _from_tables($tables) - { - if ( ! is_array($tables)) - { - $tables = array($tables); - } - - return '('.implode(', ', $tables).')'; - } - - // -------------------------------------------------------------------- - - /** - * Insert statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert($table, $keys, $values) - { - return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; - } - - // -------------------------------------------------------------------- - - /** - * Insert_batch statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert_batch($table, $keys, $values) - { - return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values); - } - - // -------------------------------------------------------------------- - - - /** - * Replace statement - * - * Generates a platform-specific replace string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _replace($table, $keys, $values) - { - return "REPLACE INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; - } - - // -------------------------------------------------------------------- - - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @access public - * @param string the table name - * @param array the update data - * @param array the where clause - * @param array the orderby clause - * @param array the limit clause - * @return string - */ - function _update($table, $values, $where, $orderby = array(), $limit = FALSE) - { - foreach ($values as $key => $val) - { - $valstr[] = $key." = ".$val; - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):''; - - $sql = "UPDATE ".$table." SET ".implode(', ', $valstr); - - $sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : ''; - - $sql .= $orderby.$limit; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Update_Batch statement - * - * Generates a platform-specific batch update string from the supplied data - * - * @access public - * @param string the table name - * @param array the update data - * @param array the where clause - * @return string - */ - function _update_batch($table, $values, $index, $where = NULL) - { - $ids = array(); - $where = ($where != '' AND count($where) >=1) ? implode(" ", $where).' AND ' : ''; - - foreach ($values as $key => $val) - { - $ids[] = $val[$index]; - - foreach (array_keys($val) as $field) - { - if ($field != $index) - { - $final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field]; - } - } - } - - $sql = "UPDATE ".$table." SET "; - $cases = ''; - - foreach ($final as $k => $v) - { - $cases .= $k.' = CASE '."\n"; - foreach ($v as $row) - { - $cases .= $row."\n"; - } - - $cases .= 'ELSE '.$k.' END, '; - } - - $sql .= substr($cases, 0, -2); - - $sql .= ' WHERE '.$where.$index.' IN ('.implode(',', $ids).')'; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * If the database does not support the truncate() command - * This function maps to "DELETE FROM table" - * - * @access public - * @param string the table name - * @return string - */ - function _truncate($table) - { - return "TRUNCATE ".$table; - } - - // -------------------------------------------------------------------- - - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @access public - * @param string the table name - * @param array the where clause - * @param string the limit clause - * @return string - */ - function _delete($table, $where = array(), $like = array(), $limit = FALSE) - { - $conditions = ''; - - if (count($where) > 0 OR count($like) > 0) - { - $conditions = "\nWHERE "; - $conditions .= implode("\n", $this->ar_where); - - if (count($where) > 0 && count($like) > 0) - { - $conditions .= " AND "; - } - $conditions .= implode("\n", $like); - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - return "DELETE FROM ".$table.$conditions.$limit; - } - - // -------------------------------------------------------------------- - - /** - * Limit string - * - * Generates a platform-specific LIMIT clause - * - * @access public - * @param string the sql query string - * @param integer the number of rows to limit the query to - * @param integer the offset value - * @return string - */ - function _limit($sql, $limit, $offset) - { - $sql .= "LIMIT ".$limit; - - if ($offset > 0) - { - $sql .= " OFFSET ".$offset; - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Close DB Connection - * - * @access public - * @param resource - * @return void - */ - function _close($conn_id) - { - @mysqli_close($conn_id); - } - - -} - - -/* End of file mysqli_driver.php */ -/* Location: ./system/database/drivers/mysqli/mysqli_driver.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/mysqli/mysqli_forge.php b/donjo-sys/database/drivers/mysqli/mysqli_forge.php deleted file mode 100644 index cc400d407..000000000 --- a/donjo-sys/database/drivers/mysqli/mysqli_forge.php +++ /dev/null @@ -1,259 +0,0 @@ -$attributes) - { - // Numeric field names aren't allowed in databases, so if the key is - // numeric, we know it was assigned by PHP and the developer manually - // entered the field information, so we'll simply add it to the list - if (is_numeric($field)) - { - $sql .= "\n\t$attributes"; - } - else - { - $attributes = array_change_key_case($attributes, CASE_UPPER); - - $sql .= "\n\t".$this->db->_protect_identifiers($field); - - if (array_key_exists('NAME', $attributes)) - { - $sql .= ' '.$this->db->_protect_identifiers($attributes['NAME']).' '; - } - - if (array_key_exists('TYPE', $attributes)) - { - $sql .= ' '.$attributes['TYPE']; - } - - if (array_key_exists('CONSTRAINT', $attributes)) - { - $sql .= '('.$attributes['CONSTRAINT'].')'; - } - - if (array_key_exists('UNSIGNED', $attributes) && $attributes['UNSIGNED'] === TRUE) - { - $sql .= ' UNSIGNED'; - } - - if (array_key_exists('DEFAULT', $attributes)) - { - $sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\''; - } - - if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE) - { - $sql .= ' AUTO_INCREMENT'; - } - } - - // don't add a comma on the end of the last field - if (++$current_field_count < count($fields)) - { - $sql .= ','; - } - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Create Table - * - * @access private - * @param string the table name - * @param mixed the fields - * @param mixed primary key(s) - * @param mixed key(s) - * @param boolean should 'IF NOT EXISTS' be added to the SQL - * @return bool - */ - function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists) - { - $sql = 'CREATE TABLE '; - - if ($if_not_exists === TRUE) - { - $sql .= 'IF NOT EXISTS '; - } - - $sql .= $this->db->_escape_identifiers($table)." ("; - - $sql .= $this->_process_fields($fields); - - if (count($primary_keys) > 0) - { - $key_name = $this->db->_protect_identifiers(implode('_', $primary_keys)); - $primary_keys = $this->db->_protect_identifiers($primary_keys); - $sql .= ",\n\tPRIMARY KEY ".$key_name." (" . implode(', ', $primary_keys) . ")"; - } - - if (is_array($keys) && count($keys) > 0) - { - foreach ($keys as $key) - { - if (is_array($key)) - { - $key_name = $this->db->_protect_identifiers(implode('_', $key)); - $key = $this->db->_protect_identifiers($key); - } - else - { - $key_name = $this->db->_protect_identifiers($key); - $key = array($key_name); - } - - $sql .= ",\n\tKEY {$key_name} (" . implode(', ', $key) . ")"; - } - } - - $sql .= "\n) DEFAULT CHARACTER SET {$this->db->char_set} COLLATE {$this->db->dbcollat};"; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Drop Table - * - * @access private - * @return string - */ - function _drop_table($table) - { - return "DROP TABLE IF EXISTS ".$this->db->_escape_identifiers($table); - } - - // -------------------------------------------------------------------- - - /** - * Alter table query - * - * Generates a platform-specific query so that a table can be altered - * Called by add_column(), drop_column(), and column_alter(), - * - * @access private - * @param string the ALTER type (ADD, DROP, CHANGE) - * @param string the column name - * @param array fields - * @param string the field after which we should add the new field - * @return object - */ - function _alter_table($alter_type, $table, $fields, $after_field = '') - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table)." $alter_type "; - - // DROP has everything it needs now. - if ($alter_type == 'DROP') - { - return $sql.$this->db->_protect_identifiers($fields); - } - - $sql .= $this->_process_fields($fields); - - if ($after_field != '') - { - $sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field); - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Rename a table - * - * Generates a platform-specific query so that a table can be renamed - * - * @access private - * @param string the old table name - * @param string the new table name - * @return string - */ - function _rename_table($table_name, $new_table_name) - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table_name)." RENAME TO ".$this->db->_protect_identifiers($new_table_name); - return $sql; - } - -} - -/* End of file mysqli_forge.php */ -/* Location: ./system/database/drivers/mysqli/mysqli_forge.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/mysqli/mysqli_result.php b/donjo-sys/database/drivers/mysqli/mysqli_result.php deleted file mode 100644 index 4b6bcfbce..000000000 --- a/donjo-sys/database/drivers/mysqli/mysqli_result.php +++ /dev/null @@ -1,175 +0,0 @@ -result_id); - } - - // -------------------------------------------------------------------- - - /** - * Number of fields in the result set - * - * @access public - * @return integer - */ - function num_fields() - { - return @mysqli_num_fields($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @access public - * @return array - */ - function list_fields() - { - $field_names = array(); - while ($field = mysqli_fetch_field($this->result_id)) - { - $field_names[] = $field->name; - } - - return $field_names; - } - - // -------------------------------------------------------------------- - - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @access public - * @return array - */ - function field_data() - { - $retval = array(); - while ($field = mysqli_fetch_object($this->result_id)) - { - preg_match('/([a-zA-Z]+)(\(\d+\))?/', $field->Type, $matches); - - $type = (array_key_exists(1, $matches)) ? $matches[1] : NULL; - $length = (array_key_exists(2, $matches)) ? preg_replace('/[^\d]/', '', $matches[2]) : NULL; - - $F = new stdClass(); - $F->name = $field->Field; - $F->type = $type; - $F->default = $field->Default; - $F->max_length = $length; - $F->primary_key = ( $field->Key == 'PRI' ? 1 : 0 ); - - $retval[] = $F; - } - - return $retval; - } - - // -------------------------------------------------------------------- - - /** - * Free the result - * - * @return null - */ - function free_result() - { - if (is_object($this->result_id)) - { - mysqli_free_result($this->result_id); - $this->result_id = FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero - * - * @access private - * @return array - */ - function _data_seek($n = 0) - { - return mysqli_data_seek($this->result_id, $n); - } - - // -------------------------------------------------------------------- - - /** - * Result - associative array - * - * Returns the result set as an array - * - * @access private - * @return array - */ - function _fetch_assoc() - { - return mysqli_fetch_assoc($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Result - object - * - * Returns the result set as an object - * - * @access private - * @return object - */ - function _fetch_object() - { - return mysqli_fetch_object($this->result_id); - } - -} - - -/* End of file mysqli_result.php */ -/* Location: ./system/database/drivers/mysqli/mysqli_result.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/mysqli/mysqli_utility.php b/donjo-sys/database/drivers/mysqli/mysqli_utility.php deleted file mode 100644 index 93b0da0b6..000000000 --- a/donjo-sys/database/drivers/mysqli/mysqli_utility.php +++ /dev/null @@ -1,88 +0,0 @@ -db->_escape_identifiers($table); - } - - // -------------------------------------------------------------------- - - /** - * Repair table query - * - * Generates a platform-specific query so that a table can be repaired - * - * @access private - * @param string the table name - * @return object - */ - function _repair_table($table) - { - return "REPAIR TABLE ".$this->db->_escape_identifiers($table); - } - - // -------------------------------------------------------------------- - - /** - * MySQLi Export - * - * @access private - * @param array Preferences - * @return mixed - */ - function _backup($params = array()) - { - // Currently unsupported - return $this->db->display_error('db_unsuported_feature'); - } -} - -/* End of file mysqli_utility.php */ -/* Location: ./system/database/drivers/mysqli/mysqli_utility.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/oci8/index.html b/donjo-sys/database/drivers/oci8/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/database/drivers/oci8/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/database/drivers/oci8/oci8_driver.php b/donjo-sys/database/drivers/oci8/oci8_driver.php deleted file mode 100644 index 0728a7799..000000000 --- a/donjo-sys/database/drivers/oci8/oci8_driver.php +++ /dev/null @@ -1,809 +0,0 @@ -username, $this->password, $this->hostname, $this->char_set); - } - - // -------------------------------------------------------------------- - - /** - * Persistent database connection - * - * @access private called by the base class - * @return resource - */ - public function db_pconnect() - { - return @oci_pconnect($this->username, $this->password, $this->hostname, $this->char_set); - } - - // -------------------------------------------------------------------- - - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @access public - * @return void - */ - public function reconnect() - { - // not implemented in oracle - return; - } - - // -------------------------------------------------------------------- - - /** - * Select the database - * - * @access private called by the base class - * @return resource - */ - public function db_select() - { - // Not in Oracle - schemas are actually usernames - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Set client character set - * - * @access public - * @param string - * @param string - * @return resource - */ - public function db_set_charset($charset, $collation) - { - // @todo - add support if needed - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Version number query string - * - * @access protected - * @return string - */ - protected function _version() - { - return oci_server_version($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Execute the query - * - * @access protected called by the base class - * @param string an SQL query - * @return resource - */ - protected function _execute($sql) - { - // oracle must parse the query before it is run. All of the actions with - // the query are based on the statement id returned by ociparse - $this->stmt_id = FALSE; - $this->_set_stmt_id($sql); - oci_set_prefetch($this->stmt_id, 1000); - return @oci_execute($this->stmt_id, $this->_commit); - } - - /** - * Generate a statement ID - * - * @access private - * @param string an SQL query - * @return none - */ - private function _set_stmt_id($sql) - { - if ( ! is_resource($this->stmt_id)) - { - $this->stmt_id = oci_parse($this->conn_id, $this->_prep_query($sql)); - } - } - - // -------------------------------------------------------------------- - - /** - * Prep the query - * - * If needed, each database adapter can prep the query string - * - * @access private called by execute() - * @param string an SQL query - * @return string - */ - private function _prep_query($sql) - { - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * getCursor. Returns a cursor from the datbase - * - * @access public - * @return cursor id - */ - public function get_cursor() - { - $this->curs_id = oci_new_cursor($this->conn_id); - return $this->curs_id; - } - - // -------------------------------------------------------------------- - - /** - * Stored Procedure. Executes a stored procedure - * - * @access public - * @param package package stored procedure is in - * @param procedure stored procedure to execute - * @param params array of parameters - * @return array - * - * params array keys - * - * KEY OPTIONAL NOTES - * name no the name of the parameter should be in : format - * value no the value of the parameter. If this is an OUT or IN OUT parameter, - * this should be a reference to a variable - * type yes the type of the parameter - * length yes the max size of the parameter - */ - public function stored_procedure($package, $procedure, $params) - { - if ($package == '' OR $procedure == '' OR ! is_array($params)) - { - if ($this->db_debug) - { - log_message('error', 'Invalid query: '.$package.'.'.$procedure); - return $this->display_error('db_invalid_query'); - } - return FALSE; - } - - // build the query string - $sql = "begin $package.$procedure("; - - $have_cursor = FALSE; - foreach ($params as $param) - { - $sql .= $param['name'] . ","; - - if (array_key_exists('type', $param) && ($param['type'] === OCI_B_CURSOR)) - { - $have_cursor = TRUE; - } - } - $sql = trim($sql, ",") . "); end;"; - - $this->stmt_id = FALSE; - $this->_set_stmt_id($sql); - $this->_bind_params($params); - $this->query($sql, FALSE, $have_cursor); - } - - // -------------------------------------------------------------------- - - /** - * Bind parameters - * - * @access private - * @return none - */ - private function _bind_params($params) - { - if ( ! is_array($params) OR ! is_resource($this->stmt_id)) - { - return; - } - - foreach ($params as $param) - { - foreach (array('name', 'value', 'type', 'length') as $val) - { - if ( ! isset($param[$val])) - { - $param[$val] = ''; - } - } - - oci_bind_by_name($this->stmt_id, $param['name'], $param['value'], $param['length'], $param['type']); - } - } - - // -------------------------------------------------------------------- - - /** - * Begin Transaction - * - * @access public - * @return bool - */ - public function trans_begin($test_mode = FALSE) - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE; - - $this->_commit = OCI_DEFAULT; - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Commit Transaction - * - * @access public - * @return bool - */ - public function trans_commit() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $ret = oci_commit($this->conn_id); - $this->_commit = OCI_COMMIT_ON_SUCCESS; - return $ret; - } - - // -------------------------------------------------------------------- - - /** - * Rollback Transaction - * - * @access public - * @return bool - */ - public function trans_rollback() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $ret = oci_rollback($this->conn_id); - $this->_commit = OCI_COMMIT_ON_SUCCESS; - return $ret; - } - - // -------------------------------------------------------------------- - - /** - * Escape String - * - * @access public - * @param string - * @param bool whether or not the string will be used in a LIKE condition - * @return string - */ - public function escape_str($str, $like = FALSE) - { - if (is_array($str)) - { - foreach ($str as $key => $val) - { - $str[$key] = $this->escape_str($val, $like); - } - - return $str; - } - - $str = remove_invisible_characters($str); - - // escape LIKE condition wildcards - if ($like === TRUE) - { - $str = str_replace( array('%', '_', $this->_like_escape_chr), - array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr), - $str); - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Affected Rows - * - * @access public - * @return integer - */ - public function affected_rows() - { - return @oci_num_rows($this->stmt_id); - } - - // -------------------------------------------------------------------- - - /** - * Insert ID - * - * @access public - * @return integer - */ - public function insert_id() - { - // not supported in oracle - return $this->display_error('db_unsupported_function'); - } - - // -------------------------------------------------------------------- - - /** - * "Count All" query - * - * Generates a platform-specific query string that counts all records in - * the specified database - * - * @access public - * @param string - * @return string - */ - public function count_all($table = '') - { - if ($table == '') - { - return 0; - } - - $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); - - if ($query == FALSE) - { - return 0; - } - - $row = $query->row(); - $this->_reset_select(); - return (int) $row->numrows; - } - - // -------------------------------------------------------------------- - - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @access protected - * @param boolean - * @return string - */ - protected function _list_tables($prefix_limit = FALSE) - { - $sql = "SELECT TABLE_NAME FROM ALL_TABLES"; - - if ($prefix_limit !== FALSE AND $this->dbprefix != '') - { - $sql .= " WHERE TABLE_NAME LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr); - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @access protected - * @param string the table name - * @return string - */ - protected function _list_columns($table = '') - { - return "SELECT COLUMN_NAME FROM all_tab_columns WHERE table_name = '$table'"; - } - - // -------------------------------------------------------------------- - - /** - * Field data query - * - * Generates a platform-specific query so that the column data can be retrieved - * - * @access public - * @param string the table name - * @return object - */ - protected function _field_data($table) - { - return "SELECT * FROM ".$table." where rownum = 1"; - } - - // -------------------------------------------------------------------- - - /** - * The error message string - * - * @access protected - * @return string - */ - protected function _error_message() - { - // If the error was during connection, no conn_id should be passed - $error = is_resource($this->conn_id) ? oci_error($this->conn_id) : oci_error(); - return $error['message']; - } - - // -------------------------------------------------------------------- - - /** - * The error message number - * - * @access protected - * @return integer - */ - protected function _error_number() - { - // Same as _error_message() - $error = is_resource($this->conn_id) ? oci_error($this->conn_id) : oci_error(); - return $error['code']; - } - - // -------------------------------------------------------------------- - - /** - * Escape the SQL Identifiers - * - * This function escapes column and table names - * - * @access protected - * @param string - * @return string - */ - protected function _escape_identifiers($item) - { - if ($this->_escape_char == '') - { - return $item; - } - - foreach ($this->_reserved_identifiers as $id) - { - if (strpos($item, '.'.$id) !== FALSE) - { - $str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item); - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - } - - if (strpos($item, '.') !== FALSE) - { - $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; - } - else - { - $str = $this->_escape_char.$item.$this->_escape_char; - } - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - - // -------------------------------------------------------------------- - - /** - * From Tables - * - * This function implicitly groups FROM tables so there is no confusion - * about operator precedence in harmony with SQL standards - * - * @access protected - * @param type - * @return type - */ - protected function _from_tables($tables) - { - if ( ! is_array($tables)) - { - $tables = array($tables); - } - - return implode(', ', $tables); - } - - // -------------------------------------------------------------------- - - /** - * Insert statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - protected function _insert($table, $keys, $values) - { - return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; - } - - // -------------------------------------------------------------------- - - /** - * Insert_batch statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access protected - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - protected function _insert_batch($table, $keys, $values) - { - $keys = implode(', ', $keys); - $sql = "INSERT ALL\n"; - - for ($i = 0, $c = count($values); $i < $c; $i++) - { - $sql .= ' INTO ' . $table . ' (' . $keys . ') VALUES ' . $values[$i] . "\n"; - } - - $sql .= 'SELECT * FROM dual'; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @access protected - * @param string the table name - * @param array the update data - * @param array the where clause - * @param array the orderby clause - * @param array the limit clause - * @return string - */ - protected function _update($table, $values, $where, $orderby = array(), $limit = FALSE) - { - foreach ($values as $key => $val) - { - $valstr[] = $key." = ".$val; - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):''; - - $sql = "UPDATE ".$table." SET ".implode(', ', $valstr); - - $sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : ''; - - $sql .= $orderby.$limit; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * If the database does not support the truncate() command - * This function maps to "DELETE FROM table" - * - * @access protected - * @param string the table name - * @return string - */ - protected function _truncate($table) - { - return "TRUNCATE TABLE ".$table; - } - - // -------------------------------------------------------------------- - - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @access protected - * @param string the table name - * @param array the where clause - * @param string the limit clause - * @return string - */ - protected function _delete($table, $where = array(), $like = array(), $limit = FALSE) - { - $conditions = ''; - - if (count($where) > 0 OR count($like) > 0) - { - $conditions = "\nWHERE "; - $conditions .= implode("\n", $this->ar_where); - - if (count($where) > 0 && count($like) > 0) - { - $conditions .= " AND "; - } - $conditions .= implode("\n", $like); - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - return "DELETE FROM ".$table.$conditions.$limit; - } - - // -------------------------------------------------------------------- - - /** - * Limit string - * - * Generates a platform-specific LIMIT clause - * - * @access protected - * @param string the sql query string - * @param integer the number of rows to limit the query to - * @param integer the offset value - * @return string - */ - protected function _limit($sql, $limit, $offset) - { - $limit = $offset + $limit; - $newsql = "SELECT * FROM (select inner_query.*, rownum rnum FROM ($sql) inner_query WHERE rownum < $limit)"; - - if ($offset != 0) - { - $newsql .= " WHERE rnum >= $offset"; - } - - // remember that we used limits - $this->limit_used = TRUE; - - return $newsql; - } - - // -------------------------------------------------------------------- - - /** - * Close DB Connection - * - * @access protected - * @param resource - * @return void - */ - protected function _close($conn_id) - { - @oci_close($conn_id); - } - - -} - - - -/* End of file oci8_driver.php */ -/* Location: ./system/database/drivers/oci8/oci8_driver.php */ diff --git a/donjo-sys/database/drivers/oci8/oci8_forge.php b/donjo-sys/database/drivers/oci8/oci8_forge.php deleted file mode 100644 index 119180181..000000000 --- a/donjo-sys/database/drivers/oci8/oci8_forge.php +++ /dev/null @@ -1,249 +0,0 @@ -db->_escape_identifiers($table)." ("; - $current_field_count = 0; - - foreach ($fields as $field=>$attributes) - { - // Numeric field names aren't allowed in databases, so if the key is - // numeric, we know it was assigned by PHP and the developer manually - // entered the field information, so we'll simply add it to the list - if (is_numeric($field)) - { - $sql .= "\n\t$attributes"; - } - else - { - $attributes = array_change_key_case($attributes, CASE_UPPER); - - $sql .= "\n\t".$this->db->_protect_identifiers($field); - - $sql .= ' '.$attributes['TYPE']; - - if (array_key_exists('CONSTRAINT', $attributes)) - { - $sql .= '('.$attributes['CONSTRAINT'].')'; - } - - if (array_key_exists('UNSIGNED', $attributes) && $attributes['UNSIGNED'] === TRUE) - { - $sql .= ' UNSIGNED'; - } - - if (array_key_exists('DEFAULT', $attributes)) - { - $sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\''; - } - - if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE) - { - $sql .= ' AUTO_INCREMENT'; - } - } - - // don't add a comma on the end of the last field - if (++$current_field_count < count($fields)) - { - $sql .= ','; - } - } - - if (count($primary_keys) > 0) - { - $primary_keys = $this->db->_protect_identifiers($primary_keys); - $sql .= ",\n\tPRIMARY KEY (" . implode(', ', $primary_keys) . ")"; - } - - if (is_array($keys) && count($keys) > 0) - { - foreach ($keys as $key) - { - if (is_array($key)) - { - $key = $this->db->_protect_identifiers($key); - } - else - { - $key = array($this->db->_protect_identifiers($key)); - } - - $sql .= ",\n\tUNIQUE COLUMNS (" . implode(', ', $key) . ")"; - } - } - - $sql .= "\n)"; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Drop Table - * - * @access private - * @return bool - */ - function _drop_table($table) - { - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Alter table query - * - * Generates a platform-specific query so that a table can be altered - * Called by add_column(), drop_column(), and column_alter(), - * - * @access private - * @param string the ALTER type (ADD, DROP, CHANGE) - * @param string the column name - * @param string the table name - * @param string the column definition - * @param string the default value - * @param boolean should 'NOT NULL' be added - * @param string the field after which we should add the new field - * @return object - */ - function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '') - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table)." $alter_type ".$this->db->_protect_identifiers($column_name); - - // DROP has everything it needs now. - if ($alter_type == 'DROP') - { - return $sql; - } - - $sql .= " $column_definition"; - - if ($default_value != '') - { - $sql .= " DEFAULT \"$default_value\""; - } - - if ($null === NULL) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if ($after_field != '') - { - $sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field); - } - - return $sql; - - } - - // -------------------------------------------------------------------- - - /** - * Rename a table - * - * Generates a platform-specific query so that a table can be renamed - * - * @access private - * @param string the old table name - * @param string the new table name - * @return string - */ - function _rename_table($table_name, $new_table_name) - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table_name)." RENAME TO ".$this->db->_protect_identifiers($new_table_name); - return $sql; - } - - -} - -/* End of file oci8_forge.php */ -/* Location: ./system/database/drivers/oci8/oci8_forge.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/oci8/oci8_result.php b/donjo-sys/database/drivers/oci8/oci8_result.php deleted file mode 100644 index 2696421fe..000000000 --- a/donjo-sys/database/drivers/oci8/oci8_result.php +++ /dev/null @@ -1,218 +0,0 @@ -num_rows === 0 && count($this->result_array()) > 0) - { - $this->num_rows = count($this->result_array()); - @oci_execute($this->stmt_id, OCI_DEFAULT); - - if ($this->curs_id) - { - @oci_execute($this->curs_id, OCI_DEFAULT); - } - } - - return $this->num_rows; - } - - // -------------------------------------------------------------------- - - /** - * Number of fields in the result set - * - * @access public - * @return integer - */ - public function num_fields() - { - $count = @oci_num_fields($this->stmt_id); - - // if we used a limit we subtract it - if ($this->limit_used) - { - $count = $count - 1; - } - - return $count; - } - - // -------------------------------------------------------------------- - - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @access public - * @return array - */ - public function list_fields() - { - $field_names = array(); - for ($c = 1, $fieldCount = $this->num_fields(); $c <= $fieldCount; $c++) - { - $field_names[] = oci_field_name($this->stmt_id, $c); - } - return $field_names; - } - - // -------------------------------------------------------------------- - - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @access public - * @return array - */ - public function field_data() - { - $retval = array(); - for ($c = 1, $fieldCount = $this->num_fields(); $c <= $fieldCount; $c++) - { - $F = new stdClass(); - $F->name = oci_field_name($this->stmt_id, $c); - $F->type = oci_field_type($this->stmt_id, $c); - $F->max_length = oci_field_size($this->stmt_id, $c); - - $retval[] = $F; - } - - return $retval; - } - - // -------------------------------------------------------------------- - - /** - * Free the result - * - * @return null - */ - public function free_result() - { - if (is_resource($this->result_id)) - { - oci_free_statement($this->result_id); - $this->result_id = FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Result - associative array - * - * Returns the result set as an array - * - * @access protected - * @return array - */ - protected function _fetch_assoc() - { - $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id; - return oci_fetch_assoc($id); - } - - // -------------------------------------------------------------------- - - /** - * Result - object - * - * Returns the result set as an object - * - * @access protected - * @return object - */ - protected function _fetch_object() - { - $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id; - return @oci_fetch_object($id); - } - - // -------------------------------------------------------------------- - - /** - * Query result. "array" version. - * - * @access public - * @return array - */ - public function result_array() - { - if (count($this->result_array) > 0) - { - return $this->result_array; - } - - $row = NULL; - while ($row = $this->_fetch_assoc()) - { - $this->result_array[] = $row; - } - - return $this->result_array; - } - - // -------------------------------------------------------------------- - - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero - * - * @access protected - * @return array - */ - protected function _data_seek($n = 0) - { - return FALSE; // Not needed - } - -} - - -/* End of file oci8_result.php */ -/* Location: ./system/database/drivers/oci8/oci8_result.php */ diff --git a/donjo-sys/database/drivers/oci8/oci8_utility.php b/donjo-sys/database/drivers/oci8/oci8_utility.php deleted file mode 100644 index 06821c94f..000000000 --- a/donjo-sys/database/drivers/oci8/oci8_utility.php +++ /dev/null @@ -1,88 +0,0 @@ -db->display_error('db_unsuported_feature'); - } -} - -/* End of file oci8_utility.php */ -/* Location: ./system/database/drivers/oci8/oci8_utility.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/odbc/index.html b/donjo-sys/database/drivers/odbc/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/database/drivers/odbc/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/database/drivers/odbc/odbc_driver.php b/donjo-sys/database/drivers/odbc/odbc_driver.php deleted file mode 100644 index 061319957..000000000 --- a/donjo-sys/database/drivers/odbc/odbc_driver.php +++ /dev/null @@ -1,638 +0,0 @@ -_random_keyword = ' RND('.time().')'; // database specific random keyword - } - - /** - * Non-persistent database connection - * - * @access private called by the base class - * @return resource - */ - function db_connect() - { - return @odbc_connect($this->hostname, $this->username, $this->password); - } - - // -------------------------------------------------------------------- - - /** - * Persistent database connection - * - * @access private called by the base class - * @return resource - */ - function db_pconnect() - { - return @odbc_pconnect($this->hostname, $this->username, $this->password); - } - - // -------------------------------------------------------------------- - - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @access public - * @return void - */ - function reconnect() - { - // not implemented in odbc - } - - // -------------------------------------------------------------------- - - /** - * Select the database - * - * @access private called by the base class - * @return resource - */ - function db_select() - { - // Not needed for ODBC - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Set client character set - * - * @access public - * @param string - * @param string - * @return resource - */ - function db_set_charset($charset, $collation) - { - // @todo - add support if needed - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Version number query string - * - * @access public - * @return string - */ - function _version() - { - return "SELECT version() AS ver"; - } - - // -------------------------------------------------------------------- - - /** - * Execute the query - * - * @access private called by the base class - * @param string an SQL query - * @return resource - */ - function _execute($sql) - { - $sql = $this->_prep_query($sql); - return @odbc_exec($this->conn_id, $sql); - } - - // -------------------------------------------------------------------- - - /** - * Prep the query - * - * If needed, each database adapter can prep the query string - * - * @access private called by execute() - * @param string an SQL query - * @return string - */ - function _prep_query($sql) - { - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Begin Transaction - * - * @access public - * @return bool - */ - function trans_begin($test_mode = FALSE) - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE; - - return odbc_autocommit($this->conn_id, FALSE); - } - - // -------------------------------------------------------------------- - - /** - * Commit Transaction - * - * @access public - * @return bool - */ - function trans_commit() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $ret = odbc_commit($this->conn_id); - odbc_autocommit($this->conn_id, TRUE); - return $ret; - } - - // -------------------------------------------------------------------- - - /** - * Rollback Transaction - * - * @access public - * @return bool - */ - function trans_rollback() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $ret = odbc_rollback($this->conn_id); - odbc_autocommit($this->conn_id, TRUE); - return $ret; - } - - // -------------------------------------------------------------------- - - /** - * Escape String - * - * @access public - * @param string - * @param bool whether or not the string will be used in a LIKE condition - * @return string - */ - function escape_str($str, $like = FALSE) - { - if (is_array($str)) - { - foreach ($str as $key => $val) - { - $str[$key] = $this->escape_str($val, $like); - } - - return $str; - } - - // ODBC doesn't require escaping - $str = remove_invisible_characters($str); - - // escape LIKE condition wildcards - if ($like === TRUE) - { - $str = str_replace( array('%', '_', $this->_like_escape_chr), - array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr), - $str); - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Affected Rows - * - * @access public - * @return integer - */ - function affected_rows() - { - return @odbc_num_rows($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Insert ID - * - * @access public - * @return integer - */ - function insert_id() - { - return @odbc_insert_id($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * "Count All" query - * - * Generates a platform-specific query string that counts all records in - * the specified database - * - * @access public - * @param string - * @return string - */ - function count_all($table = '') - { - if ($table == '') - { - return 0; - } - - $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); - - if ($query->num_rows() == 0) - { - return 0; - } - - $row = $query->row(); - $this->_reset_select(); - return (int) $row->numrows; - } - - // -------------------------------------------------------------------- - - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @access private - * @param boolean - * @return string - */ - function _list_tables($prefix_limit = FALSE) - { - $sql = "SHOW TABLES FROM `".$this->database."`"; - - if ($prefix_limit !== FALSE AND $this->dbprefix != '') - { - //$sql .= " LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr); - return FALSE; // not currently supported - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @access public - * @param string the table name - * @return string - */ - function _list_columns($table = '') - { - return "SHOW COLUMNS FROM ".$table; - } - - // -------------------------------------------------------------------- - - /** - * Field data query - * - * Generates a platform-specific query so that the column data can be retrieved - * - * @access public - * @param string the table name - * @return object - */ - function _field_data($table) - { - return "SELECT TOP 1 FROM ".$table; - } - - // -------------------------------------------------------------------- - - /** - * The error message string - * - * @access private - * @return string - */ - function _error_message() - { - return odbc_errormsg($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * The error message number - * - * @access private - * @return integer - */ - function _error_number() - { - return odbc_error($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Escape the SQL Identifiers - * - * This function escapes column and table names - * - * @access private - * @param string - * @return string - */ - function _escape_identifiers($item) - { - if ($this->_escape_char == '') - { - return $item; - } - - foreach ($this->_reserved_identifiers as $id) - { - if (strpos($item, '.'.$id) !== FALSE) - { - $str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item); - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - } - - if (strpos($item, '.') !== FALSE) - { - $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; - } - else - { - $str = $this->_escape_char.$item.$this->_escape_char; - } - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - - // -------------------------------------------------------------------- - - /** - * From Tables - * - * This function implicitly groups FROM tables so there is no confusion - * about operator precedence in harmony with SQL standards - * - * @access public - * @param type - * @return type - */ - function _from_tables($tables) - { - if ( ! is_array($tables)) - { - $tables = array($tables); - } - - return '('.implode(', ', $tables).')'; - } - - // -------------------------------------------------------------------- - - /** - * Insert statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert($table, $keys, $values) - { - return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; - } - - // -------------------------------------------------------------------- - - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @access public - * @param string the table name - * @param array the update data - * @param array the where clause - * @param array the orderby clause - * @param array the limit clause - * @return string - */ - function _update($table, $values, $where, $orderby = array(), $limit = FALSE) - { - foreach ($values as $key => $val) - { - $valstr[] = $key." = ".$val; - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):''; - - $sql = "UPDATE ".$table." SET ".implode(', ', $valstr); - - $sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : ''; - - $sql .= $orderby.$limit; - - return $sql; - } - - - // -------------------------------------------------------------------- - - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * If the database does not support the truncate() command - * This function maps to "DELETE FROM table" - * - * @access public - * @param string the table name - * @return string - */ - function _truncate($table) - { - return $this->_delete($table); - } - - // -------------------------------------------------------------------- - - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @access public - * @param string the table name - * @param array the where clause - * @param string the limit clause - * @return string - */ - function _delete($table, $where = array(), $like = array(), $limit = FALSE) - { - $conditions = ''; - - if (count($where) > 0 OR count($like) > 0) - { - $conditions = "\nWHERE "; - $conditions .= implode("\n", $this->ar_where); - - if (count($where) > 0 && count($like) > 0) - { - $conditions .= " AND "; - } - $conditions .= implode("\n", $like); - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - return "DELETE FROM ".$table.$conditions.$limit; - } - - // -------------------------------------------------------------------- - - /** - * Limit string - * - * Generates a platform-specific LIMIT clause - * - * @access public - * @param string the sql query string - * @param integer the number of rows to limit the query to - * @param integer the offset value - * @return string - */ - function _limit($sql, $limit, $offset) - { - // Does ODBC doesn't use the LIMIT clause? - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Close DB Connection - * - * @access public - * @param resource - * @return void - */ - function _close($conn_id) - { - @odbc_close($conn_id); - } - - -} - - - -/* End of file odbc_driver.php */ -/* Location: ./system/database/drivers/odbc/odbc_driver.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/odbc/odbc_forge.php b/donjo-sys/database/drivers/odbc/odbc_forge.php deleted file mode 100644 index ed8d9d796..000000000 --- a/donjo-sys/database/drivers/odbc/odbc_forge.php +++ /dev/null @@ -1,267 +0,0 @@ -db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Drop database - * - * @access private - * @param string the database name - * @return bool - */ - function _drop_database($name) - { - // ODBC has no "drop database" command since it's - // designed to connect to an existing database - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Create Table - * - * @access private - * @param string the table name - * @param array the fields - * @param mixed primary key(s) - * @param mixed key(s) - * @param boolean should 'IF NOT EXISTS' be added to the SQL - * @return bool - */ - function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists) - { - $sql = 'CREATE TABLE '; - - if ($if_not_exists === TRUE) - { - $sql .= 'IF NOT EXISTS '; - } - - $sql .= $this->db->_escape_identifiers($table)." ("; - $current_field_count = 0; - - foreach ($fields as $field=>$attributes) - { - // Numeric field names aren't allowed in databases, so if the key is - // numeric, we know it was assigned by PHP and the developer manually - // entered the field information, so we'll simply add it to the list - if (is_numeric($field)) - { - $sql .= "\n\t$attributes"; - } - else - { - $attributes = array_change_key_case($attributes, CASE_UPPER); - - $sql .= "\n\t".$this->db->_protect_identifiers($field); - - $sql .= ' '.$attributes['TYPE']; - - if (array_key_exists('CONSTRAINT', $attributes)) - { - $sql .= '('.$attributes['CONSTRAINT'].')'; - } - - if (array_key_exists('UNSIGNED', $attributes) && $attributes['UNSIGNED'] === TRUE) - { - $sql .= ' UNSIGNED'; - } - - if (array_key_exists('DEFAULT', $attributes)) - { - $sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\''; - } - - if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE) - { - $sql .= ' AUTO_INCREMENT'; - } - } - - // don't add a comma on the end of the last field - if (++$current_field_count < count($fields)) - { - $sql .= ','; - } - } - - if (count($primary_keys) > 0) - { - $primary_keys = $this->db->_protect_identifiers($primary_keys); - $sql .= ",\n\tPRIMARY KEY (" . implode(', ', $primary_keys) . ")"; - } - - if (is_array($keys) && count($keys) > 0) - { - foreach ($keys as $key) - { - if (is_array($key)) - { - $key = $this->db->_protect_identifiers($key); - } - else - { - $key = array($this->db->_protect_identifiers($key)); - } - - $sql .= ",\n\tFOREIGN KEY (" . implode(', ', $key) . ")"; - } - } - - $sql .= "\n)"; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Drop Table - * - * @access private - * @return bool - */ - function _drop_table($table) - { - // Not a supported ODBC feature - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Alter table query - * - * Generates a platform-specific query so that a table can be altered - * Called by add_column(), drop_column(), and column_alter(), - * - * @access private - * @param string the ALTER type (ADD, DROP, CHANGE) - * @param string the column name - * @param string the table name - * @param string the column definition - * @param string the default value - * @param boolean should 'NOT NULL' be added - * @param string the field after which we should add the new field - * @return object - */ - function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '') - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table)." $alter_type ".$this->db->_protect_identifiers($column_name); - - // DROP has everything it needs now. - if ($alter_type == 'DROP') - { - return $sql; - } - - $sql .= " $column_definition"; - - if ($default_value != '') - { - $sql .= " DEFAULT \"$default_value\""; - } - - if ($null === NULL) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if ($after_field != '') - { - $sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field); - } - - return $sql; - - } - - - // -------------------------------------------------------------------- - - /** - * Rename a table - * - * Generates a platform-specific query so that a table can be renamed - * - * @access private - * @param string the old table name - * @param string the new table name - * @return string - */ - function _rename_table($table_name, $new_table_name) - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table_name)." RENAME TO ".$this->db->_protect_identifiers($new_table_name); - return $sql; - } - - -} - -/* End of file odbc_forge.php */ -/* Location: ./system/database/drivers/odbc/odbc_forge.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/odbc/odbc_result.php b/donjo-sys/database/drivers/odbc/odbc_result.php deleted file mode 100644 index 2f70e0a5c..000000000 --- a/donjo-sys/database/drivers/odbc/odbc_result.php +++ /dev/null @@ -1,229 +0,0 @@ -result_id); - } - - // -------------------------------------------------------------------- - - /** - * Number of fields in the result set - * - * @access public - * @return integer - */ - function num_fields() - { - return @odbc_num_fields($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @access public - * @return array - */ - function list_fields() - { - $field_names = array(); - for ($i = 0; $i < $this->num_fields(); $i++) - { - $field_names[] = odbc_field_name($this->result_id, $i); - } - - return $field_names; - } - - // -------------------------------------------------------------------- - - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @access public - * @return array - */ - function field_data() - { - $retval = array(); - for ($i = 0; $i < $this->num_fields(); $i++) - { - $F = new stdClass(); - $F->name = odbc_field_name($this->result_id, $i); - $F->type = odbc_field_type($this->result_id, $i); - $F->max_length = odbc_field_len($this->result_id, $i); - $F->primary_key = 0; - $F->default = ''; - - $retval[] = $F; - } - - return $retval; - } - - // -------------------------------------------------------------------- - - /** - * Free the result - * - * @return null - */ - function free_result() - { - if (is_resource($this->result_id)) - { - odbc_free_result($this->result_id); - $this->result_id = FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero - * - * @access private - * @return array - */ - function _data_seek($n = 0) - { - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Result - associative array - * - * Returns the result set as an array - * - * @access private - * @return array - */ - function _fetch_assoc() - { - if (function_exists('odbc_fetch_object')) - { - return odbc_fetch_array($this->result_id); - } - else - { - return $this->_odbc_fetch_array($this->result_id); - } - } - - // -------------------------------------------------------------------- - - /** - * Result - object - * - * Returns the result set as an object - * - * @access private - * @return object - */ - function _fetch_object() - { - if (function_exists('odbc_fetch_object')) - { - return odbc_fetch_object($this->result_id); - } - else - { - return $this->_odbc_fetch_object($this->result_id); - } - } - - - /** - * Result - object - * - * subsititutes the odbc_fetch_object function when - * not available (odbc_fetch_object requires unixODBC) - * - * @access private - * @return object - */ - function _odbc_fetch_object(& $odbc_result) { - $rs = array(); - $rs_obj = FALSE; - if (odbc_fetch_into($odbc_result, $rs)) { - foreach ($rs as $k=>$v) { - $field_name= odbc_field_name($odbc_result, $k+1); - $rs_obj->$field_name = $v; - } - } - return $rs_obj; - } - - - /** - * Result - array - * - * subsititutes the odbc_fetch_array function when - * not available (odbc_fetch_array requires unixODBC) - * - * @access private - * @return array - */ - function _odbc_fetch_array(& $odbc_result) { - $rs = array(); - $rs_assoc = FALSE; - if (odbc_fetch_into($odbc_result, $rs)) { - $rs_assoc=array(); - foreach ($rs as $k=>$v) { - $field_name= odbc_field_name($odbc_result, $k+1); - $rs_assoc[$field_name] = $v; - } - } - return $rs_assoc; - } - -} - - -/* End of file odbc_result.php */ -/* Location: ./system/database/drivers/odbc/odbc_result.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/odbc/odbc_utility.php b/donjo-sys/database/drivers/odbc/odbc_utility.php deleted file mode 100644 index ae099c128..000000000 --- a/donjo-sys/database/drivers/odbc/odbc_utility.php +++ /dev/null @@ -1,104 +0,0 @@ -db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Optimize table query - * - * Generates a platform-specific query so that a table can be optimized - * - * @access private - * @param string the table name - * @return object - */ - function _optimize_table($table) - { - // Not a supported ODBC feature - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Repair table query - * - * Generates a platform-specific query so that a table can be repaired - * - * @access private - * @param string the table name - * @return object - */ - function _repair_table($table) - { - // Not a supported ODBC feature - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * ODBC Export - * - * @access private - * @param array Preferences - * @return mixed - */ - function _backup($params = array()) - { - // Currently unsupported - return $this->db->display_error('db_unsuported_feature'); - } - -} - -/* End of file odbc_utility.php */ -/* Location: ./system/database/drivers/odbc/odbc_utility.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/pdo/index.html b/donjo-sys/database/drivers/pdo/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/database/drivers/pdo/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/database/drivers/pdo/pdo_driver.php b/donjo-sys/database/drivers/pdo/pdo_driver.php deleted file mode 100644 index 3c2d08b9f..000000000 --- a/donjo-sys/database/drivers/pdo/pdo_driver.php +++ /dev/null @@ -1,812 +0,0 @@ -hostname, 'mysql') !== FALSE) - { - $this->_like_escape_str = ''; - $this->_like_escape_chr = ''; - - //Prior to this version, the charset can't be set in the dsn - if(is_php('5.3.6')) - { - $this->hostname .= ";charset={$this->char_set}"; - } - - //Set the charset with the connection options - $this->options['PDO::MYSQL_ATTR_INIT_COMMAND'] = "SET NAMES {$this->char_set}"; - } - elseif (strpos($this->hostname, 'odbc') !== FALSE) - { - $this->_like_escape_str = " {escape '%s'} "; - $this->_like_escape_chr = '!'; - } - else - { - $this->_like_escape_str = " ESCAPE '%s' "; - $this->_like_escape_chr = '!'; - } - - empty($this->database) OR $this->hostname .= ';dbname='.$this->database; - - $this->trans_enabled = FALSE; - - $this->_random_keyword = ' RND('.time().')'; // database specific random keyword - } - - /** - * Non-persistent database connection - * - * @access private called by the base class - * @return resource - */ - function db_connect() - { - $this->options['PDO::ATTR_ERRMODE'] = PDO::ERRMODE_SILENT; - - return new PDO($this->hostname, $this->username, $this->password, $this->options); - } - - // -------------------------------------------------------------------- - - /** - * Persistent database connection - * - * @access private called by the base class - * @return resource - */ - function db_pconnect() - { - $this->options['PDO::ATTR_ERRMODE'] = PDO::ERRMODE_SILENT; - $this->options['PDO::ATTR_PERSISTENT'] = TRUE; - - return new PDO($this->hostname, $this->username, $this->password, $this->options); - } - - // -------------------------------------------------------------------- - - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @access public - * @return void - */ - function reconnect() - { - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Select the database - * - * @access private called by the base class - * @return resource - */ - function db_select() - { - // Not needed for PDO - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Set client character set - * - * @access public - * @param string - * @param string - * @return resource - */ - function db_set_charset($charset, $collation) - { - // @todo - add support if needed - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Version number query string - * - * @access public - * @return string - */ - function _version() - { - return $this->conn_id->getAttribute(PDO::ATTR_CLIENT_VERSION); - } - - // -------------------------------------------------------------------- - - /** - * Execute the query - * - * @access private called by the base class - * @param string an SQL query - * @return object - */ - function _execute($sql) - { - $sql = $this->_prep_query($sql); - $result_id = $this->conn_id->prepare($sql); - - if (is_object($result_id) && $result_id->execute()) - { - if (is_numeric(stripos($sql, 'SELECT'))) - { - $this->affect_rows = count($result_id->fetchAll()); - } - else - { - $this->affect_rows = $result_id->rowCount(); - } - } - else - { - $this->affect_rows = 0; - return FALSE; - } - - return $result_id; - } - - // -------------------------------------------------------------------- - - /** - * Prep the query - * - * If needed, each database adapter can prep the query string - * - * @access private called by execute() - * @param string an SQL query - * @return string - */ - function _prep_query($sql) - { - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Begin Transaction - * - * @access public - * @return bool - */ - function trans_begin($test_mode = FALSE) - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = (bool) ($test_mode === TRUE); - - return $this->conn_id->beginTransaction(); - } - - // -------------------------------------------------------------------- - - /** - * Commit Transaction - * - * @access public - * @return bool - */ - function trans_commit() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $ret = $this->conn->commit(); - return $ret; - } - - // -------------------------------------------------------------------- - - /** - * Rollback Transaction - * - * @access public - * @return bool - */ - function trans_rollback() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $ret = $this->conn_id->rollBack(); - return $ret; - } - - // -------------------------------------------------------------------- - - /** - * Escape String - * - * @access public - * @param string - * @param bool whether or not the string will be used in a LIKE condition - * @return string - */ - function escape_str($str, $like = FALSE) - { - if (is_array($str)) - { - foreach ($str as $key => $val) - { - $str[$key] = $this->escape_str($val, $like); - } - - return $str; - } - - //Escape the string - $str = $this->conn_id->quote($str); - - //If there are duplicated quotes, trim them away - if (strpos($str, "'") === 0) - { - $str = substr($str, 1, -1); - } - - // escape LIKE condition wildcards - if ($like === TRUE) - { - $str = str_replace( array('%', '_', $this->_like_escape_chr), - array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr), - $str); - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Affected Rows - * - * @access public - * @return integer - */ - function affected_rows() - { - return $this->affect_rows; - } - - // -------------------------------------------------------------------- - - /** - * Insert ID - * - * @access public - * @return integer - */ - function insert_id($name=NULL) - { - //Convenience method for postgres insertid - if (strpos($this->hostname, 'pgsql') !== FALSE) - { - $v = $this->_version(); - - $table = func_num_args() > 0 ? func_get_arg(0) : NULL; - - if ($table == NULL && $v >= '8.1') - { - $sql='SELECT LASTVAL() as ins_id'; - } - $query = $this->query($sql); - $row = $query->row(); - return $row->ins_id; - } - else - { - return $this->conn_id->lastInsertId($name); - } - } - - // -------------------------------------------------------------------- - - /** - * "Count All" query - * - * Generates a platform-specific query string that counts all records in - * the specified database - * - * @access public - * @param string - * @return string - */ - function count_all($table = '') - { - if ($table == '') - { - return 0; - } - - $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); - - if ($query->num_rows() == 0) - { - return 0; - } - - $row = $query->row(); - $this->_reset_select(); - return (int) $row->numrows; - } - - // -------------------------------------------------------------------- - - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @access private - * @param boolean - * @return string - */ - function _list_tables($prefix_limit = FALSE) - { - $sql = "SHOW TABLES FROM `".$this->database."`"; - - if ($prefix_limit !== FALSE AND $this->dbprefix != '') - { - //$sql .= " LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr); - return FALSE; // not currently supported - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @access public - * @param string the table name - * @return string - */ - function _list_columns($table = '') - { - return "SHOW COLUMNS FROM ".$table; - } - - // -------------------------------------------------------------------- - - /** - * Field data query - * - * Generates a platform-specific query so that the column data can be retrieved - * - * @access public - * @param string the table name - * @return object - */ - function _field_data($table) - { - return "SELECT TOP 1 FROM ".$table; - } - - // -------------------------------------------------------------------- - - /** - * The error message string - * - * @access private - * @return string - */ - function _error_message() - { - $error_array = $this->conn_id->errorInfo(); - return $error_array[2]; - } - - // -------------------------------------------------------------------- - - /** - * The error message number - * - * @access private - * @return integer - */ - function _error_number() - { - return $this->conn_id->errorCode(); - } - - // -------------------------------------------------------------------- - - /** - * Escape the SQL Identifiers - * - * This function escapes column and table names - * - * @access private - * @param string - * @return string - */ - function _escape_identifiers($item) - { - if ($this->_escape_char == '') - { - return $item; - } - - foreach ($this->_reserved_identifiers as $id) - { - if (strpos($item, '.'.$id) !== FALSE) - { - $str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item); - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - } - - if (strpos($item, '.') !== FALSE) - { - $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; - - } - else - { - $str = $this->_escape_char.$item.$this->_escape_char; - } - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - - // -------------------------------------------------------------------- - - /** - * From Tables - * - * This function implicitly groups FROM tables so there is no confusion - * about operator precedence in harmony with SQL standards - * - * @access public - * @param type - * @return type - */ - function _from_tables($tables) - { - if ( ! is_array($tables)) - { - $tables = array($tables); - } - - return (count($tables) == 1) ? $tables[0] : '('.implode(', ', $tables).')'; - } - - // -------------------------------------------------------------------- - - /** - * Insert statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert($table, $keys, $values) - { - return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; - } - - // -------------------------------------------------------------------- - - /** - * Insert_batch statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert_batch($table, $keys, $values) - { - return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values); - } - - // -------------------------------------------------------------------- - - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @access public - * @param string the table name - * @param array the update data - * @param array the where clause - * @param array the orderby clause - * @param array the limit clause - * @return string - */ - function _update($table, $values, $where, $orderby = array(), $limit = FALSE) - { - foreach ($values as $key => $val) - { - $valstr[] = $key." = ".$val; - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):''; - - $sql = "UPDATE ".$table." SET ".implode(', ', $valstr); - - $sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : ''; - - $sql .= $orderby.$limit; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Update_Batch statement - * - * Generates a platform-specific batch update string from the supplied data - * - * @access public - * @param string the table name - * @param array the update data - * @param array the where clause - * @return string - */ - function _update_batch($table, $values, $index, $where = NULL) - { - $ids = array(); - $where = ($where != '' AND count($where) >=1) ? implode(" ", $where).' AND ' : ''; - - foreach ($values as $key => $val) - { - $ids[] = $val[$index]; - - foreach (array_keys($val) as $field) - { - if ($field != $index) - { - $final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field]; - } - } - } - - $sql = "UPDATE ".$table." SET "; - $cases = ''; - - foreach ($final as $k => $v) - { - $cases .= $k.' = CASE '."\n"; - foreach ($v as $row) - { - $cases .= $row."\n"; - } - - $cases .= 'ELSE '.$k.' END, '; - } - - $sql .= substr($cases, 0, -2); - - $sql .= ' WHERE '.$where.$index.' IN ('.implode(',', $ids).')'; - - return $sql; - } - - - // -------------------------------------------------------------------- - - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * If the database does not support the truncate() command - * This function maps to "DELETE FROM table" - * - * @access public - * @param string the table name - * @return string - */ - function _truncate($table) - { - return $this->_delete($table); - } - - // -------------------------------------------------------------------- - - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @access public - * @param string the table name - * @param array the where clause - * @param string the limit clause - * @return string - */ - function _delete($table, $where = array(), $like = array(), $limit = FALSE) - { - $conditions = ''; - - if (count($where) > 0 OR count($like) > 0) - { - $conditions = "\nWHERE "; - $conditions .= implode("\n", $this->ar_where); - - if (count($where) > 0 && count($like) > 0) - { - $conditions .= " AND "; - } - $conditions .= implode("\n", $like); - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - return "DELETE FROM ".$table.$conditions.$limit; - } - - // -------------------------------------------------------------------- - - /** - * Limit string - * - * Generates a platform-specific LIMIT clause - * - * @access public - * @param string the sql query string - * @param integer the number of rows to limit the query to - * @param integer the offset value - * @return string - */ - function _limit($sql, $limit, $offset) - { - if (strpos($this->hostname, 'cubrid') !== FALSE || strpos($this->hostname, 'sqlite') !== FALSE) - { - if ($offset == 0) - { - $offset = ''; - } - else - { - $offset .= ", "; - } - - return $sql."LIMIT ".$offset.$limit; - } - else - { - $sql .= "LIMIT ".$limit; - - if ($offset > 0) - { - $sql .= " OFFSET ".$offset; - } - - return $sql; - } - } - - // -------------------------------------------------------------------- - - /** - * Close DB Connection - * - * @access public - * @param resource - * @return void - */ - function _close($conn_id) - { - $this->conn_id = null; - } - - -} - - - -/* End of file pdo_driver.php */ -/* Location: ./system/database/drivers/pdo/pdo_driver.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/pdo/pdo_forge.php b/donjo-sys/database/drivers/pdo/pdo_forge.php deleted file mode 100644 index 86e829321..000000000 --- a/donjo-sys/database/drivers/pdo/pdo_forge.php +++ /dev/null @@ -1,267 +0,0 @@ -db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Drop database - * - * @access private - * @param string the database name - * @return bool - */ - function _drop_database($name) - { - // PDO has no "drop database" command since it's - // designed to connect to an existing database - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Create Table - * - * @access private - * @param string the table name - * @param array the fields - * @param mixed primary key(s) - * @param mixed key(s) - * @param boolean should 'IF NOT EXISTS' be added to the SQL - * @return bool - */ - function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists) - { - $sql = 'CREATE TABLE '; - - if ($if_not_exists === TRUE) - { - $sql .= 'IF NOT EXISTS '; - } - - $sql .= $this->db->_escape_identifiers($table)." ("; - $current_field_count = 0; - - foreach ($fields as $field=>$attributes) - { - // Numeric field names aren't allowed in databases, so if the key is - // numeric, we know it was assigned by PHP and the developer manually - // entered the field information, so we'll simply add it to the list - if (is_numeric($field)) - { - $sql .= "\n\t$attributes"; - } - else - { - $attributes = array_change_key_case($attributes, CASE_UPPER); - - $sql .= "\n\t".$this->db->_protect_identifiers($field); - - $sql .= ' '.$attributes['TYPE']; - - if (array_key_exists('CONSTRAINT', $attributes)) - { - $sql .= '('.$attributes['CONSTRAINT'].')'; - } - - if (array_key_exists('UNSIGNED', $attributes) && $attributes['UNSIGNED'] === TRUE) - { - $sql .= ' UNSIGNED'; - } - - if (array_key_exists('DEFAULT', $attributes)) - { - $sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\''; - } - - if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE) - { - $sql .= ' AUTO_INCREMENT'; - } - } - - // don't add a comma on the end of the last field - if (++$current_field_count < count($fields)) - { - $sql .= ','; - } - } - - if (count($primary_keys) > 0) - { - $primary_keys = $this->db->_protect_identifiers($primary_keys); - $sql .= ",\n\tPRIMARY KEY (" . implode(', ', $primary_keys) . ")"; - } - - if (is_array($keys) && count($keys) > 0) - { - foreach ($keys as $key) - { - if (is_array($key)) - { - $key = $this->db->_protect_identifiers($key); - } - else - { - $key = array($this->db->_protect_identifiers($key)); - } - - $sql .= ",\n\tFOREIGN KEY (" . implode(', ', $key) . ")"; - } - } - - $sql .= "\n)"; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Drop Table - * - * @access private - * @return bool - */ - function _drop_table($table) - { - // Not a supported PDO feature - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Alter table query - * - * Generates a platform-specific query so that a table can be altered - * Called by add_column(), drop_column(), and column_alter(), - * - * @access private - * @param string the ALTER type (ADD, DROP, CHANGE) - * @param string the column name - * @param string the table name - * @param string the column definition - * @param string the default value - * @param boolean should 'NOT NULL' be added - * @param string the field after which we should add the new field - * @return object - */ - function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '') - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table)." $alter_type ".$this->db->_protect_identifiers($column_name); - - // DROP has everything it needs now. - if ($alter_type == 'DROP') - { - return $sql; - } - - $sql .= " $column_definition"; - - if ($default_value != '') - { - $sql .= " DEFAULT \"$default_value\""; - } - - if ($null === NULL) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if ($after_field != '') - { - $sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field); - } - - return $sql; - - } - - - // -------------------------------------------------------------------- - - /** - * Rename a table - * - * Generates a platform-specific query so that a table can be renamed - * - * @access private - * @param string the old table name - * @param string the new table name - * @return string - */ - function _rename_table($table_name, $new_table_name) - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table_name)." RENAME TO ".$this->db->_protect_identifiers($new_table_name); - return $sql; - } - - -} - -/* End of file pdo_forge.php */ -/* Location: ./system/database/drivers/pdo/pdo_forge.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/pdo/pdo_result.php b/donjo-sys/database/drivers/pdo/pdo_result.php deleted file mode 100644 index 705a66cd7..000000000 --- a/donjo-sys/database/drivers/pdo/pdo_result.php +++ /dev/null @@ -1,184 +0,0 @@ -num_rows)) - { - return $this->num_rows; - } - elseif (($this->num_rows = $this->result_id->rowCount()) > 0) - { - return $this->num_rows; - } - - $this->num_rows = count($this->result_id->fetchAll()); - $this->result_id->execute(); - return $this->num_rows; - } - - // -------------------------------------------------------------------- - - /** - * Number of fields in the result set - * - * @access public - * @return integer - */ - function num_fields() - { - return $this->result_id->columnCount(); - } - - // -------------------------------------------------------------------- - - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @access public - * @return array - */ - function list_fields() - { - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @access public - * @return array - */ - function field_data() - { - $data = array(); - - try - { - for($i = 0; $i < $this->num_fields(); $i++) - { - $data[] = $this->result_id->getColumnMeta($i); - } - - return $data; - } - catch (Exception $e) - { - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Free the result - * - * @return null - */ - function free_result() - { - if (is_object($this->result_id)) - { - $this->result_id = FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero - * - * @access private - * @return array - */ - function _data_seek($n = 0) - { - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Result - associative array - * - * Returns the result set as an array - * - * @access private - * @return array - */ - function _fetch_assoc() - { - return $this->result_id->fetch(PDO::FETCH_ASSOC); - } - - // -------------------------------------------------------------------- - - /** - * Result - object - * - * Returns the result set as an object - * - * @access private - * @return object - */ - function _fetch_object() - { - return $this->result_id->fetchObject(); - } - -} - - -/* End of file pdo_result.php */ -/* Location: ./system/database/drivers/pdo/pdo_result.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/pdo/pdo_utility.php b/donjo-sys/database/drivers/pdo/pdo_utility.php deleted file mode 100644 index da70c342c..000000000 --- a/donjo-sys/database/drivers/pdo/pdo_utility.php +++ /dev/null @@ -1,104 +0,0 @@ -db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Optimize table query - * - * Generates a platform-specific query so that a table can be optimized - * - * @access private - * @param string the table name - * @return object - */ - function _optimize_table($table) - { - // Not a supported PDO feature - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Repair table query - * - * Generates a platform-specific query so that a table can be repaired - * - * @access private - * @param string the table name - * @return object - */ - function _repair_table($table) - { - // Not a supported PDO feature - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * PDO Export - * - * @access private - * @param array Preferences - * @return mixed - */ - function _backup($params = array()) - { - // Currently unsupported - return $this->db->display_error('db_unsuported_feature'); - } - -} - -/* End of file pdo_utility.php */ -/* Location: ./system/database/drivers/pdo/pdo_utility.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/postgre/index.html b/donjo-sys/database/drivers/postgre/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/database/drivers/postgre/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/database/drivers/postgre/postgre_driver.php b/donjo-sys/database/drivers/postgre/postgre_driver.php deleted file mode 100644 index 9e4843f95..000000000 --- a/donjo-sys/database/drivers/postgre/postgre_driver.php +++ /dev/null @@ -1,704 +0,0 @@ - 'host', - 'port' => 'port', - 'database' => 'dbname', - 'username' => 'user', - 'password' => 'password' - ); - - $connect_string = ""; - foreach ($components as $key => $val) - { - if (isset($this->$key) && $this->$key != '') - { - $connect_string .= " $val=".$this->$key; - } - } - return trim($connect_string); - } - - // -------------------------------------------------------------------- - - /** - * Non-persistent database connection - * - * @access private called by the base class - * @return resource - */ - function db_connect() - { - return @pg_connect($this->_connect_string()); - } - - // -------------------------------------------------------------------- - - /** - * Persistent database connection - * - * @access private called by the base class - * @return resource - */ - function db_pconnect() - { - return @pg_pconnect($this->_connect_string()); - } - - // -------------------------------------------------------------------- - - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @access public - * @return void - */ - function reconnect() - { - if (pg_ping($this->conn_id) === FALSE) - { - $this->conn_id = FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Select the database - * - * @access private called by the base class - * @return resource - */ - function db_select() - { - // Not needed for Postgre so we'll return TRUE - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Set client character set - * - * @access public - * @param string - * @param string - * @return resource - */ - function db_set_charset($charset, $collation) - { - // @todo - add support if needed - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Version number query string - * - * @access public - * @return string - */ - function _version() - { - return "SELECT version() AS ver"; - } - - // -------------------------------------------------------------------- - - /** - * Execute the query - * - * @access private called by the base class - * @param string an SQL query - * @return resource - */ - function _execute($sql) - { - $sql = $this->_prep_query($sql); - return @pg_query($this->conn_id, $sql); - } - - // -------------------------------------------------------------------- - - /** - * Prep the query - * - * If needed, each database adapter can prep the query string - * - * @access private called by execute() - * @param string an SQL query - * @return string - */ - function _prep_query($sql) - { - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Begin Transaction - * - * @access public - * @return bool - */ - function trans_begin($test_mode = FALSE) - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE; - - return @pg_exec($this->conn_id, "begin"); - } - - // -------------------------------------------------------------------- - - /** - * Commit Transaction - * - * @access public - * @return bool - */ - function trans_commit() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - return @pg_exec($this->conn_id, "commit"); - } - - // -------------------------------------------------------------------- - - /** - * Rollback Transaction - * - * @access public - * @return bool - */ - function trans_rollback() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - return @pg_exec($this->conn_id, "rollback"); - } - - // -------------------------------------------------------------------- - - /** - * Escape String - * - * @access public - * @param string - * @param bool whether or not the string will be used in a LIKE condition - * @return string - */ - function escape_str($str, $like = FALSE) - { - if (is_array($str)) - { - foreach ($str as $key => $val) - { - $str[$key] = $this->escape_str($val, $like); - } - - return $str; - } - - $str = pg_escape_string($str); - - // escape LIKE condition wildcards - if ($like === TRUE) - { - $str = str_replace( array('%', '_', $this->_like_escape_chr), - array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr), - $str); - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Affected Rows - * - * @access public - * @return integer - */ - function affected_rows() - { - return @pg_affected_rows($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Insert ID - * - * @access public - * @return integer - */ - function insert_id() - { - $v = $this->_version(); - $v = $v['server']; - - $table = func_num_args() > 0 ? func_get_arg(0) : NULL; - $column = func_num_args() > 1 ? func_get_arg(1) : NULL; - - if ($table == NULL && $v >= '8.1') - { - $sql='SELECT LASTVAL() as ins_id'; - } - elseif ($table != NULL && $column != NULL && $v >= '8.0') - { - $sql = sprintf("SELECT pg_get_serial_sequence('%s','%s') as seq", $table, $column); - $query = $this->query($sql); - $row = $query->row(); - $sql = sprintf("SELECT CURRVAL('%s') as ins_id", $row->seq); - } - elseif ($table != NULL) - { - // seq_name passed in table parameter - $sql = sprintf("SELECT CURRVAL('%s') as ins_id", $table); - } - else - { - return pg_last_oid($this->result_id); - } - $query = $this->query($sql); - $row = $query->row(); - return $row->ins_id; - } - - // -------------------------------------------------------------------- - - /** - * "Count All" query - * - * Generates a platform-specific query string that counts all records in - * the specified database - * - * @access public - * @param string - * @return string - */ - function count_all($table = '') - { - if ($table == '') - { - return 0; - } - - $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); - - if ($query->num_rows() == 0) - { - return 0; - } - - $row = $query->row(); - $this->_reset_select(); - return (int) $row->numrows; - } - - // -------------------------------------------------------------------- - - /** - * Show table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @access private - * @param boolean - * @return string - */ - function _list_tables($prefix_limit = FALSE) - { - $sql = "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'"; - - if ($prefix_limit !== FALSE AND $this->dbprefix != '') - { - $sql .= " AND table_name LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr); - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @access public - * @param string the table name - * @return string - */ - function _list_columns($table = '') - { - return "SELECT column_name FROM information_schema.columns WHERE table_name ='".$table."'"; - } - - // -------------------------------------------------------------------- - - /** - * Field data query - * - * Generates a platform-specific query so that the column data can be retrieved - * - * @access public - * @param string the table name - * @return object - */ - function _field_data($table) - { - return "SELECT * FROM ".$table." LIMIT 1"; - } - - // -------------------------------------------------------------------- - - /** - * The error message string - * - * @access private - * @return string - */ - function _error_message() - { - return pg_last_error($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * The error message number - * - * @access private - * @return integer - */ - function _error_number() - { - return ''; - } - - // -------------------------------------------------------------------- - - /** - * Escape the SQL Identifiers - * - * This function escapes column and table names - * - * @access private - * @param string - * @return string - */ - function _escape_identifiers($item) - { - if ($this->_escape_char == '') - { - return $item; - } - - foreach ($this->_reserved_identifiers as $id) - { - if (strpos($item, '.'.$id) !== FALSE) - { - $str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item); - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - } - - if (strpos($item, '.') !== FALSE) - { - $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; - } - else - { - $str = $this->_escape_char.$item.$this->_escape_char; - } - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - - // -------------------------------------------------------------------- - - /** - * From Tables - * - * This function implicitly groups FROM tables so there is no confusion - * about operator precedence in harmony with SQL standards - * - * @access public - * @param type - * @return type - */ - function _from_tables($tables) - { - if ( ! is_array($tables)) - { - $tables = array($tables); - } - - return implode(', ', $tables); - } - - // -------------------------------------------------------------------- - - /** - * Insert statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert($table, $keys, $values) - { - return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; - } - - // -------------------------------------------------------------------- - - /** - * Insert_batch statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert_batch($table, $keys, $values) - { - return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values); - } - - // -------------------------------------------------------------------- - - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @access public - * @param string the table name - * @param array the update data - * @param array the where clause - * @param array the orderby clause - * @param array the limit clause - * @return string - */ - function _update($table, $values, $where, $orderby = array(), $limit = FALSE) - { - foreach ($values as $key => $val) - { - $valstr[] = $key." = ".$val; - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):''; - - $sql = "UPDATE ".$table." SET ".implode(', ', $valstr); - - $sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : ''; - - $sql .= $orderby.$limit; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * If the database does not support the truncate() command - * This function maps to "DELETE FROM table" - * - * @access public - * @param string the table name - * @return string - */ - function _truncate($table) - { - return "TRUNCATE ".$table; - } - - // -------------------------------------------------------------------- - - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @access public - * @param string the table name - * @param array the where clause - * @param string the limit clause - * @return string - */ - function _delete($table, $where = array(), $like = array(), $limit = FALSE) - { - $conditions = ''; - - if (count($where) > 0 OR count($like) > 0) - { - $conditions = "\nWHERE "; - $conditions .= implode("\n", $this->ar_where); - - if (count($where) > 0 && count($like) > 0) - { - $conditions .= " AND "; - } - $conditions .= implode("\n", $like); - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - return "DELETE FROM ".$table.$conditions.$limit; - } - - // -------------------------------------------------------------------- - /** - * Limit string - * - * Generates a platform-specific LIMIT clause - * - * @access public - * @param string the sql query string - * @param integer the number of rows to limit the query to - * @param integer the offset value - * @return string - */ - function _limit($sql, $limit, $offset) - { - $sql .= "LIMIT ".$limit; - - if ($offset > 0) - { - $sql .= " OFFSET ".$offset; - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Close DB Connection - * - * @access public - * @param resource - * @return void - */ - function _close($conn_id) - { - @pg_close($conn_id); - } - - -} - - -/* End of file postgre_driver.php */ -/* Location: ./system/database/drivers/postgre/postgre_driver.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/postgre/postgre_forge.php b/donjo-sys/database/drivers/postgre/postgre_forge.php deleted file mode 100644 index 9b72ed5c0..000000000 --- a/donjo-sys/database/drivers/postgre/postgre_forge.php +++ /dev/null @@ -1,300 +0,0 @@ -db->table_exists($table)) - { - return "SELECT * FROM $table"; // Needs to return innocous but valid SQL statement - } - } - - $sql .= $this->db->_escape_identifiers($table)." ("; - $current_field_count = 0; - - foreach ($fields as $field=>$attributes) - { - // Numeric field names aren't allowed in databases, so if the key is - // numeric, we know it was assigned by PHP and the developer manually - // entered the field information, so we'll simply add it to the list - if (is_numeric($field)) - { - $sql .= "\n\t$attributes"; - } - else - { - $attributes = array_change_key_case($attributes, CASE_UPPER); - - $sql .= "\n\t".$this->db->_protect_identifiers($field); - - $is_unsigned = (array_key_exists('UNSIGNED', $attributes) && $attributes['UNSIGNED'] === TRUE); - - // Convert datatypes to be PostgreSQL-compatible - switch (strtoupper($attributes['TYPE'])) - { - case 'TINYINT': - $attributes['TYPE'] = 'SMALLINT'; - break; - case 'SMALLINT': - $attributes['TYPE'] = ($is_unsigned) ? 'INTEGER' : 'SMALLINT'; - break; - case 'MEDIUMINT': - $attributes['TYPE'] = 'INTEGER'; - break; - case 'INT': - $attributes['TYPE'] = ($is_unsigned) ? 'BIGINT' : 'INTEGER'; - break; - case 'BIGINT': - $attributes['TYPE'] = ($is_unsigned) ? 'NUMERIC' : 'BIGINT'; - break; - case 'DOUBLE': - $attributes['TYPE'] = 'DOUBLE PRECISION'; - break; - case 'DATETIME': - $attributes['TYPE'] = 'TIMESTAMP'; - break; - case 'LONGTEXT': - $attributes['TYPE'] = 'TEXT'; - break; - case 'BLOB': - $attributes['TYPE'] = 'BYTEA'; - break; - } - - // If this is an auto-incrementing primary key, use the serial data type instead - if (in_array($field, $primary_keys) && array_key_exists('AUTO_INCREMENT', $attributes) - && $attributes['AUTO_INCREMENT'] === TRUE) - { - $sql .= ' SERIAL'; - } - else - { - $sql .= ' '.$attributes['TYPE']; - } - - // Modified to prevent constraints with integer data types - if (array_key_exists('CONSTRAINT', $attributes) && strpos($attributes['TYPE'], 'INT') === false) - { - $sql .= '('.$attributes['CONSTRAINT'].')'; - } - - if (array_key_exists('DEFAULT', $attributes)) - { - $sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\''; - } - - if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - // Added new attribute to create unqite fields. Also works with MySQL - if (array_key_exists('UNIQUE', $attributes) && $attributes['UNIQUE'] === TRUE) - { - $sql .= ' UNIQUE'; - } - } - - // don't add a comma on the end of the last field - if (++$current_field_count < count($fields)) - { - $sql .= ','; - } - } - - if (count($primary_keys) > 0) - { - // Something seems to break when passing an array to _protect_identifiers() - foreach ($primary_keys as $index => $key) - { - $primary_keys[$index] = $this->db->_protect_identifiers($key); - } - - $sql .= ",\n\tPRIMARY KEY (" . implode(', ', $primary_keys) . ")"; - } - - $sql .= "\n);"; - - if (is_array($keys) && count($keys) > 0) - { - foreach ($keys as $key) - { - if (is_array($key)) - { - $key = $this->db->_protect_identifiers($key); - } - else - { - $key = array($this->db->_protect_identifiers($key)); - } - - foreach ($key as $field) - { - $sql .= "CREATE INDEX " . $table . "_" . str_replace(array('"', "'"), '', $field) . "_index ON $table ($field); "; - } - } - } - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Drop Table - * - * @access private - * @return bool - */ - function _drop_table($table) - { - return "DROP TABLE IF EXISTS ".$this->db->_escape_identifiers($table)." CASCADE"; - } - - // -------------------------------------------------------------------- - - /** - * Alter table query - * - * Generates a platform-specific query so that a table can be altered - * Called by add_column(), drop_column(), and column_alter(), - * - * @access private - * @param string the ALTER type (ADD, DROP, CHANGE) - * @param string the column name - * @param string the table name - * @param string the column definition - * @param string the default value - * @param boolean should 'NOT NULL' be added - * @param string the field after which we should add the new field - * @return object - */ - function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '') - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table)." $alter_type ".$this->db->_protect_identifiers($column_name); - - // DROP has everything it needs now. - if ($alter_type == 'DROP') - { - return $sql; - } - - $sql .= " $column_definition"; - - if ($default_value != '') - { - $sql .= " DEFAULT \"$default_value\""; - } - - if ($null === NULL) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if ($after_field != '') - { - $sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field); - } - - return $sql; - - } - - // -------------------------------------------------------------------- - - /** - * Rename a table - * - * Generates a platform-specific query so that a table can be renamed - * - * @access private - * @param string the old table name - * @param string the new table name - * @return string - */ - function _rename_table($table_name, $new_table_name) - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table_name)." RENAME TO ".$this->db->_protect_identifiers($new_table_name); - return $sql; - } - - -} - -/* End of file postgre_forge.php */ -/* Location: ./system/database/drivers/postgre/postgre_forge.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/postgre/postgre_result.php b/donjo-sys/database/drivers/postgre/postgre_result.php deleted file mode 100644 index 8e1680d53..000000000 --- a/donjo-sys/database/drivers/postgre/postgre_result.php +++ /dev/null @@ -1,170 +0,0 @@ -result_id); - } - - // -------------------------------------------------------------------- - - /** - * Number of fields in the result set - * - * @access public - * @return integer - */ - function num_fields() - { - return @pg_num_fields($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @access public - * @return array - */ - function list_fields() - { - $field_names = array(); - for ($i = 0; $i < $this->num_fields(); $i++) - { - $field_names[] = pg_field_name($this->result_id, $i); - } - - return $field_names; - } - - // -------------------------------------------------------------------- - - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @access public - * @return array - */ - function field_data() - { - $retval = array(); - for ($i = 0; $i < $this->num_fields(); $i++) - { - $F = new stdClass(); - $F->name = pg_field_name($this->result_id, $i); - $F->type = pg_field_type($this->result_id, $i); - $F->max_length = pg_field_size($this->result_id, $i); - $F->primary_key = 0; - $F->default = ''; - - $retval[] = $F; - } - - return $retval; - } - - // -------------------------------------------------------------------- - - /** - * Free the result - * - * @return null - */ - function free_result() - { - if (is_resource($this->result_id)) - { - pg_free_result($this->result_id); - $this->result_id = FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero - * - * @access private - * @return array - */ - function _data_seek($n = 0) - { - return pg_result_seek($this->result_id, $n); - } - - // -------------------------------------------------------------------- - - /** - * Result - associative array - * - * Returns the result set as an array - * - * @access private - * @return array - */ - function _fetch_assoc() - { - return pg_fetch_assoc($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Result - object - * - * Returns the result set as an object - * - * @access private - * @return object - */ - function _fetch_object() - { - return pg_fetch_object($this->result_id); - } - -} - - -/* End of file postgre_result.php */ -/* Location: ./system/database/drivers/postgre/postgre_result.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/postgre/postgre_utility.php b/donjo-sys/database/drivers/postgre/postgre_utility.php deleted file mode 100644 index e84333f77..000000000 --- a/donjo-sys/database/drivers/postgre/postgre_utility.php +++ /dev/null @@ -1,89 +0,0 @@ -db->display_error('db_unsuported_feature'); - } -} - - -/* End of file postgre_utility.php */ -/* Location: ./system/database/drivers/postgre/postgre_utility.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/sqlite/index.html b/donjo-sys/database/drivers/sqlite/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/database/drivers/sqlite/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/database/drivers/sqlite/sqlite_driver.php b/donjo-sys/database/drivers/sqlite/sqlite_driver.php deleted file mode 100644 index 26230138d..000000000 --- a/donjo-sys/database/drivers/sqlite/sqlite_driver.php +++ /dev/null @@ -1,659 +0,0 @@ -database, FILE_WRITE_MODE, $error)) - { - log_message('error', $error); - - if ($this->db_debug) - { - $this->display_error($error, '', TRUE); - } - - return FALSE; - } - - return $conn_id; - } - - // -------------------------------------------------------------------- - - /** - * Persistent database connection - * - * @access private called by the base class - * @return resource - */ - function db_pconnect() - { - if ( ! $conn_id = @sqlite_popen($this->database, FILE_WRITE_MODE, $error)) - { - log_message('error', $error); - - if ($this->db_debug) - { - $this->display_error($error, '', TRUE); - } - - return FALSE; - } - - return $conn_id; - } - - // -------------------------------------------------------------------- - - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @access public - * @return void - */ - function reconnect() - { - // not implemented in SQLite - } - - // -------------------------------------------------------------------- - - /** - * Select the database - * - * @access private called by the base class - * @return resource - */ - function db_select() - { - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Set client character set - * - * @access public - * @param string - * @param string - * @return resource - */ - function db_set_charset($charset, $collation) - { - // @todo - add support if needed - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Version number query string - * - * @access public - * @return string - */ - function _version() - { - return sqlite_libversion(); - } - - // -------------------------------------------------------------------- - - /** - * Execute the query - * - * @access private called by the base class - * @param string an SQL query - * @return resource - */ - function _execute($sql) - { - $sql = $this->_prep_query($sql); - return @sqlite_query($this->conn_id, $sql); - } - - // -------------------------------------------------------------------- - - /** - * Prep the query - * - * If needed, each database adapter can prep the query string - * - * @access private called by execute() - * @param string an SQL query - * @return string - */ - function _prep_query($sql) - { - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Begin Transaction - * - * @access public - * @return bool - */ - function trans_begin($test_mode = FALSE) - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE; - - $this->simple_query('BEGIN TRANSACTION'); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Commit Transaction - * - * @access public - * @return bool - */ - function trans_commit() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $this->simple_query('COMMIT'); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Rollback Transaction - * - * @access public - * @return bool - */ - function trans_rollback() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - $this->simple_query('ROLLBACK'); - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Escape String - * - * @access public - * @param string - * @param bool whether or not the string will be used in a LIKE condition - * @return string - */ - function escape_str($str, $like = FALSE) - { - if (is_array($str)) - { - foreach ($str as $key => $val) - { - $str[$key] = $this->escape_str($val, $like); - } - - return $str; - } - - $str = sqlite_escape_string($str); - - // escape LIKE condition wildcards - if ($like === TRUE) - { - $str = str_replace( array('%', '_', $this->_like_escape_chr), - array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr), - $str); - } - - return $str; - } - - // -------------------------------------------------------------------- - - /** - * Affected Rows - * - * @access public - * @return integer - */ - function affected_rows() - { - return sqlite_changes($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Insert ID - * - * @access public - * @return integer - */ - function insert_id() - { - return @sqlite_last_insert_rowid($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * "Count All" query - * - * Generates a platform-specific query string that counts all records in - * the specified database - * - * @access public - * @param string - * @return string - */ - function count_all($table = '') - { - if ($table == '') - { - return 0; - } - - $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); - - if ($query->num_rows() == 0) - { - return 0; - } - - $row = $query->row(); - $this->_reset_select(); - return (int) $row->numrows; - } - - // -------------------------------------------------------------------- - - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @access private - * @param boolean - * @return string - */ - function _list_tables($prefix_limit = FALSE) - { - $sql = "SELECT name from sqlite_master WHERE type='table'"; - - if ($prefix_limit !== FALSE AND $this->dbprefix != '') - { - $sql .= " AND 'name' LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr); - } - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Show column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @access public - * @param string the table name - * @return string - */ - function _list_columns($table = '') - { - // Not supported - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Field data query - * - * Generates a platform-specific query so that the column data can be retrieved - * - * @access public - * @param string the table name - * @return object - */ - function _field_data($table) - { - return "SELECT * FROM ".$table." LIMIT 1"; - } - - // -------------------------------------------------------------------- - - /** - * The error message string - * - * @access private - * @return string - */ - function _error_message() - { - return sqlite_error_string(sqlite_last_error($this->conn_id)); - } - - // -------------------------------------------------------------------- - - /** - * The error message number - * - * @access private - * @return integer - */ - function _error_number() - { - return sqlite_last_error($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Escape the SQL Identifiers - * - * This function escapes column and table names - * - * @access private - * @param string - * @return string - */ - function _escape_identifiers($item) - { - if ($this->_escape_char == '') - { - return $item; - } - - foreach ($this->_reserved_identifiers as $id) - { - if (strpos($item, '.'.$id) !== FALSE) - { - $str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item); - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - } - - if (strpos($item, '.') !== FALSE) - { - $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; - } - else - { - $str = $this->_escape_char.$item.$this->_escape_char; - } - - // remove duplicates if the user already included the escape - return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str); - } - - // -------------------------------------------------------------------- - - /** - * From Tables - * - * This function implicitly groups FROM tables so there is no confusion - * about operator precedence in harmony with SQL standards - * - * @access public - * @param type - * @return type - */ - function _from_tables($tables) - { - if ( ! is_array($tables)) - { - $tables = array($tables); - } - - return '('.implode(', ', $tables).')'; - } - - // -------------------------------------------------------------------- - - /** - * Insert statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert($table, $keys, $values) - { - return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; - } - - // -------------------------------------------------------------------- - - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @access public - * @param string the table name - * @param array the update data - * @param array the where clause - * @param array the orderby clause - * @param array the limit clause - * @return string - */ - function _update($table, $values, $where, $orderby = array(), $limit = FALSE) - { - foreach ($values as $key => $val) - { - $valstr[] = $key." = ".$val; - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):''; - - $sql = "UPDATE ".$table." SET ".implode(', ', $valstr); - - $sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : ''; - - $sql .= $orderby.$limit; - - return $sql; - } - - - // -------------------------------------------------------------------- - - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * If the database does not support the truncate() command - * This function maps to "DELETE FROM table" - * - * @access public - * @param string the table name - * @return string - */ - function _truncate($table) - { - return $this->_delete($table); - } - - // -------------------------------------------------------------------- - - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @access public - * @param string the table name - * @param array the where clause - * @param string the limit clause - * @return string - */ - function _delete($table, $where = array(), $like = array(), $limit = FALSE) - { - $conditions = ''; - - if (count($where) > 0 OR count($like) > 0) - { - $conditions = "\nWHERE "; - $conditions .= implode("\n", $this->ar_where); - - if (count($where) > 0 && count($like) > 0) - { - $conditions .= " AND "; - } - $conditions .= implode("\n", $like); - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - return "DELETE FROM ".$table.$conditions.$limit; - } - - // -------------------------------------------------------------------- - - /** - * Limit string - * - * Generates a platform-specific LIMIT clause - * - * @access public - * @param string the sql query string - * @param integer the number of rows to limit the query to - * @param integer the offset value - * @return string - */ - function _limit($sql, $limit, $offset) - { - if ($offset == 0) - { - $offset = ''; - } - else - { - $offset .= ", "; - } - - return $sql."LIMIT ".$offset.$limit; - } - - // -------------------------------------------------------------------- - - /** - * Close DB Connection - * - * @access public - * @param resource - * @return void - */ - function _close($conn_id) - { - @sqlite_close($conn_id); - } - - -} - - -/* End of file sqlite_driver.php */ -/* Location: ./system/database/drivers/sqlite/sqlite_driver.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/sqlite/sqlite_forge.php b/donjo-sys/database/drivers/sqlite/sqlite_forge.php deleted file mode 100644 index 67f7246e0..000000000 --- a/donjo-sys/database/drivers/sqlite/sqlite_forge.php +++ /dev/null @@ -1,266 +0,0 @@ -db->database) OR ! @unlink($this->db->database)) - { - if ($this->db->db_debug) - { - return $this->db->display_error('db_unable_to_drop'); - } - return FALSE; - } - return TRUE; - } - // -------------------------------------------------------------------- - - /** - * Create Table - * - * @access private - * @param string the table name - * @param array the fields - * @param mixed primary key(s) - * @param mixed key(s) - * @param boolean should 'IF NOT EXISTS' be added to the SQL - * @return bool - */ - function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists) - { - $sql = 'CREATE TABLE '; - - // IF NOT EXISTS added to SQLite in 3.3.0 - if ($if_not_exists === TRUE && version_compare($this->db->_version(), '3.3.0', '>=') === TRUE) - { - $sql .= 'IF NOT EXISTS '; - } - - $sql .= $this->db->_escape_identifiers($table)."("; - $current_field_count = 0; - - foreach ($fields as $field=>$attributes) - { - // Numeric field names aren't allowed in databases, so if the key is - // numeric, we know it was assigned by PHP and the developer manually - // entered the field information, so we'll simply add it to the list - if (is_numeric($field)) - { - $sql .= "\n\t$attributes"; - } - else - { - $attributes = array_change_key_case($attributes, CASE_UPPER); - - $sql .= "\n\t".$this->db->_protect_identifiers($field); - - $sql .= ' '.$attributes['TYPE']; - - if (array_key_exists('CONSTRAINT', $attributes)) - { - $sql .= '('.$attributes['CONSTRAINT'].')'; - } - - if (array_key_exists('UNSIGNED', $attributes) && $attributes['UNSIGNED'] === TRUE) - { - $sql .= ' UNSIGNED'; - } - - if (array_key_exists('DEFAULT', $attributes)) - { - $sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\''; - } - - if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE) - { - $sql .= ' AUTO_INCREMENT'; - } - } - - // don't add a comma on the end of the last field - if (++$current_field_count < count($fields)) - { - $sql .= ','; - } - } - - if (count($primary_keys) > 0) - { - $primary_keys = $this->db->_protect_identifiers($primary_keys); - $sql .= ",\n\tPRIMARY KEY (" . implode(', ', $primary_keys) . ")"; - } - - if (is_array($keys) && count($keys) > 0) - { - foreach ($keys as $key) - { - if (is_array($key)) - { - $key = $this->db->_protect_identifiers($key); - } - else - { - $key = array($this->db->_protect_identifiers($key)); - } - - $sql .= ",\n\tUNIQUE (" . implode(', ', $key) . ")"; - } - } - - $sql .= "\n)"; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Drop Table - * - * Unsupported feature in SQLite - * - * @access private - * @return bool - */ - function _drop_table($table) - { - if ($this->db->db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return array(); - } - - // -------------------------------------------------------------------- - - /** - * Alter table query - * - * Generates a platform-specific query so that a table can be altered - * Called by add_column(), drop_column(), and column_alter(), - * - * @access private - * @param string the ALTER type (ADD, DROP, CHANGE) - * @param string the column name - * @param string the table name - * @param string the column definition - * @param string the default value - * @param boolean should 'NOT NULL' be added - * @param string the field after which we should add the new field - * @return object - */ - function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '') - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table)." $alter_type ".$this->db->_protect_identifiers($column_name); - - // DROP has everything it needs now. - if ($alter_type == 'DROP') - { - // SQLite does not support dropping columns - // http://www.sqlite.org/omitted.html - // http://www.sqlite.org/faq.html#q11 - return FALSE; - } - - $sql .= " $column_definition"; - - if ($default_value != '') - { - $sql .= " DEFAULT \"$default_value\""; - } - - if ($null === NULL) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if ($after_field != '') - { - $sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field); - } - - return $sql; - - } - - // -------------------------------------------------------------------- - - /** - * Rename a table - * - * Generates a platform-specific query so that a table can be renamed - * - * @access private - * @param string the old table name - * @param string the new table name - * @return string - */ - function _rename_table($table_name, $new_table_name) - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table_name)." RENAME TO ".$this->db->_protect_identifiers($new_table_name); - return $sql; - } -} - -/* End of file sqlite_forge.php */ -/* Location: ./system/database/drivers/sqlite/sqlite_forge.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/sqlite/sqlite_result.php b/donjo-sys/database/drivers/sqlite/sqlite_result.php deleted file mode 100644 index a6e885268..000000000 --- a/donjo-sys/database/drivers/sqlite/sqlite_result.php +++ /dev/null @@ -1,180 +0,0 @@ -result_id); - } - - // -------------------------------------------------------------------- - - /** - * Number of fields in the result set - * - * @access public - * @return integer - */ - function num_fields() - { - return @sqlite_num_fields($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @access public - * @return array - */ - function list_fields() - { - $field_names = array(); - for ($i = 0; $i < $this->num_fields(); $i++) - { - $field_names[] = sqlite_field_name($this->result_id, $i); - } - - return $field_names; - } - - // -------------------------------------------------------------------- - - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @access public - * @return array - */ - function field_data() - { - $retval = array(); - for ($i = 0; $i < $this->num_fields(); $i++) - { - $F = new stdClass(); - $F->name = sqlite_field_name($this->result_id, $i); - $F->type = 'varchar'; - $F->max_length = 0; - $F->primary_key = 0; - $F->default = ''; - - $retval[] = $F; - } - - return $retval; - } - - // -------------------------------------------------------------------- - - /** - * Free the result - * - * @return null - */ - function free_result() - { - // Not implemented in SQLite - } - - // -------------------------------------------------------------------- - - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero - * - * @access private - * @return array - */ - function _data_seek($n = 0) - { - return sqlite_seek($this->result_id, $n); - } - - // -------------------------------------------------------------------- - - /** - * Result - associative array - * - * Returns the result set as an array - * - * @access private - * @return array - */ - function _fetch_assoc() - { - return sqlite_fetch_array($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Result - object - * - * Returns the result set as an object - * - * @access private - * @return object - */ - function _fetch_object() - { - if (function_exists('sqlite_fetch_object')) - { - return sqlite_fetch_object($this->result_id); - } - else - { - $arr = sqlite_fetch_array($this->result_id, SQLITE_ASSOC); - if (is_array($arr)) - { - $obj = (object) $arr; - return $obj; - } else { - return NULL; - } - } - } - -} - - -/* End of file sqlite_result.php */ -/* Location: ./system/database/drivers/sqlite/sqlite_result.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/sqlite/sqlite_utility.php b/donjo-sys/database/drivers/sqlite/sqlite_utility.php deleted file mode 100644 index 5c8a9dea8..000000000 --- a/donjo-sys/database/drivers/sqlite/sqlite_utility.php +++ /dev/null @@ -1,97 +0,0 @@ -db_debug) - { - return $this->db->display_error('db_unsuported_feature'); - } - return array(); - } - - // -------------------------------------------------------------------- - - /** - * Optimize table query - * - * Is optimization even supported in SQLite? - * - * @access private - * @param string the table name - * @return object - */ - function _optimize_table($table) - { - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * Repair table query - * - * Are table repairs even supported in SQLite? - * - * @access private - * @param string the table name - * @return object - */ - function _repair_table($table) - { - return FALSE; - } - - // -------------------------------------------------------------------- - - /** - * SQLite Export - * - * @access private - * @param array Preferences - * @return mixed - */ - function _backup($params = array()) - { - // Currently unsupported - return $this->db->display_error('db_unsuported_feature'); - } -} - -/* End of file sqlite_utility.php */ -/* Location: ./system/database/drivers/sqlite/sqlite_utility.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/sqlsrv/index.html b/donjo-sys/database/drivers/sqlsrv/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/database/drivers/sqlsrv/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/database/drivers/sqlsrv/sqlsrv_driver.php b/donjo-sys/database/drivers/sqlsrv/sqlsrv_driver.php deleted file mode 100644 index a06f504e0..000000000 --- a/donjo-sys/database/drivers/sqlsrv/sqlsrv_driver.php +++ /dev/null @@ -1,604 +0,0 @@ -char_set)) ? 'UTF-8' : $this->char_set; - - $connection = array( - 'UID' => empty($this->username) ? '' : $this->username, - 'PWD' => empty($this->password) ? '' : $this->password, - 'Database' => $this->database, - 'ConnectionPooling' => $pooling ? 1 : 0, - 'CharacterSet' => $character_set, - 'ReturnDatesAsStrings' => 1 - ); - - // If the username and password are both empty, assume this is a - // 'Windows Authentication Mode' connection. - if(empty($connection['UID']) && empty($connection['PWD'])) { - unset($connection['UID'], $connection['PWD']); - } - - return sqlsrv_connect($this->hostname, $connection); - } - - // -------------------------------------------------------------------- - - /** - * Persistent database connection - * - * @access private called by the base class - * @return resource - */ - function db_pconnect() - { - $this->db_connect(TRUE); - } - - // -------------------------------------------------------------------- - - /** - * Reconnect - * - * Keep / reestablish the db connection if no queries have been - * sent for a length of time exceeding the server's idle timeout - * - * @access public - * @return void - */ - function reconnect() - { - // not implemented in MSSQL - } - - // -------------------------------------------------------------------- - - /** - * Select the database - * - * @access private called by the base class - * @return resource - */ - function db_select() - { - return $this->_execute('USE ' . $this->database); - } - - // -------------------------------------------------------------------- - - /** - * Set client character set - * - * @access public - * @param string - * @param string - * @return resource - */ - function db_set_charset($charset, $collation) - { - // @todo - add support if needed - return TRUE; - } - - // -------------------------------------------------------------------- - - /** - * Execute the query - * - * @access private called by the base class - * @param string an SQL query - * @return resource - */ - function _execute($sql) - { - $sql = $this->_prep_query($sql); - return sqlsrv_query($this->conn_id, $sql, null, array( - 'Scrollable' => SQLSRV_CURSOR_STATIC, - 'SendStreamParamsAtExec' => true - )); - } - - // -------------------------------------------------------------------- - - /** - * Prep the query - * - * If needed, each database adapter can prep the query string - * - * @access private called by execute() - * @param string an SQL query - * @return string - */ - function _prep_query($sql) - { - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Begin Transaction - * - * @access public - * @return bool - */ - function trans_begin($test_mode = FALSE) - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - // Reset the transaction failure flag. - // If the $test_mode flag is set to TRUE transactions will be rolled back - // even if the queries produce a successful result. - $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE; - - return sqlsrv_begin_transaction($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Commit Transaction - * - * @access public - * @return bool - */ - function trans_commit() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - return sqlsrv_commit($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Rollback Transaction - * - * @access public - * @return bool - */ - function trans_rollback() - { - if ( ! $this->trans_enabled) - { - return TRUE; - } - - // When transactions are nested we only begin/commit/rollback the outermost ones - if ($this->_trans_depth > 0) - { - return TRUE; - } - - return sqlsrv_rollback($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Escape String - * - * @access public - * @param string - * @param bool whether or not the string will be used in a LIKE condition - * @return string - */ - function escape_str($str, $like = FALSE) - { - // Escape single quotes - return str_replace("'", "''", $str); - } - - // -------------------------------------------------------------------- - - /** - * Affected Rows - * - * @access public - * @return integer - */ - function affected_rows() - { - return @sqlrv_rows_affected($this->conn_id); - } - - // -------------------------------------------------------------------- - - /** - * Insert ID - * - * Returns the last id created in the Identity column. - * - * @access public - * @return integer - */ - function insert_id() - { - return $this->query('select @@IDENTITY as insert_id')->row('insert_id'); - } - - // -------------------------------------------------------------------- - - /** - * Parse major version - * - * Grabs the major version number from the - * database server version string passed in. - * - * @access private - * @param string $version - * @return int16 major version number - */ - function _parse_major_version($version) - { - preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)/', $version, $ver_info); - return $ver_info[1]; // return the major version b/c that's all we're interested in. - } - - // -------------------------------------------------------------------- - - /** - * Version number query string - * - * @access public - * @return string - */ - function _version() - { - $info = sqlsrv_server_info($this->conn_id); - return sprintf("select '%s' as ver", $info['SQLServerVersion']); - } - - // -------------------------------------------------------------------- - - /** - * "Count All" query - * - * Generates a platform-specific query string that counts all records in - * the specified database - * - * @access public - * @param string - * @return string - */ - function count_all($table = '') - { - if ($table == '') - { - return 0; - } - - $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE)); - - if ($query->num_rows() == 0) - { - return 0; - } - - $row = $query->row(); - $this->_reset_select(); - return (int) $row->numrows; - } - - // -------------------------------------------------------------------- - - /** - * List table query - * - * Generates a platform-specific query string so that the table names can be fetched - * - * @access private - * @param boolean - * @return string - */ - function _list_tables($prefix_limit = FALSE) - { - return "SELECT name FROM sysobjects WHERE type = 'U' ORDER BY name"; - } - - // -------------------------------------------------------------------- - - /** - * List column query - * - * Generates a platform-specific query string so that the column names can be fetched - * - * @access private - * @param string the table name - * @return string - */ - function _list_columns($table = '') - { - return "SELECT * FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME = '".$this->_escape_table($table)."'"; - } - - // -------------------------------------------------------------------- - - /** - * Field data query - * - * Generates a platform-specific query so that the column data can be retrieved - * - * @access public - * @param string the table name - * @return object - */ - function _field_data($table) - { - return "SELECT TOP 1 * FROM " . $this->_escape_table($table); - } - - // -------------------------------------------------------------------- - - /** - * The error message string - * - * @access private - * @return string - */ - function _error_message() - { - $error = array_shift(sqlsrv_errors()); - return !empty($error['message']) ? $error['message'] : null; - } - - // -------------------------------------------------------------------- - - /** - * The error message number - * - * @access private - * @return integer - */ - function _error_number() - { - $error = array_shift(sqlsrv_errors()); - return isset($error['SQLSTATE']) ? $error['SQLSTATE'] : null; - } - - // -------------------------------------------------------------------- - - /** - * Escape Table Name - * - * This function adds backticks if the table name has a period - * in it. Some DBs will get cranky unless periods are escaped - * - * @access private - * @param string the table name - * @return string - */ - function _escape_table($table) - { - return $table; - } - - - /** - * Escape the SQL Identifiers - * - * This function escapes column and table names - * - * @access private - * @param string - * @return string - */ - function _escape_identifiers($item) - { - return $item; - } - - // -------------------------------------------------------------------- - - /** - * From Tables - * - * This function implicitly groups FROM tables so there is no confusion - * about operator precedence in harmony with SQL standards - * - * @access public - * @param type - * @return type - */ - function _from_tables($tables) - { - if ( ! is_array($tables)) - { - $tables = array($tables); - } - - return implode(', ', $tables); - } - - // -------------------------------------------------------------------- - - /** - * Insert statement - * - * Generates a platform-specific insert string from the supplied data - * - * @access public - * @param string the table name - * @param array the insert keys - * @param array the insert values - * @return string - */ - function _insert($table, $keys, $values) - { - return "INSERT INTO ".$this->_escape_table($table)." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")"; - } - - // -------------------------------------------------------------------- - - /** - * Update statement - * - * Generates a platform-specific update string from the supplied data - * - * @access public - * @param string the table name - * @param array the update data - * @param array the where clause - * @param array the orderby clause - * @param array the limit clause - * @return string - */ - function _update($table, $values, $where) - { - foreach($values as $key => $val) - { - $valstr[] = $key." = ".$val; - } - - return "UPDATE ".$this->_escape_table($table)." SET ".implode(', ', $valstr)." WHERE ".implode(" ", $where); - } - - // -------------------------------------------------------------------- - - /** - * Truncate statement - * - * Generates a platform-specific truncate string from the supplied data - * If the database does not support the truncate() command - * This function maps to "DELETE FROM table" - * - * @access public - * @param string the table name - * @return string - */ - function _truncate($table) - { - return "TRUNCATE TABLE ".$table; - } - - // -------------------------------------------------------------------- - - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @access public - * @param string the table name - * @param array the where clause - * @param string the limit clause - * @return string - */ - function _delete($table, $where) - { - return "DELETE FROM ".$this->_escape_table($table)." WHERE ".implode(" ", $where); - } - - // -------------------------------------------------------------------- - - /** - * Limit string - * - * Generates a platform-specific LIMIT clause - * - * @access public - * @param string the sql query string - * @param integer the number of rows to limit the query to - * @param integer the offset value - * @return string - */ - function _limit($sql, $limit, $offset) - { - $i = $limit + $offset; - - return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$i.' ', $sql); - } - - // -------------------------------------------------------------------- - - /** - * Close DB Connection - * - * @access public - * @param resource - * @return void - */ - function _close($conn_id) - { - @sqlsrv_close($conn_id); - } - -} - - - -/* End of file sqlsrv_driver.php */ -/* Location: ./system/database/drivers/sqlsrv/sqlsrv_driver.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/sqlsrv/sqlsrv_forge.php b/donjo-sys/database/drivers/sqlsrv/sqlsrv_forge.php deleted file mode 100644 index d3a554985..000000000 --- a/donjo-sys/database/drivers/sqlsrv/sqlsrv_forge.php +++ /dev/null @@ -1,246 +0,0 @@ -db->_escape_identifiers($table).")) CREATE TABLE ".$this->db->_escape_identifiers($table)." ("; - $current_field_count = 0; - - foreach ($fields as $field=>$attributes) - { - // Numeric field names aren't allowed in databases, so if the key is - // numeric, we know it was assigned by PHP and the developer manually - // entered the field information, so we'll simply add it to the list - if (is_numeric($field)) - { - $sql .= "\n\t$attributes"; - } - else - { - $attributes = array_change_key_case($attributes, CASE_UPPER); - - $sql .= "\n\t".$this->db->_protect_identifiers($field); - - $sql .= ' '.$attributes['TYPE']; - - if (array_key_exists('CONSTRAINT', $attributes)) - { - $sql .= '('.$attributes['CONSTRAINT'].')'; - } - - if (array_key_exists('UNSIGNED', $attributes) && $attributes['UNSIGNED'] === TRUE) - { - $sql .= ' UNSIGNED'; - } - - if (array_key_exists('DEFAULT', $attributes)) - { - $sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\''; - } - - if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE) - { - $sql .= ' IDENTITY(1,1)'; - } - } - - // don't add a comma on the end of the last field - if (++$current_field_count < count($fields)) - { - $sql .= ','; - } - } - - if (count($primary_keys) > 0) - { - $primary_keys = $this->db->_protect_identifiers($primary_keys); - $sql .= ",\n\tPRIMARY KEY (" . implode(', ', $primary_keys) . ")"; - } - - if (is_array($keys) && count($keys) > 0) - { - foreach ($keys as $key) - { - if (is_array($key)) - { - $key = $this->db->_protect_identifiers($key); - } - else - { - $key = array($this->db->_protect_identifiers($key)); - } - - $sql .= ",\n\tFOREIGN KEY (" . implode(', ', $key) . ")"; - } - } - - $sql .= "\n)"; - - return $sql; - } - - // -------------------------------------------------------------------- - - /** - * Alter table query - * - * Generates a platform-specific query so that a table can be altered - * Called by add_column(), drop_column(), and column_alter(), - * - * @access private - * @param string the ALTER type (ADD, DROP, CHANGE) - * @param string the column name - * @param string the table name - * @param string the column definition - * @param string the default value - * @param boolean should 'NOT NULL' be added - * @param string the field after which we should add the new field - * @return object - */ - function _alter_table($alter_type, $table, $column_name, $column_definition = '', $default_value = '', $null = '', $after_field = '') - { - $sql = 'ALTER TABLE '.$this->db->_protect_identifiers($table)." $alter_type ".$this->db->_protect_identifiers($column_name); - - // DROP has everything it needs now. - if ($alter_type == 'DROP') - { - return $sql; - } - - $sql .= " $column_definition"; - - if ($default_value != '') - { - $sql .= " DEFAULT \"$default_value\""; - } - - if ($null === NULL) - { - $sql .= ' NULL'; - } - else - { - $sql .= ' NOT NULL'; - } - - if ($after_field != '') - { - $sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field); - } - - return $sql; - - } - - // -------------------------------------------------------------------- - - /** - * Rename a table - * - * Generates a platform-specific query so that a table can be renamed - * - * @access private - * @param string the old table name - * @param string the new table name - * @return string - */ - function _rename_table($table_name, $new_table_name) - { - return 'EXEC sp_rename '.$this->db->_protect_identifiers($table_name).", ".$this->db->_protect_identifiers($new_table_name); - } - -} - -/* End of file sqlsrv_forge.php */ -/* Location: ./system/database/drivers/sqlsrv/sqlsrv_forge.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/sqlsrv/sqlsrv_result.php b/donjo-sys/database/drivers/sqlsrv/sqlsrv_result.php deleted file mode 100644 index 0d2dbf532..000000000 --- a/donjo-sys/database/drivers/sqlsrv/sqlsrv_result.php +++ /dev/null @@ -1,170 +0,0 @@ -result_id); - } - - // -------------------------------------------------------------------- - - /** - * Number of fields in the result set - * - * @access public - * @return integer - */ - function num_fields() - { - return @sqlsrv_num_fields($this->result_id); - } - - // -------------------------------------------------------------------- - - /** - * Fetch Field Names - * - * Generates an array of column names - * - * @access public - * @return array - */ - function list_fields() - { - $field_names = array(); - foreach(sqlsrv_field_metadata($this->result_id) as $offset => $field) - { - $field_names[] = $field['Name']; - } - - return $field_names; - } - - // -------------------------------------------------------------------- - - /** - * Field data - * - * Generates an array of objects containing field meta-data - * - * @access public - * @return array - */ - function field_data() - { - $retval = array(); - foreach(sqlsrv_field_metadata($this->result_id) as $offset => $field) - { - $F = new stdClass(); - $F->name = $field['Name']; - $F->type = $field['Type']; - $F->max_length = $field['Size']; - $F->primary_key = 0; - $F->default = ''; - - $retval[] = $F; - } - - return $retval; - } - - // -------------------------------------------------------------------- - - /** - * Free the result - * - * @return null - */ - function free_result() - { - if (is_resource($this->result_id)) - { - sqlsrv_free_stmt($this->result_id); - $this->result_id = FALSE; - } - } - - // -------------------------------------------------------------------- - - /** - * Data Seek - * - * Moves the internal pointer to the desired offset. We call - * this internally before fetching results to make sure the - * result set starts at zero - * - * @access private - * @return array - */ - function _data_seek($n = 0) - { - // Not implemented - } - - // -------------------------------------------------------------------- - - /** - * Result - associative array - * - * Returns the result set as an array - * - * @access private - * @return array - */ - function _fetch_assoc() - { - return sqlsrv_fetch_array($this->result_id, SQLSRV_FETCH_ASSOC); - } - - // -------------------------------------------------------------------- - - /** - * Result - object - * - * Returns the result set as an object - * - * @access private - * @return object - */ - function _fetch_object() - { - return sqlsrv_fetch_object($this->result_id); - } - -} - - -/* End of file mssql_result.php */ -/* Location: ./system/database/drivers/mssql/mssql_result.php */ \ No newline at end of file diff --git a/donjo-sys/database/drivers/sqlsrv/sqlsrv_utility.php b/donjo-sys/database/drivers/sqlsrv/sqlsrv_utility.php deleted file mode 100644 index 3975e85c9..000000000 --- a/donjo-sys/database/drivers/sqlsrv/sqlsrv_utility.php +++ /dev/null @@ -1,89 +0,0 @@ -db->display_error('db_unsuported_feature'); - } - -} - -/* End of file mssql_utility.php */ -/* Location: ./system/database/drivers/mssql/mssql_utility.php */ \ No newline at end of file diff --git a/donjo-sys/database/index.html b/donjo-sys/database/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/database/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/fonts/index.html b/donjo-sys/fonts/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-sys/fonts/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-sys/fonts/texb.ttf b/donjo-sys/fonts/texb.ttf deleted file mode 100644 index 383c88b86b7c17e2e284732af48b2bfc359647ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 143830 zcmcG%34ml(c{W_il{&<709mpO2M~UwQR4 z@7=v(myaoCd_MIlA7KsVlRh5jzKO4)RfWbY`wrhFjOp_+jKK07&#-9ijjuk9OX5eO ze>NVvX3m%KWq!-?e=`3kq$b|LTsPq(3kwT$FMb#w?FXMPgnqy~62q^6U+>GM*XGB@ z3wGjGydX-lqH6v?P&Z5~WIN$VG!{=JQ|XMG&E*TlQn}LBUhU}Y>h9^S_4N-7t{55~ zSvfj3KCx+&v)TP zzQf17eYakA`7M{6zRl;m$>+P~6u!FR_|dsTH{;F4mwE@BxccO^*In=PUFm)D`EI}C z#v{$Q%U`Zq_JL#QNWR~9+9&ureW!en`QGJwFQns1-^YAU`#$aayze`{v%Y`!y-0e< zc9vx&*3TMjiS1=qu#d5yW}jid!VzvWw>1;WBr|TNH}h>*cP-a(BW}X&cOP{><$lKf zTlZU8UzW}CSt+Y#^{kbRWmDNgwmrKtJCU8r&SW=c4`vT#Z^_<~eRcM}?4#NDWS`A` zKKu7MHP@EU7Cv0~MB!6~&lUc<@Ppz-#VcQ2_$}v+Y^K@XKSO(;YPR>=UVHxw?cK)u zSe{jy?Hy$AXWxbPeg^H;(OxT)$Yg$}z4yDHbf0m*=CzkWdquCkW;UEnqP-=ry_3!M zUYxx#dwcdSwD*DRJH7UPCnx19=d}0v;=$sv7hn3V52EDiY)_xy#= z?|pvv^Z)q#`19iP{PXPd%-MyrKR)}~vzMK{^z7cVd(L+Id}lk(R?oJbEuJmV@jV;C zuW*(<%bX==esd;$CUNE~XTEgi3uiui=9x1eKl7$DkDj^v%$_r&-(UURr@s5-ci;cr z_kH)B-@Wg<`gcVM;|>eLmN4jRO7K;FT*{9qo6gOU07fg{&8OqZ66UtY++|{3y0|2nlm`?yIZMP%8HhEhV2~|b_RQw zABF>pBH1-uY7-feA*>*<{+M5I2rDa5O^@<~5H2XFNtI^>o+XSxhLhX2As;t6B3q`+p@$gn0+Kw)oFObhmkO%P8E!c= ze9g&W(Yl~AM8+$7BZ@mYy>RnZRSzyy2!Fy)J3>i}%`tzNm$3Ev zFAC@E9vEzVr2SdTjxcVmhCVL!(QeD-ypE&?c)P$!;@eVSwStCstmVsmtUJu2OlJ@OEM=Ov)&5V<)>W@cry!`ubyDD!j-ZlWy z)`VQIq)MVF5l9T~TmMd^GfwX-d-qjwUs;d@ClSi5mxPG?6NME zH@{)Fy}~dq!;%e;Y_FUWgUR4_kqK%U&O2c6ierNpvm%6(h=k$w@({GdD_#8PcdlEx zc=0Y)2^G!DACDDdPSjzT1RAmajpw(Y5(9DX@@i6G6IRTg-7|5Ko^f@0NbBlGR+o(I zrgG2>n1onp8F_`Ts5ZTQ;XW<`r|Q+dxB5PenPOvNEZ-Vxv*d&g$Zg4K2<@WSHV1PW6@~26CI$ z9V|pmea?<_3>MsM;toQp#i_~dm1Njb{lUcQ{^4vQ7B|x*Q5c`i*^FSWp1Lp=kHsaG zk$Gq|X3ifB#x`^hK-WvWBq@WZ6m>3OIBqqUx5I=P*TYscm9h-McPS@1ek&A>WYYO< zyEaT;vTi1lk1=GvPPok7m@BNBN>#=xZB(I)9LMqDT)Zup&1TLU8E_<)x%5&_v;!eK zcGKrB-?w>WBoz>OhI|o16-eh+sEVDd_2jBU*@37#w{9jW2|Tq0466%dk4S+W!!r(cA(ol_1b%O(z4+qd=n#yh2ajmfqV`!n{7WXt|16TL1-PBax(S-qT zXGjcD?M*lOb$=h-yn}ghuwk+rd+p`M%oDQ4C0n+Yw7W1X~$K=y@^;P95Mods=x~H()Ie!t{CIEBq4m# z$yIv$%LUyGs;O)jdpRL*TjA&V;jW&{N(m#XT}N+Z!xCpRwjBzE%qN1p%1NS{9vRyl zR0FE^d#=UTI4vxfUToc!H4mrzKBK<$CwsDhT=9 zvxihgkrhegMF#GTymNkbQ!1HEY^)7H5tG?Jc1h|Bvc3x!&I(WRPxyX76f)TK1Qw-^ zIx@ezEtA0BniDSKh~)>hcK7Ez3)~P#Pq>!3Rjq^YN?nHDTE8fkY^nn3rJBA(LtdMI zvpJ~OB^kv#C_l`DT4OHIw~cM-nAZ8rTNfV0zbT5!!XCZ z1`PJ03FH%sp|NT>YcNBv4ZyI&!DaUkt-J};m8}_oJdDAu+kzO9)?vTTAai) zao3L8(RGv091g0gBy-$cI?>VDvwv448jkQnL{@?_W15Ds?QY)4*b1St>sY1osA_I} z zLs40XPlPabygF1H-#)#%7=ui)iWC4wAQN2qW2`K3iYW0sVY{mnZmbw0gr3IvRnv(_ zQmP|!MDj~-5H(XSS30_4z!D@`k_p_HHN&f?WnnUxbj(1E#8lmIh{-cg^18~(Rw~GJ zUUSF_=_Y;*+cfo%sRs-+m1VSHMb|8-dH5oj^Z_wI0*D4AQQ!@RKdu{=Wjl`3Rmz7# zoLCFsTvl{=A_f%(swK4lvr?oh6(kk}ie=IIIgSzL&;tythbH-BAw_Z@+Y*gNybgoc zAqWvIV#*svW@m8auo~nMY*UFyp|{*}F%eBBB8lD_$F@hynyMMyz3XaYz0+O2ojuWT zG|UQNYVEF&XpCvTH=$3YAydoy{6v)zFczIds=PhogwQTGf-5|ax4tNksL+}gi+M&MkTAhRc z6TU5$O6RnI7Gxwp+Q2%3%m!7RCwfp1P7DoneM({zW-8s@H$Ju5&<#W8Vqt!Pk8_;h zMIyM`1?M06JiuTo_l9ST)l+$=`L^Q%Va-5Oobccf#i2B3b8J!oq3>Gs=)OZFll@Od=5e;e- z@(92~;n_cUk6PdVFZbYXQi?pMMe?R%NsPkjta)WADvJy+39M`yGAk+~{x#kU63>Wo zv~;D(>YTzzmSW~38pjuvK*EsnYtuo=>5GoDq!L{b6!gq_?UIoQ{NKL=)qS_u|4n!g zZ_>F%8UcMnv4tJL3Wg2emkwYHz+-l4|z%;hOo;UxkO_rgU ze#GpWW-Erdf$4-EHciJ024O0h&JCua*c#pMHx71>Qp6){ocVhq#uyZh(A+0Y&Dt)GCs9`^zBEHwS5W;>e?)sW+clv6x|;%`mt zjeL~x@9{Lc0*&4-OSx8 zDWuv?+;5r1R6dwG;7WquM>8q(evM8N1$LQgZOH-cGHc0xAQ}?cua!~^ z!>#HmZESM}jvX7&UCdO?k(E%$t+?>#J31m4JoUy+M%Gq273iFKzTgu#i=6t-6Z=1T zr2o$Pi}e@pEN$Lg(h|M#bSz4kT_Qht&IgCaRwVDi}Jx7~S0fsGDv<4QM-w&*;e^IkhEhjcZGw)Pf!faix?x5)p@#8={S$`taebY}@ zZfeh&#&FMjPju$Xalfj{ensX*o+wE*;McDv+|c%PDxKD~?_OKXGrG(9ecG1L6ZQSlVy`j#|8m(>$u_IOIq%*~c&| zMz3DK1AeprNB)#@d2gh%D$Ct*PCqG|Pqn@o9pKs!eYfk&sRUH8_3R_o>N%D7JKRn5@ zu}CapnU?WHkqRjznu(sFO>QQiycoW*Qpopo6iXrCJm}{=3qR&YFxDSx^mD5V8dkj3 zH9%0jexj&6wh?Bq1+sac?PZF#MB_`kHG))%Q8)a8h7aRi0MYJXp5AHMP!wM_RM@+G zu$nEQ)`^NjV=Cv!TEF49{6T-P)_qwI9DW)O4naKUw* zERY1+C-Q1pmX%mK=CbTX8&zAE6HY`=l2zr}#!fi3tX#@ZBH(NrTThsoRfM^;kK^~I zD)|m8glLID{0S$-A5itaN=HnSWfqZJS7mbNDJwMCJ~ina z6j>H|o(nSUM0!XwbMA?CDa+#ERl^b{06U9xxLComQq@^mw!@)FU+Rt(A{=Oq103S= znnL5lpi>^$)fOXU5C+?sT|HT`^`IK$STXsYZ3phTFcS-#k{}>*MaaiMQAqJ(r8^Rh z#vDrzP7U<9ZL}A7KA4_ZyPr(AS4pD0Zcjn=(qD{k0&{N{KjrK7jX(pqcFrz@!~MDb zT7Rx-{M(tLHzG>{(lj7+DiXsTXRN`&Rm_%uA|3O$Klj{ojG=^y6AJ`FL6%JBCQiS3 zePSS_xP*rbN0`HPE>!-LuT8mR?E7<60BESPb0Ap?D^#?aZOxyoi zGU~SN%m*0ph+FPoVTUYpIG2GoK-PeW0Tp<3B%LW9e$`)GbJCBD3vX74fvAa59&(&W zRNa{Q%4LUZRkz z1{^D7TqN?nx)HK5ZjA3BZ2Jo6pdG$@FpRlHgNs<4>Y1j7rk&bS84bBZ=!@^L^`g(4 zgSJe;(@|<}Fd&U18-GJ^uJ8-JwWzsTqYIxGW9(gw+=zz^N?O3V@Dm8L`7PC$ zHaGD{eHTF!h^)BS&jU4Tlp*S^wB}-8dm%()N_hTLYh=!Og*OKGflepd@%Z&7SAXuW z&2nH47G;ntzTzdb<7(7sd1y$bUOBFgR>R!Vs14w(51K?!KGn zw{IitaC}oa;yUfBJ>_1|{e!!@cW7cqPqjB1irS23YQaK~3P02*P6w#rx6n_lZ*JjV zxM9ff7Rd0k=s0`Hv1r5?O;Lpiw^U0*o#3zcO(Ujie7D$_Edh7J)_?~Pd-B`ZjkHMi zWk@c%lWxs?MI&fuduy#*d#|kzOZR9wyiKuhj*~c0BS#U_03HgoySZ?sWBoIlKc0@d z{k{KiVzpRLJ2G z%6?`ezQ?2uok+V^olnySehv*G0vtR>wh+UILa@+C#QZ&FxWRaE6b3^SEAZUM4ny1BJ09Vkd(%!;E?R~Y(n4s&n_vCnZZntY^2 z^HcV+Fl}l48j`dmVU00vj<{zL8~YH>E&5)|<)9@SaI%_misRXV#@Dv9m=|kW!V>1U z7bG=Brg?ETjYrll^alf!6NiMKWhR}tBL)2;2LK$2C>mbxqcJOD8Ff}!E}b6)EJ(VbJxxsIPXw3Tgh#hoN7bnlT#-qE-ZJpcg5vgw6ju5DnP*hetbp0 ztsxUnYSC=D(*SxI&;sfO7#K`c$qB{cZXk(#{PAQY9wqgEJ>W;D%QW9ZM-vzx3*ZLA zL?l%WrV5wDX*fbB7ZN+-H#yzGD__1rw52^E~f2wDym{9z!0z3&z1 zKg*GX`6vGv(m>_+J@u=|e|XQd>woY}R%j87pt4DY@8!=;pS=-&dV3p@{vUhPBQjCL zP6m;v#qc&^a;hu?;)eU9?^St&kn|R$gaVQj)S+{-om(U+gjC8O?Sq%@b=rjfS}y_v z!(uo~&+v>O(kq9W?oaW}ekOxx36}|V+U6VssU)ncyOK(uk_r#K%=YlhY_+BnAzTI}dGE5f&sH~&z%bxH`dN4rTf+LH@xez+J}{pRgk zw{F{-g}&9oezIW1OexYm<|YPuV(xH6nHeMh?sy!c- zNop{rj(qkQKbB%8hgWM^GvMe#agC|E>ni19si3DgP;tO3_TAz8zVJAk_a%J8@IE}G zZiIDRxO<-bi(<}ob4?;0g?xZudON*tYwi4aUq#XNnV+*6Bx%}BfG#~|ruwOup0CgE z2nA%)M@U(N`!n-zY>qJHc1vfvt#rpHU;4-TOFQg<%(`-aHNXIq+C8;^gRt-JvqjoSCZ#aDUVDn-DqslP`S(V!QMCg8y3g% z#L>Q~n``Hc<*mx^8_W8kAF8MR@K`dw|GQ(ku)zKu{}$gt-))|>F9Q&k!v~FCqu+QK z9;BMunC1ON-?#b+M^jh6;nd@A!)jsgAE#Cp_S_SVnfiF#57YoGEui;WGOAXRX#`n7 zW)wLlgwoL1yyg$3+RL?IVm8*ruvf0WNH=z^`N9>`ls+K=RW*=ZF6VO^NMpOc^GEoX z{s|iEt9d;ks&2ZFv2-(_r=r1u;n8u!8rsKcMZmYrfW!*^?noh*%k;FDbBa-Qhu7b+ zx*gmrg%K_qI{>>TcPGHf*V0yW=lOSW#-L{hI}+;Q_C)hpbZQ(+eTl+P?7^A+&UB&YWXWIrojMhG508f-GP14 zq#I5}-9*f4xBSEkl`A8kt3NR?INUeXw|abX#qNpGWEB1=pjpQZhZ7LD*tf`~*S~K6 z-o3j+VKWlcdH5M2S$Fc$pkk_g6d2#(D=xd@*xn<%2fBO8A3FR5x$V`ru3I%daHzKf zP7Fgd8|aJ}b&DY$4k@$?2ws998ObsUs7Q|q=)h1U9P3-TV*G+_yT)>{F!G5{UGc!q zjj>oXJk+6!^`FO*+gH&r61RsAf;JUIw^VL710iE&S0!Re1mwX&DCM@3NS<6Q8B!aN zRya1YKNilcz5?XH4HxX*wRzk4H$osGh+@D5Eo{}n{l_ji0215a%Kr9JITsCw?I#)A z@7O7@9b`0HRA}Hu4H_eJi~{G}wJe_30tF|NDSwE>zV27T%IP&tC?51SGn_XKM;6WHjs!TI0-){U7~lxh)otvQ!R`Geo=+wU99cQ5OEE zn7NAFr6sm~mJHT!yB{-xWdu&**+dryit>OC`YW%}p->g89IC+Ww#p@I)%sPNEXy)6 zpddQKMHNy!U)#xiNk!sXPp5;bgOrSH^7TshW&M^s*FfSS7my)N=7JHHO^tSjdB;yQ zj7(}tg?|t`Z^pPt{3)P~n|v3-(%UtJZ*K3o zi14C+gTXp?&tl~4xGu0q#5t{gM%U+D!*DYN+U3}&R>);@?&dRR*x-i~U%$SPa3jD( zLFR=JvQp~&4aZ8+XvmLL4Qd@G4Szs!nC+SNQukG#db0kp`6==Osj=KW{ncbl5eR#F z?c4eKJXuS2*Z*Z(*P2om-`zU%sLa(r&)+il+nG6bBIHDqkys*;Nx5l7PQ>OWhvN!J zmjZ^Ef!_lhv1jnQ-Pw55tRhsrgGrENq+01qrJvZ?K0n9oB*byoP3%T`5YCG1TUE;h+TAmF#lgc{eoFrGIdUu%DwQ6-_Of+b z<4E7Dl0obkU>E@2Mj=k&5Vq9-Dp7@vf}8KB&Vre*=pg?wyj+O1)WV0s0(s5 zssPZ2&I4en$VL#j7ytz)qVbvtQV!U$0)8AQ&%Ku$=1|xU@DD+~aI)3bG4)*i{q^sC z_G@vfyTqZsjXN*x%z|6U#xUaoGPs8l;Ih&FTKO2qSVr3Iy6IIm;nXWB~bW@HgcG)ztrCbi;%zW(H^M}??t{vMx zIn&u04MQtv_3y6TvE}^H{nyUVl3$%2>PT%ETQks|bDb!_L&6!a8JeBgn(7>Sz9Fh` zXhg$El}1)>+^~1&fs9LD_o4Q9R7TJL=11Jqpvu_ca<103a^~`ICArd&CwpEzT8-ME zQ_^`%=sf1X$e-}7TYRc>l5(`Y1G${xfx4co+1^ZFd=k2EX(yhvR$}Q?n zDt;}PYA<$fxbCtaJT*O{ovQHQ)$z7}54{rl{BIm&xnG3c5R^(62 z{dUV7S@(iJ^7Iy62LxlA8qEw%5`G<^0Ijf*WyaZ!1q8;*I_LpEBkuy+TA#eiDZPbk zUwpR1c($R|vo(^TOU=dXg4$X(F5Z*oT64;7KFfo|B^TCzGCCGGSrmDW6X)i@z~;r` z$-vm?6OV|WIZp$uRCH*|OO2LOvK><<{50h#Wmlt?Wt`<#XDNAT8m%n}`zX}1_I;$) z*4q|-EIi9U45q!W0NlGZqiKu?LI)_Ke8F}-_}dd9B+4_n z%=Z3XGeAg13+N$<38;;ECHy0Qi!a}jy#kMP9BR{YUP>Ob#v9TazVY5+%8-5%e(((Q z(3uC3P3}K)=E3?4^}jwde|h6gW4_Zw8?$cyW8M=YF;C@e{^yKA-*_@V4dc85_tnq6 zZ>^s%l%`*J0Tp!VH@xsd{WJ9+ykY5zxDYPvonHbbK7{kvLpj(UxoDYFPKBZ+C~&}_ z@){Th{eDqUmO_k0*%b?9AIT7Sjc`W=Nm6B1>zawB4N!YaaSi&wum>3_b3<2gRuZ~q z?oPR-sy{H${ro1sM6+Cv-}qAfQM7ly=ZtJ^Eg=L8QbY`#VKL5v(~1lGWpFVFZ+2{s zMvk&1(sl8={ta=k$e}c(!s}4ti)@V{{RJy7_7(ME{ua;r@VR|O?d9OWI7=U|r3#k6 zHW>}@QyMwems`?S4`EIX_BAfkm^}@uAEkR2T6AxO)OIKc>}hFxnLJP%CJDvETp*+g zhRW)$UyKc0*b_(~42DBOMbTseg>?)W`KJ@P?v$AbDyS2%iiVt9ebZ>D+-}2(SHL3{ z`1CCud#AH&ST^d{V`?FpkCiq&R{upZo`}l|pjBk8vpM|CzWzwf&K~T1x#*GVE>;eS zD9+35j5$zA4Mo!ou(0%PuNK8bTi1icuD`8*_Q9q-ee}^-Y;q-- z%5l>O>e~P@GR@gRXvL^>Den2+#ywG6;YF;77T}@2EHvpGWsGz3m(G$dr7+2I)VC=e z-gNTbQ(v0eDyk)1_`WZ5-j)eVlepoz9gA}3eZpxucN+>PrD)r9zMAO2;;TRDPgL{M zZBbfF!GO9e$%0Dj@hV$Sjz(fmj4)AGgk>ux;iiRZkyt-Qc4j84rx1V$sEguI8g=Gg zB9ro&Gxdk|F?>!BMUXB+fKuJLvmGKCfHww4k_3JP<}LjYh$jN=J9k!t;5spEB&6qf zW^er=boWd5|7e6^102%TG$8VZ9!?+S-*W+$89vKiAn6iogaYBhhV_L#AFco9_TJ%c z)FG~fCpp2fcE=S%BUhKr4UassAv-;l4I_%?BwhaPw0A9xo9rJE`RvSe_P}3#>Og92 zG$k9R%t}E3#$bzp14_R;@TtE#ke!~%^5TeJZu&&f-KTu7`hP#po)&DWLX2{=tdp8v z*k0!!tz@c6 zXiO%h`Z3I$9PXZ7Hu|&OVVSL-Uvh@8dCR6q&qPMj!N_I(vSK)w)Tv4ML!$z!_24(z zK1q{U#JuwOP4SaI{pyjz#*!T9wp1%sGWE|r{X~G%0>$#gr^)&8 z`1MCl?7n1jEQSCSnvrbB9XKW9))KjNY4erYN;RKLuOF!Y`dU5UM+p~=THwuyif-A_ z3;x2ihEB+Q0tHe%B_f~nYnoz#mqziGE%5&l_9CtsZE4b`r?RM`S`u04&C$4K5e23= z?y`=}ZE3kMBw!o$d-BOlcnY-Mh?^ZQ)ak+Fd4S32^*U8PcE5owvzctWy|NSySvqKP6o)unze+g4 zzY+PEH~T(K&iWHtS5vf5T&RV@sH z`=BL(Jz-)KK9=aWBay_X>t8&0@Rp+|wshySPMP7J_&Aw%oJ72{O-;puD?ty61(R;R z=;q&RLw2}79Rf~W@v*#jlVku@OHfMIEv zpCMN`;iCsG+3qIOv5#qNAk@ENcmJyKHK$)wfButy9mYN3e87z(56V{F$T$%N?)<%` zt?H|P5{Zpm$3|0jZf3=QUW=ey0pCds66R>OTIreDHF}8d>uvw5YbxCw-xGxWf%;>l zOBA^uZjcDU$>3qU82+Dxvyk=cDGJj-tQxXjTjEC2@mfB9^nF8=7885R#J*7t*S{R+ zf@GZwbl5em~LSW}h)K|f}7v}wEKGa)`bd<}9q>9+1hsM#C0}vAK z*>v{aRZ*RCS{%QTP$?Bbl>)Sm_$cb9QiYFDuTvHmZ%Y1VcFX!On*>;3l8JJ z24+`X{9t`SzF_`d@~azn4+qqnXEgX_Sh<1`s+!F*Yi`kkL%XhDHZg~w(;^@%b?1k5 z_kAlPK!rI?S7FbsnbiG_4S36f&>gDiV3!;huo(I^B(Q}Pn5 zJOr(0bqG2VAy|km#dC1uWMw5Yf0#kK6+Um9gc`iAy^%uJxuC}%AWR1g6|flM+rIEa z?k$+}KZJ!?^n6;gtMS?#!gEJ*i8;0u#AOW{599#sILOno%}a!#42nkS{e7dHXVN@X2eTl;5hRQ`fg?2MEv zI=DBSlp^GkU0E<1;8`;QFC`L;*v+Br5_NtIqlQ7QmE);II+;nht0#YT0=1TMh2<`` z!;#qL59++Ut|-RaBR$0md?;K4AQ>-?zA;-Qq&rK4_nF?V2;dRyV}#7uCSprSDS$s> z>Wq@(bVuP)b7`W8T;>%{y%QyjG~FJ_=kmE@d(ZEP*aqrMkXuWYz{Lq>@~VmeQTL-t zZ5PrnxSt?l-KK1-RvD~yfswpNLbQ$uf`D*}cqX8Mw+E88 z%!rRzxaFRU-g{FNLN`!A;1mSbC&@-O*BK5=5_TIP0I3(k5b?-Wh_X9AvQY;Dz$rn| zMvt+~(f=AC4s~n-^qGQo0P?sKaiq>);;TZd1exWYeGT!wO?3>S{6)Ko;jeWu?roZ_ z&Jn;9Ja3Oqy(->!RsA_~njHK{{kcm<5)Vw*EG$)l=xz>0HNSZ)f5{!cyum64#cJ}# zL6mv_cApntaqlM5>i)~q-D0q4-SEph8n~B-CEen~T2WNXEs8OfyCrdjKI{9#ZYh#- z4EUZe0{{@~2rUVx=|A|ge1ZC?J^6`|&HXD^jBQ!>s|Qft5?C9ckN0vHv>AYaGHqwI zKtPWqJLj(rwVk)U#R!3&-lPctLbKczl@ z|H99NPkXijeTL;&&{xZ*X=}%aZ-MYLQ4y%lYzzGW4EMND*74c{4&%JmH z6g;wTiUK#h+E*EP_Ki=!bH%FKj9G-Tjmbfn<#hr#{hH3mA#%?%>G6p)mViLE8*vs$ zub2j&e-FI_eE?wveOL?_QgwGm-}bI|ZHx8RVnW={2&&k&hp6PWw~RJ`CgST|_^G@F z{rx>pMqB;+3a?87yX@WaeakncVjHf2YDD z9sVGay)>3UW*Q+{NXf762=j6}$Vy09hl(d}YPX-Qf9V(3-jO2UsbP$Uxx@RBhQcRD&8L36EV>tFmi^$AcP&(a4eZQ5A+)Z>5or>T`I zQ=-}fmKG6}0hX<7%^BtGKfB(`90uD%nKiM%+NrfuwIh@6=fr@m64sVbq{oSqA~$wp zn>~Dz?D>Fod|I^wa6y7-4a^kh2^R?NRJibqJgOK7N|{x)*xrv_JEFxlmqjz9_gzf7 z$msC_Pa%R~ElWWgxQ1)6sv#kvgPQoDwC^u3AJC#}@}im2(<7OHU46~!;cKoQHr+jy zmQ1dO9{(U@^53XTjxYnw$?FN&xe^DR*qp$^(i^5($2q z2}dyD$sx+d@g9GW_2*@}+*QVCKW{_PF8NtSmo@NNW6@~Toqcp`Qxf51(RIh1_O#x2 z;>7_QT4Eg;sDe!a|idDs+{p=Dt{ zKG6+k%d=XAQu+RpuEqBgd0SW}XI@7v(*1o*RsuByrV}4bg_Nm@sR=Eb)v2#ZQ~~%z z&aEUn_I%)HZY&e8L`-<6lt>Xs*or$j=^ChmV+CCdue~OGYRtb3w#+E;8FA?e7eQ@mPY?AE)3V~jz*`@`XX!y z?gne%iVU_EfoUEDKz3=~4lHT}cws#>Ll30ylY%PEalBvA{00Im?Z6j9cRZvQZO}El zBcnIIeOqCDG5`^vPNSNSe}%nJwWK+o_hY#g9k{mt(jQ6pKB^-epeL+(?VqgSFRB6V z^p4NPzWCC|_*;(u^P{n3dnFwMa}MFe0f{90l3H%f>fG)R|McX*l@*6oElo0DUWg@I zx;$9pxulx_BJRIbOwlj^ zM+3zMuW9Sw{ayV7g6~D&O`?J&DT(jo{Litzm`LlH&s{UZ0?G&XtFffmk`iR8_FAOz zh##NQiD+SABeP;3_}l|)^Xn2-H`Nmfz;Iy+45y>ZS#i8KlAXL_C=*X71SZ}k_|!>; z3Aaa-P}{||pVr&!@BF~-56)b+d5ywbRs^-s+~Bd}D_%qN>xQ?!iv;f4IJsfkU?%~U zp}l=|A9+>dxte?z!|nUKzav}eW8L)PuWzE|H$E0OA7dZj@AGAlohahOAZvSC8rH!c zXT@=*zdy*1v#dBMii6CC(US*yGb1rM(oT|B{pJmO){Z%(Ywy3`(|2Ae@M#(f6aGFc zpA3Fg4y&w_Ar8r`Zi~LpQG%s61`@MvGgtT7^#wZTnmPSv=kF0Nu8Y1T?NMjkGirY;!&=hf?Uo!Mzb$WBdC5ZYdV_tN**DSb+UZEc}AI zo_)LTey?h_u?pRCh6cdQM$=xQ>C2)f5EYk`S4SA9p%4Hbw9tc=ydpNDp?~Wmg8Ic9 zG(8GRef4&eW+qASKAlURZA2R6kYXCraOU_5FyP^RLBEoL{=@sTvGay9kwj<+>~{_I zDJyr&%0TtToo*r-;t5q0aEP=>DDJk!YO8cwSp(~=s40%o{SiwRu_6G*m9dbOm3Mxv ze;i&h^yvORAZAr8fh31xWM!!&GF%`^ZXingJK9Twg)+y4q@ZTHW0JIHD@rQjX@gyZ zfCH@>#Ih;=XoeRG>q81FTB6{jOd}MY*gDpOG7_x_w@+sHc0C+Uip2Iy7D^7ekm1k( zj~ZJ>5M_bpE@CPI4ayC)6GMr>ycRp!16Dxb<|w$6EEg!ZubU`=Pl(8#?Wm3fgB7j* z$YX*!p1KtjHh-})z%Zq%W$8u+?6??MKR6BZlkv?i{3rJn$nOm0HKSU-<=}yCWgCrY z(%%?XC~3s)#nu7zwKd*!s61IVFs!*nGON?d3VL$17%6+W&L9PNUdD``ErkJ4@Rn>a zWQ`y7=?+PO1cN~WCd0^J1nN>OmC6*`iya~BpRPM};?zIvK#F@~$LI|=j560mV%r8n zK|kVviz)pjS7O-7l`Few4JT@=@XV|XKQ3J;l!Ivy=3qwY4;GZ`)A%zlmEg?)OwL&# z9wH&jh&q-x5JOmj7P)1Nh4aA8A9(uIy$Tl+wL4bMeZQyb()zUhgzAi`DYFQ6kWqwd5nf$N;JV#UdSteQ8@5HvQ|KjZ* zV91@)=)C?*V!$e;(fsL`8n-5xI zdsfLt*hzP6AX|d4!n-*>SY?Lc4&L@3e|_6YgJU^Gbt3szN3>8(X6n|jQFaODX9WpuPt)5^*>KbAhf=J>K=_Y1#pye#d z;$r{Ug$5^<9z?Z{Cy|X3FuF?661UpxJcw)KdbH#EnZ>Ix-_E;XfepzDN-}bVQnlQ{ zarK|wx(P^o0Ufq?cR1YJ+1+j=QSo=(GO?wCcsickJ8f|`6cgrbNH6ptwBV~b131ue zEYWreUEVmH3}qpKh!A8o%uAcnt8$!~8Pha!MM{a4$WXu$#j`jP)vhC*&0Ux73 zkk)<;i)8<}A%6aGle2=5EmD5)8{;ep#X(0eN8>2&6tTLyH2l$GAF9>Ztyr1@i>PoQ zwov{5@9eLk|JVC=L-ObXIjwTnR%du!j9E)NxRqjTbPo1p&rKgSq>!G`UvQhgAwAC~ zYsi*gt^mDXrL+}LhI$5eRcl@SZsyrjZy{v;4J5c~mFs3QE4yoHnV_VponI&#O^2d@4E zoG8Rms+}*_0&Ky~Ky!!!yguk}DH+A`tc1O3`gpoJRmog5c9>z-jGt`7Vms&v-}!J@ z?%*HA8ZAC6=TZ9x2Pshr>jpqNAWlo0S32yeHP6Szyj|+LMu#MspFi@*eTP2x>ks|g zizJ7&5fm9zJtqN%3ZPzH#=?B*+=!c;rq;)?;@OULtz7)!YKOgVZobd+>6tIj-7On; zkI>~Ep;-hJ2?A&eYA8I%a$%)FZf7nP31MXtx>AdfeOvEg?s1w2TvflAyNi9?_io>p zeZK-z9PM0gs2j7U^(@p>pS$I9jalIx(VAlPL-R1aco7o5p~chCFv1#iR*96% zhf{7UJJ9{`u4@7us;gB^z*@LLfh)(2pv16Fv|5X(tpBtV85u^ZPeXJL^u~`|1PG>1 zc;n{7=W*=D>K2AXDYu5k#|X->5(KD6K!H2eNGwm(Xl#EvM7TjX7D@z3zp%5rGXcRL zpsx6%Z?zGL=GXx&4>{F7C-W)&P+35kGZuGc2eOk^PS9T8;e8>z^a!}gV8Vhp zs3@7Xj#7V^Ed;!=L&7eOPU7IfFtQ4LrQDpT6`|BQQTt3$M*r%B4(KG6~KnJc_g^ zwe8Y`dIL)#UzCDRtl4B?oy!Z1kQF|DiJ>xoC42D`E9HXQp}JwQ3a%x4PbpMC)0nG=4Tl!0%^47rr|GeJglqG;YAF0+$!GOpZ?#6Om1Y z;xN|5(gUiC)mRBv!pbE9%p7CuXR-#n*AoEZn}xi881jz)o#OY%dy7nk#Vnxty#8C( zL7sv{pFy44gOCLzbfKMJrtzDav(?L<0`-Kd@eZkiCP6DqIUI``no6T5TC+>j=Aw`P z?R`)v!2rPTZWE*|qS$ccftgc4lGYm_kkL%WJoC0~A9*+(q6_K!O^z`O5}%$JNy?TD zWA2D%RTk~GcAFE^SZ~ObgJEE0aVPPSZ!4fxKve**2}iZsMHx+wRqWq8{XS8{8n_&4 zz6GhQVrg1N!;%Jx!4(O*I40J-qNy9=$t{w&Smu*;Iu)U`d2K-p$NUVFfrn?(W6dC4TSNdA&CmWhzaj zbLdmwx$pNr3g6MZ?mnMSyoG(2@2=K$J#*Na@J$uB%w1`T!?`-}j~>vn_eF2O@n=bF znj%2IqwApL_GOqH(%ndMlRv09f3HGqPxf`Jj7FY388VC@s;2>*i%RW2Rh!$sXUaBA zKZT#u-x}*=@1_bz4HN_@9Ql8!VgINK{y(zy&Y8|c1k#|+fd^zuh8jX;{eBzpSvWdw zfxRXg$`AbTpPM#_eG}!tHs<92s{fnayM%-^`*QF9urEpXiaTXFn{F>)L0%9<$|}i! zX|nr&)j?m7^!KgV3hjpshnh}x%2HQ>J}l!KUHA`fANv@%`;fZj>lRX>TCzYb-wQS< zJV19X=5v6doV!fXIob!l9X3zRFg;3JSf3f4sJ)eA?|t?6CZ`E=&jsz-Y;*<79vGe5 zb+qJ9*@|h~F^+R%0jyoN3hWOew8gvI`>jwCMDJ2s_Xjj!v!XiW_Laxjw^Qgqi^bbc z|L|{5-6*4;$y}8z6gv)|e*A__o$Zu;$jl-{KxQ#O*-@h(X7hzYo|hjTt3(~FkBYTn z@O7-@R#)8_6j|Y!HDx>4w9T{i6WmwXH~Usler8h==yQAKtL1DodtynaHoD52LEhZq zDUk+eHMZq0@KUEz_WZec2}KHKsp4QrQidJ#rky~tc0c}mt_>?!kMvdA6QhJ2y6wlC z*W01(eN?S5*C68(SU1#zq9_1OV(K9sd6dzS;VOb7B)J=fxJp7)(r&hZsJ@3v6aHtC znl66xrT=Qowo`mmOZc%IY|zLgE0x-@yFPfsn*_!}`D(`@S(=0`J}{X+=1nj0g52L!}4e2fAeq!i}`U@SdhX&oi0R7W7Cc3)30N0wfinW_0OWq zmJ4!Co7Gf3%_KMNH1vcQK6qb=LK15cE~9DW7UKfA2TSk>yT|LX(Wo4%#R}zWt<+xX z%x3@c$jxM3B44NuOb)G%M&EI?zOZ9<(glS85hkMfFt3z)`$yoNn6K$YlfAMXF>{9< zvEqm7S9m?deV+JJo3N};Aq3V9(i8DxcYN-F6Zj7*qG=<5FQg;P50tTios1Zi{Yk&D z|F!LOq4rQ((0Wr@5N?tm<^69ryz5YtT0|KK)%suc7ysx{G0u>B zf+|8^K_SDUEf%t5bLckmJ}nahe71jNA4^Ps#7=H_JeS*5#bO~U*q7nlcHK-wuUSip zfFNlhP(XMYc7h^eBsP}p#Nzb;6_LB=MEH1t;LP@*9&>JAf5~)tcwjs^wW}kj?LcfL zBLx`3|ASIY9PGCP$Q6TUrOS$d|CuJJN0`0et3MF zO)Z-^jL2F6fb5pGrcg!sCo8bV6}&lRTYg+ruOc6tBk-uGeFy&dGxkxshAVPgP|giw zMzx9;mZ0q|?qXBa@Ep{L)hPN1(eYFc{r`D9|88lj(lGTL<yofmzFI^pg_Ev&`bmgs2MpKh)bqBMd=XaGM=s#J+Sa=?%nKt z&HOvqp7{UJT9fYF*JTW{)&%v$!t2^b=t2A6LvOwK_y1wvqk`PEjS_MD?qXZI2fJe0>62<7xO&7TF-V*cZKeAzVn?gyx;pZWyE>z^knG4 z#gRi)$0CRUNd$sM(vqi!v?!|l8Cs8!=n0|ViT6|jy@S-Q*dI0NyYf5l+mARMbp+tM(Oz0XOiyg~Z?BJ! z0Wu`?Qyy_*dLnB0;@Yt*j$VOIND(_AB9(!epsoX$5U}4;Xd2Q<0#KK}kuyo3U0p85 z7HqBW$dNuhv_9EL!DBoJ&;Ofn4aW1cj!Zh^>43H{mM!*ZXMo#FYSpWjJ=V~!%{f?g zP;>kn&uzbtmI1H!`{+!#xCe}R0Az}|pw)R38p#W+nyPG#b!KRApP>P71yK>WKr%Hu zo01GeB)*VoXMBnVtOUq{RXeC?P&urO*ewSz<;F*8bw8U6f>Xjdv!!)0KywC z^mPMSi>c6MRIjQa8;yMUiBKRI&#S%u^=GS)fb{gS3)n*dKb zM>31!^J}zdMB^l%yyL@9ZEed>6>)?oAU}WHAwNwSXgxRGdw1HJrI_?D*P32)c-+k(*-847q9uU|(7I2cWba=0?u zJz-mh{R)T=V!^2~nfHJ%UX2)nmYGS=tGcQJWU@p?_l@}EWZVD(k^|feNHa{fsG~MB z?8z@Dke$H$h@(OhXgxDkLO_6tf*Me`*jUgbc*CG{MGjgHYi4C@Z&MmrRY9GiPcCj6 z2y2m|6$X$U;4BJ?4f<^>HVM7v51~Gxb!j*~2wS7A4d7RrkeyL^&GPu-KEYd9Dm4U$ z>FTW?cl7ulptl*_4V{HP0F~1cnx;Z&Z{Du>U~g;a5jy*b+I6a@mKd~N&|?8iMJ}op zZK87Z99pO7su6!MK$ZWY^saybX5#z#vhVb-AEAxP;Jl;K9L6L&I< zsbEK7*zG=ZR}#Vg!b3jq?#=55BL&723aian-c za3Rz+$_F4G*%1Mm=Cqy|ed5aRy?6iFw8EpNlkN#6_lP4T%1%h?-G^ z$0e`IXpw*-nUm4imQd~QF~ac!5de|bhZ3RijnIAEKy6cT7Z({Eh-`Z3!A<-FbDod~ z#GoK)0+7|&Ip{Z_I|pUY@@3QB_1EcfyE2!Vc@epm&f7C{0elBq(uRFw2tLC{u{%3-MtKQ0_UoZC?J$42g5!Zv0S z^ccx#4>C7K)fJYJd{|A&)H}Q@$Bcw3z9_wL<5VabOhjODs!8Mib8lwvIr8D1ww=o% zJ8Glj_f6YUxkNq_2AjO|8{d4c z&i)GC<2&(#S8ZXiAsx<_<}YZJpi+bxN`m28(9~G-0p$m1M#}<4z?6nf@u2%F&TNG= z5NPYPVd+AkMxuKYTHSnS_I4Bg_n+`U`+5{ zUv%9a(L~9zO|cyJ!>orT0ze>;E{ctcqZ`ZUW{5bP*9ca&a1hCW%ydyQABIWvhU3V6 zOuos>rED zgFmCY`mZwO`V+EQ4Hhz)$XpDn2!R&3D>N0#n=D)PB%#<$ld~RkB0w6MN_z!OI$+4Onj$1#O25Ohf;0Gf}1m8r;VxOEBx?pNB zzB!Jm|Lrq{f77C)(TIo2(&!C+0?ah0(!~?UATetF) zbdp`Ah6;&Q+ZtRMAEclubfb;zIwS#;kJH*fXo%+pvOxvMy(3kZtE8^wdo&fU9c2D& zwIGR!SD_@NB}jfjQ9#psNca3F#R#Er_@@hZ#?mDdRQ%oG{B4U7+GqN8?WSKVMpKqj z|Ar$*$BL94jEYgr0c(K;sVzk$^ukhfB^2)##Sb>YbULyS1K+~4rHD;CQdIx^v!#g6 z>F2rkvwwjaxisCuf^N3Dv0jIZt@Ym+_|K0JuWA^3p15xEqAMf%2nYyyTD-jOw!7A? zKW^*X56FO5)}-FC0?XYLGspmk`YSJ708gdYqg@x$p_9;CyM7V+ERn7hWo>Ipue)cq zqo!0us78RT_iS7-zG1_=bd&~F90dod?if`Wk?ecnESHQX+bpQ_frd5Vmt*G=8SPb|J5|Ei6*&_3G&`fR@n!P9JE z$X`HxYjh?_+j94=%W{&_n46Bp&F6p0znOm@`q+OFV?oiDEp)J>JVysvtc%t{bL6|V zdPcCeUwDHGC303Rst-nT%xyHyHi{?@M_ikHrz~ zASkj^dml>BuykbufV|9S*Ly&*Jx9ozNa98lstb%(R_g5chKIIKFXj;d0kCXH#AH`z zB}vm#f>e-|LbcM*{G14Kn&RkyI)OFIk@`)DTM=)xJUgDH92n5-36Oz$ppogvoFaHM zp@8auU~OO_hHx)f5rAkEgCh1Gj~esCkitS##}sbhdZ>Sxzrc6l8wn-sH=~?%`zS(T zY6U^%_u!Ipdi!$5V3q4Y+HVh3tHp;kRCA=Rd6;<^2@{UsY;r*Sd&c0ux>WSUAegeni8-{Xa0$qMDC zLP;$?0;=Myrm(`&z>eOUp=NZB^O@yZqPUpybHx6NZd59-zx)n~@oSbDP8RY-TuP3H z!oQ76-3h=92!(vw5s-}-;aJ{_Ru9kh9y z9_`58)k-;$F%T}m8hiG8j(pvF{+H|;_CDnDkYR5`qg!+5%x$~<0Or0u^X+M+uiC1m zEl*A`nevS~vWkD{i?)O~;zEyJeI@s=3$KSvlz~{X9+TqZJIfy1i@t=gX-LwS8HpCQ zfJHDKMQ0DRreY9Gk-%bYqe2)VCS+RxL-hz&A*R#%B7lF0rkUu|j)XSWcw}e@eF_Lt z-F^+^H7Tzzn>EF7$PfVn0zE3)r=aF83_=4~Rn#zpUxZ?Ge;-Ql!~ymmHh_S5M#-)_ zKByzg##_2(7XszEboGc|A$mcSz}~5aG{Kk4`iiyekYt#EJfosmml*{l3qAX0Q=)6Dwv2S0R}XrbK)D~y$?`#Y>I5$;UZ@lG4jGywYs(>%2s zXH_-LW@!19r1|Fl$GH;^=OV_qLImCLdqY{~_3RzYP4#d1(hHdxf$+YW3382~ErSvQ zdn+9*4P;KH2O()%r+@qT4+!t#|FY{Me3xhUElj&+9~Cf^%M3Popb>Wg|L5~}Fmz28 zx=lS#2gCY;bjkYOF%m|f;P0`Q{K6gst1dSgE{?MQQUB)i^fYX=F?5{Wc2C2{=^C0$ z`2f)(2~D4(-UqXKbnfepe|CHQYW^U9FW6Br53c#{$UXLG z-yq&_SA~l~r7jy-6tU2#GRD4}O;dZJ`B=4l>_O%{1i7kvvg|wYZ5Y2923{Mc&dGqS z<^2ANLEc?|dU-6jJijzO(o;)shPkf=%+OWe$Yh7p(IEN!xx;%{F{+gjjP!3rNpO`r z_sgfh=LrvnLq0>({R&w0$RKYM!Pgx@cO2}wmX%EuyZf%bYxkx^A`-oESVn7DnxA_Y zIYfTKycIUzvn;;OLU_8ue{By$<}K6~d!ZhP4qpx8NB08@_ZE6b$bn-ztsbMc$I=`_ zR}EpfT~#&1jNlc%R4dGe?+1+rddCa(RpaujE=ea3zA+Y7>)}i;jrX~_3`VO+ZqK8+ zC=yNRh@vMDphO~?Dks_w3{6v`RzgIam%+Zkc))bvXOQ04CU4BLDT8wq9lD@Mxk9es zFZS3ZXV;%GWb{12`78$(Qww%1)lE=Puu|xLl@6&&EJv#+J!pvy_GKYDH0)|RqA*ck zHe(velp)$d_8y@K*q5ntTD0KL%&$qvUZ^9O#o*B+0AVXb)75!z8bKk!kO86(vDhHJ zOAnQ~qMxJs4s0PxZ?&fys*Qk|wTHbJHj*Jzw1ARDNPhx}60o8}M}h4a{MZQpZXAkO zlhEfx;xx(Yld_BJTxBO~Y&KY}1_RyQ0XYdTnA$*h)Q_|O%kd@dd$we?MjhktN|w7= zoJG@!Lm(5?c1IiYu!bm8E7+KV#cZ!9((4}&$cAnX?e+Rb5gVxG&MZg# zA>W`R7ISMR@@e9gJRSp?Nr2jajoaT|s>%gZYBTC;3r(`bx^CNCFfjjfeA(`?C4(2z{?3v>wEYp{vsU-_0pfz%yma zTpgN&UIdFqlbv-n5AA^S8O@iq9}ayh?@Nz@wwoPfZho_9sa&u}DQ??Z(xN2`TRO5Q zs1Of{>2xXHd*~xS$%8%N_;w@;X{!t-w_ZizG6L9eW;_eTc#OLhq_!-d9fhr>p8TKW z_-p3&ksHg1zi{fxic0bOP@ ze_jDMt`Ysxb`%827X!q}&tpNVrJa;$c4rAM<$0c2g1e*mtf-F4u=S7fEXZb8&V8b9 zKZ#tEF+iV1`LoX7DLlsiqU*A*R|7fUv2;qoz2bfc z{&BlIh`bOm+91^sKpUm1`Fx>p@?`z9fA(z;YpSLh0WzvOWRmgud6Wc$JW8`f)3Xjc z#lZOZIC<+Ql0g6-kT*~>`RQ;pmY{VBf{0)<)&q|&4?zormR||hbU8XU7MpnSQx{|G zXs@E8#O%F=*tc8}MstCQO=vy`8wq?5`{``J>Iq+V^OZ*uu{9Nm2T|*UC?^2(z&l}c3e87}&lJS^ z_egYIKr3z8TH5t^{pT-dHDEkVYvt9wGaT7^&sWHR$ERB}N8VeT8mRPk=fZz~9R=A_ z&bhvV;z2Y8>^}_hoYLAr0wp&Ca368zTld^^&tE>o_$qe}*OH;IfjT$BoGuQCQZ%S|u<0U=Zt#B7G^eZOunlcO z&0yXL_6<&X1A>gSlnF*)RA!@(g4iqa*~M2(E~JyGD0)C@qahr!X67`Q7En74F3NDs zJ}xmTfV)7hnD*&6murG>cz&{HFrGt}1r;)ge~*y=e%kMu%pVdMLp7~vqED1P>LU{Y zY$-&PW2mmAC7#eCycizoUzj?k!1zGB0&!PqGFyNzgOI~iDFz+^go7c+I54wzsJKaB zOj*-SRB!5Qwr$vR`{`@eY7jHJ@S*kn`(K&{U$58j!$e$5_Y~f?;+g9B&D=+*9$7yB zFTyckCZFp1Gp9?5TVdOpO-vP12(6)Y2e>iQ_^drWh*Kf*RcL?I_|Vzto$zyWdfaE% zfE!LbWt-UFQ3%nT&j$3XF`G^}%Wi%~pF1z)%2vZKC7mT*j+C`&1?itnk)s#rykN(# zaO-uev2HN87zQ?cWeYdh{|7gE)GO8oeU=ttn5r*iN0v_c1AVNh0O;^hU|3-oO0fryJQRwdF0MY;C^!|q+?slk zRflJl<7I*`phI5NfA7u7(fWD(Ioau{Eau}X0)ISQ=ayeZ} z^mzSR?50bvoLNRquN4l*AQ99e0JEY<$xYCxMM14Fm}eAjW6S|kpgPkhr;@2uwUPS#%9xKW4E^RctbO z*b&~S7f?x@enYR5;KJ%aZUiBF6u|w-RS&%JT68|4=LtBC5rv*Jf))n2vi|8n>9+b; z9#p}hJh3-ek&I7nyM-e@5!LF$Q`h9zD)vXWUMI3ZfOzcUE6Cs_Gz8_=asgKurFp35 zFVs5u9EDge;P$!eth(NP{zpjmJP5lLh}!4y6KHn2`EZ&%w1o$x;55nD{*>h*bcUY&6v~@7VNl#Mufy;mrSoIwHCU@5p`zGgo zFRDU?qQN*>Spl&Ul$TI_k#Bx--;?)nAA)(WDtX6&IQPT@rxvOQu0)XNiw`YN&Gewl zlWsA>o2wJ!v#HYN z;_T#_>Toe<$sk5lMe9RW$PVXgsZlr;dgL?PydFb^eX&G@8CscHnlLP8#xf>KlvV(N zKgJYyp((Pt?op2V6bKM8l8S%z?cJke>qe&6%pSU={x2WHCX-kMogezf(DXRJk(x)I z>HLK5>lrRh)XxUGPYzas3)PezHoVxV047Q$Yop7H+j99_;pAb`{{UKlcueRVYGbTD z|F6Q2*|(w>)VsR=Xmy{AP7}gWA`vc4t-R63|%1jv@~jv#qmm-m~lp_AiOx_0WblgOj6E>!#-?YWaMGXTj8; z59wHz08I;0q+IIjt~{|Nk2;{gf3Xp9$bcC(xc~Sc&dg_1nS`OOPlHyQ@fe!-$~P%W zcj+g$UQU)W0|S$D%j-66Uf4LLt7U(EMbSlbeq=n6psm}n8~S$BZnxLh;Q;i36*{URTgEpR^ zGd0iB-nqpX_D;gwHG4E&LJMF;)T|=<8$GlG5OR;8sD>yOdjv$;A=c_f9LehU-~6%r z&Wx1H;W#>ov6fYoqMceH&OC@a#0qOxF`>%M!rUvl5u!*8y*hN$!AlDf~LXhR`zNzB}rf0Bp2ne)nn-C4Mfi_`+DCQ~y*|G^W zO}iQr4rwide zUjUGI?%`)nFnczl+{5`y9_aW?9{7(xb3bE9lKBkxa?}@&P?R<42r6KnF!De+bp)N7 zljx2+rox@Q^lx?=IZauMBGCe3wH6~G6w{48SLb_j`6&7&16jxhbu$ny*7o&A3417& zFK1=J!p8cWo#(I}O^%MD(L5M*c|-3;TWu~|D%U3FW)?%inSo?5;tdgIq1bn2MJFc5 z0WI9?`Olt$HNtc)GoNKYgt}#STrY$mLR?4M@tY14i>?NYu506_f3wrb(cf%*e$#Q~ z&i)32^c$Sw=$9vOu-B6^{cQb+a3EbUXGFsF;Q` zfvY*j2))Xx9Zei^IU$`j(Ma1jRS?YO0Qsk0^jepL$0kgu{sdXjjloBN5$B0d5Im?e zg*JuO0NCGYd5(q3kBVdAQsX^tfU4i?r+EFay` zm)5|aEA^`&^Wl=?M%*eL9*Fw{>8n6BIF$JhrkN5{}% z6*}d4XQ^dVH1!G;j&tzyOoF45oEdJd7)*k5GB|zcnfSA@)8H`t-?~Fs|u>;hGE&wUH}eS*(F#~h|n4@%f>0cQotb>F3at%jM=(2wuACKLP4^PLdLsb}-a z=n{!~Y3tMd5k*D3n*%74-T>7EtsC?itnMW^UWx1AS)L?NC9^=+}t(Phw)IU4wCXc8xLML%?axcx4#3_Y>=Iem6cYTN)8OPerc zkc3M&qckf0#0{B{twl45VqbN%clx?ZPA-BSlHoPo&aa(Z>R;108;=p?Vo5wY>f3$(NWA;+q#23z;7ynHll<$*gi*y}2gBJ(}XIQ$N=%ew} z_|t(%j|N@kOhLrTEj{ zQ@0(wf8x4{xa=!hoF^dvHTlP%3TTVI;4d$gNnR5}lS!D-;K)^l`vxxg;*r9HJyA5 zjR!sF6&>M6GkW(z7dYe3P8XpNz2iD~jSE|C3lioe{RXXX%)J;vB%UO5xl(2G!96S0 zQg3O?!a`pFjClYBK|YgSz_4k@gd1M>>33z4$rxi;n55t2q+3nomdHdAi1$4^FAw;G z*4sadyrY%$@&HpJ{e;3AWFBUhHhKNR)@LH&c)9N-uMtE~D5|?hs4^`J*}CiSrGz|j z!)c!Fr@T6-{l8V1por|TDnWA_@(yuYeXMm^THu5RfK8Qv;S|PIp&rNI&Sq5!~*5 zT#)ow(%U@5qXyumZmkV_tTV@7b9hq(9US6b&8_#iwZ5OvLZ_ZYjLES?-GYRUJ=A%( zHH*$#ZU5z>99`^rW4EP}xXRP(kV{9jis$`?sc&Rrg}Fj<7V%NS#4oeszR>ACyL$ow zf$NTDECqdV;KpJP%A1C{A^5hMH zsGc12Me@ws>tO-R-FB}N?L~B#*L?@c-UA@c1yE`tKfX<2rwH=-%9$?%3RJcSe?2@i#}fCL)C zlYLowDaT&^o}IOz*lbYcD$^_CxB znqPP4+Nt&98yL?F$Bp{gsq4mqFC}mIzH;llpjX0uBo5fIzV*REXx$rjZr{FRduE2h zKD5^jp#YuIBCq)t^SA$)b!m~kvEsYVWkHLqOU&Q-A|@ENr_-^K{z!TvB=W$XnwdeB zwGS=?&ebLNV_J z3>+Llzv85kvcX}_!+j1rDD6G{d5rgo)_7x3p8aUCLR_$VoN;spH0O?K0YlmhZnY-E zcIToaFZHbP<{xT}_qCS|&EGs|sQJFuc;Bi#-+0%LeP6w0p7)kR{m(bv&s_TJ2K)#A z2M3&e)__CCN!MD`4u2gOd@uktF$$wj17EkVw*~mA3u4Opc*L)qxL?zdhp*O{B09n_ zwjsBa^#H-cRhtS0v3`pZW`Y5WRJWiFhmSaa)L&cwW@ydhgF_)qjE~p(avb3^Mma4C z_i5tt`qMn;vy5&{`@k*zd1yRT$07LC!J$b6EzOEIpZlj3T2RZbRpdt*{z&f?LDa&c zMU;rTHKCv5LXm5M7YM$JWsj_zgO3dW!I&LOm5`kZS!F{4K!f_n?pQp6*wFq9N24_e z_+hmE8NbqfbpBGnUjy#O(h=T(a}sa{uAPZ%jl~nrC|Jo+#@2vi3^1XX#}i2fD(U3C z$A|NkfW_Pipdsf2cdUS7S5#auq`r=*eP5{7yqTbU`>zA$S?s$uSm$Y&icB{yW@q*ERUV zK`@~vyJNB)4}Fw4O3*cXL2~KrosI3R#t>(K9AXw6*fKaUa=1|AY6Oe5d08yjpmUKR zJ0&Ms=A!z)4*-@%6Z-+0>MjqNOqeJap&ze=^t^|=2p!*uHC%?$M!y4=vBvCB{ogNQ z*re>7Pe3U!4iY+$Az_m!4_kzOOi!=hxj%U~%@#3Dhz-=m8(myXip%TL`wYL!PB zaQ<51IWd;&+>ZE=-bZ-X96H62XarR z{RH9+f2{#%2l+BhH2~HlT8wfdDy-l?()VRK!tmD^2L0M#iU$#q>Ph8q0#PJd+yH7W zDf!xsahQjwg%efUq%WB}i@&kWK%L5Jw)ch<{j`f=?%8aIH-giLIt zKP?#Q?M00cHV*v7f#XjeRwRdXim84_a;cPHb3AEEhyM(%pvkGP$~N?zb-w=2d|%ikrj;n1?gC)Vufe%=op zo#y58?A`o$R~g?{6kDqa%FU6T=2v%~i$#O2v1Co$&<6xQGCUMf0+s?D%83STTNW7{ zjPSyMZp7#A7!HO8@0jDq#}i@_tTD9Q0Cfm50Mg(H7HFq%mP?9>@yKvMlC9wgZr^o# z*A-+f`vCawI{bH-OO%|97Q|4AhY8UrqoIH*w8~`aNR^5?;*&Lx&gwm**bj-vml{Bm z=|7<ZcxnUj3gLN(zk7nnkZu=Bm`2{FMT3}bUu|J z^n30Wl^qXoY%y0YSCV_tryxc};+jU9A%2Tjy>xTu(}>3>qxJ-ltGF6|t5rYAzT*7TT{Xlx z-Od-CKR25NMyEq|+X^*1oF(5%hu7wdU1q?-S04*4((ng|jEEq97hBuKPDP%wa1Sm-hQ%o^rF zcB~;|5bKtNBWK(>1R%}_)UT1InO2Q-e%k0ee7KM2uh&2o*X>QGy+bFC56Qv77&M_n zB@Qe&e&8B}NWGjE4r>59vxii4{p0j#4DAnTi*;&rvYN!}DIb-&k@`OVC(sv|hqla7 zyjA;wUB&&9tHa77|46!*VZuY>u`9pxw^s#vdIF*m1y75Adp_--%nX*V`tEnHG7EV> zZ_qMlZ3q9Tu$5!WyARbqQGcL*-zRfROF1>v9TbEuWHP%lwtMlDSh?n~V@p!NzNVXLQqgT#v2gChF$b?lm1rk9U zB{couyUClPknzJ?>NCRlto}MMeqfDau3g*L3%OHc~T{;5^7(L-^$;B?#!6av>1{%mi6>Q=UE>-qCY<==vwH!bJF6z{AhXSP^2`yTYNn5jT`c)74drwnqz{RloES3T~Q2&EiDm5 zi1Vg7pQbA|volpG_FePT8|z;ixO;2=XnxxiX8}?`O>+Z$OuWC=)OgHZt5}pZxl@6SCEfI77??Eugh2vypgr^#2MBL}(-e`nvMY zUETbAS^$w8A{9LUI$=yDfomskum7t4?FS0WyUH?Ja{xpLx)6{M6D?%$)q|S~A0wB4 z`BGnYeHIn(;Ll*{-(GWDy>Q=dBjOc;y}iK=_us!kx_;af1jh?wa*g@;GUfyG(wvXr zYRE9%t45p>!lnSPE-!>Mqd>a_{=`9pMSzAI^T+%J^I;%+89p^0*C7g1?=hnzjq~6^>5U>lFEqi zcc^2{HD!f%Z_oN@H7Z@jv@sIeokN47qr2Pq{5xcr1RwYg^IELrAQ{Gju0LJ>Z{In0 zd8>;#ln$n5h1qcK(z(`45E0`G?R${ut^bU=v=r5sxeFT_pUJhl@-LM`PagiM$pfy_HS4`wD-hC`|2P3 z!sA{+^LAG^e2MI;f9ksRv%tFoL5W4M5s5m%lgW-`d&;%>?bG`XY^{I&HUssqI{L~2 zLP($iOn=}k;g^q&^!?;)Et3Khv|JynzjWO?a>u%LR5veRuu*>71r|M57r66_Ze{u6 z!qZQa8IpYH>8H^!_q@&w~|AF&S<=lBbwQC#YD5H%XuQ?aabJIM9 zgOv|LpfVkbxT%nxXIy5;Em>)3Ux7YD)I_JZGYxk_4F#+wQK@5PixEk zN^B)GD57<|k&}hx@fc`E&{&Z2h!Wx~CZtkfIN*PzWC2}{$ER=FUGXJ$W|(^$YmCs| z6+#mB>Dd>sPMdoleO^70&OA2FRchC+nz!a=>NqfBd+{P5w)#Qs)l7EB?#F*zNafSD zh=m_T9eqv%>v?=~A}$#=`etfa7nnu?)MKDtsUFNqXzTlVGWl;exvksrL$S>paZ|1y zJXi&5MhLZjJOS`KA1FnE9S=vt!?vG`lqS>iR!Cu{Sj{n-&ca5P-)M_vfgdbLK$04C@C~J9PatyJccj zFfJFk3<&c0+9s1T{!oI=2W;2Q$-3}0wQ-voo1z%nG5Xc>(Eu7X=Wo?BPRpiud)w9-R49UC2qv5c?LAkBBTixsh9bj| z^u@)D7Y(~rL`s3=V#s%1h4g&sJKw3l_5j0Yy%yl{)N$z9y}N=Xsyh|yNIszO5fTos z5K#oZvU_)rkxYVbHDr0SJacjVwNOyMy6*>*D5BsLhgZa13NTec1gmg5%S?QiJuCq! z;6rpYziBzY|D*L^-aatVw}xTYz%E|Pv4P$z$0x5XnVVk!`c0XI`3!1`d?3h_pILC0 z6*Ql$O^SSGaUpZ))1Nw&n4UuYmnoyEw1odz*+ktk-aGWEPan!GEM|CdQUi&Zt0(^s zJ_k^a|JiwVCb(mk9WF_P^ucS2fFRw$S~{`OqKTrQopxxeX0N$EX=m-N&pU}|*Tkrx zCLO*kcwog+C-a+&vfhVgm_|+Kzs7v`kE(?A zz`3J*R;^h@%0lK4-YmWI+)MgS_C*%%`ozWYiRC;k9tR#3o;sFT7kmB&_#dC)k9YNU zO*ojSRsGAkJl4%1d^Omx7`7&z1_p4j1}@xH7D19p&oCWb%-vN={p~dEsnr}{nr^wB zQ}`8{F+<&~9<3iBUu4+16=r!P*WXP*agLy&LUC{`v%)LfFaPcfE6mqn1k_f3h(Gz! z#@TSdRYcMJUWAt`(sKW~x8A=v*_{Z3V;a|{=N{ks{bSK^A&n#kGN67Zs6o}fUz3D~QuWV0 z`5v9~=!MeS&yYRQ=!;LD*>`+yIs%uN8euze2Tn<)2V>b}aqCr??jBGXE|1jz<3*GM zB8V^=f)VI5sd)W?@ZtBF{_!(1AB)Fh{Y4^Q516*%N6C0wKb&!Tlsgvav+ZoYn1+i5 z5BWj^yMFf8`mObUyt#gh>mNHN+6P*WGFTD>Y&H&86c48#HuchKYmG)K++lCdVjk^< zosGE}%xF7%;4SDNAjxL8HNOzi1HSs*xp*o#PsmItohsZ@{|9B)z#ZHBCkp!)#f9!D z`S)K{V<)F|Ra2@MIj`#Xg{M!(YQJpTmMHPs8i+(v7oWLee>NVow-YzeFvlEZgaVRh z>iEMZNMzO&!{{SiKpGnV5#&s|gfxEJja^-o z@#ldP-m<616YUR@?y-|oqv;#w&SW_jZtpXH^VKoM0D&fh5SJEBdG~GGx5ETS6}>57 z05EV=K0T$3pE)y5KPHk5tF~Mi{Uw(syFMEYe`@=%jz|r;jUaVJBCGIsyMAc!KVGFnjsp8C=^>))@h=a1j`qf5JfR+@r9~4>XK5#lcu`>&X9k}xcLneGITmSK6WP!%A;MMV=p>I`LG}tfI!+BwPi@H+qp_Qh?iodjSp>-d(ERuxCC5X%j=UI7Qf|xC zbQlz`3}2y%7F+RPTZZ8)M{8Uu70gEad%Dv*ZL0WI9D9Y-J;CjzT=tJx*?56W6t|Ay@TWrNkEHE#K%TP zhK^3JgA*r7s_ysOr$3%Z2K&Prrf46TczgZF!Dw*A4%wknfn;SO6zjjt=JBUJf)7Zb z{&@Y1Z)Z}fu10*`m1-|Ciin&_#1rnnQqv=Nzy9wYU5kmrnQ{UP7H&+Y=ST|uc%k3E zg-w}PeZF9I`J$s7kKzwMxLa-8I#>p`08;GVawPk&;G!cmCMf!4-=ePDXAXe84yzv) z&0o<2ekC&3BPEJN!}!Qa#S=pp9*!N$E+nyFVIiM6cRwz`Fu6@*+jAwqeo_Ba3PfCv zj)cQ6d;oLvPgMI)G9#FQ)+BUJ3p8Cv^xCFU+Q=g(EXO4Cym zFhR{ZTJ`+wVg!0AI)82Z*75l}Sol|cH!5ST>38peFh;R>>|T^+zz@c#@@R_W^YtHD zmo>pMgcK9rMh6;bSjo)g&FIy03T#Kv4oJSFP_{$E>rQ=*7<21Tv%{eO4C-W+%2z{7|RR-E>!j0ipraHOiX4JQ?> z8gb9N5uP~<2?MVIj12*d&8VcGd)Xy@;kccmDRD~K0hw1sHPqJ^%00Nt6T!ZKBoNJ( zz^->x1%%nn10XX*`&E0wDPQHHO@%;FV-@s64tV%TI2=xIe0Y1q^99%io$Cd=lJpLp zeBdPD0o<+<=Py=6xpnJvz}0xe>~r1>RU4jA(34phkNMDt5LrR=H1nZ> zOVSv)Bre-|o8HXX4PpuOuT0dn}WL1B(7P%DT|5YrosXP}fHJ(Hm#Ck09VZ3+yPoozk>L}ArFhz_MtNw3ump1PisH#G zro7mf^O{#P?Pxe!>gn$FdZ*Wfp*d%A zN!b(g4}uuo;|Gm0n8xG~!)+p)t8ut~AP!X&Eyc%r=66?a{RV2p#Nd&=xAl$ok1cM8 zrpkWz4QpzHIUP;_*a0{#9v;o_xUKgaScROfxPyGRy--p z`04G(_stBBR{&Pi40JC;BoM-Y#=9PG&&Ju^XI^>m^~GYTI5V|&#`LL5SoM%|ZAJCx@i2eM?v4jb^-jr zUN44#QJbYPLpYjvG_B;(RjY?isn`i+0Eq3`2Y?R~(Ws6{^P3#{(0LUJy;uajb1nb} zGQ}7E{M^~qk!mqW$v{^V=c0#$S{k@BNqxQ-{#jR+hC4njF(nWIJ;f*II0TW+RTOw z4z&SY?l$K9>%xtwu54~)Z8@g;vh`?Q7wf#KF`fOhLshrSsyjX7#`UrTjnaoz?ibTj z(&2^l9_9pNSS`Jyn8*bX)b%1Fi?lbHo*!y+goNunC>nc>hm5M`#20Q7J)LV%!XAi)Rd zDHu&fld0^$*n5r!O`pf4E~o!K)1uhsU}$V?WVqa2$Y_8|){pPlG+R?}LEKA(ov6Ws znwkt^C-8VfgFfTvXpgBg+C)Eg|0AE?fAY&8_*c|!!{6e`FG8}OGX8x3fmV1coK%kj}*G_+;Y*3E(kt#(vP zRY5gDH)(L-qL-89mjm51N!dzyks4R}vz1iTLX{<}-kHp2N@I(vr?2{hQ(!Uzl_CZ~ zl0s-PlGhWqLVh9lSGM?cpFt2+KvkQlhdc~(tY$hPUPc-yEt1i(7tQrh?t0vl#*g-$ z|9kdJkl9+-Pa&~X9-0v44zXxB(`^B2yrTTJ%{N=BmfV^MSFox8?L!pZ& zq7~Em3>b@)D0Yh2zHBt)^+*7)LHs~L$0!y}v`L3J8B~G~i zb~xcwHl1dCDDD?!FE}DRNK1l^n$`y)COxKm<_l31eX{8kz*M{HHM)kl9Gwpc2*(#! zVm;LOFkl6MjvP&h>5*WtHKW0-qLm}LSUBOi!Cxu?fMqLG;nAvfR?%cT*qhFvt$KKV zX|nvteu#*Iay>(kWltDH(Cm36!U(<~{&RjTa&s9@u(d*us%(}xLyrWKv>8JpnMevo z%6IOEAU=^n59se7xO$VOdgOv1?X}p7Y!Y^M0(_QW^FmGs$?TYpum#La1@%f4Zja!W zhq_@zj9KY;9;FDtAgcT_Zq1a61C)D`GJ#GYw*;UPEr<~$P$f__DVm6zsc=k315bQe z#Ikud4j>LKPtui?#92i|!Q>20#zX#{XfLbI&=}&>!9oQE)V_So!^62?x?=Td=zA=^%$n6}{1S5!bQ5HSSZ?O?yV7B2j#DLr`Zj1`THc5vX)zDCZ2YTCvHVA8q; z3rO*RIn5Qzj*B~5x*3k5XXCpuM??Vcp`I9^z%k8X59$+bhS_4r59eYQtXSDk@qB2! z!HG=$&UiRNV@EU*386tA1xPD+fJPEoQ-N}$deKG|HNSM|#Vi`AGX3K$+cWJ8gDpZn zTc8zo&_r+n6;EQ&!+Lzt9hGGFpcRQ`cbwY0A(x7SpPNFCveVVcErXVZD1;Trn}Llo zqzm*Qm=185;;Tl~=wuoDz^0kq0DfvAe=N6TtBSQgi}sva{eN|jGIMaZ=CKKgj^9BiFmwdd{nNKE2CFEwZi)j zl^4R9!}Qaavj1{*C6kZN5YijWBubu;Df9Auy=gKWh)0rzR1(WYo`ihd0_^Wv2m5;y zEMP~Kv}NPD5cwh2ktKXj^MXjf4fLpV6VH@o&Om(*1%q$?)oOy=zn4k zem(Y@+E0#0gB__E&~9V1u_9JkLGFrm|Lu?hccpew#-z?8oN!uWZ8x_V`s|+BL6CA_&?x=(HEp86p9qhxd)^teM7fbs<-;#eEK ze6r=fGndn18NW%Zs0I^~vlQ8Bsy`6al7ZQdBHm^7;^#aYvz;t){0m{W1+>G4NbXV#7~^XLAe#PDlT@(WG`5Z9}l4sra{?BLwm>R90b_yxgVZlQigKl0V_Sg{Ze zDfX-LXy`yURvLq1T)Ulp6Yx%7LX@MSyQ#KzrRMk4FlSHv-kaWk_4{pG`|7jYByh{y zyS@fAmLpe9&C;PW8a4=h2UwhjPJw>uq}^@W#Et3!9E!}k>#TLy5Kh>v6^M5~fZf@u zDrw%l@l4ZOO{(9{oJ-@oIqGbP!ci{J%8k>%n4VO$dmo*hnH^hGzKUaan20j*Y}j{_ z=XaW+KxFBt6(HohuUbJ%F}kc(QB@6w3xv{3$4p*B!Vny*68Q5(@>DRq5(Vl*^9Dlb zcI#E~87nI2ucK77ttr?8EXcQL0+UZI`%8cZE3lC%8!Ncb;V&|;VYJXp(69 zj(mQ{ru8FH(*n(rU85Xga4gUgo|#O(`%z336=#?rfH>Q8ci zg#HBgU?+u$tbQ~l3u58eqHZxCjjcAtqFvcQk(@2d)saXyVnD5BDuPWhY@XS16&S_z zz8z9Y&u3mIB4t4xVO80F1!#E@aq=1K1}fmxg&KzWnnc$h5xhx2JED83Ai}3jq>-SU zt70!hW(=}oI&%p@VrT5|Rp7t}zp&FLfCdea@c~Hz%;e2`BGE+R1pI|HKnV6+G|+#; zK~3XP@(xyAhWx;rH5Ci>RuTWZE3W^*dZ$J<`)$9Ccq;(aoPf+JvLHO#b3-&`HDagt zoVA0JUuOJ4Gj#DGJK)Wvy_#}q3Jm%u<7>Rqoo7(92!3f!wcvG2jH&t1MfCNHmag*_ zM+(bT^wZ(PYd#u|EB>g)D1H_D&L!u6#{PnT8?vge$BeBe&ImZ|sj11~a^kf-;^wT< zvG24C$d^+M9#FM)6=>6oiClnC~5KZ+(a)I;}Pl<*dv0}Z3Bv?B7erX!uUJ@*4 zAbW}%*Kb-1*-I0C-&IjqK?oQd->Z~!x6L{}wIL(mkK1=zVbKCvm19Gsn;92^2Cm%I+WRe^4Z zMpMV`z3k{*33Sq|lDbqB$7cifhRMb8Vls_P8c#WYop=iSXxC?GK34d>j*fib_c+)= ze(-x9yEs(e#QutZ9NkOb1l`cE3g}90uUqhyP0in||=Sj2%c zlebJUE@9THi{Nm2H^+i%_g28QV8G+E4nw}Vuo1JO>(u#PPUwN&xcvxl57+?#eT5Xk zkJbb_S`|c5#DJz*wb!lObZVP{HjTOh(h71cKiD&t$R!E}NESp9CMzd~QHN5}Rl^7* zBz2_F?T;{-wGZk#7HPOY0&aY)qG+56fo>1032mD+-`XHe&k7)}&xJw!aagXh+O zUdAvjE70BZ>QjYuEUaq^II)~l7~C&v=5prZ*fkd!+H$upsjyZMO^L+%X6|DCMmBF4 zI*R5<*uahCR#`6hM`9wIM=_?Sq;i?iK*sMeIOCv=oTEpWxpgMh8-MfG%|P(s%A(d? zn0S!z!)tFRrKz6DnPtGn0(SwY6W^tHhSwRs1ILpnfQ6vAu|)O_PW|O?IXd{rZ!zNc z@NYMY$9Anb|M%P**e`ayzw3itXp%;-sWiQV=JIF?WD8u0V^;ebG*0JkUmaeGvz@_E zU9~+?3)gX9+>6p3i$0vyi2GqFI4kFQeAebSYCZRhqd{z7Kc`Y>%*>qHHipJ>K*b1P zMSy9EmS&=q1&cf+6j=%Zm?=QOd%-G9YeQvqdc2Nt&oIP5oHNQgvkbE3oMiU447!J z2_nO_v4Q)*Tp_^E2|pX#7|gXo@BL1N?w;9QX@zC(^?OW9)3e=G)z#q!l1C*|!$BAjIcT&A0 z!=!F|U3SJ7BKl=KvK)lvDk^PT;ko(Ea5jXH+7B)&Eu#x6q6+;@mf3j~CY@geaqJCm zVwpk#>@mn$XM(0>>Dh83BLm7x~(?vUmyRO_1}m(>XnjOLZ5Pi!NX47)g{f68E&?>Z~W`m6=3UHld zEV+N<-qpky;FQsyPGX(=TNktc#C!p}+vgFJ@)K3<067*@*9OvFvCa}hal%QpSMH?w z%aA;ic#&%*lC_LHi4&FbSDZh|Zqxx(GT!t$@3#Y0L_WIDbLEBXdj9$D^XO<{_y?4j zpdcSfxvi%C0X4ge0M^69>jq+LuVhR+@1*tg}O#@NIR&)ab`wQ&LVYBG`{!(e1} zzL3nP8!HvoydfRLDJTf282+y`u>o$JEdPh<|syt}jOMIhYc$ zT6DC4WN$#8P>r4OFq|d}02t9&xGz@+E^3CusQ~6kRDhxcxVF zn#<;%7*Ja;L~X(T{&J&OizHF(2wU--fHr;2YHl_#o&-|VuFQAz-sG+eBzOd~ej!fv@Hlu%}1Bu6Sf^_QVzaj$r`X5&UcZgM2q{ zaUenBC2f8ACeP%}_E6wp??DOU-^ix&#iKX>!HuuyXe*dV)$aJp<2O~a+3*m&4Arue z0v(H_D%Ua8WJnmx_r4D5iU}TY6_ds%zsNF! zK*4LlWV|;E{xzxGXdy>!G7*rj@@gi0z{XrGX@n_yVd~m+|J>Hb*z90xg-R3j7&FPF`ZAW;sI~s= zwha`0O{P+5Y<~xktF&ZoGHIf7N~qjm81pq9$eb8<6iipFXgpIJIB$9+%!9BAabiM) zgicEUI6%UX1CZuEd-09$xj6?YBjS|NJr|$&8T%~rnw}L0ZDcG`k~ zZlS^Y-xA-^&zQNA;RzG)%bmsL%NYVijwrR?UaMZ2Pjgbsq@EEFA&-sq15n?P6e=ib zR2XeQQ=k0X@u|}0#g#eGXT**jyXlAZ#?Zh&T{aI*2doI%XwEdV zW+a-t>G$4$)4d3=QEcSR=U@BU%k-e8q6G}hv51HX0Yz7|pnld>tv^d+D=eAuXlBD+ zq)+6&a5j@koQL&{t9$*K6DNMk{CAA+LF|8Rr_5P@-fmd%cQJqcxr2q~3y-I=;toIQ zUiZsaeG&5)Cdd=0?*Rq~@q(e}BMBTV^qEku0HEBitD;Utk%le2`zp)O*HI40 zD`#ICj7y^+r2%F+%sHeni5S8r*x}T)ywmAPZ!Z^LW;)OQw}Y;7$Lc>)Ve+M4QRT;{ zf7NvvtqoYeAL+TJ=TUU~6F61WCYXXSNu8G7ox^PVqyPK*K9aE&nXerFEW8bX+* zjweF)(qR()>qO*;3)=0S;1lSp(fX+(xg83|4;@JUXLDsGJ*}e%`HJOj47*$^k&qT? z+SEdJ?2138YRRa54O!%HSG3yLd7GM}NNwuLRI@f-E`XIPR3pa7?gi0UEupgioXoT( z6+t)4YXB<)mV8hP>mfTjym{lcQgvudmfyB-n;9^(1MJ?Z??eXAucoim_I@F8sZ z+^_6fsiHcE4*)qSbDU%Lv+RzG4qjn}6Iqt+s}?i4#4E}o!#p^3-E~uj6-wlyMFPYx1bh{n3vD1c#PF zJR1YPZ8Dz8Hz)R0iFZc^8hHj%2^$3WrW&#tMTvwGAOV^Mo<543AWa0)5yh1Z6)G#7 zS$}ZF$fJ5))?qh_f&9oSmyV)!k0Qv$Krl`qM}f*vq_JPB&t$Fo0~^omGq=e=iVQb` z!uY^QUnQ9jXLxZ+Ks{e#^1pyw1|; zNkd4?|LGO+VOyeuwhH5z#NKcQn*LziFCjfJ84INso_LOV8fEmXCCHQmuUKD`_G>6;<%2H;)x{D zQ{+XwMgGUbeZzOWoy)pg4SqvHJ3hIG^+8+CCp*~&T#P*23n3ryBVuA9ks!$EY9^zP zj@f8_Y+pjb1PW+lRs_O>iU06Rw)jvnnNO{Zk7qQ{RAP$ZIY)Dnr3;au&L-ZOiW)%~ z~^3QPpA;IMHZw3!sF6XiIFniXw2u z@XW|W^E*^b#)kf_ud1r7PN7_!_=f~1L|U3ZQr;T7FFv}MyZ^}7-d@@9ipkg@3Kpak zVm1{J*KAJDY5d#)J9*XdtBxz-n`X;ffl&isY6Mznd>Qm>0GoXYJ^Hm|e5?-WiV$+* ztZIg$?@(wUU8oVTGnFp9_y?~GTOlJCiJ)p7E16*l^et0~FwBl&wAv@C$t1a)6i*hD zqq;b<1(><`K?x+ueW13-j^y4z^&LE?SS;kJ*R<}5A+#(^3h+Ep(J1%VW6@i0IesA5 z8zlPk$`k+0eT;c`&zD{O=}QNBUavJFb8W-clN4`myXMys7vD_;kgcn?y0n*nRbkLO z6oS#&B0It|<_ZjHTI#;3O1VixwmfNaFM-p$4q@~gKX&8!Q9EQt3_~U&LqcF<^(~29 zvcPCItUp=gNKRLY!M{Yy0By>#P}oSDU<5{^7{UqxLRp;6M65(K5{d>DQW2z}QgfKNHKSL9vPm?LR~*d2v<7n)>aJpbmsbxyk4uuO{%Sm@_rsS%jC zNngZigoCjH5P{(N+y2KinWO-4Q6nM9ot?d&NGQ$&8S0#`u-|e^z z2uTAy3l-ETOWZLvh4<0Dibzp;V6IP7WTaF;?tbe_o1Q})#rH?ZeEz=Q=XRI{$=5K{}A%r*+PA<;J<`5M}Of(w$*O? zuWtRl=-%3A@B9CTy-4bvxUcd*hrPJa^AIH7u^0USx?exw_q)P$=(aD2E_21b>i`!= zWDVY*vrb+-bUj^(0t#bpPDMmJgz`}nCg8@60c^kMkOL1`#0)u>1M2>7L_-4kFSxou z$jo3_$j@H*)Kj3ztsFi>$ooGyunzM68G-*9L8@r(+TBE-Hn81@N!Wj2f4_+0P$%Al z?r;ei$wK|EEGa1>4SRj(?dg|z6r2-N-~orr;bg4*&8NZ2H`ik26McmI&#(DP{*U7; zp&bl<0k~Jw4&SJYPv4;@>6qHidLjz|sd>;djG?T+^S7~j2tfnj^ZYGieNkN@Pe6g6 zVyw6Hw(cpWGvPUEAl>Ypy!P#r8!jG9C*Yz+c9l8qBU@+SSbljgd{D7!vV^bU8HxI_ znXF1Bpr%^dk;Pgz4+r8BlR7JsOyw_p#U=Yj>Xq~qz}Fmq8&4|Q z#1Ti4&xXSjT)93%$Qz#iD|#0vI8`J+FWw&A?ufBp7u8O~u;&XlQz(LS8~^BZ3TH_IP?sP*yZmR>9)%Zp`V zd0`S3pM&LA;LUhrbs7$q(-N>ebD2AfKmr5){~GcY=#CRlx2_eYA*17DW}uh5TMXKA z*#L&AA7ljNvWK+{$s{xqInG$aw&Km#XpZ`w?^Eeeu{NJBl^QYvcOZpAXi+TOT(=Jk zDCXb#ka`vUvAgIu>^ub0!NYd_XHPx-N6hlGuLEf*L;C(Qsd%hEpAHp}9p>>hIR0P$ z+k@BLbH&KOKm*Yrgnv-v)%w7@r{ka4ILcA%#PUZH^Y5m1vwv{-@H0Emj>eL*y=s4B z;QV73UH!!OCnlXZuCt%vJ8$vF^rhH|FaiI;t;Abx|ADOlaYL*r`C;x>3gm2-%Zuj$ zr;?30!>mDwY|pQ=`64h)fa}2x;>D-ioo4>xbDrJHIDu$~I@%!Jl>;= zfC_;hRjE*jK#~j|B$eE$gCTi$C0D zLE!gAGgT-_m#HGZ@s+dTzOscoA{pj0W2$)QGoQJg7mJ$5(xMeb{c0dlvxwjU((s*%?grK7N&EIU%)hijo9*@5pu zSRB>M*wNkhocFzaj{AvSp9A7hC#f`4$d(Y~$7imK$*)+u_8OKNjuR1a$3t(;n0wIAc0(!q7 zBdSh-Y8gg0&G;o>R)Z|JZ?2Ti*aOtkfj{E;tHPFq25h#l^+JBvRB1TdSKQI;Y^%CSh?roWGvH*aN|<6D9{YBhB?n1q;ti>z@Rpq>CV2M^Oi0o@gDrM72;#ze2}Si6Y#d*>u6xtB3Hp zA{dWR0EGf@QOj>!-j9;Sh841q)l${Nj(RZX)Aibb4L)<4O(45q2*^93%Ea0&@Ju^L5xL%(lR^I-OvNCUhbi~+q^;{HaBFx@!|N|?#7V_<-w{Q=6HG!f z63ow<9Hn$JfQ_(PB<^sGz^DD`E?;yk0^Jio9 zQ}-H1+&1;^`EZkGG@RZ%|C)2@zb5C>%!$8q)+l^!VkP@qL#IfDBt$E2k&^4aba3$e z1>%QFh|ab~fVJPjQq56s{xSAsh70Ck)QUoL54r+abj+eoQVY+3?zGuA&T*E7RI#{$ zqXn%|pBWr^)mdW&zy~3FNkIPn#sBn&u+*=ajX$BZ-u@1jD!wwokNq{@(f?2Qj>ukA zT(cKByn#OMud@xE%p3S-U;I4Yz?ZEjP;+<#J$PQS-*oW?(!b`d`QN}>L*_Yp`gtaC zC6BVEJ-7c3&NF}8V?WicB497;qp-`pr#_O-xvO57}6Gb#AJ1&t@B;F_$hVTE%jvXu0^Ua$rl%+Dl z?8~V_KxyWCOP8FryBP%R5OxGaSEN`BsJkLT=Y{=>z6MD#1B@Jw1~{Plz;*_gA$~wm z5I^rq!z8Rtgmnp|VphFx>C3I(Z$0_MpP_P`riICo?fYKVpGWweiG!gUY`P%l6JxR2 z(c$VbmbQ#cu6fH(a^=lqAHDuNAftwrE=89YFHEM=X_g6r(p(o%287}X(e4HB-aH^h zqv!||Kqf9(VGwJ9KMZa%I_8KS-iw>VC9p>kej5Yw*9+-8bAFrWA-B0^BysQ3EHL532tokaSO}mwsDFBV-q0I`aL@{*YkixR`bH&b+C)KLtyv#D zYwOmTS6mvfhU(WDwfd-u+mnx-IrLbK`2_!U1+_1$>M@t4iaP0uTNgQi31qyah@acb}p z2!$Y02=cjYHEZU^8)x+FhO7diqCvPZdn@(s-}B=I4B;aZDww~ip0j(dCw5=X?pmVW z7>9@3v=r?iy<2BPR&1O9#*3+u*V>cj%rYi!4LeTPR5{aEprVb@N}C>!xR?mrp7A7EsPdZ-Tz?GA8Q{Xf|`r-mzrpstuQA zIKfGSoNPkxxEx^$fC4OkCNbq^IEXrXW(QIoBv|9D9Y2nQXOdTI$0o6Hc-fmSkJG)0 zHN3SQ)zeM^jEwq}%oH7JKCA|pcQ2n!z5n*~P)1m5??ZWW%Uf8m&?V!k#NyV4odw`T z=2Jb-Qcz-JYS6)RF$WuE(NcMz&|?Ug9ng~F!OS)!>?ODCYg zAK^7Pzp2^RC_Htc`;94LZ_4|jpY!dpKAG1XPv5|-?*x4TJUh1b2DDvRG<2O zs01)dW>J-+`njGutGS5iaJ%6IP%Tx+aFW;XSy#3UP z=OY81#PiFaJ-|%8P@37Zsha8Q$L0hIZp91aoDV;5mf6cQi*Ltx^uiZ8zdc`_Jo9PC z0P7;>L@RyLWzM0m^EYijqEB{zvR=+K|NhjgTR&}mo4fA&-+wI?p+>=({Pot4U;FIw z7aAF-I^_8i@Qz`FF(V4WWq5zy(dpDB^!99hkt6d0@&SkO1q%_}fp|$O56Cxu-meOK z;?5I4<_pOAe2w^YZ6lkQVeNgS%)sW?F?Vl}qK0h9sa5>%24a zW+aqi;0}_0Lf^sjC5K$K^B{Q~oZw&3zZw7E&b3^7zbjGXU6TDPN~ZNvZSK`S+`YZG z+9-`x8YVzik(~kVg&vH_#9sqr*#Rn7s`QWaj;B-9TR)x(+rc=+w0`R%dhX+P4 zyp+1~%MXR&yr2aGpunJR!P`jmAWwzll*C9uxNMXrnjF3K^Uc^fNMZ_UEb!=6LSuvd z`3n?AHFAZaxqaIYM*7j8DF7=J4HtL-b5`JUVKI+B4x)T1Drl&o0)Tx0Zh-8PBXub7=$G(mx!t)>#F9l~a zO=={ZSpKCBVigA4d2|LAf92g$2n1l9yf2}%^w)9cd7A06r*e59=KI%jp2@6{s1Y7W z3-bOFC(q;U#w%zFhEGpN)%fUvUTP@=8WhCkIi`0jzwP>;P)mv4T!02AEg*+M%b3-R zo3@rY87#s8`huJk?s$qCq^#FG_0)5R&TX`we6J`j7VV&cSdNqN<(m}RP=`S+K>fe> zUNjdqAJ`F;0@4u9rGguFyxK}G9C?7EAI)q^YU!CH!_I9%Ku%9?#P)a`eZL3Re!)28kD2$LXU z=bdTV)t@9K?uOTVtCqOnc&W=v@4{vFF5m!1V5TY*!h6n6@5~>v@$JtW^RPCkOHg(y zPGzs20Bw*ML=u>%#zv1G%*XdnW~0f_Bu(W5x^B*#BgtdEH}A_OQ)m@Kt0RUMB${ZX zuE&QL^Z+_%k%5<$G>eRM)RKg>le4ES9^B6R{%mv}WdwF3eQ*ScpkAmwDH5k;Q1s*cn0w&?y80iADAo3DZhZaYZ2-myzw{WHR_% zAb$BEjN0HUW56&$XJoapWkUr3SuEN{`+BD}trlqg<~w+0K7G3ZKCg0ZjHWBSz*#f0 zQHF_=razis!q7b%fah_Ld!*;$p0~j^akk#hfO}p{`&GBtq0kQ0y3rYb8IsZfY{+Cn zIZqVGrJQ*zV}-km)kXYh7hGb9LwQ@2Q67z#!z$FOP3A|y*wgJ)NAgr(o5B6x83v%_>UHE!Yy#I@q zt=N-5fVyTpz5)B;r4I-^p5lJp~8rnjONe98yp461_RUVhnZrjROF<$%++FH z0Hg>SL{W)Xa=i=pXizJk-Bh(Tms5Hb1Tb5fN02)_M(V~z^*Qb zIxtpQaXJ-Z4IY?quylBX4W*_H*QvEebpvj|`IRv&lc5hWc z;kL-AkJHTl*HhQDhFSyE4PZA?taM`nNNv^ff}+$n9QeN)#mIFM6U2g1hVKvto4F9e zZ79xS9$Cfw1M*B_ZfKo%i~)!rNzJbI1vK4K^`MzRNIV1#$}1K*&II@=c!#m{azm(~ zQQ`^e)-eDTweJ7!82DUK!a{cPT6KP|TEen~(X&Kx(Kij&4NX_)@D^4*Z?g0zitxWL z!!i04=40~<&Bge5#G#3Hf|f*AI&4-LW>U};@zAIv!yt!WKJ_>r{mRpo3DvR~U?k%% zfZ89FsZg$&wRa3`H#q7rg00W~&gq5%X8kHTOA?|Ya~1XO8yPWyz%co$Y@+whLhqgr zA0oO!YJG$=@qNyBdaJsm%USupD0l)eR`6QbX08S1SymPwccMS4d$PwOL@>pXgj8c89G@UX4!s*;Rs?t&y@%-#;yf%AHLOBee zT;0me-(}ROFJ;5WCSwq@0BT(iD~ZxTda{f*;x*#=?EZgba#G>*Srtq{Xp1Fp0*6qo z44SD->kIW1Alrx-pg>3vfGS~ZF?ny0Ss+RTf`Da+?5ihZKe$U2SEB$-YkmI}+3@NJ zMNOwCaf^I2jEL>fk`;LcRRG8kk^l*jxsiHjM@}!Wh;jj?VnXF_XubMAMotsTdz_5B zp;0Xf=4?^S7K-J^pW2S7grn05p5SBfHqRmUF~-q#WV#kOM$X^YyLGjrt@CaD?rLo3 zHyP{EQqHrZ$V}SQCTiEePEd4IArIrlu#n4Tvoiz3 z8Hutf8gx6(wGF_YYqCia!J%E55N}7pucTretTKD+Qn^(4+-D6^j^Uin(R^>P+uaEqn3Y zQJUT~f4n|`VZnMtLA-Dm^9VKOtj8{C^eh{shakkB{C2*(^TH4@P_ash6F~mQ;#~6( zkPnKKGj!O=F$s=aO3WBf+m1)bxscgma_-11;~F-dYq;mHzb9OP?6Jf;CKn(luXBQ( z7od_mSL*zQ{FIZP!WGs&NCK361FSYThlP75AC23l$w#bt;2>P*d_y0tWhW)xZj2_3 zd_+NEIjVJuBg-?9a2P;nW5WS0pz(1lT&DW>yyJ%kV*wx(e9oXCL6g6fTWm&nHLga% z6-Tq8QDM@m=#Xi%{(kV?Kfc6QaBzreV6;k>CZbAJj%rxUoD92NnBujbfFMPu&a$9@kIhfaPLjGwA%)ucRY%PNvjD)e;3@|+L22t~ zTnMJLBp|xEK#~fRT3kZ^Ubu6G=5zq$W1m8n$JxN}Z+hb`c~l8IaGPL$MEx>v$}}e@ zwNy}uk8Ul2uoC>~ssx*ZqntA-MNR=OO%G1aPRx^AVg(?!5@kfRl*J zxM4)csh+_TKV!bayuIfW_{W-sLd4S-ux_!egdIqW0#QC#hmI`?y0DHkcPIAUy@pte zxCF5{iH5^o;Ucz>%laSDc}C=r9Nx(RuV6Ip6A-m&=m}EXP1_>yZK=2|Mo=^c&myQ>8;(``igpG@ciyTbhi{8c zQ7Ic3e>8_^J2O;_$l}=pdnwB3do(u;+|{VSPnRqe8DRjt@Q9*>q9{@a#Y!kWa*i6D z*i;?aT$vqE0~Zc}5FNNF#OqWa^dk){W&&K)w)GKE-D6c_r-Cs%)hsOo(-Re#pqs%nC8kEN z>aAQ%v@t#g8D`*%h9Z0b{USh@N%PfWG2V-^chEp!#|koRc0>oFE+DL7J}b&i8yH%H zWlQ7(wh{Xs*b={eX0{P#n#|-p?aESHDu<wd0PC_VsL+CFNNb0u0q5SX7Q(feKbf z0^4F(SZ9ae=+hZopZk6#YZ?*{@>Y~s1Y${b`W1b^n+(#5PE0UPFgVA=J^H!t`znpR zj($YX_WjWxA3eiM;K=7U-JmF;iQ`70Z0&x>oNSjZCKw8|wp>jUYZo8tEnAquu<(vi z@4Nx9Ij$K@)Qh8O+ZTBIyng}eQErXE@U@jj*tn`9;>cX~%W*-V`dowhs5!(qRo~ znKUzMhGVJv!1iX5VlIxSSylrcj;#lS-#fLh*BfIPO-L81s>R$8BwRz6s{o=B!&b6M?q?lmeIzEzyOVg zyFj=xpHXaGw1F5(EE$s}mQ14@v9gGVgMhrSvQnU`5t@#O`ZPeTqWf!7uxicj<@vP+ z%oKjq>{!w_V4nQLOP)_@kUg9Q4s+wpHPn>BDiEnAOcQ{q@HC*0)Y#z0B4PQBni_Cm zI_89gvJ|5b4ODjQs8Ibe^a-GXzn5iXV=l?dX(dMtfNmqAR;$;fa4FnvL^#TX>M0`* zN%nyIp-DOl!G;mqRhtNJ57UXs@!S$ezjzK!N5jAZcG60CWpHeoCboj-GdjUU-wJ<$ z-62Pn>Cjl(W(_!nP}L!h5BEn)ike0wLe-F+08Y+MkxdR<76_Emh1AvpMH@(#qfv*b zc1{nNk;jVhAW*3gsd=Ft;MtwNvxw+yNj|SHG5WP5QEPh)%Qx3|9s%VBCi_Jr)kR(q zwAu|kzu`c#c+N~;E!@`^W|a&=($GGDNtT$8w(bXan@y-Ho=4leeh|Dw?!RH&pE%X} za)Ynf5}lB|=kbuW;lw3QURBqAxqYBhx%okcrF3KK(~;sD@q_{h;!xf zUfB*KNUI_p;BV1~Kl}~<;%oQr6FqYjodXUjaymg<$;{MkNk_a2XM@ZGtc*a3wCgii z+Cdmxx~b)8YO(dNYZm0Smou=J@jfMaz5%Q*QB^V$dpGqjT2hCr)v$A$zj0-x&je6g zN{KOG@r)$K%GP~*Z@f6t?2qtTJowxX9zlKwU0=joAetJ_C-3v3Tm)!Wwi#J^)xjoV z_u+$aWb=YN`MY`WRZEd(R%f`POhSoW_Sq{>B_m{UwLM#`DNhGu367%r19MK^Ct(`T zXMTQrtjqb#k@#ZAGd-o7UGj_#QS=KT5K5iOGH2x2$+53+uI5b=&@1WPIc z9p-v8&JsK0Ksh}q*CYDM?1tgrVws2TdvbA^q93@hkv1HzVUqnG2~>x$o#5@49J6e*?)y49+hVw(gR(8_z`6pdq{{N|$v% zj6jByw~x8Ue9O6$I%Ob*{lZHAnPY2KeOCm!d#xhs zdIO2N5?w_CdlH8|p!R6%wu@*X{K86|?pbYJ%YFmc{u4dN{ZVvKEu3A@U55q3gKF<6 zX;+OpqBsi0Ti}3&;Yb^Xkql%frt2Q*{zm+Yb(g8D^@)?d8l!7*no6O6lzId!@e!WN z+oMy{Guvi1PLI?Y$ytiJRlh8se5kt{NTV??{H(FT!}~q$7f&tn8b!e z1m7416mDCOy>eH~)MP}aFkFCG-5xLGikc-f@^U`PEav9M@)aZ_;ro}j43$U292=n7 zLwEl4>vtYEP<|mR;b^hkG;+Evi9lMlLzccsQ+wj2Y%Q6ORwDSxMBchF8bksb*LTKc z8oqlP_QSc5v~_j=NLfVOAWSFWtiL>{$E@gig(Epv6+>$B~!X6ir8CH$y?P zBh4L!ojemC9*XaH^wAyp<>frfEd@b2PP`DLWD)lYN|s6?vX*F`e|}R-_eE11(OMCD z-35BSV8Y3gV7)_=vm{>n%%Y9OA_~L?VtTf>uI2v%v5xIMw}Od}_$X~5g@_Rl41Xg0 z*PSUuk;*tRiVSD^{aN*u08TN8s%41Olk*UCXI+bF%)Oj{BzgAE&W-t>;6AU_%T5-p zt&^Qo=r>g&0Th;mB!ynMEMHLMzrW!ciu&x>;_SwJa`&_yHo}ju~nj8LJRtovc7Kn--SJl1K5@G5=I8URLcs5_wjl(OcFfb{Q4ih-*ZK0T%q<1J< zz}Pf4oRmpK600!zHr+6ck^a7XfI{G&ctfg~EERfD_Dhy2%DR*=CvI+iW`f`iQ1;!o ze)O3;ieXsh$S1)F)?2^nYWT}^MHQo%YS9iC?|9~;x87|-4Kd0DJtc|HeU)OD<)BQG zZKZpk-NuN95U?mUV}%Hw#!9MEsz;;I*v5sw-9*CPRi(pOBIke-15`cR8jZDLT(V?C8fc_v#X$sc)Q;XU!5 z8SKuhFAwc!qAuGHM^iX*fRiG``xX90Udc92-rjmuuxfJg%bh2~~^8egtSO9aeHn35p&zsteKT>Vuz> z#H58-Ffm%tHysena@pimTcYF`FemKsBxt@I4n>Jp2u=NW-+i|KISSgS;eaWr$;o8Q zh?oHMbv}n+_J@p+86U9&3|9-6XQDNHk|?A?&>(QScp)fp86#nHfe-=^w#o&Qbz2Ak zf=Gb+1`ZKo&iEiG7~+?Mb4fA`X|Q*&Ps^l%xsL4#Vo zm7EVjoSX-VUBn89k|;Z4xdDJ*cRmL7M~J$Jy3FN6=_m)ZmtZ8w18FNJXh<%gj|ZQE zMM1O^k;P>%2Y;_`<(;;^W5@#{BEm&V}apE&fR z=|U$yzScpezxVAUuUSq(zZ#&hI9+~yoyYe4=CyA|lL&U}yiNq0qG#iyG&8(4T0CtM zeT}KzI_FfTHg(q;Q`;G9FGq1V8SA!}3PZ$?a(j!^^cNRJ29kon1GSYtjtvsn~syPYvQ{|JnI`Dq;sniCH`K z>iffRVTs!tOx-`W04@~+;S@oanAT60;RJW*08bHQXgk5kgEc-d05wWVe0l5@DH5p) zS*b|IDqgs$JGtrlf5H;<>&ISDrn_?JUEW`3l)A*2?9g4|Cns3sRhM;F*qrj*u4*Zi zt+_#|(=US4Mk)9c-Ol5hDRJK53;`v5yg}*X`;N;tQV1fYdKRu9g2J?PUj$1;g=RJt zTRy&Te4P*KPvI%5olYGT^5#qAQCN0S>$XR0P<$l!M_dWdIHukWiau0Xs{i+vU zMUKYube3=%=J&HNIKOCIclW{R^74JP?`SV!LjqgKzck)F_FJQ z&t%s9V^J{YxizPsbsT#-)ySlVek--%1+*eI(=(g?UqXq}z~b!T#xVDLdtQ#&KLc;k zi`bkDVc_US1bqDxMC@3@<7lBmIL}>Sm%NkY7HluzZj)x4Sg5XYHNj4Yooh% zjE#}02JsvzA50Pd1G!fI5XNp3G9-_`;M!@kdi$G5_kfYj#I5$JRB}!RoJ1b5^>n%E z*uL7Ps+WB2)|9~c!-JTK&oktwiKEe{A7g(5BZ>|MRJtBOtkp9nbQX2onex#mo;>v% zPd;(0CjuOc4)4r~xkwr`Ep!t(`xp%+5y z4yTYZpYbBZ5=XcX-^mhqhY-izteqSpX$u=C#gARC5o}>tT;zAh)AFv<4%p$WPOTBv z4gCZy7PtTY_+T-ewuv!A!c3AG0!=1@C!}JS@E>Q!Mi#c5uj{C{u&-aDju(fUW9MAB zdkf&QZ3e|#oU9L1EU0K<5rdspvH_mQ8Yasa@mP9!+Z(p#L1Yeb!hae7ImAlMD&&p+ z!HH3WkE=nrJwOa3`Nw$gP-fS|C4>4xEqiq7)eL28(O3?}$_VT^Sqem1SP?xW;9XZI z>lGUq0Opsje(=+GRx>Fp%}^F9$IvH$co#3D_ZMv~JrV}@T%%Auf|4!6?9qoAw zX4g^J9sP50jHwMMBrG)7?BW3AZ@4BxI)j z?E~}r#_##cr)$4GsdU3PyuX#nZ>$avOqA;7db#wSyJre{Y$PAL;SWTqTyC}Q07zlL zBJum5lGKW67&`FtlpPS3>d3XoL)xi$I25vuYRqVEv^GzNyYx=?jKM@0fz$#Q z=2=pLb>;~_v~78TP=8LH=Q39k+Ee7uGI=Jo%XpBz3TYkcf7Evm#?fH`fD_cnA?VFO z(#unlvhSULo#lZO3;ag~$@`V#BhlEbKfMTabsN#0y}wo7pZ&ng7psHBBtSNY1LvQj zF2CXPM6Dm()Zc3^`|1rzs`Wn?(7y5l-V?=Eqvhr-%0q#&69{PdHJvOCOhLaeaw4~-P~_MG zV*Tg>LO_j2(K9vu512Oe@SxtCyUpPXcs1$cap%vcUG$46JEe_6t}7Ug9E6wF=sJM< z&#M}*Ma{6Wfm%e7iDui97|vHXS8{cI1q`Vo89m|OSMwb}XUWPv(Cvw35o!7-Wn`3y+_ z;P#!MY%m#TWnD2)N+^D(7i#?W+9r5Mg=Yr z0C23VYbqj;XfuSdmj&Jyq1px#I*_s8EJH9@uD)bLe_nIqU-?V8xAxphq1m9LKZ$bl zdQ!ur--nZL*Z~F z6|;@AINf1J(e+nmy$Vf z(b3BT!EiN%h&BB=C4vt!`pdaUI&20tbm5czl}kiQ$(fyb@S_SkBWwvLqnQ|`BKgY4 z;Y!-oZRZU1H-?(o!MQ7J6D+J~9iTyPXbz4SW`dzNZcipt$;{wJCGwkF%f(_21=fZt z!`{M1LEEod35fGH=`>_inzm9#QVM4xXH^3TEkoUiay+RE8pw!)(W$EnjWQcExwjx- z$B3F{-}(PE8{e3MO-7S?Z7G&US`3!mbUc+S4o!aQ;sAO8unkg7!mfsD7Zz5L>f=Iz za5Se#wo|PkBH00z#`6j)l(3OPA24wLl8Jb1Q*#h7UT6`ZsONr8JRIz@LCC$O8D<_QB~1%y7C0wEAv+0VRje#|?^2%U3Kh)?hFP{z;JLa6&I{7ys(@siL-iI) zZdobEWRi*S7?v#7EYUOciEo|w2j&R(7H}+n8om}pt@H2}lcy0oi92T%K-7J)Z9ik3 zu9I+xGu}m9maJfZ^^j-VSt#CTVad2TAWu_~1ISzBymL9g(2`0;Z)uR1obzy2_Z9K? zYk&rio^x3l*|cMyZZwC-Mh5#rS&kyvkGLfSz}$+&NpE#*iAdZ+r|MCVT~}U1_EDrpg4Zt5^b9Fa||Mc;4 zk)}T$!dd|@=jeM_?yWztLgnm^`CKNKVHp!W3`pwXAxoT*0spK7;D{K{1>(5tJRGDw zR_UYX@qx#7q)mYT$^lw97DqBl6XLln{;U4OF9eU!w z)$`MypF@jxG;~`mF!|&G1xY|_T)USS9DjtA7P~^=3l20l2}5}y%`Rzl4s(xntXpSe zz>!{e-MCW_K&&$N(_GPj<7&VW@E_!K_k%h&C!l7`xhJpHmzeChTXL8u&e)lVQXe0N zednA$>Ik&JH)t#hN*HIpNwzgC{-B`7b!ljLaD)|l!?0e1vSA%;z5gl7lFd*uOj(V? zi@gIZJGyw$SpQV5WD4j#fg}ZZ2Gprqp^~eDFgvDYGg_nY zX#?y`Rt<)D9z3sTnWDh}%LKJ(>zf%W4r|~dYV~p>tdMq=bgVMY{QU89Tz}>d@%d-* z3ifRwp~i-D#-XE!j!MC^t1Mqe0m8*)L3{&<>peO zudlhXI=m<_YT>Q2yl`(S*m@K75v27Xjp5Z--n@C1*qfG}+j#8Q=Coxw9XqT148Ww( z4y0$Akq`+1WD^r1DK-RDf8Ao9`vPAt0lWe|ql&1qOpPSc@%>tV-^O`poy+ZF-r4gf zJwE}fvD4p8G?y!QkRAw_BN|@cw=Y>;&yKKnmn?N84pvNC7CYC(waMj)Qgof~ZnI;( z(a`ZXJP|%w=aP##o;?hhuhJ zg@~hMT*fB3;rt`V#~SBPpM`uGt0>V}sZ>2@LJ|bF)y(bD6h77;G$?clMAPL|+)SgX zjHurC>HR3Y5$w5WY^B*$;Eafc(%dV4_ov6>Kq$aYABj{em{vM@$N7W# zvgueR1k_wmBoOf~-Vlx&#(@o50+bKQWDxwo5m^QAyu`$#vFO!1_NIaiU!Q(`Zkm;v zQEGp^kuQd9Mp%N;5I7XuiX^@bnyB7#Hl-W5Z@V;oFwtj(RdjCJs6?iF4xRX0{;k}* zs3q$5E{*KVg74xw66cCYTN`>iwOfkkR#^EO6H<&lxP7D}s64tK z{JU-2&E)$z>(@K|r0+w{C}3AwvrrxHppfhS`ktxd`y062kQ)FU?D`hYu+X2Ul7Klm z>w<^&!4;PcmJ+T*I|#keF*Q}1jpo3w4VwaDil`z@O*Qfy5{iLzu1{8i!9ykV>k{h$ z1rM4Xo>0*4T8AI1-xrI7v@G@yoEQNfazKqLkt)#>OWj2FMC!HWCWkfoQ>? z<1i~27EL*@PBcjqnP`oQqjUt8CKUuKfRsd&J^Vv=f$x2FF+ieD6k{=@!aIn%!Q|vj z244ePng;J86yMIVD^tIH6}XeZbq`zU!z-?i4CeY|V?G)u zwl{h^ftAakXi@GZSE0sa15{Qh5zeIHf(*+T=1N`-zKy3$EjE00g_Ju9uW4<~ zEj4VKy>ggkELh|e7s%y@(flb&8GI{Vm!qQLj5r#wZJF#)lBf`312JRALumA*VTq$L zAz6PTb$`uTzVAS<8kE)yF*htnvM)wJ21*29vHV!%$o$RLYDdAN>w$VtA zW@Avyky>0X6pQgf9Lv{Q&B<02yDe8oO&6*_b#V8PvMcmjD`>Xnv%!!a6%_cj#Hqv+ zUL%dsXmm->+iHF9-nx8jM2z*>DGP{lxFHS&=wX`^EwT=1C2^cmp+F=V*Q5X@5vbcK zhS`jUeK7zjq}e3LMGBI|1{49LL!6MHOM|&=A|2}kgA;0uSr(8^j2*GV+4;F_ zFj2FJ#PWe6%T}e}$aW)y?a`{GgNV4ng5}C7K#4Gra1Dww7}OF4yUx%D8i>yYNDz`{ z1aui8w_v2Fr_+K_4uwZeCBL#<5YMR#p?o-1Ej1L|mg5LN7bT-Kt=S^CTsh|m23C~- z^~dr-g@U&o+BCjp!`53BK551yz)}!H2r4`1Cls3v$U1EXov?ERZ@4X2p4jHx^gh8HayHYULT){$;b?*0MF0Q= z;PCWs-FgAbEcf*-GwcOhxAqf|T9Bzww;+EGyhJfpEcROn+j85eS(#ph%L%Za4NS20 z#M2+;rKZ(iEXGhWhz?Bd7UqN+ljuY|9zVQu=P*r|WJ)g4^zhD|hw)m1mSU=G3Z&fJ zUYeU54}&?DszH9SIf+7rm-@rwb8}007iNqpV=$hyne0G%WM+B;bV4KrXgM4o!+D{DJ9bSNL5&1A1@4hRNTQ>$ zNc7x|%XPq_IXF1C(0CT4XfEG~;;PTw@+H|GjD%GzQeBUPd&A1-*}HN1Xd|BkUjRAj z7KkXGMX55sa8@i9j|*Dd9iwh}aaC03>*lcS5H$v=bnLXD;aqou0`Ks4mv!Qfylj$q-;d0@mwL^yKq%Ti~01Z3HnYJHe0*W);h=KbWA_2BRYp0w4i_h9S zjuexOP#VIBFIKAdoMztZ%Nx&)Mq*J~3I)zUrr3MFyjG@cF{7rIhxUP+`7gYvgnn>Q=UV%#2(zHi$qZR5TQ_YF zRbpy>E~oV#IMDd+r@r;srL7xw(0UUg4YV_G9M>F=MTQ>S{C;ZZw=Zw(-`}fdhSRKm z7JMTWzOWET0__YKP%7C(Lx!#v;8ZG6hCr@B7hcmkB7OjKgPMQ%C%%<1+zE-1;Ugvr zp4)SU*>ESSNVVq!2efr3xeSsL{(Ea23+F{gaXORX&0d7$J)D{1-X-Y4uo(`Wd-$Rw z;4NaUQZhJv$)&@8d!pxut*7_z+`lV4kK1>Cxbj4@dEw2o@W6s^9C_JgBSvj03rma+ z1Y*bo$Vi|w;+B0}T1U(P_8jIqz?%UTK{B6*S zH172P2ZL!ZH={9%HxyRO#sZDA5A=TV$hhKqbEFT$PqG`dIU28>b@}M`sjuGE zcka3UT5ck%L`LFUS5_Bo{HQA8dvjaZmMR7qgb>1AMFh`FP4jZoHlJNpr6i$VOoB#3l6lV^dVfDu!&wjWcQxPdUQ|Syg zBm#$fbI?5>-n*D50y`J(a$SW-o=?P!`O;-C-@HOZ{Pe4A|LTidW!dQup7#WGFBaLw zN1R3W*JmQ%r(a;J^Dl0JO~i)ZyzBj~4|Ud;yLRqwrNmEhzteLEsYC9n8zcjX6uLi# z?Nvo)#(B}1DQBL@6yi}Kbu!L$mD`JjK$AE#NA-ArbSB8VHr3;QhCuCHFZQeZe<`u= zT7C8Nt-$7oCm*LaQkxzhKX%o4Y6gh{=pCrP>Rfo~zPXKH zB=qyEzl6|t)?I$LuFTyy_%PtkV-GhkxUd-+sFOes{%2AXq3PqBix0N`q4kdsl2xZ> zhEUoJopu-XIq^gAA5kCPsg}Sqs*?)Zcab9kQ`pcyhyc=|v!*^s(6ero>u9Z!bF*{;W zy3?%%JGhrBk_>Y^gs=pnU~+$Cbar|XzDXDeB8qeG@O?i-&yjn#;0Thqjr*S`Dfowj z)Y!ddbELnD$cUFg7IL|}p%EoXOVSx+yOt*>0E3y9Zy^o|ZczfdLVu_!^W4FIWJk-< zxQ=#P#+c2w9{TrB)3d$AY)5YmVl8O!jZJP^*%f3bizM=n!i3P`^z3M)pK#5g>LrA_ zby+NuVjS=@VBA0GjeF;I-M@0AN|Hz`Ng|RgVJ-*%oWzyg|2p3XzLw)Sp}Nq&&!-<> zd!N*C%)+U@AaeqDNryw>Q{UxjzL|6H821mlQkFJpt z_?+;{lVsskLiF#SZauVCh`58)6YJ&SOk{}E^51*ni{d}B)8N~BpW6rH3O7Mgb`*bM zs6ppY7qDiVaCAypC={G&Sz{%UX#!-pGjYz}RF z$TU5QEOuKPc3lum(yrV(_d>QPlKZ}wy{D2eYXgNrpgizcEixrdJ@d@}tpv}%KUAxQ z&bfHs(Qu=VlAU3MVWmnY96-Otm>mtpEEP-p3RYVQ%yhG+Rh9G;{}dA?H5)J8{} z!_J`;0(&x>P3N+fVVS)a!kyGDQf${KFj9+9A7P1?03J_rB@a?etjGdgD;%+lnH>5= zNb;Oz--7@O!=V-r`X`K_9O%liW)HWn=4QE9_q+-JaHo0gZ!%p7?b`lad*LNV+koxT z=z!`tljt0_79R~7%c-vgQ@v|Il8Ht^0_+a*R>X@eKn_+p;a&ie*cdWyh&*$>J>OaUcnSgcQ;%fm9%EfrOAk3CR)? zSO|m#mav;{YxMu!_hv>??7&AB_Vf7Zwfk;4=iGDeJ@*t2@kcn7NzK{pc4!&cwXmrG z+ytN5UJE~I)KeX5YD&#%0$d;<)k3eYC=d-U>z_9#7kz&W5f@%#V@4#8KMWo~-i+>+dm%@=fiNgl zcOpMf1Ya{SSzr+PTxXnPC9zmUY>3GEeA4uey*y|ss?~K7idvk=T+s1nGLl^Xmro6m z!u}-6YLNF3nz_hfF6)376Kox`Z8Ugd*Q&MQXgJz7x1}FD4~`xLz_f=enb~!fDAhPS zTRYk|4sP1$Y3Pgs(o)xQcnqyBYG~|i?h(|wdZ$?f)dmiFzm|r|x(cJoVB#c=_d5OQtYk)M; zxYTA;Grepbb_DA-c{cAF+^apUMx_lIK7OaA%x5q*4Io&h9UBh{QxnSg$k}e6-w)6J z5SHm=9TyD6EFgr%VUc%z;c0|zQ7lC48p@kgcBlaQ+-`>mC&g?NQPr{!5hSW&m9@3y z)e2kDsIal6)yHGSaaai$P-Rg4S?K+OmHDN|xXE_lux*uvgKfc4qSD*66|Q(t=VB%o z*zyN^Vmo#km0*u+H~FvB<`@Z0bCVnrEp{v4Y_{h=XSc#$Ol>F}7u) zchBhMJeI_6qr=jY$|O4*(^UrS#WHVgOyfR|kx+xZI|9ckm#aTTW zy%-h*I!&acq_U;Adl8noHs*Xy7to5(Z*VT^?rlLJiHHV?Fb>S-G5lMzcue+z$^HM| zc?@@uE}F$-j{Ddeh9iTMe-P(D&UQYz6O4gm`HNB3lYN#tJ+#WV1#;Ca?mi6NQw z=>levo#MCz-+da}kA*~_&EYT!v1$RsL_-72K)4q?DM83|cJ)_QR9BgyWe5XvU`LW% z3;fP)ZEf3}{sk@x`T=kdtVfV1OI3A6Wq(&^Mi5dSZsx~$XZ&j)Lx0gc>tn8}GY;(? zbG)-^<|RCZ_lRO&Yily-_SxZ00m`D-8j(0e*ia!Xb8YRh@!DFQJ_e?-nv-ly>jm3H zlHKPHCRBN&^H(zS{baY4`_eRLm%CprGAQRGwcNKfpEgk97a zV4x137u=IQ<8(iiH&_?ZX$4=<3!zV0HNW3hW>q6xu~Totudd*l7lPI%QY+Te6o#T75i_~%}B>D0FKkjxK3%)I#9Xs+V~scDiNO7#!2tJ% z5l_g=o|#KlBg`Zv2d1Wk>##So05^zOmfs_17+_kHcqFeUa_Es2Ddka8o-Qe?B{o4m zA(arAT(;HYFgOs%2L=mPoz1(QyJIr7-DB4?*%Plvj0uNtjN5WBU~*vU1hWcrz<lUZO=^cglL=mZ){6jtxgzdKwdWa7i_rOZBCmJzIG5?#ld`}y~G{+4_?)VV9t06 z6>H@s_z6$ePVE&KKiNa>BfmjAfpwW`Ks5Q^Otn2G`jCe?yq&QYNTnG}W=;`gt*Vo$ zIw1U(!eeIWJg`!y_wWEY>;xUR_b^ayKNy z{-AeGRl-}!G#k`fhsEg$vk@G_IL2FqIM4(mR#(8TfhGbc8My4Ith2zpTS2#vss4z8 z)`x6Xi^*bCLo1bO+`|R1)1?n}bcD2a79R?(N1sCkC@c^pbLX3IH?Ip@;k1aUA?ch> z9ZRT#5|W_8$j_#m7s6i+WYW-UG8)X0WJTk_@1*bN=sKU#s=a$t*tR_LyJlFn=`8{j4`9-ujv!bFOCN$REmMc$ z;ru`u|Hh_%Bc)*9)=XA1-srN+nskglQ1hGm_5pk&LlXSdoDA&&Q3ZDA|)%@HBJGg`XvPiK@agY^NT=t4eh z7v^POJbrohcdH$+=>3KO%`$7;BsCsvw?w0s5T_A~`?DXeuH>i0b45&35WS-8qV9XM z*S|6n>unHJ^?I0ms4_b0*xfw$2)*G4y;s7!pGj@Pgbf|`1C!6J3b%U=o8R2U6g?W? zl1=D3Kwr2Hp@u1WdTNolUbv5(j+;nsd9E;d39LuyYfAH>T^`A4-O7pwImI(*uzfI+>+| zld`X<&uhJ4$Icd`7Aj+E`V=O@BKVu#Y-TEWwx~Mf5Bl~kTN1$FB4C0HGi+4_N)cVx zT=!~#{WO10QnAws$6~HR<*Bo$)0aS&BDr%-ssFKBfIq+hRE4*?1 z)lb5XFP;s%>?@xQcC>63>^L~u{3pQ<#Hac-V*I+<8nzB@?jk3~e?~}J)zL!K=aE7r zYJ{R>!E#~Gj0n5Rg^Z79=##3=TpNK@Sef8Ts=N z8kECKmu2)TSd|rVnB^L zW`+vy(+d7alea=9V#0F6s^TVJUcgH(okK3bVAXjfei2u}d$zf z3I%B&ga}X_{i|iv)&E1v;5xO%@W$#cvT7lw(h6qYI$Gj^giu7VB3MOhpzsXUE=jq@ z$O_|fPsym2H)F(9!w9DchPq<0*66pWi{^$*YG=Ktji;raj7enUH^?erC@p=`A!wFB`BMjcOAoEGbUc&M7WA zwB%Hgb7{>MXQ(Vuh25zx{yCVI2~asMiB(o4SFU^E>`|D^X?=mpvtF1#x2m+fC{+|= z28QTRl&QAqHhDsUNb{VFRwUdG>_Tf6uDEJ`cNhZ4uoKGR&?T4q-84M@K4|=Xt^B)c zk9u+B5d3o7%s))dA-4igaxYbSmTYXy0M2~;q35$X!Yo`dxy=lOz!8xAA!b)ad8|n@ zzL+u1=W-=X_i5xa+gArtV2GSK^fGG)URezY;eaFH?_WQ-xy)V+CyiD$^T?#qTA|w= ziClRpB*``}CI!r;KX$ngJlbOGT(WAd9nwO{riVdccJe27ixtWR&;sYn!liY|#?|Y> zq16ivP$u`ducX||9=Fe%ZV!f z95mFO^Q-HayJ5C0SjTfkKe5{!4o+jziehWDA{KL(=%AbonV-dVA;*pka$Wza$+#j-S+1~1e1Q0=oD>~QM~+|#njNq$Tv zkYaeV%~2)BJ`Xo*{KFayy9LUYUvbV!#H>^b$5v7)%w3`zpkN_H;YiSCbKpuWLc5#} zFMSrz#VEE~tv2ifX(aX>6ElYgB1x=~ES&5H=sg}i+!#nMuF+j;782!&im^>Q zH%GeHR4y2@K<3pd2y;ZiUA-|m^0QY)5XL?sm`mLm>e2>O0{c4F*BdKcc6zFPL28A= z?eGX%i=w-GaOy3<^m`1ZkRN~YH~oOkmUDof!CcsrS+L5n0u1fB$=Jytj%U2(v%)mQ zQ5!s8&xUEpqGl>SGEC#PPr~$$zXnp8`Bad$3VeLty!dR8y0!isNPGKE22wUJ1)bg~ ze4lKPdt)>wzk@p?#4eEc;Ody`1%L`GFSda<4Z%Ewv8O$)N1mHX$w_A-gbA>?KO&T- zXwb(a)s@-jyJ4MC1+fG+9MtLxf%M9e_r9McC!Pk{Oe4b2i&yi*F zYTv0uF3vYQ2MFc^tRA9gg;_;0;((YijIeEpX?n_o0_J|x+R+a;36P%If~}ePS3kC7 ziO1=7mK4#dE;CokHXq?Nf~%eZmqg<9O>XDasSu`zyx_2Vgzss0Sfy<9^_@kjik?he zv=`c80y{I$E3#xW(7n z9Iye!s+_m?%^x~tb?-9Az-!kQ$26Khc46Dv#60I)osg(A-Ec?$!fow6O|7YoyE`f? zYin#;i=L0bSCYQsw3Rz39ZqZ1K}kY19cNX*xTSxQP6LAxOV6XQZG#FQEwNZAx3(Ig zZ6$SxY1wss!xgu(`W2+$yNtXf9u1Z(KjT7vG&UAX*UN`(v>-3ed zvx6Fu4>o#GRScn#CLQeApx3Eg@6kqVPN3b|A1o`Wbm^@|;SNjz;5}O-Syh78;IO&d z7Maa;>Dv0@g|}^pL`){H=bN2+HFWE+3nEzkkR8J1D(g^MsH{3YE?;F;D7f|hN?S*! zv$eAN(4vsThD9Xc!+~dfq`FnmVwOEVgF*^$nr>^}lJyhP+1!BlX;cEGLpFJ5LR~D4 zW&IRJSZvKJ%d_eG^RZxA)!O2QEfR#3G7)ib&7$(opSyDPhIyx%(*JY44gXg3b(hMH zP9VvIqdBV+#D);<>TrMGs@9&Sw)B>LT{RU+7{(j5*{2Z=IiYu{xSl`pG0G*%ZDy{< z7OH&w_^-3ampj041TEN0(SmvFs*B3P8VNprV8>-IE3yt`8Z?^XK)bf&F3g6k>GWbq z^Wi_D1mx&dNr>8IhwJXe^)(um-4YAUT^VsBG#8tq9p9yh3v3p59ip8w`s2uXQxB=` z6#5WD1-8bJGfod;LOeHUO~Y7OnJTcHrY$@L3{N_)&FsR3tl2~P>zP?V`WBTQZi0_J zt=GndqTwQ1Lz^6qtFAh7ffJJiM8r_5IH@UEW)v!_s%kFy{8g8YO>8+m5c0#HU%8Ka z9P(*(C=?Fv*s*1!AF&T$8_9yWr9u@t0XnUf|MIz`m+m=p`;I`+7toZ3YI&;Bc&s5; z&^s}D?%5`bJ?YZInOdi&89@Q-nN^*uN-J zWHTkp=h|FOSklFX$qGOewttehzNW_x)eeZA;f*k@SH*RFG#K_Sjuo2>$;y71_JF`1wn$K@^DG;1ShjJx96=u%W6u8bL zd0b<-odNHtWRV{!i9RJ`JpSAHs-~w$5`A}>o1W6z;Wr8BEWF0XIsp^Sz;sC6c8$%p za#QzKgO$dv!#MOi4N*#c-s}59_QA%|WMy3qY#7Z#Qm6Jcwk)eCOQ4GdSm)tQ z0Rvq38w^{(rqnT4qolowZCkkK&Og1#TZGL$FFb?IPNwN_H_!9IYa3%(ldpezo?Crj zd}qMAPswr~%QEg01$0~RSaZ;TiJIQ99_rtwM?*H3QI-SCetwuf%}1aKHSv=svWoRo zHXbzdIepQYEDMO8#m`u0EAX=!^2QUH-NW^zTC=(5&wL0hsltY#u*Mp$c>MUA*~#UY z1TkskY@UUY4hg<>{Fh1s`Zu|nsA;HxY1%Xg%4YIB$yKlLr0FLGF2&{vk4!C6ZH4@w zjRK$KOF7MoJa>}yivWaKKgOQm;8%WD3-~~gInC;3T(Lf-sH^6BON`m?@b~LoR&~f1 z^c~rcQXx!)teLj1w)^^9TtH&l{&<4XiLaj&4c#j<`ou=-dd2Q!G+1mV@ z@?xuxrah&NeD-Bp8+8cx>M(b&C~vLKG`5{}VfJ_5U!BQVR9Z{4)C}3Gt9<9KFO-&- zl|w5#S`sgcLXPXK4u_3;PH%}cvRM}Rz0Av>0W3Cym&=+1Y_E^G97WR^$CU@b0y#qs zK-St}iLe6V75L2H?lXr%wmDqR6-yu0)3C|wI-8Dj{F8m(z2JxjlXjae;4A9gaN4%| zfuZaJ`vP`-JuT9Ed9Lk`S+#jj^U%8W3!zWqj(EIgALSb}8y0UE9PYe8ugXrn+H29P zg?lxrm{mA7=HI4Bb6Hsj=5!~cNCro?J8!eVqgert({jG6mG$;NTGB@gdKvPpmPLupDaGQR zVS#DwvG5@ZM%Ww;bG6tEKMIhs{%^&FobO4lA_O5H{Jz0&hCNu$KgnjK7K_Vmv$Bcm z6MT8d?qUXB7PH45s^Hjr0V*sop803U8YkaD{!GHl%B1v3t+T>`OH9}-ZbyYv%Zf)$ zJvJ=FDScY&sB}O?$%$ROkbN&l|94ivzAQ0WhzQ}06YK4~=3u{=&R%=pyk9+eqQIoMj+$I_zLug^k_>W%9^FXFqqriZY zi>E#muN0n@eUmda8f96O??-a84#rW(-+Sqep-|lNtJ} zkj>jIq4=Yd3%?&Rxnci-ArBS}1{;$uweEJe`2Y{ifP>zt;*jogbDO2&xE0oRRK!8*-Rqv~_V?;|2P zko}YD7STp(5D{n{w0AE;W3X4xs-ygPRGmJ^I<*%XIH3QGTS z4oW^Qv0zLvGoMJLP-4DhoGlT4Tw^s!K~KOtKDcfEzp3D5sW!FXW!l%@KfG@9V))5} zL*k;6_C>o!4kLy}d85;5GEE+0t8)?a!t%AJ9f+5}>7O^IFjYiIS4|fz#HO zLu3vqEk`FKCwt1B$Gv&dT+S0M*yDhzth+8X@Z;>G`zA)#ZtQy+hB3x?$(*0iOBx$@ zZQj0oOLuz!u7sIs54Umhpw8ja#WA%!ym51_39hCfTc(o-x&0K;D z%Bwn?=FeR^HbHy7SyvQ=mtQ8GRY}%pQQbGQk4=m%ojbp&v#Q*|UWljt{Q#c~8GP;G z^-E4^%ajz`{hazo%?tXLgxh_FLH1%v--6~JsX4#BxFpkd%98c$#jL)tlAMM3%S^}Z z@9hf(gJN>{$GTdC};+FD%BTmNS^OA*aXM!qHynEpU^+ zr)W(Gtufi4chi$Ra!b5;S^turWDnHh5o^wjfNR-D=*t|PSNr9M9=&enbJ_=W8`hlM z_h`Xb-}86PG8I;WieHKip3|3b| z2g3hN3~ueM3WqFiUb<`H=+K$-`m=w&Go47d5}bH%*VoIYIeiK}Qz?XHZXRIB* zHQ*-^vt(vRbzJnrW*tUVw!DpkGJj(8Tg3oWUL+{f!n_uC2{RAP@`>|94ujo@J$g)l zjIPlBQ#fA*;ZO?KAxMPGBS{L!IhO@uAUa*hU2ds2*Eg2wtz6$ z4bIT{e1gHS*=B;& zR5izB2;h5zHPpf~0=y1SWl^t7S-s*Bd7Z;-92l%}0R)sK^Yk>D-RGv!{K{+(({pd4 z9&2&wulSA7bB9e*PR~926O_pIjj+~Y=wk}Dd`rj*q|<=GB&)IWZ{4Cn_2k_iP=c-0 zqQ3Pw7y?IpQ$G~;3rUi|Diqw8ZEdoxESEFH;}08nDMnKUu4~jl>p|b+V?Js|uGbbX>fY?tn^Js~{BfNR}OW&d9(g?jV`@%w-T5VgHeIeTQ zQonpjlR_1|PRlt25MNKu!BP%?H@O^w&Rh<7IQb*WvQVjP3u!XOvS63l7ZiG|o%(NK zSP;lPtQFH7M^dHhq5U;m_dX@1Agm}>*jN59c8rn^XPzU;=K`N%^dpOoW;%*g!Nvv2 zWP2cH9;JjNl0Ejz+gs2pLq%p;jk4Is!0BuciS$Nm!~j1IF*B6vs4B(WlGv z;Z@fPFV0Y%R^eo|X=1%$giV5IlzE&?p(7wxNSRx&(t3@)S|0++cSWcLu;sjJ9cNb~ zazkREEo5Rkds-H#9qJAS2t+l}sD?t7KtfD)@B^(uZ9$^8frJiG?ChLQ?S+6Di(QtV z4jI#{!+k-sJ<(ev8l3vH388l6I%zC6pW_;>!N+u>K&sHhghyit5HKG`*a~WkOG3PVeGRYb>=OB!_5E={ zirb*Qiq}XFOIRonF}((SuJJ)V1}6S2SC!eXW3<4L!6`HRMEn_RJH)SHvqxnrX$$^Lkc zog$@2>oADwmO!|Db>+yn9cMkw*^0deK@T0a7yps@N4r**FIu`_+3*^k^dBU41`q$Yqq?0lf)RNOdiE~O%|prBRinW6PQA2dG6zqMFIcV>}O4Y#aJHC zw`M+#j%e}YC(u#${n!3ZI{MrB53io4)05|a5<22Y9@}ez|13KC-{yQ$I-*m*n>^0H zui})sl57LVXd@;?!ttEYiHUd%HU!EnS)Q#}IEhBZ_NoBl+Nf-84cRYYvG!ggxFnmN za8YcLB0h?P&1c06@IYuY=%O5rF_QtkPp2Bm-hb>^_Igp@2UjSNuo;YQa}h*k{KXtX z*?>8c@Z^WwMW|a9Zs2=FmMhAE<>Z;0hs#?r$n{lpU6jcZbFD7u(-5|)i{#2s-r5|> zeyP6AhR9TN0#)rIs(!(w_4vdUlBvj&!k(L8ormxTgMx-G9#QGMhzG+g8@Q;>(547P z8LTD&D_)tueNv{#3@!4Oh7flb&Cpa*#Ug+eri<7V1yBS)0r0@6(U{e7E;`hpR4a&T zW#7!6#r=uD^3qhN5qZm(~H^b0j&E`GoM^DC{a$=Oo7!TU?s`0%FW@>$Kc+r zu<-#+Y7dvQ`-s)Dv7SxK;XOM0Ca@S(uvkxrLd`6eBCDb7BQMQ@d1TL;MqpG%pjW5b zK^FsB8$|6qm~c=jWdZiCI6g6HMSZ9+ImLTni?Rhb3O}03nr15Z7T8SkM4i3@tHK2a zx|u5S`LR+tWA?{AR}8JPqPYfNYHpFi&m>hQBcy;>5-N)jW-A#XaGUgLj=0 z?STI&UDRgs8w5vr(A2(vfBU*M>(}u7S^y6-25g1%La;@}tvq$*siUv8+2X}Egz~`T z7@>C{>Vy)M6vw}1U%O=)Gv$!r3?t}r3Nr2Qoy>BV0-x|7K1)k=7UN_VRRv~0`%3Pp zGb{=eFrCbCgYSip!*fGU&m$Xbr9?QQ z2qmJ_T@$s;0yYPq02*I9<+mp?SYsq=R7BSf$8VW{Av9-M+0t9~Hk7g>W_SD{$r{ z+e6zwm6dK5?<93(X`vSYUCK_qEOAJea`F<3)mQ%E52su<6ie_}X>+;cS=_AYevb47 zV>rrlj`DK*71>{&YA?wIq!O>ap_JD0ms9^L1WrxD2twmFh_QBV-qF`byoiv8sEe9M zXvy6To{#5g-6qlJ^ZHiLU$w}eM#Kw~6?%RKm3WKTEb@`A&dBex?H7jHR#j+QVm`E$ zH`MDi_NZM-Z5DRFMOWTay0pQo#$5lt>>Jr+_Akp4jv|M;thB7`lD!w6RSrkVdN-m& z2~H+Y;}8%2PGPmM0=n1TjH(&I&e%T$l9(;bCx3tj`=1lw0IgWtIpA;z1~ch1YzP*~ zxHGnAY))$EaF(|OSKW92DqpI>M}->9*>!&1U}b0anTO(Yeb|L6a`g^ehCm;oo7Pid zDX)h(M9D<+}p|QMHy;;h5i@(0ZSqevXl8e8s zYFYMYH2a5jY3{UplP=b_gV|H0dj$@-ZvSMDWnmg1x_3^u%%-%GtzBbM&T)kVhaY?l z2Xs`P?nFJ*a42C32hD3Aeq^m}UOZ6}3JbiWtkkjf*)J?`BvO99JZMc;XP-U(`RtqP zTqdom+S71%_O(aoBiYx0U-2PZ{$CVQhKhvcRrp+Ai=7Dk0L@5&1H0 z{nOrX`-(ELGY;VfJv*^1`xjvH4H~5{P}8zR4sUnJcxxhEGwB%kV<=?50uN{GN&YE~ zogrWW<|Io=32nfdU9dS~RN^1Ze-4U|tZT=`s;js6W!d}o8Js@B76idod!{boEf*4TL?wlEE7>r$~+BVo3Y!|z`1 z#|Kn;hF>Fp+wnWo>p(%&u`Vs+ZMFJ-@mAP1pUT>XI9$0VNeHi@EVOcXBfPnUi|4%1 zV3$p{YgSr|4H}C%4+}-wXtU-g+!)o8X<=0Fuw&KQRCmpxi%!q}1p{pC^H1FVVpUaN z-_ZmAI!Xt)$KTHOA)=f=T-IXtStYa6SYPJ#x)9pt(D!bsbY2Gi2QWQx1xte01lTKM;oS1%t<_tt=`p{_5plJiD>3t`Y_Y zb__potS*SbkfgD5b?vQv$LYee_uqN+#`DUc5XSMvK{lI0D$X9q-gkX{)4?xadyC1` z)Eua3b$->)2RTSKkPWFBpqpSVp_0ghub;o9b#xju=IQr9QJhR8myV^GVDB zkO0Yo)fj*p>Z^u2+uhg^lqF?oI@wE(tG~{Bp_QKFU^4m3G%w_~WR=d1W)`|fPQ0)1 zuzHy5-I<$#aP|sAV{g|&I3zyj%zcmF{=h}GiOMJF&<{W7&r>c*c4}I%44aaPVtSR(7JQBZWB|E&L^Bc zGnvyY5`od9!WY=zG=y9^a;R_M-q|8Ycte~;gUBPot-;~x6!k0e(4jPD;2UHxyr{&4B{1%Hj z`%^@G6d-bJye$~_1%(wutKbk^)$0fo5Wk0KUoX#CRqcVID>N^MzmuHWPH zYSW&O&*MZ4>S%eG=RA>UBG>}GP{dwZGiO0XEfe8$h^=L@!Rw~Uvi+-DPAiVa0&4i{ zP#e^O&1QG_ngYi5ipHvenih*zw0xyJ83^??w->`pEL>l~u*PJzFq`v;NhKJaj(`ac zSbG;7n%B*IdH6i#8-5{46&KeCzm2&9j)ju6ZU1YBca4uN-|B?MhPuoL<;i@eodz0>J(E$KV;)WJ1+eOVkxEw3)NTFj<3B3}lTE!59tJ@$wi9*yBQ-0rD# z>FP>qs|Mz;UE4J0l{%xKi^MWUGnNcShsLbcVfx(c(uVy$7u;&8!@RI)-hptmySJ_N z!uv#3bQgvehVOH;FR5-9ze!e*iy0R!Kv%gcAU=t+agd&0SHF8TA&7arP($;|W6clwLi4gqz z+Pyaa>fOT!La|7Zny(Rsa%yv0T+0_M?Copmgg0aprZdrmCeRj`zhuR!@g-54ExIIr z>WU@v@rcfRT+|)z?dfQbMI&KevS}SE@jkIi;)~+3qR*Xk)-J!_=cA>?ZXZt_)m-Blx7w^Xy z2rXN=n@R>cKe*oi>?r*S8q|gocVMxXq z&)oC%-RsN3$c2W$-7Tk>%Cv?p7i?SgIHU$*Ds$SB^%rb0XvZbQ8zCT3`cdIh*3p8`n^0sh&Uix z-F4u)uZ4r5033WnGt8)mvx5ebtAr@hJQrpQdv~o;_NFQ|1mt! zlgO?S;p2)uHHlmwd?)^ZJ*8*w5VY{2^2KcYya*&GY=q`So7Ps6bkd)n@QAhdP_~}8 zh|fc(?aSy%CN99CS$UuIE_;9jtxGC63l~?P>Kz)_DRdPl*1};a{8@`!=WW>j zv|t`#XJv!t# zI~V%(ljrhoZ)ozYZ0y`His6f6>he5716WD^|KB z!vr>@a`Ol*Y_T8v@ccN>57fg$S$D@)tJP}L@^(WBb(-S_$U^Nl7zFDP+EDaGLhYEI zLeC%#MSMQ4M<8E8goke$>F8Oub?HL5rUW&^?7kuh4JIa^L*LaJuo0*?rb9tb6o0S^}puAgmg{bM`l2T z%kliY0#(NFSg0iUu;RZ#fik4H7QBw#8Rts87L8tl{xKg#SaGj2+^|az_bpb)?Zc~6 zMR7!W)mzN=rX?CJ2D+6j>N1OF*&@)k^UiDIj|{>eluBo-HLG5n{DsXlG{Rq#V?VaS@7_T7k?=jVVvp5lSRR;M>1}EzQYSke3eBom7LbdgC%?Q1W;L8Z& zj8M(+t*VEf4k8Vg*o)@J!vUwm0DgpWRa#MvI04ufXC(-FjT$l5z&rJg{*sCmJgbPe z(7OalCq*iP9)x^@69WnT#4KHYo1j@3KgYv@aOLnMZ4j?T{H?n`6;DuENdcBj@|#DU zI1Nq(%221sb$p-=-F{jsUO=1tKK)m42eC46$NJ{Xy^LA7!%Re3X`$4aC}fzdUIf2U z7Am7Pdo=rF*PJ_RlU}FC@xvz#VlzC|s{Q_Yt93!lPQ`GrCfSzkYfHDLy&jJnQ54iJ zcr4)sTY!;3UAso(E3za4zN@y^7nM8g+^rlfwua3tMk_^_BaCa=9$WfmyVIky7(Ix# zg1~Dh#VUmml$Xw#{F97szFn)i4eGw-V@?*0O{FvRp}6$k*)7^zTe8mcP% zK`r7jNfO9Q19L36`voI1dDN(8ka?d0Iq`;+Hyp33Tr2W7)9WY#o~L3V7Pp&ig@DJ1 z<9G0?m5DKr>M#Y!F`6?8$SVZ%Y`Uaf-Q1+ml-I~v=Pe&7y@z}O7K z!nWNViB~9?y9?Y_idOm2NfDbF!3aOuN%ioWErnu1uSP;dWhAf^S=Be*D(bo;M?Bb0 zf#nCAUl4j8Jplb~_KzcG=y$Q}&G^ZJ5&3xq{^kyfah!v0ng~A-(gY#e3?YW!5MqQy zndy8&%=-wj{u1=@1R-|#6|&>r{x%^Fymvw3(pi*ouNrg1Lk&RueL?oRB4# z;dq#krTBg+u9qR*vN1xI7ZI|uhLBV4B4icHT#frR$ak$k$U4+-{Y!*wxQLKJoHyaT z={JN7Z6;*P03lmP2-)@oA;Yf|a{A4LjNtu_ZbEh*A!PJbLdMaK38dR=#(}!;d!CRp z+X*?_jst1VIZDWR$oF6kA&2!it|sJsJiFi=9DgL_b3Y;E!t)9FJnD1teS}nqU4 zD{mv@s_SsPOUM`BCgj>MAzykB2lDz7zWXxj@D;qj0cG8I7a=#}{+7!K!Dr-lJiBv@ zkh^|K$UVymxpxC0_l*#8|LcT2fa?d4$JYmNJc9#i9^8flZTSZB`6kMLs2;}?ggo3% z$RiavknYhU94P;>RfK%&2qE7I6Y>Pgd*V1DPvQD$Ga=6`z=5>i#W&v_A>{iBLY}>g zkRKc+Q2k zAFBv?tDcbG;r{KP5b}q$g#772Lf%1r{(}4eL4)6Whma3mBIF~q=wi{w1Nc*Abe;QGY&; z<4{l=!SMv4=>vo|w&OrP%}6^(AhhinLfi4IqXx$fgm$(N+O>etZsgswoY20937v=Q ze&oLp=@;SKfenN%LHeby61waiLQh#s=&9!rx~87c)2=3T{Q*KZApIskp_@_m&=Eqn zJWuGhFrmX4LQiiebOhHs6NHXENa#4OcO%Unlyk;rLigQ3=vg?QjXcj?Md*G#p$EQC z=pj5mj5Oz?exE}<{uR$J`X!;4-c0CGHKAW@A@u6GgkCd3=(YO@{nB-Wez~2{>yhq; z+X%f8-`(^ZLT^F7Uqd~<_Aa5f-bd(dNPh?3-?fd%*H-hp})ZS4IFQ_;P{Zx zUm}nHm>~4mj}!V^Jp0{Ug#Lal4%F*EQQtol;lR5;o=@n1q0Dz)CG>y7IPmP<1vuU& z^u2wAzW*?xAE2xc&mr_9eE0D-LXUM5dK_sd=MtJ7zD;Y^Pc&T^EE4TN~EUG&m}P3ui9?-6-|j^6tLhyIE4 z`_K74czN!#E$p`H++#8@Wr!&FD>U z;MkAnSK-+qJi8U&c-a}x&cU%3$GtcvaID7Bj$<6h1{^HEL3Xh8IBr26PvAI=;~8O< zd_JUlk1SVxo-9_~f^v;G>&Rm9IkH%4AqS;8vY0=YbPG?C5-Ek}M=$_9PL{Igs^62t zs(vzn^8wXw@y<_{skV?6k{$2fBMq9vB#Cn`j)ZtUt2^AST}$?$9`(YtRLkms>kEW4 zNjtvn7hGfk&I^PzY3E)dryy+y?$>aaqW&*UT_XIP^s{T}F0z(A$NM?*cRwc!`R7PK z|5Y*{u&R*X{hXxGo;rL}g`*OAqfGLZTphlQ>t`6;#a{u2E#yo1?ow5hoP|0aQtApg zA0-0}M(P!0Ii4SYuhD+wIUm;yu5GL?nltTGaLp}!q*FpY$aw_WP=N6LlaPDQ#aJHaLZGhcI z`TZ)gj-?Uj5R07d=cEPqt(ZcsM4Ama*5JF1I1d6(>yd6FXdr_$i^O$g5P1#ayb<^r zLHn*`&*k(uvuCV*`8G2;mfM}0`j|b}{+VnPub;YxwRgtRBDb5tfVG*O^KITr82mb< zJJ5dC=G=GMTgd=B)JC#GgGo@XzZ}%okO8FG$Y>b#Vn;v!0qI7aHH?k{{{-4pi+lDg ze-xwME7(2KGa6>kW%?IZlV-H7QYs+}aSr9bk&XaoIK%^_88~3ybtB(4^t*21by6bt zneUMvRtLP_#iyoztZtmT1GLQUH{g5_^vCG7<78(%+m$;G<9sN0uy5FL0lpu^`7k@n zhkxoA>UIG6twkHh(4MDpJe8xdXFwk^&%%3_<^ZER&}|vg9Lyd2aXt^v&j#%>e#iO+ zyJu&{pB}-%`bhr#ZCtZ_<#X;^c7HCeFJ=d>SvfO~4_-!H58z<=vpiY*eK=~-7P&ow zYwCA^V>o~2k7CMylPmW%=*YdfYZZ~mqq%FQgZ3oyf~pm=P86;wQPJP$ zo^wP^|D3z#iJN|qyA}ux8*|qpadM&DwTc+IhTOHBf7j^Fy+h*@Lz}}}#z%LAw~X$b z*c~3-67Cw^F}7!7Xgs`dbo0>o&hVDO9m6AMh7(<-;o8P@V`Xh)rXk!tx^r-3bGWA} zJb&k&iEZJ*otwj>6WfNycUOfM4owVBoH;fW-aWcy;*7!ZA^F>6O-*fh+0gjbq43JV z?R!Rsc5WXHx9lC<-o9ykbmy7-s>b)URxKY|)j2w{IiEul?(sj&o~=aQ!=pRHHC45_ zR8Song@A1@8G=i&3H;qm!cYz!$I~716?;2DcH?>!&%<*19WcAxBc~q6lZAM*S^j>f z{KX)?93~^=Oxz`qz7*$L(n!)cD&?yTX~45?x#U5lWM%e1MK(<4qcoQDHe3(ln!Op7 z?^*qJ%V`#(tO>lGKnY{G4&yni+XOZO2a$?B$(NfXHTc!y$uhZyTjjSak#0N68NuC7 zT#e#=3t+&Wwv$bA>vtmeeJF1n=~{7KjO6 z%%>LkX=o*F07?g%)CH9FAc}GyRzdTy4>+GJ03a4&muvv~M@s?X<=8`C34fuhptZG{ ztbsS-(_m4vo@@YUZz31Kdh~X3Gr5u+Ax|R~^Nr*(ayhw>+&~^CUnM_7M6~0C^bRLDBHeG<&ql*w;et<5aOX)JY zoUWiNDfW`+sdP16L)X&N=sLO{drpINBi%$d(;>QrZl&AkFg=}arz3O+-APC37?iul z>25kf_t3rc47!h=Nza01-Z}JK$Yu7^1N0z0L=V&R=>_y(=;!DWdLd#Nf1X}MFQ%8! zOX+3wa(V^5k{+d3(J#<1(yQq;^ji8Q$o0NVze2C4H_)%r8|h8-W_k<#8oia?MsLTK zA^I?Vgg#0iqmR>X(Qni5&?o4V^eOr@eTM!U z{Vx3;{XTt`K1Y8*pQk^BPU4GDWqXHpAo>3j5j`T_lrendZ} z$LMjfYUiGj5%rEeBNM}8BWG&1jt}k~+BCXjqh@ducr3e;_Us(4sjEq9CWc2g&wSF5 zdy~qY)46jdckalYJ9Fo*+__sh*VZcMWbV7Vq;g-Ezt32PM<)h14-btG?H=AeF}ibf zx7aZg!h!0DqdSJS4(eI9`D&RyQB8d=Pr17K+)MdJD}O9sY6iCq57*YzBmE96{P$hoeNb6uf+b%iqO z3T4z4%BU-pQCBFVu22SiaOc`vUnrx#P)2>BjQT?W(s9w3T0#p zWx$tt4nmni8JR*EnL-(vLK%&PG8zkIG#1KeER@k$D5J4ZMq{Cj#zGnCTGftW%mRm4 z4@uT^%M2!2TdNe4s!isKPSw^mBz0#Df#d9+7$4ldTfKD4_~7=5J>%$_Lu1=CgX80) zXN(MOnULhGJ!4w=JU+a2+l2CR^XM5nm8*@IZ7NrL#y0PiORjB{S!EKl)ZD$yDskVa z+;_?>GFjUxv&dv^SB>(#t5z=;w0YwQD_toSH+#km`R8&S3aMB%lux@GG-x#D(Ypsn zbVK{VM~8M!3=fW|hjxrjoVj~wLJgLW{=RcU8X6hefwOw|o=w{(z{unblC?D=1K#f3 zU7daqS&R?w-o9gSVq5N^(hRgiKQ=x(Hab3mdGO$f@-o?=9U0v^ylHR*Q*cf0a&%lj zyc5~%9@@mxim2k~PHFcrCh~*h%6Iij+mrS3u#ilmD{UIxxpjOGt181|vR;8wGA$1@ z$z)m{XmD1bm`r!e)j=tHHlm?MRyTIT{tQj%$A`9z4DHLk%ik#Pl>9S2%DGV8&L4r(9X@noAwkS z&{eN|-K9`XvOAYcw?Zv-HOhTmP5xeiLtRa$W^m`$5ulTi3cHetL(Z%|sTAGNsTAGN zseIg!Be{mII+fA_Ie9~mf`x`23?5^Ho0T4vN+}RYrINy?kv;MZA(=`k=t!j$u%%MH n`i '', 'img_path' => '', 'img_url' => '', 'img_width' => '150', 'img_height' => '30', 'font_path' => '', 'expiration' => 7200); - - foreach ($defaults as $key => $val) - { - if ( ! is_array($data)) - { - if ( ! isset($$key) OR $$key == '') - { - $$key = $val; - } - } - else - { - $$key = ( ! isset($data[$key])) ? $val : $data[$key]; - } - } - - if ($img_path == '' OR $img_url == '') - { - return FALSE; - } - - if ( ! @is_dir($img_path)) - { - return FALSE; - } - - if ( ! is_writable($img_path)) - { - return FALSE; - } - - if ( ! extension_loaded('gd')) - { - return FALSE; - } - - // ----------------------------------- - // Remove old images - // ----------------------------------- - - list($usec, $sec) = explode(" ", microtime()); - $now = ((float)$usec + (float)$sec); - - $current_dir = @opendir($img_path); - - while ($filename = @readdir($current_dir)) - { - if ($filename != "." and $filename != ".." and $filename != "index.html") - { - $name = str_replace(".jpg", "", $filename); - - if (($name + $expiration) < $now) - { - @unlink($img_path.$filename); - } - } - } - - @closedir($current_dir); - - // ----------------------------------- - // Do we have a "word" yet? - // ----------------------------------- - - // ----------------------------------- - // Do we have a "word" yet? - // ----------------------------------- - - if (empty($word)) - { - $word = ''; - $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; - $pool_length = strlen($pool); - $rand_max = $pool_length - 1; - - // PHP7 or a suitable polyfill - if (function_exists('random_int')) - { - try - { - for ($i = 0; $i < $word_length; $i++) - { - $word .= $pool[random_int(0, $rand_max)]; - } - } - catch (Exception $e) - { - // This means fallback to the next possible - // alternative to random_int() - $word = ''; - } - } - } - - if (empty($word)) - { - // To avoid numerous get_random_bytes() calls, we'll - // just try fetching as much bytes as we need at once. - if (($bytes = _ci_captcha_get_random_bytes($pool_length)) !== FALSE) - { - $byte_index = $word_index = 0; - while ($word_index < $word_length) - { - if (($rand_index = unpack('C', $bytes[$byte_index++])) > $rand_max) - { - // Was this the last byte we have? - // If so, try to fetch more. - if ($byte_index === $pool_length) - { - // No failures should be possible if - // the first get_random_bytes() call - // didn't return FALSE, but still ... - for ($i = 0; $i < 5; $i++) - { - if (($bytes = _ci_captcha_get_random_bytes($pool_length)) === FALSE) - { - continue; - } - - $byte_index = 0; - break; - } - - if ($bytes === FALSE) - { - // Sadly, this means fallback to mt_rand() - $word = ''; - break; - } - } - - continue; - } - - $word .= $pool[$rand_index]; - $word_index++; - } - } - } - - if (empty($word)) - { - for ($i = 0; $i < $word_length; $i++) - { - $word .= $pool[mt_rand(0, $rand_max)]; - } - } - elseif ( ! is_string($word)) - { - $word = (string) $word; - } - - // ----------------------------------- - // Determine angle and position - // ----------------------------------- - - $length = strlen($word); - $angle = ($length >= 6) ? rand(-($length-6), ($length-6)) : 0; - $x_axis = rand(6, (360/$length)-16); - $y_axis = ($angle >= 0 ) ? rand($img_height, $img_width) : rand(6, $img_height); - - // ----------------------------------- - // Create image - // ----------------------------------- - - // PHP.net recommends imagecreatetruecolor(), but it isn't always available - if (function_exists('imagecreatetruecolor')) - { - $im = imagecreatetruecolor($img_width, $img_height); - } - else - { - $im = imagecreate($img_width, $img_height); - } - - // ----------------------------------- - // Assign colors - // ----------------------------------- - - $bg_color = imagecolorallocate ($im, 255, 255, 255); - $border_color = imagecolorallocate ($im, 153, 102, 102); - $text_color = imagecolorallocate ($im, 204, 153, 153); - $grid_color = imagecolorallocate($im, 255, 182, 182); - $shadow_color = imagecolorallocate($im, 255, 240, 240); - - // ----------------------------------- - // Create the rectangle - // ----------------------------------- - - ImageFilledRectangle($im, 0, 0, $img_width, $img_height, $bg_color); - - // ----------------------------------- - // Create the spiral pattern - // ----------------------------------- - - $theta = 1; - $thetac = 7; - $radius = 16; - $circles = 20; - $points = 32; - - for ($i = 0; $i < ($circles * $points) - 1; $i++) - { - $theta = $theta + $thetac; - $rad = $radius * ($i / $points ); - $x = ($rad * cos($theta)) + $x_axis; - $y = ($rad * sin($theta)) + $y_axis; - $theta = $theta + $thetac; - $rad1 = $radius * (($i + 1) / $points); - $x1 = ($rad1 * cos($theta)) + $x_axis; - $y1 = ($rad1 * sin($theta )) + $y_axis; - imageline($im, $x, $y, $x1, $y1, $grid_color); - $theta = $theta - $thetac; - } - - // ----------------------------------- - // Write the text - // ----------------------------------- - - $use_font = ($font_path != '' AND file_exists($font_path) AND function_exists('imagettftext')) ? TRUE : FALSE; - - if ($use_font == FALSE) - { - $font_size = 5; - $x = rand(0, $img_width/($length/3)); - $y = 0; - } - else - { - $font_size = 16; - $x = rand(0, $img_width/($length/1.5)); - $y = $font_size+2; - } - - for ($i = 0; $i < strlen($word); $i++) - { - if ($use_font == FALSE) - { - $y = rand(0 , $img_height/2); - imagestring($im, $font_size, $x, $y, substr($word, $i, 1), $text_color); - $x += ($font_size*2); - } - else - { - $y = rand($img_height/2, $img_height-3); - imagettftext($im, $font_size, $angle, $x, $y, $text_color, $font_path, substr($word, $i, 1)); - $x += $font_size; - } - } - - - // ----------------------------------- - // Create the border - // ----------------------------------- - - imagerectangle($im, 0, 0, $img_width-1, $img_height-1, $border_color); - - // ----------------------------------- - // Generate the image - // ----------------------------------- - - $img_name = $now.'.jpg'; - - ImageJPEG($im, $img_path.$img_name); - - $img = "\""; - - ImageDestroy($im); - - return array('word' => $word, 'time' => $now, 'image' => $img); - } - - function _ci_captcha_get_random_bytes($length) - { - if (defined('MCRYPT_DEV_URANDOM')) - { - return mcrypt_create_iv($length, MCRYPT_DEV_URANDOM); - } - elseif (function_exists('openssl_random_pseudo_bytes')) - { - return openssl_random_pseudo_bytes($length); - } - - return FALSE; - } -} - -// ------------------------------------------------------------------------ - -/* End of file captcha_helper.php */ -/* Location: ./system/heleprs/captcha_helper.php */ \ No newline at end of file diff --git a/donjo-sys/helpers/cookie_helper.php b/donjo-sys/helpers/cookie_helper.php deleted file mode 100644 index e8f5d083b..000000000 --- a/donjo-sys/helpers/cookie_helper.php +++ /dev/null @@ -1,104 +0,0 @@ -input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure); - } -} - -// -------------------------------------------------------------------- - -/** - * Fetch an item from the COOKIE array - * - * @access public - * @param string - * @param bool - * @return mixed - */ -if ( ! function_exists('get_cookie')) -{ - function get_cookie($index = '', $xss_clean = FALSE) - { - $CI =& get_instance(); - - $prefix = ''; - - if ( ! isset($_COOKIE[$index]) && config_item('cookie_prefix') != '') - { - $prefix = config_item('cookie_prefix'); - } - - return $CI->input->cookie($prefix.$index, $xss_clean); - } -} - -// -------------------------------------------------------------------- - -/** - * Delete a COOKIE - * - * @param mixed - * @param string the cookie domain. Usually: .yourdomain.com - * @param string the cookie path - * @param string the cookie prefix - * @return void - */ -if ( ! function_exists('delete_cookie')) -{ - function delete_cookie($name = '', $domain = '', $path = '/', $prefix = '') - { - set_cookie($name, '', '', $domain, $path, $prefix); - } -} - - -/* End of file cookie_helper.php */ -/* Location: ./system/helpers/cookie_helper.php */ \ No newline at end of file diff --git a/donjo-sys/helpers/date_helper.php b/donjo-sys/helpers/date_helper.php deleted file mode 100644 index 1de013207..000000000 --- a/donjo-sys/helpers/date_helper.php +++ /dev/null @@ -1,612 +0,0 @@ -config->item('time_reference')) == 'gmt') - { - $now = time(); - $system_time = mktime(gmdate("H", $now), gmdate("i", $now), gmdate("s", $now), gmdate("m", $now), gmdate("d", $now), gmdate("Y", $now)); - - if (strlen($system_time) < 10) - { - $system_time = time(); - log_message('error', 'The Date class could not set a proper GMT timestamp so the local time() value was used.'); - } - - return $system_time; - } - else - { - return time(); - } - } -} - -// ------------------------------------------------------------------------ - -/** - * Convert MySQL Style Datecodes - * - * This function is identical to PHPs date() function, - * except that it allows date codes to be formatted using - * the MySQL style, where each code letter is preceded - * with a percent sign: %Y %m %d etc... - * - * The benefit of doing dates this way is that you don't - * have to worry about escaping your text letters that - * match the date codes. - * - * @access public - * @param string - * @param integer - * @return integer - */ -if ( ! function_exists('mdate')) -{ - function mdate($datestr = '', $time = '') - { - if ($datestr == '') - return ''; - - if ($time == '') - $time = now(); - - $datestr = str_replace('%\\', '', preg_replace("/([a-z]+?){1}/i", "\\\\\\1", $datestr)); - return date($datestr, $time); - } -} - -// ------------------------------------------------------------------------ - -/** - * Standard Date - * - * Returns a date formatted according to the submitted standard. - * - * @access public - * @param string the chosen format - * @param integer Unix timestamp - * @return string - */ -if ( ! function_exists('standard_date')) -{ - function standard_date($fmt = 'DATE_RFC822', $time = '') - { - $formats = array( - 'DATE_ATOM' => '%Y-%m-%dT%H:%i:%s%Q', - 'DATE_COOKIE' => '%l, %d-%M-%y %H:%i:%s UTC', - 'DATE_ISO8601' => '%Y-%m-%dT%H:%i:%s%Q', - 'DATE_RFC822' => '%D, %d %M %y %H:%i:%s %O', - 'DATE_RFC850' => '%l, %d-%M-%y %H:%i:%s UTC', - 'DATE_RFC1036' => '%D, %d %M %y %H:%i:%s %O', - 'DATE_RFC1123' => '%D, %d %M %Y %H:%i:%s %O', - 'DATE_RSS' => '%D, %d %M %Y %H:%i:%s %O', - 'DATE_W3C' => '%Y-%m-%dT%H:%i:%s%Q' - ); - - if ( ! isset($formats[$fmt])) - { - return FALSE; - } - - return mdate($formats[$fmt], $time); - } -} - -// ------------------------------------------------------------------------ - -/** - * Timespan - * - * Returns a span of seconds in this format: - * 10 days 14 hours 36 minutes 47 seconds - * - * @access public - * @param integer a number of seconds - * @param integer Unix timestamp - * @return integer - */ -if ( ! function_exists('timespan')) -{ - function timespan($seconds = 1, $time = '') - { - $CI =& get_instance(); - $CI->lang->load('date'); - - if ( ! is_numeric($seconds)) - { - $seconds = 1; - } - - if ( ! is_numeric($time)) - { - $time = time(); - } - - if ($time <= $seconds) - { - $seconds = 1; - } - else - { - $seconds = $time - $seconds; - } - - $str = ''; - $years = floor($seconds / 31536000); - - if ($years > 0) - { - $str .= $years.' '.$CI->lang->line((($years > 1) ? 'date_years' : 'date_year')).', '; - } - - $seconds -= $years * 31536000; - $months = floor($seconds / 2628000); - - if ($years > 0 OR $months > 0) - { - if ($months > 0) - { - $str .= $months.' '.$CI->lang->line((($months > 1) ? 'date_months' : 'date_month')).', '; - } - - $seconds -= $months * 2628000; - } - - $weeks = floor($seconds / 604800); - - if ($years > 0 OR $months > 0 OR $weeks > 0) - { - if ($weeks > 0) - { - $str .= $weeks.' '.$CI->lang->line((($weeks > 1) ? 'date_weeks' : 'date_week')).', '; - } - - $seconds -= $weeks * 604800; - } - - $days = floor($seconds / 86400); - - if ($months > 0 OR $weeks > 0 OR $days > 0) - { - if ($days > 0) - { - $str .= $days.' '.$CI->lang->line((($days > 1) ? 'date_days' : 'date_day')).', '; - } - - $seconds -= $days * 86400; - } - - $hours = floor($seconds / 3600); - - if ($days > 0 OR $hours > 0) - { - if ($hours > 0) - { - $str .= $hours.' '.$CI->lang->line((($hours > 1) ? 'date_hours' : 'date_hour')).', '; - } - - $seconds -= $hours * 3600; - } - - $minutes = floor($seconds / 60); - - if ($days > 0 OR $hours > 0 OR $minutes > 0) - { - if ($minutes > 0) - { - $str .= $minutes.' '.$CI->lang->line((($minutes > 1) ? 'date_minutes' : 'date_minute')).', '; - } - - $seconds -= $minutes * 60; - } - - if ($str == '') - { - $str .= $seconds.' '.$CI->lang->line((($seconds > 1) ? 'date_seconds' : 'date_second')).', '; - } - - return substr(trim($str), 0, -1); - } -} - -// ------------------------------------------------------------------------ - -/** - * Number of days in a month - * - * Takes a month/year as input and returns the number of days - * for the given month/year. Takes leap years into consideration. - * - * @access public - * @param integer a numeric month - * @param integer a numeric year - * @return integer - */ -if ( ! function_exists('days_in_month')) -{ - function days_in_month($month = 0, $year = '') - { - if ($month < 1 OR $month > 12) - { - return 0; - } - - if ( ! is_numeric($year) OR strlen($year) != 4) - { - $year = date('Y'); - } - - if ($month == 2) - { - if ($year % 400 == 0 OR ($year % 4 == 0 AND $year % 100 != 0)) - { - return 29; - } - } - - $days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); - return $days_in_month[$month - 1]; - } -} - -// ------------------------------------------------------------------------ - -/** - * Converts a local Unix timestamp to GMT - * - * @access public - * @param integer Unix timestamp - * @return integer - */ -if ( ! function_exists('local_to_gmt')) -{ - function local_to_gmt($time = '') - { - if ($time == '') - $time = time(); - - return mktime( gmdate("H", $time), gmdate("i", $time), gmdate("s", $time), gmdate("m", $time), gmdate("d", $time), gmdate("Y", $time)); - } -} - -// ------------------------------------------------------------------------ - -/** - * Converts GMT time to a localized value - * - * Takes a Unix timestamp (in GMT) as input, and returns - * at the local value based on the timezone and DST setting - * submitted - * - * @access public - * @param integer Unix timestamp - * @param string timezone - * @param bool whether DST is active - * @return integer - */ -if ( ! function_exists('gmt_to_local')) -{ - function gmt_to_local($time = '', $timezone = 'UTC', $dst = FALSE) - { - if ($time == '') - { - return now(); - } - - $time += timezones($timezone) * 3600; - - if ($dst == TRUE) - { - $time += 3600; - } - - return $time; - } -} - -// ------------------------------------------------------------------------ - -/** - * Converts a MySQL Timestamp to Unix - * - * @access public - * @param integer Unix timestamp - * @return integer - */ -if ( ! function_exists('mysql_to_unix')) -{ - function mysql_to_unix($time = '') - { - // We'll remove certain characters for backward compatibility - // since the formatting changed with MySQL 4.1 - // YYYY-MM-DD HH:MM:SS - - $time = str_replace('-', '', $time); - $time = str_replace(':', '', $time); - $time = str_replace(' ', '', $time); - - // YYYYMMDDHHMMSS - return mktime( - substr($time, 8, 2), - substr($time, 10, 2), - substr($time, 12, 2), - substr($time, 4, 2), - substr($time, 6, 2), - substr($time, 0, 4) - ); - } -} - -// ------------------------------------------------------------------------ - -/** - * Unix to "Human" - * - * Formats Unix timestamp to the following prototype: 2006-08-21 11:35 PM - * - * @access public - * @param integer Unix timestamp - * @param bool whether to show seconds - * @param string format: us or euro - * @return string - */ -if ( ! function_exists('unix_to_human')) -{ - function unix_to_human($time = '', $seconds = FALSE, $fmt = 'us') - { - $r = date('Y', $time).'-'.date('m', $time).'-'.date('d', $time).' '; - - if ($fmt == 'us') - { - $r .= date('h', $time).':'.date('i', $time); - } - else - { - $r .= date('H', $time).':'.date('i', $time); - } - - if ($seconds) - { - $r .= ':'.date('s', $time); - } - - if ($fmt == 'us') - { - $r .= ' '.date('A', $time); - } - - return $r; - } -} - -// ------------------------------------------------------------------------ - -/** - * Convert "human" date to GMT - * - * Reverses the above process - * - * @access public - * @param string format: us or euro - * @return integer - */ -if ( ! function_exists('human_to_unix')) -{ - function human_to_unix($datestr = '') - { - if ($datestr == '') - { - return FALSE; - } - - $datestr = trim($datestr); - $datestr = preg_replace("/\040+/", ' ', $datestr); - - if ( ! preg_match('/^[0-9]{2,4}\-[0-9]{1,2}\-[0-9]{1,2}\s[0-9]{1,2}:[0-9]{1,2}(?::[0-9]{1,2})?(?:\s[AP]M)?$/i', $datestr)) - { - return FALSE; - } - - $split = explode(' ', $datestr); - - $ex = explode("-", $split['0']); - - $year = (strlen($ex['0']) == 2) ? '20'.$ex['0'] : $ex['0']; - $month = (strlen($ex['1']) == 1) ? '0'.$ex['1'] : $ex['1']; - $day = (strlen($ex['2']) == 1) ? '0'.$ex['2'] : $ex['2']; - - $ex = explode(":", $split['1']); - - $hour = (strlen($ex['0']) == 1) ? '0'.$ex['0'] : $ex['0']; - $min = (strlen($ex['1']) == 1) ? '0'.$ex['1'] : $ex['1']; - - if (isset($ex['2']) && preg_match('/[0-9]{1,2}/', $ex['2'])) - { - $sec = (strlen($ex['2']) == 1) ? '0'.$ex['2'] : $ex['2']; - } - else - { - // Unless specified, seconds get set to zero. - $sec = '00'; - } - - if (isset($split['2'])) - { - $ampm = strtolower($split['2']); - - if (substr($ampm, 0, 1) == 'p' AND $hour < 12) - $hour = $hour + 12; - - if (substr($ampm, 0, 1) == 'a' AND $hour == 12) - $hour = '00'; - - if (strlen($hour) == 1) - $hour = '0'.$hour; - } - - return mktime($hour, $min, $sec, $month, $day, $year); - } -} - -// ------------------------------------------------------------------------ - -/** - * Timezone Menu - * - * Generates a drop-down menu of timezones. - * - * @access public - * @param string timezone - * @param string classname - * @param string menu name - * @return string - */ -if ( ! function_exists('timezone_menu')) -{ - function timezone_menu($default = 'UTC', $class = "", $name = 'timezones') - { - $CI =& get_instance(); - $CI->lang->load('date'); - - if ($default == 'GMT') - $default = 'UTC'; - - $menu = '"; - - return $menu; - } -} - -// ------------------------------------------------------------------------ - -/** - * Timezones - * - * Returns an array of timezones. This is a helper function - * for various other ones in this library - * - * @access public - * @param string timezone - * @return string - */ -if ( ! function_exists('timezones')) -{ - function timezones($tz = '') - { - // Note: Don't change the order of these even though - // some items appear to be in the wrong order - - $zones = array( - 'UM12' => -12, - 'UM11' => -11, - 'UM10' => -10, - 'UM95' => -9.5, - 'UM9' => -9, - 'UM8' => -8, - 'UM7' => -7, - 'UM6' => -6, - 'UM5' => -5, - 'UM45' => -4.5, - 'UM4' => -4, - 'UM35' => -3.5, - 'UM3' => -3, - 'UM2' => -2, - 'UM1' => -1, - 'UTC' => 0, - 'UP1' => +1, - 'UP2' => +2, - 'UP3' => +3, - 'UP35' => +3.5, - 'UP4' => +4, - 'UP45' => +4.5, - 'UP5' => +5, - 'UP55' => +5.5, - 'UP575' => +5.75, - 'UP6' => +6, - 'UP65' => +6.5, - 'UP7' => +7, - 'UP8' => +8, - 'UP875' => +8.75, - 'UP9' => +9, - 'UP95' => +9.5, - 'UP10' => +10, - 'UP105' => +10.5, - 'UP11' => +11, - 'UP115' => +11.5, - 'UP12' => +12, - 'UP1275' => +12.75, - 'UP13' => +13, - 'UP14' => +14 - ); - - if ($tz == '') - { - return $zones; - } - - if ($tz == 'GMT') - $tz = 'UTC'; - - return ( ! isset($zones[$tz])) ? 0 : $zones[$tz]; - } -} - - -/* End of file date_helper.php */ -/* Location: ./system/helpers/date_helper.php */ \ No newline at end of file diff --git a/donjo-sys/helpers/directory_helper.php b/donjo-sys/helpers/directory_helper.php deleted file mode 100644 index 1f04eec89..000000000 --- a/donjo-sys/helpers/directory_helper.php +++ /dev/null @@ -1,81 +0,0 @@ - 0) && @is_dir($source_dir.$file)) - { - $filedata[$file] = directory_map($source_dir.$file.DIRECTORY_SEPARATOR, $new_depth, $hidden); - } - else - { - $filedata[] = $file; - } - } - - closedir($fp); - return $filedata; - } - - return FALSE; - } -} - - -/* End of file directory_helper.php */ -/* Location: ./system/helpers/directory_helper.php */ \ No newline at end of file diff --git a/donjo-sys/helpers/download_helper.php b/donjo-sys/helpers/download_helper.php deleted file mode 100644 index 4739d5c88..000000000 --- a/donjo-sys/helpers/download_helper.php +++ /dev/null @@ -1,107 +0,0 @@ - 0) - { - $data =& fread($fp, filesize($file)); - } - - flock($fp, LOCK_UN); - fclose($fp); - - return $data; - } -} - -// ------------------------------------------------------------------------ - -/** - * Write File - * - * Writes data to the file specified in the path. - * Creates a new file if non-existent. - * - * @access public - * @param string path to file - * @param string file data - * @return bool - */ -if ( ! function_exists('write_file')) -{ - function write_file($path, $data, $mode = FOPEN_WRITE_CREATE_DESTRUCTIVE) - { - if ( ! $fp = @fopen($path, $mode)) - { - return FALSE; - } - - flock($fp, LOCK_EX); - fwrite($fp, $data); - flock($fp, LOCK_UN); - fclose($fp); - - return TRUE; - } -} - -// ------------------------------------------------------------------------ - -/** - * Delete Files - * - * Deletes all files contained in the supplied directory path. - * Files must be writable or owned by the system in order to be deleted. - * If the second parameter is set to TRUE, any directories contained - * within the supplied base directory will be nuked as well. - * - * @access public - * @param string path to file - * @param bool whether to delete any directories found in the path - * @return bool - */ -if ( ! function_exists('delete_files')) -{ - function delete_files($path, $del_dir = FALSE, $level = 0) - { - // Trim the trailing slash - $path = rtrim($path, DIRECTORY_SEPARATOR); - - if ( ! $current_dir = @opendir($path)) - { - return FALSE; - } - - while (FALSE !== ($filename = @readdir($current_dir))) - { - if ($filename != "." and $filename != "..") - { - if (is_dir($path.DIRECTORY_SEPARATOR.$filename)) - { - // Ignore empty folders - if (substr($filename, 0, 1) != '.') - { - delete_files($path.DIRECTORY_SEPARATOR.$filename, $del_dir, $level + 1); - } - } - else - { - unlink($path.DIRECTORY_SEPARATOR.$filename); - } - } - } - @closedir($current_dir); - - if ($del_dir == TRUE AND $level > 0) - { - return @rmdir($path); - } - - return TRUE; - } -} - -// ------------------------------------------------------------------------ - -/** - * Get Filenames - * - * Reads the specified directory and builds an array containing the filenames. - * Any sub-folders contained within the specified path are read as well. - * - * @access public - * @param string path to source - * @param bool whether to include the path as part of the filename - * @param bool internal variable to determine recursion status - do not use in calls - * @return array - */ -if ( ! function_exists('get_filenames')) -{ - function get_filenames($source_dir, $include_path = FALSE, $_recursion = FALSE) - { - static $_filedata = array(); - - if ($fp = @opendir($source_dir)) - { - // reset the array and make sure $source_dir has a trailing slash on the initial call - if ($_recursion === FALSE) - { - $_filedata = array(); - $source_dir = rtrim(realpath($source_dir), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; - } - - while (FALSE !== ($file = readdir($fp))) - { - if (@is_dir($source_dir.$file) && strncmp($file, '.', 1) !== 0) - { - get_filenames($source_dir.$file.DIRECTORY_SEPARATOR, $include_path, TRUE); - } - elseif (strncmp($file, '.', 1) !== 0) - { - $_filedata[] = ($include_path == TRUE) ? $source_dir.$file : $file; - } - } - return $_filedata; - } - else - { - return FALSE; - } - } -} - -// -------------------------------------------------------------------- - -/** - * Get Directory File Information - * - * Reads the specified directory and builds an array containing the filenames, - * filesize, dates, and permissions - * - * Any sub-folders contained within the specified path are read as well. - * - * @access public - * @param string path to source - * @param bool Look only at the top level directory specified? - * @param bool internal variable to determine recursion status - do not use in calls - * @return array - */ -if ( ! function_exists('get_dir_file_info')) -{ - function get_dir_file_info($source_dir, $top_level_only = TRUE, $_recursion = FALSE) - { - static $_filedata = array(); - $relative_path = $source_dir; - - if ($fp = @opendir($source_dir)) - { - // reset the array and make sure $source_dir has a trailing slash on the initial call - if ($_recursion === FALSE) - { - $_filedata = array(); - $source_dir = rtrim(realpath($source_dir), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; - } - - // Used to be foreach (scandir($source_dir, 1) as $file), but scandir() is simply not as fast - while (FALSE !== ($file = readdir($fp))) - { - if (@is_dir($source_dir.$file) AND strncmp($file, '.', 1) !== 0 AND $top_level_only === FALSE) - { - get_dir_file_info($source_dir.$file.DIRECTORY_SEPARATOR, $top_level_only, TRUE); - } - elseif (strncmp($file, '.', 1) !== 0) - { - $_filedata[$file] = get_file_info($source_dir.$file); - $_filedata[$file]['relative_path'] = $relative_path; - } - } - - return $_filedata; - } - else - { - return FALSE; - } - } -} - -// -------------------------------------------------------------------- - -/** -* Get File Info -* -* Given a file and path, returns the name, path, size, date modified -* Second parameter allows you to explicitly declare what information you want returned -* Options are: name, server_path, size, date, readable, writable, executable, fileperms -* Returns FALSE if the file cannot be found. -* -* @access public -* @param string path to file -* @param mixed array or comma separated string of information returned -* @return array -*/ -if ( ! function_exists('get_file_info')) -{ - function get_file_info($file, $returned_values = array('name', 'server_path', 'size', 'date')) - { - - if ( ! file_exists($file)) - { - return FALSE; - } - - if (is_string($returned_values)) - { - $returned_values = explode(',', $returned_values); - } - - foreach ($returned_values as $key) - { - switch ($key) - { - case 'name': - $fileinfo['name'] = substr(strrchr($file, DIRECTORY_SEPARATOR), 1); - break; - case 'server_path': - $fileinfo['server_path'] = $file; - break; - case 'size': - $fileinfo['size'] = filesize($file); - break; - case 'date': - $fileinfo['date'] = filemtime($file); - break; - case 'readable': - $fileinfo['readable'] = is_readable($file); - break; - case 'writable': - // There are known problems using is_weritable on IIS. It may not be reliable - consider fileperms() - $fileinfo['writable'] = is_writable($file); - break; - case 'executable': - $fileinfo['executable'] = is_executable($file); - break; - case 'fileperms': - $fileinfo['fileperms'] = fileperms($file); - break; - } - } - - return $fileinfo; - } -} - -// -------------------------------------------------------------------- - -/** - * Get Mime by Extension - * - * Translates a file extension into a mime type based on config/mimes.php. - * Returns FALSE if it can't determine the type, or open the mime config file - * - * Note: this is NOT an accurate way of determining file mime types, and is here strictly as a convenience - * It should NOT be trusted, and should certainly NOT be used for security - * - * @access public - * @param string path to file - * @return mixed - */ -if ( ! function_exists('get_mime_by_extension')) -{ - function get_mime_by_extension($file) - { - $extension = strtolower(substr(strrchr($file, '.'), 1)); - - global $mimes; - - if ( ! is_array($mimes)) - { - if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) - { - include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'); - } - elseif (is_file(APPPATH.'config/mimes.php')) - { - include(APPPATH.'config/mimes.php'); - } - - if ( ! is_array($mimes)) - { - return FALSE; - } - } - - if (array_key_exists($extension, $mimes)) - { - if (is_array($mimes[$extension])) - { - // Multiple mime types, just give the first one - return current($mimes[$extension]); - } - else - { - return $mimes[$extension]; - } - } - else - { - return FALSE; - } - } -} - -// -------------------------------------------------------------------- - -/** - * Symbolic Permissions - * - * Takes a numeric value representing a file's permissions and returns - * standard symbolic notation representing that value - * - * @access public - * @param int - * @return string - */ -if ( ! function_exists('symbolic_permissions')) -{ - function symbolic_permissions($perms) - { - if (($perms & 0xC000) == 0xC000) - { - $symbolic = 's'; // Socket - } - elseif (($perms & 0xA000) == 0xA000) - { - $symbolic = 'l'; // Symbolic Link - } - elseif (($perms & 0x8000) == 0x8000) - { - $symbolic = '-'; // Regular - } - elseif (($perms & 0x6000) == 0x6000) - { - $symbolic = 'b'; // Block special - } - elseif (($perms & 0x4000) == 0x4000) - { - $symbolic = 'd'; // Directory - } - elseif (($perms & 0x2000) == 0x2000) - { - $symbolic = 'c'; // Character special - } - elseif (($perms & 0x1000) == 0x1000) - { - $symbolic = 'p'; // FIFO pipe - } - else - { - $symbolic = 'u'; // Unknown - } - - // Owner - $symbolic .= (($perms & 0x0100) ? 'r' : '-'); - $symbolic .= (($perms & 0x0080) ? 'w' : '-'); - $symbolic .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); - - // Group - $symbolic .= (($perms & 0x0020) ? 'r' : '-'); - $symbolic .= (($perms & 0x0010) ? 'w' : '-'); - $symbolic .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); - - // World - $symbolic .= (($perms & 0x0004) ? 'r' : '-'); - $symbolic .= (($perms & 0x0002) ? 'w' : '-'); - $symbolic .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); - - return $symbolic; - } -} - -// -------------------------------------------------------------------- - -/** - * Octal Permissions - * - * Takes a numeric value representing a file's permissions and returns - * a three character string representing the file's octal permissions - * - * @access public - * @param int - * @return string - */ -if ( ! function_exists('octal_permissions')) -{ - function octal_permissions($perms) - { - return substr(sprintf('%o', $perms), -3); - } -} - - -/* End of file file_helper.php */ -/* Location: ./system/helpers/file_helper.php */ \ No newline at end of file diff --git a/donjo-sys/helpers/form_helper.php b/donjo-sys/helpers/form_helper.php deleted file mode 100644 index 20f53c9c3..000000000 --- a/donjo-sys/helpers/form_helper.php +++ /dev/null @@ -1,1055 +0,0 @@ -config->site_url($action); - } - - // If no action is provided then set to the current url - $action OR $action = $CI->config->site_url($CI->uri->uri_string()); - - $form = '
config->item('csrf_protection') === TRUE AND ! (strpos($action, $CI->config->base_url()) === FALSE OR strpos($form, 'method="get"'))) - { - $hidden[$CI->security->get_csrf_token_name()] = $CI->security->get_csrf_hash(); - } - - if (is_array($hidden) AND count($hidden) > 0) - { - $form .= sprintf("
%s
", form_hidden($hidden)); - } - - return $form; - } -} - -// ------------------------------------------------------------------------ - -/** - * Form Declaration - Multipart type - * - * Creates the opening portion of the form, but with "multipart/form-data". - * - * @access public - * @param string the URI segments of the form destination - * @param array a key/value pair of attributes - * @param array a key/value pair hidden data - * @return string - */ -if ( ! function_exists('form_open_multipart')) -{ - function form_open_multipart($action = '', $attributes = array(), $hidden = array()) - { - if (is_string($attributes)) - { - $attributes .= ' enctype="multipart/form-data"'; - } - else - { - $attributes['enctype'] = 'multipart/form-data'; - } - - return form_open($action, $attributes, $hidden); - } -} - -// ------------------------------------------------------------------------ - -/** - * Hidden Input Field - * - * Generates hidden fields. You can pass a simple key/value string or an associative - * array with multiple values. - * - * @access public - * @param mixed - * @param string - * @return string - */ -if ( ! function_exists('form_hidden')) -{ - function form_hidden($name, $value = '', $recursing = FALSE) - { - static $form; - - if ($recursing === FALSE) - { - $form = "\n"; - } - - if (is_array($name)) - { - foreach ($name as $key => $val) - { - form_hidden($key, $val, TRUE); - } - return $form; - } - - if ( ! is_array($value)) - { - $form .= ''."\n"; - } - else - { - foreach ($value as $k => $v) - { - $k = (is_int($k)) ? '' : $k; - form_hidden($name.'['.$k.']', $v, TRUE); - } - } - - return $form; - } -} - -// ------------------------------------------------------------------------ - -/** - * Text Input Field - * - * @access public - * @param mixed - * @param string - * @param string - * @return string - */ -if ( ! function_exists('form_input')) -{ - function form_input($data = '', $value = '', $extra = '') - { - $defaults = array('type' => 'text', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value); - - return ""; - } -} - -// ------------------------------------------------------------------------ - -/** - * Password Field - * - * Identical to the input function but adds the "password" type - * - * @access public - * @param mixed - * @param string - * @param string - * @return string - */ -if ( ! function_exists('form_password')) -{ - function form_password($data = '', $value = '', $extra = '') - { - if ( ! is_array($data)) - { - $data = array('name' => $data); - } - - $data['type'] = 'password'; - return form_input($data, $value, $extra); - } -} - -// ------------------------------------------------------------------------ - -/** - * Upload Field - * - * Identical to the input function but adds the "file" type - * - * @access public - * @param mixed - * @param string - * @param string - * @return string - */ -if ( ! function_exists('form_upload')) -{ - function form_upload($data = '', $value = '', $extra = '') - { - if ( ! is_array($data)) - { - $data = array('name' => $data); - } - - $data['type'] = 'file'; - return form_input($data, $value, $extra); - } -} - -// ------------------------------------------------------------------------ - -/** - * Textarea field - * - * @access public - * @param mixed - * @param string - * @param string - * @return string - */ -if ( ! function_exists('form_textarea')) -{ - function form_textarea($data = '', $value = '', $extra = '') - { - $defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'cols' => '40', 'rows' => '10'); - - if ( ! is_array($data) OR ! isset($data['value'])) - { - $val = $value; - } - else - { - $val = $data['value']; - unset($data['value']); // textareas don't use the value attribute - } - - $name = (is_array($data)) ? $data['name'] : $data; - return ""; - } -} - -// ------------------------------------------------------------------------ - -/** - * Multi-select menu - * - * @access public - * @param string - * @param array - * @param mixed - * @param string - * @return type - */ -if ( ! function_exists('form_multiselect')) -{ - function form_multiselect($name = '', $options = array(), $selected = array(), $extra = '') - { - if ( ! strpos($extra, 'multiple')) - { - $extra .= ' multiple="multiple"'; - } - - return form_dropdown($name, $options, $selected, $extra); - } -} - -// -------------------------------------------------------------------- - -/** - * Drop-down Menu - * - * @access public - * @param string - * @param array - * @param string - * @param string - * @return string - */ -if ( ! function_exists('form_dropdown')) -{ - function form_dropdown($name = '', $options = array(), $selected = array(), $extra = '') - { - if ( ! is_array($selected)) - { - $selected = array($selected); - } - - // If no selected state was submitted we will attempt to set it automatically - if (count($selected) === 0) - { - // If the form name appears in the $_POST array we have a winner! - if (isset($_POST[$name])) - { - $selected = array($_POST[$name]); - } - } - - if ($extra != '') $extra = ' '.$extra; - - $multiple = (count($selected) > 1 && strpos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : ''; - - $form = ''; - - return $form; - } -} - -// ------------------------------------------------------------------------ - -/** - * Checkbox Field - * - * @access public - * @param mixed - * @param string - * @param bool - * @param string - * @return string - */ -if ( ! function_exists('form_checkbox')) -{ - function form_checkbox($data = '', $value = '', $checked = FALSE, $extra = '') - { - $defaults = array('type' => 'checkbox', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value); - - if (is_array($data) AND array_key_exists('checked', $data)) - { - $checked = $data['checked']; - - if ($checked == FALSE) - { - unset($data['checked']); - } - else - { - $data['checked'] = 'checked'; - } - } - - if ($checked == TRUE) - { - $defaults['checked'] = 'checked'; - } - else - { - unset($defaults['checked']); - } - - return ""; - } -} - -// ------------------------------------------------------------------------ - -/** - * Radio Button - * - * @access public - * @param mixed - * @param string - * @param bool - * @param string - * @return string - */ -if ( ! function_exists('form_radio')) -{ - function form_radio($data = '', $value = '', $checked = FALSE, $extra = '') - { - if ( ! is_array($data)) - { - $data = array('name' => $data); - } - - $data['type'] = 'radio'; - return form_checkbox($data, $value, $checked, $extra); - } -} - -// ------------------------------------------------------------------------ - -/** - * Submit Button - * - * @access public - * @param mixed - * @param string - * @param string - * @return string - */ -if ( ! function_exists('form_submit')) -{ - function form_submit($data = '', $value = '', $extra = '') - { - $defaults = array('type' => 'submit', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value); - - return ""; - } -} - -// ------------------------------------------------------------------------ - -/** - * Reset Button - * - * @access public - * @param mixed - * @param string - * @param string - * @return string - */ -if ( ! function_exists('form_reset')) -{ - function form_reset($data = '', $value = '', $extra = '') - { - $defaults = array('type' => 'reset', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value); - - return ""; - } -} - -// ------------------------------------------------------------------------ - -/** - * Form Button - * - * @access public - * @param mixed - * @param string - * @param string - * @return string - */ -if ( ! function_exists('form_button')) -{ - function form_button($data = '', $content = '', $extra = '') - { - $defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'type' => 'button'); - - if ( is_array($data) AND isset($data['content'])) - { - $content = $data['content']; - unset($data['content']); // content is not an attribute - } - - return ""; - } -} - -// ------------------------------------------------------------------------ - -/** - * Form Label Tag - * - * @access public - * @param string The text to appear onscreen - * @param string The id the label applies to - * @param string Additional attributes - * @return string - */ -if ( ! function_exists('form_label')) -{ - function form_label($label_text = '', $id = '', $attributes = array()) - { - - $label = ' 0) - { - foreach ($attributes as $key => $val) - { - $label .= ' '.$key.'="'.$val.'"'; - } - } - - $label .= ">$label_text"; - - return $label; - } -} - -// ------------------------------------------------------------------------ -/** - * Fieldset Tag - * - * Used to produce
text. To close fieldset - * use form_fieldset_close() - * - * @access public - * @param string The legend text - * @param string Additional attributes - * @return string - */ -if ( ! function_exists('form_fieldset')) -{ - function form_fieldset($legend_text = '', $attributes = array()) - { - $fieldset = "".$extra; - } -} - -// ------------------------------------------------------------------------ - -/** - * Form Close Tag - * - * @access public - * @param string - * @return string - */ -if ( ! function_exists('form_close')) -{ - function form_close($extra = '') - { - return "".$extra; - } -} - -// ------------------------------------------------------------------------ - -/** - * Form Prep - * - * Formats text so that it can be safely placed in a form field in the event it has HTML tags. - * - * @access public - * @param string - * @return string - */ -if ( ! function_exists('form_prep')) -{ - function form_prep($str = '', $field_name = '') - { - static $prepped_fields = array(); - - // if the field name is an array we do this recursively - if (is_array($str)) - { - foreach ($str as $key => $val) - { - $str[$key] = form_prep($val); - } - - return $str; - } - - if ($str === '') - { - return ''; - } - - // we've already prepped a field with this name - // @todo need to figure out a way to namespace this so - // that we know the *exact* field and not just one with - // the same name - if (isset($prepped_fields[$field_name])) - { - return $str; - } - - $str = htmlspecialchars($str); - - // In case htmlspecialchars misses these. - $str = str_replace(array("'", '"'), array("'", """), $str); - - if ($field_name != '') - { - $prepped_fields[$field_name] = $field_name; - } - - return $str; - } -} - -// ------------------------------------------------------------------------ - -/** - * Form Value - * - * Grabs a value from the POST array for the specified field so you can - * re-populate an input field or textarea. If Form Validation - * is active it retrieves the info from the validation class - * - * @access public - * @param string - * @return mixed - */ -if ( ! function_exists('set_value')) -{ - function set_value($field = '', $default = '') - { - if (FALSE === ($OBJ =& _get_validation_object())) - { - if ( ! isset($_POST[$field])) - { - return $default; - } - - return form_prep($_POST[$field], $field); - } - - return form_prep($OBJ->set_value($field, $default), $field); - } -} - -// ------------------------------------------------------------------------ - -/** - * Set Select - * - * Let's you set the selected value of a \n"; + + foreach (timezones() as $key => $val) + { + $selected = ($default === $key) ? ' selected="selected"' : ''; + $menu .= '\n"; + } + + return $menu.''; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('timezones')) +{ + /** + * Timezones + * + * Returns an array of timezones. This is a helper function + * for various other ones in this library + * + * @param string timezone + * @return string + */ + function timezones($tz = '') + { + // Note: Don't change the order of these even though + // some items appear to be in the wrong order + + $zones = array( + 'UM12' => -12, + 'UM11' => -11, + 'UM10' => -10, + 'UM95' => -9.5, + 'UM9' => -9, + 'UM8' => -8, + 'UM7' => -7, + 'UM6' => -6, + 'UM5' => -5, + 'UM45' => -4.5, + 'UM4' => -4, + 'UM35' => -3.5, + 'UM3' => -3, + 'UM2' => -2, + 'UM1' => -1, + 'UTC' => 0, + 'UP1' => +1, + 'UP2' => +2, + 'UP3' => +3, + 'UP35' => +3.5, + 'UP4' => +4, + 'UP45' => +4.5, + 'UP5' => +5, + 'UP55' => +5.5, + 'UP575' => +5.75, + 'UP6' => +6, + 'UP65' => +6.5, + 'UP7' => +7, + 'UP8' => +8, + 'UP875' => +8.75, + 'UP9' => +9, + 'UP95' => +9.5, + 'UP10' => +10, + 'UP105' => +10.5, + 'UP11' => +11, + 'UP115' => +11.5, + 'UP12' => +12, + 'UP1275' => +12.75, + 'UP13' => +13, + 'UP14' => +14 + ); + + if ($tz === '') + { + return $zones; + } + + return isset($zones[$tz]) ? $zones[$tz] : 0; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('date_range')) +{ + /** + * Date range + * + * Returns a list of dates within a specified period. + * + * @param int unix_start UNIX timestamp of period start date + * @param int unix_end|days UNIX timestamp of period end date + * or interval in days. + * @param mixed is_unix Specifies whether the second parameter + * is a UNIX timestamp or a day interval + * - TRUE or 'unix' for a timestamp + * - FALSE or 'days' for an interval + * @param string date_format Output date format, same as in date() + * @return array + */ + function date_range($unix_start = '', $mixed = '', $is_unix = TRUE, $format = 'Y-m-d') + { + if ($unix_start == '' OR $mixed == '' OR $format == '') + { + return FALSE; + } + + $is_unix = ! ( ! $is_unix OR $is_unix === 'days'); + + // Validate input and try strtotime() on invalid timestamps/intervals, just in case + if ( ( ! ctype_digit((string) $unix_start) && ($unix_start = @strtotime($unix_start)) === FALSE) + OR ( ! ctype_digit((string) $mixed) && ($is_unix === FALSE OR ($mixed = @strtotime($mixed)) === FALSE)) + OR ($is_unix === TRUE && $mixed < $unix_start)) + { + return FALSE; + } + + if ($is_unix && ($unix_start == $mixed OR date($format, $unix_start) === date($format, $mixed))) + { + return array(date($format, $unix_start)); + } + + $range = array(); + + $from = new DateTime(); + $from->setTimestamp($unix_start); + + if ($is_unix) + { + $arg = new DateTime(); + $arg->setTimestamp($mixed); + } + else + { + $arg = (int) $mixed; + } + + $period = new DatePeriod($from, new DateInterval('P1D'), $arg); + foreach ($period as $date) + { + $range[] = $date->format($format); + } + + /* If a period end date was passed to the DatePeriod constructor, it might not + * be in our results. Not sure if this is a bug or it's just possible because + * the end date might actually be less than 24 hours away from the previously + * generated DateTime object, but either way - we have to append it manually. + */ + if ( ! is_int($arg) && $range[count($range) - 1] !== $arg->format($format)) + { + $range[] = $arg->format($format); + } + + return $range; + } +} diff --git a/donjo-sys/helpers/directory_helper.php b/donjo-sys/helpers/directory_helper.php new file mode 100644 index 000000000..d747a96b2 --- /dev/null +++ b/donjo-sys/helpers/directory_helper.php @@ -0,0 +1,102 @@ + 0) && is_dir($source_dir.$file)) + { + $filedata[$file] = directory_map($source_dir.$file, $new_depth, $hidden); + } + else + { + $filedata[] = $file; + } + } + + closedir($fp); + return $filedata; + } + + return FALSE; + } +} diff --git a/donjo-sys/helpers/download_helper.php b/donjo-sys/helpers/download_helper.php new file mode 100644 index 000000000..9b361c4bd --- /dev/null +++ b/donjo-sys/helpers/download_helper.php @@ -0,0 +1,159 @@ + 0) + ? @rmdir($path) + : TRUE; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('get_filenames')) +{ + /** + * Get Filenames + * + * Reads the specified directory and builds an array containing the filenames. + * Any sub-folders contained within the specified path are read as well. + * + * @param string path to source + * @param bool whether to include the path as part of the filename + * @param bool internal variable to determine recursion status - do not use in calls + * @return array + */ + function get_filenames($source_dir, $include_path = FALSE, $_recursion = FALSE) + { + static $_filedata = array(); + + if ($fp = @opendir($source_dir)) + { + // reset the array and make sure $source_dir has a trailing slash on the initial call + if ($_recursion === FALSE) + { + $_filedata = array(); + $source_dir = rtrim(realpath($source_dir), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; + } + + while (FALSE !== ($file = readdir($fp))) + { + if (is_dir($source_dir.$file) && $file[0] !== '.') + { + get_filenames($source_dir.$file.DIRECTORY_SEPARATOR, $include_path, TRUE); + } + elseif ($file[0] !== '.') + { + $_filedata[] = ($include_path === TRUE) ? $source_dir.$file : $file; + } + } + + closedir($fp); + return $_filedata; + } + + return FALSE; + } +} + +// -------------------------------------------------------------------- + +if ( ! function_exists('get_dir_file_info')) +{ + /** + * Get Directory File Information + * + * Reads the specified directory and builds an array containing the filenames, + * filesize, dates, and permissions + * + * Any sub-folders contained within the specified path are read as well. + * + * @param string path to source + * @param bool Look only at the top level directory specified? + * @param bool internal variable to determine recursion status - do not use in calls + * @return array + */ + function get_dir_file_info($source_dir, $top_level_only = TRUE, $_recursion = FALSE) + { + static $_filedata = array(); + $relative_path = $source_dir; + + if ($fp = @opendir($source_dir)) + { + // reset the array and make sure $source_dir has a trailing slash on the initial call + if ($_recursion === FALSE) + { + $_filedata = array(); + $source_dir = rtrim(realpath($source_dir), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; + } + + // Used to be foreach (scandir($source_dir, 1) as $file), but scandir() is simply not as fast + while (FALSE !== ($file = readdir($fp))) + { + if (is_dir($source_dir.$file) && $file[0] !== '.' && $top_level_only === FALSE) + { + get_dir_file_info($source_dir.$file.DIRECTORY_SEPARATOR, $top_level_only, TRUE); + } + elseif ($file[0] !== '.') + { + $_filedata[$file] = get_file_info($source_dir.$file); + $_filedata[$file]['relative_path'] = $relative_path; + } + } + + closedir($fp); + return $_filedata; + } + + return FALSE; + } +} + +// -------------------------------------------------------------------- + +if ( ! function_exists('get_file_info')) +{ + /** + * Get File Info + * + * Given a file and path, returns the name, path, size, date modified + * Second parameter allows you to explicitly declare what information you want returned + * Options are: name, server_path, size, date, readable, writable, executable, fileperms + * Returns FALSE if the file cannot be found. + * + * @param string path to file + * @param mixed array or comma separated string of information returned + * @return array + */ + function get_file_info($file, $returned_values = array('name', 'server_path', 'size', 'date')) + { + if ( ! file_exists($file)) + { + return FALSE; + } + + if (is_string($returned_values)) + { + $returned_values = explode(',', $returned_values); + } + + foreach ($returned_values as $key) + { + switch ($key) + { + case 'name': + $fileinfo['name'] = basename($file); + break; + case 'server_path': + $fileinfo['server_path'] = $file; + break; + case 'size': + $fileinfo['size'] = filesize($file); + break; + case 'date': + $fileinfo['date'] = filemtime($file); + break; + case 'readable': + $fileinfo['readable'] = is_readable($file); + break; + case 'writable': + $fileinfo['writable'] = is_really_writable($file); + break; + case 'executable': + $fileinfo['executable'] = is_executable($file); + break; + case 'fileperms': + $fileinfo['fileperms'] = fileperms($file); + break; + } + } + + return $fileinfo; + } +} + +// -------------------------------------------------------------------- + +if ( ! function_exists('get_mime_by_extension')) +{ + /** + * Get Mime by Extension + * + * Translates a file extension into a mime type based on config/mimes.php. + * Returns FALSE if it can't determine the type, or open the mime config file + * + * Note: this is NOT an accurate way of determining file mime types, and is here strictly as a convenience + * It should NOT be trusted, and should certainly NOT be used for security + * + * @param string $filename File name + * @return string + */ + function get_mime_by_extension($filename) + { + static $mimes; + + if ( ! is_array($mimes)) + { + $mimes = get_mimes(); + + if (empty($mimes)) + { + return FALSE; + } + } + + $extension = strtolower(substr(strrchr($filename, '.'), 1)); + + if (isset($mimes[$extension])) + { + return is_array($mimes[$extension]) + ? current($mimes[$extension]) // Multiple mime types, just give the first one + : $mimes[$extension]; + } + + return FALSE; + } +} + +// -------------------------------------------------------------------- + +if ( ! function_exists('symbolic_permissions')) +{ + /** + * Symbolic Permissions + * + * Takes a numeric value representing a file's permissions and returns + * standard symbolic notation representing that value + * + * @param int $perms Permissions + * @return string + */ + function symbolic_permissions($perms) + { + if (($perms & 0xC000) === 0xC000) + { + $symbolic = 's'; // Socket + } + elseif (($perms & 0xA000) === 0xA000) + { + $symbolic = 'l'; // Symbolic Link + } + elseif (($perms & 0x8000) === 0x8000) + { + $symbolic = '-'; // Regular + } + elseif (($perms & 0x6000) === 0x6000) + { + $symbolic = 'b'; // Block special + } + elseif (($perms & 0x4000) === 0x4000) + { + $symbolic = 'd'; // Directory + } + elseif (($perms & 0x2000) === 0x2000) + { + $symbolic = 'c'; // Character special + } + elseif (($perms & 0x1000) === 0x1000) + { + $symbolic = 'p'; // FIFO pipe + } + else + { + $symbolic = 'u'; // Unknown + } + + // Owner + $symbolic .= (($perms & 0x0100) ? 'r' : '-') + .(($perms & 0x0080) ? 'w' : '-') + .(($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); + + // Group + $symbolic .= (($perms & 0x0020) ? 'r' : '-') + .(($perms & 0x0010) ? 'w' : '-') + .(($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); + + // World + $symbolic .= (($perms & 0x0004) ? 'r' : '-') + .(($perms & 0x0002) ? 'w' : '-') + .(($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); + + return $symbolic; + } +} + +// -------------------------------------------------------------------- + +if ( ! function_exists('octal_permissions')) +{ + /** + * Octal Permissions + * + * Takes a numeric value representing a file's permissions and returns + * a three character string representing the file's octal permissions + * + * @param int $perms Permissions + * @return string + */ + function octal_permissions($perms) + { + return substr(sprintf('%o', $perms), -3); + } +} diff --git a/donjo-sys/helpers/form_helper.php b/donjo-sys/helpers/form_helper.php new file mode 100644 index 000000000..ba74ff5ef --- /dev/null +++ b/donjo-sys/helpers/form_helper.php @@ -0,0 +1,1056 @@ +config->site_url($CI->uri->uri_string()); + } + // If an action is not a full URL then turn it into one + elseif (strpos($action, '://') === FALSE) + { + $action = $CI->config->site_url($action); + } + + $attributes = _attributes_to_string($attributes); + + if (stripos($attributes, 'method=') === FALSE) + { + $attributes .= ' method="post"'; + } + + if (stripos($attributes, 'accept-charset=') === FALSE) + { + $attributes .= ' accept-charset="'.strtolower(config_item('charset')).'"'; + } + + $form = '
\n"; + + if (is_array($hidden)) + { + foreach ($hidden as $name => $value) + { + $form .= ''."\n"; + } + } + + // Add CSRF field if enabled, but leave it out for GET requests and requests to external websites + if ($CI->config->item('csrf_protection') === TRUE && strpos($action, $CI->config->base_url()) !== FALSE && ! stripos($form, 'method="get"')) + { + // Prepend/append random-length "white noise" around the CSRF + // token input, as a form of protection against BREACH attacks + if (FALSE !== ($noise = $CI->security->get_random_bytes(1))) + { + list(, $noise) = unpack('c', $noise); + } + else + { + $noise = mt_rand(-128, 127); + } + + // Prepend if $noise has a negative value, append if positive, do nothing for zero + $prepend = $append = ''; + if ($noise < 0) + { + $prepend = str_repeat(" ", abs($noise)); + } + elseif ($noise > 0) + { + $append = str_repeat(" ", $noise); + } + + $form .= sprintf( + '%s%s%s', + $prepend, + $CI->security->get_csrf_token_name(), + $CI->security->get_csrf_hash(), + $append, + "\n" + ); + } + + return $form; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_open_multipart')) +{ + /** + * Form Declaration - Multipart type + * + * Creates the opening portion of the form, but with "multipart/form-data". + * + * @param string the URI segments of the form destination + * @param array a key/value pair of attributes + * @param array a key/value pair hidden data + * @return string + */ + function form_open_multipart($action = '', $attributes = array(), $hidden = array()) + { + if (is_string($attributes)) + { + $attributes .= ' enctype="multipart/form-data"'; + } + else + { + $attributes['enctype'] = 'multipart/form-data'; + } + + return form_open($action, $attributes, $hidden); + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_hidden')) +{ + /** + * Hidden Input Field + * + * Generates hidden fields. You can pass a simple key/value string or + * an associative array with multiple values. + * + * @param mixed $name Field name + * @param string $value Field value + * @param bool $recursing + * @return string + */ + function form_hidden($name, $value = '', $recursing = FALSE) + { + static $form; + + if ($recursing === FALSE) + { + $form = "\n"; + } + + if (is_array($name)) + { + foreach ($name as $key => $val) + { + form_hidden($key, $val, TRUE); + } + + return $form; + } + + if ( ! is_array($value)) + { + $form .= '\n"; + } + else + { + foreach ($value as $k => $v) + { + $k = is_int($k) ? '' : $k; + form_hidden($name.'['.$k.']', $v, TRUE); + } + } + + return $form; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_input')) +{ + /** + * Text Input Field + * + * @param mixed + * @param string + * @param mixed + * @return string + */ + function form_input($data = '', $value = '', $extra = '') + { + $defaults = array( + 'type' => 'text', + 'name' => is_array($data) ? '' : $data, + 'value' => $value + ); + + return '\n"; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_password')) +{ + /** + * Password Field + * + * Identical to the input function but adds the "password" type + * + * @param mixed + * @param string + * @param mixed + * @return string + */ + function form_password($data = '', $value = '', $extra = '') + { + is_array($data) OR $data = array('name' => $data); + $data['type'] = 'password'; + return form_input($data, $value, $extra); + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_upload')) +{ + /** + * Upload Field + * + * Identical to the input function but adds the "file" type + * + * @param mixed + * @param string + * @param mixed + * @return string + */ + function form_upload($data = '', $value = '', $extra = '') + { + $defaults = array('type' => 'file', 'name' => ''); + is_array($data) OR $data = array('name' => $data); + $data['type'] = 'file'; + + return '\n"; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_textarea')) +{ + /** + * Textarea field + * + * @param mixed $data + * @param string $value + * @param mixed $extra + * @return string + */ + function form_textarea($data = '', $value = '', $extra = '') + { + $defaults = array( + 'name' => is_array($data) ? '' : $data, + 'cols' => '40', + 'rows' => '10' + ); + + if ( ! is_array($data) OR ! isset($data['value'])) + { + $val = $value; + } + else + { + $val = $data['value']; + unset($data['value']); // textareas don't use the value attribute + } + + return '\n"; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_multiselect')) +{ + /** + * Multi-select menu + * + * @param string + * @param array + * @param mixed + * @param mixed + * @return string + */ + function form_multiselect($name = '', $options = array(), $selected = array(), $extra = '') + { + $extra = _attributes_to_string($extra); + if (stripos($extra, 'multiple') === FALSE) + { + $extra .= ' multiple="multiple"'; + } + + return form_dropdown($name, $options, $selected, $extra); + } +} + +// -------------------------------------------------------------------- + +if ( ! function_exists('form_dropdown')) +{ + /** + * Drop-down Menu + * + * @param mixed $data + * @param mixed $options + * @param mixed $selected + * @param mixed $extra + * @return string + */ + function form_dropdown($data = '', $options = array(), $selected = array(), $extra = '') + { + $defaults = array(); + + if (is_array($data)) + { + if (isset($data['selected'])) + { + $selected = $data['selected']; + unset($data['selected']); // select tags don't have a selected attribute + } + + if (isset($data['options'])) + { + $options = $data['options']; + unset($data['options']); // select tags don't use an options attribute + } + } + else + { + $defaults = array('name' => $data); + } + + is_array($selected) OR $selected = array($selected); + is_array($options) OR $options = array($options); + + // If no selected state was submitted we will attempt to set it automatically + if (empty($selected)) + { + if (is_array($data)) + { + if (isset($data['name'], $_POST[$data['name']])) + { + $selected = array($_POST[$data['name']]); + } + } + elseif (isset($_POST[$data])) + { + $selected = array($_POST[$data]); + } + } + + $extra = _attributes_to_string($extra); + + $multiple = (count($selected) > 1 && stripos($extra, 'multiple') === FALSE) ? ' multiple="multiple"' : ''; + + $form = '\n"; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_checkbox')) +{ + /** + * Checkbox Field + * + * @param mixed + * @param string + * @param bool + * @param mixed + * @return string + */ + function form_checkbox($data = '', $value = '', $checked = FALSE, $extra = '') + { + $defaults = array('type' => 'checkbox', 'name' => ( ! is_array($data) ? $data : ''), 'value' => $value); + + if (is_array($data) && array_key_exists('checked', $data)) + { + $checked = $data['checked']; + + if ($checked == FALSE) + { + unset($data['checked']); + } + else + { + $data['checked'] = 'checked'; + } + } + + if ($checked == TRUE) + { + $defaults['checked'] = 'checked'; + } + else + { + unset($defaults['checked']); + } + + return '\n"; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_radio')) +{ + /** + * Radio Button + * + * @param mixed + * @param string + * @param bool + * @param mixed + * @return string + */ + function form_radio($data = '', $value = '', $checked = FALSE, $extra = '') + { + is_array($data) OR $data = array('name' => $data); + $data['type'] = 'radio'; + + return form_checkbox($data, $value, $checked, $extra); + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_submit')) +{ + /** + * Submit Button + * + * @param mixed + * @param string + * @param mixed + * @return string + */ + function form_submit($data = '', $value = '', $extra = '') + { + $defaults = array( + 'type' => 'submit', + 'name' => is_array($data) ? '' : $data, + 'value' => $value + ); + + return '\n"; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_reset')) +{ + /** + * Reset Button + * + * @param mixed + * @param string + * @param mixed + * @return string + */ + function form_reset($data = '', $value = '', $extra = '') + { + $defaults = array( + 'type' => 'reset', + 'name' => is_array($data) ? '' : $data, + 'value' => $value + ); + + return '\n"; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_button')) +{ + /** + * Form Button + * + * @param mixed + * @param string + * @param mixed + * @return string + */ + function form_button($data = '', $content = '', $extra = '') + { + $defaults = array( + 'name' => is_array($data) ? '' : $data, + 'type' => 'button' + ); + + if (is_array($data) && isset($data['content'])) + { + $content = $data['content']; + unset($data['content']); // content is not an attribute + } + + return '\n"; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_label')) +{ + /** + * Form Label Tag + * + * @param string The text to appear onscreen + * @param string The id the label applies to + * @param mixed Additional attributes + * @return string + */ + function form_label($label_text = '', $id = '', $attributes = array()) + { + + $label = ''.$label_text.''; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_fieldset')) +{ + /** + * Fieldset Tag + * + * Used to produce
text. To close fieldset + * use form_fieldset_close() + * + * @param string The legend text + * @param array Additional attributes + * @return string + */ + function form_fieldset($legend_text = '', $attributes = array()) + { + $fieldset = '\n"; + if ($legend_text !== '') + { + return $fieldset.''.$legend_text."\n"; + } + + return $fieldset; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_fieldset_close')) +{ + /** + * Fieldset Close Tag + * + * @param string + * @return string + */ + function form_fieldset_close($extra = '') + { + return '
'.$extra; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_close')) +{ + /** + * Form Close Tag + * + * @param string + * @return string + */ + function form_close($extra = '') + { + return ''.$extra; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('form_prep')) +{ + /** + * Form Prep + * + * Formats text so that it can be safely placed in a form field in the event it has HTML tags. + * + * @deprecated 3.0.0 An alias for html_escape() + * @param string|string[] $str Value to escape + * @return string|string[] Escaped values + */ + function form_prep($str) + { + return html_escape($str, TRUE); + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('set_value')) +{ + /** + * Form Value + * + * Grabs a value from the POST array for the specified field so you can + * re-populate an input field or textarea. If Form Validation + * is active it retrieves the info from the validation class + * + * @param string $field Field name + * @param string $default Default value + * @param bool $html_escape Whether to escape HTML special characters or not + * @return string + */ + function set_value($field, $default = '', $html_escape = TRUE) + { + $CI =& get_instance(); + + $value = (isset($CI->form_validation) && is_object($CI->form_validation) && $CI->form_validation->has_rule($field)) + ? $CI->form_validation->set_value($field, $default) + : $CI->input->post($field, FALSE); + + isset($value) OR $value = $default; + return ($html_escape) ? html_escape($value) : $value; + } +} + +// ------------------------------------------------------------------------ + +if ( ! function_exists('set_select')) +{ + /** + * Set Select + * + * Let's you set the selected value of a - "; - foreach($rw as $data){ - echo ""; - }echo" - "; - } - function ajax_penduduk_pindah_rt($dusun='',$rw=''){ - $rt = $this->penduduk_model->list_rt($dusun,$rw); - - echo "RT - - "; - } - function statistik($tipe=0,$nomor=0,$p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - $data['tipe'] = $tipe; - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_SESSION['raskin'])) - $data['raskin'] = $_SESSION['raskin']; - else $data['raskin'] = ''; - if(isset($_SESSION['id_blt'])) - $data['id_blt'] = $_SESSION['id_blt']; - else $data['id_blt'] = ''; - - if(isset($_SESSION['id_bos'])) - $data['id_bos'] = $_SESSION['id_bos']; - else $data['id_bos'] = ''; - - if(isset($_SESSION['id_pkh'])) - $data['id_pkh'] = $_SESSION['id_pkh']; - else $data['id_pkh'] = ''; - - if(isset($_SESSION['id_jampersal'])) - $data['id_jampersal'] = $_SESSION['id_jampersal']; - else $data['id_jampersal'] = ''; - if(isset($_SESSION['id_bedah_rumah'])) - $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; - else $data['id_bedah_rumah'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - if(isset($_SESSION['dusun'])){ - $data['dusun'] = $_SESSION['dusun']; - $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); - - if(isset($_SESSION['rw'])){ - $data['rw'] = $_SESSION['rw']; - $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); - - if(isset($_SESSION['rt'])) - $data['rt'] = $_SESSION['rt']; - else $data['rt'] = ''; - - }else $data['rw'] = ''; - - }else{ - $data['dusun'] = ''; - $data['rw'] = ''; - $data['rt'] = ''; - } - switch($tipe){ - - case 21: $_SESSION['kelas'] = $nomor; $pre="KELAS SOSIAL : ";break; - case 22: $_SESSION['raskin'] = $nomor; $pre="RASKIN : ";break; - case 23: $_SESSION['id_blt'] = $nomor; $pre="BLT : ";break; - case 24: $_SESSION['id_bos'] = $nomor; $pre="BOS : ";break; - case 25: $_SESSION['id_pkh'] = $nomor; $pre="PKH : ";break; - case 26: $_SESSION['id_jampersal'] = $nomor; $pre="JAMPERSAL : ";break; - case 27: $_SESSION['id_bedah_rumah'] = $nomor;$pre="BEDAH RUMAH : "; break; - } - $data['grup'] = $this->user_model->sesi_grup($_SESSION['sesi']); - $data['paging'] = $this->keluarga_model->paging_statistik($p,$o); - $data['main'] = $this->keluarga_model->list_data_statistik($tipe,$o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->keluarga_model->autocomplete(); - $data['list_dusun'] = $this->penduduk_model->list_dusun(); - $judul= $this->keluarga_model->get_judul_statistik($tipe,$nomor); - if($judul['nama']){ - $_SESSION['judul_statistik']=$pre.$judul['nama']; - }else{ - unset($_SESSION['judul_statistik']); - } - $nav['act']= 1; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/kependudukan/keluarga_statistik',$data); - $this->load->view('footer'); - //redirect('keluarga'); - } - function cetak_statistik($tipe=0){ - $data['main'] = $this->keluarga_model->list_data_statistik($tipe); - $this->load->view('sid/kependudukan/keluarga_print',$data); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/komentar.php b/donjo-app/controllers/komentar.php deleted file mode 100644 index e96f196cb..000000000 --- a/donjo-app/controllers/komentar.php +++ /dev/null @@ -1,105 +0,0 @@ -load->model('user_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); - $this->load->model('header_model'); - $this->load->model('web_komentar_model'); - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - redirect('komentar'); - } - function index($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->web_komentar_model->paging($p,$o); - $data['main'] = $this->web_komentar_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->web_komentar_model->autocomplete(); - $header = $this->header_model->get_data(); - $nav['act']=2; - - $this->load->view('header', $header); - $this->load->view('web/nav',$nav); - $this->load->view('komentar/table',$data); - $this->load->view('footer'); - } - function form($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - - if($id){ - $data['komentar'] = $this->web_komentar_model->get_komentar($id); - $data['form_action'] = site_url("komentar/update/$id/$p/$o"); - } - else{ - $data['komentar'] = null; - $data['form_action'] = site_url("komentar/insert"); - } - - $data['list_kategori'] = $this->web_komentar_model->list_kategori(1); - - $header = $this->header_model->get_data(); - - $nav['act']=2; - $this->load->view('header', $header); - $this->load->view('web/spacer'); - $this->load->view('web/nav',$nav); - $this->load->view('komentar/form',$data); - $this->load->view('footer'); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('komentar'); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!=0) - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('komentar'); - } - function insert(){ - $this->web_komentar_model->insert(); - redirect('komentar'); - } - function update($id='',$p=1,$o=0){ - $this->web_komentar_model->update($id); - redirect("komentar/index/$p/$o"); - } - function delete($p=1,$o=0,$id=''){ - $this->web_komentar_model->delete($id); - redirect("komentar/index/$p/$o"); - } - function delete_all($p=1,$o=0){ - $this->web_komentar_model->delete_all(); - redirect("komentar/index/$p/$o"); - } - function komentar_lock($id=''){ - $this->web_komentar_model->komentar_lock($id,1); - redirect("komentar/index/$p/$o"); - } - function komentar_unlock($id=''){ - $this->web_komentar_model->komentar_lock($id,2); - redirect("komentar/index/$p/$o"); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/lapor.php b/donjo-app/controllers/lapor.php deleted file mode 100644 index 9cf9991a2..000000000 --- a/donjo-app/controllers/lapor.php +++ /dev/null @@ -1,105 +0,0 @@ -load->model('user_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); - $this->load->model('header_model'); - $this->load->model('web_komentar_model'); - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - redirect('lapor'); - } - function index($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->web_komentar_model->paging($p,$o); - $data['main'] = $this->web_komentar_model->list_data($o, $data['paging']->offset, $data['paging']->per_page,2); - $data['keyword'] = $this->web_komentar_model->autocomplete(); - $header = $this->header_model->get_data(); - $nav['act']=0; - - $this->load->view('header', $header); - $this->load->view('lapor/nav',$nav); - $this->load->view('lapor/table',$data); - $this->load->view('footer'); - } - function form($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - - if($id){ - $data['komentar'] = $this->web_komentar_model->get_komentar($id); - $data['form_action'] = site_url("komentar/update/$id/$p/$o"); - } - else{ - $data['komentar'] = null; - $data['form_action'] = site_url("komentar/insert"); - } - - $data['list_kategori'] = $this->web_komentar_model->list_kategori(1); - - $header = $this->header_model->get_data(); - - $nav['act']=2; - $this->load->view('header', $header); - $this->load->view('web/spacer'); - $this->load->view('web/nav',$nav); - $this->load->view('lapor/form',$data); - $this->load->view('footer'); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('lapor'); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!=0) - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('lapor'); - } - function insert(){ - $this->web_komentar_model->insert(); - redirect('lapor'); - } - function update($id='',$p=1,$o=0){ - $this->web_komentar_model->update($id); - redirect("lapor/index/$p/$o"); - } - function delete($p=1,$o=0,$id=''){ - $this->web_komentar_model->delete($id); - redirect("lapor/index/$p/$o"); - } - function delete_all($p=1,$o=0){ - $this->web_komentar_model->delete_all(); - redirect("lapor/index/$p/$o"); - } - function komentar_lock($id=''){ - $this->web_komentar_model->komentar_lock($id,1); - redirect("lapor/index/$p/$o"); - } - function komentar_unlock($id=''){ - $this->web_komentar_model->komentar_lock($id,2); - redirect("lapor/index/$p/$o"); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/laporan.php b/donjo-app/controllers/laporan.php deleted file mode 100644 index bf826e57c..000000000 --- a/donjo-app/controllers/laporan.php +++ /dev/null @@ -1,114 +0,0 @@ -load->model('user_model'); - $this->load->model('laporan_bulanan_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); - $this->load->model('header_model'); - - $_SESSION['success'] = 0; - $_SESSION['cari'] = ''; - - $this->load->model('header_model'); - } - - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - unset($_SESSION['sex']); - unset($_SESSION['dusun']); - unset($_SESSION['rw']); - unset($_SESSION['rt']); - unset($_SESSION['agama']); - unset($_SESSION['umur_min']); - unset($_SESSION['umur_max']); - unset($_SESSION['pekerjaan_id']); - unset($_SESSION['status']); - unset($_SESSION['pendidikan_id']); - unset($_SESSION['status_penduduk']); - $_SESSION['bulanku']=date("n"); - $_SESSION['tahunku']=date("Y"); - $_SESSION['per_page'] = 200; - redirect('laporan'); - } - function index($lap=0,$p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - if(isset($_SESSION['bulanku'])) - $data['bulanku'] = $_SESSION['bulanku']; - else $data['bulanku'] = date("n"); - - if(isset($_SESSION['tahunku'])) - $data['tahunku'] = $_SESSION['tahunku']; - else $data['tahunku'] = date("Y"); - - $data['bulan']=$data['bulanku']; - $data['tahun']=$data['tahunku']; - $data['config'] = $this->laporan_bulanan_model->configku(); - $data['penduduk_awal'] = $this->laporan_bulanan_model->penduduk_awal(); - $data['penduduk_akhir'] = $this->laporan_bulanan_model->penduduk_akhir(); - $data['kelahiran'] = $this->laporan_bulanan_model->kelahiran(); - $data['kematian'] = $this->laporan_bulanan_model->kematian(); - $data['pendatang'] = $this->laporan_bulanan_model->pendatang(); - $data['pindah'] = $this->laporan_bulanan_model->pindah(); - $data['hilang'] = $this->laporan_bulanan_model->hilang(); - $data['lap']=$lap; - $nav['act']= 3; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('statistik/nav',$nav); - $this->load->view('laporan/bulanan',$data); - $this->load->view('footer'); - - - } - function cetak($lap=0){ - $data['config'] = $this->laporan_bulanan_model->configku(); - $data['bulan']=$_SESSION['bulanku']; - $data['tahun']=$_SESSION['tahunku']; - $data['bln'] = $this->laporan_bulanan_model->bulan($data['bulan']); - $data['penduduk_awal'] = $this->laporan_bulanan_model->penduduk_awal(); - $data['penduduk_akhir'] = $this->laporan_bulanan_model->penduduk_akhir(); - $data['kelahiran'] = $this->laporan_bulanan_model->kelahiran(); - $data['kematian'] = $this->laporan_bulanan_model->kematian(); - $data['pendatang'] = $this->laporan_bulanan_model->pendatang(); - $data['pindah'] = $this->laporan_bulanan_model->pindah(); - $data['hilang'] = $this->laporan_bulanan_model->hilang(); - $data['lap']=$lap; - $this->load->view('laporan/bulanan_print',$data); - } - function excel($lap=0){ - $data['config'] = $this->laporan_bulanan_model->configku(); - $data['bulan']=$_SESSION['bulanku']; - $data['tahun']=$_SESSION['tahunku']; - $data['bln'] = $this->laporan_bulanan_model->bulan($data['bulan']); - $data['penduduk_awal'] = $this->laporan_bulanan_model->penduduk_awal(); - $data['penduduk_akhir'] = $this->laporan_bulanan_model->penduduk_akhir(); - $data['kelahiran'] = $this->laporan_bulanan_model->kelahiran(); - $data['kematian'] = $this->laporan_bulanan_model->kematian(); - $data['pendatang'] = $this->laporan_bulanan_model->pendatang(); - $data['pindah'] = $this->laporan_bulanan_model->pindah(); - $data['hilang'] = $this->laporan_bulanan_model->hilang(); - $data['lap']=$lap; - $this->load->view('statistik/laporan/bulanan_excel',$data); - } - function bulan(){ - $bulanku= $this->input->post('bulan'); - if($bulanku!="") - $_SESSION['bulanku']=$bulanku; - else unset($_SESSION['bulanku']); - - $tahunku= $this->input->post('tahun'); - if($tahunku!="") - $_SESSION['tahunku']=$tahunku; - else unset($_SESSION['tahunku']); - redirect('laporan'); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/laporan_rentan.php b/donjo-app/controllers/laporan_rentan.php deleted file mode 100644 index 86092a57e..000000000 --- a/donjo-app/controllers/laporan_rentan.php +++ /dev/null @@ -1,64 +0,0 @@ -load->model('user_model'); - $this->load->model('laporan_bulanan_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); - $this->load->model('header_model'); - - - $_SESSION['success'] = 0; - $_SESSION['per_page'] = 20; - $_SESSION['cari'] = ''; - - - $this->load->model('header_model'); - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - unset($_SESSION['dusun']); - unset($_SESSION['rw']); - unset($_SESSION['rt']); - redirect('laporan_rentan'); - } - function index(){ - if(isset($_SESSION['dusun'])) - $data['dusun'] = $_SESSION['dusun']; - else $data['dusun'] = ''; - - $data['list_dusun'] = $this->laporan_bulanan_model->list_dusun(); - $data['config'] = $this->laporan_bulanan_model->configku(); - - $data['main'] = $this->laporan_bulanan_model->list_data(); - - $nav['act']= 2; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('statistik/nav',$nav); - $this->load->view('laporan/kelompok',$data); - $this->load->view('footer'); - } - - function cetak(){ - $data['config'] = $this->laporan_bulanan_model->configku(); - $data['main'] = $this->laporan_bulanan_model->list_data(); - $this->load->view('laporan/kelompok_print',$data); - } - function excel(){ - $data['config'] = $this->laporan_bulanan_model->configku(); - $data['main'] = $this->laporan_bulanan_model->list_data(); - $this->load->view('laporan/kelompok_excel',$data); - } - - function dusun(){ - $dusun = $this->input->post('dusun'); - if($dusun!="") - $_SESSION['dusun']=$dusun; - else unset($_SESSION['dusun']); - redirect('laporan_rentan'); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/line.php b/donjo-app/controllers/line.php deleted file mode 100644 index 22bb4aab8..000000000 --- a/donjo-app/controllers/line.php +++ /dev/null @@ -1,162 +0,0 @@ -load->model('user_model'); - - $this->load->model('header_model'); - $this->load->model('plan_line_model'); - - - $this->load->database(); - - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - redirect('line'); - } - function index($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->plan_line_model->paging($p,$o); - $data['main'] = $this->plan_line_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->plan_line_model->autocomplete(); - $header = $this->header_model->get_data(); - $nav['act']=2; - - $this->load->view('header-gis', $header); - - $this->load->view('plan/nav',$nav); - $this->load->view('line/table',$data); - $this->load->view('footer'); - - } - function form($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - - - - if($id){ - $data['line'] = $this->plan_line_model->get_line($id); - $data['form_action'] = site_url("line/update/$id/$p/$o"); - } - else{ - $data['line'] = null; - $data['form_action'] = site_url("line/insert"); - } - $header= $this->header_model->get_data(); - - $nav['act']=2; - $this->load->view('header-gis', $header); - - $this->load->view('plan/nav',$nav); - $this->load->view('line/form',$data); - $this->load->view('footer'); - - } - function sub_line($line=1){ - $data['subline'] = $this->plan_line_model->list_sub_line($line); - $data['line'] = $line; - $header= $this->header_model->get_data(); - $nav['act']=2; - - $this->load->view('header-gis', $header); - - $this->load->view('plan/nav',$nav); - $this->load->view('line/sub_line_table',$data); - $this->load->view('footer'); - - } - function ajax_add_sub_line($line=0,$id=0){ - - - - - if($id){ - $data['line'] = $this->plan_line_model->get_line($id); - $data['form_action'] = site_url("line/update_sub_line/$line/$id"); - } - else{ - $data['line'] = null; - $data['form_action'] = site_url("line/insert_sub_line/$line"); - } - $this->load->view("line/ajax_add_sub_line_form",$data); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('line'); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!=0) - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('line'); - } - function insert($tip=1){ - $this->plan_line_model->insert($tip); - redirect("line/index/$tip"); - } - function update($id='',$p=1,$o=0){ - $this->plan_line_model->update($id); - redirect("line/index/$p/$o"); - } - function delete($p=1,$o=0,$id=''){ - $this->plan_line_model->delete($id); - redirect("line/index/$p/$o"); - } - function delete_all($p=1,$o=0){ - $this->plan_line_model->delete_all(); - redirect("line/index/$p/$o"); - } - function line_lock($id=''){ - $this->plan_line_model->line_lock($id,1); - redirect("line/index/$p/$o"); - } - function line_unlock($id=''){ - $this->plan_line_model->line_lock($id,2); - redirect("line/index/$p/$o"); - } - function insert_sub_line($line=''){ - $this->plan_line_model->insert_sub_line($line); - redirect("line/sub_line/$line"); - } - function update_sub_line($line='',$id=''){ - $this->plan_line_model->update_sub_line($id); - redirect("line/sub_line/$line"); - } - function delete_sub_line($line='',$id=''){ - $this->plan_line_model->delete_sub_line($id); - redirect("line/sub_line/$line"); - } - function delete_all_sub_line($line=''){ - $this->plan_line_model->delete_all_sub_line(); - redirect("line/sub_line/$line"); - } - function line_lock_sub_line($line='',$id=''){ - $this->plan_line_model->line_lock($id,1); - redirect("line/sub_line/$line"); - } - function line_unlock_sub_line($line='',$id=''){ - $this->plan_line_model->line_lock($id,2); - redirect("line/sub_line/$line"); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/main.php b/donjo-app/controllers/main.php deleted file mode 100644 index 9939e152c..000000000 --- a/donjo-app/controllers/main.php +++ /dev/null @@ -1,53 +0,0 @@ -load->model('header_model'); - $this->load->model('user_model'); - $this->load->model('config_model'); - } - function index(){ - $out = $this->config_model->install(); - if($out == 1){ - if(isset($_SESSION['siteman'])){ - $this->load->model('user_model'); - if(isset($_SESSION['sesi'])){ - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - switch($grup){ - case 1: redirect('hom_desa'); break; - case 2: redirect('hom_desa'); break; - case 3: redirect('web'); break; - case 4: redirect('web'); break; - default:if(isset($_SESSION['siteman'])){redirect('siteman');}else{redirect('first');} - } - } - }else{ - redirect('first'); - } - }else{ - redirect('main/initial'); - } - } - function initial(){ - $this->load->view('install'); - } - function install(){ - $out = $this->config_model->initial(); - $this->load->view('init',$out); - } - function init($out=null){ - $this->load->view('init',$out); - } - function auth(){ - $this->user_model->login(); - $header = $this->header_model->get_config(); - $this->load->view('siteman',$header); - } - function logout(){ - $this->config_model->opt(); - $this->user_model->logout(); - $header = $this->header_model->get_config(); - $this->load->view('siteman',$header); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/man_user.php b/donjo-app/controllers/man_user.php deleted file mode 100644 index 58b9bdb12..000000000 --- a/donjo-app/controllers/man_user.php +++ /dev/null @@ -1,102 +0,0 @@ -load->model('user_model'); - $this->load->model('header_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1) redirect('siteman'); - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - redirect('man_user'); - } - function index($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->user_model->paging($p,$o); - $data['main'] = $this->user_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->user_model->autocomplete(); - $header = $this->header_model->get_data(); - $menu['act']='man_user'; - - $this->load->view('header', $header); - $this->load->view('man_user/nav'); - $this->load->view('man_user/manajemen_user_table',$data); - $this->load->view('footer'); - } - function form($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - - if($id){ - $data['user'] = $this->user_model->get_user($id); - $data['form_action'] = site_url("man_user/update/$p/$o/$id"); - } - - else{ - $data['user'] = null; - $data['form_action'] = site_url("man_user/insert"); - } - - $data['grup'] = $this->user_model->list_grup(); - $header = $this->header_model->get_data(); - - $this->load->view('header', $header); - $this->load->view('man_user/nav'); - $this->load->view('man_user/manajemen_user_form',$data); - $this->load->view('footer'); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('man_user'); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!=0) - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('man_user'); - } - function insert(){ - $this->user_model->insert(); - redirect('man_user'); - } - function update($p=1,$o=0,$id=''){ - $this->user_model->update($id); - redirect("man_user/index/$p/$o"); - } - function delete($p=1,$o=0,$id=''){ - $this->user_model->delete($id); - redirect("man_user/index/$p/$o"); - } - function delete_all($p=1,$o=0){ - $this->user_model->delete_all(); - redirect("man_user/index/$p/$o"); - } - function user_lock($id=''){ - $this->user_model->user_lock($id,0); - redirect("man_user/index/$p/$o"); - } - function user_unlock($id=''){ - $this->user_model->user_lock($id,1); - redirect("man_user/index/$p/$o"); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/mandiri.php b/donjo-app/controllers/mandiri.php deleted file mode 100644 index 656b0e75c..000000000 --- a/donjo-app/controllers/mandiri.php +++ /dev/null @@ -1,78 +0,0 @@ -load->model('user_model'); - $this->load->model('mandiri_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2) redirect('siteman'); - $this->load->model('header_model'); - - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - redirect('mandiri'); - } - function index($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - $data['paging'] = $this->mandiri_model->paging($p,$o); - $data['main'] = $this->mandiri_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->mandiri_model->autocomplete(); - - - $header = $this->header_model->get_data(); - $nav['act']= 1; - $this->load->view('header', $header); - - $this->load->view('lapor/nav',$nav); - $this->load->view('mandiri/mandiri',$data); - $this->load->view('footer'); - } - function ajax_pin($p=1,$o=0,$id=0){ - $data['penduduk'] = $this->mandiri_model->list_penduduk(); - $data['form_action'] = site_url("mandiri/insert/$id"); - $this->load->view('mandiri/ajax_pin',$data); - - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('mandiri'); - } - function filter(){ - $filter = $this->input->post('nik'); - if($filter!=0) - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('mandiri/perorangan'); - } - function nik(){ - $nik = $this->input->post('nik'); - if($nik!=0) - $_SESSION['nik']=$_POST['nik']; - else unset($_SESSION['nik']); - redirect('mandiri/perorangan'); - } - function insert(){ - $pin = $this->mandiri_model->insert(); - $_SESSION['pin'] = $pin; - redirect('mandiri'); - } - function ajax_pin_show($pin=""){ - redirect('mandiri'); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/menu.php b/donjo-app/controllers/menu.php deleted file mode 100644 index f9e1c413f..000000000 --- a/donjo-app/controllers/menu.php +++ /dev/null @@ -1,157 +0,0 @@ -load->model('user_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); - $this->load->model('header_model'); - $this->load->model('web_menu_model'); - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - redirect('menu'); - } - function index($tip=1,$p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - $data['tip'] = $tip; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->web_menu_model->paging($tip,$p,$o); - $data['main'] = $this->web_menu_model->list_data($tip,$o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->web_menu_model->autocomplete(); - $header = $this->header_model->get_data(); - $nav['act']=1; - - $this->load->view('header', $header); - $this->load->view('web/nav',$nav); - $this->load->view('menu/table',$data); - $this->load->view('footer'); - } - function form($tip=1,$id=''){ - if($tip==1){ - $data['link'] = $this->web_menu_model->list_link(); - }else{ - $data['link'] = $this->web_menu_model->list_kategori(); - } - if($id){ - $data['menu'] = $this->web_menu_model->get_menu($id); - $data['form_action'] = site_url("menu/update/$tip/$id"); - } - else{ - $data['menu'] = null; - $data['form_action'] = site_url("menu/insert/$tip"); - } - $header = $this->header_model->get_data(); - $data['tip'] = $tip; - - $nav['act']=1; - $this->load->view('header', $header); - $this->load->view('web/nav',$nav); - $this->load->view('menu/form',$data); - $this->load->view('footer'); - } - function sub_menu($tip=1,$menu=1){ - $data['submenu'] = $this->web_menu_model->list_sub_menu($menu); - $data['tip'] = $tip; - $data['menu'] = $menu; - $header = $this->header_model->get_data(); - $nav['act']=1; - - $this->load->view('header', $header); - $this->load->view('web/nav',$nav); - $this->load->view('menu/sub_menu_table',$data); - $this->load->view('footer'); - } - function ajax_add_sub_menu($tip=1,$menu='',$id=''){ - $data['menu'] = $menu; - $data['tip'] = $tip; - - $data['link'] = $this->web_menu_model->list_link(); - - if($id){ - $data['submenu'] = $this->web_menu_model->get_menu($id); - $data['form_action'] = site_url("menu/update_sub_menu/$tip/$menu/$id"); - } - else{ - $data['submenu'] = null; - $data['form_action'] = site_url("menu/insert_sub_menu/$tip/$menu"); - } - $this->load->view('menu/ajax_add_sub_menu_form',$data); - } - function search($tip=1){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect("menu/index/$tip"); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!=0) - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('menu'); - } - function insert($tip=1){ - $this->web_menu_model->insert($tip); - redirect("menu/index/$tip"); - } - function update($tip=1,$id=''){ - $this->web_menu_model->update($id); - redirect("menu/index/$tip"); - } - function delete($tip=1,$id=''){ - $this->web_menu_model->delete($id); - redirect("menu/index/$tip"); - } - function delete_all($tip=1,$p=1,$o=0){ - $this->web_menu_model->delete_all(); - redirect("menu/index/$tip/$p/$o"); - } - function menu_lock($tip=1,$id=''){ - $this->web_menu_model->menu_lock($id,1); - redirect("menu/index/$tip/$p/$o"); - } - function menu_unlock($tip=1,$id=''){ - $this->web_menu_model->menu_lock($id,2); - redirect("menu/index/$tip/$p/$o"); - } - function insert_sub_menu($tip=1,$menu=''){ - $this->web_menu_model->insert_sub_menu($menu); - redirect("menu/sub_menu/$tip/$menu"); - } - function update_sub_menu($tip=1,$menu='',$id=''){ - $this->web_menu_model->update_sub_menu($id); - redirect("menu/sub_menu/$tip/$menu"); - } - function delete_sub_menu($tip='',$menu='',$id=0){ - $this->web_menu_model->delete($id); - redirect("menu/sub_menu/$tip/$menu"); - } - function delete_all_sub_menu($tip=1,$menu=''){ - $this->web_menu_model->delete_all(); - redirect("menu/sub_menu/$tip/$menu"); - } - function menu_lock_sub_menu($tip=1,$menu='',$id=''){ - $this->web_menu_model->menu_lock($id,1); - redirect("menu/sub_menu/$tip/$menu"); - } - function menu_unlock_sub_menu($tip=1,$menu='',$id=''){ - $this->web_menu_model->menu_lock($id,2); - redirect("menu/sub_menu/$tip/$menu"); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/modul.php b/donjo-app/controllers/modul.php deleted file mode 100644 index 33bd8a8ac..000000000 --- a/donjo-app/controllers/modul.php +++ /dev/null @@ -1,89 +0,0 @@ -load->model('user_model'); - $this->load->model('modul_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1) redirect('siteman'); - $this->load->model('header_model'); - } - - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - redirect('modul'); - } - function index(){ - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - $data['main'] = $this->modul_model->list_data(); - $data['keyword'] = $this->modul_model->autocomplete(); - $nav['act']= 1; - $header = $this->header_model->get_data(); - - $this->load->view('header',$header); - - $this->load->view('setting/nav',$nav); - $this->load->view('setting/modul/table',$data); - $this->load->view('footer'); - } - - function form($id=''){ - - if($id){ - $data['modul'] = $this->modul_model->get_data($id); - $data['form_action'] = site_url("modul/update/$id"); - } - else{ - $data['modul'] = null; - $data['form_action'] = site_url("modul/insert"); - } - - $header = $this->header_model->get_data(); - - $this->load->view('header',$header); - - $nav['act']= 1; - $this->load->view('setting/nav',$nav); - $this->load->view('setting/modul/form',$data); - $this->load->view('footer'); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!="") - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('modul'); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('modul'); - } - function insert(){ - $this->modul_model->insert(); - redirect('modul'); - } - function update($id=''){ - $this->modul_model->update($id); - redirect('modul'); - } - function delete($id=''){ - $this->modul_model->delete($id); - redirect('modul'); - } - function delete_all(){ - $this->modul_model->delete_all(); - redirect('modul'); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/penduduk.php b/donjo-app/controllers/penduduk.php deleted file mode 100644 index 6a00a01e4..000000000 --- a/donjo-app/controllers/penduduk.php +++ /dev/null @@ -1,706 +0,0 @@ -load->model('user_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2) redirect('siteman'); - - $this->load->model('penduduk_model'); - $this->load->model('header_model'); - } - function clear(){ - unset($_SESSION['log']); - $_SESSION['status_dasar']=1; - unset($_SESSION['judul_statistik']); - unset($_SESSION['judul_statistik_cetak']); - unset($_SESSION['cari']); - unset($_SESSION['duplikat']); - - unset($_SESSION['filter']); - unset($_SESSION['sex']); - unset($_SESSION['warganegara']); - unset($_SESSION['cacat']); - unset($_SESSION['menahun']); - unset($_SESSION['golongan_darah']); - unset($_SESSION['dusun']); - unset($_SESSION['rw']); - unset($_SESSION['rt']); - unset($_SESSION['hubungan']); - unset($_SESSION['agama']); - unset($_SESSION['umur_min']); - unset($_SESSION['umur_max']); - unset($_SESSION['pekerjaan_id']); - unset($_SESSION['pendidikan_sedang_id']); - unset($_SESSION['pendidikan_kk_id']); - unset($_SESSION['status_penduduk']); - unset($_SESSION['hamil']); - - - unset($_SESSION['status']); - unset($_SESSION['umurx']); - unset($_SESSION['cacatx']); - unset($_SESSION['menahunx']); - - $_SESSION['per_page'] = 50; - redirect('penduduk'); - } - function index($p=1,$o=0){ - - unset($_SESSION['log']); - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['judul_statistik'])) - $data['judul_statistik'] = $_SESSION['judul_statistik']; - else $data['judul_statistik'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_SESSION['status_dasar'])) - $data['status_dasar'] = $_SESSION['status_dasar']; - else $data['status_dasar'] = '1'; - if(isset($_SESSION['sex'])) - $data['sex'] = $_SESSION['sex']; - else $data['sex'] = ''; - - if(isset($_SESSION['dusun'])){ - $data['dusun'] = $_SESSION['dusun']; - $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); - - if(isset($_SESSION['rw'])){ - $data['rw'] = $_SESSION['rw']; - $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); - - if(isset($_SESSION['rt'])) - $data['rt'] = $_SESSION['rt']; - else $data['rt'] = ''; - - }else $data['rw'] = ''; - - }else{ - $data['dusun'] = ''; - $data['rw'] = ''; - $data['rt'] = ''; - } - - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['grup'] = $this->user_model->sesi_grup($_SESSION['sesi']); - $data['paging'] = $this->penduduk_model->paging($p,$o); - $data['main'] = $this->penduduk_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->penduduk_model->autocomplete(); - $data['list_agama'] = $this->penduduk_model->list_agama(); - $data['list_dusun'] = $this->penduduk_model->list_dusun(); - - $header = $this->header_model->get_data(); - $nav['act']= 2; - - $data['info'] = $this->penduduk_model->get_filter(); - - $this->load->view('header', $header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/kependudukan/penduduk',$data); - $this->load->view('footer'); - - } - function form($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_POST['dusun'])) - $data['dus_sel'] = $_POST['dusun']; - else - $data['dus_sel'] = ''; - - if(isset($_POST['rw'])) - $data['rw_sel'] = $_POST['rw']; - else - $data['rw_sel'] = ''; - - if(isset($_POST['rt'])) - $data['rt_sel'] = $_POST['rt']; - else - $data['rt_sel'] = ''; - - if($id){ - $data['penduduk'] = $this->penduduk_model->get_penduduk($id); - $data['form_action'] = site_url("penduduk/update/$p/$o/$id"); - $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); - } - else{ - $data['penduduk'] = null; - $data['form_action'] = site_url("penduduk/insert"); - $data['list_dokumen'] = null; - } - - $header = $this->header_model->get_data(); - $data['dusun'] = $this->penduduk_model->list_dusun(); - $data['rw'] = $this->penduduk_model->list_rw($data['dus_sel']); - $data['rt'] = $this->penduduk_model->list_rt($data['dus_sel'],$data['rw_sel']); - $data['agama'] = $this->penduduk_model->list_agama(); - $data['pendidikan_sedang'] = $this->penduduk_model->list_pendidikan_sedang(); - $data['pendidikan_kk'] = $this->penduduk_model->list_pendidikan_kk(); - $data['pekerjaan'] = $this->penduduk_model->list_pekerjaan(); - $data['warganegara'] = $this->penduduk_model->list_warganegara(); - $data['hubungan'] = $this->penduduk_model->list_hubungan(); - $data['kawin'] = $this->penduduk_model->list_status_kawin(); - $data['golongan_darah'] = $this->penduduk_model->list_golongan_darah(); - $data['cacat'] = $this->penduduk_model->list_cacat(); - $data['sakit_menahun'] = $this->penduduk_model->list_sakit_menahun(); - - $this->load->view('header', $header); - $nav['act']= 2; - $this->load->view('sid/nav',$nav); - $this->load->view('sid/kependudukan/penduduk_form',$data); - $this->load->view('footer'); - } - function detail($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); - $data['list_kelompok'] = $this->penduduk_model->list_kelompok($id); - $data['penduduk'] = $this->penduduk_model->get_penduduk($id); - $header = $this->header_model->get_data(); - - $this->load->view('header', $header); - $nav['act']= 2; - $this->load->view('sid/nav',$nav); - $this->load->view('sid/kependudukan/penduduk_detail',$data); - $this->load->view('footer'); - } - function dokumen($id=''){ - $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); - $data['penduduk'] = $this->penduduk_model->get_penduduk($id); - $header = $this->header_model->get_data(); - - $this->load->view('header', $header); - $nav['act']= 2; - $this->load->view('sid/nav',$nav); - $this->load->view('sid/kependudukan/penduduk_dokumen',$data); - $this->load->view('footer'); - } - function dokumen_form($id=0){ - $data['penduduk'] = $this->penduduk_model->get_penduduk($id); - $data['form_action'] = site_url("penduduk/dokumen_insert"); - $this->load->view('sid/kependudukan/dokumen_form',$data); - } - function dokumen_list($id=0){ - $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); - $data['penduduk'] = $this->penduduk_model->get_penduduk($id); - $this->load->view('sid/kependudukan/dokumen_ajax',$data); - } - function dokumen_insert(){ - $this->penduduk_model->dokumen_insert(); - $id = $_POST['id_pend']; - redirect("penduduk/dokumen/$id"); - } - function delete_dokumen($id_pend=0,$id=''){ - $this->penduduk_model->delete_dokumen($id); - redirect("penduduk/dokumen/$id_pend"); - } - function delete_all_dokumen($id_pend=0){ - $this->penduduk_model->delete_all_dokumen(); - redirect("penduduk/dokumen/$id_pend"); - } - function cetak_biodata($id=''){ - - $data['desa'] = $this->header_model->get_data(); - $data['penduduk'] = $this->penduduk_model->get_penduduk($id); - $this->load->view('sid/kependudukan/cetak_biodata',$data); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('penduduk'); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!="") - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('penduduk'); - } - function duplikat(){ - $_SESSION['duplikat']=1; - redirect('penduduk'); - } - function status_dasar(){ - $status_dasar = $this->input->post('status_dasar'); - if($status_dasar!="") - $_SESSION['status_dasar']=$status_dasar; - else unset($_SESSION['status_dasar']); - redirect('penduduk'); - } - function sex(){ - $sex = $this->input->post('sex'); - if($sex!="") - $_SESSION['sex']=$sex; - else unset($_SESSION['sex']); - redirect('penduduk'); - } - function agama(){ - $agama = $this->input->post('agama'); - if($agama!="") - $_SESSION['agama']=$agama; - else unset($_SESSION['agama']); - redirect('penduduk'); - } - function warganegara(){ - $warganegara = $this->input->post('warganegara'); - if($warganegara!="") - $_SESSION['warganegara']=$warganegara; - else unset($_SESSION['warganegara']); - redirect('penduduk'); - } - function dusun(){ - unset($_SESSION['rw']); - unset($_SESSION['rt']); - $dusun = $this->input->post('dusun'); - if($dusun!="") - $_SESSION['dusun']=$dusun; - else unset($_SESSION['dusun']); - redirect('penduduk'); - } - function rw(){ - unset($_SESSION['rt']); - $rw = $this->input->post('rw'); - if($rw!="") - $_SESSION['rw']=$rw; - else unset($_SESSION['rw']); - redirect('penduduk'); - } - function rt(){ - $rt = $this->input->post('rt'); - if($rt!="") - $_SESSION['rt']=$rt; - else unset($_SESSION['rt']); - redirect('penduduk'); - } - function insert(){ - - - $data = $this->penduduk_model->dn(); - - $i=0; - $dp=0; - $link = site_url()."penduduk/form"; - while($iTERJADI KESALAHAN

Data Tidak Tersimpan
- Sudah terdapat Penduduk dengan nomor NIK $nk, Silahkan periksa kembali dan ulangi proses memasukkan data.
- Klik disini untuk
Kembali"; - }else{ - - $this->penduduk_model->insert(); - redirect('penduduk'); - } - } - function update($p=1,$o=0,$id=''){ - $this->penduduk_model->update($id); - redirect("penduduk/index/$p/$o"); - } - - function delete_confirm($p=1,$o=0,$id=''){ - $data['form_action'] = site_url("penduduk/index/$p/$o/$id"); - $this->load->view("sid/kependudukan/ajax_delete", $data); - } - function delete($p=1,$o=0,$id=''){ - $this->penduduk_model->delete($id); - redirect("penduduk/index/$p/$o"); - } - function delete_all($p=1,$o=0){ - $this->penduduk_model->delete_all(); - redirect("penduduk/index/$p/$o"); - } - function ajax_adv_search(){ - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['judul_statistik'])) - $data['judul_statistik'] = $_SESSION['judul_statistik']; - else $data['judul_statistik'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_SESSION['sex'])) - $data['sex'] = $_SESSION['sex']; - else $data['sex'] = ''; - - if(isset($_SESSION['hubungan'])) - $data['hubungan'] = $_SESSION['hubungan']; - else $data['hubungan'] = ''; - - if(isset($_SESSION['umur_min'])) - $data['umur_min'] = $_SESSION['umur_min']; - else $data['umur_min'] = ''; - - if(isset($_SESSION['umur_max'])) - $data['umur_max'] = $_SESSION['umur_max']; - else $data['umur_max'] = ''; - - if(isset($_SESSION['agama'])) - $data['agama'] = $_SESSION['agama']; - else $data['agama'] = ''; - - if(isset($_SESSION['tahun'])) - $data['tahun'] = $_SESSION['tahun']; - else $data['tahun'] = date("Y"); - - if(isset($_SESSION['cacat'])) - $data['cacat'] = $_SESSION['cacat']; - else $data['cacat'] = ''; - - if(isset($_SESSION['golongan_darah'])) - $data['golongan_darah'] = $_SESSION['golongan_darah']; - else $data['golongan_darah'] = ''; - - if(isset($_SESSION['pekerjaan_id'])) - $data['pekerjaan_id'] = $_SESSION['pekerjaan_id']; - else $data['pekerjaan_id'] = ''; - - if(isset($_SESSION['status'])) - $data['status'] = $_SESSION['status']; - else $data['status'] = ''; - - if(isset($_SESSION['pendidikan_sedang_id'])) - $data['pendidikan_sedang_id'] = $_SESSION['pendidikan_sedang_id']; - else $data['pendidikan_sedang_id'] = ''; - - if(isset($_SESSION['pendidikan_kk_id'])) - $data['pendidikan_kk_id'] = $_SESSION['pendidikan_kk_id']; - else $data['pendidikan_kk_id'] = ''; - - if(isset($_SESSION['status_penduduk'])) - $data['status_penduduk'] = $_SESSION['status_penduduk']; - else $data['status_penduduk'] = ''; - - $data['list_agama'] = $this->penduduk_model->list_agama(); - $data['list_cacat'] = $this->penduduk_model->list_cacat(); - $data['list_golongan_darah'] = $this->penduduk_model->list_golongan_darah(); - $data['list_hubungan'] = $this->penduduk_model->list_hubungan(); - $data['pendidikan'] = $this->penduduk_model->list_pendidikan(); - $data['pendidikan_kk'] = $this->penduduk_model->list_pendidikan_kk(); - $data['pekerjaan'] = $this->penduduk_model->list_pekerjaan(); - $data['form_action'] = site_url("penduduk/adv_search_proses"); - $this->load->view("sid/kependudukan/ajax_adv_search_form", $data); - } - function adv_search_proses(){ - $adv_search = $_POST; - $i=0; - while($i++ < count($adv_search)){ - $col[$i] = key($adv_search); - next($adv_search); - } - $i=0; - while($i++ < count($col)){ - if($adv_search[$col[$i]]==""){ - UNSET($adv_search[$col[$i]]); - UNSET($_SESSION[$col[$i]]); - }else{ - $_SESSION[$col[$i]]=$adv_search[$col[$i]]; - } - } - //print_r($adv_search); - redirect('penduduk'); - } - function ajax_penduduk_pindah($id=0){ - $data['dusun'] = $this->penduduk_model->list_dusun(); - - $data['form_action'] = site_url("penduduk/pindah_proses/$id"); - $this->load->view('sid/kependudukan/ajax_pindah_form',$data); - } - function ajax_penduduk_pindah_rw($dusun=''){ - $dusun = str_replace("_"," ",$dusun); - $rw = $this->penduduk_model->list_rw($dusun); - - $dusun = str_replace(" ","_",$dusun); - echo"RW - - "; - } - function ajax_penduduk_pindah_rt($dusun='',$rw=''){ - $dusun = str_replace("_"," ",$dusun); - $rt = $this->penduduk_model->list_rt($dusun,$rw); - $dusun = str_replace(" ","_",$dusun); - echo "RT - - "; - } - function ajax_penduduk_cari_rw($dusun=''){ - $rw = $this->penduduk_model->list_rw($dusun); - - echo"RW - - "; - } - function ajax_penduduk_cari_rt($dusun='',$rw=''){ - $rt = $this->penduduk_model->list_rt($dusun,$rw); - echo "RT - - "; - } - function pindah_proses($id=0){ - $id_cluster = $_POST['id_cluster']; - $this->penduduk_model->pindah_proses($id,$id_cluster); - redirect("penduduk"); - } - function ajax_penduduk_maps($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - - $data['penduduk'] = $this->penduduk_model->get_penduduk_map($id); - $data['desa'] = $this->penduduk_model->get_desa(); - - $data['form_action'] = site_url("penduduk/update_maps/$p/$o/$id"); - - $this->load->view("sid/kependudukan/maps", $data); - } - - function update_maps($p=1,$o=0,$id=''){ - $this->penduduk_model->update_position($id); - redirect("penduduk/form/$p/$o/$id"); - } - function wilayah_sel($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - - $data['form_action'] = site_url("penduduk"); - - $this->load->view("sid/kependudukan/maps", $data); - } - function edit_status_dasar($p=1,$o=0,$id=0){ - $data['nik'] = $this->penduduk_model->get_penduduk($id); - $data['form_action'] = site_url("penduduk/update_status_dasar/$p/$o/$id"); - $this->load->view('sid/kependudukan/ajax_edit_status_dasar',$data); - } - - function update_status_dasar($p=1,$o=0,$id=''){ - $this->penduduk_model->update_status_dasar($id); - redirect("penduduk/index/$p/$o"); - } - - function cetak($o=0){ - - $data['info'] = $this->penduduk_model->get_filter(); - $data['main'] = $this->penduduk_model->list_data($o,0, 10000); - $this->load->view('sid/kependudukan/penduduk_print',$data); - } - function excel($o=0){ - - $data['info'] = $this->penduduk_model->get_filter(); - $data['main'] = $this->penduduk_model->list_data($o,0, 10000); - $this->load->view('sid/kependudukan/penduduk_excel',$data); - } - - function statistik($tipe="",$nomor="",$sex=""){ - $_SESSION['per_page'] = 50; - unset($_SESSION['log']); - unset($_SESSION['cari']); - - unset($_SESSION['warganegara']); - unset($_SESSION['cacat']); - unset($_SESSION['menahun']); - unset($_SESSION['golongan_darah']); - unset($_SESSION['dusun']); - unset($_SESSION['rw']); - unset($_SESSION['rt']); - unset($_SESSION['agama']); - unset($_SESSION['umur_min']); - unset($_SESSION['umur_max']); - unset($_SESSION['pekerjaan_id']); - unset($_SESSION['status']); - unset($_SESSION['pendidikan_sedang_id']); - unset($_SESSION['pendidikan_kk_id']); - unset($_SESSION['status_penduduk']); - unset($_SESSION['umurx']); - - if($sex==0) - unset($_SESSION['sex']); - else - $_SESSION['sex']=$sex; - - - if($nomor != 0){ - switch($tipe){ - case 0: $_SESSION['pendidikan_kk_id'] = $nomor; $pre="PENDIDIKAN DALAM KK : "; break; - case 1: $_SESSION['pekerjaan_id'] = $nomor; $pre="PEKERJAAN : "; break; - case 2: $_SESSION['status'] = $nomor; $pre="STATUS PERKAWINAN : "; break; - case 3: $_SESSION['agama'] = $nomor; $pre="AGAMA : "; break; - case 4: $_SESSION['sex'] = $nomor; $pre="JENIS KELAMIN : "; break; - case 5: $_SESSION['warganegara'] = $nomor; $pre="WARGANEGARA : "; break; - case 6: $_SESSION['status_penduduk'] = $nomor; $pre="STATUS PENDUDUK : "; break; - case 7: $_SESSION['golongan_darah'] = $nomor; $pre="GOLONGAN DARAH : "; break; - case 9: $_SESSION['cacat'] = $nomor; $pre="CACAT : "; break; - case 10: $_SESSION['menahun'] = $nomor; $pre="SAKIT MENAHUN : "; break; - case 11: $_SESSION['jamkesmas'] = $nomor; $pre="JAMKESMAS : "; break; - case 13: $_SESSION['umurx'] = $nomor; $pre="UMUR "; break; - case 14: $_SESSION['pendidikan_sedang_id'] = $nomor; $pre="PENDIDIKAN SEDANG DITEMPUH : "; break; - } - $judul= $this->penduduk_model->get_judul_statistik($tipe,$nomor); - if($judul['nama']){ - $_SESSION['judul_statistik']="TABEL DATA KEPENDUDUKAN MENURUT ".$pre.$judul['nama']; - $_SESSION['judul_statistik_cetak']="TABEL DATA KEPENDUDUKAN MENURUT ".$pre.$judul['nama']; - }else{ - unset($_SESSION['judul_statistik']); - } - - redirect('penduduk'); - }else{ - - redirect('penduduk'); - } - } - function lap_statistik($id_cluster=0,$tipe=0,$nomor=0){ - unset($_SESSION['sex']); - unset($_SESSION['cacatx']); - unset($_SESSION['menahun']); - unset($_SESSION['menahunx']); - unset($_SESSION['dusun']); - unset($_SESSION['rw']); - unset($_SESSION['rt']); - unset($_SESSION['umur_min']); - unset($_SESSION['umur_max']); - unset($_SESSION['hamil']); - unset($_SESSION['status']); - $cluster= $this->penduduk_model->get_cluster($id_cluster); - switch($tipe){ - case 1: - $_SESSION['sex'] = '1'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="JENIS KELAMIN LAKI-LAKI "; - break; - case 2: - $_SESSION['sex'] = '2'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="JENIS KELAMIN PEREMPUAN "; - break; - case 3: - $_SESSION['umur_min'] = '0'; - $_SESSION['umur_max'] = '0'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="BERUMUR <1 "; - break; - case 4: - $_SESSION['umur_min'] = '1'; - $_SESSION['umur_max'] = '5'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="BERUMUR 1-5 "; - break; - case 5: - $_SESSION['umur_min'] = '6'; - $_SESSION['umur_max'] = '12'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="BERUMUR 6-12 "; - break; - case 6: - $_SESSION['umur_min'] = '13'; - $_SESSION['umur_max'] = '15'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="BERUMUR 13-16 "; - break; - case 7: - $_SESSION['umur_min'] = '16'; - $_SESSION['umur_max'] = '18'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="BERUMUR 16-18 "; - break; - case 8: - $_SESSION['umur_min'] = '61'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="BERUMUR >60"; - break; - case 9: - $_SESSION['cacatx'] = '7'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="CACAT "; - break; - case 10: - $_SESSION['menahunx'] = '14'; - $_SESSION['sex']='1' ; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="SAKIT MENAHUN LAKI-LAKI "; - break; - case 11: - $_SESSION['menahunx'] = '14'; - $_SESSION['sex']='2'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="SAKIT MENAHUN PEREMPUAN "; - break; - case 12: - $_SESSION['hamil'] = '1'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="HAMIL "; - break; - } - - if($pre){ - $_SESSION['judul_statistik']=$pre; - }else{ - unset($_SESSION['judul_statistik']); - } - redirect("penduduk"); - } - function coba2($id=0){ - $this->penduduk_model->coba2(); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/penduduk_log.php b/donjo-app/controllers/penduduk_log.php deleted file mode 100644 index 2d617bea2..000000000 --- a/donjo-app/controllers/penduduk_log.php +++ /dev/null @@ -1,169 +0,0 @@ -load->model('user_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); - - $this->load->model('penduduk_model'); - $this->load->model('header_model'); - - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - unset($_SESSION['sex']); - unset($_SESSION['dusun']); - unset($_SESSION['rw']); - unset($_SESSION['rt']); - unset($_SESSION['agama']); - unset($_SESSION['umur_min']); - unset($_SESSION['umur_max']); - unset($_SESSION['pekerjaan_id']); - unset($_SESSION['status']); - unset($_SESSION['pendidikan_id']); - unset($_SESSION['status_penduduk']); - $_SESSION['per_page'] = 200; - $_SESSION['log'] = 1; - redirect('penduduk_log'); - } - function index($p=1,$o=0){ - $_SESSION['log'] = 1; - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_SESSION['sex'])) - $data['sex'] = $_SESSION['sex']; - else $data['sex'] = ''; - - if(isset($_SESSION['dusun'])){ - $data['dusun'] = $_SESSION['dusun']; - $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); - - if(isset($_SESSION['rw'])){ - $data['rw'] = $_SESSION['rw']; - $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); - - if(isset($_SESSION['rt'])) - $data['rt'] = $_SESSION['rt']; - else $data['rt'] = ''; - - }else $data['rw'] = ''; - - }else{ - $data['dusun'] = ''; - $data['rw'] = ''; - $data['rt'] = ''; - } - if(isset($_SESSION['agama'])) - $data['agama'] = $_SESSION['agama']; - else $data['agama'] = ''; - if(isset($_SESSION['pekerjaan_id'])) - $data['pekerjaan_id'] = $_SESSION['pekerjaan_id']; - else $data['pekerjaan_id'] = ''; - if(isset($_SESSION['status'])) - $data['status'] = $_SESSION['status']; - else $data['status'] = ''; - if(isset($_SESSION['pendidikan_id'])) - $data['pendidikan_id'] = $_SESSION['pendidikan_id']; - else $data['pendidikan_id'] = ''; - if(isset($_SESSION['status_penduduk'])) - $data['status_penduduk'] = $_SESSION['status_penduduk']; - else $data['status_penduduk'] = ''; - - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->penduduk_model->paging($p,$o,1); - $data['main'] = $this->penduduk_model->list_data($o, $data['paging']->offset, $data['paging']->per_page,1); - $data['keyword'] = $this->penduduk_model->autocomplete(); - $data['list_agama'] = $this->penduduk_model->list_agama(); - $data['list_dusun'] = $this->penduduk_model->list_dusun(); - - $header = $this->header_model->get_data(); - $nav['act']= 2; - - $this->load->view('header', $header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/kependudukan/penduduk_log',$data); - $this->load->view('footer'); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('penduduk_log'); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!="") - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('penduduk_log'); - } - function sex(){ - $sex = $this->input->post('sex'); - if($sex!="") - $_SESSION['sex']=$sex; - else unset($_SESSION['sex']); - redirect('penduduk_log'); - } - function agama(){ - $agama = $this->input->post('agama'); - if($agama!="") - $_SESSION['agama']=$agama; - else unset($_SESSION['agama']); - redirect('penduduk_log'); - } - function dusun(){ - $dusun = $this->input->post('dusun'); - if($dusun!="") - $_SESSION['dusun']=$dusun; - else unset($_SESSION['dusun']); - redirect('penduduk_log'); - } - function rw(){ - $rw = $this->input->post('rw'); - if($rw!="") - $_SESSION['rw']=$rw; - else unset($_SESSION['rw']); - redirect('penduduk_log'); - } - function rt(){ - $rt = $this->input->post('rt'); - if($rt!="") - $_SESSION['rt']=$rt; - else unset($_SESSION['rt']); - redirect('penduduk_log'); - } - function edit_status_dasar($p=1,$o=0,$id=0){ - $data['nik'] = $this->penduduk_model->get_penduduk($id); - $data['form_action'] = site_url("penduduk_log/update_status_dasar/$p/$o/$id"); - $this->load->view('sid/kependudukan/ajax_edit_status_dasar',$data); - } - - function update_status_dasar($p=1,$o=0,$id=''){ - $this->penduduk_model->update_status_dasar($id); - redirect("penduduk_log/index/$p/$o"); - } - - function cetak($o=0){ - $data['main'] = $this->penduduk_model->list_data($o,0, 10000); - $this->load->view('sid/kependudukan/penduduk_print',$data); - } - function delete_all($p=1,$o=0){ - $this->penduduk_model->delete_all(); - redirect("penduduk_log/index/$p/$o"); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/pengurus.php b/donjo-app/controllers/pengurus.php deleted file mode 100644 index 4acecd20f..000000000 --- a/donjo-app/controllers/pengurus.php +++ /dev/null @@ -1,89 +0,0 @@ -load->model('user_model'); - $this->load->model('pamong_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2) redirect('siteman'); - $this->load->model('header_model'); - } - - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - redirect('pengurus'); - } - function index(){ - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - $data['main'] = $this->pamong_model->list_data(); - $data['keyword'] = $this->pamong_model->autocomplete(); - $nav['act']= 1; - $header = $this->header_model->get_data(); - - $this->load->view('header',$header); - - $this->load->view('home/nav',$nav); - $this->load->view('home/pengurus',$data); - $this->load->view('footer'); - } - - function form($id=''){ - - if($id){ - $data['pamong'] = $this->pamong_model->get_data($id); - $data['form_action'] = site_url("pengurus/update/$id"); - } - else{ - $data['pamong'] = null; - $data['form_action'] = site_url("pengurus/insert"); - } - - $header = $this->header_model->get_data(); - - $this->load->view('header',$header); - - $nav['act']= 1; - $this->load->view('home/nav',$nav); - $this->load->view('home/pengurus_form',$data); - $this->load->view('footer'); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!="") - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('pengurus'); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('pengurus'); - } - function insert(){ - $this->pamong_model->insert(); - redirect('pengurus'); - } - function update($id=''){ - $this->pamong_model->update($id); - redirect('pengurus'); - } - function delete($id=''){ - $this->pamong_model->delete($id); - redirect('pengurus'); - } - function delete_all(){ - $this->pamong_model->delete_all(); - redirect('pengurus'); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/plan.php b/donjo-app/controllers/plan.php deleted file mode 100644 index 806b70973..000000000 --- a/donjo-app/controllers/plan.php +++ /dev/null @@ -1,160 +0,0 @@ -load->model('user_model'); - - $this->load->model('header_model'); - $this->load->model('plan_lokasi_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1) redirect('siteman'); - - - //$this->load->library('ion_auth'); - - //$this->config->item('ion_auth') ; - $this->load->database(); - - - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - unset($_SESSION['point']); - unset($_SESSION['subpoint']); - redirect('plan'); - } - function index($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_SESSION['point'])) - $data['point'] = $_SESSION['point']; - else $data['point'] = ''; - if(isset($_SESSION['subpoint'])) - $data['subpoint'] = $_SESSION['subpoint']; - else $data['subpoint'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->plan_lokasi_model->paging($p,$o); - $data['main'] = $this->plan_lokasi_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->plan_lokasi_model->autocomplete(); - $data['list_point'] = $this->plan_lokasi_model->list_point(); - $data['list_subpoint'] = $this->plan_lokasi_model->list_subpoint(); - - $header = $this->header_model->get_data(); - $nav['act']=3; - - $this->load->view('header-gis', $header); - $this->load->view('plan/nav',$nav); - $this->load->view('lokasi/table',$data); - $this->load->view('footer'); - - } - function form($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - - $data['desa'] = $this->plan_lokasi_model->get_desa(); - $data['list_point'] = $this->plan_lokasi_model->list_point(); - $data['dusun'] = $this->plan_lokasi_model->list_dusun(); - - if($id){ - $data['lokasi'] = $this->plan_lokasi_model->get_lokasi($id); - $data['form_action'] = site_url("plan/update/$id/$p/$o"); - } - else{ - $data['lokasi'] = null; - $data['form_action'] = site_url("plan/insert"); - } - $header= $this->header_model->get_data(); - - $nav['act']=3; - $this->load->view('header-gis', $header); - - $this->load->view('plan/nav',$nav); - $this->load->view('lokasi/form',$data); - $this->load->view('footer'); - - } - function ajax_lokasi_maps($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - if($id) - $data['lokasi'] = $this->plan_lokasi_model->get_lokasi($id); - else - $data['lokasi'] = null; - - $data['desa'] = $this->plan_lokasi_model->get_desa(); - $data['form_action'] = site_url("plan/update_maps/$p/$o/$id"); - $this->load->view("lokasi/maps", $data); - } - - function update_maps($p=1,$o=0,$id=''){ - $this->plan_lokasi_model->update_position($id); - redirect("plan/index/$p/$o"); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('plan'); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!=0) - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('plan'); - } - function point(){ - $point = $this->input->post('point'); - if($point!=0) - $_SESSION['point']=$point; - else unset($_SESSION['point']); - redirect('plan'); - } - function subpoint(){ - unset($_SESSION['point']); - $subpoint = $this->input->post('subpoint'); - if($subpoint!=0) - $_SESSION['subpoint']=$subpoint; - else unset($_SESSION['subpoint']); - redirect('plan'); - } - function insert($tip=1){ - $this->plan_lokasi_model->insert($tip); - redirect("plan/index/$tip"); - } - function update($id='',$p=1,$o=0){ - $this->plan_lokasi_model->update($id); - redirect("plan/index/$p/$o"); - } - function delete($p=1,$o=0,$id=''){ - $this->plan_lokasi_model->delete($id); - redirect("plan/index/$p/$o"); - } - function delete_all($p=1,$o=0){ - $this->plan_lokasi_model->delete_all(); - redirect("plan/index/$p/$o"); - } - function lokasi_lock($id=''){ - $this->plan_lokasi_model->lokasi_lock($id,1); - redirect("plan/index/$p/$o"); - } - function lokasi_unlock($id=''){ - $this->plan_lokasi_model->lokasi_lock($id,2); - redirect("plan/index/$p/$o"); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/point.php b/donjo-app/controllers/point.php deleted file mode 100644 index 716421c23..000000000 --- a/donjo-app/controllers/point.php +++ /dev/null @@ -1,163 +0,0 @@ -load->model('user_model'); - - $this->load->model('header_model'); - $this->load->model('plan_point_model'); - $this->load->database(); - - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - redirect('point'); - } - function index($p=1,$o=0){ - - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->plan_point_model->paging($p,$o); - $data['main'] = $this->plan_point_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->plan_point_model->autocomplete(); - $header= $this->header_model->get_data(); - $nav['act']=0; - - $this->load->view('header', $header); - - $this->load->view('plan/nav',$nav); - $this->load->view('point/table',$data); - $this->load->view('footer'); - - } - function form($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - - - - if($id){ - $data['point'] = $this->plan_point_model->get_point($id); - $data['form_action'] = site_url("point/update/$id/$p/$o"); - } - else{ - $data['point'] = null; - $data['form_action'] = site_url("point/insert"); - } - $data['simbol'] = $this->plan_point_model->list_simbol(); - $header = $this->header_model->get_data(); - - $nav['act']=0; - $this->load->view('header', $header); - - $this->load->view('plan/nav',$nav); - $this->load->view('point/form',$data); - $this->load->view('footer'); - - } - function sub_point($point=1){ - $data['subpoint'] = $this->plan_point_model->list_sub_point($point); - $data['point'] = $point; - $header = $this->header_model->get_data(); - $nav['act']=0; - - $this->load->view('header', $header); - - $this->load->view('plan/nav',$nav); - $this->load->view('point/sub_point_table',$data); - $this->load->view('footer'); - - } - function ajax_add_sub_point($point=0,$id=0){ - - - - - if($id){ - $data['point'] = $this->plan_point_model->get_point($id); - $data['form_action'] = site_url("point/update_sub_point/$point/$id"); - } - else{ - $data['point'] = null; - $data['form_action'] = site_url("point/insert_sub_point/$point"); - } - $data['simbol'] = $this->plan_point_model->list_simbol(); - $this->load->view("point/ajax_add_sub_point_form",$data); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('point'); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!=0) - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('point'); - } - function insert($tip=1){ - $this->plan_point_model->insert($tip); - redirect("point/index/$tip"); - } - function update($id='',$p=1,$o=0){ - $this->plan_point_model->update($id); - redirect("point/index/$p/$o"); - } - function delete($p=1,$o=0,$id=''){ - $this->plan_point_model->delete($id); - redirect("point/index/$p/$o"); - } - function delete_all($p=1,$o=0){ - $this->plan_point_model->delete_all(); - redirect("point/index/$p/$o"); - } - function point_lock($id=''){ - $this->plan_point_model->point_lock($id,1); - redirect("point/index/$p/$o"); - } - function point_unlock($id=''){ - $this->plan_point_model->point_lock($id,2); - redirect("point/index/$p/$o"); - } - function insert_sub_point($point=''){ - $this->plan_point_model->insert_sub_point($point); - redirect("point/sub_point/$point"); - } - function update_sub_point($point='',$id=''){ - $this->plan_point_model->update_sub_point($id); - redirect("point/sub_point/$point"); - } - function delete_sub_point($point='',$id=''){ - $this->plan_point_model->delete_sub_point($id); - redirect("point/sub_point/$point"); - } - function delete_all_sub_point($point=''){ - $this->plan_point_model->delete_all_sub_point(); - redirect("point/sub_point/$point"); - } - function point_lock_sub_point($point='',$id=''){ - $this->plan_point_model->point_lock($id,1); - redirect("point/sub_point/$point"); - } - function point_unlock_sub_point($point='',$id=''){ - $this->plan_point_model->point_lock($id,2); - redirect("point/sub_point/$point"); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/polygon.php b/donjo-app/controllers/polygon.php deleted file mode 100644 index b49006cdd..000000000 --- a/donjo-app/controllers/polygon.php +++ /dev/null @@ -1,166 +0,0 @@ -load->model('user_model'); - - $this->load->model('header_model'); - $this->load->model('plan_polygon_model'); - - - $this->load->database(); - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - redirect('polygon'); - } - function index($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->plan_polygon_model->paging($p,$o); - $data['main'] = $this->plan_polygon_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->plan_polygon_model->autocomplete(); - $header= $this->header_model->get_data(); - $nav['act']=5; - - $this->load->view('header-gis', $header); - - $this->load->view('plan/nav',$nav); - $this->load->view('polygon/table',$data); - $this->load->view('footer'); - - } - function form($p=1,$o=0,$id=''){ - - $data['p'] = $p; - $data['o'] = $o; - - - - if($id){ - $data['polygon'] = $this->plan_polygon_model->get_polygon($id); - $data['form_action'] = site_url("polygon/update/$id/$p/$o"); - } - else{ - $data['polygon'] = null; - $data['form_action'] = site_url("polygon/insert"); - } - $header= $this->header_model->get_data(); - - $nav['act']=5; - $this->load->view('header-gis', $header); - - $this->load->view('plan/nav',$nav); - $this->load->view('polygon/form',$data); - $this->load->view('footer'); - - } - function sub_polygon($polygon=1){ - - $data['subpolygon'] = $this->plan_polygon_model->list_sub_polygon($polygon); - $data['polygon'] = $polygon; - $header= $this->header_model->get_data(); - $nav['act']=5; - - $this->load->view('header-gis', $header); - - $this->load->view('plan/nav',$nav); - $this->load->view('polygon/sub_polygon_table',$data); - $this->load->view('footer'); - - } - function ajax_add_sub_polygon($polygon=0,$id=0){ - if($id){ - $data['polygon'] = $this->plan_polygon_model->get_polygon($id); - $data['form_action'] = site_url("polygon/update_sub_polygon/$polygon/$id"); - } - else{ - $data['polygon'] = null; - $data['form_action'] = site_url("polygon/insert_sub_polygon/$polygon"); - } - $header= $this->header_model->get_data(); - - $nav['act']=5; - $this->load->view('header-gis', $header); - - $this->load->view('plan/nav',$nav); - $this->load->view("polygon/ajax_add_sub_polygon_form",$data); - - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('polygon'); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!=0) - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('polygon'); - } - function insert($tip=1){ - $this->plan_polygon_model->insert($tip); - redirect("polygon/index/$tip"); - } - function update($id='',$p=1,$o=0){ - $this->plan_polygon_model->update($id); - redirect("polygon/index/$p/$o"); - } - function delete($p=1,$o=0,$id=''){ - $this->plan_polygon_model->delete($id); - redirect("polygon/index/$p/$o"); - } - function delete_all($p=1,$o=0){ - $this->plan_polygon_model->delete_all(); - redirect("polygon/index/$p/$o"); - } - function polygon_lock($id=''){ - $this->plan_polygon_model->polygon_lock($id,1); - redirect("polygon/index/$p/$o"); - } - function polygon_unlock($id=''){ - $this->plan_polygon_model->polygon_lock($id,2); - redirect("polygon/index/$p/$o"); - } - function insert_sub_polygon($polygon=''){ - $this->plan_polygon_model->insert_sub_polygon($polygon); - redirect("polygon/sub_polygon/$polygon"); - } - function update_sub_polygon($polygon='',$id=''){ - $this->plan_polygon_model->update_sub_polygon($id); - redirect("polygon/sub_polygon/$polygon"); - } - function delete_sub_polygon($polygon='',$id=''){ - $this->plan_polygon_model->delete_sub_polygon($id); - redirect("polygon/sub_polygon/$polygon"); - } - function delete_all_sub_polygon($polygon=''){ - $this->plan_polygon_model->delete_all_sub_polygon(); - redirect("polygon/sub_polygon/$polygon"); - } - function polygon_lock_sub_polygon($polygon='',$id=''){ - $this->plan_polygon_model->polygon_lock($id,1); - redirect("polygon/sub_polygon/$polygon"); - } - function polygon_unlock_sub_polygon($polygon='',$id=''){ - $this->plan_polygon_model->polygon_lock($id,2); - redirect("polygon/sub_polygon/$polygon"); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/program_bantuan.php b/donjo-app/controllers/program_bantuan.php deleted file mode 100644 index 70101e4f5..000000000 --- a/donjo-app/controllers/program_bantuan.php +++ /dev/null @@ -1,107 +0,0 @@ -load->model('user_model'); - - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2) redirect('siteman'); - $this->load->model('header_model'); - $this->load->model('program_bantuan_model'); - } - public function index(){ - $header = $this->header_model->get_data(); - $this->load->view('header', $header); - $data['tampil'] = 0; - $data['program'] = $this->program_bantuan_model->get_program(false); - $this->load->view('program_bantuan/program',$data); - $this->load->view('footer'); - } - public function sasaran($sasaran=0){ - $header = $this->header_model->get_data(); - $this->load->view('header', $header); - - $data['tampil'] = $sasaran; - $data['program'] = $this->program_bantuan_model->list_program($sasaran); - $this->load->view('program_bantuan/program',$data); - $this->load->view('footer'); - } - public function detail($id){ - $header = $this->header_model->get_data(); - $this->load->view('header', $header); - if(isset($_POST['nik'])) - $data['individu']=$this->program_bantuan_model->add_peserta($_POST['nik'],$id); - else - $data['individu']=NULL; - $data['program'] = $this->program_bantuan_model->get_program($id); - - $this->load->view('program_bantuan/detail',$data); - $this->load->view('footer'); - } - public function peserta($cat=0,$id=0){ - $header = $this->header_model->get_data(); - $this->load->view('header', $header); - $data['program'] = $this->program_bantuan_model->get_peserta_program($cat,$id); - - $this->load->view('program_bantuan/peserta',$data); - $this->load->view('footer'); - } - public function create(){ - - $this->load->helper('form'); - $this->load->library('form_validation'); - - $this->form_validation->set_rules('cid', 'Sasaran', 'required'); - $this->form_validation->set_rules('nama', 'Nama Program', 'required'); - $this->form_validation->set_rules('sdate', 'Tanggal awal', 'required'); - $this->form_validation->set_rules('edate', 'Tanggal akhir', 'required'); - $header = $this->header_model->get_data(); - $this->load->view('header', $header); - if ($this->form_validation->run() === FALSE){ - $this->load->view('program_bantuan/create'); - }else{ - $this->program_bantuan_model->set_program(); - redirect("program_bantuan/"); - } - $this->load->view('footer'); - } - public function edit($id){ - $this->load->helper('form'); - $this->load->library('form_validation'); - - $this->form_validation->set_rules('cid', 'Sasaran', 'required'); - $this->form_validation->set_rules('nama', 'Nama Program', 'required'); - $this->form_validation->set_rules('sdate', 'Tanggal awal', 'required'); - $this->form_validation->set_rules('edate', 'Tanggal akhir', 'required'); - $header = $this->header_model->get_data(); - $this->load->view('header', $header); - $data['program'] = $this->program_bantuan_model->get_program($id); - if ($this->form_validation->run() === FALSE){ - $this->load->view('program_bantuan/edit',$data); - }else{ - $this->program_bantuan_model->update_program($id); - redirect("program_bantuan/"); - } - - $this->load->view('footer'); - } - public function update($id){ - $this->program_bantuan_model->update_program($id); - redirect("program_bantuan/detail/".$id); - } - public function hapus($id){ - $this->program_bantuan_model->hapus_program($id); - //$this->load->view('program_bantuan/formsuccess'); - redirect("program_bantuan/"); - } - public function unduhsheet($id=0){ - if($id > 0){ - - $data['desa'] = $this->header_model->get_data(); - $data['peserta'] = $this->program_bantuan_model->get_program($id); - $this->load->view('program_bantuan/unduh-sheet',$data); - - } - } -} \ No newline at end of file diff --git a/donjo-app/controllers/rtm.php b/donjo-app/controllers/rtm.php deleted file mode 100644 index f2235a90f..000000000 --- a/donjo-app/controllers/rtm.php +++ /dev/null @@ -1,314 +0,0 @@ -load->model('user_model'); - $this->load->model('rtm_model'); - $this->load->model('penduduk_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2) redirect('siteman'); - $this->load->model('header_model'); - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - unset($_SESSION['dusun']); - unset($_SESSION['rw']); - unset($_SESSION['rt']); - unset($_SESSION['raskin']); - unset($_SESSION['id_blt']); - unset($_SESSION['id_bos']); - unset($_SESSION['id_pkh']); - unset($_SESSION['id_jampersal']); - unset($_SESSION['id_bedah_rumah']); - $_SESSION['per_page']=100; - redirect('rtm'); - } - function index($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_SESSION['raskin'])) - $data['raskin'] = $_SESSION['raskin']; - else $data['raskin'] = ''; - if(isset($_SESSION['id_blt'])) - $data['id_blt'] = $_SESSION['id_blt']; - else $data['id_blt'] = ''; - - if(isset($_SESSION['id_bos'])) - $data['id_bos'] = $_SESSION['id_bos']; - else $data['id_bos'] = ''; - - if(isset($_SESSION['id_pkh'])) - $data['id_pkh'] = $_SESSION['id_pkh']; - else $data['id_pkh'] = ''; - - if(isset($_SESSION['id_jampersal'])) - $data['id_jampersal'] = $_SESSION['id_jampersal']; - else $data['id_jampersal'] = ''; - if(isset($_SESSION['id_bedah_rumah'])) - $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; - else $data['id_bedah_rumah'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - if(isset($_SESSION['dusun'])){ - $data['dusun'] = $_SESSION['dusun']; - $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); - - if(isset($_SESSION['rw'])){ - $data['rw'] = $_SESSION['rw']; - $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); - - if(isset($_SESSION['rt'])) - $data['rt'] = $_SESSION['rt']; - else $data['rt'] = ''; - - }else $data['rw'] = ''; - - }else{ - $data['dusun'] = ''; - $data['rw'] = ''; - $data['rt'] = ''; - } - $data['grup'] = $this->user_model->sesi_grup($_SESSION['sesi']); - $data['paging'] = $this->rtm_model->paging($p,$o); - $data['main'] = $this->rtm_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->rtm_model->autocomplete(); - $data['list_dusun'] = $this->penduduk_model->list_dusun(); - $nav['act']= 3; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/kependudukan/rtm',$data); - $this->load->view('footer'); - } - function cetak($o=0){ - $data['main'] = $this->rtm_model->list_data($o, 0, 10000); - $this->load->view('sid/kependudukan/rtm_print',$data); - } - function excel($o=0){ - $data['main'] = $this->rtm_model->list_data($o, 0, 10000); - $this->load->view('sid/kependudukan/rtm_excel',$data); - } - function excel_pbdt($o=0){ - $this->load->model('config_model'); - $data['config'] = $this->config_model->get_data(); - $data['main'] = $this->rtm_model->list_data_pbdt($o, 0, 10000); - $this->load->view('sid/kependudukan/rtm_excel_pbdt',$data); - } - function edit_nokk($p=1,$o=0,$id=0){ - $data['kk'] = $this->rtm_model->get_rtm($id); - $data['form_action'] = site_url("rtm/update_nokk/$id"); - $this->load->view('sid/kependudukan/ajax_edit_no_rtm',$data); - } - function form_old($p=1,$o=0,$id=0){ - $data['penduduk'] = $this->rtm_model->list_penduduk_lepas(); - $data['form_action'] = site_url("rtm/insert/$id"); - $this->load->view('sid/kependudukan/ajax_add_rtm',$data); - } - function dusun($s=0){ - $dusun = $this->input->post('dusun'); - if($dusun!="") - $_SESSION['dusun']=$dusun; - else unset($_SESSION['dusun']); - if($s==1) - redirect('rtm/sosial'); - elseif($s==2) - redirect('rtm/raskin_graph'); - else - redirect('rtm'); - } - - function rw($s=0){ - $rw = $this->input->post('rw'); - if($rw!="") - $_SESSION['rw']=$rw; - else unset($_SESSION['rw']); - if($s==1) - redirect('rtm/sosial'); - elseif($s==2) - redirect('rtm/raskin_graph'); - else - redirect('rtm'); - } - function rt($s=0){ - $rt = $this->input->post('rt'); - if($rt!="") - $_SESSION['rt']=$rt; - else unset($_SESSION['rt']); - if($s==1) - redirect('rtm/sosial'); - elseif($s==2) - redirect('rtm/raskin_graph'); - else - redirect('rtm'); - } - function raskin(){ - $raskin = $this->input->post('raskin'); - if($raskin!="") - $_SESSION['raskin']=$raskin; - else unset($_SESSION['raskin']); - redirect('rtm'); - } - function blt(){ - $id_blt = $this->input->post('id_blt'); - if($id_blt!="") - $_SESSION['id_blt']=$id_blt; - else unset($_SESSION['id_blt']); - redirect('rtm'); - } - function bos(){ - $id_bos = $this->input->post('id_bos'); - if($id_bos!="") - $_SESSION['id_bos']=$id_bos; - else unset($_SESSION['id_bos']); - redirect('rtm'); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('rtm'); - } - function insert(){ - $this->rtm_model->insert(); - redirect('rtm'); - } - function insert_by_kk(){ - $this->rtm_model->insert_by_kk(); - redirect('rtm'); - } - function insert_a(){ - $this->rtm_model->insert_a(); - redirect('rtm'); - } - function insert_new(){ - $this->rtm_model->insert_new(); - redirect('rtm'); - } - function update($id=''){ - $this->rtm_model->update($id); - redirect('rtm'); - } - function update_nokk($id=''){ - $this->rtm_model->update_nokk($id); - redirect('rtm'); - } - function delete($p=1,$o=0,$id=''){ - $this->rtm_model->delete($id); - redirect('rtm'); - } - function delete_all($p=1,$o=0){ - $this->rtm_model->delete_all(); - redirect('rtm'); - } - function anggota($p=1,$o=0,$id=0){ - $data['p'] = $p; - $data['o'] = $o; - $data['kk'] = $id; - - $data['main'] = $this->rtm_model->list_anggota($id); - $data['kepala_kk']= $this->rtm_model->get_kepala_kk($id); - $nav['act']= 3; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/kependudukan/rtm_anggota',$data); - $this->load->view('footer'); - } - - function ajax_add_anggota($p=1,$o=0,$id=0){ - $data['p'] = $p; - $data['o'] = $o; - $data['main'] = $this->rtm_model->list_anggota($id); - $kk = $this->rtm_model->get_kepala_kk($id); - if($kk) - $data['kepala_kk'] = $kk; - else - $data['kepala_kk'] = NULL; - $data['penduduk'] = $this->rtm_model->list_penduduk_lepas(); - - $data['form_action'] = site_url("rtm/add_anggota/$p/$o/$id"); - - $this->load->view("sid/kependudukan/ajax_add_anggota_rtm_form", $data); - } - - function edit_anggota($p=1,$o=0,$id_kk=0,$id=0){ - $data['p'] = $p; - $data['o'] = $o; - $data['hubungan'] = $this->rtm_model->list_hubungan(); - $data['main'] = $this->rtm_model->get_anggota($id); - $data['form_action'] = site_url("rtm/update_anggota/$p/$o/$id_kk/$id"); - $this->load->view("sid/kependudukan/ajax_edit_anggota_rtm", $data); - } - function kartu_rtm($p=1,$o=0,$id=0){ - $data['p'] = $p; - $data['o'] = $o; - $data['id_kk'] = $id; - $data['hubungan'] = $this->rtm_model->list_hubungan(); - $data['main'] = $this->rtm_model->list_anggota($id); - $kk = $this->rtm_model->get_kepala_kk($id); - $data['desa'] = $this->rtm_model->get_desa(); - - if($kk) - $data['kepala_kk'] = $kk; - - else - $data['kepala_kk'] = NULL; - - $data['penduduk'] = $this->rtm_model->list_penduduk_lepas(); - $nav['act']= 3; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('sid/nav',$nav); - $data['form_action'] = site_url("rtm/print"); - - $this->load->view("sid/kependudukan/kartu_rtm", $data); - $this->load->view('footer'); - - } - - function cetak_kk($id=0){ - $data['id_kk'] = $id; - $data['main'] = $this->rtm_model->list_anggota($id); - $kk = $this->rtm_model->get_kepala_kk($id); - $data['desa'] = $this->rtm_model->get_desa(); - $data['kepala_kk'] = $kk; - $nav['act']= 3; - $header = $this->header_model->get_data(); - $this->load->view("sid/kependudukan/cetak_rtm", $data); - - } - - function add_anggota($p=1,$o=0,$id=0){ - $this->rtm_model->add_anggota($id); - redirect("rtm/anggota/$p/$o/$id"); - } - function update_anggota($p=1,$o=0,$id_kk=0,$id=0){ - $this->rtm_model->update_anggota($id); - redirect("rtm/anggota/$p/$o/$id_kk"); - } - function delete_anggota($p=1,$o=0,$kk=0,$id=''){ - $this->rtm_model->rem_anggota($kk,$id); - redirect("rtm/anggota/$p/$o/$kk"); - } - function delete_all_anggota($p=1,$o=0,$kk=0){ - $this->rtm_model->rem_all_anggota($kk); - redirect("rtm/anggota/$p/$o/$kk"); - } - function cetak_statistik($tipe=0){ - $data['main'] = $this->rtm_model->list_data_statistik($tipe); - $this->load->view('sid/kependudukan/rtm_print',$data); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/sid_core.php b/donjo-app/controllers/sid_core.php deleted file mode 100644 index 5641da34a..000000000 --- a/donjo-app/controllers/sid_core.php +++ /dev/null @@ -1,445 +0,0 @@ -load->model('user_model'); - $this->load->model('wilayah_model'); - $this->load->model('config_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2) redirect('siteman'); - $this->load->model('header_model'); - } - - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - redirect('sid_core'); - } - function index($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - $data['grup'] = $this->user_model->sesi_grup($_SESSION['sesi']); - $data['paging'] = $this->wilayah_model->paging($p,$o); - $data['main'] = $this->wilayah_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->wilayah_model->autocomplete(); - $data['total'] = $this->wilayah_model->total(); - $nav['act']= 0; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/wilayah/wilayah',$data); - $this->load->view('footer'); - } - function cetak(){ - $data['desa'] = $this->header_model->get_data(); - $data['main'] = $this->wilayah_model->list_data(0,0,1000); - $data['total'] = $this->wilayah_model->total(); - $this->load->view('sid/wilayah/wilayah_print',$data); - } - function excel(){ - $data['desa'] = $this->header_model->get_data(); - $data['main'] = $this->wilayah_model->list_data(0,0,1000); - $data['total'] = $this->wilayah_model->total(); - $this->load->view('sid/wilayah/wilayah_excel',$data); - } - - function form($id=''){ - - $data['penduduk'] = $this->wilayah_model->list_penduduk(); - - if($id){ - $temp = $this->wilayah_model->cluster_by_id($id); - $data['dusun'] = $temp['dusun']; - $data['individu'] = $this->wilayah_model->get_penduduk($temp['id_kepala']); - if(empty($data['individu'])) - $data['individu'] = NULL; - else{ - $ex = $data['individu']; - $data['penduduk'] = $this->wilayah_model->list_penduduk_ex($ex['id']); - } - $data['form_action'] = site_url("sid_core/update/$id"); - } - else{ - $data['dusun'] = null; - $data['form_action'] = site_url("sid_core/insert"); - } - - $nav['act']= 0; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/wilayah/wilayah_form',$data); - $this->load->view('footer'); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('sid_core'); - } - function insert($dusun=''){ - $this->wilayah_model->insert(); - redirect('sid_core'); - } - function update($id=''){ - $this->wilayah_model->update($id); - redirect('sid_core'); - } - function delete($id=''){ - $this->wilayah_model->delete($id); - redirect('sid_core'); - } - function delete_all(){ - $this->wilayah_model->delete_all(); - redirect('sid_core'); - } - function sub_rw($id_dusun=''){ - $dusun = $this->wilayah_model->cluster_by_id($id_dusun); - $nama_dusun = $dusun['dusun']; - $data['dusun'] = $dusun['dusun']; - $data['id_dusun'] = $id_dusun; - $data['main'] = $this->wilayah_model->list_data_rw($id_dusun ); - $data['total'] = $this->wilayah_model->total_rw($nama_dusun ); - $nav['act']= 0; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/wilayah/wilayah_rw',$data); - $this->load->view('footer'); - } - - function cetak_rw($id_dusun=''){ - $dusun = $this->wilayah_model->cluster_by_id($id_dusun); - $nama_dusun = $dusun['dusun']; - $data['dusun'] = $dusun['dusun']; - $data['id_dusun'] = $id_dusun; - $data['main'] = $this->wilayah_model->list_data_rw($id_dusun ); - $data['total'] = $this->wilayah_model->total_rw($nama_dusun ); - $this->load->view('sid/wilayah/wilayah_rw_print',$data); - } - function excel_rw($id_dusun=''){ - $dusun = $this->wilayah_model->cluster_by_id($id_dusun); - $nama_dusun = $dusun['dusun']; - $data['dusun'] = $dusun['dusun']; - $data['id_dusun'] = $id_dusun; - $data['main'] = $this->wilayah_model->list_data_rw($id_dusun ); - $data['total'] = $this->wilayah_model->total_rw($nama_dusun ); - $this->load->view('sid/wilayah/wilayah_rw_excel',$data); - } - - function form_rw($id_dusun='',$rw=''){ - - $temp = $this->wilayah_model->cluster_by_id($id_dusun); - $dusun = $temp['dusun']; - $data['dusun'] = $temp['dusun']; - $data['id_dusun'] = $id_dusun; - - $data['penduduk'] = $this->wilayah_model->list_penduduk(); - - if($rw){ - $data['rw'] = $rw; - $temp = $this->wilayah_model->get_rw($dusun,$rw); - $data['individu'] = $this->wilayah_model->get_penduduk($temp['id_kepala']); - if(empty($data['individu'])) - $data['individu'] = NULL; - else{ - $ex = $data['individu']; - $data['penduduk'] = $this->wilayah_model->list_penduduk_ex($ex['id']); - } - $data['form_action'] = site_url("sid_core/update_rw/$id_dusun/$rw"); - } - else{ - $data['rw'] = null; - $data['form_action'] = site_url("sid_core/insert_rw/$id_dusun"); - } - - $nav['act']= 0; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/wilayah/wilayah_form_rw',$data); - $this->load->view('footer'); - } - - function insert_rw($dusun=''){ - $this->wilayah_model->insert_rw($dusun); - redirect("sid_core/sub_rw/$dusun"); - } - - function update_rw($dusun='',$rw=''){ - $this->wilayah_model->update_rw($dusun,$rw); - redirect("sid_core/sub_rw/$dusun"); - } - - function delete_rw($id_dusun='',$id=''){ - $this->wilayah_model->delete_rw($id); - redirect("sid_core/sub_rw/$id_dusun"); - } - function delete_all_rw($dusun=''){ - $this->wilayah_model->delete_all_rw(); - redirect("sid_core/sub_rw/$dusun"); - } - - function sub_rt($id_dusun='',$rw=''){ - $temp = $this->wilayah_model->cluster_by_id($id_dusun); - $dusun = $temp['dusun']; - $data['dusun'] = $temp['dusun']; - $data['id_dusun'] = $id_dusun; - - $data['rw'] = $rw; - $data['main'] = $this->wilayah_model->list_data_rt($dusun,$rw); - $data['total'] = $this->wilayah_model->total_rt($dusun,$rw); - $nav['act']= 0; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/wilayah/wilayah_rt',$data); - $this->load->view('footer'); - } - - function cetak_rt($id_dusun='',$rw=''){ - $temp = $this->wilayah_model->cluster_by_id($id_dusun); - $dusun = $temp['dusun']; - $data['dusun'] = $temp['dusun']; - $data['id_dusun'] = $id_dusun; - - $data['rw'] = $rw; - $data['main'] = $this->wilayah_model->list_data_rt($dusun,$rw); - $data['total'] = $this->wilayah_model->total_rt($dusun,$rw); - $this->load->view('sid/wilayah/wilayah_rt_print',$data); - } - function excel_rt($id_dusun='',$rw=''){ - $temp = $this->wilayah_model->cluster_by_id($id_dusun); - $dusun = $temp['dusun']; - $data['dusun'] = $temp['dusun']; - $data['id_dusun'] = $id_dusun; - - $data['rw'] = $rw; - $data['main'] = $this->wilayah_model->list_data_rt($dusun,$rw); - $data['total'] = $this->wilayah_model->total_rt($dusun,$rw); - $this->load->view('sid/wilayah/wilayah_rt_excel',$data); - } - function list_dusun_rt($dusun='',$rw=''){ - $data['dusun'] = $dusun; - $data['rw'] = $rw; - $data['main'] = $this->wilayah_model->list_data_rt($dusun,$rw); - $nav['act']= 0; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/wilayah/list_dusun_rt',$data); - $this->load->view('footer'); - } - - function form_rt($id_dusun='',$rw='',$rt=''){ - - $temp = $this->wilayah_model->cluster_by_id($id_dusun); - $dusun = $temp['dusun']; - $data['dusun'] = $temp['dusun']; - $data['id_dusun'] = $id_dusun; - - $data['rw'] = $rw; - $data['penduduk'] = $this->wilayah_model->list_penduduk(); - - if($rt){ - $temp2 = $this->wilayah_model->cluster_by_id($rt); - $id_cluster=$temp2['id']; - $data['rt'] =$temp2['rt']; - $data['individu'] = $this->wilayah_model->get_penduduk($temp2['id_kepala']); - if(empty($data['individu'])) - $data['individu'] = NULL; - else{ - $ex = $data['individu']; - $data['penduduk'] = $this->wilayah_model->list_penduduk_ex($ex['id']); - } - $data['form_action'] = site_url("sid_core/update_rt/$id_dusun/$rw/$id_cluster"); - } - else{ - $data['rt'] = null; - $data['form_action'] = site_url("sid_core/insert_rt/$id_dusun/$rw"); - } - - $nav['act']= 0; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/wilayah/wilayah_form_rt',$data); - $this->load->view('footer'); - } - - function insert_rt($dusun='',$rw=''){ - $this->wilayah_model->insert_rt($dusun,$rw); - redirect("sid_core/sub_rt/$dusun/$rw"); - } - - function update_rt($dusun='',$rw='',$id_cluster=0){ - $this->wilayah_model->update_rt($id_cluster); - redirect("sid_core/sub_rt/$dusun/$rw"); - } - - function delete_rt($id_cluster=''){ - $temp = $this->wilayah_model->cluster_by_id($id_cluster); - $id_dusun=$temp['id']; - $dusun=$temp['dusun']; - $rw=$temp['rw']; - $this->wilayah_model->delete_rt($id_cluster); - echo ""; - } - function delete_all_rt(){ - $temp = $this->wilayah_model->cluster_by_id($id_cluster); - $id_dusun=$temp['id']; - $dusun=$temp['dusun']; - $rw=$temp['rw']; - $this->wilayah_model->delete_all_rt(); - redirect("sid_core"); - } - function cetakx(){ - $data['input'] = $_POST; - $data['tanggal_sekarang'] = tgl_indo(date("Y m d")); - $data['total'] = $this->wilayah_model->total(); - $this->surat_keluar_model->log_surat($f,$id,$g,$u); - $this->load->view('surat/print_surat_ket_pengantar',$data); - } - - function ajax_wil_maps($id=0){ - $data['dusun'] = $this->wilayah_model->get_dusun_maps($id); - $data['desa'] = $this->config_model->get_data(); - $data['form_action'] = site_url("sid_core/update_dusun_map/$id"); - - $this->load->view("sid/wilayah/ajax_wil_dusun", $data); - } - - function update_dusun_map($id=0){ - $this->wilayah_model->update_dusun_map($id); - redirect("sid_core"); - } - function ajax_rw_maps($dus=0,$id=0){ - $data['dusun'] = $this->wilayah_model->get_rw($dus,$id); - $data['desa'] = $this->config_model->get_data(); - $data['form_action'] = site_url("sid_core/update_rw_map/$dus/$id"); - - $this->load->view("sid/wilayah/ajax_wil_dusun", $data); - } - - function update_rw_map($dus=0,$id=0){ - $this->wilayah_model->update_rw_map($dus,$id); - redirect("sid_core/sub_rw/$dus"); - } - - function ajax_rt_maps($dus=0,$rw=0,$id=0){ - $data['dusun'] = $this->wilayah_model->get_rt($dus,$rw,$id); - $data['desa'] = $this->config_model->get_data(); - $data['form_action'] = site_url("sid_core/update_rt_map/$dus/$rw/$id"); - - $this->load->view("sid/wilayah/ajax_wil_dusun", $data); - } - - function update_rt_map($dus=0,$rw=0,$id=0){ - $this->wilayah_model->update_rt_map($dus,$rw,$id); - redirect("sid_core/sub_rt/$dus/$rw"); - } - - function warga($id=''){ - $temp = $this->wilayah_model->cluster_by_id($id); - $id_dusun=$temp['id']; - $dusun=$temp['dusun']; - - $_SESSION['per_page'] = 100; - $_SESSION['dusun'] = $dusun; - redirect("penduduk/index/1/0"); - } - function warga_kk($id=''){ - $temp = $this->wilayah_model->cluster_by_id($id); - $id_dusun=$temp['id']; - $dusun=$temp['dusun']; - $_SESSION['per_page'] = 50; - $_SESSION['dusun'] = $dusun; - redirect("keluarga/index/1/0"); - } - function warga_l($id=''){ - $temp = $this->wilayah_model->cluster_by_id($id); - $id_dusun=$temp['id']; - $dusun=$temp['dusun']; - - $_SESSION['per_page'] = 100; - $_SESSION['dusun'] = $dusun; - $_SESSION['sex'] = 1; - redirect("penduduk/index/1/0"); - } - function warga_p($id=''){ - $temp = $this->wilayah_model->cluster_by_id($id); - $id_dusun=$temp['id']; - $dusun=$temp['dusun']; - - $_SESSION['per_page'] = 100; - $_SESSION['dusun'] = $dusun; - $_SESSION['sex'] = 2; - redirect("penduduk/index/1/0"); - } - - function migrate(){ - $this->wilayah_model->migrate(); - - $this->dbforge->drop_table('tweb_dusun_x'); - $this->dbforge->drop_table('tweb_rw_x'); - $this->dbforge->drop_table('tweb_rt_x'); - $this->dbforge->drop_table('tweb_keluarga_x'); - $this->dbforge->drop_table('tweb_keluarga_x_pindah'); - $this->dbforge->drop_table('tweb_penduduk_x'); - $this->dbforge->drop_table('tweb_penduduk_x_pindah'); - - redirect("penduduk/clear"); - } - function pre_migrate(){ - $nav['act']= 3; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/wilayah/mig'); - $this->load->view('footer'); - } - -} \ No newline at end of file diff --git a/donjo-app/controllers/siteman.php b/donjo-app/controllers/siteman.php deleted file mode 100644 index b8e7d1148..000000000 --- a/donjo-app/controllers/siteman.php +++ /dev/null @@ -1,36 +0,0 @@ -load->model('header_model'); - $this->load->model('user_model'); - $this->load->model('config_model'); - } - function index(){ - $this->user_model->logout(); - $header = $this->header_model->get_config(); - - - if(!isset($_SESSION['siteman'])) - $_SESSION['siteman']=0; - $_SESSION['success'] = 0; - $_SESSION['per_page'] = 10; - $_SESSION['cari'] = ''; - $_SESSION['pengumuman'] = 0; - $_SESSION['sesi'] = "kosong"; - $_SESSION['timeout'] = 0; - - $this->load->view('siteman',$header); - $_SESSION['siteman']=0; - } - function auth(){ - $this->config_model->do_reg(); - $this->user_model->siteman(); - redirect('main'); - } - function login(){ - $this->user_model->logout(); - redirect('siteman'); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/sms.php b/donjo-app/controllers/sms.php deleted file mode 100644 index 9ab5a5fab..000000000 --- a/donjo-app/controllers/sms.php +++ /dev/null @@ -1,624 +0,0 @@ -load->model('user_model'); - $this->load->model('sms_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); - $this->load->model('header_model'); - $this->load->model('penduduk_model'); - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - unset($_SESSION['cari1']); - unset($_SESSION['sex1']); - unset($_SESSION['dusun1']); - unset($_SESSION['rw1']); - unset($_SESSION['rt1']); - unset($_SESSION['agama1']); - unset($_SESSION['pekerjaan1']); - unset($_SESSION['status1']); - unset($_SESSION['pendidikan1']); - unset($_SESSION['status_penduduk1']); - unset($_SESSION['TextDecoded1']); - unset($_SESSION['grup1']); - redirect('sms'); - } - function index($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->sms_model->paging($p,$o); - $data['main'] = $this->sms_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->sms_model->autocomplete(); - $header = $this->header_model->get_data(); - $menu['act']='0'; - - $this->load->view('header', $header); - $this->load->view('sms/nav',$menu); - $this->load->view('sms/manajemen_sms_table',$data); - $this->load->view('footer'); - unset($_SESSION['cari']); - unset($_SESSION['filter']); - unset($_SESSION['cari1']); - unset($_SESSION['sex1']); - unset($_SESSION['dusun1']); - unset($_SESSION['rw1']); - unset($_SESSION['rt1']); - unset($_SESSION['agama1']); - unset($_SESSION['pekerjaan1']); - unset($_SESSION['status1']); - unset($_SESSION['pendidikan1']); - unset($_SESSION['status_penduduk1']); - unset($_SESSION['TextDecoded1']); - unset($_SESSION['grup1']); - } - function setting($p=1,$o=0){ - $data['main'] = $this->sms_model->get_autoreply(); - $data['form_action'] = site_url("sms/insert_autoreply"); - $header = $this->header_model->get_data(); - $menu['act']='1'; - - $this->load->view('header', $header); - $this->load->view('sms/nav',$menu); - $this->load->view('sms/setting',$data); - $this->load->view('footer'); - } - function insert_autoreply(){ - $this->sms_model->insert_autoreply(); - redirect('sms/setting'); - } - function polling($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari_polling'])) - $data['cari_polling'] = $_SESSION['cari_polling']; - else $data['cari_polling'] = ''; - - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->sms_model->paging_polling($p,$o); - $data['main'] = $this->sms_model->list_data_polling($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->sms_model->autocomplete(); - $header = $this->header_model->get_data(); - $menu['act']='3'; - - $this->load->view('header', $header); - $this->load->view('sms/nav',$menu); - $this->load->view('sms/polling',$data); - $this->load->view('footer'); - } - function outbox($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->sms_model->paging_terkirim($p,$o); - $data['main'] = $this->sms_model->list_data_terkirim($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->sms_model->autocomplete(); - $header = $this->header_model->get_data(); - $menu['act']='0'; - - $this->load->view('header', $header); - $this->load->view('sms/nav',$menu); - $this->load->view('sms/create_sms',$data); - $this->load->view('footer'); - unset($_SESSION['cari']); - unset($_SESSION['filter']); - unset($_SESSION['cari1']); - unset($_SESSION['sex1']); - unset($_SESSION['dusun1']); - unset($_SESSION['rw1']); - unset($_SESSION['rt1']); - unset($_SESSION['agama1']); - unset($_SESSION['pekerjaan1']); - unset($_SESSION['status1']); - unset($_SESSION['pendidikan1']); - unset($_SESSION['status_penduduk1']); - unset($_SESSION['TextDecoded1']); - unset($_SESSION['grup1']); - } - function sentitem($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->sms_model->paging_terkirim($p,$o); - $data['main'] = $this->sms_model->list_data_terkirim($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->sms_model->autocomplete(); - $header = $this->header_model->get_data(); - $menu['act']='0'; - - $this->load->view('header', $header); - $this->load->view('sms/nav',$menu); - $this->load->view('sms/berita_terkirim',$data); - $this->load->view('footer'); - unset($_SESSION['cari']); - unset($_SESSION['filter']); - unset($_SESSION['cari1']); - unset($_SESSION['sex1']); - unset($_SESSION['dusun1']); - unset($_SESSION['rw1']); - unset($_SESSION['rt1']); - unset($_SESSION['agama1']); - unset($_SESSION['pekerjaan1']); - unset($_SESSION['status1']); - unset($_SESSION['pendidikan1']); - unset($_SESSION['status_penduduk1']); - unset($_SESSION['TextDecoded1']); - unset($_SESSION['grup1']); - } - function pending($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->sms_model->paging_tertunda($p,$o); - $data['main'] = $this->sms_model->list_data_tertunda($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->sms_model->autocomplete(); - $header = $this->header_model->get_data(); - $menu['act']='0'; - - $this->load->view('header', $header); - $this->load->view('sms/nav',$menu); - $this->load->view('sms/pesan_tertunda',$data); - $this->load->view('footer'); - unset($_SESSION['cari']); - unset($_SESSION['filter']); - unset($_SESSION['cari1']); - unset($_SESSION['sex1']); - unset($_SESSION['dusun1']); - unset($_SESSION['rw1']); - unset($_SESSION['rt1']); - unset($_SESSION['agama1']); - unset($_SESSION['pekerjaan1']); - unset($_SESSION['status1']); - unset($_SESSION['pendidikan1']); - unset($_SESSION['status_penduduk1']); - unset($_SESSION['TextDecoded1']); - unset($_SESSION['grup1']); - } - function form($p=1,$o=0,$tipe=0,$id=0){ - $data['p'] = $p; - $data['o'] = $o; - - if($id){ - $data['sms'] = $this->sms_model->get_sms($tipe,$id); - $data['form_action'] = site_url("sms/insert/$tipe"); - $data['tipe']['tipe']=$tipe; - $data['grup'] = $this->sms_model->list_grup(); - $data['kontak'] = $this->sms_model->list_kontak(); - $this->load->view('sms/ajax_sms_form',$data); - } - else{ - $data['sms'] = null; - $data['form_action'] = site_url("sms/insert/$tipe"); - $data['tipe']['tipe']=$tipe; - $data['grup'] = $this->sms_model->list_grup(); - $data['kontak'] = $this->sms_model->list_kontak(); - $this->load->view('sms/ajax_sms_form_kirim',$data); - } - } - function carikontak($tipe=0){ - if(isset($_POST['TextDecoded'])) - $data['text']['TextDecoded']=$_POST['TextDecoded']; - $data['text']['TextDecoded'] = null; - - $data['form_action'] = site_url("sms/formaftercari/0/0/$tipe"); - - $data['kontak'] = $this->sms_model->list_kontak(); - $this->load->view('sms/ajax_sms_form_cari',$data); - } - function formaftercari($tipe=0){ - $data['sms']['DestinationNumber'] = $_POST['kontak']; - $data['sms']['TextDecoded'] = $_POST['text']; - $data['form_action'] = site_url("sms/insert/$tipe"); - $data['tipe']['tipe']=$tipe; - $data['grup'] = $this->sms_model->list_grup(); - $this->load->view('sms/ajax_sms_form',$data); - } - function send_broadcast(){ - $data['input'] = $_POST; - if(isset($_SESSION['cari1'])) - $data['cari1'] = $_SESSION['cari1']; - else $data['cari1'] = ''; - if(isset($_SESSION['sex1'])) - $data['sex1'] = $_SESSION['sex1']; - else $data['sex1'] = ''; - - if(isset($_SESSION['dusun1'])){ - $data['dusun1'] = $_SESSION['dusun1']; - $data['list_rw1'] = $this->penduduk_model->list_rw($data['dusun1']); - - if(isset($_SESSION['rw1'])){ - $data['rw1'] = $_SESSION['rw1']; - $data['list_rt1'] = $this->penduduk_model->list_rt($data['dusun1'],$data['rw11']); - - if(isset($_SESSION['rt1'])) - $data['rt1'] = $_SESSION['rt1']; - else $data['rt1'] = ''; - - }else $data['rw1'] = ''; - - }else $data['dusun1'] = ''; - - if(isset($_SESSION['agama1'])) - $data['agama1'] = $_SESSION['agama1']; - else $data['agama1'] = ''; - if(isset($_SESSION['pekerjaan1'])) - $data['pekerjaan1'] = $_SESSION['pekerjaan1']; - else $data['pekerjaan1'] = ''; - if(isset($_SESSION['status1'])) - $data['status1'] = $_SESSION['status1']; - else $data['status1'] = ''; - if(isset($_SESSION['pendidikan1'])) - $data['pendidikan1'] = $_SESSION['pendidikan1']; - else $data['pendidikan1'] = ''; - if(isset($_SESSION['status_penduduk1'])) - $data['status_penduduk1'] = $_SESSION['status_penduduk1']; - else $data['status_penduduk1'] = ''; - - if(isset($_SESSION['TextDecoded1'])) - $data['TextDecoded1'] = $_SESSION['TextDecoded1']; - else $data['TextDecoded1'] = ''; - if(isset($_SESSION['grup1'])) - $data['grup'] = $_SESSION['grup1']; - else $data['grup1'] = ''; - $data['insert'] = $this->sms_model->send_broadcast($data); - redirect('sms/outbox'); - } - function broadcast_proses(){ - $adv_search = $_POST; - $i=0; - while($i++ < count($adv_search)){ - $col[$i] = key($adv_search); - next($adv_search); - } - $i=0; - while($i++ < count($col)){ - if($adv_search[$col[$i]]=="") - UNSET($adv_search[$col[$i]]); - else - $_SESSION[$col[$i]]=$adv_search[$col[$i]]; - } - - redirect('sms/send_broadcast'); - } - function broadcast(){ - $data['dusun'] = $this->penduduk_model->list_dusun(); - $data['agama'] = $this->penduduk_model->list_agama(); - $data['pendidikan'] = $this->penduduk_model->list_pendidikan(); - $data['pekerjaan'] = $this->penduduk_model->list_pekerjaan(); - $data['grup'] = $this->sms_model->list_grup_kontak(); - $data['form_action'] = site_url("sms/broadcast_proses"); - $this->load->view('sms/ajax_broadcast_form',$data); - } - function ajax_penduduk_rw($dusun=''){ - $rw = $this->penduduk_model->list_rw($dusun); - echo"RW - - "; - } - function ajax_penduduk_rt($dusun='',$rw=''){ - $rt = $this->penduduk_model->list_rt($dusun,$rw); - echo "RT - - "; - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('sms'); - } - function search_kontak(){ - $cari = $this->input->post('cari_kontak'); - if($cari!='') - $_SESSION['cari_kontak']=$cari; - else unset($_SESSION['cari_kontak']); - redirect('sms/kontak'); - - } - function search_grup(){ - $cari = $this->input->post('cari_grup'); - if($cari!='') - $_SESSION['cari_grup']=$cari; - else unset($_SESSION['cari_grup']); - redirect('sms/group'); - } - function search_anggota($id=0){ - $cari = $this->input->post('cari_anggota'); - if($cari!='') - $_SESSION['cari_anggota']=$cari; - else unset($_SESSION['cari_anggota']); - redirect("sms/anggota/$id"); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!=0) - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('sms'); - } - function insert($tipe=0){ - $this->sms_model->insert(); - if($tipe==1){redirect('sms');} - elseif($tipe==2){redirect('sms/sentitem');} - elseif($tipe==3){redirect('sms/pending');} - else{redirect('sms/outbox');} - } - function update($id='',$p=1,$o=0){ - $this->sms_model->update($id); - redirect("sms/index/$p/$o"); - } - function delete($p=1,$o=0,$tipe=0,$id=''){ - $this->sms_model->delete($tipe,$id); - if($tipe==1){redirect('sms');} - elseif($tipe==2){redirect('sms/sentitem');} - elseif($tipe==3){redirect('sms/pending');} - else{redirect('sms/outbox');} - } - function delete_all($p=1,$o=0,$tipe=0){ - $this->sms_model->delete_all($tipe); - if($tipe==1){redirect('sms');} - elseif($tipe==2){redirect('sms/sentitem');} - elseif($tipe==3){redirect('sms/pending');} - else{redirect('sms/outbox');} - } - function sms_lock($id=''){ - $this->sms_model->sms_lock($id,0); - redirect("sms/index/$p/$o"); - } - function sms_unlock($id=''){ - $this->sms_model->sms_lock($id,1); - redirect("sms/index/$p/$o"); - } - function kontak($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari_kontak'])) - $data['cari_kontak'] = $_SESSION['cari_kontak']; - else $data['cari_kontak'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->sms_model->paging_kontak($p,$o); - $data['main'] = $this->sms_model->list_data_kontak($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->sms_model->autocomplete(); - $header = $this->header_model->get_data(); - $menu['act']='2'; - - $this->load->view('header', $header); - $this->load->view('sms/nav',$menu); - $this->load->view('sms/kontak',$data); - $this->load->view('footer'); - unset($_SESSION['cari_kontak']); - } - function form_kontak($id=0){ - $data['nama'] = $this->sms_model->list_nama(); - $data['form_action'] = site_url("sms/kontak_insert"); - $data['kontak'] = $this->sms_model->get_kontak($id); - if($id==0){ - $this->load->view('sms/ajax_kontak_form',$data); - } - else{ - $this->load->view('sms/ajax_kontak_form_edit',$data); - } - } - function kontak_insert(){ - $data['input'] = $_POST; - $data['insert'] = $this->sms_model->insert_kontak($data); - redirect('sms/kontak'); - } - function kontak_delete($id=0){ - $data['hapus'] = $this->sms_model->delete_kontak($id); - redirect('sms/kontak'); - } - function delete_all_kontak(){ - $this->sms_model->delete_all_kontak(); - redirect('sms/kontak'); - } - function group($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari_grup'])) - $data['cari_grup'] = $_SESSION['cari_grup']; - else $data['cari_grup'] = ''; - - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->sms_model->paging_grup($p,$o); - $data['main'] = $this->sms_model->list_data_grup($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->sms_model->autocomplete(); - $header = $this->header_model->get_data(); - $menu['act']='2'; - - $this->load->view('header', $header); - $this->load->view('sms/nav',$menu); - $this->load->view('sms/group',$data); - $this->load->view('footer'); - unset($_SESSION['cari_grup']); - } - function form_grup($id=0){ - if($id=="0"){ - $data['form_action'] = site_url("sms/grup_insert"); - $data['grup']['nama_grup'] = ""; - }else{ - $data['form_action'] = site_url("sms/grup_update"); - $data['grup'] = $this->sms_model->get_grup($id); - } - $this->load->view('sms/ajax_grup_form',$data); - } - function grup_insert(){ - $data['input'] = $_POST; - $data['insert'] = $this->sms_model->insert_grup($data); - redirect('sms/group'); - } - function grup_update(){ - $data['input'] = $_POST; - $data['update'] = $this->sms_model->update_grup($data); - redirect('sms/group'); - } - function grup_delete($id=0){ - $data['hapus'] = $this->sms_model->delete_grup($id); - redirect('sms/group'); - } - function delete_all_grup(){ - $this->sms_model->delete_all_grup(); - redirect('sms/group'); - } - function anggota($id=0,$p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari_anggota'])) - $data['cari_anggota'] = $_SESSION['cari_anggota']; - else $data['cari_anggota'] = ''; - - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->sms_model->paging_anggota($id,$p,$o); - $data['main'] = $this->sms_model->list_data_anggota($id,$o, $data['paging']->offset, $data['paging']->per_page); - $data['grup']['nama_grup']=$id; - $data['keyword'] = $this->sms_model->autocomplete(); - $header = $this->header_model->get_data(); - $menu['act']='2'; - - $this->load->view('header', $header); - $this->load->view('sms/nav',$menu); - $this->load->view('sms/group_detail',$data); - $this->load->view('footer'); - unset($_SESSION['cari_anggota']); - } - function form_anggota($id=0){ - $data['form_action'] = site_url("sms/anggota_insert/$id"); - $data['main'] = $this->sms_model->list_data_nama($id); - $this->load->view('sms/ajax_anggota_form',$data); - } - function anggota_insert($id=0){ - $data['insert'] = $this->sms_model->insert_anggota($id); - redirect("sms/anggota/$id"); - } - function anggota_delete($grup=0,$id=0){ - $data['hapus'] = $this->sms_model->delete_anggota($grup,$id); - redirect("sms/anggota/$grup"); - } - function delete_all_anggota($grup=0){ - $this->sms_model->delete_all_anggota($grup); - redirect("sms/anggota/$grup"); - } - function form_polling($id=0){ - - $data['main'] = $this->sms_model->get_data_polling($id); - - $data['form_action'] = site_url("sms/insert_polling/$id"); - $this->load->view('sms/ajax_polling_form',$data); - } - function insert_polling($id=0){ - $data['insert'] = $this->sms_model->insert_polling($id); - redirect("sms/polling"); - } - function polling_delete($id=0){ - $data['hapus'] = $this->sms_model->delete_polling($id); - redirect("sms/polling"); - } - function delete_all_polling(){ - $this->sms_model->delete_all_polling(); - redirect("sms/polling"); - } - function pertanyaan($id=0,$p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->sms_model->paging_pertanyaan($id,$p,$o); - $data['main'] = $this->sms_model->list_data_pertanyaan($id,$o, $data['paging']->offset, $data['paging']->per_page); - $data['polling']['id_polling']=$id; - $data['keyword'] = $this->sms_model->autocomplete(); - $header = $this->header_model->get_data(); - $menu['act']='2'; - - $this->load->view('header', $header); - $this->load->view('sms/nav',$menu); - $this->load->view('sms/pertanyaan',$data); - $this->load->view('footer'); - } - function form_pertanyaan($id=0){ - $data['form_action'] = site_url("sms/pertanyaan_insert/$id"); - $this->load->view('sms/ajax_pertanyaan_form',$data); - } - function pertanyaan_insert($id=0){ - $data['insert'] = $this->sms_model->insert_pertanyaan($id); - redirect("sms/pertanyaan/$id"); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/sosmed.php b/donjo-app/controllers/sosmed.php deleted file mode 100644 index 6bee62486..000000000 --- a/donjo-app/controllers/sosmed.php +++ /dev/null @@ -1,83 +0,0 @@ -load->model('user_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); - $this->load->model('header_model'); - $this->load->model('web_sosmed_model'); - } - function index(){ - $data['main'] = $this->web_sosmed_model->get_sosmed(1); - $id=$data['main']['id']; - $data['form_action'] = site_url("sosmed/update/1"); - $header = $this->header_model->get_data(); - $nav['act']=6; - - $this->load->view('header', $header); - $this->load->view('web/nav',$nav); - $this->load->view('sosmed/facebook',$data); - $this->load->view('footer'); - } - function twitter(){ - $data['main'] = $this->web_sosmed_model->get_sosmed(2); - $id=$data['main']['id']; - $data['form_action'] = site_url("sosmed/update/2/$id"); - $header = $this->header_model->get_data(); - $nav['act']=6; - - $this->load->view('header', $header); - $this->load->view('web/nav',$nav); - $this->load->view('sosmed/twitter',$data); - $this->load->view('footer'); - } - function instagram(){ - $data['main'] = $this->web_sosmed_model->get_sosmed(5); - $data['form_action'] = site_url("sosmed/update/5"); - $header = $this->header_model->get_data(); - $nav['act']=6; - - $this->load->view('header', $header); - $this->load->view('web/nav',$nav); - $this->load->view('sosmed/google',$data); - $this->load->view('footer'); - } - function google(){ - $data['main'] = $this->web_sosmed_model->get_sosmed(3); - $data['form_action'] = site_url("sosmed/update/3"); - $header = $this->header_model->get_data(); - $nav['act']=6; - - $this->load->view('header', $header); - $this->load->view('web/nav',$nav); - $this->load->view('sosmed/instagram',$data); - $this->load->view('footer'); - } - function youtube(){ - $data['main'] = $this->web_sosmed_model->get_sosmed(4); - $data['form_action'] = site_url("sosmed/update/4"); - $header = $this->header_model->get_data(); - $nav['act']=6; - - $this->load->view('header', $header); - $this->load->view('web/nav',$nav); - $this->load->view('sosmed/youtube',$data); - $this->load->view('footer'); - } - function update($id=''){ - $this->web_sosmed_model->update($id); - if($id=='1'){ - redirect("sosmed"); - }elseif($id=='2'){ - redirect("sosmed/twitter"); - }elseif($id=='3'){ - redirect("sosmed/google"); - }elseif($id=='4'){ - redirect("sosmed/youtube"); - }else{ - redirect("sosmed/instagram"); - } - } -} \ No newline at end of file diff --git a/donjo-app/controllers/statistik.php b/donjo-app/controllers/statistik.php deleted file mode 100644 index 25cdc2e2c..000000000 --- a/donjo-app/controllers/statistik.php +++ /dev/null @@ -1,317 +0,0 @@ -load->model('user_model'); - $this->load->model('laporan_penduduk_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); - $this->load->model('header_model'); - $_SESSION['per_page']= 500; - } - function index($lap=0,$o=0){ - $data['main'] = $this->laporan_penduduk_model->list_data($lap,$o); - $data['lap']=$lap; - $data['o']=$o; - - switch($lap){ - case 0: $data['stat'] = "Pendidikan dalam KK"; break; - case 1: $data['stat'] = "Pekerjaan"; break; - case 2: $data['stat'] = "Status Perkawinan"; break; - case 3: $data['stat'] = "Agama"; break; - case 4: $data['stat'] = "Jenis Kelamin"; break; - case 5: $data['stat'] = "Warga Negara"; break; - case 6: $data['stat'] = "Status"; break; - case 7: $data['stat'] = "Golongan Darah"; break; - case 9: $data['stat'] = "Cacat"; break; - case 10: $data['stat'] = "Sakit Menahun"; break; - case 11: $data['stat'] = "Jamkesmas"; break; - case 13: $data['stat'] = "Umur (Detail)"; break; - case 15: $data['stat'] = "Umur"; break; - case 14: $data['stat'] = "Pendidikan Sedang Ditempuh"; break; - case 21: $data['stat'] = "Klasifikasi Sosial"; break; - case 22: $data['stat'] = "Penerima Raskin"; break; - case 23: $data['stat'] = "Penerima BLT"; break; - case 24: $data['stat'] = "Penerima BOS"; break; - case 25: $data['stat'] = "Penerima PKH"; break; - case 26: $data['stat'] = "Penerima Jampersal"; break; - case 27: $data['stat'] = "Penerima Bedah Rumah"; break; - default:$data['stat'] = "Pendidikan"; - } - - $nav['act']= 0; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('statistik/nav',$nav); - $this->load->view('statistik/penduduk',$data); - $this->load->view('footer'); - } - - function clear(){ - unset($_SESSION['log']); - unset($_SESSION['cari']); - unset($_SESSION['filter']); - unset($_SESSION['sex']); - unset($_SESSION['warganegara']); - unset($_SESSION['cacat']); - unset($_SESSION['menahun']); - unset($_SESSION['golongan_darah']); - unset($_SESSION['dusun']); - unset($_SESSION['rw']); - unset($_SESSION['rt']); - unset($_SESSION['agama']); - unset($_SESSION['umur_min']); - unset($_SESSION['umur_max']); - unset($_SESSION['pekerjaan_id']); - unset($_SESSION['status']); - unset($_SESSION['pendidikan_id']); - unset($_SESSION['status_penduduk']); - redirect('statistik'); - } - function graph($lap=0){ - $data['main'] = $this->laporan_penduduk_model->list_data($lap); - $data['lap']=$lap; - - - switch($lap){ - case 1: $data['stat'] = "Pekerjaan"; break; - case 2: $data['stat'] = "Status Perkawinan"; break; - case 3: $data['stat'] = "Agama"; break; - case 4: $data['stat'] = "Jenis Kelamin"; break; - case 5: $data['stat'] = "Warga Negara"; break; - case 6: $data['stat'] = "Status Kependudukan"; break; - case 7: $data['stat'] = "Golongan Darah"; break; - case 9: $data['stat'] = "Difabilitas (Cacat)"; break; - case 10: $data['stat'] = "Sakit Menahun"; break; - case 11: $data['stat'] = "Jamkesmas"; break; - case 0: $data['stat'] = "Pendidikan dalam KK"; break; - case 13: $data['stat'] = "Umur (Detail)"; break; - case 15: $data['stat'] = "Umur"; break; - case 14: $data['stat'] = "Pendidikan Sedang Ditempuh"; break; - case 21: $data['stat'] = "Klasifikasi Sosial"; break; - case 22: $data['stat'] = "Penerima Raskin"; break; - case 23: $data['stat'] = "Penerima BLT"; break; - case 24: $data['stat'] = "Penerima BOS"; break; - case 25: $data['stat'] = "Penerima PKH"; break; - case 26: $data['stat'] = "Penerima Jampersal"; break; - case 27: $data['stat'] = "Penerima Bedah Rumah"; break; - default:$data['stat'] = "Pendidikan"; - } - - $nav['act']= 0; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('statistik/nav',$nav); - $this->load->view('statistik/penduduk_graph',$data); - $this->load->view('footer'); - } - - function pie($lap=0){ - $data['main'] = $this->laporan_penduduk_model->list_data($lap); - $data['lap']=$lap; - - - switch($lap){ - case 0: $data['stat'] = "Pendidikan Telah Ditempuh"; break; - case 1: $data['stat'] = "Pekerjaan"; break; - case 2: $data['stat'] = "Status Perkawinan"; break; - case 3: $data['stat'] = "Agama"; break; - case 4: $data['stat'] = "Jenis Kelamin"; break; - case 5: $data['stat'] = "Warga Negara"; break; - case 6: $data['stat'] = "Status"; break; - case 7: $data['stat'] = "Golongan Darah"; break; - case 9: $data['stat'] = "Cacat"; break; - case 10: $data['stat'] = "Sakit Menahun"; break; - case 11: $data['stat'] = "Jamkesmas"; break; - case 12: $data['stat'] = "Pendidikan dalam KK"; break; - case 13: $data['stat'] = "Umur (Detail)"; break; - case 15: $data['stat'] = "Umur"; break; - case 14: $data['stat'] = "Pendidikan Sedang Ditempuh"; break; - case 21: $data['stat'] = "Klasifikasi Sosial"; break; - case 22: $data['stat'] = "Penerima Raskin"; break; - case 23: $data['stat'] = "Penerima BLT"; break; - case 24: $data['stat'] = "Penerima BOS"; break; - case 25: $data['stat'] = "Penerima PKH"; break; - case 26: $data['stat'] = "Penerima Jampersal"; break; - case 27: $data['stat'] = "Penerima Bedah Rumah"; break; - default:$data['stat'] = "Pendidikan"; - } - - $nav['act']= 0; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('statistik/nav',$nav); - $this->load->view('statistik/penduduk_pie',$data); - $this->load->view('footer'); - } - - function cetak($lap=0){ - $data['lap']=$lap; - switch($lap){ - case 0: $data['stat'] = "Pendidikan Telah Ditempuh"; break; - case 1: $data['stat'] = "Pekerjaan"; break; - case 2: $data['stat'] = "Status Perkawinan"; break; - case 3: $data['stat'] = "Agama"; break; - case 4: $data['stat'] = "Jenis Kelamin"; break; - case 5: $data['stat'] = "Warga Negara"; break; - case 6: $data['stat'] = "Status"; break; - case 7: $data['stat'] = "Golongan Darah"; break; - case 9: $data['stat'] = "Cacat"; break; - case 10: $data['stat'] = "Sakit Menahun"; break; - case 11: $data['stat'] = "Jamkesmas"; break; - case 12: $data['stat'] = "Pendidikan dalam KK"; break; - case 13: $data['stat'] = "Umur"; break; - case 14: $data['stat'] = "Pendidikan Sedang Ditempuh"; break; - case 21: $data['stat'] = "Klasifikasi Sosial"; break; - case 22: $data['stat'] = "Penerima Raskin"; break; - case 23: $data['stat'] = "Penerima BLT"; break; - case 24: $data['stat'] = "Penerima BOS"; break; - case 25: $data['stat'] = "Penerima PKH"; break; - case 26: $data['stat'] = "Penerima Jampersal"; break; - case 27: $data['stat'] = "Penerima Bedah Rumah"; break; - default:$data['stat'] = "Pendidikan"; - } - - $data['config'] = $this->laporan_penduduk_model->get_config(); - $data['main'] = $this->laporan_penduduk_model->list_data($lap); - $this->load->view('statistik/penduduk_print',$data); - } - function excel($lap=0){ - $data['lap']=$lap; - switch($lap){ - case 0: $data['stat'] = "Pendidikan Telah Ditempuh"; break; - case 1: $data['stat'] = "Pekerjaan"; break; - case 2: $data['stat'] = "Status Perkawinan"; break; - case 3: $data['stat'] = "Agama"; break; - case 4: $data['stat'] = "Jenis Kelamin"; break; - case 5: $data['stat'] = "Warga Negara"; break; - case 6: $data['stat'] = "Status"; break; - case 7: $data['stat'] = "Golongan Darah"; break; - case 9: $data['stat'] = "Cacat"; break; - case 10: $data['stat'] = "Sakit Menahun"; break; - case 11: $data['stat'] = "Jamkesmas"; break; - case 12: $data['stat'] = "Pendidikan dalam KK"; break; - case 13: $data['stat'] = "Umur"; break; - case 14: $data['stat'] = "Pendidikan Sedang Ditempuh"; break; - case 21: $data['stat'] = "Klasifikasi Sosial"; break; - case 22: $data['stat'] = "Penerima Raskin"; break; - case 23: $data['stat'] = "Penerima BLT"; break; - case 24: $data['stat'] = "Penerima BOS"; break; - case 25: $data['stat'] = "Penerima PKH"; break; - case 26: $data['stat'] = "Penerima Jampersal"; break; - case 27: $data['stat'] = "Penerima Bedah Rumah"; break; - default:$data['stat'] = "Pendidikan"; - } - - $data['config'] = $this->laporan_penduduk_model->get_config(); - $data['main'] = $this->laporan_penduduk_model->list_data($lap); - $this->load->view('statistik/penduduk_excel',$data); - } - function warga($lap='',$data=''){ - $data['lap']=$lap; - switch($lap){ - case 0: $data['stat'] = "Pendidikan Telah Ditempuh"; break; - case 1: $data['stat'] = "Pekerjaan"; break; - case 2: $data['stat'] = "Status Perkawinan"; break; - case 3: $data['stat'] = "Agama"; break; - case 4: $data['stat'] = "Jenis Kelamin"; break; - case 5: $data['stat'] = "Warga Negara"; break; - case 6: $data['stat'] = "Status"; break; - case 7: $data['stat'] = "Golongan Darah"; break; - case 9: $data['stat'] = "Cacat"; break; - case 10: $data['stat'] = "Sakit Menahun"; break; - case 11: $data['stat'] = "Jamkesmas"; break; - case 12: $data['stat'] = "Pendidikan dalam KK"; break; - case 13: $data['stat'] = "Umur"; break; - case 14: $data['stat'] = "Pendidikan Sedang Ditempuh"; break; - case 21: $data['stat'] = "Klasifikasi Sosial"; break; - case 22: $data['stat'] = "Penerima Raskin"; break; - case 23: $data['stat'] = "Penerima BLT"; break; - case 24: $data['stat'] = "Penerima BOS"; break; - case 25: $data['stat'] = "Penerima PKH"; break; - case 26: $data['stat'] = "Penerima Jampersal"; break; - case 27: $data['stat'] = "Penerima Bedah Rumah"; break; - default:$data['stat'] = "Pendidikan"; - } - - $data['config'] = $this->laporan_penduduk_model->get_config(); - $data['main'] = $this->laporan_penduduk_model->list_data($lap); - - $_SESSION['per_page'] = 100; - $_SESSION['data'] = $data; - redirect("sid_penduduk/index/"); - } - function rentang_umur(){ - $data['lap']=13; - $data['main'] = $this->laporan_penduduk_model->list_data_rentang(); - $header = $this->header_model->get_data(); - $menu['act']='2'; - - $this->load->view('header', $header); - //$this->load->view('statistik/menu'); - $this->load->view('statistik/nav',$menu); - $this->load->view('statistik/rentang_umur',$data); - $this->load->view('footer'); - } - function form_rentang($id=0){ - if($id==0){ - $data['form_action'] = site_url("statistik/rentang_insert"); - $data['rentang']= $this->laporan_penduduk_model->get_rentang_terakhir(); - $data['rentang']['nama']=""; - $data['rentang']['sampai']=""; - } - else{ - $data['form_action'] = site_url("statistik/rentang_update/$id"); - $data['rentang'] = $this->laporan_penduduk_model->get_rentang($id); - } - $this->load->view('statistik/ajax_rentang_form',$data); - - } - function rentang_insert(){ - $data['insert'] = $this->laporan_penduduk_model->insert_rentang(); - redirect('statistik/rentang_umur'); - } - function rentang_update($id=0){ - $this->laporan_penduduk_model->update_rentang($id); - redirect('statistik/rentang_umur'); - } - function rentang_delete($id=0){ - $this->laporan_penduduk_model->delete_rentang($id); - redirect('statistik/rentang_umur'); - } - function delete_all_rentang(){ - $this->laporan_penduduk_model->delete_all_rentang(); - redirect('statistik/rentang_umur'); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/surat.php b/donjo-app/controllers/surat.php deleted file mode 100644 index 14218124c..000000000 --- a/donjo-app/controllers/surat.php +++ /dev/null @@ -1,122 +0,0 @@ -load->model('user_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); - $this->load->model('header_model'); - $this->load->model('penduduk_model'); - $this->load->model('surat_model'); - $this->load->model('surat_keluar_model'); - } - function index(){ - unset($_SESSION['nik']); - unset($_SESSION['nik_ayah']); - unset($_SESSION['nik_ibu']); - $header = $this->header_model->get_data(); - $data['menu_surat'] = $this->surat_model->list_surat(); - $data['menu_surat2'] = $this->surat_model->list_surat2(); - $data['surat_favorit'] = $this->surat_model->list_surat_fav(); - - $this->load->view('header', $header); - $nav['act']= 1; - - $this->load->view('surat/nav',$nav); - $this->load->view('surat/format_surat',$data); - $this->load->view('footer'); - } - function panduan(){ - $header = $this->header_model->get_data(); - $this->load->view('header', $header); - $nav['act']= 4; - - $this->load->view('surat/nav',$nav); - $this->load->view('surat/panduan'); - $this->load->view('footer'); - } - function form($url=''){ - $data['url']=$url; - if(isset($_POST['nik'])) - $_SESSION['nik'] = $_POST['nik']; - - if(isset($_POST['nik_ayah'])) - $_SESSION['nik_ayah'] = $_POST['nik_ayah']; - - if(isset($_POST['nik_ibu'])) - $_SESSION['nik_ibu'] = $_POST['nik_ibu']; - - if(isset($_SESSION['nik'])){ - $data['individu']=$this->surat_model->get_penduduk($_SESSION['nik']); - $data['ayah']=$this->surat_model->get_penduduk($_SESSION['nik_ayah']); - $data['ibu']=$this->surat_model->get_penduduk($_SESSION['nik_ibu']); - $data['anggota']=$this->surat_model->list_anggota($data['individu']['id_kk'],$data['individu']['nik']); - $data['list_dokumen'] = $this->penduduk_model->list_dokumen($_SESSION['nik']); - }else{ - $data['individu']=NULL; - $data['ayah']=NULL; - $data['ibu']=NULL; - $data['anggota']=NULL; - $data['list_dokumen'] = null; - } - $data['penduduk'] = $this->surat_model->list_penduduk(); - $data['pamong'] = $this->surat_model->list_pamong(); - - $data['form_action'] = site_url("surat/cetak/$url"); - $data['form_action2'] = site_url("surat/doc/$url"); - $nav['act']= 1; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - - $this->load->view('surat/nav',$nav); - $this->load->view("surat/form/$url",$data); - $this->load->view('footer'); - } - - function cetak($url=''){ - - $f=$url; - $g=$_POST['pamong']; - $u=$_SESSION['user']; - $z=$_POST['nomor']; - - - $id = $_POST['nik']; - $data['input'] = $_POST; - $data['tanggal_sekarang'] = tgl_indo(date("Y m d")); - - $data['data'] = $this->surat_model->get_data_surat($id); - $data['ayah'] = $this->surat_model->get_data_suami($id); - - $data['pribadi'] = $this->surat_model->get_data_pribadi($id); - $data['kk'] = $this->surat_model->get_data_kk($id); - - $data['desa'] = $this->surat_model->get_data_desa(); - $data['pamong'] = $this->surat_model->get_pamong($_POST['pamong']); - - $data['pengikut']=$this->surat_model->pengikut(); - $this->surat_keluar_model->log_surat($f,$id,$g,$u,$z); - $this->load->view("surat/print/print_".$url."",$data); - } - function doc($url=''){ - - $format = $this->surat_model->get_surat($url); - $f = $format['id']; - $g=$_POST['pamong']; - $u=$_SESSION['user']; - $z=$_POST['nomor']; - - $id = $_POST['nik']; - $this->surat_keluar_model->log_surat($f,$id,$g,$u,$z); - - $this->surat_model->coba($url); - } - function search(){ - $cari = $this->input->post('nik'); - if($cari!='') - redirect("surat/form/$cari"); - else - redirect('surat'); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/surat_master.php b/donjo-app/controllers/surat_master.php deleted file mode 100644 index e504b1a84..000000000 --- a/donjo-app/controllers/surat_master.php +++ /dev/null @@ -1,184 +0,0 @@ -load->model('surat_master_model'); - $this->load->model('user_model'); - $this->load->model('header_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1) redirect('siteman'); - } - function clear($id=0){ - $_SESSION['per_page']=20; - $_SESSION['surat']=$id; - unset($_SESSION['cari']); - unset($_SESSION['filter']); - unset($_SESSION['tipe']); - unset($_SESSION['kategori']); - redirect('surat_master'); - } - function index($p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->surat_master_model->paging($p,$o); - $data['main'] = $this->surat_master_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->surat_master_model->autocomplete(); - $header = $this->header_model->get_data(); - - $this->load->view('header', $header); - $nav['act']=3; - $this->load->view('surat/nav',$nav); - $this->load->view('surat_master/table',$data); - $this->load->view('footer'); - } - function form($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - - if($id){ - $data['surat_master'] = $this->surat_master_model->get_surat_format($id); - $data['form_action'] = site_url("surat_master/update/$p/$o/$id"); - } - - else{ - $data['surat_master'] = null; - $data['form_action'] = site_url("surat_master/insert"); - } - - $header = $this->header_model->get_data(); - - $this->load->view('header', $header); - $nav['act']=3; - $this->load->view('surat/nav',$nav); - $this->load->view('surat_master/form',$data); - $this->load->view('footer'); - } - function form_upload($p=1,$o=0,$url=''){ - $data['form_action'] = site_url("surat_master/upload/$p/$o/$url"); - $this->load->view('surat_master/ajax-upload',$data); - } - function atribut($id=''){ - $data['surat_master'] = $this->surat_master_model->get_surat_format($id); - $data['surat'] = $this->surat_master_model->get_surat_format(); - $data['main'] = $this->surat_master_model->list_atribut($id); - - $header = $this->header_model->get_data(); - - $this->load->view('header', $header); - $nav['act']=3; - $this->load->view('surat/nav',$nav); - $this->load->view('surat_master/atribut/table',$data); - $this->load->view('footer'); - } - function form_parameter($in='',$id=''){ - if($id){ - $data['analisis_parameter'] = $this->surat_master_model->get_analisis_parameter($id); - $data['form_action'] = site_url("surat_master/p_update/$in/$id"); - } - - else{ - $data['analisis_parameter'] = null; - $data['form_action'] = site_url("surat_master/p_insert/$in"); - } - - $data['surat'] = $this->surat_master_model->get_surat(); - $data['surat_master'] = $this->surat_master_model->get_surat_master($in); - - // $this->load->view('header', $header); - // $this->load->view('surat/nav'); - $this->load->view('surat_master/atribut/ajax_form',$data); - // $this->load->view('footer'); - } - function menu($id=''){ - $data['surat_master'] = $this->surat_master_model->get_surat_master($id); - - $header = $this->header_model->get_data(); - - $this->load->view('header', $header); - $this->load->view('surat/nav'); - $this->load->view('surat_master/menu',$data); - $this->load->view('footer'); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('surat_master'); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!=0) - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('surat_master'); - } - function tipe(){ - $filter = $this->input->post('tipe'); - if($filter!=0) - $_SESSION['tipe']=$filter; - else unset($_SESSION['tipe']); - redirect('surat_master'); - } - function kategori(){ - $filter = $this->input->post('kategori'); - if($filter!=0) - $_SESSION['kategori']=$filter; - else unset($_SESSION['kategori']); - redirect('surat_master'); - } - function insert(){ - $this->surat_master_model->insert(); - redirect('surat_master'); - } - function update($p=1,$o=0,$id=''){ - $this->surat_master_model->update($id); - redirect("surat_master/index/$p/$o"); - } - function upload($p=1,$o=0,$url=''){ - $this->surat_master_model->upload($url); - redirect("surat_master/index/$p/$o"); - } - function delete($p=1,$o=0,$id=''){ - $this->surat_master_model->delete($id); - redirect("surat_master/index/$p/$o"); - } - function delete_all($p=1,$o=0){ - $this->surat_master_model->delete_all(); - redirect("surat_master/index/$p/$o"); - } - function p_insert($in=''){ - $this->surat_master_model->p_insert($in); - redirect("surat_master/atribut/$in"); - } - function p_update($in='',$id=''){ - $this->surat_master_model->p_update($id); - redirect("surat_master/atribut/$in"); - } - function p_delete($in='',$id=''){ - $this->surat_master_model->p_delete($id); - redirect("surat_master/atribut/$in"); - } - function p_delete_all(){ - $this->surat_master_model->p_delete_all(); - redirect("surat_master/atribut/$in"); - } - function lock($id=0,$k=0){ - $this->surat_master_model->lock($id,$k); - redirect("surat_master"); - } - function favorit($id=0,$k=0){ - $this->surat_master_model->favorit($id,$k); - redirect("surat_master"); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/user_setting.php b/donjo-app/controllers/user_setting.php deleted file mode 100644 index f4ef066ef..000000000 --- a/donjo-app/controllers/user_setting.php +++ /dev/null @@ -1,27 +0,0 @@ -load->model('user_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=(1 OR 2 OR 3 OR 4 OR 5)) redirect('login'); - $this->load->model('header_model'); - } - function index(){ - $id = $_SESSION['user']; - $header = $this->header_model->get_data(); - //$this->load->view('header', $header); - - $header = $this->header_model->get_data(); - $data['main'] = $this->user_model->get_user($id); - - $this->load->view('setting', $data); - //$this->load->view('footer'); - - } - function update($id=''){ - $this->user_model->update_setting($id); - redirect("main"); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/web.php b/donjo-app/controllers/web.php deleted file mode 100644 index 3706ca0ce..000000000 --- a/donjo-app/controllers/web.php +++ /dev/null @@ -1,140 +0,0 @@ -load->model('user_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2 AND $grup!=3 AND $grup!=4) redirect('siteman'); - $this->load->model('header_model'); - $this->load->model('web_artikel_model'); - } - function clear(){ - unset($_SESSION['cari']); - unset($_SESSION['filter']); - redirect('web'); - } - function pager($cat=1){ - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - redirect("web/index/$cat"); - } - function index($cat=1,$p=1,$o=0){ - $data['p'] = $p; - $data['o'] = $o; - $data['cat'] = $cat; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['paging'] = $this->web_artikel_model->paging($cat,$p,$o); - $data['main'] = $this->web_artikel_model->list_data($cat,$o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->web_artikel_model->autocomplete(); - $data['list_kategori'] = $this->web_artikel_model->list_kategori(); - $data['kategori'] = $this->web_artikel_model->get_kategori($cat); - $data['cat'] = $cat; - $header = $this->header_model->get_data(); - $nav['act']=0; - - $this->load->view('header', $header); - $this->load->view('web/nav',$nav); - $this->load->view('web/artikel/table',$data); - $this->load->view('footer'); - } - function form($cat=1,$p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - $data['cat'] = $cat; - - if($id){ - $data['artikel'] = $this->web_artikel_model->get_artikel($id); - $data['form_action'] = site_url("web/update/$cat/$id/$p/$o"); - } - else{ - $data['artikel'] = null; - $data['form_action'] = site_url("web/insert/$cat"); - } - - $data['kategori'] = $this->web_artikel_model->get_kategori($cat); - - $header = $this->header_model->get_data(); - - $nav['act']=0; - $this->load->view('header', $header); - //$this->load->view('web/spacer'); - $this->load->view('web/nav',$nav); - if($cat != 1003) - $this->load->view('web/artikel/form',$data); - else - $this->load->view('web/artikel/widget-form',$data); - - $this->load->view('footer'); - } - function search($cat=1){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect("web/index/$cat"); - } - function filter($cat=1){ - $filter = $this->input->post('filter'); - if($filter!=0) - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect("web/index/$cat"); - } - function insert($cat=1){ - $this->web_artikel_model->insert($cat); - redirect("web/index/$cat"); - } - function update($cat=0,$id='',$p=1,$o=0){ - $this->web_artikel_model->update($id); - redirect("web/index/$cat/$p/$o"); - } - function delete($cat=1,$p=1,$o=0,$id=''){ - $this->web_artikel_model->delete($id); - redirect("web/index/$cat/$p/$o"); - } - - function hapus($cat=1,$p=1,$o=0){ - $this->web_artikel_model->hapus($cat); - redirect("web/index/1/$p/$o"); - } - function delete_all($p=1,$o=0){ - $this->web_artikel_model->delete_all(); - redirect("web/index/$p/$o"); - } - function artikel_lock($cat=1,$id=0){ - $this->web_artikel_model->artikel_lock($id,1); - redirect("web/index/$cat"); - } - function artikel_unlock($cat=1,$id=0){ - $this->web_artikel_model->artikel_lock($id,2); - redirect("web/index/$cat"); - } - function ajax_add_kategori($cat=1,$p=1,$o=0){ - $data['form_action'] = site_url("web/insert_kategori/$cat/$p/$o"); - $this->load->view('web/artikel/ajax_add_kategori_form',$data); - } - function insert_kategori($cat=1,$p=1,$o=0){ - $this->web_artikel_model->insert_kategori(); - redirect("web/index/$cat/$p/$o"); - } - function headline($cat=1,$p=1,$o=0,$id=0){ - $this->web_artikel_model->headline($id); - redirect("web/index/$cat/$p/$o"); - } - function slide($cat=1,$p=1,$o=0,$id=0){ - $this->web_artikel_model->slide($id); - redirect("web/index/$cat/$p/$o"); - } -} \ No newline at end of file diff --git a/donjo-app/controllers/widget.php b/donjo-app/controllers/widget.php deleted file mode 100644 index 7b496bef4..000000000 --- a/donjo-app/controllers/widget.php +++ /dev/null @@ -1,44 +0,0 @@ -load->model('user_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); - $this->load->model('header_model'); - $this->load->model('web_widget_model'); - } - function index(){ - $data['main'] = $this->web_widget_model->get_widget(); - $id=$data['main']['id']; - $data['form_action'] = site_url("web/widget/update/1/$id"); - $header = $this->header_model->get_data(); - $nav['act']=5; - - $this->load->view('header', $header); - $this->load->view('web/nav',$nav); - $this->load->view('web/widget/facebook',$data); - $this->load->view('footer'); - } - function twitter(){ - $data['main'] = $this->web_widget_model->get_widget(); - $id=$data['main']['id']; - $data['form_action'] = site_url("web/widget/update/2/$id"); - $header = $this->header_model->get_data(); - $nav['act']=5; - - $this->load->view('header', $header); - $this->load->view('web/nav',$nav); - $this->load->view('web/widget/twitter',$data); - $this->load->view('footer'); - } - function update($tipe='',$id=''){ - $this->web_widget_model->update($id); - if($tipe=='1'){ - redirect("web/widget"); - }else{ - redirect("web/widget/twitter"); - } - } -} \ No newline at end of file diff --git a/donjo-app/errors/error_403.php b/donjo-app/errors/error_403.php deleted file mode 100644 index a50253814..000000000 --- a/donjo-app/errors/error_403.php +++ /dev/null @@ -1 +0,0 @@ - - - -404 Page Not Found - - - -
-

- -
- - \ No newline at end of file diff --git a/donjo-app/errors/error_db.php b/donjo-app/errors/error_db.php deleted file mode 100644 index f58025829..000000000 --- a/donjo-app/errors/error_db.php +++ /dev/null @@ -1,62 +0,0 @@ - - - -Database Error - - - -
-

- -
- - \ No newline at end of file diff --git a/donjo-app/errors/error_general.php b/donjo-app/errors/error_general.php deleted file mode 100644 index 0e8400b3d..000000000 --- a/donjo-app/errors/error_general.php +++ /dev/null @@ -1,62 +0,0 @@ - - - -Error - - - -
-

- -
- - \ No newline at end of file diff --git a/donjo-app/errors/error_php.php b/donjo-app/errors/error_php.php deleted file mode 100644 index f085c2037..000000000 --- a/donjo-app/errors/error_php.php +++ /dev/null @@ -1,10 +0,0 @@ -
- -

A PHP Error was encountered

- -

Severity:

-

Message:

-

Filename:

-

Line Number:

- -
\ No newline at end of file diff --git a/donjo-app/errors/index.html b/donjo-app/errors/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-app/errors/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-app/helpers/donjolib_helper.php b/donjo-app/helpers/donjolib_helper.php deleted file mode 100644 index d46e0e1d0..000000000 --- a/donjo-app/helpers/donjolib_helper.php +++ /dev/null @@ -1,563 +0,0 @@ -= 13){ - $isi = 0; - while($i < $len-12){ - if($str[$i] == 1 AND $len - $i == 14 AND $str[$i+1] != 0){ - $outp = $outp.$belas[$str[$i+1]]; - $i++; - $isi = 1; - } - elseif($str[$i] == 1 AND ($i+1 != $len) AND ($len - $i != 13)){ - $outp = $outp." se".$lipatan[$len-($i+12)]; - $isi = 1; - }elseif($str[$i] > 0){ - $outp = $outp.$satuan[$str[$i]]." ".$lipatan[$len-($i+12)]; - $isi = 1; - } - $i++; - } - if($isi == 1)$outp = $outp." triliyun"; - } - - if($len - $i >= 10){ - $isi = 0; - while($i < $len-9){ - if($str[$i] == 1 AND $len - $i == 11 AND $str[$i+1] != 0){ - $outp = $outp.$belas[$str[$i+1]]; - $isi = 1; - $i++; - } - elseif($str[$i] == 1 AND ($i+1 != $len) AND ($len - $i != 10)){ - $outp = $outp." se".$lipatan[$len-($i+9)]; - $isi = 1; - }elseif($str[$i] > 0){ - $outp = $outp.$satuan[$str[$i]]." ".$lipatan[$len-($i+9)]; - $isi = 1; - } - $i++; - } - if($isi == 1)$outp = $outp." miliyar"; - } - - if($len - $i >= 7){ - $isi = 0; - while($i < $len-6){ - if($str[$i] == 1 AND $len - $i == 8 AND $str[$i+1] != 0){ - $outp = $outp.$belas[$str[$i+1]]; - $i++; - $isi = 1; - } - elseif($str[$i] == 1 AND ($i+1 != $len) AND ($len - $i != 7)){ - $outp = $outp." se".$lipatan[$len-($i+6)]; - $isi = 1; - }elseif($str[$i] > 0){ - $outp = $outp.$satuan[$str[$i]]." ".$lipatan[$len-($i+6)]; - $isi = 1; - } - $i++; - } - if($isi == 1)$outp = $outp." juta"; - } - - if($len - $i >= 4){ - $isi = 0; - while($i < $len-3){ - if($str[$i] == 1 AND $len - $i == 5 AND $str[$i+1] != 0){ - $outp = $outp.$belas[$str[$i+1]]; - $i++; - $isi = 1; - } - elseif($str[$i] == 1 AND ($i+1 != $len)){ - $outp = $outp." se".$lipatan[$len-($i+3)]; - $isi = 1; - }elseif($str[$i] > 0){ - $outp = $outp.$satuan[$str[$i]]." ".$lipatan[$len-($i+3)]; - $isi = 1; - } - $i++; - } - if($isi == 1)$outp = $outp." ribu"; - } - while($i < $len){ - if($str[$i] == 1 AND $len - $i == 2 AND $str[$i+1] != 0){ - $outp = $outp.$belas[$str[$i+1]]." "; - $i++; - } - elseif($str[$i] == 1 AND ($i+1 != $len)){ - $outp = $outp." se".$lipatan[$len-$i]." "; - }else{ - if($str[$i] > 0)$outp = $outp.$satuan[$str[$i]]." ".$lipatan[$len-$i]; - } - $i++; - } - $i++; - $outp2=""; - $len = $len+3; - while($i < ($len)){ - if($str[$i] == 1 AND $len - $i == 2 AND $str[$i+1] != 0){ - $outp2 = $outp2.$belas[$str[$i+1]]." "; - $i++; - } - elseif($str[$i] == 1 AND ($i+1 != $len)){ - $outp2 = $outp2." se".$lipatan[$len-$i]." "; - }else{ - if($str[$i] > 0)$outp2 = $outp2.$satuan[$str[$i]]." ".$lipatan[$len-$i]; - } - $i++; - } - - if($outp2 != "") - $outp = $outp." komah ".$outp2; - $outp = $outp." rupiah"; - $len = strlen($outp); - $outp = substr($outp,1,$len-1); - $outp = "$outp"; - return $outp; -} - - function currents_url() - { - $CI =& get_instance(); - - $url = $CI->config->site_url($CI->uri->uri_string()); - return $_SERVER['QUERY_STRING'] ? $url.'?'.$_SERVER['QUERY_STRING'] : $url; - } - function Parse_Data($data,$p1,$p2){ - $data=" ".$data; - $hasil=""; - $awal=strpos($data,$p1); - if($awal!=""){ - $akhir=strpos(strstr($data,$p1),$p2); - if($akhir!=""){ - $hasil=substr($data,$awal+strlen($p1),$akhir-strlen($p1)); - } - } - return $hasil; - } - function Rupiah($nil=0){ - $nil = $nil + 0; - if(($nil*100)%100 == 0){ - $nil = $nil.".00"; - }elseif(($nil*100)%10 == 0){ - $nil = $nil."0"; - } - $nil = str_replace('.', ',', $nil); - $str1 = $nil; - $str2= ""; - $dot = ""; - $str = strrev($str1); - $arr = str_split($str, 3); - $i=0; - foreach($arr as $str){ - $str2 = $str2.$dot.$str; - if(strlen($str)==3 AND $i>0)$dot = '.'; - $i++; - } - $rp = strrev($str2); - if($rp != "" AND $rp > 0){return "Rp. $rp";}else{return "Rp. 0,00";} - } - function Rupiah2($nil=0){ - $nil = $nil + 0; - if(($nil*100)%100 == 0){ - $nil = $nil.".00"; - }elseif(($nil*100)%10 == 0){ - $nil = $nil."0"; - } - $nil = str_replace('.', ',', $nil); - $str1 = $nil; - $str2= ""; - $dot = ""; - $str = strrev($str1); - $arr = str_split($str, 3); - $i=0; - foreach($arr as $str){ - $str2 = $str2.$dot.$str; - if(strlen($str)==3 AND $i>0)$dot = '.'; - $i++; - } - $rp = strrev($str2); - if($rp != "" AND $rp > 0){return "Rp.$rp";}else{return "-";} - } - function Rupiah3($nil=0){ - $nil = $nil + 0; - if(($nil*100)%100 == 0){ - $nil = $nil.".00"; - }elseif(($nil*100)%10 == 0){ - $nil = $nil."0"; - } - $nil = str_replace('.',',', $nil); - $str1 = $nil; - $str2= ""; - $dot = ""; - $str = strrev($str1); - $arr = str_split($str, 3); - $i=0; - foreach($arr as $str){ - $str2 = $str2.$dot.$str; - if(strlen($str)==3 AND $i>0)$dot = '.'; - $i++; - } - $rp = strrev($str2); - if($rp != 0){return "$rp";}else{return "-";} - } - function jecho($a,$b,$str){ - if($a==$b){ - echo $str; - } - } - function selected($a,$b,$opt=0){ - if($a==$b){ - if($opt) - echo "checked='checked'"; - else echo "selected='selected'"; - } - } - function rev_tgl($tgl){ - $ar=explode('-',$tgl); - $o=$ar[2].'-'.$ar[1].'-'.$ar[0]; - return $o; - } - function penetration($str){ - $str = str_replace("'","-", $str); - return $str; - } - function penetration1($str){ - $str = str_replace("'"," ", $str); - return $str; - } - function unpenetration($str){ - $str = str_replace("-","'", $str); - return $str; - } - function spaceunpenetration($str){ - $str = str_replace("-"," ", $str); - return $str; - } - function underscore($str){ - $str = str_replace(" ","_", $str); - return $str; - } - function ununderscore($str){ - $str = str_replace("_"," ", $str); - return $str; - } - function bulan($bln){ - $nm = ''; - switch($bln){ - case '1': - $nm = 'Januari'; - break; - case '2': - $nm = 'Februari'; - break; - case '3': - $nm = 'Maret'; - break; - case '4': - $nm = 'April'; - break; - case '5': - $nm = 'Mei'; - break; - case '6': - $nm = 'Juni'; - break; - case '7': - $nm = 'Juli'; - break; - case '8': - $nm = 'Agustus'; - break; - case '9': - $nm = 'September'; - break; - case '10': - $nm = 'Oktober'; - break; - case '11': - $nm = 'November'; - break; - case '12': - $nm = 'Desember'; - break; - default: - $nm = ''; - break; - } - return $nm; - } - function nama_bulan($tgl){ - $ar=explode('-',$tgl); - - $nm = ''; - switch($ar[1]){ - case '01': - $nm = 'Januari'; - break; - case '02': - $nm = 'Februari'; - break; - case '03': - $nm = 'Maret'; - break; - case '04': - $nm = 'April'; - break; - case '05': - $nm = 'Mei'; - break; - case '06': - $nm = 'Juni'; - break; - case '07': - $nm = 'Juli'; - break; - case '08': - $nm = 'Agustus'; - break; - case '09': - $nm = 'September'; - break; - case '10': - $nm = 'Oktober'; - break; - case '11': - $nm = 'November'; - break; - case '12': - $nm = 'Desember'; - break; - } - - $o = $ar[0] .' '. $nm .' '. $ar[2]; - return $o; - } - function dua_digit($i){ - if($i<10) $o='0'.$i; - else $o=$i; - return $o; - } - function tiga_digit($i){ - if($i<10) $o='00'.$i; - else if($i<100) $o='0'.$i; - else $o=$i; - return $o; - } - function to_rupiah($inp=''){ - $outp = str_replace('.', '', $inp); - $outp = str_replace(',', '.', $outp); - return $outp; - } - function rp($inp=0){ - return number_format($inp, 2, ',', '.'); - } - function pertumbuhan($a=1,$b=1,$c=1,$d=1){ - $x=0; - $y=0; - $z=0; - if($a>1) $x = (($b-$a)/$a); - if($b>1) $y = (($c-$b)/$b); - if($c>1) $z = (($d-$c)/$c); - $outp = (($x+$y+$z)/3)*100; - $outp = round($outp,2); - $outp = str_replace('.',',',$outp) . ' %';; - return $outp; - } - function koma ($a=1) { - if(substr_count($a, '.')) - $a = str_replace(".", ",",$a); - else $a = number_format($a,0, ',', '.'); - return $a; - } - function tgl_indo2($tgl){ - $tanggal = substr($tgl,8,2); - $jam = substr($tgl,11,8); - $bulan = getBulan(substr($tgl,5,2)); - $tahun = substr($tgl,0,4); - return $tanggal.' '.$bulan.' '.$tahun.' '.$jam.' WIB'; - } - function tgl_indo($tgl){ - $tanggal = substr($tgl,8,2); - $bulan = getBulan(substr($tgl,5,2)); - $tahun = substr($tgl,0,4); - return $tanggal.' '.$bulan.' '.$tahun; - } - function tgl_indo_out($tgl){ - $tanggal = substr($tgl,8,2); - $bulan = substr($tgl,5,2); - $tahun = substr($tgl,0,4); - return $tanggal.'-'.$bulan.'-'.$tahun; - } - function tgl_indo_in($tgl){ - $tanggal = substr($tgl,0,2); - $bulan = substr($tgl,3,2); - $tahun = substr($tgl,6,4); - return $tahun.'-'.$bulan.'-'.$tanggal; - } - - function waktu_ind($time){ - $str =""; - if(($time/360)>1){ - $jam = ($time/360); - $jam = explode('.',$jam); - $str .= $jam." Jam "; - } - if(($time/60)>1){ - $menit = ($time/60); - $menit = explode('.',$menit); - $str .= $menit[0]." Menit "; - } - $detik = $time%60; - $str .= $detik; - - return $str.' Detik'; - } - - function getBulan($bln){ - switch ($bln){ - case 1: - return "Januari"; - break; - case 2: - return "Februari"; - break; - case 3: - return "Maret"; - break; - case 4: - return "April"; - break; - case 5: - return "Mei"; - break; - case 6: - return "Juni"; - break; - case 7: - return "Juli"; - break; - case 8: - return "Agustus"; - break; - case 9: - return "September"; - break; - case 10: - return "Oktober"; - break; - case 11: - return "November"; - break; - case 12: - return "Desember"; - break; - } - } - -function timer(){ - $time=2000; - $_SESSION['timeout']=time()+$time; -} -function generator($length = 7) { - return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length); -} -function hash_password($password=""){ - $password = strrev($password); - $password .= "!#@$#%"; - $password = md5($password); - $password = substr($password,3,19); - return md5($password); -} -function cek_login(){ - $timeout=$_SESSION['timeout']; - if(time()<$timeout){ - timer(); - return true; - }else{ - unset($_SESSION['timeout']); - return false; - } -} -function mandiri_timer(){ - $time=90; - $_SESSION['mandiri_try'] = 4; - $_SESSION['mandiri_wait']=0; - $_SESSION['mandiri_timeout']=time()+$time; -} -function mandiri_timeout(){ - if(!isset($_SESSION['mandiri_timeout'])) - $_SESSION['mandiri_timeout'] = time()-1; - - $timeout=$_SESSION['mandiri_timeout']; - if(time()>$timeout){ - mandiri_timer(); - } -} -function get_identitas(){ - $ci =& get_instance(); - $ci->load->database(); - $sql="SELECT * FROM config"; - $q = $ci->db->query($sql); - $hsl = $q->row_array(); - //$string = "Desa : ".$hsl['nama_desa']." Kec : ".$hsl['nama_kecamatan']." Kab : ".$hsl['nama_kabupaten']; - $string = "

PEMERINTAH KABUPATEN ".strtoupper($hsl['nama_kabupaten'])."
KECAMATAN ".strtoupper($hsl['nama_kecamatan'])."
DESA ".strtoupper($hsl['nama_desa'])."


"; - return $string; -} -function fixSQL($str, $encode_ent = false) { - $str = @trim($str); if($encode_ent) { $str = htmlentities($str); } - if(version_compare(phpversion(),'4.3.0') >= 0) {if(get_magic_quotes_gpc()) {$str = stripslashes($str);} - if(@mysql_ping()) { $str = mysql_real_escape_string($str);} else {$str = addslashes($str);} - }else {if(!get_magic_quotes_gpc()) {$str = addslashes($str);}} - return $str; -} -function fixTag($varString){ - $isIn = true; $strD=""; - for($i=0;$i<=strlen($varString);$i++){ - $mch = substr($varString,$i,1); - if((ord($mch)==9)||(ord($mch)==10)||(ord($mch)==13)){$mch=" ";} - if($mch=="<"){$isIn=true;} - if($mch==">"){$isIn=false;}else{if($isIn==false){$strD.= $mch;}} - } - return trim($strD); -} -function fTampilTgl($sdate,$edate){ - if($sdate==$edate){ - $tgl = date("j M Y",strtotime($sdate)); - }elseif($edate>$sdate){ - if(date("Y",strtotime($sdate))==date("Y",strtotime($edate))){ - if(date("M Y",strtotime($sdate))==date("M Y",strtotime($edate))){ - if(date("j M Y",strtotime($sdate))==date("j M Y",strtotime($edate))){ - if(date("j M Y H",strtotime($sdate))==date("j M Y H",strtotime($edate))){ - $tgl = date("j M Y H:i",strtotime($sdate)); - }else{ - $tgl = date("j M Y H:i",strtotime($sdate)) ." - ".date("H:i",strtotime($edate)); - } - }else{ - $tgl = date("j",strtotime($sdate))." - ".date("j M Y",strtotime($edate)); - } - }else{ - $tgl = date("j M",strtotime($sdate))." - ".date("j M Y",strtotime($edate)); - } - }else{ - $tgl = date("j M Y",strtotime($sdate))." - ".date("j M Y",strtotime($edate)); - } - } - return $tgl; -} - function hash_pin($pin=""){ - $pin = strrev($pin); - $pin = $pin*77; - $pin .= "!#@$#%"; - $pin = md5($pin); - return $pin; - } \ No newline at end of file diff --git a/donjo-app/helpers/excel_helper.php b/donjo-app/helpers/excel_helper.php deleted file mode 100644 index 35ed448c6..000000000 --- a/donjo-app/helpers/excel_helper.php +++ /dev/null @@ -1,1508 +0,0 @@ -=4294967294) { - $value=-2; - } - return $value; -} -function gmgetdate($ts = null){ - $k = array('seconds','minutes','hours','mday','wday','mon','year','yday','weekday','month',0); - return(array_comb($k,split(":",gmdate('s:i:G:j:w:n:Y:z:l:F:U',is_null($ts)?time():$ts)))); - } -function array_comb($array1, $array2) { - $out = array(); - foreach ($array1 as $key => $value) { - $out[$value] = $array2[$key]; - } - return $out; -} -function v($data,$pos) { - return ord($data[$pos]) | ord($data[$pos+1])<<8; -} -class OLERead { - var $data = ''; - function OLERead(){ } - function read($sFileName){ - - if(!is_readable($sFileName)) { - $this->error = 1; - return false; - } - $this->data = @file_get_contents($sFileName); - if (!$this->data) { - $this->error = 1; - return false; - } - if (substr($this->data, 0, 8) != IDENTIFIER_OLE) { - $this->error = 1; - return false; - } - $this->numBigBlockDepotBlocks = GetInt4d($this->data, NUM_BIG_BLOCK_DEPOT_BLOCKS_POS); - $this->sbdStartBlock = GetInt4d($this->data, SMALL_BLOCK_DEPOT_BLOCK_POS); - $this->rootStartBlock = GetInt4d($this->data, ROOT_START_BLOCK_POS); - $this->extensionBlock = GetInt4d($this->data, EXTENSION_BLOCK_POS); - $this->numExtensionBlocks = GetInt4d($this->data, NUM_EXTENSION_BLOCK_POS); - $bigBlockDepotBlocks = array(); - $pos = BIG_BLOCK_DEPOT_BLOCKS_POS; - $bbdBlocks = $this->numBigBlockDepotBlocks; - if ($this->numExtensionBlocks != 0) { - $bbdBlocks = (BIG_BLOCK_SIZE - BIG_BLOCK_DEPOT_BLOCKS_POS)/4; - } - for ($i = 0; $i < $bbdBlocks; $i++) { - $bigBlockDepotBlocks[$i] = GetInt4d($this->data, $pos); - $pos += 4; - } - for ($j = 0; $j < $this->numExtensionBlocks; $j++) { - $pos = ($this->extensionBlock + 1) * BIG_BLOCK_SIZE; - $blocksToRead = min($this->numBigBlockDepotBlocks - $bbdBlocks, BIG_BLOCK_SIZE / 4 - 1); - for ($i = $bbdBlocks; $i < $bbdBlocks + $blocksToRead; $i++) { - $bigBlockDepotBlocks[$i] = GetInt4d($this->data, $pos); - $pos += 4; - } - $bbdBlocks += $blocksToRead; - if ($bbdBlocks < $this->numBigBlockDepotBlocks) { - $this->extensionBlock = GetInt4d($this->data, $pos); - } - } - - $pos = 0; - $index = 0; - $this->bigBlockChain = array(); - for ($i = 0; $i < $this->numBigBlockDepotBlocks; $i++) { - $pos = ($bigBlockDepotBlocks[$i] + 1) * BIG_BLOCK_SIZE; - - for ($j = 0 ; $j < BIG_BLOCK_SIZE / 4; $j++) { - $this->bigBlockChain[$index] = GetInt4d($this->data, $pos); - $pos += 4 ; - $index++; - } - } - - $pos = 0; - $index = 0; - $sbdBlock = $this->sbdStartBlock; - $this->smallBlockChain = array(); - while ($sbdBlock != -2) { - $pos = ($sbdBlock + 1) * BIG_BLOCK_SIZE; - for ($j = 0; $j < BIG_BLOCK_SIZE / 4; $j++) { - $this->smallBlockChain[$index] = GetInt4d($this->data, $pos); - $pos += 4; - $index++; - } - $sbdBlock = $this->bigBlockChain[$sbdBlock]; - } - - $block = $this->rootStartBlock; - $pos = 0; - $this->entry = $this->__readData($block); - $this->__readPropertySets(); - } - function __readData($bl) { - $block = $bl; - $pos = 0; - $data = ''; - while ($block != -2) { - $pos = ($block + 1) * BIG_BLOCK_SIZE; - $data = $data.substr($this->data, $pos, BIG_BLOCK_SIZE); - $block = $this->bigBlockChain[$block]; - } - return $data; - } - function __readPropertySets(){ - $offset = 0; - while ($offset < strlen($this->entry)) { - $d = substr($this->entry, $offset, PROPERTY_STORAGE_BLOCK_SIZE); - $nameSize = ord($d[SIZE_OF_NAME_POS]) | (ord($d[SIZE_OF_NAME_POS+1]) << 8); - $type = ord($d[TYPE_POS]); - $startBlock = GetInt4d($d, START_BLOCK_POS); - $size = GetInt4d($d, SIZE_POS); - $name = ''; - for ($i = 0; $i < $nameSize ; $i++) { - $name .= $d[$i]; - } - $name = str_replace("\x00", "", $name); - $this->props[] = array ( - 'name' => $name, - 'type' => $type, - 'startBlock' => $startBlock, - 'size' => $size); - if ((strtolower($name) == "workbook") || ( strtolower($name) == "book")) { - $this->wrkbook = count($this->props) - 1; - } - if ($name == "Root Entry") { - $this->rootentry = count($this->props) - 1; - } - $offset += PROPERTY_STORAGE_BLOCK_SIZE; - } - } - function getWorkBook(){ - if ($this->props[$this->wrkbook]['size'] < SMALL_BLOCK_THRESHOLD){ - $rootdata = $this->__readData($this->props[$this->rootentry]['startBlock']); - $streamData = ''; - $block = $this->props[$this->wrkbook]['startBlock']; - $pos = 0; - while ($block != -2) { - $pos = $block * SMALL_BLOCK_SIZE; - $streamData .= substr($rootdata, $pos, SMALL_BLOCK_SIZE); - $block = $this->smallBlockChain[$block]; - } - return $streamData; - }else{ - $numBlocks = $this->props[$this->wrkbook]['size'] / BIG_BLOCK_SIZE; - if ($this->props[$this->wrkbook]['size'] % BIG_BLOCK_SIZE != 0) { - $numBlocks++; - } - if ($numBlocks == 0) return ''; - $streamData = ''; - $block = $this->props[$this->wrkbook]['startBlock']; - $pos = 0; - while ($block != -2) { - $pos = ($block + 1) * BIG_BLOCK_SIZE; - $streamData .= substr($this->data, $pos, BIG_BLOCK_SIZE); - $block = $this->bigBlockChain[$block]; - } - return $streamData; - } - } -} -define('SPREADSHEET_EXCEL_READER_BIFF8', 0x600); -define('SPREADSHEET_EXCEL_READER_BIFF7', 0x500); -define('SPREADSHEET_EXCEL_READER_WORKBOOKGLOBALS', 0x5); -define('SPREADSHEET_EXCEL_READER_WORKSHEET', 0x10); -define('SPREADSHEET_EXCEL_READER_TYPE_BOF', 0x809); -define('SPREADSHEET_EXCEL_READER_TYPE_EOF', 0x0a); -define('SPREADSHEET_EXCEL_READER_TYPE_BOUNDSHEET', 0x85); -define('SPREADSHEET_EXCEL_READER_TYPE_DIMENSION', 0x200); -define('SPREADSHEET_EXCEL_READER_TYPE_ROW', 0x208); -define('SPREADSHEET_EXCEL_READER_TYPE_DBCELL', 0xd7); -define('SPREADSHEET_EXCEL_READER_TYPE_FILEPASS', 0x2f); -define('SPREADSHEET_EXCEL_READER_TYPE_NOTE', 0x1c); -define('SPREADSHEET_EXCEL_READER_TYPE_TXO', 0x1b6); -define('SPREADSHEET_EXCEL_READER_TYPE_RK', 0x7e); -define('SPREADSHEET_EXCEL_READER_TYPE_RK2', 0x27e); -define('SPREADSHEET_EXCEL_READER_TYPE_MULRK', 0xbd); -define('SPREADSHEET_EXCEL_READER_TYPE_MULBLANK', 0xbe); -define('SPREADSHEET_EXCEL_READER_TYPE_INDEX', 0x20b); -define('SPREADSHEET_EXCEL_READER_TYPE_SST', 0xfc); -define('SPREADSHEET_EXCEL_READER_TYPE_EXTSST', 0xff); -define('SPREADSHEET_EXCEL_READER_TYPE_CONTINUE', 0x3c); -define('SPREADSHEET_EXCEL_READER_TYPE_LABEL', 0x204); -define('SPREADSHEET_EXCEL_READER_TYPE_LABELSST', 0xfd); -define('SPREADSHEET_EXCEL_READER_TYPE_NUMBER', 0x203); -define('SPREADSHEET_EXCEL_READER_TYPE_NAME', 0x18); -define('SPREADSHEET_EXCEL_READER_TYPE_ARRAY', 0x221); -define('SPREADSHEET_EXCEL_READER_TYPE_STRING', 0x207); -define('SPREADSHEET_EXCEL_READER_TYPE_FORMULA', 0x406); -define('SPREADSHEET_EXCEL_READER_TYPE_FORMULA2', 0x6); -define('SPREADSHEET_EXCEL_READER_TYPE_FORMAT', 0x41e); -define('SPREADSHEET_EXCEL_READER_TYPE_XF', 0xe0); -define('SPREADSHEET_EXCEL_READER_TYPE_BOOLERR', 0x205); -define('SPREADSHEET_EXCEL_READER_TYPE_FONT', 0x0031); -define('SPREADSHEET_EXCEL_READER_TYPE_PALETTE', 0x0092); -define('SPREADSHEET_EXCEL_READER_TYPE_UNKNOWN', 0xffff); -define('SPREADSHEET_EXCEL_READER_TYPE_NINETEENFOUR', 0x22); -define('SPREADSHEET_EXCEL_READER_TYPE_MERGEDCELLS', 0xE5); -define('SPREADSHEET_EXCEL_READER_UTCOFFSETDAYS' , 25569); -define('SPREADSHEET_EXCEL_READER_UTCOFFSETDAYS1904', 24107); -define('SPREADSHEET_EXCEL_READER_MSINADAY', 86400); -define('SPREADSHEET_EXCEL_READER_TYPE_HYPER', 0x01b8); -define('SPREADSHEET_EXCEL_READER_TYPE_COLINFO', 0x7d); -define('SPREADSHEET_EXCEL_READER_TYPE_DEFCOLWIDTH', 0x55); -define('SPREADSHEET_EXCEL_READER_TYPE_STANDARDWIDTH', 0x99); -define('SPREADSHEET_EXCEL_READER_DEF_NUM_FORMAT', "%s"); -class Spreadsheet_Excel_Reader { - var $colnames = array(); - var $colindexes = array(); - var $standardColWidth = 0; - var $defaultColWidth = 0; - function myHex($d) { - if ($d < 16) return "0" . dechex($d); - return dechex($d); - } - function dumpHexData($data, $pos, $length) { - $info = ""; - for ($i = 0; $i <= $length; $i++) { - $info .= ($i==0?"":" ") . $this->myHex(ord($data[$pos + $i])) . (ord($data[$pos + $i])>31? "[" . $data[$pos + $i] . "]":''); - } - return $info; - } - function getCol($col) { - if (is_string($col)) { - $col = strtolower($col); - if (array_key_exists($col,$this->colnames)) { - $col = $this->colnames[$col]; - } - } - return $col; - } - function val($row,$col,$sheet=0) { - $col = $this->getCol($col); - if (array_key_exists($row,$this->sheets[$sheet]['cells']) && array_key_exists($col,$this->sheets[$sheet]['cells'][$row])) { - return $this->sheets[$sheet]['cells'][$row][$col]; - } - return ""; - } - function value($row,$col,$sheet=0) { - return $this->val($row,$col,$sheet); - } - function info($row,$col,$type='',$sheet=0) { - $col = $this->getCol($col); - if (array_key_exists('cellsInfo',$this->sheets[$sheet]) - && array_key_exists($row,$this->sheets[$sheet]['cellsInfo']) - && array_key_exists($col,$this->sheets[$sheet]['cellsInfo'][$row]) - && array_key_exists($type,$this->sheets[$sheet]['cellsInfo'][$row][$col])) { - return $this->sheets[$sheet]['cellsInfo'][$row][$col][$type]; - } - return ""; - } - function type($row,$col,$sheet=0) { - return $this->info($row,$col,'type',$sheet); - } - function raw($row,$col,$sheet=0) { - return $this->info($row,$col,'raw',$sheet); - } - function rowspan($row,$col,$sheet=0) { - $val = $this->info($row,$col,'rowspan',$sheet); - if ($val=="") { return 1; } - return $val; - } - function colspan($row,$col,$sheet=0) { - $val = $this->info($row,$col,'colspan',$sheet); - if ($val=="") { return 1; } - return $val; - } - function hyperlink($row,$col,$sheet=0) { - $link = $this->sheets[$sheet]['cellsInfo'][$row][$col]['hyperlink']; - if ($link) { - return $link['link']; - } - return ''; - } - function rowcount($sheet=0) { - return $this->sheets[$sheet]['numRows']; - } - function colcount($sheet=0) { - return $this->sheets[$sheet]['numCols']; - } - function colwidth($col,$sheet=0) { - - return $this->colInfo[$sheet][$col]['width']/9142*200; - } - function colhidden($col,$sheet=0) { - return !!$this->colInfo[$sheet][$col]['hidden']; - } - function rowheight($row,$sheet=0) { - return $this->rowInfo[$sheet][$row]['height']; - } - function rowhidden($row,$sheet=0) { - return !!$this->rowInfo[$sheet][$row]['hidden']; - } - function style($row,$col,$sheet=0,$properties='') { - $css = ""; - $font=$this->font($row,$col,$sheet); - if ($font!="") { - $css .= "font-family:$font;"; - } - $align=$this->align($row,$col,$sheet); - if ($align!="") { - $css .= "text-align:$align;"; - } - $height=$this->height($row,$col,$sheet); - if ($height!="") { - $css .= "font-size:$height"."px;"; - } - $bgcolor=$this->bgColor($row,$col,$sheet); - if ($bgcolor!="") { - $bgcolor = $this->colors[$bgcolor]; - $css .= "background-color:$bgcolor;"; - } - $color=$this->color($row,$col,$sheet); - if ($color!="") { - $css .= "color:$color;"; - } - $bold=$this->bold($row,$col,$sheet); - if ($bold) { - $css .= "font-weight:bold;"; - } - $italic=$this->italic($row,$col,$sheet); - if ($italic) { - $css .= "font-style:italic;"; - } - $underline=$this->underline($row,$col,$sheet); - if ($underline) { - $css .= "text-decoration:underline;"; - } - - $bLeft = $this->borderLeft($row,$col,$sheet); - $bRight = $this->borderRight($row,$col,$sheet); - $bTop = $this->borderTop($row,$col,$sheet); - $bBottom = $this->borderBottom($row,$col,$sheet); - $bLeftCol = $this->borderLeftColor($row,$col,$sheet); - $bRightCol = $this->borderRightColor($row,$col,$sheet); - $bTopCol = $this->borderTopColor($row,$col,$sheet); - $bBottomCol = $this->borderBottomColor($row,$col,$sheet); - - if ($bLeft!="" && $bLeft==$bRight && $bRight==$bTop && $bTop==$bBottom) { - $css .= "border:" . $this->lineStylesCss[$bLeft] .";"; - } - else { - if ($bLeft!="") { $css .= "border-left:" . $this->lineStylesCss[$bLeft] .";"; } - if ($bRight!="") { $css .= "border-right:" . $this->lineStylesCss[$bRight] .";"; } - if ($bTop!="") { $css .= "border-top:" . $this->lineStylesCss[$bTop] .";"; } - if ($bBottom!="") { $css .= "border-bottom:" . $this->lineStylesCss[$bBottom] .";"; } - } - - if ($bLeft!="" && $bLeftCol!="") { $css .= "border-left-color:" . $bLeftCol .";"; } - if ($bRight!="" && $bRightCol!="") { $css .= "border-right-color:" . $bRightCol .";"; } - if ($bTop!="" && $bTopCol!="") { $css .= "border-top-color:" . $bTopCol . ";"; } - if ($bBottom!="" && $bBottomCol!="") { $css .= "border-bottom-color:" . $bBottomCol .";"; } - - return $css; - } - function format($row,$col,$sheet=0) { - return $this->info($row,$col,'format',$sheet); - } - function formatIndex($row,$col,$sheet=0) { - return $this->info($row,$col,'formatIndex',$sheet); - } - function formatColor($row,$col,$sheet=0) { - return $this->info($row,$col,'formatColor',$sheet); - } - function xfRecord($row,$col,$sheet=0) { - $xfIndex = $this->info($row,$col,'xfIndex',$sheet); - if ($xfIndex!="") { - return $this->xfRecords[$xfIndex]; - } - return null; - } - function xfProperty($row,$col,$sheet,$prop) { - $xfRecord = $this->xfRecord($row,$col,$sheet); - if ($xfRecord!=null) { - return $xfRecord[$prop]; - } - return ""; - } - function align($row,$col,$sheet=0) { - return $this->xfProperty($row,$col,$sheet,'align'); - } - function bgColor($row,$col,$sheet=0) { - return $this->xfProperty($row,$col,$sheet,'bgColor'); - } - function borderLeft($row,$col,$sheet=0) { - return $this->xfProperty($row,$col,$sheet,'borderLeft'); - } - function borderRight($row,$col,$sheet=0) { - return $this->xfProperty($row,$col,$sheet,'borderRight'); - } - function borderTop($row,$col,$sheet=0) { - return $this->xfProperty($row,$col,$sheet,'borderTop'); - } - function borderBottom($row,$col,$sheet=0) { - return $this->xfProperty($row,$col,$sheet,'borderBottom'); - } - function borderLeftColor($row,$col,$sheet=0) { - return $this->colors[$this->xfProperty($row,$col,$sheet,'borderLeftColor')]; - } - function borderRightColor($row,$col,$sheet=0) { - return $this->colors[$this->xfProperty($row,$col,$sheet,'borderRightColor')]; - } - function borderTopColor($row,$col,$sheet=0) { - return $this->colors[$this->xfProperty($row,$col,$sheet,'borderTopColor')]; - } - function borderBottomColor($row,$col,$sheet=0) { - return $this->colors[$this->xfProperty($row,$col,$sheet,'borderBottomColor')]; - } - function fontRecord($row,$col,$sheet=0) { - $xfRecord = $this->xfRecord($row,$col,$sheet); - if ($xfRecord!=null) { - $font = $xfRecord['fontIndex']; - if ($font!=null) { - return $this->fontRecords[$font]; - } - } - return null; - } - function fontProperty($row,$col,$sheet=0,$prop) { - $font = $this->fontRecord($row,$col,$sheet); - if ($font!=null) { - return $font[$prop]; - } - return false; - } - function fontIndex($row,$col,$sheet=0) { - return $this->xfProperty($row,$col,$sheet,'fontIndex'); - } - function color($row,$col,$sheet=0) { - $formatColor = $this->formatColor($row,$col,$sheet); - if ($formatColor!="") { - return $formatColor; - } - $ci = $this->fontProperty($row,$col,$sheet,'color'); - return $this->rawColor($ci); - } - function rawColor($ci) { - if (($ci <> 0x7FFF) && ($ci <> '')) { - return $this->colors[$ci]; - } - return ""; - } - function bold($row,$col,$sheet=0) { - return $this->fontProperty($row,$col,$sheet,'bold'); - } - function italic($row,$col,$sheet=0) { - return $this->fontProperty($row,$col,$sheet,'italic'); - } - function underline($row,$col,$sheet=0) { - return $this->fontProperty($row,$col,$sheet,'under'); - } - function height($row,$col,$sheet=0) { - return $this->fontProperty($row,$col,$sheet,'height'); - } - function font($row,$col,$sheet=0) { - return $this->fontProperty($row,$col,$sheet,'font'); - } - function dump($row_numbers=false,$col_letters=false,$sheet=0,$table_class='excel') { - $out = ""; - if ($col_letters) { - $out .= "\n\t"; - if ($row_numbers) { - $out .= "\n\t\t"; - } - for($i=1;$i<=$this->colcount($sheet);$i++) { - $style = "width:" . ($this->colwidth($i,$sheet)*1) . "px;"; - if ($this->colhidden($i,$sheet)) { - $style .= "display:none;"; - } - $out .= "\n\t\t"; - } - $out .= "\n"; - } - - $out .= "\n"; - for($row=1;$row<=$this->rowcount($sheet);$row++) { - $rowheight = $this->rowheight($row,$sheet); - $style = "height:" . ($rowheight*(4/3)) . "px;"; - if ($this->rowhidden($row,$sheet)) { - $style .= "display:none;"; - } - $out .= "\n\t"; - if ($row_numbers) { - $out .= "\n\t\t"; - } - for($col=1;$col<=$this->colcount($sheet);$col++) { - - $rowspan = $this->rowspan($row,$col,$sheet); - $colspan = $this->colspan($row,$col,$sheet); - for($i=0;$i<$rowspan;$i++) { - for($j=0;$j<$colspan;$j++) { - if ($i>0 || $j>0) { - $this->sheets[$sheet]['cellsInfo'][$row+$i][$col+$j]['dontprint']=1; - } - } - } - if(!$this->sheets[$sheet]['cellsInfo'][$row][$col]['dontprint']) { - $style = $this->style($row,$col,$sheet); - if ($this->colhidden($col,$sheet)) { - $style .= "display:none;"; - } - $out .= "\n\t\t"; - } - } - $out .= "\n"; - } - $out .= "
 " . strtoupper($this->colindexes[$i]) . "
$row 1?" colspan=$colspan":"") . ($rowspan > 1?" rowspan=$rowspan":"") . ">"; - $val = $this->val($row,$col,$sheet); - if ($val=='') { $val=" "; } - else { - $val = htmlentities($val); - $link = $this->hyperlink($row,$col,$sheet); - if ($link!='') { - $val = "$val"; - } - } - $out .= "".nl2br($val).""; - $out .= "
"; - return $out; - } - var $boundsheets = array(); - var $formatRecords = array(); - var $fontRecords = array(); - var $xfRecords = array(); - var $colInfo = array(); - var $rowInfo = array(); - var $sst = array(); - var $sheets = array(); - var $data; - var $_ole; - var $_defaultEncoding = "UTF-8"; - var $_defaultFormat = SPREADSHEET_EXCEL_READER_DEF_NUM_FORMAT; - var $_columnsFormat = array(); - var $_rowoffset = 1; - var $_coloffset = 1; - var $dateFormats = array ( - 0xe => "m/d/Y", - 0xf => "M-d-Y", - 0x10 => "d-M", - 0x11 => "M-Y", - 0x12 => "h:i a", - 0x13 => "h:i:s a", - 0x14 => "H:i", - 0x15 => "H:i:s", - 0x16 => "d/m/Y H:i", - 0x2d => "i:s", - 0x2e => "H:i:s", - 0x2f => "i:s.S" - ); - var $numberFormats = array( - 0x1 => "0", - 0x2 => "0.00", - 0x3 => "#,##0", - 0x4 => "#,##0.00", - 0x5 => "\$#,##0;(\$#,##0)", - 0x6 => "\$#,##0;[Red](\$#,##0)", - 0x7 => "\$#,##0.00;(\$#,##0.00)", - 0x8 => "\$#,##0.00;[Red](\$#,##0.00)", - 0x9 => "0%", - 0xa => "0.00%", - 0xb => "0.00E+00", - 0x25 => "#,##0;(#,##0)", - 0x26 => "#,##0;[Red](#,##0)", - 0x27 => "#,##0.00;(#,##0.00)", - 0x28 => "#,##0.00;[Red](#,##0.00)", - 0x29 => "#,##0;(#,##0)", - 0x2a => "\$#,##0;(\$#,##0)", - 0x2b => "#,##0.00;(#,##0.00)", - 0x2c => "\$#,##0.00;(\$#,##0.00)", - 0x30 => "##0.0E+0" - ); - var $colors = Array( - 0x00 => "#000000", - 0x01 => "#FFFFFF", - 0x02 => "#FF0000", - 0x03 => "#00FF00", - 0x04 => "#0000FF", - 0x05 => "#FFFF00", - 0x06 => "#FF00FF", - 0x07 => "#00FFFF", - 0x08 => "#000000", - 0x09 => "#FFFFFF", - 0x0A => "#FF0000", - 0x0B => "#00FF00", - 0x0C => "#0000FF", - 0x0D => "#FFFF00", - 0x0E => "#FF00FF", - 0x0F => "#00FFFF", - 0x10 => "#800000", - 0x11 => "#008000", - 0x12 => "#000080", - 0x13 => "#808000", - 0x14 => "#800080", - 0x15 => "#008080", - 0x16 => "#C0C0C0", - 0x17 => "#808080", - 0x18 => "#9999FF", - 0x19 => "#993366", - 0x1A => "#FFFFCC", - 0x1B => "#CCFFFF", - 0x1C => "#660066", - 0x1D => "#FF8080", - 0x1E => "#0066CC", - 0x1F => "#CCCCFF", - 0x20 => "#000080", - 0x21 => "#FF00FF", - 0x22 => "#FFFF00", - 0x23 => "#00FFFF", - 0x24 => "#800080", - 0x25 => "#800000", - 0x26 => "#008080", - 0x27 => "#0000FF", - 0x28 => "#00CCFF", - 0x29 => "#CCFFFF", - 0x2A => "#CCFFCC", - 0x2B => "#FFFF99", - 0x2C => "#99CCFF", - 0x2D => "#FF99CC", - 0x2E => "#CC99FF", - 0x2F => "#FFCC99", - 0x30 => "#3366FF", - 0x31 => "#33CCCC", - 0x32 => "#99CC00", - 0x33 => "#FFCC00", - 0x34 => "#FF9900", - 0x35 => "#FF6600", - 0x36 => "#666699", - 0x37 => "#969696", - 0x38 => "#003366", - 0x39 => "#339966", - 0x3A => "#003300", - 0x3B => "#333300", - 0x3C => "#993300", - 0x3D => "#993366", - 0x3E => "#333399", - 0x3F => "#333333", - 0x40 => "#000000", - 0x41 => "#FFFFFF", - 0x43 => "#000000", - 0x4D => "#000000", - 0x4E => "#FFFFFF", - 0x4F => "#000000", - 0x50 => "#FFFFFF", - 0x51 => "#000000", - 0x7FFF => "#000000" - ); - var $lineStyles = array( - 0x00 => "", - 0x01 => "Thin", - 0x02 => "Medium", - 0x03 => "Dashed", - 0x04 => "Dotted", - 0x05 => "Thick", - 0x06 => "Double", - 0x07 => "Hair", - 0x08 => "Medium dashed", - 0x09 => "Thin dash-dotted", - 0x0A => "Medium dash-dotted", - 0x0B => "Thin dash-dot-dotted", - 0x0C => "Medium dash-dot-dotted", - 0x0D => "Slanted medium dash-dotted" - ); - var $lineStylesCss = array( - "Thin" => "1px solid", - "Medium" => "2px solid", - "Dashed" => "1px dashed", - "Dotted" => "1px dotted", - "Thick" => "3px solid", - "Double" => "double", - "Hair" => "1px solid", - "Medium dashed" => "2px dashed", - "Thin dash-dotted" => "1px dashed", - "Medium dash-dotted" => "2px dashed", - "Thin dash-dot-dotted" => "1px dashed", - "Medium dash-dot-dotted" => "2px dashed", - "Slanted medium dash-dotte" => "2px dashed" - ); - function read16bitstring($data, $start) { - $len = 0; - while (ord($data[$start + $len]) + ord($data[$start + $len + 1]) > 0) $len++; - return substr($data, $start, $len); - } - function _format_value($format,$num,$f) { - - // http://code.google.com/p/php-excel-reader/issues/detail?id=7 - if ( (!$f && $format=="%s") || ($f==49) || ($format=="GENERAL") ) { - return array('string'=>$num, 'formatColor'=>null); - } - - - $parts = split(";",$format); - $pattern = $parts[0]; - - if (count($parts)>2 && $num==0) { - $pattern = $parts[2]; - } - - if (count($parts)>1 && $num<0) { - $pattern = $parts[1]; - $num = abs($num); - } - $color = ""; - $matches = array(); - $color_regex = "/^\[(BLACK|BLUE|CYAN|GREEN|MAGENTA|RED|WHITE|YELLOW)\]/i"; - if (preg_match($color_regex,$pattern,$matches)) { - $color = strtolower($matches[1]); - $pattern = preg_replace($color_regex,"",$pattern); - } - - - $pattern = preg_replace("/_./","",$pattern); - - - $pattern = preg_replace("/\\\/","",$pattern); - - - $pattern = preg_replace("/\"/","",$pattern); - - $pattern = preg_replace("/\#/","0",$pattern); - - $has_commas = preg_match("/,/",$pattern); - if ($has_commas) { - $pattern = preg_replace("/,/","",$pattern); - } - - if (preg_match("/\d(\%)([^\%]|$)/",$pattern,$matches)) { - $num = $num * 100; - $pattern = preg_replace("/(\d)(\%)([^\%]|$)/","$1%$3",$pattern); - } - - $number_regex = "/(\d+)(\.?)(\d*)/"; - if (preg_match($number_regex,$pattern,$matches)) { - $left = $matches[1]; - $dec = $matches[2]; - $right = $matches[3]; - if ($has_commas) { - $formatted = number_format($num,strlen($right)); - } - else { - $sprintf_pattern = "%1.".strlen($right)."f"; - $formatted = sprintf($sprintf_pattern, $num); - } - $pattern = preg_replace($number_regex, $formatted, $pattern); - } - return array( - 'string'=>$pattern, - 'formatColor'=>$color - ); - } - function Spreadsheet_Excel_Reader($file='',$store_extended_info=true,$outputEncoding='') { - $this->_ole = new OLERead(); - $this->setUTFEncoder('iconv'); - if ($outputEncoding != '') { - $this->setOutputEncoding($outputEncoding); - } - for ($i=1; $i<245; $i++) { - $name = strtolower(( (($i-1)/26>=1)?chr(($i-1)/26+64):'') . chr(($i-1)%26+65)); - $this->colnames[$name] = $i; - $this->colindexes[$i] = $name; - } - $this->store_extended_info = $store_extended_info; - if ($file!="") { - $this->read($file); - } - } - function setOutputEncoding($encoding) { - $this->_defaultEncoding = $encoding; - } - function setUTFEncoder($encoder = 'iconv') { - $this->_encoderFunction = ''; - if ($encoder == 'iconv') { - $this->_encoderFunction = function_exists('iconv') ? 'iconv' : ''; - } elseif ($encoder == 'mb') { - $this->_encoderFunction = function_exists('mb_convert_encoding') ? 'mb_convert_encoding' : ''; - } - } - function setRowColOffset($iOffset) { - $this->_rowoffset = $iOffset; - $this->_coloffset = $iOffset; - } - function setDefaultFormat($sFormat) { - $this->_defaultFormat = $sFormat; - } - function setColumnFormat($column, $sFormat) { - $this->_columnsFormat[$column] = $sFormat; - } - function read($sFileName) { - $res = $this->_ole->read($sFileName); - - if($res === false) { - - if($this->_ole->error == 1) { - - die('The filename ' . $sFileName . ' is not readable'); - } - - } - $this->data = $this->_ole->getWorkBook(); - $this->_parse(); - } - function _parse() { - $pos = 0; - $data = $this->data; - $code = v($data,$pos); - $length = v($data,$pos+2); - $version = v($data,$pos+4); - $substreamType = v($data,$pos+6); - $this->version = $version; - if (($version != SPREADSHEET_EXCEL_READER_BIFF8) && - ($version != SPREADSHEET_EXCEL_READER_BIFF7)) { - return false; - } - if ($substreamType != SPREADSHEET_EXCEL_READER_WORKBOOKGLOBALS){ - return false; - } - $pos += $length + 4; - $code = v($data,$pos); - $length = v($data,$pos+2); - while ($code != SPREADSHEET_EXCEL_READER_TYPE_EOF) { - switch ($code) { - case SPREADSHEET_EXCEL_READER_TYPE_SST: - $spos = $pos + 4; - $limitpos = $spos + $length; - $uniqueStrings = $this->_GetInt4d($data, $spos+4); - $spos += 8; - for ($i = 0; $i < $uniqueStrings; $i++) { - - if ($spos == $limitpos) { - $opcode = v($data,$spos); - $conlength = v($data,$spos+2); - if ($opcode != 0x3c) { - return -1; - } - $spos += 4; - $limitpos = $spos + $conlength; - } - $numChars = ord($data[$spos]) | (ord($data[$spos+1]) << 8); - $spos += 2; - $optionFlags = ord($data[$spos]); - $spos++; - $asciiEncoding = (($optionFlags & 0x01) == 0) ; - $extendedString = ( ($optionFlags & 0x04) != 0); - - $richString = ( ($optionFlags & 0x08) != 0); - if ($richString) { - - $formattingRuns = v($data,$spos); - $spos += 2; - } - if ($extendedString) { - - $extendedRunLength = $this->_GetInt4d($data, $spos); - $spos += 4; - } - $len = ($asciiEncoding)? $numChars : $numChars*2; - if ($spos + $len < $limitpos) { - $retstr = substr($data, $spos, $len); - $spos += $len; - } - else{ - - $retstr = substr($data, $spos, $limitpos - $spos); - $bytesRead = $limitpos - $spos; - $charsLeft = $numChars - (($asciiEncoding) ? $bytesRead : ($bytesRead / 2)); - $spos = $limitpos; - while ($charsLeft > 0){ - $opcode = v($data,$spos); - $conlength = v($data,$spos+2); - if ($opcode != 0x3c) { - return -1; - } - $spos += 4; - $limitpos = $spos + $conlength; - $option = ord($data[$spos]); - $spos += 1; - if ($asciiEncoding && ($option == 0)) { - $len = min($charsLeft, $limitpos - $spos); - $retstr .= substr($data, $spos, $len); - $charsLeft -= $len; - $asciiEncoding = true; - } - elseif (!$asciiEncoding && ($option != 0)) { - $len = min($charsLeft * 2, $limitpos - $spos); - $retstr .= substr($data, $spos, $len); - $charsLeft -= $len/2; - $asciiEncoding = false; - } - elseif (!$asciiEncoding && ($option == 0)) { - - - $len = min($charsLeft, $limitpos - $spos); - for ($j = 0; $j < $len; $j++) { - $retstr .= $data[$spos + $j].chr(0); - } - $charsLeft -= $len; - $asciiEncoding = false; - } - else{ - $newstr = ''; - for ($j = 0; $j < strlen($retstr); $j++) { - $newstr = $retstr[$j].chr(0); - } - $retstr = $newstr; - $len = min($charsLeft * 2, $limitpos - $spos); - $retstr .= substr($data, $spos, $len); - $charsLeft -= $len/2; - $asciiEncoding = false; - } - $spos += $len; - } - } - $retstr = ($asciiEncoding) ? $retstr : $this->_encodeUTF16($retstr); - if ($richString){ - $spos += 4 * $formattingRuns; - } - - if ($extendedString) { - $spos += $extendedRunLength; - } - $this->sst[]=$retstr; - } - break; - case SPREADSHEET_EXCEL_READER_TYPE_FILEPASS: - return false; - break; - case SPREADSHEET_EXCEL_READER_TYPE_NAME: - break; - case SPREADSHEET_EXCEL_READER_TYPE_FORMAT: - $indexCode = v($data,$pos+4); - if ($version == SPREADSHEET_EXCEL_READER_BIFF8) { - $numchars = v($data,$pos+6); - if (ord($data[$pos+8]) == 0){ - $formatString = substr($data, $pos+9, $numchars); - } else { - $formatString = substr($data, $pos+9, $numchars*2); - } - } else { - $numchars = ord($data[$pos+6]); - $formatString = substr($data, $pos+7, $numchars*2); - } - $this->formatRecords[$indexCode] = $formatString; - break; - case SPREADSHEET_EXCEL_READER_TYPE_FONT: - $height = v($data,$pos+4); - $option = v($data,$pos+6); - $color = v($data,$pos+8); - $weight = v($data,$pos+10); - $under = ord($data[$pos+14]); - $font = ""; - - $numchars = ord($data[$pos+18]); - if ((ord($data[$pos+19]) & 1) == 0){ - $font = substr($data, $pos+20, $numchars); - } else { - $font = substr($data, $pos+20, $numchars*2); - $font = $this->_encodeUTF16($font); - } - $this->fontRecords[] = array( - 'height' => $height / 20, - 'italic' => !!($option & 2), - 'color' => $color, - 'under' => !($under==0), - 'bold' => ($weight==700), - 'font' => $font, - 'raw' => $this->dumpHexData($data, $pos+3, $length) - ); - break; - case SPREADSHEET_EXCEL_READER_TYPE_PALETTE: - $colors = ord($data[$pos+4]) | ord($data[$pos+5]) << 8; - for ($coli = 0; $coli < $colors; $coli++) { - $colOff = $pos + 2 + ($coli * 4); - $colr = ord($data[$colOff]); - $colg = ord($data[$colOff+1]); - $colb = ord($data[$colOff+2]); - $this->colors[0x07 + $coli] = '#' . $this->myhex($colr) . $this->myhex($colg) . $this->myhex($colb); - } - break; - case SPREADSHEET_EXCEL_READER_TYPE_XF: - $fontIndexCode = (ord($data[$pos+4]) | ord($data[$pos+5]) << 8) - 1; - $fontIndexCode = max(0,$fontIndexCode); - $indexCode = ord($data[$pos+6]) | ord($data[$pos+7]) << 8; - $alignbit = ord($data[$pos+10]) & 3; - $bgi = (ord($data[$pos+22]) | ord($data[$pos+23]) << 8) & 0x3FFF; - $bgcolor = ($bgi & 0x7F); - $align = ""; - if ($alignbit==3) { $align="right"; } - if ($alignbit==2) { $align="center"; } - $fillPattern = (ord($data[$pos+21]) & 0xFC) >> 2; - if ($fillPattern == 0) { - $bgcolor = ""; - } - $xf = array(); - $xf['formatIndex'] = $indexCode; - $xf['align'] = $align; - $xf['fontIndex'] = $fontIndexCode; - $xf['bgColor'] = $bgcolor; - $xf['fillPattern'] = $fillPattern; - $border = ord($data[$pos+14]) | (ord($data[$pos+15]) << 8) | (ord($data[$pos+16]) << 16) | (ord($data[$pos+17]) << 24); - $xf['borderLeft'] = $this->lineStyles[($border & 0xF)]; - $xf['borderRight'] = $this->lineStyles[($border & 0xF0) >> 4]; - $xf['borderTop'] = $this->lineStyles[($border & 0xF00) >> 8]; - $xf['borderBottom'] = $this->lineStyles[($border & 0xF000) >> 12]; - - $xf['borderLeftColor'] = ($border & 0x7F0000) >> 16; - $xf['borderRightColor'] = ($border & 0x3F800000) >> 23; - $border = (ord($data[$pos+18]) | ord($data[$pos+19]) << 8); - $xf['borderTopColor'] = ($border & 0x7F); - $xf['borderBottomColor'] = ($border & 0x3F80) >> 7; - - if (array_key_exists($indexCode, $this->dateFormats)) { - $xf['type'] = 'date'; - $xf['format'] = $this->dateFormats[$indexCode]; - if ($align=='') { $xf['align'] = 'right'; } - }elseif (array_key_exists($indexCode, $this->numberFormats)) { - $xf['type'] = 'number'; - $xf['format'] = $this->numberFormats[$indexCode]; - if ($align=='') { $xf['align'] = 'right'; } - }else{ - $isdate = FALSE; - $formatstr = ''; - if ($indexCode > 0){ - if (isset($this->formatRecords[$indexCode])) - $formatstr = $this->formatRecords[$indexCode]; - if ($formatstr!="") { - $tmp = preg_replace("/^\[[^\]]*\]/","",$formatstr); - if (preg_match("/[^hmsday\/\-:\s\\\,AMP]/i", $tmp) == 0) { - $isdate = TRUE; - $formatstr = $tmp; - $formatstr = str_replace(array('AM/PM','mmmm','mmm'), array('a','F','M'), $formatstr); - - - - $formatstr = preg_replace("/(h:?)mm?/","$1i", $formatstr); - $formatstr = preg_replace("/mm?(:?s)/","i$1", $formatstr); - - $formatstr = preg_replace("/(^|[^m])m([^m]|$)/", '$1n$2', $formatstr); - $formatstr = preg_replace("/(^|[^m])m([^m]|$)/", '$1n$2', $formatstr); - - $formatstr = str_replace('mm', 'm', $formatstr); - - $formatstr = preg_replace("/(^|[^d])d([^d]|$)/", '$1j$2', $formatstr); - $formatstr = str_replace(array('dddd','ddd','dd','yyyy','yy','hh','h'), array('l','D','d','Y','y','H','g'), $formatstr); - $formatstr = preg_replace("/ss?/", 's', $formatstr); - } - } - } - if ($isdate){ - $xf['type'] = 'date'; - $xf['format'] = $formatstr; - if ($align=='') { $xf['align'] = 'right'; } - }else{ - - if (preg_match("/[0#]/", $formatstr)) { - $xf['type'] = 'number'; - if ($align=='') { $xf['align']='right'; } - } - else { - $xf['type'] = 'other'; - } - $xf['format'] = $formatstr; - $xf['code'] = $indexCode; - } - } - $this->xfRecords[] = $xf; - break; - case SPREADSHEET_EXCEL_READER_TYPE_NINETEENFOUR: - $this->nineteenFour = (ord($data[$pos+4]) == 1); - break; - case SPREADSHEET_EXCEL_READER_TYPE_BOUNDSHEET: - $rec_offset = $this->_GetInt4d($data, $pos+4); - $rec_typeFlag = ord($data[$pos+8]); - $rec_visibilityFlag = ord($data[$pos+9]); - $rec_length = ord($data[$pos+10]); - if ($version == SPREADSHEET_EXCEL_READER_BIFF8){ - $chartype = ord($data[$pos+11]); - if ($chartype == 0){ - $rec_name = substr($data, $pos+12, $rec_length); - } else { - $rec_name = $this->_encodeUTF16(substr($data, $pos+12, $rec_length*2)); - } - }elseif ($version == SPREADSHEET_EXCEL_READER_BIFF7){ - $rec_name = substr($data, $pos+11, $rec_length); - } - $this->boundsheets[] = array('name'=>$rec_name,'offset'=>$rec_offset); - break; - } - $pos += $length + 4; - $code = ord($data[$pos]) | ord($data[$pos+1])<<8; - $length = ord($data[$pos+2]) | ord($data[$pos+3])<<8; - } - foreach ($this->boundsheets as $key=>$val){ - $this->sn = $key; - $this->_parsesheet($val['offset']); - } - return true; - } - function _parsesheet($spos) { - $cont = true; - $data = $this->data; - - $code = ord($data[$spos]) | ord($data[$spos+1])<<8; - $length = ord($data[$spos+2]) | ord($data[$spos+3])<<8; - $version = ord($data[$spos + 4]) | ord($data[$spos + 5])<<8; - $substreamType = ord($data[$spos + 6]) | ord($data[$spos + 7])<<8; - if (($version != SPREADSHEET_EXCEL_READER_BIFF8) && ($version != SPREADSHEET_EXCEL_READER_BIFF7)) { - return -1; - } - if ($substreamType != SPREADSHEET_EXCEL_READER_WORKSHEET){ - return -2; - } - $spos += $length + 4; - while($cont) { - $lowcode = ord($data[$spos]); - if ($lowcode == SPREADSHEET_EXCEL_READER_TYPE_EOF) break; - $code = $lowcode | ord($data[$spos+1])<<8; - $length = ord($data[$spos+2]) | ord($data[$spos+3])<<8; - $spos += 4; - $this->sheets[$this->sn]['maxrow'] = $this->_rowoffset - 1; - $this->sheets[$this->sn]['maxcol'] = $this->_coloffset - 1; - unset($this->rectype); - switch ($code) { - case SPREADSHEET_EXCEL_READER_TYPE_DIMENSION: - if (!isset($this->numRows)) { - if (($length == 10) || ($version == SPREADSHEET_EXCEL_READER_BIFF7)){ - $this->sheets[$this->sn]['numRows'] = ord($data[$spos+2]) | ord($data[$spos+3]) << 8; - $this->sheets[$this->sn]['numCols'] = ord($data[$spos+6]) | ord($data[$spos+7]) << 8; - } else { - $this->sheets[$this->sn]['numRows'] = ord($data[$spos+4]) | ord($data[$spos+5]) << 8; - $this->sheets[$this->sn]['numCols'] = ord($data[$spos+10]) | ord($data[$spos+11]) << 8; - } - } - break; - case SPREADSHEET_EXCEL_READER_TYPE_MERGEDCELLS: - $cellRanges = ord($data[$spos]) | ord($data[$spos+1])<<8; - for ($i = 0; $i < $cellRanges; $i++) { - $fr = ord($data[$spos + 8*$i + 2]) | ord($data[$spos + 8*$i + 3])<<8; - $lr = ord($data[$spos + 8*$i + 4]) | ord($data[$spos + 8*$i + 5])<<8; - $fc = ord($data[$spos + 8*$i + 6]) | ord($data[$spos + 8*$i + 7])<<8; - $lc = ord($data[$spos + 8*$i + 8]) | ord($data[$spos + 8*$i + 9])<<8; - if ($lr - $fr > 0) { - $this->sheets[$this->sn]['cellsInfo'][$fr+1][$fc+1]['rowspan'] = $lr - $fr + 1; - } - if ($lc - $fc > 0) { - $this->sheets[$this->sn]['cellsInfo'][$fr+1][$fc+1]['colspan'] = $lc - $fc + 1; - } - } - break; - case SPREADSHEET_EXCEL_READER_TYPE_RK: - case SPREADSHEET_EXCEL_READER_TYPE_RK2: - $row = ord($data[$spos]) | ord($data[$spos+1])<<8; - $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; - $rknum = $this->_GetInt4d($data, $spos + 6); - $numValue = $this->_GetIEEE754($rknum); - $info = $this->_getCellDetails($spos,$numValue,$column); - $this->addcell($row, $column, $info['string'],$info); - break; - case SPREADSHEET_EXCEL_READER_TYPE_LABELSST: - $row = ord($data[$spos]) | ord($data[$spos+1])<<8; - $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; - $xfindex = ord($data[$spos+4]) | ord($data[$spos+5])<<8; - $index = $this->_GetInt4d($data, $spos + 6); - $this->addcell($row, $column, $this->sst[$index], array('xfIndex'=>$xfindex) ); - break; - case SPREADSHEET_EXCEL_READER_TYPE_MULRK: - $row = ord($data[$spos]) | ord($data[$spos+1])<<8; - $colFirst = ord($data[$spos+2]) | ord($data[$spos+3])<<8; - $colLast = ord($data[$spos + $length - 2]) | ord($data[$spos + $length - 1])<<8; - $columns = $colLast - $colFirst + 1; - $tmppos = $spos+4; - for ($i = 0; $i < $columns; $i++) { - $numValue = $this->_GetIEEE754($this->_GetInt4d($data, $tmppos + 2)); - $info = $this->_getCellDetails($tmppos-4,$numValue,$colFirst + $i + 1); - $tmppos += 6; - $this->addcell($row, $colFirst + $i, $info['string'], $info); - } - break; - case SPREADSHEET_EXCEL_READER_TYPE_NUMBER: - $row = ord($data[$spos]) | ord($data[$spos+1])<<8; - $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; - $tmp = unpack("ddouble", substr($data, $spos + 6, 8)); - if ($this->isDate($spos)) { - $numValue = $tmp['double']; - } - else { - $numValue = $this->createNumber($spos); - } - $info = $this->_getCellDetails($spos,$numValue,$column); - $this->addcell($row, $column, $info['string'], $info); - break; - case SPREADSHEET_EXCEL_READER_TYPE_FORMULA: - case SPREADSHEET_EXCEL_READER_TYPE_FORMULA2: - $row = ord($data[$spos]) | ord($data[$spos+1])<<8; - $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; - if ((ord($data[$spos+6])==0) && (ord($data[$spos+12])==255) && (ord($data[$spos+13])==255)) { - - - // http://code.google.com/p/php-excel-reader/issues/detail?id=4 - $previousRow = $row; - $previousCol = $column; - } elseif ((ord($data[$spos+6])==1) && (ord($data[$spos+12])==255) && (ord($data[$spos+13])==255)) { - - // http://code.google.com/p/php-excel-reader/issues/detail?id=4 - if (ord($this->data[$spos+8])==1) { - $this->addcell($row, $column, "TRUE"); - } else { - $this->addcell($row, $column, "FALSE"); - } - } elseif ((ord($data[$spos+6])==2) && (ord($data[$spos+12])==255) && (ord($data[$spos+13])==255)) { - - } elseif ((ord($data[$spos+6])==3) && (ord($data[$spos+12])==255) && (ord($data[$spos+13])==255)) { - - $this->addcell($row, $column, ''); - } else { - - $tmp = unpack("ddouble", substr($data, $spos + 6, 8)); - if ($this->isDate($spos)) { - $numValue = $tmp['double']; - } - else { - $numValue = $this->createNumber($spos); - } - $info = $this->_getCellDetails($spos,$numValue,$column); - $this->addcell($row, $column, $info['string'], $info); - } - break; - case SPREADSHEET_EXCEL_READER_TYPE_BOOLERR: - $row = ord($data[$spos]) | ord($data[$spos+1])<<8; - $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; - $string = ord($data[$spos+6]); - $this->addcell($row, $column, $string); - break; - case SPREADSHEET_EXCEL_READER_TYPE_STRING: - // http://code.google.com/p/php-excel-reader/issues/detail?id=4 - if ($version == SPREADSHEET_EXCEL_READER_BIFF8){ - - $xpos = $spos; - $numChars =ord($data[$xpos]) | (ord($data[$xpos+1]) << 8); - $xpos += 2; - $optionFlags =ord($data[$xpos]); - $xpos++; - $asciiEncoding = (($optionFlags &0x01) == 0) ; - $extendedString = (($optionFlags & 0x04) != 0); - - $richString = (($optionFlags & 0x08) != 0); - if ($richString) { - - $formattingRuns =ord($data[$xpos]) | (ord($data[$xpos+1]) << 8); - $xpos += 2; - } - if ($extendedString) { - - $extendedRunLength =$this->_GetInt4d($this->data, $xpos); - $xpos += 4; - } - $len = ($asciiEncoding)?$numChars : $numChars*2; - $retstr =substr($data, $xpos, $len); - $xpos += $len; - $retstr = ($asciiEncoding)? $retstr : $this->_encodeUTF16($retstr); - } - elseif ($version == SPREADSHEET_EXCEL_READER_BIFF7){ - - $xpos = $spos; - $numChars =ord($data[$xpos]) | (ord($data[$xpos+1]) << 8); - $xpos += 2; - $retstr =substr($data, $xpos, $numChars); - } - $this->addcell($previousRow, $previousCol, $retstr); - break; - case SPREADSHEET_EXCEL_READER_TYPE_ROW: - $row = ord($data[$spos]) | ord($data[$spos+1])<<8; - $rowInfo = ord($data[$spos + 6]) | ((ord($data[$spos+7]) << 8) & 0x7FFF); - if (($rowInfo & 0x8000) > 0) { - $rowHeight = -1; - } else { - $rowHeight = $rowInfo & 0x7FFF; - } - $rowHidden = (ord($data[$spos + 12]) & 0x20) >> 5; - $this->rowInfo[$this->sn][$row+1] = Array('height' => $rowHeight / 20, 'hidden'=>$rowHidden ); - break; - case SPREADSHEET_EXCEL_READER_TYPE_DBCELL: - break; - case SPREADSHEET_EXCEL_READER_TYPE_MULBLANK: - $row = ord($data[$spos]) | ord($data[$spos+1])<<8; - $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; - $cols = ($length / 2) - 3; - for ($c = 0; $c < $cols; $c++) { - $xfindex = ord($data[$spos + 4 + ($c * 2)]) | ord($data[$spos + 5 + ($c * 2)])<<8; - $this->addcell($row, $column + $c, "", array('xfIndex'=>$xfindex)); - } - break; - case SPREADSHEET_EXCEL_READER_TYPE_LABEL: - $row = ord($data[$spos]) | ord($data[$spos+1])<<8; - $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; - $this->addcell($row, $column, substr($data, $spos + 8, ord($data[$spos + 6]) | ord($data[$spos + 7])<<8)); - break; - case SPREADSHEET_EXCEL_READER_TYPE_EOF: - $cont = false; - break; - case SPREADSHEET_EXCEL_READER_TYPE_HYPER: - - $row = ord($this->data[$spos]) | ord($this->data[$spos+1])<<8; - $row2 = ord($this->data[$spos+2]) | ord($this->data[$spos+3])<<8; - $column = ord($this->data[$spos+4]) | ord($this->data[$spos+5])<<8; - $column2 = ord($this->data[$spos+6]) | ord($this->data[$spos+7])<<8; - $linkdata = Array(); - $flags = ord($this->data[$spos + 28]); - $udesc = ""; - $ulink = ""; - $uloc = 32; - $linkdata['flags'] = $flags; - if (($flags & 1) > 0 ) { - - if (($flags & 0x14) == 0x14 ) { - $uloc += 4; - $descLen = ord($this->data[$spos + 32]) | ord($this->data[$spos + 33]) << 8; - $udesc = substr($this->data, $spos + $uloc, $descLen * 2); - $uloc += 2 * $descLen; - } - $ulink = $this->read16bitstring($this->data, $spos + $uloc + 20); - if ($udesc == "") { - $udesc = $ulink; - } - } - $linkdata['desc'] = $udesc; - $linkdata['link'] = $this->_encodeUTF16($ulink); - for ($r=$row; $r<=$row2; $r++) { - for ($c=$column; $c<=$column2; $c++) { - $this->sheets[$this->sn]['cellsInfo'][$r+1][$c+1]['hyperlink'] = $linkdata; - } - } - break; - case SPREADSHEET_EXCEL_READER_TYPE_DEFCOLWIDTH: - $this->defaultColWidth = ord($data[$spos+4]) | ord($data[$spos+5]) << 8; - break; - case SPREADSHEET_EXCEL_READER_TYPE_STANDARDWIDTH: - $this->standardColWidth = ord($data[$spos+4]) | ord($data[$spos+5]) << 8; - break; - case SPREADSHEET_EXCEL_READER_TYPE_COLINFO: - $colfrom = ord($data[$spos+0]) | ord($data[$spos+1]) << 8; - $colto = ord($data[$spos+2]) | ord($data[$spos+3]) << 8; - $cw = ord($data[$spos+4]) | ord($data[$spos+5]) << 8; - $cxf = ord($data[$spos+6]) | ord($data[$spos+7]) << 8; - $co = ord($data[$spos+8]); - for ($coli = $colfrom; $coli <= $colto; $coli++) { - $this->colInfo[$this->sn][$coli+1] = Array('width' => $cw, 'xf' => $cxf, 'hidden' => ($co & 0x01), 'collapsed' => ($co & 0x1000) >> 12); - } - break; - default: - break; - } - $spos += $length; - } - if (!isset($this->sheets[$this->sn]['numRows'])) - $this->sheets[$this->sn]['numRows'] = $this->sheets[$this->sn]['maxrow']; - if (!isset($this->sheets[$this->sn]['numCols'])) - $this->sheets[$this->sn]['numCols'] = $this->sheets[$this->sn]['maxcol']; - } - function isDate($spos) { - $xfindex = ord($this->data[$spos+4]) | ord($this->data[$spos+5]) << 8; - return ($this->xfRecords[$xfindex]['type'] == 'date'); - } - - function _getCellDetails($spos,$numValue,$column) { - $xfindex = ord($this->data[$spos+4]) | ord($this->data[$spos+5]) << 8; - $xfrecord = $this->xfRecords[$xfindex]; - $type = $xfrecord['type']; - $format = $xfrecord['format']; - $formatIndex = $xfrecord['formatIndex']; - $fontIndex = $xfrecord['fontIndex']; - $formatColor = ""; - $rectype = ''; - $string = ''; - $raw = ''; - if (isset($this->_columnsFormat[$column + 1])){ - $format = $this->_columnsFormat[$column + 1]; - } - if ($type == 'date') { - // See http://groups.google.com/group/php-excel-reader-discuss/browse_frm/thread/9c3f9790d12d8e10/f2045c2369ac79de - $rectype = 'date'; - - $utcDays = floor($numValue - ($this->nineteenFour ? SPREADSHEET_EXCEL_READER_UTCOFFSETDAYS1904 : SPREADSHEET_EXCEL_READER_UTCOFFSETDAYS)); - $utcValue = ($utcDays) * SPREADSHEET_EXCEL_READER_MSINADAY; - $dateinfo = gmgetdate($utcValue); - $raw = $numValue; - $fractionalDay = $numValue - floor($numValue) + .0000001; - $totalseconds = floor(SPREADSHEET_EXCEL_READER_MSINADAY * $fractionalDay); - $secs = $totalseconds % 60; - $totalseconds -= $secs; - $hours = floor($totalseconds / (60 * 60)); - $mins = floor($totalseconds / 60) % 60; - $string = date ($format, mktime($hours, $mins, $secs, $dateinfo["mon"], $dateinfo["mday"], $dateinfo["year"])); - } else if ($type == 'number') { - $rectype = 'number'; - $formatted = $this->_format_value($format, $numValue, $formatIndex); - $string = $formatted['string']; - $formatColor = $formatted['formatColor']; - $raw = $numValue; - } else{ - if ($format=="") { - $format = $this->_defaultFormat; - } - $rectype = 'unknown'; - $formatted = $this->_format_value($format, $numValue, $formatIndex); - $string = $formatted['string']; - $formatColor = $formatted['formatColor']; - $raw = $numValue; - } - return array( - 'string'=>$string, - 'raw'=>$raw, - 'rectype'=>$rectype, - 'format'=>$format, - 'formatIndex'=>$formatIndex, - 'fontIndex'=>$fontIndex, - 'formatColor'=>$formatColor, - 'xfIndex'=>$xfindex - ); - } - function createNumber($spos) { - $rknumhigh = $this->_GetInt4d($this->data, $spos + 10); - $rknumlow = $this->_GetInt4d($this->data, $spos + 6); - $sign = ($rknumhigh & 0x80000000) >> 31; - $exp = ($rknumhigh & 0x7ff00000) >> 20; - $mantissa = (0x100000 | ($rknumhigh & 0x000fffff)); - $mantissalow1 = ($rknumlow & 0x80000000) >> 31; - $mantissalow2 = ($rknumlow & 0x7fffffff); - $value = $mantissa / pow( 2 , (20- ($exp - 1023))); - if ($mantissalow1 != 0) $value += 1 / pow (2 , (21 - ($exp - 1023))); - $value += $mantissalow2 / pow (2 , (52 - ($exp - 1023))); - if ($sign) {$value = -1 * $value;} - return $value; - } - function addcell($row, $col, $string, $info=null) { - $this->sheets[$this->sn]['maxrow'] = max($this->sheets[$this->sn]['maxrow'], $row + $this->_rowoffset); - $this->sheets[$this->sn]['maxcol'] = max($this->sheets[$this->sn]['maxcol'], $col + $this->_coloffset); - $this->sheets[$this->sn]['cells'][$row + $this->_rowoffset][$col + $this->_coloffset] = $string; - if ($this->store_extended_info && $info) { - foreach ($info as $key=>$val) { - $this->sheets[$this->sn]['cellsInfo'][$row + $this->_rowoffset][$col + $this->_coloffset][$key] = $val; - } - } - } - function _GetIEEE754($rknum) { - if (($rknum & 0x02) != 0) { - $value = $rknum >> 2; - } else { - - - // http://research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html - - - - $sign = ($rknum & 0x80000000) >> 31; - $exp = ($rknum & 0x7ff00000) >> 20; - $mantissa = (0x100000 | ($rknum & 0x000ffffc)); - $value = $mantissa / pow( 2 , (20- ($exp - 1023))); - if ($sign) { - $value = -1 * $value; - } - - } - if (($rknum & 0x01) != 0) { - $value /= 100; - } - return $value; - } - function _encodeUTF16($string) { - $result = $string; - if ($this->_defaultEncoding){ - switch ($this->_encoderFunction){ - case 'iconv' : $result = iconv('UTF-16LE', $this->_defaultEncoding, $string); - break; - case 'mb_convert_encoding' : $result = mb_convert_encoding($string, $this->_defaultEncoding, 'UTF-16LE' ); - break; - } - } - return $result; - } - function _GetInt4d($data, $pos) { - $value = ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) << 16) | (ord($data[$pos+3]) << 24); - if ($value>=4294967294) { - $value=-2; - } - return $value; - } -} \ No newline at end of file diff --git a/donjo-app/helpers/pict_helper.php b/donjo-app/helpers/pict_helper.php deleted file mode 100644 index 304a01ac8..000000000 --- a/donjo-app/helpers/pict_helper.php +++ /dev/null @@ -1,478 +0,0 @@ - $src_height){ - $dst_width = 440; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 300; - - $im = imagecreatetruecolor(440,$dst_height ); - imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 440; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 440; - - $im = imagecreatetruecolor($dst_width,440); - imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload ."kecil_".$fupload_name); - -$src_width = imageSX($im_src); -$src_height = imageSY($im_src); -if($src_width > $src_height){ - $dst_width = 1366; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 600; - - $im = imagecreatetruecolor(1366,$dst_height); - imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 1366; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 1366; - - $im = imagecreatetruecolor($dst_width,1366); - imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload ."sedang_".$fupload_name); - -imagedestroy($im_src); -imagedestroy($im); - -unlink($vfile_upload); -return true; -} -function UploadSimbolx($fupload_name,$old_gambar){ -$vdir_upload = "assets/gis/simbol"; -if($old_gambar!=""){ - unlink($vdir_upload."kecil_".$old_gambar); - unlink($vdir_upload.$old_gambar); -} -$vfile_upload = $vdir_upload . $fupload_name; -move_uploaded_file($_FILES["gambar"]["tmp_name"], $vfile_upload); - -$im_src = imagecreatefromjpeg($vfile_upload); -$src_width = imageSX($im_src); -$src_height = imageSY($im_src); -if(($src_width * 20) < ($src_height * 44)){ - $dst_width = 440; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 300; - - $im = imagecreatetruecolor(440,300); - imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 300; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 440; - - $im = imagecreatetruecolor(440,300); - imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload ."kecil_".$fupload_name); - -imagedestroy($im_src); -imagedestroy($im); - - -return true; -} -function UploadArtikel($fupload_name,$gambar,$fp){ -$vdir_upload = "assets/files/artikel/"; - - -$vfile_upload = $vdir_upload . $fupload_name; -move_uploaded_file($_FILES["$gambar"]["tmp_name"], $vfile_upload); - -$im_src = imagecreatefromjpeg($vfile_upload); -$src_width = imageSX($im_src); -$src_height = imageSY($im_src); -if($src_width > $src_height){ - $dst_width = 440; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 300; - - $im = imagecreatetruecolor(440,$dst_height); - imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 440; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 440; - - $im = imagecreatetruecolor($dst_width,440); - imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload ."kecil_".$fp.$fupload_name); - -imagedestroy($im_src); -imagedestroy($im); - - -$im_src = imagecreatefromjpeg($vfile_upload); -$src_width = imageSX($im_src); -$src_height = imageSY($im_src); -if($src_width > $src_height){ - $dst_width = 1366; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 600; - - $im = imagecreatetruecolor(1366,$dst_height); - imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 1366; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 1366; - - $im = imagecreatetruecolor($dst_width,1366); - imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload ."sedang_".$fp.$fupload_name); - -imagedestroy($im_src); -imagedestroy($im); - - -unlink($vfile_upload); -return true; -} -function HapusArtikel($gambar){ -$vdir_upload = "assets/files/artikel/"; -$vfile_upload = $vdir_upload . "sedang_" . $gambar; -unlink($vfile_upload); -$vfile_upload = $vdir_upload . "kecil_" . $gambar; -unlink($vfile_upload); -return true; -} -function UploadLokasi($fupload_name){ -$vdir_upload = "assets/files/gis/lokasi/"; -$vfile_upload = $vdir_upload . $fupload_name; -move_uploaded_file($_FILES["foto"]["tmp_name"], $vfile_upload); - -$im_src = imagecreatefromjpeg($vfile_upload); -$src_width = imageSX($im_src); -$src_height = imageSY($im_src); -if(($src_width / $src_height) < (12 / 10)){ - $dst_width = 120; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 100; - - $im = imagecreatetruecolor(120,100); - imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 100; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 120; - - $im = imagecreatetruecolor(120,100); - imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload ."kecil_".$fupload_name); - -imagedestroy($im_src); -imagedestroy($im); - - -$im_src = imagecreatefromjpeg($vfile_upload); -$src_width = imageSX($im_src); -$src_height = imageSY($im_src); -if(($src_width / $src_height) < (44 / 30)){ - $dst_width = 1366; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 600; - - $im = imagecreatetruecolor(1366,600); - imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 600; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 1366; - - $im = imagecreatetruecolor(1366,600); - imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload ."sedang_".$fupload_name); - -imagedestroy($im_src); -imagedestroy($im); -unlink($vdir_upload.$fupload_name); - - -return true; -} -function UploadGaris($fupload_name){ -$vdir_upload = "assets/files/gis/garis/"; -$vfile_upload = $vdir_upload . $fupload_name; -move_uploaded_file($_FILES["foto"]["tmp_name"], $vfile_upload); - -$im_src = imagecreatefromjpeg($vfile_upload); -$src_width = imageSX($im_src); -$src_height = imageSY($im_src); -if(($src_width / $src_height) < (12 / 10)){ - $dst_width = 120; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 100; - - $im = imagecreatetruecolor(120,100); - imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 100; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 120; - - $im = imagecreatetruecolor(120,100); - imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload ."kecil_".$fupload_name); - -imagedestroy($im_src); -imagedestroy($im); - - -$im_src = imagecreatefromjpeg($vfile_upload); -$src_width = imageSX($im_src); -$src_height = imageSY($im_src); -if(($src_width / $src_height) < (44 / 30)){ - $dst_width = 1366; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 600; - - $im = imagecreatetruecolor(1366,600); - imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 600; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 1366; - - $im = imagecreatetruecolor(1366,600); - imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload ."sedang_".$fupload_name); - -imagedestroy($im_src); -imagedestroy($im); -unlink($vdir_upload.$fupload_name); - - -return true; -} -function UploadArea($fupload_name){ -$vdir_upload = "assets/files/gis/area/"; -$vfile_upload = $vdir_upload . $fupload_name; -move_uploaded_file($_FILES["foto"]["tmp_name"], $vfile_upload); - -$im_src = imagecreatefromjpeg($vfile_upload); -$src_width = imageSX($im_src); -$src_height = imageSY($im_src); -if(($src_width / $src_height) < (12 / 10)){ - $dst_width = 120; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 100; - - $im = imagecreatetruecolor(120,100); - imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 100; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 120; - - $im = imagecreatetruecolor(120,100); - imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload ."kecil_".$fupload_name); - -imagedestroy($im_src); -imagedestroy($im); - - -$im_src = imagecreatefromjpeg($vfile_upload); -$src_width = imageSX($im_src); -$src_height = imageSY($im_src); -if(($src_width / $src_height) < (44 / 30)){ - $dst_width = 1366; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 600; - - $im = imagecreatetruecolor(1366,600); - imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 600; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 1366; - - $im = imagecreatetruecolor(1366,600); - imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload ."sedang_".$fupload_name); - -imagedestroy($im_src); -imagedestroy($im); -unlink($vdir_upload.$fupload_name); - - -return true; -} -function UploadLogo($fupload_name,$old_foto,$tipe_file){ -$vdir_upload = "assets/files/logo/"; -unlink($vdir_upload.$old_foto); -$vfile_upload = $vdir_upload . $fupload_name; -if($tipe_file == "image/jpeg" OR $tipe_file == "image/pjpeg"){ - -move_uploaded_file($_FILES["logo"]["tmp_name"], $vfile_upload); -$im_src = imagecreatefromjpeg($vfile_upload); -$src_width = imageSX($im_src); -$src_height = imageSY($im_src); -if($src_width < $src_height){ - $dst_width = 100; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 100; - - $im = imagecreatetruecolor(100,100); - imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 100; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 100; - - $im = imagecreatetruecolor(100,100); - imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload .$fupload_name); - -imagedestroy($im_src); -imagedestroy($im); - -return true; -}else{ - move_uploaded_file($_FILES["logo"]["tmp_name"], $vfile_upload); -} -} -function UploadLogox($fupload_name){ -$vdir_upload = "assets/images/background/"; -$vfile_upload = $vdir_upload . $fupload_name; -move_uploaded_file($_FILES["logo"]["tmp_name"], $vfile_upload); -} -function UploadSimbol($fupload_name){ -$vdir_upload = "assets/images/gis/point/"; -$vfile_upload = $vdir_upload . $fupload_name; -move_uploaded_file($_FILES["simbol"]["tmp_name"], $vfile_upload); -} -function UploadDocument($fupload_name){ -$vdir_upload = "assets/files/dokumen/"; -$vfile_upload = $vdir_upload . $fupload_name; -move_uploaded_file($_FILES["satuan"]["tmp_name"], $vfile_upload); -return true; -} -function UploadDocument2($fupload_name){ -$vdir_upload = "assets/files/dokumen/"; - -$vfile_upload = $vdir_upload . $fupload_name; -move_uploaded_file($_FILES["dokumen"]["tmp_name"], $vfile_upload); -return true; -} -function UploadPengesahan($fupload_name){ -$vdir_upload = "assets/files/pengesahan/"; -$vfile_upload = $vdir_upload . $fupload_name; -move_uploaded_file($_FILES["pengesahan"]["tmp_name"], $vfile_upload); - -$im_src = imagecreatefromjpeg($vfile_upload); -$src_width = imageSX($im_src); -$src_height = imageSY($im_src); -if(($src_width / $src_height) < (12 / 10)){ - $dst_width = 120; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 100; - - $im = imagecreatetruecolor(120,100); - imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 100; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 120; - - $im = imagecreatetruecolor(120,100); - imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload ."kecil_".$fupload_name); - -imagedestroy($im_src); -imagedestroy($im); - - -$im_src = imagecreatefromjpeg($vfile_upload); -$src_width = imageSX($im_src); -$src_height = imageSY($im_src); -if($src_width > $src_height){ - $dst_width = 1366; - $dst_height = ($dst_width/$src_width)*$src_height; - $cut_height = $dst_height - 800; - - $im = imagecreatetruecolor(1366,$dst_height); - imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); - -}else{ - $dst_height = 1366; - $dst_width = ($dst_height/$src_height)*$src_width; - $cut_width = $dst_width - 1366; - - $im = imagecreatetruecolor($dst_width,1366); - imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); -} -imagejpeg($im,$vdir_upload.$fupload_name); - -imagedestroy($im_src); -imagedestroy($im); - -return true; - -} \ No newline at end of file diff --git a/donjo-app/index.html b/donjo-app/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-app/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-app/language/english/index.html b/donjo-app/language/english/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-app/language/english/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-app/language/index.html b/donjo-app/language/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-app/language/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-app/libraries/Paging.php b/donjo-app/libraries/Paging.php deleted file mode 100644 index 6fbb35fc9..000000000 --- a/donjo-app/libraries/Paging.php +++ /dev/null @@ -1,60 +0,0 @@ - 0) - $this->init($props); - } - function init($input=array()){ - - if(isset($input['page'])) $this->page = $input['page']; - if(isset($input['per_page'])) $this->per_page = $input['per_page']; - if(isset($input['num_rows'])) $this->num_rows = $input['num_rows']; - - - if((int)$this->page<1) $this->page=1; - if((int)$this->per_page<1) $this->per_page=50; - if((int)$this->num_rows<1) $my_num_rows=1; - else $my_num_rows = (int)$this->num_rows; - - $o=($my_num_rows-1)/$this->per_page; - $this->num_page=(int)$o+1; - - $o=($this->page-1)*$this->per_page; - $this->offset=(int)$o; - - $this->prev=$this->page-1; - $this->next=$this->page+1; - if($this->next>$this->num_page) $this->next=0; - - - if($this->page < 20){ - $start=1; - if($this->num_page > 30) - $end=20; - else $end=$this->num_page; - } - else if($this->page > $this->num_page-20){ - $start=$this->num_page-20; - $end=$this->num_page; - } - else{ - $start=$this->page-9; - $end=$this->page+10; - } - $this->start=1; - $this->end=$this->num_page; - $this->start_link=$start; - $this->end_link=$end; - } -} \ No newline at end of file diff --git a/donjo-app/logs/index.html b/donjo-app/logs/index.html deleted file mode 100644 index c942a79ce..000000000 --- a/donjo-app/logs/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - \ No newline at end of file diff --git a/donjo-app/models/analisis_grafik_model.php b/donjo-app/models/analisis_grafik_model.php deleted file mode 100644 index 38c41f3bc..000000000 --- a/donjo-app/models/analisis_grafik_model.php +++ /dev/null @@ -1,232 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.pertanyaan LIKE '$kw' OR u.pertanyaan LIKE '$kw')"; - return $search_sql; - } - } - function master_sql(){ - if(isset($_SESSION['analisis_master'])){ - $kf = $_SESSION['analisis_master']; - $filter_sql= " AND u.id_master = $kf"; - return $filter_sql; - } - } - function dusun_sql(){ - if(isset($_SESSION['dusun'])){ - $kf = $_SESSION['dusun']; - $dusun_sql= " AND c.dusun = '$kf'"; - return $dusun_sql; - } - } - function rw_sql(){ - if(isset($_SESSION['rw'])){ - $kf = $_SESSION['rw']; - $rw_sql= " AND c.rw = '$kf'"; - return $rw_sql; - } - } - function rt_sql(){ - if(isset($_SESSION['rt'])){ - $kf = $_SESSION['rt']; - $rt_sql= " AND c.rt = '$kf'"; - return $rt_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM analisis_klasifikasi u WHERE 1"; - $sql .= $this->search_sql(); - $sql .= $this->master_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - $per = $this->get_aktif_periode(); - $pembagi = $this->get_analisis_master(); - $pembagi = $pembagi['pembagi']+0; - - switch($o){ - case 1: $order_sql = ' ORDER BY u.minval'; break; - case 2: $order_sql = ' ORDER BY u.minval DESC'; break; - case 3: $order_sql = ' ORDER BY u.minval'; break; - case 4: $order_sql = ' ORDER BY u.minval DESC'; break; - case 5: $order_sql = ' ORDER BY g.minval'; break; - case 6: $order_sql = ' ORDER BY g.minval DESC'; break; - default:$order_sql = ' ORDER BY u.minval'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT u.*,(SELECT COUNT(id) FROM analisis_respon_hasil WHERE akumulasi/$pembagi >= u.minval AND akumulasi/$pembagi < u.maxval AND id_periode=?) as jumlah FROM analisis_klasifikasi u WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->master_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql,$per); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($iget_aktif_periode(); - $pembagi = $this->get_analisis_master(); - $pembagi = $pembagi['pembagi']+0; - - switch($o){ - case 1: $order_sql = ' ORDER BY u.minval'; break; - case 2: $order_sql = ' ORDER BY u.minval DESC'; break; - case 3: $order_sql = ' ORDER BY u.minval'; break; - case 4: $order_sql = ' ORDER BY u.minval DESC'; break; - case 5: $order_sql = ' ORDER BY g.minval'; break; - case 6: $order_sql = ' ORDER BY g.minval DESC'; break; - default:$order_sql = ' ORDER BY u.minval'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT u.* FROM analisis_klasifikasi u WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->master_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($idb->query($sql,array($data[$i]['minval'],$data[$i]['maxval'])); - $data[$i]['jumlah'] = $query->result_array(); - - $i++; - $j++; - } - return $data; - } - function insert(){ - $data = $_POST; - $data['id_master']=$_SESSION['analisis_master']; - $outp = $this->db->insert('analisis_klasifikasi',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $data['id_master']=$_SESSION['analisis_master']; - $this->db->where('id',$id); - $outp = $this->db->update('analisis_klasifikasi',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM analisis_klasifikasi WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM analisis_klasifikasi WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function get_analisis_klasifikasi($id=0){ - $sql = "SELECT * FROM analisis_klasifikasi WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_analisis_master(){ - $sql = "SELECT * FROM analisis_master WHERE id=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - return $query->row_array(); - } - function get_subjek($id=0){ - $sql = "SELECT u.*,p.nama FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id WHERE u.id=?"; - $query = $this->db->query($sql,$id); - return $query->row_array(); - } - function get_aktif_periode(){ - $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $data = $query->row_array(); - - return $data['id']; - } - - function get_periode(){ - $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $data = $query->row_array(); - return $data['nama']; - } - function list_periode(){ - $sql = "SELECT * FROM analisis_periode WHERE id_master=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $data = $query->result_array(); - return $data; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/analisis_import_model.php b/donjo-app/models/analisis_import_model.php deleted file mode 100644 index 306dcdf38..000000000 --- a/donjo-app/models/analisis_import_model.php +++ /dev/null @@ -1,103 +0,0 @@ -load->helper('excel'); - } - function import_excel(){ - - $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']); - $sheet=0; - - $master['nama'] = $data->val(1,2,$sheet); - $master['subjek_tipe'] = $data->val(2,2,$sheet); - $master['lock'] = $data->val(3,2,$sheet); - $master['pembagi'] = $data->val(4,2,$sheet); - $master['deskripsi'] = $data->val(5,2,$sheet); - - $outp = $this->db->insert('analisis_master',$master); - $id_master = $this->db->insert_id(); - - $periode['id_master'] = $id_master; - $periode['nama'] = $data->val(6,2,$sheet); - $periode['tahun_pelaksanaan'] = $data->val(7,2,$sheet); - $periode['keterangan'] = $data->val(5,2,$sheet); - $periode['aktif'] = 1; - $this->db->insert('analisis_periode',$periode); - - $sheet=1; - $baris = $data->rowcount($sheet_index=$sheet); - $kolom = $data->colcount($sheet_index=$sheet); - - for ($i=2; $i<=$baris; $i++){ - - $sql = "SELECT * FROM analisis_kategori_indikator WHERE kategori=? AND id_master=?"; - $query = $this->db->query($sql,array($data->val($i,3,$sheet),$id_master)); - $cek = $query->row_array(); - - if(!$cek){ - $kategori['id_master'] = $id_master; - $kategori['kategori'] = $data->val($i,3,$sheet); - $this->db->insert('analisis_kategori_indikator',$kategori); - } - } - - for ($i=2; $i<=$baris; $i++){ - - $indikator['id_master'] = $id_master; - $indikator['nomor'] = $data->val($i,1,$sheet); - $indikator['pertanyaan'] = $data->val($i,2,$sheet); - - $sql = "SELECT * FROM analisis_kategori_indikator WHERE kategori=? AND id_master=?"; - $query = $this->db->query($sql,array($data->val($i,3,$sheet),$id_master)); - $kategori = $query->row_array(); - - $indikator['id_kategori'] = $kategori['id']; - $indikator['id_tipe'] = $data->val($i,4,$sheet); - $indikator['bobot'] = $data->val($i,5,$sheet); - $indikator['act_analisis'] = $data->val($i,6,$sheet); - - $this->db->insert('analisis_indikator',$indikator); - } - - $sheet=2; - $baris = $data->rowcount($sheet_index=$sheet); - $kolom = $data->colcount($sheet_index=$sheet); - - for ($i=2; $i<=$baris; $i++){ - $kode = explode(".",$data->val($i,3,$sheet)); - - $parameter['kode_jawaban'] = $data->val($i,2,$sheet); - $parameter['jawaban'] = $data->val($i,3,$sheet); - - $sql = "SELECT id FROM analisis_indikator WHERE nomor=? AND id_master=?"; - $query = $this->db->query($sql,array($data->val($i,1,$sheet),$id_master)); - $indikator = $query->row_array(); - - $parameter['id_indikator'] = $indikator['id']; - $parameter['nilai'] = $data->val($i,4,$sheet); - $parameter['asign'] = 1; - - $this->db->insert('analisis_parameter',$parameter); - } - - - $sheet=3; - $baris = $data->rowcount($sheet_index=$sheet); - $kolom = $data->colcount($sheet_index=$sheet); - - - for ($i=2; $i<=$baris; $i++){ - - $klasifikasi['id_master'] = $id_master; - $klasifikasi['nama'] = $data->val($i,1,$sheet); - $klasifikasi['minval'] = $data->val($i,2,$sheet); - $klasifikasi['maxval'] = $data->val($i,3,$sheet); - - $this->db->insert('analisis_klasifikasi',$klasifikasi); - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } -} \ No newline at end of file diff --git a/donjo-app/models/analisis_indikator_model.php b/donjo-app/models/analisis_indikator_model.php deleted file mode 100644 index 753c2a261..000000000 --- a/donjo-app/models/analisis_indikator_model.php +++ /dev/null @@ -1,252 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.pertanyaan LIKE '$kw' OR u.pertanyaan LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND u.act_analisis = $kf"; - return $filter_sql; - } - } - function master_sql(){ - if(isset($_SESSION['analisis_master'])){ - $kf = $_SESSION['analisis_master']; - $filter_sql= " AND u.id_master = $kf"; - return $filter_sql; - } - } - function tipe_sql(){ - if(isset($_SESSION['tipe'])){ - $kf = $_SESSION['tipe']; - $filter_sql= " AND u.id_tipe = $kf"; - return $filter_sql; - } - } - function kategori_sql(){ - if(isset($_SESSION['kategori'])){ - $kf = $_SESSION['kategori']; - $filter_sql= " AND u.id_kategori = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM analisis_indikator u WHERE 1"; - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->master_sql(); - $sql .= $this->tipe_sql(); - $sql .= $this->kategori_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.nomor'; break; - case 2: $order_sql = ' ORDER BY u.nomor DESC'; break; - case 3: $order_sql = ' ORDER BY u.pertanyaan'; break; - case 4: $order_sql = ' ORDER BY u.pertanyaan DESC'; break; - case 5: $order_sql = ' ORDER BY u.id_kategori'; break; - case 6: $order_sql = ' ORDER BY u.id_kategori DESC'; break; - default:$order_sql = ' ORDER BY u.nomor'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT u.*,t.tipe AS tipe_indikator,k.kategori AS kategori FROM analisis_indikator u LEFT JOIN analisis_tipe_indikator t ON u.id_tipe = t.id LEFT JOIN analisis_kategori_indikator k ON u.id_kategori = k.id WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->master_sql(); - $sql .= $this->tipe_sql(); - $sql .= $this->kategori_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($idb->insert('analisis_indikator',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - if($data['id_tipe']!=1){ - $data['act_analisis']=2; - $data['bobot']=0; - } - - if($data['id_tipe']==3 OR $data['id_tipe']==4){ - $sql = "DELETE FROM analisis_parameter WHERE id_indikator=?"; - $this->db->query($sql,$id); - - } - - $data['id_master']=$_SESSION['analisis_master']; - $this->db->where('id',$id); - $outp = $this->db->update('analisis_indikator',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM analisis_indikator WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM analisis_indikator WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function p_insert($in=''){ - $data = $_POST; - $data['id_indikator']=$in; - $outp = $this->db->insert('analisis_parameter',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function p_update($id=0){ - $data = $_POST; - $this->db->where('id',$id); - $outp = $this->db->update('analisis_parameter',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function p_delete($id=''){ - $sql = "DELETE FROM analisis_parameter WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function p_delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM analisis_parameter WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_indikator($id=0){ - $sql = "SELECT * FROM analisis_parameter WHERE id_indikator = ?"; - $query = $this->db->query($sql,$id); - $data= $query->result_array(); - - - $i=0; - while($idb->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_analisis_master(){ - $sql = "SELECT * FROM analisis_master WHERE id=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - return $query->row_array(); - } - function get_analisis_parameter($id=''){ - $sql = "SELECT * FROM analisis_parameter WHERE id=?"; - $query = $this->db->query($sql,$id); - return $query->row_array(); - } - function list_tipe(){ - $sql = "SELECT * FROM analisis_tipe_indikator"; - $query = $this->db->query($sql); - return $query->result_array(); - } - function list_kategori(){ - $sql = "SELECT u.* FROM analisis_kategori_indikator u WHERE 1"; - $sql .= $this->master_sql(); - $query = $this->db->query($sql); - return $query->result_array(); - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/analisis_kategori_model.php b/donjo-app/models/analisis_kategori_model.php deleted file mode 100644 index 4c4325cd5..000000000 --- a/donjo-app/models/analisis_kategori_model.php +++ /dev/null @@ -1,137 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.pertanyaan LIKE '$kw' OR u.pertanyaan LIKE '$kw')"; - return $search_sql; - } - } - function master_sql(){ - if(isset($_SESSION['analisis_master'])){ - $kf = $_SESSION['analisis_master']; - $filter_sql= " AND u.id_master = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM analisis_kategori_indikator u WHERE 1"; - $sql .= $this->search_sql(); - $sql .= $this->master_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.id'; break; - case 2: $order_sql = ' ORDER BY u.id DESC'; break; - case 3: $order_sql = ' ORDER BY u.id'; break; - case 4: $order_sql = ' ORDER BY u.id DESC'; break; - case 5: $order_sql = ' ORDER BY g.id'; break; - case 6: $order_sql = ' ORDER BY g.id DESC'; break; - default:$order_sql = ' ORDER BY u.id'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT u.* FROM analisis_kategori_indikator u WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->master_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($idb->insert('analisis_kategori_indikator',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $data['id_master']=$_SESSION['analisis_master']; - $this->db->where('id',$id); - $outp = $this->db->update('analisis_kategori_indikator',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM analisis_kategori_indikator WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM analisis_kategori_indikator WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function get_analisis_kategori($id=0){ - $sql = "SELECT * FROM analisis_kategori_indikator WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_analisis_master(){ - $sql = "SELECT * FROM analisis_master WHERE id=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - return $query->row_array(); - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/analisis_klasifikasi_model.php b/donjo-app/models/analisis_klasifikasi_model.php deleted file mode 100644 index 35103bf65..000000000 --- a/donjo-app/models/analisis_klasifikasi_model.php +++ /dev/null @@ -1,137 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.pertanyaan LIKE '$kw' OR u.pertanyaan LIKE '$kw')"; - return $search_sql; - } - } - function master_sql(){ - if(isset($_SESSION['analisis_master'])){ - $kf = $_SESSION['analisis_master']; - $filter_sql= " AND u.id_master = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM analisis_klasifikasi u WHERE 1"; - $sql .= $this->search_sql(); - $sql .= $this->master_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.minval'; break; - case 2: $order_sql = ' ORDER BY u.minval DESC'; break; - case 3: $order_sql = ' ORDER BY u.minval'; break; - case 4: $order_sql = ' ORDER BY u.minval DESC'; break; - case 5: $order_sql = ' ORDER BY g.minval'; break; - case 6: $order_sql = ' ORDER BY g.minval DESC'; break; - default:$order_sql = ' ORDER BY u.minval'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT u.* FROM analisis_klasifikasi u WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->master_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($idb->insert('analisis_klasifikasi',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $data['id_master']=$_SESSION['analisis_master']; - $this->db->where('id',$id); - $outp = $this->db->update('analisis_klasifikasi',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM analisis_klasifikasi WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM analisis_klasifikasi WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function get_analisis_klasifikasi($id=0){ - $sql = "SELECT * FROM analisis_klasifikasi WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_analisis_master(){ - $sql = "SELECT * FROM analisis_master WHERE id=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - return $query->row_array(); - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/analisis_laporan_model.php b/donjo-app/models/analisis_laporan_model.php deleted file mode 100644 index b5fd03037..000000000 --- a/donjo-app/models/analisis_laporan_model.php +++ /dev/null @@ -1,374 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$cari. '%'; - - $subjek = $_SESSION['subjek_tipe']; - switch($subjek){ - case 1: $search_sql= " AND (u.nik LIKE '$kw' OR u.nama LIKE '$kw')"; break; - case 2: $search_sql= " AND (u.no_kk LIKE '$kw' OR p.nama LIKE '$kw')"; break; - case 3: $search_sql= " AND ((u.no_kk LIKE '$kw' OR p.nama LIKE '$kw') OR ((SELECT COUNT(id) FROM tweb_penduduk WHERE nik LIKE '$kw' AND id_rtm = u.id) > 1) OR ((SELECT COUNT(id) FROM tweb_penduduk WHERE nama LIKE '$kw' AND id_rtm = u.id) > 1))"; break; - case 4: $search_sql= " AND (u.nama LIKE '$kw' OR p.nama LIKE '$kw')"; break; - default: return null; - } - return $search_sql; - } - } - function master_sql(){ - if(isset($_SESSION['analisis_master'])){ - $kf = $_SESSION['analisis_master']; - $filter_sql= " AND u.id_master = $kf"; - return $filter_sql; - } - } - - function dusun_sql(){ - if(isset($_SESSION['dusun'])){ - $kf = $_SESSION['dusun']; - $dusun_sql= " AND c.dusun = '$kf'"; - return $dusun_sql; - } - } - function rw_sql(){ - if(isset($_SESSION['rw'])){ - $kf = $_SESSION['rw']; - $rw_sql= " AND c.rw = '$kf'"; - return $rw_sql; - } - } - function rt_sql(){ - if(isset($_SESSION['rt'])){ - $kf = $_SESSION['rt']; - $rt_sql= " AND c.rt = '$kf'"; - return $rt_sql; - } - } - function klasifikasi_sql(){ - if(isset($_SESSION['klasifikasi'])){ - $kf = $_SESSION['klasifikasi']; - $klasifikasi_sql= " AND k.id = '$kf' "; - return $klasifikasi_sql; - } - } - function jawab_sql(){ - if(isset($_SESSION['jawab'])){ - $per = $this->get_aktif_periode(); - $kf = $_SESSION['jawab']; - $jmkf = $_SESSION['jmkf']; - $jawab_sql= "AND x.id_parameter IN ($kf) AND ((SELECT COUNT(id_parameter) FROM analisis_respon WHERE id_subjek = u.id AND id_periode = $per AND id_parameter IN ($kf)) = $jmkf) "; - return $jawab_sql; - } - } - function paging($p=1,$o=0){ - $subjek = $_SESSION['subjek_tipe']; - $master = $this->get_analisis_master(); - $id_kelompok = $master['id_kelompok']; - - $per = $this->get_aktif_periode(); - $pembagi = $this->get_analisis_master(); - $pembagi = $pembagi['pembagi']+0; - - switch($subjek){ - case 1: $sql = "SELECT COUNT(DISTINCT u.id) AS id FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id"; break; - case 2: $sql = "SELECT COUNT(DISTINCT u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id"; break; - case 3: $sql = "SELECT COUNT(DISTINCT u.id) AS id FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id"; break; - case 4: $sql = "SELECT COUNT(DISTINCT u.id) AS id FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id"; break; - - default: return null; - - } - - if(isset($_SESSION['jawab'])){ - - $sql .= " LEFT JOIN analisis_respon x ON u.id = x.id_subjek"; - $sql .= " LEFT JOIN analisis_respon_hasil h ON u.id = h.id_subjek LEFT JOIN analisis_klasifikasi k ON h.akumulasi/$pembagi >= k.minval AND h.akumulasi/$pembagi <= k.maxval WHERE h.id_periode = ? AND x.id_periode = ? AND k.id_master = ? "; - $sql .= $this->search_sql(); - $sql .= $this->klasifikasi_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $this->jawab_sql(); - $query = $this->db->query($sql,array($per,$per,$_SESSION['analisis_master'])); - }else{ - $sql .= " LEFT JOIN analisis_respon_hasil h ON u.id = h.id_subjek LEFT JOIN analisis_klasifikasi k ON h.akumulasi/$pembagi >= k.minval AND h.akumulasi/$pembagi <= k.maxval WHERE h.id_periode = ? AND k.id_master =?"; - $sql .= $this->search_sql(); - $sql .= $this->klasifikasi_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $this->jawab_sql(); - $query = $this->db->query($sql,array($per,$_SESSION['analisis_master'])); - } - - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - $per = $this->get_aktif_periode(); - $pembagi = $this->get_analisis_master(); - $pembagi = $pembagi['pembagi']+0; - - switch($o){ - case 1: $order_sql = ' ORDER BY u.id'; break; - case 2: $order_sql = ' ORDER BY u.id DESC'; break; - case 3: $order_sql = ' ORDER BY u.id'; break; - case 4: $order_sql = ' ORDER BY u.id DESC'; break; - case 5: $order_sql = ' ORDER BY cek'; break; - case 6: $order_sql = ' ORDER BY cek DESC'; break; - default:$order_sql = ''; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $subjek = $_SESSION['subjek_tipe']; - switch($subjek){ - case 1: $sql = "SELECT u.id,u.nik AS uid,u.nama,c.dusun,c.rw,c.rt,u.sex,h.akumulasi/$pembagi AS cek,k.nama AS klasifikasi FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id "; break; - - case 2: $sql = "SELECT u.id,u.no_kk AS uid,p.nama,c.dusun,c.rw,c.rt,p.sex,h.akumulasi/$pembagi AS cek,k.nama AS klasifikasi FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id " ; break; - - case 3: $sql = "SELECT u.id,u.no_kk AS uid,p.nama,c.dusun,c.rw,c.rt,p.sex,h.akumulasi/$pembagi AS cek,k.nama AS klasifikasi FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id "; break; - - case 4: $sql = "SELECT u.id,u.kode AS nid,u.nama,p.sex,c.dusun,c.rw,c.rt,h.akumulasi/$pembagi AS cek,k.nama AS klasifikasi FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id "; break; - - default: return null; - - } - - if(isset($_SESSION['jawab'])){ - $sql .= "LEFT JOIN analisis_respon x ON u.id = x.id_subjek "; - $sql .= "LEFT JOIN analisis_respon_hasil h ON u.id = h.id_subjek LEFT JOIN analisis_klasifikasi k ON h.akumulasi/$pembagi > k.minval AND h.akumulasi/$pembagi <= k.maxval "; - $sql .= "WHERE h.id_periode = ? AND x.id_periode = ? AND k.id_master = ? "; - $sql .= $this->search_sql(); - $sql .= $this->klasifikasi_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $this->jawab_sql(); - $sql .= " GROUP BY u.id "; - $sql .= $order_sql; - $sql .= $paging_sql; - $query = $this->db->query($sql,array($per,$per,$_SESSION['analisis_master'])); - }else{ - $sql .= "LEFT JOIN analisis_respon_hasil h ON u.id = h.id_subjek LEFT JOIN analisis_klasifikasi k ON h.akumulasi/$pembagi > k.minval AND h.akumulasi/$pembagi <= k.maxval "; - $sql .= "WHERE h.id_periode = ? AND k.id_master = ?"; - $sql .= $this->search_sql(); - $sql .= $this->klasifikasi_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - $query = $this->db->query($sql,array($per,$_SESSION['analisis_master'])); - } - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($i"; - - }else{ - $data[$i]['nilai'] = "-"; - $data[$i]['set'] = ""; - - $data[$i]['klasifikasi'] = '-'; - } - - $data[$i]['jk'] = "-"; - if($data[$i]['sex'] == 1) - $data[$i]['jk'] = "L"; - else - $data[$i]['jk'] = "P"; - - $i++; - $j++; - } - return $data; - } - function list_jawab2($id=0,$in=0){ - $per = $this->get_aktif_periode(); - $sql = "SELECT s.id as id_parameter,s.jawaban as jawaban,s.nilai FROM analisis_respon r LEFT JOIN analisis_parameter s ON r.id_parameter = s.id WHERE r.id_subjek = ? AND r.id_periode = ? AND r.id_indikator=?"; - $query = $this->db->query($sql,array($id,$per,$in)); - $data = $query->row_array(); - - if(empty($data['jawaban'])){ - $data['jawaban'] = "-"; - $data['nilai'] = "0"; - } - return $data; - } - function list_indikator($id=0){ - $jmkf = $this->group_parameter(); - $cb=""; - if(count($jmkf)){ - foreach($jmkf as $jm){ - $cb .= $jm['id_jmkf'].","; - } - } - $cb = $cb."7777777"; - - $sql = "SELECT u.*,(SELECT COUNT(id) FROM analisis_indikator WHERE id = u.id AND id IN($cb)) AS cek FROM analisis_indikator u WHERE 1 "; - $sql .= $this->master_sql(); - $sql .= " ORDER BY u.nomor ASC"; - $query = $this->db->query($sql,$id); - $data = $query->result_array(); - $i=0; - while($ilist_jawab2($id,$data[$i]['id']); - $data[$i]['jawaban'] = $ret['jawaban']; - $data[$i]['nilai'] = $ret['nilai']; - $data[$i]['poin'] = $data[$i]['bobot']*$ret['nilai']; - $i++; - } - return $data; - } - function get_total($id=0){ - $per = $this->get_aktif_periode(); - $sql = "SELECT akumulasi FROM analisis_respon_hasil u WHERE id_subjek = ? AND id_periode = ? "; - $query = $this->db->query($sql,array($id,$per)); - $data = $query->row_array(); - return $data['akumulasi']; - } - function get_analisis_master(){ - $sql = "SELECT * FROM analisis_master WHERE id=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - return $query->row_array(); - } - function get_subjek($id=0){ - - $subjek = $_SESSION['subjek_tipe']; - switch($subjek){ - case 1: $sql = "SELECT u.id,u.nik AS nid,u.nama,u.sex,c.dusun,c.rw,c.rt FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE u.id = ? "; break; - - case 2: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE u.id = ? " ; break; - - case 3: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE u.id = ? "; break; - - case 4: $sql = "SELECT u.id,u.kode AS nid,u.nama,p.sex,c.dusun,c.rw,c.rt FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE u.id = ? "; break; - - default: return null; - - } - $query = $this->db->query($sql,$id); - return $query->row_array(); - } - - function multi_jawab($p=0,$o=0){ - $master = $this->get_analisis_master(); - - if(isset($_SESSION['jawab'])) - $kf = $_SESSION['jawab']; - else - $kf = "7777777"; - - switch($o){ - case 1: $order_sql = ' ORDER BY u.id'; break; - case 2: $order_sql = ' ORDER BY u.id DESC'; break; - case 3: $order_sql = ' ORDER BY u.id'; break; - case 4: $order_sql = ' ORDER BY u.id DESC'; break; - default: - } - $asign_sql = ' AND i.asign = 1'; - $order_sql = ' ORDER BY u.nomor,i.kode_jawaban ASC'; - - $sql = "SELECT u.pertanyaan,u.nomor,i.jawaban,i.id AS id_jawaban,i.kode_jawaban,(SELECT count(id) FROM analisis_parameter WHERE id IN ($kf) AND id = i.id) AS cek FROM analisis_indikator u LEFT JOIN analisis_parameter i ON u.id = i.id_indikator WHERE u.id_master = ? "; - $sql .= $asign_sql; - $sql .= $order_sql; - $query = $this->db->query($sql,$master); - $data = $query->result_array(); - - $i=0; - while($idb->query($sql); - $data = $query->result_array(); - return $data; - }else{ - return null; - } - } - function get_aktif_periode(){ - $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $data = $query->row_array(); - return $data['id']; - } - - function get_periode(){ - $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $data = $query->row_array(); - return $data['nama']; - } - function list_dusun(){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function list_rw($dusun=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND dusun = ? AND rw <> '0'"; - $query = $this->db->query($sql,$dusun); - $data=$query->result_array(); - return $data; - } - - function list_rt($dusun='',$rw=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rw = ? AND dusun = ? AND rt <> '0'"; - $query = $this->db->query($sql,array($rw,$dusun)); - $data=$query->result_array(); - return $data; - } - function list_klasifikasi(){ - $sql = "SELECT * FROM analisis_klasifikasi WHERE id_master=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $data = $query->result_array(); - return $data; - } - -} \ No newline at end of file diff --git a/donjo-app/models/analisis_master_model.php b/donjo-app/models/analisis_master_model.php deleted file mode 100644 index 8f105b882..000000000 --- a/donjo-app/models/analisis_master_model.php +++ /dev/null @@ -1,187 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.nama LIKE '$kw' OR u.nama LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND u.subjek_tipe = $kf"; - return $filter_sql; - } - } - function state_sql(){ - if(isset($_SESSION['state'])){ - $kf = $_SESSION['state']; - $filter_sql= " AND u.lock = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM analisis_master u WHERE 1"; - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->state_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.nama'; break; - case 2: $order_sql = ' ORDER BY u.nama DESC'; break; - case 3: $order_sql = ' ORDER BY u.nama'; break; - case 4: $order_sql = ' ORDER BY u.nama DESC'; break; - case 5: $order_sql = ' ORDER BY g.nama'; break; - case 6: $order_sql = ' ORDER BY g.nama DESC'; break; - default:$order_sql = ' ORDER BY u.id'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT u.*,s.subjek FROM analisis_master u LEFT JOIN analisis_ref_subjek s ON u.subjek_tipe = s.id WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->state_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($i"; - else - $data[$i]['lock'] = ""; - - $i++; - $j++; - } - return $data; - } - function insert(){ - $data = $_POST; - $outp = $this->db->insert('analisis_master',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $this->db->where('id',$id); - $outp = $this->db->update('analisis_master',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - - $this->sub_delete($id); - - $sql = "DELETE FROM analisis_master WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $this->delete($id); - } - $outp = true; - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function sub_delete($id=''){ - - $sql = "DELETE FROM analisis_parameter WHERE id_indikator IN(SELECT id FROM analisis_indikator WHERE id_master = ?)"; - $this->db->query($sql,$id); - - $sql = "DELETE FROM analisis_respon WHERE id_periode IN(SELECT id FROM analisis_periode WHERE id_master=?)"; - $this->db->query($sql,$id); - - - $sql = "DELETE FROM analisis_kategori_indikator WHERE id_master=?"; - $this->db->query($sql,$id); - - $sql = "DELETE FROM analisis_klasifikasi WHERE id_master=?"; - $this->db->query($sql,$id); - - - $sql = "DELETE FROM analisis_respon_hasil WHERE id_master=?"; - $this->db->query($sql,$id); - - $sql = "DELETE FROM analisis_partisipasi WHERE id_master=?"; - $this->db->query($sql,$id); - - $sql = "DELETE FROM analisis_periode WHERE id_master=?"; - $this->db->query($sql,$id); - - $sql = "DELETE FROM analisis_indikator WHERE id_master=?"; - $this->db->query($sql,$id); - } - function get_analisis_master($id=0){ - $sql = "SELECT * FROM analisis_master WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function list_subjek(){ - $sql = "SELECT * FROM analisis_ref_subjek"; - $query = $this->db->query($sql); - return $query->result_array(); - } - function list_kelompok(){ - $sql = "SELECT * FROM kelompok_master"; - $query = $this->db->query($sql); - return $query->result_array(); - } - function list_analisis_child(){ - $sql = "SELECT * FROM analisis_master WHERE subjek_tipe = 1"; - $query = $this->db->query($sql); - return $query->result_array(); - } -} \ No newline at end of file diff --git a/donjo-app/models/analisis_periode_model.php b/donjo-app/models/analisis_periode_model.php deleted file mode 100644 index bf85d6034..000000000 --- a/donjo-app/models/analisis_periode_model.php +++ /dev/null @@ -1,204 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.pertanyaan LIKE '$kw' OR u.pertanyaan LIKE '$kw')"; - return $search_sql; - } - } - function master_sql(){ - if(isset($_SESSION['analisis_master'])){ - $kf = $_SESSION['analisis_master']; - $filter_sql= " AND u.id_master = $kf"; - return $filter_sql; - } - } - function state_sql(){ - if(isset($_SESSION['state'])){ - $kf = $_SESSION['state']; - $filter_sql= " AND u.id_state = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM analisis_periode u WHERE 1"; - $sql .= $this->search_sql(); - $sql .= $this->master_sql(); - $sql .= $this->state_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.id'; break; - case 2: $order_sql = ' ORDER BY u.id DESC'; break; - case 3: $order_sql = ' ORDER BY u.id'; break; - case 4: $order_sql = ' ORDER BY u.id DESC'; break; - case 5: $order_sql = ' ORDER BY g.id'; break; - case 6: $order_sql = ' ORDER BY g.id DESC'; break; - default:$order_sql = ' ORDER BY u.id'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT u.*,s.nama AS status FROM analisis_periode u LEFT JOIN analisis_ref_state s ON u.id_state = s.id WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->master_sql(); - $sql .= $this->state_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($i"; - else - $data[$i]['aktif'] = ""; - - $i++; - $j++; - } - return $data; - } - function insert(){ - $data = $_POST; - $dp = $data['duplikasi']; - unset($data['duplikasi']); - - if($dp == 1){ - $sqld = "SELECT id FROM analisis_periode WHERE id_master=? ORDER BY id DESC LIMIT 1"; - $queryd = $this->db->query($sqld,$_SESSION['analisis_master']); - $dpd = $queryd->row_array(); - $sblm = $dpd['id']; - - } - - - - $akt =array(); - $data['id_master']=$_SESSION['analisis_master']; - if($data['aktif']==1){ - $akt['aktif']=2; - $this->db->where('id_master',$_SESSION['analisis_master']); - $this->db->update('analisis_periode',$akt); - } - $outp = $this->db->insert('analisis_periode',$data); - - if($dp == 1){ - $sqld = "SELECT id FROM analisis_periode WHERE id_master=? ORDER BY id DESC LIMIT 1"; - $queryd = $this->db->query($sqld,$_SESSION['analisis_master']); - $dpd = $queryd->row_array(); - $skrg = $dpd['id']; - - - $sql = "SELECT id_subjek,id_indikator,id_parameter FROM analisis_respon WHERE id_periode = ? "; - $query = $this->db->query($sql,$sblm); - $data = $query->result_array(); - - $i=0; - while($idb->insert_batch('analisis_respon',$data); - $this->load->model('analisis_respon_model'); - $this->analisis_respon_model->pre_update($skrg); - } - - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $akt =array(); - - $data['id_master']=$_SESSION['analisis_master']; - if($data['aktif']==1){ - $akt['aktif']=2; - $this->db->where('id_master',$_SESSION['analisis_master']); - $this->db->update('analisis_periode',$akt); - } - $data['id_master']=$_SESSION['analisis_master']; - $this->db->where('id',$id); - $outp = $this->db->update('analisis_periode',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM analisis_periode WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM analisis_periode WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function get_analisis_periode($id=0){ - $sql = "SELECT * FROM analisis_periode WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_analisis_master(){ - $sql = "SELECT * FROM analisis_master WHERE id=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - return $query->row_array(); - } - function list_state(){ - $sql = "SELECT * FROM analisis_ref_state"; - $query = $this->db->query($sql); - return $query->result_array(); - } -} \ No newline at end of file diff --git a/donjo-app/models/analisis_respon_model.php b/donjo-app/models/analisis_respon_model.php deleted file mode 100644 index 583ac377c..000000000 --- a/donjo-app/models/analisis_respon_model.php +++ /dev/null @@ -1,1266 +0,0 @@ -load->helper('excel'); - } - function autocomplete(){ - //$sql = "SELECT no_kk FROM tweb_keluarga - //UNION SELECT t.nama FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id //WHERE 1 "; - $subjek = $_SESSION['subjek_tipe']; - switch($subjek){ - case 1: $sql = "SELECT nik AS no_kk FROM tweb_penduduk UNION SELECT u.nama FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE status_dasar=1 "; break; - case 2: $sql = "SELECT no_kk FROM tweb_keluarga UNION SELECT p.nama FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; - case 3: $sql = "SELECT no_kk FROM tweb_rtm UNION SELECT p.nama FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; - case 4: $sql = "SELECT u.nama AS no_kk FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; - default: return null; - - } - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $query = $this->db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.no_kk LIKE '$kw' OR p.nama LIKE '$kw')"; - $subjek = $_SESSION['subjek_tipe']; - switch($subjek){ - case 1: $search_sql= " AND (u.nik LIKE '$kw' OR u.nama LIKE '$kw')"; break; - case 2: $search_sql= " AND (u.no_kk LIKE '$kw' OR p.nama LIKE '$kw')"; break; - case 3: $search_sql= " AND ((u.no_kk LIKE '$kw' OR p.nama LIKE '$kw') OR ((SELECT COUNT(id) FROM tweb_penduduk WHERE nik LIKE '$kw' AND id_rtm = u.id) > 1) OR ((SELECT COUNT(id) FROM tweb_penduduk WHERE nama LIKE '$kw' AND id_rtm = u.id) > 1))"; break; - case 4: $search_sql= " AND (u.nama LIKE '$kw' OR p.nama LIKE '$kw')"; break; - default: return null; - } - return $search_sql; - } - } - function dusun_sql(){ - if(isset($_SESSION['dusun'])){ - $kf = $_SESSION['dusun']; - $dusun_sql= " AND c.dusun = '$kf'"; - return $dusun_sql; - } - } - function rw_sql(){ - if(isset($_SESSION['rw'])){ - $kf = $_SESSION['rw']; - $rw_sql= " AND c.rw = '$kf'"; - return $rw_sql; - } - } - function rt_sql(){ - if(isset($_SESSION['rt'])){ - $kf = $_SESSION['rt']; - $rt_sql= " AND c.rt = '$kf'"; - return $rt_sql; - } - } - function isi_sql(){ - if(isset($_SESSION['isi'])){ - $per = $this->get_aktif_periode(); - $kf = $_SESSION['isi']; - if($kf==1) - $isi_sql= " AND (SELECT COUNT(id_subjek) FROM analisis_respon_hasil WHERE id_subjek = u.id AND id_periode=$per ) = 1 "; - else - $isi_sql= " AND (SELECT COUNT(id_subjek) FROM analisis_respon_hasil WHERE id_subjek = u.id AND id_periode=$per ) = 0 "; - - return $isi_sql; - } - } - function kelompok_sql($kf=0){ - $kelompok_sql= " AND id_master = $kf "; - return $kelompok_sql; - } - function paging($p=1,$o=0){ - $master = $this->get_analisis_master(); - $id_kelompok = $master['id_kelompok']; - $subjek = $_SESSION['subjek_tipe']; - switch($subjek){ - case 1: $sql = "SELECT COUNT(u.id) AS id FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE status_dasar=1 "; break; - case 2: $sql = "SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; - case 3: $sql = "SELECT COUNT(u.id) AS id FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; - case 4: $sql = "SELECT COUNT(u.id) AS id FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; - default: return null; - - } - //$sql = "SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; - if($id_kelompok != 0) - $sql .= $this->kelompok_sql($id_kelompok); - - $sql .= $this->search_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $this->isi_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - $per = $this->get_aktif_periode(); - $master = $this->get_analisis_master(); - $id_kelompok = $master['id_kelompok']; - - switch($o){ - case 1: $order_sql = ' ORDER BY u.id'; break; - case 2: $order_sql = ' ORDER BY u.id DESC'; break; - case 3: $order_sql = ' ORDER BY u.id'; break; - case 4: $order_sql = ' ORDER BY u.id DESC'; break; - default:$order_sql = ' ORDER BY u.id'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $subjek = $_SESSION['subjek_tipe']; - switch($subjek){ - case 1: $sql = "SELECT u.id,u.nik AS nid,u.nama,u.sex,c.dusun,c.rw,c.rt,(SELECT id_subjek FROM analisis_respon WHERE id_subjek = u.id AND id_periode=? LIMIT 1) as cek FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE u.status_dasar = 1 "; break; - - case 2: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt,(SELECT id_subjek FROM analisis_respon WHERE id_subjek = u.id AND id_periode=? LIMIT 1) as cek FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1" ; break; - - case 3: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt,(SELECT id_subjek FROM analisis_respon WHERE id_subjek = u.id AND id_periode=? LIMIT 1) as cek FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; - - case 4: $sql = "SELECT u.id,u.kode AS nid,u.nama,p.sex,c.dusun,c.rw,c.rt,(SELECT id_subjek FROM analisis_respon WHERE id_subjek = u.id AND id_periode=? LIMIT 1) as cek FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1 "; break; - - default: return null; - - } - //$sql = "SELECT u.*,p.nama,c.dusun,c.rw,c.rt,(SELECT id FROM analisis_respon WHERE id_subjek = u.id AND id_periode=? LIMIT 1) as cek FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1 "; - if($id_kelompok != 0) - $sql .= $this->kelompok_sql($id_kelompok); - - $sql .= $this->search_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $this->isi_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql,$per); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($iupdate_hasil($data[$i]['id']); - - if($data[$i]['cek']) - $data[$i]['set'] = ""; - else - $data[$i]['set'] = ""; - - $data[$i]['jk'] = "-"; - if($data[$i]['sex'] == 1) - $data[$i]['jk'] = "L"; - else - $data[$i]['jk'] = "P"; - - $data[$i]['alamat'] = $data[$i]['dusun']." RW-".$data[$i]['rw']." RT-".$data[$i]['rt']; - $i++; - $j++; - } - return $data; - } - function update_kuisioner($id=0,$per=0){ - $outp=false; - if($per == 0){ - $per = $this->get_aktif_periode(); - $id_master = $_SESSION['analisis_master']; - }else{ - $sql = "SELECT id_master FROM analisis_periode WHERE id = ?"; - $query = $this->db->query($sql,$per); - $id_master = $query->row_array(); - $id_master = $id_master['id_master']; - } - $ia=0;$it=0;$ir=0;$ic=0; - - - if(isset($_POST['rb'])){ - $id_rbx = $_POST['rb']; - foreach($id_rbx as $id_px){ - if($id_px != ""){ - $ir=1; - } - } - } - if(isset($_POST['cb'])){ - $id_rby = $_POST['cb']; - foreach($id_rby as $id_py){ - if($id_py != ""){ - $ic=1; - } - } - } - if(isset($_POST['ia'])){ - $id_iax = $_POST['ia']; - foreach($id_iax as $id_px){ - if($id_px != ""){$ia=1;} - } - } - if(isset($_POST['it'])){ - $id_iay = $_POST['it']; - foreach($id_iay as $id_py){ - if($id_py != ""){$it=1;} - } - } - - //CEK ada input - if($ir!=0 OR $ic!=0 OR $ia!=0 OR $it!=0){ - - $sql = "DELETE FROM analisis_respon WHERE id_subjek = ? AND id_periode=?"; - $this->db->query($sql,array($id,$per)); - - if(isset($_POST['rb'])){ - $id_rb = $_POST['rb']; - foreach($id_rb as $id_p){ - $p = preg_split("/\./", $id_p); - - $data['id_subjek'] = $id; - $data['id_periode'] = $per; - $data['id_indikator'] = $p[0]; - $data['id_parameter'] = $p[1]; - $outp = $this->db->insert('analisis_respon',$data); - } - } - if(isset($_POST['cb'])){ - $id_cb = $_POST['cb']; - if($id_cb){ - foreach($id_cb as $id_p){ - $p = preg_split("/\./", $id_p); - - $data['id_subjek'] = $id; - $data['id_periode'] = $per; - $data['id_indikator'] = $p[0]; - $data['id_parameter'] = $p[1]; - $outp = $this->db->insert('analisis_respon',$data); - } - } - } - - if(isset($_POST['ia'])){ - $id_ia = $_POST['ia']; - foreach($id_ia as $id_p){ - if($id_p != ""){ - unset($data); - $indikator = key($id_ia); - - $sql = "SELECT * FROM analisis_parameter u WHERE jawaban = ? AND id_indikator = ?"; - $query = $this->db->query($sql,array($id_p,$indikator)); - $dx = $query->row_array(); - if(!$dx){ - - $data['id_indikator'] = $indikator; - $data['jawaban'] = $id_p; - $this->db->insert('analisis_parameter',$data); - unset($data); - - $sql = "SELECT * FROM analisis_parameter u WHERE jawaban = ? AND id_indikator = ?"; - $query = $this->db->query($sql,array($id_p,$indikator)); - $dx = $query->row_array(); - - $data['id_parameter'] = $dx['id']; - $data['id_indikator'] = $indikator; - $data['id_subjek'] = $id; - $data['id_periode'] = $per; - $outp = $this->db->insert('analisis_respon',$data); - - }else{ - - unset($data); - $data['id_indikator'] = $indikator; - $data['id_parameter'] = $dx['id']; - $data['id_subjek'] = $id; - $data['id_periode'] = $per; - $outp = $this->db->insert('analisis_respon',$data); - } - } - next($id_ia); - } - } - if(isset($_POST['it'])){ - $id_it = $_POST['it']; - foreach($id_it as $id_p){ - if($id_p != ""){ - unset($data); - $indikator = key($id_it); - - $sql = "SELECT * FROM analisis_parameter u WHERE jawaban = ? AND id_indikator = ?"; - $query = $this->db->query($sql,array($id_p,$indikator)); - $dx = $query->row_array(); - if(!$dx){ - - $data['id_indikator'] = $indikator; - $data['jawaban'] = $id_p; - $this->db->insert('analisis_parameter',$data); - unset($data); - - $sql = "SELECT * FROM analisis_parameter u WHERE jawaban = ? AND id_indikator = ?"; - $query = $this->db->query($sql,array($id_p,$indikator)); - $dx = $query->row_array(); - - $data2['id_parameter'] = $dx['id']; - $data2['id_indikator'] = $indikator; - $data2['id_subjek'] = $id; - $data2['id_periode'] = $per; - $outp = $this->db->insert('analisis_respon',$data2); - - }else{ - - unset($data); - $data['id_indikator'] = $indikator; - $data['id_parameter'] = $dx['id']; - - $data['id_subjek'] = $id; - $data['id_periode'] = $per; - $outp = $this->db->insert('analisis_respon',$data); - } - } - next($id_it); - } - } - - $sql = "SELECT SUM(i.bobot * nilai) as jml FROM analisis_respon r LEFT JOIN analisis_indikator i ON r.id_indikator = i.id LEFT JOIN analisis_parameter z ON r.id_parameter = z.id WHERE r.id_subjek = ? AND i.act_analisis=1 AND r.id_periode=?"; - $query = $this->db->query($sql,array($id,$per)); - $dx = $query->row_array(); - - $upx['id_master'] = $id_master; - $upx['akumulasi'] = 0+$dx['jml']; - $upx['id_subjek'] = $id; - $upx['id_periode'] = $per; - - $sql = "DELETE FROM analisis_respon_hasil WHERE id_subjek = ? AND id_periode=?"; - $this->db->query($sql,array($id,$per)); - $outp = $this->db->insert('analisis_respon_hasil',$upx); - - - } - if(isset($_FILES['pengesahan'])){ - $lokasi_file = $_FILES['pengesahan']['tmp_name']; - $tipe_file = $_FILES['pengesahan']['type']; - if (!empty($lokasi_file)){ - if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg"){ - $_SESSION['sukses']=-1; - } else { - $nama_file = $_SESSION['analisis_master']."_".$per."_".$id."_".rand(10000,99999).".jpg"; - UploadPengesahan($nama_file); - $bukti['pengesahan'] = $nama_file; - $bukti['id_master'] = $id_master; - $bukti['id_subjek'] = $id; - $bukti['id_periode'] = $per; - - $outp = $this->db->insert('analisis_respon_bukti',$bukti); - } - } - } - if($outp) $_SESSION['sukses']=1; - else $_SESSION['sukses']=-1; - } - - function list_jawab2($id=0,$in=0,$per=0){ - - if(isset($_SESSION['delik'])){ - $sql = "SELECT s.id as id_parameter,s.jawaban,s.kode_jawaban FROM analisis_parameter s WHERE id_indikator = ? ORDER BY s.kode_jawaban ASC "; - $query = $this->db->query($sql,$in); - }else{ - $sql = "SELECT s.id as id_parameter,s.jawaban,s.kode_jawaban,(SELECT count(id_subjek) FROM analisis_respon WHERE id_parameter = s.id AND id_subjek = ? AND id_periode=?) as cek FROM analisis_parameter s WHERE id_indikator = ? ORDER BY s.kode_jawaban ASC "; - $query = $this->db->query($sql,array($id,$per,$in)); - } - - $data = $query->result_array(); - - $i=0; - while($idb->query($sql,array($in,$id,$per)); - $data = $query->row_array(); - - return $data; - } - function list_indikator($id=0){ - - $per = $this->get_aktif_periode(); - - $sql = "SELECT u.id,u.id_kategori,u.nomor,u.id_tipe,u.pertanyaan,k.kategori FROM analisis_indikator u LEFT JOIN analisis_kategori_indikator k ON u.id_kategori = k.id WHERE u.id_master = ? ORDER BY u.id_kategori,u.nomor ASC"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $data = $query->result_array(); - - $i=0; - while($ilist_jawab2($id,$data[$i]['id'],$per); - }else{ - - if(isset($_SESSION['delik'])){ - $data[$i]['parameter_respon'] = ""; - }else{ - $data[$i]['parameter_respon'] = $this->list_jawab3($id,$data[$i]['id'],$per); - } - } - $i++; - } - return $data; - } - - - //CHILD----------------------- - - function list_jawab4($id=0,$in=0,$per=0){ - - if(isset($_SESSION['delik'])){ - $sql = "SELECT s.id as id_parameter,s.jawaban,s.kode_jawaban FROM analisis_parameter s WHERE id_indikator = ? "; - $query = $this->db->query($sql,$in); - }else{ - $sql = "SELECT s.id as id_parameter,s.jawaban,s.kode_jawaban,(SELECT count(id_subjek) FROM analisis_respon WHERE id_parameter = s.id AND id_subjek = ? AND id_periode=?) as cek FROM analisis_parameter s WHERE id_indikator = ? "; - $query = $this->db->query($sql,array($id,$per,$in)); - } - - $data = $query->result_array(); - - $i=0; - while($idb->query($sql,array($in,$id,$per)); - $data = $query->row_array(); - - return $data; - } - function list_indikator_child($id=0){ - - $sql = "SELECT id_child FROM analisis_master WHERE id = ? "; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $id_child = $query->row_array(); - $id_child = $id_child['id_child']; - - $sql = "SELECT id FROM analisis_periode WHERE id_master = ? AND aktif = 1"; - $query = $this->db->query($sql,$id_child); - $per = $query->row_array(); - $per = $per['id']; - - $sql = "SELECT * FROM analisis_indikator u WHERE id_master = ? "; - $sql .= " ORDER BY nomor"; - $query = $this->db->query($sql,$id_child); - $data = $query->result_array(); - - - $i=0; - while($ilist_jawab4($id,$data[$i]['id'],$per); - }else{ - - if(isset($_SESSION['delik'])){ - $data[$i]['parameter_respon'] = ""; - }else{ - $data[$i]['parameter_respon'] = $this->list_jawab5($id,$data[$i]['id'],$per); - } - } - $i++; - } - return $data; - } - function get_periode_child(){ - - $sql = "SELECT id_child FROM analisis_master WHERE id = ? "; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $id_child = $query->row_array(); - $id_child = $id_child['id_child']; - - $sql = "SELECT id FROM analisis_periode WHERE id_master = ? AND aktif = 1"; - $query = $this->db->query($sql,$id_child); - $per = $query->row_array(); - $per = $per['id']; - return $per; - } - //--------------------------- - - function list_bukti($id=0){ - $per = $this->get_aktif_periode(); - $sql = "SELECT pengesahan FROM analisis_respon_bukti WHERE id_subjek = ? AND id_master = ? AND id_periode = ? "; - $sql .= " ORDER BY tgl_update DESC"; - $query = $this->db->query($sql,array($id,$_SESSION['analisis_master'],$per)); - $data = $query->result_array(); - - return $data; - } - function get_subjek($id=0){ - - $subjek = $_SESSION['subjek_tipe']; - switch($subjek){ - case 1: $sql = "SELECT u.id,u.nik AS nid,u.nama,u.sex,c.dusun,c.rw,c.rt FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE u.id = ? "; break; - - case 2: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE u.id = ? " ; break; - - case 3: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE u.id = ? "; break; - - case 4: $sql = "SELECT u.id,u.kode AS nid,u.nama,p.sex,c.dusun,c.rw,c.rt FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE u.id = ? "; break; - - default: return null; - - } - //$sql = "SELECT u.*,p.nama FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id WHERE u.id=?"; - $query = $this->db->query($sql,$id); - return $query->row_array(); - } - function list_anggota($id=0){ - - $subjek = $_SESSION['subjek_tipe']; - if($subjek == 2 OR $subjek == 3){ - switch($subjek){ - case 2: $sql = "SELECT u.* FROM tweb_penduduk u WHERE u.id_kk = ? ORDER BY kk_level" ;break; - case 3: $sql = "SELECT u.* FROM tweb_penduduk u WHERE u.id_rtm = ? ORDER BY rtm_level" ;break; - default: return null; - } - //$sql = "SELECT u.*,p.nama FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id WHERE u.id=?"; - $query = $this->db->query($sql,$id); - return $query->result_array(); - }else{ - return null; - } - } - function aturan_unduh(){ - - $subjek = $_SESSION['subjek_tipe']; - $order_sql = " ORDER BY u.nomor ASC"; - $sql = "SELECT u.*,t.tipe AS tipe_indikator,k.kategori AS kategori FROM analisis_indikator u LEFT JOIN analisis_tipe_indikator t ON u.id_tipe = t.id LEFT JOIN analisis_kategori_indikator k ON u.id_kategori = k.id WHERE u.id_master = ? "; - $sql .= $order_sql; - - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $data=$query->result_array(); - - $per = $this->get_aktif_periode(); - $i=0; - while($idb->query($sql2,$data[$i]['id']); - $respon2 = $query2->result_array(); - $data[$i]['par']=$respon2; - }else{ - $data[$i]['par']=null; - } - if($data[$i]['act_analisis']==1) - $data[$i]['act_analisis']="Ya"; - else - $data[$i]['act_analisis']="Tidak"; - - $i++; - } - return $data; - } - function data_unduh($p=0,$o=0){ - $per = $this->get_aktif_periode(); - $master = $this->get_analisis_master(); - $id_kelompok = $master['id_kelompok']; - - switch($o){ - case 1: $order_sql = ' ORDER BY u.id'; break; - case 2: $order_sql = ' ORDER BY u.id DESC'; break; - case 3: $order_sql = ' ORDER BY u.id'; break; - case 4: $order_sql = ' ORDER BY u.id DESC'; break; - default:$order_sql = ' ORDER BY u.id'; - } - - - $sql = "SELECT * FROM analisis_indikator WHERE id_master = ? ORDER BY nomor"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $indikator = $query->result_array(); - - $subjek = $_SESSION['subjek_tipe']; - switch($subjek){ - case 1: $sql = "SELECT u.id,u.nik AS nid,u.nama,u.sex,c.dusun,c.rw,c.rt FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE 1 "; break; - case 2: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1 "; break; - case 3: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1" ; break; - case 4: $sql = "SELECT u.id,u.kode AS nid,u.nama,p.sex,c.dusun,c.rw,c.rt FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1 "; break; - - default: return null; break; - - } - if($id_kelompok != 0) - $sql .= $this->kelompok_sql($id_kelompok); - - $sql .= $this->search_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $this->isi_sql(); - $sql .= $order_sql; - - $query = $this->db->query($sql,$per); - $data=$query->result_array(); - - $i=0; - while($idb->query($sql2,array($per,$data[$i]['id'])); - $par = $query2->result_array(); - $data[$i]['par'] = $par; - - // $j++; - //} - }else{ - $data[$i]['par'] = null; - } - - - $data[$i]['jk'] = "-"; - if($data[$i]['sex'] == 1) - $data[$i]['jk'] = "L"; - else - $data[$i]['jk'] = "P"; - - $i++; - } - return $data; - } - function indikator_data_unduh(){ - $master = $this->get_analisis_master(); - - $order_sql = ' ORDER BY u.nomor'; - - $sql = "SELECT u.* FROM analisis_indikator u WHERE u.id_master = ? "; - $sql .= $order_sql; - $query = $this->db->query($sql,$master); - $data = $query->result_array(); - - $i=0; - while($idb->query($sql2,$data[$i]['id']); - $par = $query2->result_array(); - $data[$i]['par'] = $par; - - $i++; - } - return $data; - } - function indikator_unduh($p=0){ - $master = $this->get_analisis_master(); - - $order_sql = ' ORDER BY u.nomor'; - - $sql = "SELECT u.* FROM analisis_indikator u WHERE u.id_master = ? "; - $sql .= $order_sql; - $query = $this->db->query($sql,$master); - $data = $query->result_array(); - - $i=0; - while($idb->query($sql2,$data[$i]['id']); - $par = $query2->result_array(); - $data[$i]['par'] = $par; - } - - $i++; - } - return $data; - } - function pre_update($pr=0){ - - if($pr==0) - $per = $this->get_aktif_periode(); - else - $per = $pr; - - $sql = "SELECT DISTINCT(id_subjek) AS id FROM analisis_respon WHERE id_periode = ? "; - $query = $this->db->query($sql,$per); - $data = $query->result_array(); - - $sql = "DELETE FROM analisis_respon_hasil WHERE id_subjek = 0"; - $this->db->query($sql); - - $sql = "DELETE FROM analisis_respon WHERE id_subjek = 0"; - $this->db->query($sql); - - $sql = "DELETE FROM analisis_respon_hasil WHERE id_periode = ?"; - $this->db->query($sql,$per); - - $i=0; - while($iupdate_hasil($data[$i]['id']); - - $sql = "SELECT SUM(i.bobot * nilai) as jml FROM analisis_respon r LEFT JOIN analisis_indikator i ON r.id_indikator = i.id LEFT JOIN analisis_parameter z ON r.id_parameter = z.id WHERE r.id_subjek = ? AND i.act_analisis=1 AND r.id_periode=?"; - $query = $this->db->query($sql,array($data[$i]['id'],$per)); - $dx = $query->row_array(); - - $upx[$i]['id_master'] = $_SESSION['analisis_master']; - $upx[$i]['akumulasi'] = 0+$dx['jml']; - $upx[$i]['id_subjek'] = $data[$i]['id']; - $upx[$i]['id_periode'] = $per; - - $i++; - } - if(@$upx) - $this->db->insert_batch('analisis_respon_hasil',$upx); - } - function update_hasil($id=0){ - - $per = $this->get_aktif_periode(); - - $sql = "SELECT SUM(i.bobot * nilai) as jml FROM analisis_respon r LEFT JOIN analisis_indikator i ON r.id_indikator = i.id LEFT JOIN analisis_parameter z ON r.id_parameter = z.id WHERE r.id_subjek = ? AND i.act_analisis=1 AND r.id_periode=?"; - $query = $this->db->query($sql,array($id,$per)); - $dx = $query->row_array(); - - $upx['id_master'] = $_SESSION['analisis_master']; - $upx['akumulasi'] = 0+$dx['jml']; - $upx['id_subjek'] = $id; - $upx['id_periode'] = $per; - - $sql = "DELETE FROM analisis_respon_hasil WHERE id_subjek = ? AND id_periode=?"; - $this->db->query($sql,array($id,$per)); - - $this->db->insert('analisis_respon_hasil',$upx); - } - - function import_respon($op=0){ - - $per = $this->get_aktif_periode(); - - $subjek = $_SESSION['subjek_tipe']; - $mas = $_SESSION['analisis_master']; - $key = ($per+3)*($mas+7)*($subjek*3); - $key = "AN".$key; - - $sql = "SELECT * FROM analisis_indikator WHERE id_master=? ORDER BY id ASC"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $indikator = $query->result_array(); - $jml = count($indikator); - - $data = new Spreadsheet_Excel_Reader($_FILES['respon']['tmp_name']); - $s=0; - $baris = $data->rowcount($s); - $kolom = $data->colcount($s); - - $ketemu = 0; - - for ($b=1;$b<=$baris;$b++){ - //echo ""; - for ($k=1;$k<=$kolom;$k++){ - $isi = $data->val($b,$k,$s); - //echo "$b : $k ($isi)"; - - // ketemu njuk stop - if($isi == $key){ - $br = $b+1; - $kl = $k+1; - - $b = $baris+1; - $k = $kolom+1; - $ketemu = 1; - //echo "<- KETEMU"; - } - } - } - - if($ketemu==1){ - - $dels = ""; - $true = 0; - for ($i=$br;$i<=$baris;$i++){ - $id_subjek = $data->val($i,$kl-1,$s); - - $j = $kl; - foreach($indikator AS $indi){ - $isi = $data->val($i,$j,$s); - if($isi != ""){ - $true = 1; - } - - $j++; - } - if($true == 1){ - $dels .= $id_subjek.","; - $true = 0; - } - } - - $dels .= "9999999"; - //cek ada row - - //echo $dels; - $sql = "DELETE FROM analisis_respon WHERE id_subjek IN(?) AND id_periode=?"; - $this->db->query($sql,array($dels,$per)); - $dels = ""; - - $n = 0; - for ($i=$br;$i<=$baris;$i++){ - - $id_subjek = $data->val($i,$kl-1,$s); - if(strlen($id_subjek) > 14 AND $subjek == 1){ - $sqls = "SELECT id FROM tweb_penduduk WHERE nik = ?;"; - $querys = $this->db->query($sqls,array($id_subjek)); - $isbj = $querys->row_array(); - $id_subjek = $isbj['id']; - } - - $j = $kl+$op; - $all = ""; - foreach($indikator AS $indi){ - $isi = $data->val($i,$j,$s); - if($isi != ""){ - if($indi['id_tipe']==1){ - $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND kode_jawaban = ?;"; - $query = $this->db->query($sql,array($indi['id'],$isi)); - $param = $query->row_array(); - - if($param){ - $in_param = $param['id']; - }else{ - if($isi == "") - $in_param = 0; - else - $in_param = -1; - - } - - $respon[$n]['id_parameter'] = $in_param; - $respon[$n]['id_indikator'] = $indi['id']; - $respon[$n]['id_subjek'] = $id_subjek; - $respon[$n]['id_periode'] = $per; - $n++; - - }elseif($indi['id_tipe']==2){ - $id_isi = explode(",",$isi); - - //if(count($id_isi) > 1){ - //foreach($id_isi AS $ids){ - //echo "
".count($id_isi)." -> "; - for($q=0;$q<(count($id_isi));$q++){ - //echo $id_isi[$q]." "; - $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND kode_jawaban = ? ;"; - $query = $this->db->query($sql,array($indi['id'],$id_isi[$q])); - $param = $query->row_array(); - - if($param['id'] != ""){ - $in_param = $param['id']; - $respon[$n]['id_parameter'] = $in_param; - $respon[$n]['id_indikator'] = $indi['id']; - $respon[$n]['id_subjek'] = $id_subjek; - $respon[$n]['id_periode'] = $per; - $n++; - } - } - //} - - }else{ - - $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;"; - $query = $this->db->query($sql,array($indi['id'],$isi)); - $param = $query->row_array(); - - // apakah sdh ada jawaban yg sama - if($param){ - $in_param = $param['id']; - }else{ - $parameter['jawaban'] = $isi; - $parameter['id_indikator'] = $indi['id']; - $parameter['asign'] = 0; - - $this->db->insert('analisis_parameter',$parameter); - - $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;"; - $query = $this->db->query($sql,array($indi['id'],$isi)); - $param = $query->row_array(); - //if($param){ - $in_param = $param['id']; - //}else{ - //$in_param = $id_param; - // } - } - - $respon[$n]['id_parameter'] = $in_param; - $respon[$n]['id_indikator'] = $indi['id']; - $respon[$n]['id_subjek'] = $id_subjek; - $respon[$n]['id_periode'] = $per; - $n++; - } - } - - $j++; - } - } - if($n>0) - $outp = $this->db->insert_batch('analisis_respon',$respon); - else - $outp = false; - } - - $this->pre_update(); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } -//------------------ - - function satu_jiwa($op=0){ - $_SESSION['subjek_tipe'] = 1; - $_SESSION['analisis_master'] = 2; - ini_set('max_execution_time', 1600); - ini_set('memory_limit', '2048M'); - - $per = $this->get_aktif_periode(); - - $subjek = $_SESSION['subjek_tipe']; - $mas = $_SESSION['analisis_master']; - $sql = "SELECT * FROM analisis_indikator WHERE id_master=? ORDER BY id ASC"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $indikator = $query->result_array(); - - $sql = "SELECT * FROM a_jiwa WHERE 1"; - $query = $this->db->query($sql); - $data = $query->result_array(); - - - $sql = "DELETE FROM analisis_respon WHERE id_periode=?"; - $this->db->query($sql,array($per)); - - $n = 0; - //foreach($tdata AS $data){ - $di =0; - while($di 14 AND $subjek == 1){ - $sqls = "SELECT id FROM tweb_penduduk WHERE nik = ?;"; - $querys = $this->db->query($sqls,array($id_subjek)); - $isbj = $querys->row_array(); - $id_subjek = $isbj['id']; - } - - $j = 1; - $all = ""; - foreach($indikator AS $indi){ - $k = 'j'.$j; - $isi = $data[$di][$k]; - //echo $isi."
"; - if($isi != ""){ - if($indi['id_tipe']==1){ - $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND kode_jawaban = ?;"; - $query = $this->db->query($sql,array($indi['id'],$isi)); - $param = $query->row_array(); - - if($param){ - $in_param = $param['id']; - }else{ - if($isi == "") - $in_param = 0; - else - $in_param = -1; - - } - - $respon[$n]['id_parameter'] = $in_param; - $respon[$n]['id_indikator'] = $indi['id']; - $respon[$n]['id_subjek'] = $id_subjek; - $respon[$n]['id_periode'] = $per; - $n++; - - }elseif($indi['id_tipe']==2){ - $id_isi = explode(",",$isi); - - //if(count($id_isi) > 1){ - //foreach($id_isi AS $ids){ - //echo "
".count($id_isi)." -> "; - for($q=0;$q<(count($id_isi));$q++){ - //echo $id_isi[$q]." "; - $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND kode_jawaban = ? ;"; - $query = $this->db->query($sql,array($indi['id'],$id_isi[$q])); - $param = $query->row_array(); - - if($param['id'] != ""){ - $in_param = $param['id']; - $respon[$n]['id_parameter'] = $in_param; - $respon[$n]['id_indikator'] = $indi['id']; - $respon[$n]['id_subjek'] = $id_subjek; - $respon[$n]['id_periode'] = $per; - $n++; - } - } - //} - - }else{ - - $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;"; - $query = $this->db->query($sql,array($indi['id'],$isi)); - $param = $query->row_array(); - - // apakah sdh ada jawaban yg sama - if($param){ - $in_param = $param['id']; - }else{ - $parameter['jawaban'] = $isi; - $parameter['id_indikator'] = $indi['id']; - $parameter['asign'] = 0; - - $this->db->insert('analisis_parameter',$parameter); - - $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;"; - $query = $this->db->query($sql,array($indi['id'],$isi)); - $param = $query->row_array(); - //if($param){ - $in_param = $param['id']; - //}else{ - //$in_param = $id_param; - // } - } - - $respon[$n]['id_parameter'] = $in_param; - $respon[$n]['id_indikator'] = $indi['id']; - $respon[$n]['id_subjek'] = $id_subjek; - $respon[$n]['id_periode'] = $per; - $n++; - } - } - - $j++; - } - $di++; - } - if($n>0) - $outp = $this->db->insert_batch('analisis_respon',$respon); - else - $outp = false; - - $this->pre_update(); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function dua_dunia($op=0){ - - $_SESSION['analisis_master'] = 1; - $_SESSION['subjek_tipe'] = 3; - ini_set('max_execution_time', 1600); - ini_set('memory_limit', '2048M'); - - $per = $this->get_aktif_periode(); - - $subjek = $_SESSION['subjek_tipe']; - $mas = $_SESSION['analisis_master']; - $sql = "SELECT * FROM analisis_indikator WHERE id_master=? ORDER BY id ASC"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $indikator = $query->result_array(); - - $sql = "SELECT * FROM a_rts WHERE 1"; - $query = $this->db->query($sql); - $data = $query->result_array(); - - - $sql = "DELETE FROM analisis_respon WHERE id_periode=?"; - $this->db->query($sql,array($per)); - - $n = 0; - //foreach($tdata AS $data){ - $di =0; - while($di"; - if($isi != ""){ - if($indi['id_tipe']==1){ - $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND kode_jawaban = ?;"; - $query = $this->db->query($sql,array($indi['id'],$isi)); - $param = $query->row_array(); - - if($param){ - $in_param = $param['id']; - }else{ - if($isi == "") - $in_param = 0; - else - $in_param = -1; - - } - - $respon[$n]['id_parameter'] = $in_param; - $respon[$n]['id_indikator'] = $indi['id']; - $respon[$n]['id_subjek'] = $id_subjek; - $respon[$n]['id_periode'] = $per; - $n++; - - }elseif($indi['id_tipe']==2){ - $id_isi = explode(",",$isi); - - //if(count($id_isi) > 1){ - //foreach($id_isi AS $ids){ - //echo "
".count($id_isi)." -> "; - for($q=0;$q<(count($id_isi));$q++){ - //echo $id_isi[$q]." "; - $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND kode_jawaban = ? ;"; - $query = $this->db->query($sql,array($indi['id'],$id_isi[$q])); - $param = $query->row_array(); - - if($param['id'] != ""){ - $in_param = $param['id']; - $respon[$n]['id_parameter'] = $in_param; - $respon[$n]['id_indikator'] = $indi['id']; - $respon[$n]['id_subjek'] = $id_subjek; - $respon[$n]['id_periode'] = $per; - $n++; - } - } - //} - - }else{ - - $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;"; - $query = $this->db->query($sql,array($indi['id'],$isi)); - $param = $query->row_array(); - - // apakah sdh ada jawaban yg sama - if($param){ - $in_param = $param['id']; - }else{ - $parameter['jawaban'] = $isi; - $parameter['id_indikator'] = $indi['id']; - $parameter['asign'] = 0; - - $this->db->insert('analisis_parameter',$parameter); - - $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;"; - $query = $this->db->query($sql,array($indi['id'],$isi)); - $param = $query->row_array(); - //if($param){ - $in_param = $param['id']; - //}else{ - //$in_param = $id_param; - // } - } - - $respon[$n]['id_parameter'] = $in_param; - $respon[$n]['id_indikator'] = $indi['id']; - $respon[$n]['id_subjek'] = $id_subjek; - $respon[$n]['id_periode'] = $per; - $n++; - } - } - - $j++; - } - $di++; - } - if($n>0) - $outp = $this->db->insert_batch('analisis_respon',$respon); - else - $outp = false; - - $this->pre_update(); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - -//----------------- - function get_aktif_periode(){ - $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $data = $query->row_array(); - return $data['id']; - } - function get_analisis_master(){ - $sql = "SELECT * FROM analisis_master WHERE id=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - return $query->row_array(); - } - function get_periode(){ - $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $data = $query->row_array(); - return $data['nama']; - } - function list_dusun(){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function list_rw($dusun=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND dusun = ? AND rw <> '0'"; - $query = $this->db->query($sql,$dusun); - $data=$query->result_array(); - return $data; - } - - function list_rt($dusun='',$rw=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rw = ? AND dusun = ? AND rt <> '0'"; - $query = $this->db->query($sql,array($rw,$dusun)); - $data=$query->result_array(); - return $data; - } - -} \ No newline at end of file diff --git a/donjo-app/models/analisis_statistik_jawaban_model.php b/donjo-app/models/analisis_statistik_jawaban_model.php deleted file mode 100644 index ec07ffd2b..000000000 --- a/donjo-app/models/analisis_statistik_jawaban_model.php +++ /dev/null @@ -1,311 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.pertanyaan LIKE '$kw' OR u.pertanyaan LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND u.act_analisis = $kf"; - return $filter_sql; - } - } - function master_sql(){ - if(isset($_SESSION['analisis_master'])){ - $kf = $_SESSION['analisis_master']; - $filter_sql= " AND u.id_master = $kf"; - return $filter_sql; - } - } - function tipe_sql(){ - if(isset($_SESSION['tipe'])){ - $kf = $_SESSION['tipe']; - $filter_sql= " AND u.id_tipe = $kf"; - return $filter_sql; - } - } - function kategori_sql(){ - if(isset($_SESSION['kategori'])){ - $kf = $_SESSION['kategori']; - $filter_sql= " AND u.id_kategori = $kf"; - return $filter_sql; - } - } - function dusun_sql(){ - if(isset($_SESSION['dusun'])){ - $kf = $_SESSION['dusun']; - $dusun_sql= " AND a.dusun = '$kf'"; - return $dusun_sql; - } - } - function rw_sql(){ - if(isset($_SESSION['rw'])){ - $kf = $_SESSION['rw']; - $rw_sql= " AND a.rw = '$kf'"; - return $rw_sql; - } - } - function rt_sql(){ - if(isset($_SESSION['rt'])){ - $kf = $_SESSION['rt']; - $rt_sql= " AND a.rt = '$kf'"; - return $rt_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM analisis_indikator u WHERE 1"; - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->master_sql(); - $sql .= $this->tipe_sql(); - $sql .= $this->kategori_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - - //$_subjek = $this->get_subjek(); - - $subjek = $_SESSION['subjek_tipe']; - switch($subjek){ - case 1: $sbj = "LEFT JOIN tweb_penduduk p ON r.id_subjek = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; - case 2: $sbj = "LEFT JOIN tweb_keluarga v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id " ; break; - case 3: $sbj = "LEFT JOIN tweb_rtm v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; - case 4: $sbj = "LEFT JOIN kelompok v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; - } - - switch($o){ - case 1: $order_sql = ' ORDER BY u.nomor'; break; - case 2: $order_sql = ' ORDER BY u.nomor DESC'; break; - case 3: $order_sql = ' ORDER BY u.pertanyaan'; break; - case 4: $order_sql = ' ORDER BY u.pertanyaan DESC'; break; - case 5: $order_sql = ' ORDER BY u.id_kategori'; break; - case 6: $order_sql = ' ORDER BY u.id_kategori DESC'; break; - default:$order_sql = ' ORDER BY u.nomor'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT u.*,t.tipe AS tipe_indikator,k.kategori AS kategori FROM analisis_indikator u LEFT JOIN analisis_tipe_indikator t ON u.id_tipe = t.id LEFT JOIN analisis_kategori_indikator k ON u.id_kategori = k.id WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->master_sql(); - $sql .= $this->tipe_sql(); - $sql .= $this->kategori_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $per = $this->get_aktif_periode(); - $i=0; - $j=$offset; - while($idusun_sql(); - $sql1 .= $this->rw_sql(); - $sql1 .= $this->rt_sql(); - //$sql1 .= " GROUP BY r.id_indikator "; - $query1 = $this->db->query($sql1,$data[$i]['id']); - $respon= $query1->row_array(); - $data[$i]['bobot']=$respon['jml']; - - $dus = $this->dusun_sql(); - $rw = $this->rw_sql(); - $rt = $this->rt_sql(); - - $sql2 = "SELECT i.id,i.kode_jawaban,i.jawaban,(SELECT COUNT(r.id_subjek) FROM analisis_respon r $sbj WHERE r.id_parameter = i.id AND r.id_periode = $per $dus $rw $rt ) AS jml_p FROM analisis_parameter i WHERE i.id_indikator = ? ORDER BY i.kode_jawaban "; - - - $query2 = $this->db->query($sql2,$data[$i]['id']); - $respon2= $query2->result_array(); - $data[$i]['par']=$respon2; - - if($data[$i]['act_analisis']==1) - $data[$i]['act_analisis']="Ya"; - else - $data[$i]['act_analisis']="Tidak"; - - if($data[$i]['id_tipe']==3){ - $data[$i]['jumlah'] = 0; - foreach($respon2 as $par){ - $data[$i]['jumlah'] += $par['jawaban']*$par['jml_p']; - } - } - $i++; - $j++; - } - return $data; - } - function list_indikator($id=0){ - //$_subjek = $this->get_subjek(); - - $subjek = $_SESSION['subjek_tipe']; - switch($subjek){ - case 1: $sbj = "LEFT JOIN tweb_penduduk p ON r.id_subjek = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; - case 2: $sbj = "LEFT JOIN tweb_keluarga v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id " ; break; - case 3: $sbj = "LEFT JOIN tweb_rtm v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; - case 4: $sbj = "LEFT JOIN kelompok v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; - } - - $sql = "SELECT * FROM analisis_parameter WHERE id_indikator = ? ORDER BY kode_jawaban ASC "; - $query = $this->db->query($sql,$id); - $data= $query->result_array(); - $per = $this->get_aktif_periode(); - - $i=0; - while($idusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $query = $this->db->query($sql,$data[$i]['id']); - $respon= $query->row_array(); - - $data[$i]['nilai']=$respon['jml']; - - $i++; - } - return $data; - } - - function list_subjek($id=0){ - $per = $this->get_aktif_periode(); - //$sbj = $this->get_subjek2(); - - $subjek = $_SESSION['subjek_tipe']; - switch($subjek){ - case 1: $sbj = "LEFT JOIN tweb_penduduk p ON r.id_subjek = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; - case 2: $sbj = "LEFT JOIN tweb_keluarga v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id " ; break; - case 3: $sbj = "LEFT JOIN tweb_rtm v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; - case 4: $sbj = "LEFT JOIN kelompok v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; - } - - $sql = "SELECT p.id AS id_pend,r.id_subjek,p.nama,p.nik,(SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = p.id) AS umur,p.sex,a.dusun,a.rw,a.rt FROM analisis_respon r $sbj WHERE r.id_parameter = ? AND r.id_periode = $per" ; - - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $query = $this->db->query($sql,$id); - $data= $query->result_array(); - - $i=0; - while($idb->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_analisis_master(){ - $sql = "SELECT * FROM analisis_master WHERE id=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - return $query->row_array(); - } - function get_analisis_parameter($id=''){ - $sql = "SELECT * FROM analisis_parameter WHERE id=?"; - $query = $this->db->query($sql,$id); - return $query->row_array(); - } - function list_tipe(){ - $sql = "SELECT * FROM analisis_tipe_indikator"; - $query = $this->db->query($sql); - return $query->result_array(); - } - function list_kategori(){ - $sql = "SELECT u.* FROM analisis_kategori_indikator u WHERE 1"; - $sql .= $this->master_sql(); - $query = $this->db->query($sql); - return $query->result_array(); - } - function get_aktif_periode(){ - $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; - $query = $this->db->query($sql,$_SESSION['analisis_master']); - $data = $query->row_array(); - return $data['id']; - } - function list_dusun(){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function list_rw($dusun=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND dusun = ? AND rw <> '0'"; - $query = $this->db->query($sql,$dusun); - $data=$query->result_array(); - return $data; - } - - function list_rt($dusun='',$rw=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rw = ? AND dusun = ? AND rt <> '0'"; - $query = $this->db->query($sql,array($rw,$dusun)); - $data=$query->result_array(); - return $data; - } -} \ No newline at end of file diff --git a/donjo-app/models/apis.php b/donjo-app/models/apis.php deleted file mode 100644 index c98cf9975..000000000 --- a/donjo-app/models/apis.php +++ /dev/null @@ -1,13 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/models/config_model.php b/donjo-app/models/config_model.php deleted file mode 100644 index 58f615016..000000000 --- a/donjo-app/models/config_model.php +++ /dev/null @@ -1,403 +0,0 @@ -load->database(); - $db =$CI->db->database;; - - $sql = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA=? AND TABLE_NAME <> 'impor'"; - $query = $this->db->query($sql,$db); - $data=$query->result_array(); - if(count($data) != 77){ - return 0; - }else{ - return 1; - } - } - function initial(){ - - $CI = get_instance(); - $CI->load->database(); - $db =$CI->db->database;; - - $sql = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA=? AND TABLE_NAME <> 'impor'"; - $query = $this->db->query($sql,$db); - $data=$query->result_array(); - if(count($data) != 77){ - $myhome = $_SERVER['MYSQL_HOME']; - $filename = 'sid.install'; - $templine = ''; - $lines = file($filename); - foreach ($lines as $line){ - if (substr($line, 0, 2) == '--' || $line == '') - continue; - $templine .= $line; - if (substr(trim($line), -1, 1) == ';'){ - $this->db->query($templine); - $templine = ''; - } - } - $passwd = generator(); - $out['pass'] = $passwd; - $idsid = hash_password($passwd); - - $skrg = date("Y-m-d H:i:s"); - $macid = $this->sysinfo(); - $ids="user:admin\r\npass:".$passwd."\r\nidr:".$idsid."\r\nids:".$macid; - $handle = fopen('../install.sid','w+'); - fwrite($handle,$ids); - fclose($handle); - - $reg['regid'] = $idsid; - $reg['macid'] = $macid; - $this->db->where('id','1'); - $this->db->update('config',$reg); - - $sql = "INSERT INTO user VALUES (1,'admin','$idsid',1,'admin@localhost','$skrg',1,'Administrator','ADMIN','0123456789','','$idsid');"; - $this->db->query($sql); - - $this->initsurat(); - $this->gawe_surat(); - return $out; - }else{ - return NULL; - } - } - - function do_reg(){ - $url = 'http://register.sid.web.id/doreg/index.php'; - - $sql = "SELECT * FROM config WHERE id=1"; - $query = $this->db->query($sql); - $data=$query->row_array(); - - $fields = array( - - 'desa' => urlencode($data['nama_desa']), - 'kecamatan' => urlencode($data['nama_kecamatan']), - 'kabupaten' => urlencode($data['nama_kabupaten']), - 'propinsi' => urlencode($data['nama_propinsi']), - 'geo' => urlencode($data['lat'].','.$data['lng']), - 'kode_wilayah' => urlencode($data['kode_propinsi'].'-'.$data['kode_kabupaten'].'-'.$data['kode_kecamatan'].'-'.$data['kode_desa']), - 'regid' => urlencode($data['regid']), - 'macid' => urlencode($data['macid']), - 'email' => urlencode($data['email_desa']) - ); - $fields_string =""; - foreach($fields as $key=>$value) {$fields_string .= $key.'='.$value.'&'; } - rtrim($fields_string, '&'); - $ch = curl_init(); - curl_setopt($ch,CURLOPT_URL, $url); - curl_setopt($ch,CURLOPT_POST, count($fields)); - curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); - curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1); - //curl_setopt($ch,CURLOPT_MUTE, true); - curl_setopt($ch,CURLOPT_CONNECTTIMEOUT, 5); - curl_setopt($ch,CURLOPT_FOLLOWLOCATION, false); - curl_exec($ch); - curl_close($ch); - } - - function gawe_surat(){ - - $sql = "SELECT kunci,favorit FROM tweb_surat_format WHERE 1;"; - $query = $this->db->query($sql); - - //if(!$query){ - $sql = "SELECT * FROM tweb_surat_format WHERE 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - - foreach($data AS $dat){ - - $string=$dat['url_surat']; - $mypath="surat\\".$dat['url_surat']."\\"; - $path = "".str_replace("\\","/",$mypath)."/"; - - if (!file_exists($mypath)) { - mkdir($mypath, 0777, true); - } - - if (!file_exists($path)) { - mkdir($path); - } - $raw="surat\\raw\\"; - $raw_path = "".str_replace("\\","/",$raw); - $file = $raw_path."template.rtf"; - $handle = fopen($file,'r'); - - $buffer = stream_get_contents($handle); - - $handle = fopen($path.$dat['url_surat'].'.rtf','w+'); - fwrite($handle,$buffer); - fclose($handle); - } - //} - - } - function initsurat(){ - $sql = "SELECT kunci,favorit FROM tweb_surat_format WHERE 1;"; - $query = $this->db->query($sql); - if(!$query){ - $sql = "ALTER TABLE tweb_surat_format ADD kunci TINYINT(1) NOT NULL DEFAULT '0', ADD favorit TINYINT( 1 ) NOT NULL DEFAULT '0'"; - $this->db->query($sql); - } - $sql = "SELECT id_pend FROM dokumen WHERE 1;"; - $query = $this->db->query($sql); - if(!$query){ - $sql = "ALTER TABLE dokumen ADD id_pend INT NOT NULL DEFAULT '0' AFTER id"; - $this->db->query($sql); - } - } - - function get_data(){ - $sql = "SELECT * FROM config WHERE 1"; - $query = $this->db->query($sql); - return $query->row_array(); - } - function insert(){ - $outp = $this->db->insert('config',$_POST); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $lokasi_file = $_FILES['logo']['tmp_name']; - $tipe_file = $_FILES['logo']['type']; - $nama_file = $_FILES['logo']['name']; - $old_logo = $data['old_logo']; - if (!empty($lokasi_file)){ - if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ - unset($data['logo']); - } else { - UploadLogo($nama_file,$old_logo,$tipe_file); - $data['logo'] = $nama_file; - } - }else{ - unset($data['logo']); - } - unset($data['file_logo']); - unset($data['old_logo']); - $this->db->where('id',$id); - $outp = $this->db->update('config',penetration($data)); - $pamong['pamong_nama'] = $data['nama_kepala_desa']; - $pamong['pamong_nip'] = $data['nip_kepala_desa']; - $this->db->where('pamong_id','707'); - $outp = $this->db->update('tweb_desa_pamong',$pamong); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function update_kantor(){ - $data = $_POST; - $id = "1"; - $this->db->where('id',$id); - $outp = $this->db->update('config',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update_wilayah(){ - $data = $_POST; - $id = "1"; - $this->db->where('id',$id); - $outp = $this->db->update('config',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function kosong_pend(){ - $a="TRUNCATE tweb_wil_clusterdesa"; - $this->db->query($a); - $a="TRUNCATE tweb_keluarga"; - $this->db->query($a); - $a="TRUNCATE tweb_rtm"; - $this->db->query($a); - - $a="TRUNCATE tweb_penduduk"; - $this->db->query($a); - - $a="TRUNCATE log_penduduk"; - $this->db->query($a); - - $a="TRUNCATE log_surat"; - $this->db->query($a); - - $a="TRUNCATE log_perubahan_penduduk"; - $this->db->query($a); - - $a="TRUNCATE log_bulanan"; - $this->db->query($a); - - $a="TRUNCATE garis"; - $this->db->query($a); - - $a="TRUNCATE lokasi"; - $this->db->query($a); - - $a="TRUNCATE area"; - $this->db->query($a); - - $a="TRUNCATE point"; - $this->db->query($a); - - $a="TRUNCATE line"; - $this->db->query($a); - - $a="TRUNCATE polygon"; - $this->db->query($a); - - $a="TRUNCATE analisis_master"; - $this->db->query($a); - - $a="TRUNCATE analisis_indikator"; - $this->db->query($a); - - $a="TRUNCATE analisis_parameter"; - $this->db->query($a); - - $a="TRUNCATE analisis_periode"; - $this->db->query($a); - - $a="TRUNCATE analisis_respon"; - $this->db->query($a); - - $a="TRUNCATE analisis_respon_hasil"; - $this->db->query($a); - - $a="TRUNCATE analisis_klasifikasi"; - $this->db->query($a); - - $a="TRUNCATE analisis_kategori_indikator"; - $this->db->query($a); - - $a="TRUNCATE analisis_respon_bukti"; - $this->db->query($a); - - $a="TRUNCATE tweb_penduduk_mandiri"; - $this->db->query($a); - $a="TRUNCATE kelompok"; - $this->db->query($a); - - $a="TRUNCATE kelompok_anggota"; - $this->db->query($a); - $a="TRUNCATE data_persil"; - $this->db->query($a); - $a="TRUNCATE tweb_penduduk_map"; - $this->db->query($a); - $a="TRUNCATE sys_traffic"; - $this->db->query($a); - } - function kosong_web(){ - $a="TRUNCATE tweb_wil_clusterdesa"; - $this->db->query($a); - $a="TRUNCATE tweb_keluarga"; - $this->db->query($a); - $a="TRUNCATE tweb_penduduk"; - $this->db->query($a); - } - function upgrade(){ - $a="DROP TABLE tweb_rtm"; - $this->db->query($a); - $a="DROP TABLE hasil_analisis_keluarga"; - $this->db->query($a); - $a="DROP TABLE analisis_keluarga"; - $this->db->query($a); - - $a="DROP TABLE klasifikasi_analisis_keluarga"; - $this->db->query($a); - - $a="DROP TABLE master_analisis_keluarga"; - $this->db->query($a); - - $a="DROP TABLE sub_analisis_keluarga"; - $this->db->query($a); - - $a="DROP TABLE tipe_analisis"; - $this->db->query($a); - - $a="DROP TABLE tweb_rtm_hubungan"; - $this->db->query($a); - - $a="UPDATE tweb_penduduk SET id_rtm = 0, rtm_level = 0 WHERE 1"; - $this->db->query($a); - - $a="TRUNCATE tweb_rtm"; - $this->db->query($a); - $a="TRUNCATE hasil_analisis_keluarga"; - $this->db->query($a); - $a="TRUNCATE analisis_keluarga"; - $this->db->query($a); - - - if($b) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function sysinfo(){ - exec('systeminfo',$ret); - for($i=0;$i<(count($ret));$i++){ - $d = str_replace(" ","",$ret[$i]); - $d.="*"; - $pd=Parse_Data($d,'ProductID:','*'); - if($pd != "") - $pd1 = $pd; - $pd=Parse_Data($d,'SystemModel:','*'); - if($pd != "") - $pd2 = $pd; - $pd=Parse_Data($d,'BIOSVersion:','*'); - if($pd != "") - $pd3 = $pd; - } - return $pd1; - } - function patch(){ - $a = "UPDATE analisis_indikator SET act_analisis=0 WHERE id_tipe IN(2,3,4)"; - $this->db->query($a); - $this->cls(); - - $b = "SELECT id FROM tweb_wil_clusterdesa WHERE rt <> '-' AND rt <> 0 AND rw <> 0 AND rw <> '-'"; - //$query = $this->db->query($sql); - //$data = $query->result_array(); - - } - function opt(){ - $a="OPTIMIZE TABLE analisis_indikator, analisis_kategori_indikator, analisis_klasifikasi, analisis_master, analisis_parameter, analisis_partisipasi, analisis_periode, analisis_ref_state, analisis_ref_subjek, analisis_respon, analisis_respon_hasil, analisis_tipe_indikator, area, artikel, config, data_persil, data_persil_jenis, data_persil_log, data_persil_peruntukan, detail_log_penduduk, dokumen, gambar_gallery, garis, gis_simbol, inbox, kategori, kelompok, kelompok_anggota, kelompok_master, komentar, kontak, kontak_grup, line, log_bulanan, log_penduduk, log_perubahan_penduduk, log_surat, lokasi, media_sosial, menu, outbox, point, polygon, program, program_peserta, recent_status, ref_bedah_rumah, ref_blt, ref_jamkesmas, ref_kelas_sosial, ref_pkh, ref_raskin, sentitems, setting_modul, setting_sms, sys_traffic, tweb_alamat_sekarang, tweb_desa_pamong, tweb_keluarga, tweb_penduduk, tweb_penduduk_mandiri, tweb_penduduk_map, tweb_penduduk_umur, tweb_rtm, tweb_surat_atribut, tweb_surat_format, tweb_wil_clusterdesa, user;"; - $this->db->query($a); - } - function cls(){ - - $sql = "SELECT * FROM analisis_parameter WHERE asign = 1 ORDER BY id_indikator"; - $query = $this->db->query($sql); - $data = $query->result_array(); - - $i=0; - $m=0; - while($idb->query($sql1,$data[$i]['id_indikator']); - $m = $query1->row_array(); - $n = ($m['nil']+1) - $data[$i]['kode_jawaban']; - - - $up ['nilai'] = $n; - $this->db->where('id',$id); - $outp = $this->db->update('analisis_parameter',$up); - $j = explode(". ",$jwb); - if(count($j) > 1){ - $upd ['jawaban'] = $j[1]; - $this->db->where('id',$id); - $outp = $this->db->update('analisis_parameter',$upd); - } - $i++; - } - } -} \ No newline at end of file diff --git a/donjo-app/models/data_persil_model.php b/donjo-app/models/data_persil_model.php deleted file mode 100644 index f35797586..000000000 --- a/donjo-app/models/data_persil_model.php +++ /dev/null @@ -1,296 +0,0 @@ -load->database(); - } - function autocomplete(){ - $sql = "SELECT nik FROM data_persil - UNION SELECT p.nama AS nik FROM data_persil u LEFT JOIN tweb_penduduk p ON u.nik = p.nik"; - $query = $this->db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.nama LIKE '$kw' OR p.nik LIKE '$kw')"; - return $search_sql; - } - } - function list_persil($apa='',$mana=0,$page=1){ - $data = false; - $limit = 20; - $offset = ($page - 1) * $limit; - $strSQL = "SELECT p.`id` as id, p.`nik` as nik, p.`nama` as nopersil, p.`persil_jenis_id`, p.`id_clusterdesa`, p.`luas`, p.`kelas`, - p.`no_sppt_pbb`, p.`persil_peruntukan_id`, u.nama as namapemilik, w.rt, w.rw, w.dusun - FROM `data_persil` p - LEFT JOIN tweb_penduduk u ON u.nik = p.nik - LEFT JOIN tweb_wil_clusterdesa w ON w.id=p.id_clusterdesa - WHERE ((1) "; - if($apa =="jenis"){ - if($mana > 0){ - $strSQL .= " AND (p.persil_jenis_id=".$mana.") "; - } - }elseif($apa =="peruntukan"){ - if($mana > 0){ - $strSQL .= " AND (p.persil_peruntukan_id=".$mana.") "; - } - } - - $strSQL .= $this->search_sql(); - $strSQL .= ") LIMIT ".$offset.",".$limit; - $query = $this->db->query($strSQL); - if($query->num_rows()>0){ - $data = $query->result_array(); - }else{ - $_SESSION["pesan"]= $strSQL; - } - - $i=0; - - while($i''){ - $data[$i]['namapemilik'] = $data[$i]['nik']; - $data[$i]['nik'] = "-"; - } - $i++; - - } - return $data; - } - function get_persil($id){ - $data = false; - $strSQL = "SELECT p.`id` as id, p.`nik` as nik, p.`nama` as nopersil, - p.`persil_jenis_id`, p.`id_clusterdesa`, p.`luas`, p.`kelas`, - p.`no_sppt_pbb`, p.`persil_peruntukan_id`, u.nama as namapemilik, w.rt, w.rw, w.dusun,alamat_ext - FROM `data_persil` p - LEFT JOIN tweb_penduduk u ON u.nik = p.nik - LEFT JOIN tweb_wil_clusterdesa w ON w.id=p.id_clusterdesa - WHERE p.id=".$id; - $query = $this->db->query($strSQL); - if($query->num_rows()>0){ - $data = $query->row_array(); - } - - if(!is_numeric($data['nik'])){ - $data['namapemilik'] = $data['nik']; - $data['nik'] = "-"; - } - return $data; - } - function simpan_persil(){ - $hasil = false; - if(@$_POST["nik"]){ - if($_POST["id"]>0){ - $strSQL = "UPDATE data_persil SET - `nik`='".fixSQL($_POST["nik"])."', - `nama`='".fixSQL($_POST["nama"])."', - `persil_jenis_id`='".fixSQL($_POST["cid"])."', - `id_clusterdesa`='".fixSQL($_POST["pid"])."', - `persil_peruntukan_id`='".fixSQL($_POST["sid"])."', - `luas`='".fixSQL($_POST["luas"])."', - `kelas`='".fixSQL($_POST["kelas"])."', - `no_sppt_pbb`='".fixSQL($_POST["sppt"])."', - `userID`='".$_SESSION['user']."' - WHERE id=".fixSQL($_POST["id"]); - }else{ - if(is_numeric($_POST["nik"])){ - $strSQL = "INSERT INTO data_persil(`nik`,`nama`, `persil_jenis_id`, `id_clusterdesa`, `persil_peruntukan_id`, - `kelas`,`luas`, `no_sppt_pbb`, `userID`) VALUES('".fixSQL($_POST["nik"])."','".fixSQL($_POST["nama"])."','".fixSQL($_POST["cid"])."', - '".fixSQL($_POST["pid"])."','".fixSQL($_POST["sid"])."','".fixSQL($_POST["kelas"])."','".fixSQL($_POST["luas"])."', - '".fixSQL($_POST["sppt"])."','".fixSQL($_SESSION['user'])."')"; - }else{ - $strSQL = "INSERT INTO data_persil(`nik`,`nama`,`alamat_ext`, `persil_jenis_id`, `id_clusterdesa`, `persil_peruntukan_id`, - `kelas`,`luas`, `no_sppt_pbb`, `userID`) VALUES('".fixSQL($_POST["nik"])."','".fixSQL($_POST["nama"])."','".fixSQL($_POST["alamat_ext"])."','".fixSQL($_POST["cid"])."', - '".fixSQL($_POST["pid"])."','".fixSQL($_POST["sid"])."','".fixSQL($_POST["kelas"])."','".fixSQL($_POST["luas"])."', - '".fixSQL($_POST["sppt"])."','".fixSQL($_SESSION['user'])."')"; - } - } - if($this->db->query($strSQL)){ - $_SESSION["success"] = 1; - $_SESSION["pesan"] = "Data Persil telah DISIMPAN"; - $hasil = true; - } - }else{ - $_SESSION["success"] = -1; - $_SESSION["pesan"] = "Formulir belum/tidak terisi dengan benar"; - } - return $hasil; - } - public function hapus_persil($id){ - $strSQL = "DELETE FROM `data_persil` WHERE id=".$id; - $hasil = $this->db->query($strSQL); - if($hasil){ - $_SESSION["success"] = 1; - $_SESSION["pesan"] = "Data Persil telah dihapus"; - }else{ - $_SESSION["success"] = -1; - $_SESSION["pesan"] = "Gagal menghapus data persil"; - } - } - function list_dusunrwrt(){ - $strSQL = "SELECT `id`,`rt`,`rw`,`dusun` FROM `tweb_wil_clusterdesa` WHERE (`rt`>0) ORDER BY `dusun`"; - $query = $this->db->query($strSQL); - return $query->result_array(); - } - function get_penduduk($id){ - $strSQL = "SELECT p.nik,p.nama,k.no_kk,w.rt,w.rw,w.dusun FROM tweb_penduduk p - LEFT JOIN tweb_keluarga k ON k.id=p.id_kk - LEFT JOIN tweb_wil_clusterdesa w ON w.id=p.id_cluster - WHERE p.nik='".fixSQL($id)."'"; - $query = $this->db->query($strSQL); - $data = ""; - $data=$query->row_array(); - return $data; - } - - function list_penduduk(){ - $strSQL = "SELECT p.nik,p.nama,k.no_kk,w.rt,w.rw,w.dusun FROM tweb_penduduk p - LEFT JOIN tweb_keluarga k ON k.id=p.id_kk - LEFT JOIN tweb_wil_clusterdesa w ON w.id=p.id_cluster - WHERE 1 ORDER BY nama"; - $query = $this->db->query($strSQL); - $data = ""; - $data=$query->result_array(); - if($query->num_rows() > 0){ - $i=0;$j=0; - while($idb->query($strSQL); - if($query->num_rows()>0){ - $data = array(); - foreach ($query->result() as $row){ - $data[$row->id] = array($row->nama,$row->ndesc); - } - } - return $data; - } - function get_persil_peruntukan($id=0){ - $data =false; - $strSQL = "SELECT id,nama,ndesc FROM data_persil_peruntukan WHERE id=".$id; - $query = $this->db->query($strSQL); - if($query->num_rows()>0){ - $data = array(); - $data[$id] = $query->row_array(); - } - return $data; - } - public function update_persil_peruntukan(){ - if($this->input->post('id') == 0){ - $strSQL = "INSERT INTO `data_persil_peruntukan`(`nama`,`ndesc`) VALUES('".fixSQL($this->input->post('nama'))."','".fixSQL($this->input->post('ndesc'))."')"; - }else{ - $strSQL = "UPDATE `data_persil_peruntukan` SET - `nama`='".fixSQL($this->input->post('nama'))."', - `ndesc`='".fixSQL($this->input->post('ndesc'))."' - WHERE id=".$this->input->post('id'); - } - - $data["db"] = $strSQL; - $hasil = $this->db->query($strSQL); - if($hasil){ - $data["transaksi"] = true; - $data["pesan"] = "Data Peruntukan Persil ".fixSQL($this->input->post('nama'))." telah disimpan/diperbarui"; - $_SESSION["success"] = 1; - $_SESSION["pesan"] = "Data Peruntukan Persil ".fixSQL($this->input->post('nama'))." telah disimpan/diperbarui"; - }else{ - $data["transaksi"] = false; - $data["pesan"] = "ERROR ".$strSQL; - } - return $data; - } - public function hapus_peruntukan($id){ - $strSQL = "DELETE FROM `data_persil_peruntukan` WHERE id=".$id; - $hasil = $this->db->query($strSQL); - if($hasil){ - $_SESSION["success"] = 1; - $_SESSION["pesan"] = "Data Peruntukan Persil telah dihapus"; - }else{ - $_SESSION["success"] = -1; - } - } - function list_persil_jenis(){ - $data =false; - $strSQL = "SELECT id,nama,ndesc FROM data_persil_jenis WHERE 1"; - $query = $this->db->query($strSQL); - if($query->num_rows()>0){ - $data = array(); - foreach ($query->result() as $row){ - $data[$row->id] = array($row->nama,$row->ndesc); - } - } - return $data; - } - function get_persil_jenis($id=0){ - $data =false; - $strSQL = "SELECT id,nama,ndesc FROM data_persil_jenis WHERE id=".$id; - $query = $this->db->query($strSQL); - if($query->num_rows()>0){ - $data = array(); - $data[$id] = $query->row_array(); - } - return $data; - } - public function update_persil_jenis(){ - if($this->input->post('id') == 0){ - $strSQL = "INSERT INTO `data_persil_jenis`(`nama`,`ndesc`) VALUES('".fixSQL($this->input->post('nama'))."','".fixSQL($this->input->post('ndesc'))."')"; - }else{ - $strSQL = "UPDATE `data_persil_jenis` SET - `nama`='".fixSQL($this->input->post('nama'))."', - `ndesc`='".fixSQL($this->input->post('ndesc'))."' - WHERE id=".$this->input->post('id'); - } - - $data["db"] = $strSQL; - $hasil = $this->db->query($strSQL); - if($hasil){ - $data["transaksi"] = true; - $data["pesan"] = "Data Jenis Persil ".fixSQL($this->input->post('nama'))." telah disimpan/diperbarui"; - $_SESSION["success"] = 1; - $_SESSION["pesan"] = "Data Jenis Persil ".fixSQL($this->input->post('nama'))." telah disimpan/diperbarui"; - }else{ - $data["transaksi"] = false; - $data["pesan"] = "ERROR ".$strSQL; - } - return $data; - } - public function hapus_jenis($id){ - $strSQL = "DELETE FROM `data_persil_jenis` WHERE id=".$id; - $hasil = $this->db->query($strSQL); - if($hasil){ - $_SESSION["success"] = 1; - $_SESSION["pesan"] = "Data Jenis Persil telah dihapus"; - }else{ - $_SESSION["success"] = -1; - } - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/export_model.php b/donjo-app/models/export_model.php deleted file mode 100644 index 821ece840..000000000 --- a/donjo-app/models/export_model.php +++ /dev/null @@ -1,292 +0,0 @@ -\r\n"; - for($i = 0; $i < $num_fields; $i++){ - while($row = mysql_fetch_row($result)){ - - for($j=0; $j<$num_fields; $j++){ - - if (isset($row[$j])) { $return.= $row[$j] ; } else { $return.= ''; } - if ($j<($num_fields-1)) { $return.= '+'; } - } - $return.= "\r\n"; - } - } - $return.="\r\n"; - - $result = mysql_query('SELECT * FROM tweb_keluarga WHERE 1'); - $num_fields = mysql_num_fields($result); - $return.= "\r\n"; - for($i = 0; $i < $num_fields; $i++){ - while($row = mysql_fetch_row($result)){ - - for($j=0; $j<$num_fields; $j++){ - if (isset($row[$j])) { $return.= $row[$j] ; } else { $return.= ''; } - if ($j<($num_fields-1)) { $return.= '+'; } - } - $return.= "\r\n"; - } - } - $return.="\r\n"; - - $result = mysql_query('SELECT * FROM tweb_wil_clusterdesa WHERE 1'); - $num_fields = mysql_num_fields($result); - $return.= "\r\n"; - for($i = 0; $i < $num_fields; $i++){ - while($row = mysql_fetch_row($result)){ - - for($j=0; $j<$num_fields; $j++){ - if (isset($row[$j])) { $return.= $row[$j] ; } else { $return.= ''; } - if ($j<($num_fields-1)) { $return.= '+'; } - } - $return.= "\r\n"; - } - } - $return.=""; - - $result = mysql_query('SELECT * FROM tweb_wil_clusterdesa WHERE 1'); - $num_fields = mysql_num_fields($result); - Header('Content-type: application/octet-stream'); - Header('Content-Disposition: attachment; filename=data_dasar('.date("d-m-Y").').sid'); - echo $return; - } - function export_akp(){ - $return = ""; - $result = mysql_query('SELECT * FROM analisis_keluarga WHERE 1'); - $num_fields = mysql_num_fields($result); - $return.= "\r\n"; - for($i = 0; $i < $num_fields; $i++){ - while($row = mysql_fetch_row($result)){ - - for($j=0; $j<$num_fields; $j++){ - - if (isset($row[$j])) { $return.= $row[$j] ; } else { $return.= ''; } - if ($j<($num_fields-1)) { $return.= '+'; } - } - $return.= "\r\n"; - } - } - $return.="\r\n"; - Header('Content-type: application/octet-stream'); - Header('Content-Disposition: attachment; filename=data_akp('.date("d-m-Y").').sid'); - echo $return; - } - function analisis(){ - - $sql = "DELETE FROM analisis_respon_hasil WHERE id_periode=1"; - $this->db->query($sql); - - $sql = "DELETE FROM analisis_respon WHERE id_periode=1"; - $this->db->query($sql); - - $sql = "SELECT u.id FROM tweb_penduduk u WHERE (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) >= '2' AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) <= '17' ORDER BY id LIMIT 87"; - $query = $this->db->query($sql); - $data=$query->result_array(); - $i=0; - while($idb->query($sql2); - $res=$query2->result_array(); - $j=0; - while($jdb->query($sqlx,$res[$j]['id']); - $jaw=$queryx->result_array(); - - $numbers=rand($jaw[0]['id'],$jaw[$jm]['id']); - - $updx['id_parameter'] = $numbers; - $updx['id_periode'] = 1; - $outp = $this->db->insert('analisis_respon',$updx); - $j++; - } - - - - - - - $upx['id_master'] =1; - - $upx['id_subjek'] = $data[$i]['id']; - $upx['id_periode'] = 1; - $outp = $this->db->insert('analisis_respon_hasil',$upx); - $i++; - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - - } - function analisis2(){ - - $sql = "DELETE FROM analisis_respon_hasil WHERE id_periode=2"; - $this->db->query($sql); - - $sql = "DELETE FROM analisis_respon WHERE id_periode=2"; - $this->db->query($sql); - - $sql = "SELECT u.id FROM tweb_penduduk u WHERE (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) >= '21' ORDER BY id limit 75"; - $query = $this->db->query($sql); - $data=$query->result_array(); - $i=0; - while($idb->query($sql2); - $res=$query2->result_array(); - $j=0; - while($jdb->query($sqlx,$res[$j]['id']); - $jaw=$queryx->result_array(); - - $numbers=rand($jaw[0]['id'],$jaw[$jm]['id']); - - $updx['id_parameter'] = $numbers; - $updx['id_periode'] = 2; - $outp = $this->db->insert('analisis_respon',$updx); - $j++; - } - - - - - - - $upx['id_master'] =2; - - $upx['id_subjek'] = $data[$i]['id']; - $upx['id_periode'] = 2; - $outp = $this->db->insert('analisis_respon_hasil',$upx); - $i++; - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - - } - function lombok(){ - $sql = "SELECT * FROM sheet1 WHERE 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - $i=0; - while($idb->insert('analisis_indikator',$upx); - - $sql2 = "SELECT id FROM analisis_indikator ORDER BY id DESC LIMIT 1"; - $query2 = $this->db->query($sql2); - $res=$query2->row_array(); - - $updx['id_indikator'] = $res['id']; - - $updx['nilai'] = 1; - $updx['jawaban'] = $data[$i]['C']; - $outp = $this->db->insert('analisis_parameter',$updx); - $updx['nilai'] = 2; - $updx['jawaban'] = $data[$i]['D']; - $outp = $this->db->insert('analisis_parameter',$updx); - $updx['nilai'] = 3; - $updx['jawaban'] = $data[$i]['E']; - $outp = $this->db->insert('analisis_parameter',$updx); - $updx['nilai'] = 4; - $updx['jawaban'] = $data[$i]['F']; - $outp = $this->db->insert('analisis_parameter',$updx); - $updx['nilai'] = 5; - $updx['jawaban'] = $data[$i]['G']; - $outp = $this->db->insert('analisis_parameter',$updx); - - - $i++; - } - - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - - } - function backup(){ - $this->load->dbutil(); - $prefs = array( - 'format' => 'sql', - ); - $backup =& $this->dbutil->backup($prefs); - $db_name = 'backup-on-'. date("Y-m-d-H-i-s") .'.sql'; - $save = base_url().$db_name; - $this->load->helper('file'); - write_file($save, $backup); - $backup .= "i'); #END;"; - $b1=Parse_Data($backup,"# TABLE STRUCTURE FOR: analisis_indikator","# TABLE STRUCTURE FOR: data_surat"); - - $b2=Parse_Data($backup,"# TABLE STRUCTURE FOR: detail_log_penduduk","#END;"); - $backup = $b1.$b2; - $this->load->helper('download'); - force_download($db_name, $backup); - if($backup) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function restore(){ - $sql = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA='sid'"; - $query = $this->db->query($sql); - $data=$query->result_array(); - - foreach($data AS $dat){ - $tbl = $dat["TABLE_NAME"]; - - } - - $data = ""; - $in = ""; - $outp = ""; - $filename = $_FILES['userfile']['tmp_name']; - if ($filename!=''){ - $lines = file($filename); - $query = ""; - foreach($lines as $sql_line){ - if(trim($sql_line) != "" && strpos($sql_line, "--") === false){ - $query = $sql_line; - if (substr(rtrim($query), -1) == ';'){ - - $result = $this->db->query($query); - - } - } - } - - - - } - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function export_excel(){ - $sql = "SELECT u.*,a.dusun,a.rw,a.rt,d.no_kk AS no_kk FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa a ON u.id_cluster = a.id LEFT JOIN tweb_keluarga d ON u.id_kk = d.id WHERE 1 "; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - return $data; - } -} \ No newline at end of file diff --git a/donjo-app/models/feed_model.php b/donjo-app/models/feed_model.php deleted file mode 100644 index 08bfa2cd0..000000000 --- a/donjo-app/models/feed_model.php +++ /dev/null @@ -1,41 +0,0 @@ -load->database(); - } - public function list_feeds() - { - $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori - FROM artikel a LEFT JOIN user u ON a.id_user = u.id - LEFT JOIN kategori k ON a.id_kategori = k.id - WHERE (a.enabled=1) AND (a.judul <> '') ORDER BY a.id DESC LIMIT 0,20"; - $query = $this->db->query($sql); - $data = $query->result_array(); - $hasil = array(); - $i=0; - if($query->num_rows()>0) - { - while($i 300) - { - $hasil[$i]['isi'] = substr($str_isi,0,strpos($str_isi," ",260))."..."; - }else{ - $hasil[$i]['isi'] = $str_isi; - } - - $hasil[$i]['author'] = $data[$i]['owner']; - $hasil[$i]['kategori'] = $data[$i]['kategori']; - $i++; - } - }else{ - $hasil = false; - } - return $hasil; - } -} \ No newline at end of file diff --git a/donjo-app/models/first_artikel_m.php b/donjo-app/models/first_artikel_m.php deleted file mode 100644 index a27e0dcd1..000000000 --- a/donjo-app/models/first_artikel_m.php +++ /dev/null @@ -1,286 +0,0 @@ -db->query($sql); - $data = $query->row_array(); - if(empty($data)) - $data = null; - else{ - $id = $data['id']; - } - return $data; - } - function get_teks_berjalan(){ - $sql = "SELECT a.isi FROM artikel a LEFT JOIN kategori k ON a.id_kategori = k.id WHERE k.kategori = 'teks_berjalan' AND k.enabled = 1"; - $query = $this->db->query($sql); - $data = $query->result_array(); - return $data; - } - function get_widget(){ - $sql = "SELECT * FROM widget LIMIT 1 "; - $query = $this->db->query($sql); - $data = $query->result_array(); - return $data; - } - function paging($p=1){ - $sql = "SELECT COUNT(a.id) AS id FROM artikel a - LEFT JOIN kategori k ON a.id_kategori = k.id - WHERE ((a.enabled=1) AND (headline <> 1) AND (k.tipe = 1)) AND k.kategori <> 'teks_berjalan' - ORDER BY a.tgl_upload DESC"; - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = 5; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function paging_kat($p=1,$id=0){ - $sql = "SELECT COUNT(a.id) AS id FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE 1 "; - if($id!=0) - $sql .= "AND ((id_kategori = ".$id.") OR (parrent = ".$id."))"; - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = 8; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function artikel_show($id='0',$offset,$limit){ - if($id > 0){ - $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a - LEFT JOIN user u ON a.id_user = u.id - LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=1 AND headline <> 1 AND k.tipe = 1 AND k.kategori <> 'teks_berjalan' AND a.id=".$id; - }else{ - $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a - LEFT JOIN user u ON a.id_user = u.id - LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=1 AND headline <> 1 AND k.tipe = 1 AND k.kategori <> 'teks_berjalan' - ORDER BY a.tgl_upload DESC LIMIT ".$offset.", ".$limit; - } - - $query = $this->db->query($sql); - if($query->num_rows()>0){ - $data = $query->result_array(); - - $i=0; - while($i120)? substr($teks,0,120):$teks; - $data[$i]['isi_short'] = $pendek; - $panjang = (strlen($teks)>300)? substr($teks,0,300):$teks; - $data[$i]['isi'] = ""; - $i++; - } - }else{ - $data = false; - } - return $data; - } - function arsip_show(){ - $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=? ORDER BY a.tgl_upload DESC LIMIT 7 "; - $query = $this->db->query($sql,1); - $data = $query->result_array(); - - $i=0; - while($ibaca selengkapnya"; - $i++; - } - return $data; - } - function paging_arsip($p=1){ - $sql = "SELECT COUNT(a.id) AS id FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=1"; - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = 20; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function full_arsip($offset=0,$limit=50){ - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=? ORDER BY a.tgl_upload DESC"; - - $sql .= $paging_sql; - - $query = $this->db->query($sql,1); - $data = $query->result_array(); - if($query->num_rows()>0){ - $i=0; - while($i".$data[$i]['judul'].", ".$data[$i]['owner']; - $i++; - } - }else{ - $data = false; - } - - return $data; - } - function slide_show(){ - $sql = "SELECT gambar FROM artikel WHERE enabled=1 - UNION SELECT gambar1 FROM artikel WHERE enabled=1 - UNION SELECT gambar2 FROM artikel WHERE enabled=1 - UNION SELECT gambar3 FROM artikel WHERE enabled=1 - ORDER BY RAND() LIMIT 10 "; - $query = $this->db->query($sql); - if($query->num_rows()>0){ - $data = $query->result_array(); - }else{ - $data = false; - } - return $data; - } - function cos_widget(){ - $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE id_kategori='1003' ORDER BY a.tgl_upload DESC"; - $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori - FROM artikel a - LEFT JOIN user u ON a.id_user = u.id - LEFT JOIN kategori k ON a.id_kategori = k.id - WHERE a.id_kategori='1003' AND a.enabled=1 - ORDER BY a.tgl_upload DESC"; - $query = $this->db->query($sql); - if($query->num_rows()>0){ - $data = $query->result_array(); - }else{ - $data = false; - } - return $data; - } - function agenda_show(){ - $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE id_kategori='4' ORDER BY a.tgl_upload DESC"; - $query = $this->db->query($sql); - $data = $query->result_array(); - return $data; - } - function komentar_show(){ - $sql = "SELECT * FROM komentar WHERE enabled=? AND id_artikel <> 775 order by tgl_upload desc limit 10"; - $query = $this->db->query($sql,1); - $data = $query->result_array(); - - $i=0; - while($ibaca selengkapnya"; - $i++; - } - return $data; - } - function get_kategori($id=0){ - $sql = "SELECT a.kategori FROM kategori a WHERE a.id=?"; - $query = $this->db->query($sql,$id); - if($query->num_rows()>0){ - $data = $query->row_array(); - }else{ - $data = false; - } - return $data; - } - function get_artikel($id=0){ - $sql = "SELECT a.*,u.nama AS owner FROM artikel a LEFT JOIN user u ON a.id_user = u.id WHERE a.id=?"; - $query = $this->db->query($sql,$id); - if($query->num_rows()>0){ - $data = $query->row_array(); - }else{ - $data = false; - } - return $data; - } - function list_artikel($offset=0,$limit=50,$id=0){ - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=1 "; - if($id!=0) - $sql .= "AND id_kategori = $id OR parrent = $id"; - $sql .= " ORDER BY a.tgl_upload DESC "; - $sql .= $paging_sql; - $query = $this->db->query($sql); - if($query->num_rows()>0){ - $data = $query->result_array(); - }else{ - $data = false; - } - return $data; - } - function insert_comment($id=0){ - $data['komentar'] = strip_tags($_POST["komentar"]); - $data['owner'] = strip_tags($_POST["owner"]); - $data['email'] = strip_tags($_POST["email"]); - - $data['enabled'] = 2; - $data['id_artikel'] = $id; - $outp = $this->db->insert('komentar',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_komentar($id=0){ - $sql = "SELECT * FROM komentar WHERE id_artikel = ? ORDER BY tgl_upload DESC"; - $query = $this->db->query($sql,$id); - if($query->num_rows()>0){ - $data = $query->result_array(); - - $i=0; - while($idb->query($sql); - if($query->num_rows()>0){ - $data = $query->result_array(); - }else{ - $data = false; - } - return $data; - } -} \ No newline at end of file diff --git a/donjo-app/models/first_gallery_m.php b/donjo-app/models/first_gallery_m.php deleted file mode 100644 index 6c50a5aab..000000000 --- a/donjo-app/models/first_gallery_m.php +++ /dev/null @@ -1,67 +0,0 @@ -db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = 8; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function gallery_show($offset=0,$limit=50){ - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT * FROM gambar_gallery WHERE enabled=1 AND tipe='0' "; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data = $query->result_array(); - return $data; - } - function paging2($gal=0,$p=1){ - $sql = "SELECT COUNT(id) AS id FROM gambar_gallery WHERE enabled=1 AND parrent=?"; - $query = $this->db->query($sql,$gal); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = 8; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function sub_gallery_show($gal=0,$offset=0,$limit=50){ - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT * FROM gambar_gallery WHERE ((enabled='1') AND ((parrent='".$gal."') OR (id='".$gal."'))) "; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data = $query->result_array(); - return $data; - } - function get_parrent($parrent){ - $sql = "SELECT * FROM gambar_gallery WHERE id='$parrent'"; - $query = $this->db->query($sql); - $data = $query->row_array(); - return $data; - } - function gallery_widget(){ - - $sql = "SELECT * FROM gambar_gallery WHERE enabled='1' ORDER BY RAND() LIMIT 4"; - $query = $this->db->query($sql); - $data = $query->result_array(); - return $data; - } -} \ No newline at end of file diff --git a/donjo-app/models/first_keluarga_m.php b/donjo-app/models/first_keluarga_m.php deleted file mode 100644 index 89a22b390..000000000 --- a/donjo-app/models/first_keluarga_m.php +++ /dev/null @@ -1,43 +0,0 @@ -db->query($sql); - if($query->num_rows()>0){ - $hasil = $sql; - $hasil = $query->result_array(); - }else{ - $hasil = false; - } - return $hasil; - } -} \ No newline at end of file diff --git a/donjo-app/models/first_m.php b/donjo-app/models/first_m.php deleted file mode 100644 index fd1b92249..000000000 --- a/donjo-app/models/first_m.php +++ /dev/null @@ -1,86 +0,0 @@ -db->query($sql); - return $query->row_array(); - } - function siteman(){ - $_SESSION['mandiri']=-1; - $nik = $this->input->post('nik'); - $pin = $this->input->post('pin'); - $hash_pin = hash_pin($pin); - - $sql = "SELECT pin,last_login FROM tweb_penduduk_mandiri WHERE nik=?"; - $query=$this->db->query($sql,array($nik)); - $row=$query->row(); - $lg = $row->last_login; - - if($hash_pin==$row->pin){ - $_SESSION['mandiri'] = 1; - - $sql = "SELECT nama,nik,id FROM tweb_penduduk WHERE nik=?"; - $query=$this->db->query($sql,array($nik)); - $row=$query->row(); - - if($lg == "0000-00-00 00:00:00") - $_SESSION['lg'] = 1; - - $_SESSION['nama'] = $row->nama; - $_SESSION['nik'] = $row->nik; - $_SESSION['id'] = $row->id; - } - - if($_SESSION['mandiri_try'] > 2){ - $_SESSION['mandiri_try'] = $_SESSION['mandiri_try']-1; - }else{ - $_SESSION['mandiri_wait']=1; - } - } - function m_siteman($nik="",$pin=""){ - $hash_pin = hash_pin($pin); - - $sql = "SELECT pin,last_login FROM tweb_penduduk_mandiri WHERE nik=?"; - $query=$this->db->query($sql,array($nik)); - $row=$query->row(); - $lg = $row->last_login; - - if($hash_pin==$row->pin){ - - $sql = "UPDATE tweb_penduduk_mandiri SET last_login=NOW() WHERE nik=?"; - $this->db->query($sql, $nik); - - return $token; - } - - } - function logout(){ - - - if(isset($_SESSION['nik'])){ - $id = $_SESSION['nik']; - $sql = "UPDATE tweb_penduduk_mandiri SET last_login=NOW() WHERE nik=?"; - $this->db->query($sql, $id); - } - - - unset($_SESSION['mandiri']); - unset($_SESSION['id']); - unset($_SESSION['nik']); - unset($_SESSION['nama']); - } - function ganti(){ - if($_POST['pin1'] == $_POST['pin2']){ - - $hash_pin = hash_pin($_POST['pin1']); - - $data['pin'] = $hash_pin; - $this->db->where('nik',$_SESSION['nik']); - $outp = $this->db->update('tweb_penduduk_mandiri',$data); - } - $_SESSION['lg'] = 2; - } -} \ No newline at end of file diff --git a/donjo-app/models/first_menu_m.php b/donjo-app/models/first_menu_m.php deleted file mode 100644 index 3177d5ee2..000000000 --- a/donjo-app/models/first_menu_m.php +++ /dev/null @@ -1,77 +0,0 @@ -db->query($sql); - $data=$query->result_array(); - $url = site_url()."first/"; - $i=0; - while($i".$data[$i]['nama'].""; - - - - $sql2 = "SELECT s.* FROM menu s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; - $query = $this->db->query($sql2,$data[$i]['id']); - $data2=$query->result_array(); - - if($data2){ - $data[$i]['menu'] = $data[$i]['menu'].""; - } - $data[$i]['menu'] = $data[$i]['menu'].""; - $i++; - } - return $data; - } - function list_menu_kiri(){ - $sql = "SELECT m.*,m.kategori AS nama FROM kategori m WHERE m.parrent =0 AND m.enabled = 1 AND m.kategori <> 'teks_berjalan' ORDER BY id"; - - $query = $this->db->query($sql); - $data=$query->result_array(); - $url = site_url()."first/kategori/"; - $i=0; - - while($i".$data[$i]['nama'].""; - - $sql2 = "SELECT s.*,s.kategori AS nama FROM kategori s WHERE s.parrent = ? AND s.enabled = 1"; - $query = $this->db->query($sql2,$data[$i]['id']); - $data2=$query->result_array(); - - if($data2){ - $data[$i]['menu'] = $data[$i]['menu'].""; - } - $data[$i]['menu'] = $data[$i]['menu'].""; - $i++; - } - return $data; - } -} \ No newline at end of file diff --git a/donjo-app/models/first_penduduk_m.php b/donjo-app/models/first_penduduk_m.php deleted file mode 100644 index d1bbc0002..000000000 --- a/donjo-app/models/first_penduduk_m.php +++ /dev/null @@ -1,222 +0,0 @@ -= u.dari AND DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 <= u.sampai) AS jumlah, - (SELECT COUNT(id) FROM tweb_penduduk WHERE DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 >= u.dari AND DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 <= u.sampai AND sex=1) AS laki, - (SELECT COUNT(id) FROM tweb_penduduk WHERE DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 >= u.dari AND DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 <= u.sampai AND sex=2) AS perempuan - FROM tweb_penduduk_umur u WHERE status = 1 ORDER BY u.id "; break; - - case 13: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE warganegara_id = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE warganegara_id = u.id AND sex = 1) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE warganegara_id = u.id AND sex = 2) AS perempuan FROM tweb_penduduk_warganegara u WHERE 1 ORDER BY jumlah DESC"; break; - - case 14: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_kawin = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_kawin = u.id AND sex = 1) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_kawin = u.id AND sex = 2) AS perempuan FROM tweb_penduduk_kawin u WHERE 1 ORDER BY jumlah DESC"; break; - - - case 21: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE kelas_sosial = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_kelas_sosial u WHERE 1 ORDER BY jumlah DESC"; break; - - case 22: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE raskin = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_raskin u WHERE 1 ORDER BY jumlah DESC"; break; - - default:$sql = "SELECT u.* FROM tweb_penduduk_pendidikan u WHERE 1 "; - } - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - if($lap<=20){ - $sql3 = "SELECT (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.status_dasar=1) AS jumlah, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.sex = 1 and status_dasar=1) AS laki, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.sex = 2 and status_dasar=1) AS perempuan"; - }else{ - $sql3 = "SELECT (SELECT COUNT(p.id) FROM tweb_keluarga p WHERE 1) AS jumlah, - (SELECT COUNT(p.id) FROM tweb_keluarga p WHERE 1) AS laki, - (SELECT COUNT(p.id) FROM tweb_keluarga p WHERE 1) AS perempuan"; - } - - $query3 = $this->db->query($sql3); - $bel = $query3->row_array(); - - $total['jumlah']=0; - $bel['no']=""; - $bel['id']=""; - $bel['nama']="TOTAL"; - $total['laki']=0; - $total['perempuan']=0; - $i=0; - while($i 0){ - while($idb->query($sql); - $data=$query->result_array(); - - - $i=0; - while($idb->query($sql); - return $query->row_array(); - } - - function list_indikator(){ - $sql = "SELECT u.id,u.pertanyaan AS indikator,s.subjek,p.nama AS periode,p.tahun_pelaksanaan AS tahun,m.nama AS master,m.subjek_tipe,p.id AS id_periode FROM analisis_indikator u LEFT JOIN analisis_master m ON u.id_master = m.id LEFT JOIN analisis_ref_subjek s ON m.subjek_tipe = s.id LEFT JOIN analisis_periode p ON p.id_master = m.id AND p.aktif = 1 WHERE u.is_publik = 1 ORDER BY u.nomor ASC"; - $query = $this->db->query($sql); - $data= $query->result_array(); - - $i=0; - while($idb->query($sql,$id); - $data= $query->row_array(); - return $data['pertanyaan']; - } - function list_jawab($id=0,$sb=0,$per=0){ - switch($sb){ - case 1: $sbj = "LEFT JOIN tweb_penduduk p ON r.id_subjek = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; - case 2: $sbj = "LEFT JOIN tweb_keluarga v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id " ; break; - case 3: $sbj = "LEFT JOIN tweb_rtm v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; - case 4: $sbj = "LEFT JOIN kelompok v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; - } - - $sql = "SELECT * FROM analisis_parameter WHERE id_indikator = ? ORDER BY kode_jawaban ASC "; - $query = $this->db->query($sql,$id); - $data= $query->result_array(); - - $i=0; - while($idb->query($sql,$data[$i]['id']); - $respon= $query->row_array(); - - $data[$i]['nilai']=$respon['jml']; - - $i++; - } - return $data; - } - -} \ No newline at end of file diff --git a/donjo-app/models/first_slide_m.php b/donjo-app/models/first_slide_m.php deleted file mode 100644 index d1b916779..000000000 --- a/donjo-app/models/first_slide_m.php +++ /dev/null @@ -1,12 +0,0 @@ -db->query($sql,1); - $data = $query->result_array(); - return $data; - } -} \ No newline at end of file diff --git a/donjo-app/models/header_model.php b/donjo-app/models/header_model.php deleted file mode 100644 index c0f24e5ef..000000000 --- a/donjo-app/models/header_model.php +++ /dev/null @@ -1,82 +0,0 @@ -db->query($sql,$user); - $data = $query->row_array(); - return $data['id']; - } - function get_data(){ - /* - * global variabel - * */ - $outp["sasaran"] = array("1"=>"Penduduk","2"=>"Keluarga / KK","3"=>"Rumah Tangga","4"=>"Kelompok/Organisasi Kemasyarakatan"); - - /* - * Pembenahan per 13 Juli 15, sebelumnya ada notifikasi Error, saat $_SESSOIN['user'] nya kosong! - * */ - $id = @$_SESSION['user']; - $sql = "SELECT nama,foto FROM user WHERE id=?"; - $query = $this->db->query($sql, $id); - if($query){ - if($query->num_rows()>0){ - $data = $query->row_array(); - $outp['nama'] = $data['nama']; - $outp['foto'] = $data['foto']; - } - } - - $sql = "SELECT * FROM config WHERE 1"; - $query = $this->db->query($sql); - $outp['desa'] = $query->row_array(); - - - $sql = "SELECT COUNT(id) AS jml FROM komentar WHERE id_artikel=775 AND enabled = 2;"; - $query = $this->db->query($sql); - $lap = $query->row_array(); - $outp['lapor'] = $lap['jml']; - - $sql = "SELECT * FROM setting_modul WHERE aktif = 1 AND level >= ?;"; - $query = $this->db->query($sql,$_SESSION['grup']); - $modul = $query->result_array(); - $outp['modul'] = $modul; - - return $outp; - } - - function get_config(){ - $sql = "SELECT * FROM config WHERE 1"; - $query = $this->db->query($sql); - $outp['desa'] = $query->row_array(); - return $outp; - } - - function init_penduduk(){ - $i=1; - - $sql = "SELECT COUNT(id) AS jml FROM tweb_penduduk WHERE 1"; - $query = $this->db->query($sql); - $data = $query->row_array(); - $i = $i*$data['jml']; - - $sql = "SELECT COUNT(id) AS jml FROM tweb_keluarga WHERE 1"; - $query = $this->db->query($sql); - $data = $query->row_array(); - //$i = $i*$data['jml']; - - $sql = "SELECT COUNT(id) AS jml FROM tweb_wil_clusterdesa WHERE 1"; - $query = $this->db->query($sql); - $data = $query->row_array(); - //$i = $i*$data['jml']; - - if($i > 0) - return 1; - else - return 0; - } -} diff --git a/donjo-app/models/import_model.php b/donjo-app/models/import_model.php deleted file mode 100644 index c324791e7..000000000 --- a/donjo-app/models/import_model.php +++ /dev/null @@ -1,745 +0,0 @@ -load->helper('excel'); - } - function import_siak(){ - - $_SESSION['success']=-1; - $vdir_upload = "surat/arsip/"; - $vfile_upload_dk = $vdir_upload.$_FILES["file_dk"]["name"]; - move_uploaded_file($_FILES["file_dk"]["tmp_name"], $vfile_upload_dk); - - $vfile_upload_bw = $vdir_upload.$_FILES["file_bw"]["name"]; - move_uploaded_file($_FILES["file_bw"]["tmp_name"], $vfile_upload_bw); - - if(is_file($vfile_upload_dk)){ - - if(is_file($vfile_upload_dk)){ - $data = file_get_contents($vfile_upload_dk); - $convert = explode("\n", $data); - $strSQL = "TRUNCATE tweb_keluarga"; - $this->db->query($strSQL); - $strSQL = "TRUNCATE tweb_penduduk"; - $this->db->query($strSQL); - $strSQL = "TRUNCATE tweb_wil_clusterdesa"; - $this->db->query($strSQL); - - $kk = array(); - $j=0; - $x=""; - - $dusun = 0; - $rw = 0; - $rt = 0; - $nKK = 0; - - $strSQLKK = ""; - - for ($i=0;$i0){ - if(strlen($convert[$i])>10){ - $strDusun = str_replace(" "," ",trim($item[5])); - //$strDusun = str_replace(" ","_",$strDusun); - - $strRT = trim($item[3]); - - $strSQL = "SELECT id FROM tweb_wil_clusterdesa WHERE dusun='".fixSQL($strDusun)."' AND rw='0' AND rt='0' "; - $result = $this->db->query($strSQL); - if($result->num_rows() > 0){ - - }else{ - - $strSQL="INSERT INTO tweb_wil_clusterdesa(rt,rw,dusun) VALUES('0','0','".fixSQL($strDusun)."')"; - if($this->db->query($strSQL)){ - $dusun++; - } - } - - $strSQL = "SELECT id FROM tweb_wil_clusterdesa WHERE dusun='".fixSQL($strDusun)."' AND rw='-' AND rt='0'"; - $result = $this->db->query($strSQL); - if($result->num_rows() > 0){ - }else{ - $strSQL="INSERT INTO tweb_wil_clusterdesa(rt,rw,dusun) VALUES('0','-','".fixSQL($strDusun)."')"; - if($this->db->query($strSQL)){ - $rw++; - } - } - - $strSQL = "SELECT id FROM tweb_wil_clusterdesa WHERE dusun='".fixSQL($strDusun)."' AND rw='-' AND rt='".fixSQL($strRT)."' LIMIT 1"; - $result = $this->db->query($strSQL); - if($result->num_rows() > 0){ - $rs =$result->row(0); - $id_wil = $rs->id; - }else{ - - $strSQL = "INSERT INTO tweb_wil_clusterdesa(rt,rw,dusun) VALUES('".fixSQL($strRT)."','-','".fixSQL($strDusun)."')"; - $result = $this->db->query($strSQL); - if($result){ - $strSQL = "SELECT id FROM tweb_wil_clusterdesa WHERE dusun='".fixSQL($strDusun)."' AND rw='-' AND rt='".fixSQL($strRT)."' LIMIT 1"; - $result = $this->db->query($strSQL); - if($result->num_rows() > 0){ - $rs =$result->row(0); - $id_wil = $rs->id; - } - } - $rt++; - } - - if($id_wil > 0){ - $post_data = array('tgl_daftar'=>"".date("Y-m-d")."",'no_kk'=>"".fixSQL($item[0])."",'nik_kepala'=>"".fixSQL($item[23]).""); - $this->db->trans_start(); - if($this->db->insert('tweb_keluarga',$post_data)){ - $this->db->trans_complete(); - $nKK++; - $strSQL = "SELECT id FROM tweb_keluarga WHERE ((no_kk='".fixSQL($item[0])."') AND (nik_kepala='".fixSQL($item[23])."')) LIMIT 1"; - $result = $this->db->query($strSQL); - if($result->num_rows() > 0){ - $rs =$result->row(0); - $id_kk = $rs->id; - } - } - $kk[$item[0]] = array($id_kk,"".$id_wil."","".$item[2].""); - } - - } - } - if(trim(strtolower($convert[$i]))=="begindata"){ - $j++; - } - if($j>0){ - $j++; - } - - } - - $strInfo = " -
-
-
Dusun
".$dusun."
-
RW
".$rw."
-
RT
".$rt."
-
Data KK
".$nKK."
-
-
- "; - - } - } - - if(is_file($vfile_upload_bw)){ - - if(is_file($vfile_upload_bw)){ - $data = file_get_contents($vfile_upload_bw); - $convert1 = explode("\n", $data); - - $j=0; - $strSQL = "INSERT INTO tweb_penduduk (`nama`, `nik`, `id_kk`, `kk_level`, `id_rtm`, `rtm_level`, "; - $strSQL .= "`sex`, `tempatlahir`, `tanggallahir`, "; - $strSQL .= "`agama_id`, `pendidikan_kk_id`, `pendidikan_id`, "; - $strSQL .= "`pendidikan_sedang_id`, `pekerjaan_id`, `status_kawin`, "; - $strSQL .= "`warganegara_id`, `dokumen_pasport`, `dokumen_kitas`, "; - $strSQL .= "`ayah_nik`, `ibu_nik`, `nama_ayah`, `nama_ibu`, "; - $strSQL .= "`foto`, `golongan_darah_id`, `id_cluster`, `status`, "; - $strSQL .= "`alamat_sebelumnya`, `alamat_sekarang`, `status_dasar`,"; - $strSQL .= "`hamil`, `cacat_id`, `sakit_menahun_id`, `jamkesmas`, "; - $strSQL .= "`akta_lahir`, `akta_perkawinan`, `tanggalperkawinan`, "; - $strSQL .= "`akta_perceraian`, `tanggalperceraian`) VALUES\n"; - for ($i=0;$i0){ - if(strlen($convert1[$i])>25){ - $item = explode(";",trim(str_replace("\"","",$convert1[$i]))); - - - if($j>0){ - if($item[20]==1){ - if(array_key_exists($item[36],$kk)){ - $strSQLX = "UPDATE tweb_keluarga SET nik_kepala='".fixSQL($item[0])."' WHERE no_kk='".$item[36]."'"; - $this->db->query($strSQLX); - } - } - if(array_key_exists($item[36],$kk)){ - $id_kk = $kk[$item[36]][0]; - $id_cluster = $kk[$item[36]][1]; - $alamat = $kk[$item[36]][2]; - }else{ - $id_kk = 0; - $id_cluster = 0; - $alamat = ""; - } - $strSQL .= "('".fixSQL($item[5])."','".fixSQL($item[0])."','".fixSQL($id_kk)."','".fixSQL($item[20])."',"; - $strSQL .= "'-','-',"; - $strSQL .= "'".fixSQL($item[6])."','".fixSQL($item[7])."','".fixSQL(date("Y-m-d",strtotime($item[8])))."',"; - $strSQL .= "'".fixSQL($item[12])."','".fixSQL($item[23])."','".fixSQL($item[23])."',"; - $strSQL .= "'".fixSQL($item[23])."','".fixSQL($item[24])."','".fixSQL($item[13])."',"; - $strSQL .= "'1','".fixSQL($item[3])."','-',"; - $strSQL .= "'-','-','".fixSQL($item[28])."','".fixSQL($item[26])."',"; - $strSQL .= "'','".fixSQL($item[11])."','".fixSQL($id_cluster)."',1,"; - $strSQL .= "'','".fixSQL($alamat)."',1, - '0','".fixSQL($item[21])."','".fixSQL($item[22])."','', - '".fixSQL($item[9])."','".fixSQL($item[14])."','".fixSQL($item[16])."', - '".fixSQL($item[17])."','".fixSQL($item[19])."'),"; - } - } - } - - if(trim(strtolower($convert1[$i]))=="begindata"){ - $j++; - } - if($j>0){ - $j++; - } - } - $strSQL = rtrim($strSQL,","); - if($this->db->query($strSQL)){ - $strSQL = "UPDATE `tweb_keluarga` k SET k.nik_kepala = ( SELECT p.id FROM tweb_penduduk p WHERE p.id_kk = k.id AND p.kk_level =1 ) WHERE k.id >0"; - if($this->db->query($strSQL)){ - $_SESSION['success']=1; - } - } - } - } - } - - function import_excel(){ - - //if($_FILES['userfile']['type'] == "application/vnd.ms-excel"){ - $gagal=0; - $baris2=""; - $a="DROP TABLE IF EXISTS impor"; - $this->db->query($a); - $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']); - - $baris = $data->rowcount($sheet_index=0); - - $a="CREATE TABLE IF NOT EXISTS impor ( - dusun varchar(50) NOT NULL DEFAULT 0, - rw varchar(10) NOT NULL DEFAULT 0, - rt varchar(10) NOT NULL DEFAULT 0, - nama varchar(50) NOT NULL, - nik varchar(16) NOT NULL, - sex tinyint(1) unsigned DEFAULT NULL, - tempatlahir varchar(50) NOT NULL, - tanggallahir date NOT NULL, - agama_id int(1) unsigned NOT NULL, - pendidikan_kk_id int(1) unsigned NOT NULL, - pendidikan_id int(1) unsigned NOT NULL, - pendidikan_sedang_id int(1) unsigned NOT NULL, - pekerjaan_id int(1) unsigned NOT NULL, - status_kawin tinyint(1) unsigned NOT NULL, - kk_level tinyint(1) NOT NULL DEFAULT 0, - warganegara_id int(1) unsigned NOT NULL, - nama_ayah varchar(50) NOT NULL, - nama_ibu varchar(50) NOT NULL, - golongan_darah_id int(1) NOT NULL, - jamkesmas int(1) NOT NULL DEFAULT 2, - id_kk varchar(16) NOT NULL DEFAULT '0') ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;"; - $this->db->query($a); - $a="TRUNCATE tweb_wil_clusterdesa"; - $this->db->query($a); - $a="TRUNCATE tweb_keluarga"; - $this->db->query($a); - $a="TRUNCATE tweb_penduduk"; - $this->db->query($a); - - $baris2 =""; - $j=0; - for ($i=2; $i<=$baris; $i++){ - $dusun = $data->val($i, 1); - $rw = $data->val($i, 2); - $rt = $data->val($i, 3); - - $nama = $data->val($i, 4); - if($nama!=""){ - $nama = '"'.$nama.'"'; - } - - $id_kk= $data->val($i, 5); - $nik = $data->val($i, 6); - $sex = $data->val($i, 7); - $tempatlahir= $data->val($i, 8); - if($tempatlahir!=""){ - $tempatlahir = '"'.$tempatlahir.'"'; - }else{ - $tempatlahir = '"-"'; - } - $tanggallahir= $data->val($i, 9); - - if(strlen($tanggallahir)>0){ - $tanggallahir = date("Y-m-d",strtotime($tanggallahir)); - }else{ - $tanggallahir = date("Y-m-d"); - } - - if($tanggallahir[2] == "/" OR $tanggallahir[4] == "/"){ - $tanggallahir = str_replace('/','-', $tanggallahir); - } - - $dusun = str_replace('_',' ', $dusun); - $dusun = strtoupper($dusun); - $dusun = str_replace('DUSUN ','', $dusun); - $dusun = str_replace('dusun ','', $dusun); - $dusun = str_replace('Dusun ','', $dusun); - $dusun = str_replace('DUSUN','', $dusun); - $dusun = str_replace('dusun','', $dusun); - $dusun = str_replace('Dusun','', $dusun); - if($tanggallahir[2] == "-"){ - $tanggallahir = rev_tgl($tanggallahir); - } - - $agama_id= $data->val($i, 10); - $pendidikan_kk_id= $data->val($i, 11); - $pendidikan_sedang_id= $data->val($i, 12); - if($pendidikan_sedang_id=="") - $pendidikan_sedang_id=18; - - $pekerjaan_id= $data->val($i, 13); - $status_kawin= $data->val($i, 14); - $kk_level= $data->val($i, 15); - $warganegara_id= 1; - - $nama_ayah= $data->val($i,17); - if($nama_ayah!=""){ - $nama_ayah = '"'.$nama_ayah.'"'; - }else{ - $nama_ayah = '"-"'; - } - $nama_ibu= $data->val($i,18); - if($nama_ibu!=""){ - $nama_ibu = '"'.$nama_ibu.'"'; - }else{ - $nama_ibu = '"-"'; - } - - $golongan_darah_id= $data->val($i, 19); - - - $nik = preg_replace("/[^0-9]+/", "", $nik); - $id_kk = preg_replace("/[^0-9]+/", "", $id_kk); - - - $sql="INSERT INTO impor(dusun,rw,rt,nama,nik,sex,tempatlahir,tanggallahir,agama_id,pendidikan_kk_id, pendidikan_sedang_id,pekerjaan_id,status_kawin,kk_level,warganegara_id,nama_ayah,nama_ibu,golongan_darah_id,id_kk) VALUES ('$dusun','$rw','$rt',$nama,'$nik',$sex,$tempatlahir,'$tanggallahir','$agama_id','$pendidikan_kk_id','$pendidikan_sedang_id','$pekerjaan_id','$status_kawin','$kk_level','$warganegara_id',$nama_ayah,$nama_ibu,'$golongan_darah_id','$id_kk');"; - - - if($nama!="" AND $nik!="" AND $id_kk!="" AND $dusun!=""){ - $h = $this->db->query($sql); - }else{ - $gagal++; - $baris2 .=$i.","; - } - $h = null; - $sukses = $baris - $gagal - 1; - } - if($gagal==0) - $baris2 ="tidak ada data yang gagal di import."; - - - $query="INSERT INTO tweb_wil_clusterdesa(rt,rw,dusun) select * from ( - SELECT rt, rw, dusun from impor GROUP BY rw,rt,dusun - union SELECT '0' as rt, '0' as rw, dusun from impor GROUP BY dusun - union SELECT '0' as rt, '-' as rw, dusun from impor GROUP BY dusun - union SELECT '-' as rt, '-' as rw, dusun from impor GROUP BY dusun - union SELECT '-' as rt, rw as rw, dusun from impor GROUP BY rw,dusun - union SELECT '0' as rt, rw as rw, dusun from impor GROUP BY rw,dusun - ORDER BY rw,rt,dusun ASC) as temp"; - $hasil = $this->db->query($query); - - $query="INSERT INTO tweb_keluarga(no_kk) SELECT DISTINCT(id_kk) AS no_kk FROM impor"; - $hasil = $this->db->query($query); - - $query="INSERT INTO tweb_penduduk(nama,nik,id_kk,kk_level,sex,tempatlahir,tanggallahir,agama_id,pendidikan_kk_id,pendidikan_sedang_id,pekerjaan_id,status_kawin,warganegara_id,nama_ayah,nama_ibu,golongan_darah_id,id_cluster,status) SELECT nama,nik,(SELECT id FROM tweb_keluarga WHERE no_kk=a.id_kk) as id_kk,kk_level,sex,tempatlahir,tanggallahir,agama_id,pendidikan_kk_id,pendidikan_sedang_id,pekerjaan_id,status_kawin,warganegara_id,nama_ayah,nama_ibu,golongan_darah_id,(SELECT id FROM tweb_wil_clusterdesa where dusun=a.dusun AND rw=a.rw AND rt=a.rt) as id_cluster,'1' as status from impor a;"; - $hasil = $this->db->query($query); - - $sql="SELECT id FROM tweb_keluarga"; - if ($a=$this->db->query($sql)){ - $hsl = $a->result_array(); - foreach($hsl AS $hsl2){ - $idnya=($hsl2['id']); - $kirim = "UPDATE tweb_keluarga SET nik_kepala=(SELECT id FROM tweb_penduduk where kk_level='1' AND id_kk=$idnya LIMIT 1) WHERE id=$idnya"; - $query=$this->db->query($kirim); - } - } - $a="DROP TABLE impor"; - $this->db->query($a); - $a="DELETE FROM tweb_wil_clusterdesa WHERE dusun = '' OR rt = '' OR rw='';"; - $this->db->query($a); - $a="DELETE FROM tweb_keluarga WHERE nik_kepala = '' OR nik_kepala is null;"; - $this->db->query($a); - $a="DELETE FROM tweb_penduduk WHERE nama = '' AND nik = '';"; - $this->db->query($a); - $a="ALTER TABLE tweb_penduduk ENGINE = InnoDB ROW_FORMAT = DYNAMIC;"; - - $a="ALTER TABLE tweb_keluarga ENGINE = InnoDB ROW_FORMAT = DYNAMIC;"; - - - $_SESSION['gagal']=$gagal; - $_SESSION['sukses']=$sukses; - $_SESSION['baris']=$baris2; - - if($gagal==0) $_SESSION['success']=1; - else $_SESSION['success']=-1; - - - //}else{$_SESSION['success']=-1;} - } - function import_dasar(){ - $data = ""; - $in = ""; - $outp = ""; - $filename = $_FILES['userfile']['tmp_name']; - if ($filename!=''){ - $lines = file($filename); - foreach ($lines as $line){$data .= $line;} - $penduduk=Parse_Data($data,"",""); - $keluarga=Parse_Data($data,"",""); - $cluster=Parse_Data($data,"",""); - - $penduduk=explode("\r\n",$penduduk); - $keluarga=explode("\r\n",$keluarga); - $cluster=explode("\r\n",$cluster); - - $inset = "INSERT INTO tweb_penduduk VALUES "; - for($a=1;$a<(count($penduduk)-1);$a++){ - $p = preg_split("/\+/", $penduduk[$a]); - $in .= "("; - for($j=0;$j<(count($p));$j++){ - $in .= ',"'.$p[$j].'"'; - } - $in .= "),"; - } - $x = strlen($in); - $in[$x-1] =";"; - $outp = $this->db->query($inset.$in); - - - $in = ""; - $inset = "INSERT INTO tweb_wil_clusterdesa VALUES "; - for($a=1;$a<(count($cluster)-1);$a++){ - $p = preg_split("/\+/", $cluster[$a]); - $in .= "("; - for($j=0;$j<(count($p));$j++){ - $in .= ',"'.$p[$j].'"'; - } - $in .= "),"; - } - $x = strlen($in); - $in[$x-1] =";"; - $outp = $this->db->query($inset.$in); - - $in = ""; - $inset = "INSERT INTO tweb_keluarga VALUES "; - for($a=1;$a<(count($keluarga)-1);$a++){ - $p = preg_split("/\+/", $keluarga[$a]); - $in .= "("; - for($j=0;$j<(count($p));$j++){ - $in .= ',"'.$p[$j].'"'; - } - $in .= "),"; - } - $x = strlen($in); - $in[$x-1] =";"; - $outp = $this->db->query($inset.$in); - } - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function import_akp(){ - $id_desa = $_SESSION['user']; - $data = ""; - $in = ""; - $outp = ""; - $filename = $_FILES['userfile']['tmp_name']; - if ($filename!=''){ - $lines = file($filename); - foreach ($lines as $line){$data .= $line;} - $penduduk=Parse_Data($data,"",""); - - $penduduk=explode("\r\n",$penduduk); - - $inset = "INSERT INTO analisis_keluarga VALUES "; - for($a=1;$a<(count($penduduk)-1);$a++){ - $p = preg_split("/\+/", $penduduk[$a]); - $in .= "(".$id_desa; - for($j=0;$j<(count($p));$j++){ - $in .= ',"'.$p[$j].'"'; - } - $in .= "),"; - } - $x = strlen($in); - $in[$x-1] =";"; - $outp = $this->db->query($inset.$in); - - } - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - - function ppls_individu(){ - $a="DELETE FROM tweb_penduduk WHERE status = 2;"; - $this->db->query($a); - - $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']); - - $sheet=0; - $baris = $data->rowcount($sheet_index=$sheet); - $kolom = $data->colcount($sheet_index=$sheet); - - for ($i=2; $i<=$baris; $i++){ - - for ($j=1; $j<=$kolom;$j++){ - $rt = ""; - $dusun = ""; - $dusun2 = ""; - $temp = $data->val($i,$j,$sheet); - if($j==11){ - $p = strlen($temp); - if(is_numeric($temp[$p-1])){ - - $rt = $temp[$p-3].$temp[$p-2].$temp[$p-1]; - $dusun = explode(" ",$temp); - $dusun2 = $dusun[0];if($dusun[1]!="RT"){$dusun2 = $dusun2." ".$dusun[1];} - - }else{ - - $rt = $temp[3].$temp[4].$temp[5]; - $dusun = explode(" ",$temp); - $dusun2 = $dusun[2];if(isset($dusun[3])){$dusun2 = $dusun2." ".$dusun[3];} - } - $rt2 = $rt*1; - - }elseif($j==17){ - - $tlahir = $data->val($i,16,$sheet)."-".$data->val($i,17,$sheet)."-1"; - - }else{ - - } - - if($j==1) - $j+=9; - } - $sql = "SELECT id FROM tweb_wil_clusterdesa WHERE rt = ? OR rt = ?"; - $query = $this->db->query($sql,array($rt,$rt2)); - $cluster = $query->row_array(); - if($cluster) - $id_cluster = $cluster['id']; - else - $id_cluster = 0; - $penduduk = ""; - $penduduk['id_cluster'] = $id_cluster; - $penduduk['status'] = 2; - $penduduk['nama'] = $data->val($i,13,$sheet); - $penduduk['nik'] = $data->val($i,12,$sheet); - $penduduk['id_rtm'] = $data->val($i,1,$sheet); - $penduduk['tanggallahir'] = $tlahir; - $penduduk['rtm_level'] = 2; - $penduduk['nik'] = $data->val($i,25,$sheet); - $penduduk['kk_level'] = $data->val($i,14,$sheet); - $penduduk['sex'] = $data->val($i,15,$sheet); - $penduduk['pendidikan_id'] = $data->val($i,22,$sheet); - $penduduk['pendidikan_kk_id'] = $data->val($i,22,$sheet); - - $outp = $this->db->insert('tweb_penduduk',$penduduk); - } - - $a="TRUNCATE tweb_rtm; "; - $this->db->query($a); - - $a="INSERT INTO tweb_rtm (no_kk) SELECT distinct(id_rtm) AS no_kk FROM tweb_penduduk WHERE tweb_penduduk.status=2 AND tweb_penduduk.id_rtm <> 0; "; - $this->db->query($a); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function pbdt_individu(){ - $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']); - - $sheet=0; - $baris = $data->rowcount($sheet_index=$sheet); - $kolom = $data->colcount($sheet_index=$sheet); - - $gg=0; - for ($i=2; $i<=$baris; $i++){ - - //ID RuTa - $id_rtm = $data->val($i,2,$sheet); - - //Level - $rtm_level = $data->val($i,3,$sheet); - if($rtm_level > 1)$rtm_level=2; - - //NIK - $nik = $data->val($i,1,$sheet); - - $sql = "SELECT nama FROM tweb_penduduk WHERE nik = ?"; - $query = $this->db->query($sql,$nik); - $pdd = $query->row_array(); - - $nama = "--> GAGAL"; - if($pdd){ - - $upd['id_rtm'] = $id_rtm; - $upd['rtm_level'] = $rtm_level; - - $this->db->where('nik',$nik); - $outp = $this->db->update('tweb_penduduk',$upd); - $nama = $pdd['nama']; - - echo "".$id_rtm." ".$rtm_level." ".$nik." ".$nama."
"; - }else{ - - $penduduk = ""; - $penduduk['id_cluster'] = 0; - $penduduk['status'] = 2; - $penduduk['nama'] = $data->val($i,8,$sheet); - $penduduk['nik'] = $nik; - $penduduk['id_rtm'] = $id_rtm; - $penduduk['rtm_level'] = $rtm_level; - - $outp = $this->db->insert('tweb_penduduk',$penduduk); - - echo "".$id_rtm." ".$rtm_level." ".$nik." ".$nama."
"; - - $gg++; - } - - - } - - $a="TRUNCATE tweb_rtm; "; - $this->db->query($a); - - $a="INSERT INTO tweb_rtm (id,no_kk,nik_kepala) SELECT distinct(id_rtm) AS no_kk,id_rtm,id FROM tweb_penduduk WHERE tweb_penduduk.id_rtm > 0 AND rtm_level = 1; "; - $outp = $this->db->query($a); - - $_SESSION['ggl'] = $gg; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - - echo "
JUMLAH GAGAL : $gg
"; - echo "LANJUT"; - } - - function ppls_rumahtangga(){ - - $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']); - - $sheet=0; - $baris = $data->rowcount($sheet_index=$sheet); - $kolom = $data->colcount($sheet_index=$sheet); - - - for ($i=2; $i<=$baris; $i++){ - - - $penduduk = ""; - - - $penduduk['nama'] = $data->val($i,12,$sheet); - $penduduk['id_rtm'] = $data->val($i,1,$sheet); - - - //$outp = $this->db->insert('tweb_penduduk',$penduduk); - $upd['rtm_level'] = 1; - - $this->db->where('id_rtm',$penduduk['id_rtm'] ); - $this->db->where('nama',$penduduk['nama'] ); - $outp = $this->db->update('tweb_penduduk',$upd); - - } - - $sql = "SELECT id,no_kk FROM tweb_rtm WHERE 1 "; - - $query = $this->db->query($sql); - $rtm=$query->result_array(); - - - $i=0; - while($idb->query($a); - $i++; - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function pbdt_rumahtangga(){ - - $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']); - - $sheet=0; - $baris = $data->rowcount($sheet_index=$sheet); - $kolom = $data->colcount($sheet_index=$sheet); - - - for ($i=2; $i<=$baris; $i++){ - - $penduduk = ""; - $penduduk['nama'] = $data->val($i,12,$sheet); - $penduduk['id_rtm'] = $data->val($i,1,$sheet); - - //$outp = $this->db->insert('tweb_penduduk',$penduduk); - $upd['rtm_level'] = 1; - - $this->db->where('id_rtm',$penduduk['id_rtm'] ); - $this->db->where('nama',$penduduk['nama'] ); - $outp = $this->db->update('tweb_penduduk',$upd); - - } - - $sql = "SELECT id,no_kk FROM tweb_rtm WHERE 1 "; - - $query = $this->db->query($sql); - $rtm=$query->result_array(); - - - $i=0; - while($idb->query($a); - $i++; - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function persil(){ - $data = new Spreadsheet_Excel_Reader($_FILES['persil']['tmp_name']); - - $sheet=0; - $baris = $data->rowcount($sheet_index=$sheet); - $kolom = $data->colcount($sheet_index=$sheet); - - for ($i=2; $i<=$baris; $i++){ - $upd['nik'] = $data->val($i,2,$sheet); - $upd['nama'] = $data->val($i,3,$sheet); - $upd['persil_jenis_id'] = $data->val($i,4,$sheet); - $upd['id_clusterdesa'] = $data->val($i,5,$sheet); - $upd['luas'] = $data->val($i,6,$sheet); - $upd['kelas'] = $data->val($i,7,$sheet); - $upd['no_sppt_pbb'] = $data->val($i,8,$sheet); - $upd['persil_peruntukan_id'] = $data->val($i,9,$sheet); - - $outp = $this->db->insert('data_persil',$upd); - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } -} \ No newline at end of file diff --git a/donjo-app/models/kelompok_master_model.php b/donjo-app/models/kelompok_master_model.php deleted file mode 100644 index e118fcd59..000000000 --- a/donjo-app/models/kelompok_master_model.php +++ /dev/null @@ -1,144 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.kelompok LIKE '$kw' OR u.kelompok LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND u.id = $kf"; - return $filter_sql; - } - } - function state_sql(){ - if(isset($_SESSION['state'])){ - $kf = $_SESSION['state']; - $filter_sql= " AND u.lock = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM kelompok_master u WHERE 1"; - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->state_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.kelompok'; break; - case 2: $order_sql = ' ORDER BY u.kelompok DESC'; break; - case 3: $order_sql = ' ORDER BY u.kelompok'; break; - case 4: $order_sql = ' ORDER BY u.kelompok DESC'; break; - case 5: $order_sql = ' ORDER BY g.kelompok'; break; - case 6: $order_sql = ' ORDER BY g.kelompok DESC'; break; - default:$order_sql = ' ORDER BY u.kelompok'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT u.* FROM kelompok_master u WHERE 1 "; - - $sql .= $this->search_sql(); - - - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($idb->insert('kelompok_master',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $this->db->where('id',$id); - $outp = $this->db->update('kelompok_master',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM kelompok_master WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM kelompok_master WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function get_kelompok_master($id=0){ - $sql = "SELECT * FROM kelompok_master WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function list_subjek(){ - $sql = "SELECT * FROM kelompok_ref_subjek"; - $query = $this->db->query($sql); - return $query->result_array(); - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/kelompok_model.php b/donjo-app/models/kelompok_model.php deleted file mode 100644 index c3dfbf68e..000000000 --- a/donjo-app/models/kelompok_model.php +++ /dev/null @@ -1,214 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.nama LIKE '$kw' OR u.nama LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND u.id_master = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM kelompok u WHERE 1"; - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.nama'; break; - case 2: $order_sql = ' ORDER BY u.nama DESC'; break; - case 3: $order_sql = ' ORDER BY u.nama'; break; - case 4: $order_sql = ' ORDER BY u.nama DESC'; break; - case 5: $order_sql = ' ORDER BY g.nama'; break; - case 6: $order_sql = ' ORDER BY g.nama DESC'; break; - default:$order_sql = ' ORDER BY u.nama'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT u.*,s.kelompok AS master,c.nama AS ketua,(SELECT COUNT(id) FROM kelompok_anggota WHERE id_kelompok = u.id) AS jml_anggota FROM kelompok u LEFT JOIN kelompok_master s ON u.id_master = s.id LEFT JOIN tweb_penduduk c ON u.id_ketua = c.id WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($idb->insert('kelompok',$data); - $insert_id = $this->db->insert_id(); - - $datax['id_kelompok']=$insert_id; - $datax['id_penduduk']=$data['id_ketua']; - $outpb = $this->db->insert('kelompok_anggota',$datax); - - if($outpa && $outpb) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function insert_a($id=0){ - $data = $_POST; - $data['id_kelompok']=$id; - - $sql = "SELECT id FROM kelompok_anggota WHERE id_kelompok = ? AND id_penduduk = ?"; - $query = $this->db->query($sql,array($data['id_kelompok'],$data['id_penduduk'])); - $kel = $query->row_array(); - - if(!$kel){ - $outp = $this->db->insert('kelompok_anggota',$data); - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - if($data['id_ketua']=="") - unset($data['id_ketua']); - - $this->db->where('id',$id); - $outp = $this->db->update('kelompok',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function update_a($id=0,$id_a=0){ - $data = $_POST; - - $this->db->where('id_kelompok',$id); - $this->db->where('id_penduduk',$id_a); - $outp = $this->db->update('kelompok_anggota',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function delete($id=''){ - $sql = "DELETE FROM kelompok WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_a($id=''){ - $sql = "DELETE FROM kelompok_anggota WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM kelompok WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function get_kelompok($id=0){ - $sql = "SELECT * FROM kelompok WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_anggota($id=0,$id_a=0){ - $sql = "SELECT * FROM kelompok_anggota WHERE id_kelompok=? AND id_penduduk = ?"; - $query = $this->db->query($sql,array($id,$id_a)); - $data = $query->row_array(); - return $data; - } - function list_master(){ - $sql = "SELECT * FROM kelompok_master"; - $query = $this->db->query($sql); - return $query->result_array(); - } - function list_penduduk(){ - $sql = "SELECT id,nik,nama FROM tweb_penduduk WHERE status_dasar = 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - while($idb->query($sql,$id); - $data=$query->result_array(); - - - $i=0; - while($i \ No newline at end of file diff --git a/donjo-app/models/keluarga_model.php b/donjo-app/models/keluarga_model.php deleted file mode 100644 index 33aaa0bcb..000000000 --- a/donjo-app/models/keluarga_model.php +++ /dev/null @@ -1,870 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->query($sql); - $data = $query->result_array(); - - return $data; - } - function dn(){ - $sql = "SELECT nik FROM tweb_penduduk WHERE 1 "; - $query = $this->db->query($sql); - $data = $query->result_array(); - - return $data; - } - function sex_sql(){ - if(isset($_SESSION['sex'])){ - $kf = $_SESSION['sex']; - $sex_sql= " AND t.sex = '$kf'"; - return $sex_sql; - } - } - function dusun_sql(){ - if(isset($_SESSION['dusun'])){ - $kf = $_SESSION['dusun']; - $dusun_sql= " AND c.dusun = '$kf'"; - return $dusun_sql; - } - } - function rw_sql(){ - if(isset($_SESSION['rw'])){ - $kf = $_SESSION['rw']; - $rw_sql= " AND c.rw = '$kf'"; - return $rw_sql; - } - } - function rt_sql(){ - if(isset($_SESSION['rt'])){ - $kf = $_SESSION['rt']; - $rt_sql= " AND c.rt = '$kf'"; - return $rt_sql; - } - } - function search_sql(){ - if(isset($_SESSION['cari'])){ - $cari = $_SESSION['cari']; - $kw = penetration($this->db->escape_like_str($cari)); - $kw = '%' .$kw. '%'; - $search_sql= " AND (t.nama LIKE '$kw' OR u.no_kk LIKE '$kw' OR t.nik LIKE '$kw') "; - return $search_sql; - } - } - - function jenis_sql(){ - if(isset($_SESSION['jenis'])){ - $kh = $_SESSION['jenis']; - $jenis_sql= " AND jenis = $kh"; - return $jenis_sql; - } - } - function kelas_sql(){ - if(isset($_SESSION['kelas'])){ - $kh = $_SESSION['kelas']; - $kelas_sql= " AND kelas_sosial= $kh"; - return $kelas_sql; - } - } - function raskin_sql(){ - if(isset($_SESSION['raskin'])){ - $kh = $_SESSION['raskin']; - $raskin_sql= " AND raskin= $kh"; - return $raskin_sql; - } - } - function blt_sql(){ - if(isset($_SESSION['id_blt'])){ - $kh = $_SESSION['id_blt']; - $blt_sql= " AND id_blt= $kh"; - return $blt_sql; - } - } - function bos_sql(){ - if(isset($_SESSION['id_bos'])){ - $kh = $_SESSION['id_bos']; - $bos_sql= " AND id_bos= $kh"; - return $bos_sql; - } - } - function pkh_sql(){ - if(isset($_SESSION['id_pkh'])){ - $kh = $_SESSION['id_pkh']; - $pkh_sql= " AND id_pkh= $kh"; - return $pkh_sql; - } - } - function jampersal_sql(){ - if(isset($_SESSION['id_jampersal'])){ - $kh = $_SESSION['id_jampersal']; - $jampersal_sql= " AND id_jampersal= $kh"; - return $jampersal_sql; - } - } - function bedah_rumah_sql(){ - if(isset($_SESSION['id_bedah_rumah'])){ - $kh = $_SESSION['id_bedah_rumah']; - $bedah_rumah_sql= " AND id_bedah_rumah= $kh"; - return $bedah_rumah_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE 1 "; - $sql .= $this->search_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $this->sex_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.no_kk'; break; - case 2: $order_sql = ' ORDER BY u.no_kk DESC'; break; - case 3: $order_sql = ' ORDER BY kepala_kk'; break; - case 4: $order_sql = ' ORDER BY kepala_kk DESC'; break; - case 5: $order_sql = ' ORDER BY g.nama'; break; - case 6: $order_sql = ' ORDER BY g.nama DESC'; break; - default:$order_sql = ' ORDER BY u.tgl_daftar DESC'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT u.*,t.nama AS kepala_kk,t.nik,t.sex,(SELECT COUNT(id) FROM tweb_penduduk WHERE id_kk = u.id ) AS jumlah_anggota,c.dusun,c.rw,c.rt FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE 1 "; - - $sql .= $this->search_sql(); - - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $this->sex_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($isearch_sql(); - }else{ - $sql = "SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE 1 "; - $sql .= $this->search_sql(); - - - - $sql .= $this->raskin_sql(); - $sql .= $this->kelas_sql(); - $sql .= $this->blt_sql(); - $sql .= $this->bos_sql(); - $sql .= $this->pkh_sql(); - $sql .= $this->jampersal_sql(); - $sql .= $this->bedah_rumah_sql(); - } - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data_statistik($tipe=21,$o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.no_kk'; break; - case 2: $order_sql = ' ORDER BY u.no_kk DESC'; break; - case 3: $order_sql = ' ORDER BY kepala_kk'; break; - case 4: $order_sql = ' ORDER BY kepala_kk DESC'; break; - case 5: $order_sql = ' ORDER BY g.nama'; break; - case 6: $order_sql = ' ORDER BY g.nama DESC'; break; - default:$order_sql = ' ORDER BY u.tgl_daftar DESC'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - if($tipe==21){ - $sql="SELECT u.*,t.nama AS kepala_kk,(SELECT COUNT(id) FROM tweb_penduduk WHERE id_kk = u.id ) AS jumlah_anggota,c.dusun,c.rw,c.rt FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE kelas_sosial=$_SESSION[kelas] "; - $sql .= $this->search_sql(); - }else{ - $sql = "SELECT u.*,t.nama AS kepala_kk,(SELECT COUNT(id) FROM tweb_penduduk WHERE id_kk = u.id ) AS jumlah_anggota,c.dusun,c.rw,c.rt FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->raskin_sql(); - - $sql .= $this->blt_sql(); - $sql .= $this->bos_sql(); - $sql .= $this->pkh_sql(); - $sql .= $this->jampersal_sql(); - $sql .= $this->bedah_rumah_sql(); - - - $sql .= $paging_sql; - } - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($idb->insert('tweb_keluarga',penetration($data)); - - $sql = "SELECT id FROM tweb_keluarga WHERE nik_kepala=?"; - $query = $this->db->query($sql,$temp); - $kk = $query->row_array(); - - $default['id_kk'] = $kk['id']; - $default['kk_level'] = 1; - - $this->db->where('id',$temp); - $this->db->update('tweb_penduduk',$default); - - $satuan=$_POST['tanggallahir']; - $blnlahir = substr($satuan,3,2); - $thnlahir= substr($satuan,6,4); - $blnskrg = (date("m")); - $thnskrg = (date("Y")); - if(($blnlahir==$blnskrg)and($thnlahir==$thnskrg)){ - $x['id_detail']='1'; - }else{ - $x['id_detail']='5'; - } - - $x['id_pend']=$temp; - $x['bulan']=$blnskrg; - $x['tahun']=$thnskrg; - $outp = $this->db->insert('log_penduduk',$x); - $log['id_pend'] = 1; - $log['id_cluster'] = 1; - $log['tanggal'] = date("m-d-y"); - $outp = $this->db->insert('log_perubahan_penduduk',$log); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function insert_new(){ - $data = $_POST; - $lokasi_file = $_FILES['foto']['tmp_name']; - $tipe_file = $_FILES['foto']['type']; - $nama_file = $_FILES['foto']['name']; - $old_foto = ''; - if (!empty($lokasi_file)){ - if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ - unset($data['foto']); - } else { - UploadFoto($nama_file,$old_foto); - $data['foto'] = $nama_file; - } - }else{ - unset($data['foto']); - } - - unset($data['file_foto']); - - $data['id_cluster'] = $data['rt']; - UNSET($data['dusun']); - UNSET($data['rw']); - UNSET($data['rt']); - UNSET($data['no_kk']); - UNSET($data['new']); - - $data['tanggallahir'] = tgl_indo_in($data['tanggallahir']); - - $outp = $this->db->insert('tweb_penduduk',penetration($data)); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - - $sql = "SELECT id FROM tweb_penduduk WHERE nik=?"; - $query = $this->db->query($sql,$data['nik']); - $temp2 = $query->row_array(); - - $data2['nik_kepala'] = $temp2['id']; - $data2['no_kk'] = $_POST['no_kk']; - $temp = $data2['nik_kepala']; - $outp = $this->db->insert('tweb_keluarga',$data2); - - $sql = "SELECT id FROM tweb_keluarga WHERE nik_kepala=?"; - $query = $this->db->query($sql,$temp); - $kk = $query->row_array(); - - $default['id_kk'] = $kk['id']; - $default['kk_level'] = 1; - - $this->db->where('id',$temp); - $this->db->update('tweb_penduduk',$default); - - $satuan=$_POST['tanggallahir']; - $blnlahir = substr($satuan,3,2); - $thnlahir= substr($satuan,6,4); - $blnskrg = (date("m")); - $thnskrg = (date("Y")); - if(($blnlahir==$blnskrg)and($thnlahir==$thnskrg)){ - $x['id_detail']='1'; - }else{ - $x['id_detail']='5'; - } - - $x['id_pend']=$temp; - $x['bulan']=$blnskrg; - $x['tahun']=$thnskrg; - $outp = $this->db->insert('log_penduduk',$x); - $log['id_pend'] = 1; - $log['id_cluster'] = 1; - $log['tanggal'] = date("m-d-y"); - $outp = $this->db->insert('log_perubahan_penduduk',$log); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "SELECT nik_kepala FROM tweb_keluarga WHERE id=?"; - $query = $this->db->query($sql,$id); - $temp = $query->row_array(); - - $default['id_kk'] = ""; - $default['kk_level'] = ""; - - $this->db->where('id_kk',$id); - $this->db->update('tweb_penduduk',$default); - - $sql = "DELETE FROM tweb_keluarga WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM tweb_keluarga WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function add_anggota($id=0){ - $data = $_POST; - $temp['id_kk'] = $id; - $temp['kk_level'] = $data['kk_level']; - $this->db->where('id',$data['nik']); - $outp = $this->db->update('tweb_penduduk',$temp); - - if($temp['kk_level']=="1"){ - $temp2['nik_kepala'] = $data['nik']; - $this->db->where('id',$temp['id_kk']); - $outp = $this->db->update('tweb_keluarga',$temp2); - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function update_anggota($id=0){ - $data = $_POST; - - $sql = "SELECT id_kk FROM tweb_penduduk WHERE id=?"; - $query = $this->db->query($sql,$id); - $pend = $query->row_array(); - - if($data['kk_level']==1){ - - $lvl['kk_level'] = 11; - $this->db->where('id_kk',$pend['id_kk']); - $this->db->where('kk_level',1); - $this->db->update('tweb_penduduk',$lvl); - - $nik['nik_kepala'] = $id; - $this->db->where('id',$pend['id_kk']); - $this->db->update('tweb_keluarga',$nik); - - } - - $this->db->where('id',$id); - $outp = $this->db->update('tweb_penduduk',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function rem_anggota($kk=0,$id=0){ - $temp['id_kk'] = 0; - $temp['kk_level'] = 0; - - $pend = $this->keluarga_model->get_anggota($id); - $this->db->where('id',$id); - $outp = $this->db->update('tweb_penduduk',$temp); - if($pend['kk_level']=='1'){ - $temp2['nik_kepala']=0; - $this->db->where('id',$pend['id_kk']); - $outp = $this->db->update('tweb_keluarga',$temp2); - } - - $log['id_pend'] = $id; - $log['id_detail'] = "7"; - $log['bulan'] = date("m"); - $log['tahun'] = date("Y"); - $outp = $this->db->insert('log_penduduk',$log); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function rem_all_anggota($kk){ - $id_cb = $_POST['id_cb']; - $temp['id_kk'] = 0; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $this->db->where('id',$id); - $outp = $this->db->update('tweb_penduduk',$temp); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_dusun($id=0){ - $sql = "SELECT * FROM tweb_keluarga WHERE dusun_id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - - function get_keluarga($id=0){ - $sql = "SELECT * FROM tweb_keluarga WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_anggota($id=0){ - $sql = "SELECT * FROM tweb_penduduk WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function list_penduduk_lepas(){ - $sql = "SELECT id,nik,nama FROM tweb_penduduk WHERE id_kk = 0"; - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - while($idb->query($sql,array($id)); - $data=$query->result_array(); - - - $i=0; - while($idb->query($sql,array($id,$id)); - return $query->row_array(); - - } - function get_kepala_a($id){ - - $sql = "SELECT u.*,c.*, (SELECT no_kk FROM tweb_keluarga WHERE id = ?) AS no_kk FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE u.id = (SELECT nik_kepala FROM tweb_keluarga WHERE id = ?) "; - $query = $this->db->query($sql,array($id,$id)); - return $query->row_array(); - - } - - function get_desa(){ - $sql = "SELECT * FROM config WHERE 1"; - $query = $this->db->query($sql); - return $query->row_array(); - } - function list_hubungan(){ - $sql = "SELECT *,nama as hubungan FROM tweb_penduduk_hubungan WHERE 1"; - $query = $this->db->query($sql); - return $query->result_array(); - } - function insert_a(){ - $data = $_POST; - $lokasi_file = $_FILES['foto']['tmp_name']; - $tipe_file = $_FILES['foto']['type']; - $nama_file = $_FILES['foto']['name']; - if (!empty($lokasi_file)){ - if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ - unset($data['foto']); - } else { - UploadFoto($nama_file); - $data['foto'] = $nama_file; - } - }else{ - unset($data['foto']); - } - - unset($data['file_foto']); - unset($data['old_foto']); - - $satuan=$_POST['tanggallahir']; - $blnlahir = substr($satuan,3,2); - $thnlahir= substr($satuan,6,4); - $blnskrg = (date("m")); - $thnskrg = (date("Y")); - if(($blnlahir==$blnskrg)and($thnlahir==$thnskrg)){ - $x['id_detail']='1'; - }else{ - $x['id_detail']='5'; - } - $data['nama'] = penetration($data['nama']); - $data['nama_ayah'] = penetration($data['nama_ayah']); - $data['nama_ibu'] = penetration($data['nama_ibu']); - $data['tanggallahir'] = tgl_indo_in($data['tanggallahir']); - $outp = $this->db->insert('tweb_penduduk',$data); - - $sql="select max(id) as id_pend from tweb_penduduk"; - $query = $this->db->query($sql); - $id_pend = $query->row_array(); - $x['id_pend']=$id_pend['id_pend']; - $x['bulan']=$blnskrg; - $x['tahun']=$thnskrg; - $outp = $this->db->insert('log_penduduk',$x); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update_nokk($id=0){ - $data = $_POST; - - $this->db->where("id",$id); - $outp=$this->db->update("tweb_keluarga",$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - - } - function list_sosial(){ - - $dus = ""; - $rw = ""; - $rt = ""; - - if(isset($_SESSION['dusun'])) - $dus = " AND c.dusun = '$_SESSION[dusun]'"; - if(isset($_SESSION['rw'])) - $rw = " AND c.rw = '$_SESSION[rw]'"; - if(isset($_SESSION['rt'])) - $rt = " AND c.rt = '$_SESSION[rt]'"; - $sql = "SELECT s.*,(SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE u.kelas_sosial = s.id $dus $rw $rt) as jumlah FROM ref_kelas_sosial s WHERE 1"; - - - $query = $this->db->query($sql); - return $query->result_array(); - } - function list_raskin(){ - - $dus = ""; - $rw = ""; - $rt = ""; - - if(isset($_SESSION['dusun'])) - $dus = " AND c.dusun = '$_SESSION[dusun]'"; - if(isset($_SESSION['rw'])) - $rw = " AND c.rw = '$_SESSION[rw]'"; - if(isset($_SESSION['rt'])) - $rt = " AND c.rt = '$_SESSION[rt]'"; - $sql = "SELECT s.*, - (SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE u.kelas_sosial = s.id $dus $rw $rt) as jumlah, - (SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE u.kelas_sosial = s.id $dus $rw $rt AND u.raskin = 1) as raskin, - (SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE u.kelas_sosial = s.id $dus $rw $rt AND t.jamkesmas = 1) as jamkesmas FROM ref_kelas_sosial s WHERE 1"; - - - $query = $this->db->query($sql); - return $query->result_array(); - } - function pindah_proses($id=0,$id_cluster=''){ - $this->db->where('id_kk',$id); - $data['id_cluster'] = $id_cluster; - $outp = $this->db->update('tweb_penduduk',$data); - - $sql = "SELECT id FROM tweb_penduduk WHERE id_kk=$id"; - - $query = $this->db->query($sql); - $data2= $query->result_array(); - - foreach($data2 as $datanya){ - $log['id_pend'] = $datanya['id']; - $log['id_detail'] = "6"; - $log['bulan'] = date("m"); - $log['tahun'] = date("Y"); - $outp = $this->db->insert('log_penduduk',$log); - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function get_judul_statistik($tipe=0,$nomor=1){ - switch($tipe){ - case 21: $sql = "SELECT * FROM klasifikasi_analisis_keluarga WHERE id=? and jenis='1' ";break; - case 22: $sql = "SELECT * FROM ref_raskin WHERE id=?";break; - case 23: $sql = "SELECT * FROM ref_blt WHERE id=?";break; - case 24: $sql = "SELECT * FROM ref_bos WHERE id=?";break; - case 25: $sql = "SELECT * FROM ref_pkh WHERE id=?";break; - case 26: $sql = "SELECT * FROM ref_jampersal WHERE id=?";break; - case 27: $sql = "SELECT * FROM ref_bedah_rumah WHERE id=?";break; - } - $query = $this->db->query($sql,$nomor); - return $query->row_array(); - } - function coba($data=''){ - $mypath="surat\\kk\\"; - $mypath_arsip="surat\\arsip\\"; - - $path = "".str_replace("\\","/",$mypath); - $path_arsip = "".str_replace("\\","/",$mypath_arsip); - - $file = $path."kk.rtf"; - if(is_file($file)){ - $nama =""; - - $handle = fopen($file,'r'); - $buffer = stream_get_contents($handle); - $i=0; - foreach($data['main'] AS $ranggota){ - $i++; - $nama .= $ranggota['nama']."\line "; - $no .= $i."\line "; - $hubungan .= $ranggota['hubungan']."\line "; - $nik .= $ranggota['nik']."\line "; - $sex .= $ranggota['sex']."\line "; - $tempatlahir .= $ranggota['tempatlahir']."\line "; - $tanggallahir .= $ranggota['tanggallahir']."\line "; - $agama .= $ranggota['agama']."\line "; - $pendidikan .= $ranggota['pendidikan']."\line "; - $pekerjaan .= $ranggota['pekerjaan']."\line "; - $status_kawin .= $ranggota['status_kawin']."\line "; - $warganegara .= $ranggota['warganegara']."\line "; - $dokumen_pasport.= $ranggota['dokumen_pasport']."\line "; - $dokumen_kitas .= $ranggota['dokumen_kitas']."\line "; - $nama_ayah .= $ranggota['nama_ayah']."\line "; - $nama_ibu .= $ranggota['nama_ibu']."\line "; - - if($ranggota['golongan_darah']!="TIDAK TAHU") - $golongan_darah .= $ranggota['golongan_darah']."\line "; - else - $golongan_darah .= "- \line "; - } - - $buffer=str_replace("[no]","$no",$buffer); - $buffer=str_replace("[nama]","\caps $nama",$buffer); - $buffer=str_replace("[hubungan]","$hubungan",$buffer); - $buffer=str_replace("[nik]","$nik",$buffer); - $buffer=str_replace("[sex]","$sex",$buffer); - $buffer=str_replace("[agama]","$agama",$buffer); - $buffer=str_replace("[pendidikan]","$pendidikan",$buffer); - $buffer=str_replace("[pekerjaan]","$pekerjaan",$buffer); - $buffer=str_replace("[tempatlahir]","\caps $tempatlahir",$buffer); - $buffer=str_replace("[tanggallahir]","\caps $tanggallahir",$buffer); - $buffer=str_replace("[kawin]","$status_kawin",$buffer); - $buffer=str_replace("[warganegara]","$warganegara",$buffer); - $buffer=str_replace("[pasport]","$dokumen_pasport",$buffer); - $buffer=str_replace("[kitas]","$dokumen_kitas",$buffer); - $buffer=str_replace("[ayah]","\caps $nama_ayah",$buffer); - $buffer=str_replace("[ibu]","\caps $nama_ibu",$buffer); - $buffer=str_replace("[darah]","$golongan_darah",$buffer); - - $h = $data['desa']; - $k = $data['kepala_kk']; - $tertanda = tgl_indo(date("Y m d")); - $tertanda = $h['nama_desa'].", ".$tertanda; - $buffer=str_replace("desa","\caps $h[nama_desa]",$buffer); - $buffer=str_replace("dusun","\caps $k[dusun]",$buffer); - $buffer=str_replace("prop","\caps $h[nama_propinsi]",$buffer); - $buffer=str_replace("kab","\caps $h[nama_kabupaten]",$buffer); - $buffer=str_replace("kec","\caps $h[nama_kecamatan]",$buffer); - $buffer=str_replace("*camat","\caps $h[nama_kepala_camat]",$buffer); - $buffer=str_replace("*kades","\caps $h[nama_kepala_desa]",$buffer); - $buffer=str_replace("*rt","$k[rt]",$buffer); - $buffer=str_replace("*rw","$k[rw]",$buffer); - $buffer=str_replace("*kk","\caps $k[nama]",$buffer); - $buffer=str_replace("no_kk","$k[no_kk]",$buffer); - $buffer=str_replace("pos","$h[kode_pos]",$buffer); - $buffer=str_replace("*tertanda","\caps $tertanda",$buffer); - - $berkas_arsip = $path_arsip."kk_$k[no_kk].rtf"; - $handle = fopen($berkas_arsip,'w+'); - fwrite($handle,$buffer); - fclose($handle); - $_SESSION['success']=8; - header("location:".base_url($berkas_arsip)); - } - - } - function coba2(){ - ini_set('memory_limit', '2048M'); - $mypath="surat\\undangan\\"; - $mypath_arsip="surat\\arsip\\"; - - $path = "".str_replace("\\","/",$mypath); - $path_arsip = "".str_replace("\\","/",$mypath_arsip); - - $file = $path."apik.rtf"; - if(is_file($file)){ - $buffer2 =""; - - $handle = fopen($file,'r'); - $b = stream_get_contents($handle); - - $c = Parse_Data($b,'\widowctrl','{\*\themedata'); - $c = "\widowctrl".$c; - $awal = Parse_Data($b,'{','\widowctrl'); - $awal = "{".$awal; - $akhir = strstr($b,'{\*\themedata'); - - $data = $this->list_data(); - $i=1; - $h = substr_count($c, 'fxnama'); - $h =4; - $j=count($data); - $k =1; - $buffer=$c; - foreach($data AS $d){ - if($d['sex']=="PEREMPUAN") - $sex = "IBU"; - else - $sex = "BAPAK"; - - $alamat = $d['dusun'].", RT ".$d['rt']."/RW ".$d['rw']; - $buffer=str_replace("fxnama$k","\caps $d[kepala_kk]",$buffer); - $buffer=str_replace("fxalamat$k","\caps $alamat",$buffer); - $buffer=str_replace("fxpre$k","\caps $sex",$buffer); - - if($k==$h){ - $k=0; - - if($i>=$j) - $buffer2 .= $buffer; - else - $buffer2 .= $buffer." \page "; - - $buffer=$c; - } - - $k++; - $i++; - } - $buffer2 .= $buffer; - - $buffers = $awal.$buffer2.$akhir; - - $berkas_arsip = $path_arsip."undangan.rtf"; - $handle = fopen($berkas_arsip,'w+'); - fwrite($handle,$buffers); - fclose($handle); - $_SESSION['success']=8; - header("location:".base_url($berkas_arsip)); - } - - } -} \ No newline at end of file diff --git a/donjo-app/models/laporan_bulanan_model.php b/donjo-app/models/laporan_bulanan_model.php deleted file mode 100644 index 4b1d54ca9..000000000 --- a/donjo-app/models/laporan_bulanan_model.php +++ /dev/null @@ -1,316 +0,0 @@ -db->query($sql); - $data=$query->row_array(); - - $bln=date("m"); - $thn=date("Y"); - - $sql = "SELECT * FROM log_bulanan WHERE month(tgl) = $bln AND year(tgl) = $thn"; - $query = $this->db->query($sql); - $ada = $query->result_array(); - - if(!$ada){ - $this->db->insert('log_bulanan',$data); - }else{ - - $sql = "UPDATE log_bulanan SET pend=$data[pend], lk = $data[lk],pr=$data[pr],kk = $data[kk] WHERE month(tgl) = $bln AND year(tgl) = $thn"; - $this->db->query($sql); - } - - } - function autocomplete(){ - $sql = "SELECT dusun_nama FROM tweb_wil_dusun"; - $query = $this->db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND u.nama LIKE '$kw'"; - return $search_sql; - } - } - function dusun_sql(){ - if(isset($_SESSION['dusun'])){ - $kf = $_SESSION['dusun']; - if($kf==""){ - $dusun_sql= "";} else { - $dusun_sql= " AND c.dusun = '".$kf."'";} - return $dusun_sql; - } - } - function bulan_sql(){ - if(isset($_SESSION['bulanku'])){ - $kf = $_SESSION['bulanku']; - if($kf==""){ - $bulan_sql= "";} else { - $bulan_sql= " where bulan = $kf";} - return $bulan_sql; - } - } - function tahun_sql(){ - if(isset($_SESSION['tahunku'])){ - $kf = $_SESSION['tahunku']; - if($kf==""){ - $bulan_sql= "";} else { - $bulan_sql= " and tahun = $kf";} - return $bulan_sql; - } - } - function bulan($bulan) - { - Switch ($bulan){ - case 1 : $bulan="Januari"; - Break; - case 2 : $bulan="Februari"; - Break; - case 3 : $bulan="Maret"; - Break; - case 4 : $bulan="April"; - Break; - case 5 : $bulan="Mei"; - Break; - case 6 : $bulan="Juni"; - Break; - case 7 : $bulan="Juli"; - Break; - case 8 : $bulan="Agustus"; - Break; - case 9 : $bulan="September"; - Break; - case 10 : $bulan="Oktober"; - Break; - case 11 : $bulan="November"; - Break; - case 12 : $bulan="Desember"; - Break; - } - return $bulan; - } - function paging($lap=0,$p=1,$o=0){ - - switch($lap){ - case 0: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; - case 1: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pekerjaan u WHERE 1 "; break; - case 2: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; - case 3: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; - case 4: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; - case 5: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; - case 6: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; - case 7: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; - case 8: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; - default:$sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; - } - - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data(){ - $sql="select c.id as id_cluster,c.rt,c.rw,c.dusun as dusunnya, -(select count(id) from tweb_penduduk where sex='1' and id_cluster=c.id) as L, -(select count(id) from tweb_penduduk where sex='2' and id_cluster=c.id) as P, - -(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<1 and id_cluster=c.id ) as bayi, -(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=1 and (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<6 and id_cluster=c.id ) as balita, -(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=6 and (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<13 and id_cluster=c.id ) as sd, -(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=13 and (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<16 and id_cluster=c.id ) as smp, -(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=16 and (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<19 and id_cluster=c.id ) as sma, -(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=19 and (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<60 and id_cluster=c.id ) as dewasa, -(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>60 and id_cluster=c.id ) as lansia, - -(select count(id) from tweb_penduduk where sex = 1 AND cacat_id is not null and cacat_id <>'0' and id_cluster=c.id) as cacat, -(select count(id) from tweb_penduduk where sex = 2 AND cacat_id is not null and cacat_id <>'0' and id_cluster=c.id) as cacat2, -(select count(id) from tweb_penduduk where sakit_menahun_id is not null and sakit_menahun_id <>'0' and id_cluster=c.id and sex='1') as sakit_L, -(select count(id) from tweb_penduduk where sakit_menahun_id is not null and sakit_menahun_id <>'0' and id_cluster=c.id and sex='2') as sakit_P, -(select count(id) from tweb_penduduk where hamil='1' and id_cluster=c.id) as hamil1, -(select count(id) from tweb_penduduk where hamil='2' and id_cluster=c.id) as hamil2, -(select count(id) from tweb_penduduk where hamil='3' and id_cluster=c.id) as susu -from tweb_wil_clusterdesa c WHERE rw<>'0' AND rt<>'0' AND (select count(id) from tweb_penduduk where id_cluster=c.id)>0 "; - - $sql .= $this->dusun_sql(); - - $sql .= " ORDER BY c.dusun,c.rw,c.rt "; - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - while($idb->query($sql); - $data=$query->result_array(); - return $data; - } - function configku(){ - $sql = "SELECT * FROM config limit 1 "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function penduduk_awal(){ - $bln=$_SESSION['bulanku']; - $thn=$_SESSION['tahunku']; - - $sql = "SELECT lk as WNI_L,pr AS WNI_P FROM log_bulanan WHERE month(tgl) = $bln-1 AND year(tgl) = $thn;"; - $query = $this->db->query($sql); - if($query){ - if($query->num_rows() > 0){ - $hasil=$query->row(); - $data= array( - "WNI_L"=>$hasil->WNI_L, - "WNI_P"=>$hasil->WNI_P, - "WNA_L"=>0, - "WNA_P"=>0, - "bulan"=>$bln, - "tahun"=>$thn); - }else{ - $data= array( - "WNI_L"=>0, - "WNI_P"=>0, - "WNA_L"=>0, - "WNA_P"=>0, - "bulan"=>$bln, - "tahun"=>$thn); - } - }else{ - $data = $this->db->error_reporting(); - } - return $data; - } - function penduduk_akhir(){ - $bln=$_SESSION['bulanku']; - $thn=$_SESSION['tahunku']; - - $sql = "SELECT lk as WNI_L,pr AS WNI_P FROM log_bulanan WHERE month(tgl) = $bln AND year(tgl) = $thn;"; - $query = $this->db->query($sql); - $hasil=$query->row_array(); - $data= array( - "WNI_L"=>$hasil["WNI_L"], - "WNI_P"=>$hasil["WNI_P"], - "WNA_L"=>0, - "WNA_P"=>0, - "bulan"=>$bln, - "tahun"=>$thn); - return $data; - } - function penduduk_akhirx(){ - $paging_sql = ' LIMIT 1'; - $sql = "SELECT (select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id where warganegara_id='1' and sex='1' and id_detail in ('5','1','8') and day(tanggal)>15 and day(tanggal)<=30 and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNI_L, -(select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id where warganegara_id='1' and sex='2' and id_detail in ('5','1','8') and day(tanggal)>15 and day(tanggal)<=30 and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNI_P, -(select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id where warganegara_id='2' and sex='1' and id_detail in ('5','1','8') and day(tanggal)>15 and day(tanggal)<=30 and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNA_L, -(select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id where warganegara_id='2' and sex='2' and id_detail in ('5','1','8') and day(tanggal)>15 and day(tanggal)<=30 and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNA_P, bulan, tahun -FROM log_penduduk "; - $sql .= $this->bulan_sql(); - $sql .= $this->tahun_sql(); - $sql .= $paging_sql; - $query = $this->db->query($sql); - $data=$query->row_array(); - return $data; - } - function kelahiran(){ - $sql = "SELECT (SELECT COUNT(id) FROM tweb_penduduk WHERE month(tanggallahir) = ? AND year(tanggallahir) =? AND sex = 1) AS WNI_L,(SELECT COUNT(id) FROM tweb_penduduk WHERE month(tanggallahir) = ? AND year(tanggallahir) =? AND sex = 1) AS WNI_P"; - $query = $this->db->query($sql,array($_SESSION['bulanku'],$_SESSION['tahunku'],$_SESSION['bulanku'],$_SESSION['tahunku'])); - $data=$query->row_array(); - $data['WNA_L']=0; - $data['WNA_P']=0; - return $data; - } - function kematian(){ - $sql = "SELECT (SELECT COUNT(u.id) FROM log_penduduk u LEFT JOIN tweb_penduduk p ON u.id_pend = p.id WHERE month(tgl_peristiwa) = ? AND year(tgl_peristiwa) =? AND sex =1 AND id_detail =2) AS WNI_L,(SELECT COUNT(u.id) FROM log_penduduk u LEFT JOIN tweb_penduduk p ON u.id_pend = p.id WHERE month(tgl_peristiwa) = ? AND year(tgl_peristiwa) =? AND sex = 2 AND id_detail = 2) AS WNI_P"; - $query = $this->db->query($sql,array($_SESSION['bulanku'],$_SESSION['tahunku'],$_SESSION['bulanku'],$_SESSION['tahunku'])); - $data=$query->row_array(); - $data['WNA_L']=0; - $data['WNA_P']=0; - return $data; - } - function pindah(){ - $sql = "SELECT (SELECT COUNT(u.id) FROM log_penduduk u LEFT JOIN tweb_penduduk p ON u.id_pend = p.id WHERE month(tgl_peristiwa) = ? AND year(tgl_peristiwa) =? AND sex =1 AND id_detail =3) AS WNI_L,(SELECT COUNT(u.id) FROM log_penduduk u LEFT JOIN tweb_penduduk p ON u.id_pend = p.id WHERE month(tgl_peristiwa) = ? AND year(tgl_peristiwa) =? AND sex = 2 AND id_detail = 3) AS WNI_P"; - $query = $this->db->query($sql,array($_SESSION['bulanku'],$_SESSION['tahunku'],$_SESSION['bulanku'],$_SESSION['tahunku'])); - $data=$query->row_array(); - $data['WNA_L']=0; - $data['WNA_P']=0; - return $data; - } - function pendatang(){ - $bln=$_SESSION['bulanku']; - $thn=$_SESSION['tahunku']; - - $paging_sql = ' LIMIT 1'; - $sql = "SELECT (select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='1' and sex='1' and id_detail in ('8','5') and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNI_L, - (select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='1' and sex='2' and id_detail in ('8','5') and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNI_P, - (select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='2' and sex='1' and id_detail in ('8','5') and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNA_L, - (select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='2' and sex='2' and id_detail in ('8','5') and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNA_P , bulan, tahun - FROM log_penduduk "; - $sql .= $this->bulan_sql(); - $sql .= $this->tahun_sql(); - $sql .= $paging_sql; - $query = $this->db->query($sql); - if($query->num_rows()>0){ - $data=$query->row_array(); - }else{ - $data= array( - "WNI_L"=>0, - "WNI_P"=>0, - "WNA_L"=>0, - "WNA_P"=>0, - "bulan"=>$bln, - "tahun"=>$thn); - } - return $data; - } - function pindahx(){ - $paging_sql = ' LIMIT 1'; - $sql = "SELECT (select count(s.id) from log_penduduk s INNER join detail_log_penduduk t on s.id_detail=t.id INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='1' and sex='1' and id_detail='3' and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNI_L, -(select count(s.id) from log_penduduk s INNER join detail_log_penduduk t on s.id_detail=t.id INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='1' and sex='2' and id_detail='3' and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNI_P, -(select count(s.id) from log_penduduk s INNER join detail_log_penduduk t on s.id_detail=t.id INNER join tweb_penduduk p on -s.id_pend=p.id and warganegara_id='2' and sex='1' and id_detail='3' and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNA_L, -(select count(s.id) from log_penduduk s INNER join detail_log_penduduk t on s.id_detail=t.id INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='2' and sex='2' and id_detail='3' and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNA_P , bulan, tahun -FROM log_penduduk "; - $sql .= $this->bulan_sql(); - $sql .= $this->tahun_sql(); - $sql .= $paging_sql; - $query = $this->db->query($sql); - $data=$query->row_array(); - return $data; - } - function hilang(){ - $sql = "SELECT (SELECT COUNT(u.id) FROM log_penduduk u LEFT JOIN tweb_penduduk p ON u.id_pend = p.id WHERE month(tgl_peristiwa) = ? AND year(tgl_peristiwa) =? AND sex =1 AND id_detail =4) AS WNI_L,(SELECT COUNT(u.id) FROM log_penduduk u LEFT JOIN tweb_penduduk p ON u.id_pend = p.id WHERE month(tgl_peristiwa) = ? AND year(tgl_peristiwa) =? AND sex = 2 AND id_detail = 4) AS WNI_P"; - $query = $this->db->query($sql,array($_SESSION['bulanku'],$_SESSION['tahunku'],$_SESSION['bulanku'],$_SESSION['tahunku'])); - $data=$query->row_array(); - $data['WNA_L']=0; - $data['WNA_P']=0; - return $data; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/laporan_penduduk_model.php b/donjo-app/models/laporan_penduduk_model.php deleted file mode 100644 index 7756ad76b..000000000 --- a/donjo-app/models/laporan_penduduk_model.php +++ /dev/null @@ -1,264 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND u.nama LIKE '$kw'"; - return $search_sql; - } - } - function paging($lap=0,$o=0){ - - switch($lap){ - case 0: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; - case 1: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pekerjaan u WHERE 1 "; break; - case 2: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_kawin u WHERE 1 "; break; - case 3: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_agama u WHERE 1 "; break; - case 4: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_sex u WHERE 1 "; break; - case 5: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_warganegara u WHERE 1 "; break; - case 6: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_status u WHERE 1 "; break; - case 7: $sql = "SELECT COUNT(id) AS id FROM tweb_golongan_darah u WHERE 1 "; break; - case 9: $sql = "SELECT COUNT(id) AS id FROM tweb_cacat u WHERE 1 "; break; - case 10: $sql = "SELECT COUNT(id) AS id FROM tweb_sakit_menahun u WHERE 1 "; break; - case 11: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_sex u WHERE 1 "; break; - case 12: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan_kk u WHERE 1 "; break; - case 13: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_umur u WHERE status = 1 "; break; - case 15: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_umur u WHERE status is null "; break; - case 14: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE left(nama,5)<> 'TAMAT' "; break; - - case 21: $sql = "SELECT COUNT(id) AS id FROM klasifikasi_analisis_keluarga u WHERE jenis='1' "; break; - case 22: $sql = "SELECT COUNT(id) AS id FROM ref_raskin u WHERE 1 "; break; - case 23: $sql = "SELECT COUNT(id) AS id FROM ref_blt u WHERE 1 "; break; - case 24: $sql = "SELECT COUNT(id) AS id FROM ref_bos u WHERE 1 "; break; - case 25: $sql = "SELECT COUNT(id) AS id FROM ref_pkh u WHERE 1 "; break; - case 26: $sql = "SELECT COUNT(id) AS id FROM ref_jampersal u WHERE 1 "; break; - case 27: $sql = "SELECT COUNT(id) AS id FROM ref_bedah_rumah u WHERE 1 "; break; - - default:$sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; - } - - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($lap=0,$o=0){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.id'; break; - case 2: $order_sql = ' ORDER BY u.id DESC'; break; - case 3: $order_sql = ' ORDER BY laki'; break; - case 4: $order_sql = ' ORDER BY laki DESC'; break; - case 5: $order_sql = ' ORDER BY jumlah'; break; - case 6: $order_sql = ' ORDER BY jumlah DESC'; break; - case 7: $order_sql = ' ORDER BY perempuan'; break; - case 8: $order_sql = ' ORDER BY perempuan DESC'; break; - default:$order_sql = ''; - } - switch($lap){ - case 0: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_kk_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_kk_id = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_kk_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_pendidikan_kk u WHERE 1"; break; - - case 1: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE pekerjaan_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE pekerjaan_id = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE pekerjaan_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_pekerjaan u WHERE 1 "; break; - - case 2: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_kawin = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_kawin = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_kawin = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_kawin u WHERE 1"; break; - - case 3: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE agama_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE agama_id = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE agama_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_agama u WHERE 1"; break; - - case 4: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE sex = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE sex = u.id AND sex=1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE sex = 2 AND sex=u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_sex u WHERE 1"; break; - - case 5: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE warganegara_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE warganegara_id = u.id AND sex=1 AND status_dasar=1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE warganegara_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_warganegara u WHERE 1"; break; - - case 6: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE status = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE status = u.id AND sex=1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE status = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_status u WHERE u.id <> 77 "; break; - - case 7: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE golongan_darah_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE golongan_darah_id = u.id AND sex=1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE golongan_darah_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_golongan_darah u WHERE 1"; break; - - case 9: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE cacat_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE cacat_id = u.id AND sex=1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE cacat_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_cacat u WHERE 1"; break; - - case 10: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE sakit_menahun_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE sakit_menahun_id = u.id AND sex=1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE sakit_menahun_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_sakit_menahun u WHERE 1"; break; - - case 11: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE jamkesmas = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE jamkesmas = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE jamkesmas = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM ref_jamkesmas u WHERE 1"; break; - - case 12: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_id = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_pendidikan u WHERE 1 "; - break; - - case 13: $sql = "SELECT u.*, concat( dari, ' - ', sampai) as nama, (SELECT COUNT(id) FROM tweb_penduduk WHERE (DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=u.dari AND (DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<=u.sampai AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah, (SELECT COUNT(id) FROM tweb_penduduk WHERE (DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=u.dari AND (DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<=u.sampai AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki, (SELECT COUNT(id) FROM tweb_penduduk WHERE (DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=u.dari AND (DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<=u.sampai AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_umur u WHERE status=1 "; break; - - case 14: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_sedang_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_sedang_id = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_sedang_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_pendidikan u WHERE left(nama,5)<> 'TAMAT'"; break; - - case 15: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 >= u.dari AND DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 <= u.sampai) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 >= u.dari AND DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 <= u.sampai AND sex=1) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 >= u.dari AND DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 <= u.sampai AND sex=2) AS perempuan FROM tweb_penduduk_umur u WHERE status is NULL "; break; - - - case 21: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE kelas_sosial = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM klasifikasi_analisis_keluarga u WHERE jenis='1'"; break; - case 22: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE raskin = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_raskin u WHERE 1 "; break; - case 23: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE id_blt = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_blt u WHERE 1 "; break; - case 24: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE id_bos = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_bos u WHERE 1 "; break; - case 25: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE id_pkh = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_pkh u WHERE 1 "; break; - case 26: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE id_jampersal = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_jampersal u WHERE 1 "; break; - case 27: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE id_bedah_rumah = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_bedah_rumah u WHERE 1 "; break; - - default:$sql = "SELECT u.* FROM tweb_penduduk_pendidikan u WHERE 1 "; - } - - $sql .= $order_sql; - $query = $this->db->query($sql); - $data=$query->result_array(); - - - if($lap<=20){ - $sql3 = "SELECT (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.status_dasar=1 AND (status = 1 OR status = 2)) AS jumlah, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.sex = 1 and status_dasar=1 AND (status = 1 OR status = 2)) AS laki, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.sex = 2 and status_dasar=1 AND (status = 1 OR status = 2)) AS perempuan"; - }else{ - $sql3 = "SELECT (SELECT COUNT(p.id) FROM tweb_keluarga p WHERE 1) AS jumlah, - (SELECT COUNT(p.id) FROM tweb_keluarga p WHERE 1) AS laki, - (SELECT COUNT(p.id) FROM tweb_keluarga p WHERE 1) AS perempuan"; - } - - $query3 = $this->db->query($sql3); - $bel = $query3->row_array(); - - $total['jumlah']=0; - $bel['no']=""; - $bel['id']="0"; - $bel['nama']="TOTAL"; - $total['laki']=0; - $total['perempuan']=0; - $i=0; - while($idb->query($sql); - $data = $query->row_array(); - return $data; - } - function list_data_rentang(){ - $sql = "SELECT * FROM tweb_penduduk_umur WHERE status=1 order by dari "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function get_rentang($id=0){ - $sql = "SELECT * FROM tweb_penduduk_umur WHERE id= $id "; - $query = $this->db->query($sql); - $data = $query->row_array(); - return $data; - } - function get_rentang_terakhir(){ - $sql = "SELECT (case when max(sampai) is null then '0' else (max(sampai)+1) end) as dari FROM tweb_penduduk_umur WHERE status=1 "; - $query = $this->db->query($sql); - $data = $query->row_array(); - return $data; - } - function insert_rentang(){ - $data = $_POST; - $data['status']=1; - $outp = $this->db->insert('tweb_penduduk_umur',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function update_rentang($id=0){ - $data = $_POST; - $sql = "UPDATE tweb_penduduk_umur SET nama='$data[nama]', dari='$data[dari]', sampai='$data[sampai]' WHERE id='$id' "; - $outp=$this->db->query($sql); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_rentang($id=0){ - $sql = "DELETE FROM tweb_penduduk_umur WHERE id='$id' "; - $outp=$this->db->query($sql); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all_rentang(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM tweb_penduduk_umur WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/laporan_perubahan_model.php b/donjo-app/models/laporan_perubahan_model.php deleted file mode 100644 index 9a19dce34..000000000 --- a/donjo-app/models/laporan_perubahan_model.php +++ /dev/null @@ -1,76 +0,0 @@ -db->query($sql); - $data=$query->result_array(); - return $data; - } - function list_data(){ - $sql = "SELECT x.dusun, -(SELECT COUNT(id_pend) FROM log_perubahan_penduduk c LEFT JOIN tweb_penduduk b ON c.id_pend=b.id WHERE b.sex ='1') AS lalu_L, -(SELECT COUNT(id_pend) FROM log_perubahan_penduduk c LEFT JOIN tweb_penduduk b ON c.id_pend=b.id WHERE b.sex ='1') AS lalu_P, -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='7') AS pecah_L , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='7') AS pecah_P , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='5') AS datang_L , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='5') AS datang_P , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='3') AS pergi_L , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='3') AS pergi_P , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='2') AS mati_L , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='2') AS mati_P -FROM tweb_wil_clusterdesa x WHERE rw='0' AND rt='0' "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function total_data(){ - $sql = "SELECT SUM(lalu_L) as tlaluL,SUM(lalu_P) as tlaluP,SUM(pecah_L) as tpecahL,SUM(pecah_P) as tpecahP,SUM(datang_L) as tdatangL,SUM(datang_p) as tdatangP,SUM(pergi_L) as tpergiL,SUM(pergi_P) as tpergiP,SUM(mati_L) as tmatiL,SUM(mati_P) as tmatiP FROM(SELECT x.dusun, -(SELECT COUNT(id_pend) FROM log_perubahan_penduduk c LEFT JOIN tweb_penduduk d ON c.id_pend=d.id WHERE d.sex ='1' ) AS lalu_L, -(SELECT COUNT(id_pend) FROM log_perubahan_penduduk c LEFT JOIN tweb_penduduk d ON c.id_pend=d.id WHERE d.sex ='1' ) AS lalu_P, -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='7') AS pecah_L , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='7') AS pecah_P , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='5') AS datang_L , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='5') AS datang_P , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='3') AS pergi_L , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='3') AS pergi_P , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='2') AS mati_L , -(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='2') AS mati_P -FROM tweb_wil_clusterdesa x WHERE rw='0' AND rt='0') as z "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/mandiri_model.php b/donjo-app/models/mandiri_model.php deleted file mode 100644 index f42a28ae0..000000000 --- a/donjo-app/models/mandiri_model.php +++ /dev/null @@ -1,186 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.nik LIKE '$kw' OR n.nama LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['nik'])){ - $kf = $_SESSION['nik']; - if($kf=="0"){ - $filter_sql= "";} else { - $filter_sql= " AND n.id = '".$kf."'";} - return $filter_sql; - } - } - function filterku_sql($nik=0){ - $kf = $nik; - if($kf==0){ - $filterku_sql= "";} else { - $filterku_sql= " AND u.id_pend = '".$kf."'";} - return $filterku_sql; - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_mandiri u - LEFT JOIN tweb_penduduk n ON u.nik = n.nik - WHERE 1"; - $sql .= $this->search_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.last_login'; break; - case 2: $order_sql = ' ORDER BY u.last_login DESC'; break; - - default:$order_sql = ' ORDER BY u.tanggal_buat'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - - $sql = "SELECT u.*,n.nama AS nama, n.nik AS nik - FROM tweb_penduduk_mandiri u - LEFT JOIN tweb_penduduk n ON u.nik = n.nik - WHERE 1 "; - - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($idb->query($sql,array($_POST['nik'])); - - $rpin = $this->generate_pin($_POST['pin']); - $hash_pin = hash_pin($rpin); - $data['pin'] = $hash_pin; - $data['nik'] = $_POST['nik']; - - $outp = $this->db->insert('tweb_penduduk_mandiri',$data); - - if($_POST['pin']!="") - return $_POST['pin']; - else - return $rpin; - } - function delete($id=''){ - $sql = "DELETE FROM tweb_penduduk_mandiri WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM tweb_penduduk_mandiri WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_penduduk(){ - $sql = "SELECT nik AS id,nik,nama FROM tweb_penduduk WHERE status = 1 AND nik<>'' "; - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - while($iinput->post('pass_lama')); - $pass_baru = $this->input->post('pass_baru'); - $pass_baru1 = $this->input->post('pass_baru1'); - $nama = $this->input->post('nama'); - - $sql = "SELECT password,id_grup,session FROM user WHERE id=?"; - $query=$this->db->query($sql,array($id)); - $row=$query->row(); - - if($password==$row->password){ - if($pass_baru == $pass_baru1){ - $pass_baru = md5($pass_baru); - $sql = "UPDATE user SET password=?,nama=? WHERE id=?"; - $outp = $this->db->query($sql,array($pass_baru,$nama,$id)); - } - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_grup(){ - $sql = "SELECT * FROM user_grup"; - $query = $this->db->query($sql); - return $query->result_array(); - } -} \ No newline at end of file diff --git a/donjo-app/models/modul_model.php b/donjo-app/models/modul_model.php deleted file mode 100644 index 44acccdc5..000000000 --- a/donjo-app/models/modul_model.php +++ /dev/null @@ -1,89 +0,0 @@ -search_sql(); - $sql .= $this->filter_sql(); - - $query = $this->db->query($sql); - $data = $query->result_array(); - - $i=0; - while($idb->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.modul LIKE '$kw' OR u.url LIKE '$kw')"; - return $search_sql; - } - } - - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND u.aktif = $kf"; - return $filter_sql; - } - } - function get_data($id=0){ - $sql = "SELECT * FROM setting_modul WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function update($id=0){ - $data = $_POST; - $this->db->where('id',$id); - $outp = $this->db->update('setting_modul',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM setting_modul WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM setting_modul WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } -} \ No newline at end of file diff --git a/donjo-app/models/pamong_model.php b/donjo-app/models/pamong_model.php deleted file mode 100644 index 82e510880..000000000 --- a/donjo-app/models/pamong_model.php +++ /dev/null @@ -1,110 +0,0 @@ -search_sql(); - $sql .= $this->filter_sql(); - - $query = $this->db->query($sql); - $data = $query->result_array(); - - $i=0; - while($idb->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.pamong_nama LIKE '$kw' OR u.pamong_nip LIKE '$kw' OR u.pamong_nik LIKE '$kw')"; - return $search_sql; - } - } - - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND u.pamong_status = $kf"; - return $filter_sql; - } - } - function get_data($id=0){ - $sql = "SELECT * FROM tweb_desa_pamong WHERE pamong_id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function insert(){ - $nip = penetration($this->input->post('pamong_nip')); - $nama = penetration($this->input->post('pamong_nama')); - $nik = penetration($this->input->post('pamong_nik')); - $jabatan = penetration($this->input->post('jabatan')); - $status = penetration($this->input->post('pamong_status')); - - $sql = "INSERT INTO tweb_desa_pamong (pamong_nama,pamong_nip,pamong_nik,jabatan,pamong_status,pamong_tgl_terdaftar) - VALUES (?,?,?,?,?,NOW())"; - - $outp = $this->db->query($sql, array($nama,$nip,$nik,$jabatan,$status)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $nip = $this->input->post('pamong_nip'); - $nama = penetration($this->input->post('pamong_nama')); - $nik = $this->input->post('pamong_nik'); - $jabatan = penetration($this->input->post('jabatan')); - $status = $this->input->post('pamong_status'); - - $sql = "UPDATE tweb_desa_pamong SET pamong_nama=?,pamong_nip=?,pamong_nik=?,jabatan=?,pamong_status=? WHERE pamong_id=?"; - $outp = $this->db->query($sql, array($nama,$nip,$nik,$jabatan,$status,$id)); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM tweb_desa_pamong WHERE pamong_id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM tweb_desa_pamong WHERE pamong_id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/penduduk_model.php b/donjo-app/models/penduduk_model.php deleted file mode 100644 index bfba2a44d..000000000 --- a/donjo-app/models/penduduk_model.php +++ /dev/null @@ -1,1093 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->query($sql); - $data = $query->result_array(); - - return $data; - } - function dn(){ - $sql = "SELECT nik FROM tweb_penduduk WHERE 1 "; - $query = $this->db->query($sql); - $data = $query->result_array(); - - return $data; - } - function search_sql(){ - if(isset($_SESSION['cari'])){ - $cari = $_SESSION['cari']; - $kw = penetration($this->db->escape_like_str($cari)); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.nama LIKE '$kw' OR u.nik LIKE '$kw' OR d.no_kk LIKE '$kw')"; - return $search_sql; - } - } - function sex_sql(){ - if(isset($_SESSION['sex'])){ - $kf = $_SESSION['sex']; - $sex_sql= " AND u.sex = $kf"; - return $sex_sql; - } - } - function dusun_sql(){ - if(isset($_SESSION['dusun'])){ - $kf = $_SESSION['dusun']; - $dusun_sql= " AND a.dusun = '$kf'"; - return $dusun_sql; - } - } - function rw_sql(){ - if(isset($_SESSION['rw'])){ - $kf = $_SESSION['rw']; - $rw_sql= " AND a.rw = '$kf'"; - return $rw_sql; - } - } - function rt_sql(){ - if(isset($_SESSION['rt'])){ - $kf = $_SESSION['rt']; - $rt_sql= " AND a.rt = '$kf'"; - return $rt_sql; - } - } - function agama_sql(){ - if(isset($_SESSION['agama'])){ - $kf = $_SESSION['agama']; - $agama_sql= " AND u.agama_id = $kf"; - return $agama_sql; - } - } - function warganegara_sql(){ - if(isset($_SESSION['warganegara'])){ - $kf = $_SESSION['warganegara']; - $warganegara_sql= " AND u.warganegara_id = $kf"; - return $warganegara_sql; - } - } - function golongan_darah_sql(){ - if(isset($_SESSION['golongan_darah'])){ - $kf = $_SESSION['golongan_darah']; - $golongan_darah_sql= " AND u.golongan_darah_id = $kf"; - return $golongan_darah_sql; - } - } - function pekerjaan_sql(){ - if(isset($_SESSION['pekerjaan_id'])){ - $kf = $_SESSION['pekerjaan_id']; - $pekerjaan_sql= " AND u.pekerjaan_id = $kf"; - return $pekerjaan_sql; - } - } - function cacat_sql(){ - if(isset($_SESSION['cacat'])){ - $kf = $_SESSION['cacat']; - $cacat_sql= " AND u.cacat_id = $kf"; - return $cacat_sql; - } - } - function hubungan_sql(){ - if(isset($_SESSION['hubungan'])){ - $kf = $_SESSION['hubungan']; - $cacat_sql= " AND u.kk_level = $kf"; - return $cacat_sql; - } - } - function cacatx_sql(){ - if(isset($_SESSION['cacatx'])){ - $kf = $_SESSION['cacatx']; - $cacatx_sql= " AND u.cacat_id <> $kf AND u.cacat_id is not null and u.cacat_id<>''"; - return $cacatx_sql; - } - } - function menahun_sql(){ - if(isset($_SESSION['menahun'])){ - $kf = $_SESSION['menahun']; - $menahun_sql= " AND u.sakit_menahun_id = $kf"; - return $menahun_sql; - } - } - function menahunx_sql(){ - if(isset($_SESSION['menahunx'])){ - $kf = $_SESSION['menahunx']; - $menahunx_sql= " AND u.sakit_menahun_id <> $kf and u.sakit_menahun_id is not null and u.sakit_menahun_id<>'0' "; - return $menahunx_sql; - } - } - function statuskawin_sql(){ - if(isset($_SESSION['status'])){ - $kf = $_SESSION['status']; - $statuskawin_sql= " AND u.status_kawin = $kf"; - return $statuskawin_sql; - } - } - function pendidikan_kk_sql(){ - if(isset($_SESSION['pendidikan_kk_id'])){ - $kf = $_SESSION['pendidikan_kk_id']; - $pendidikan_kk_sql= " AND u.pendidikan_kk_id = $kf"; - return $pendidikan_kk_sql; - } - } - function hamil_sql(){ - if(isset($_SESSION['hamil'])){ - $kf = $_SESSION['hamil']; - $hamil_sql= " AND u.hamil = $kf"; - return $hamil_sql; - } - } - function pendidikan_sedang_sql(){ - if(isset($_SESSION['pendidikan_sedang_id'])){ - $kf = $_SESSION['pendidikan_sedang_id']; - $pendidikan_sedang_sql= " AND u.pendidikan_sedang_id = $kf"; - return $pendidikan_sedang_sql; - } - } - function status_penduduk_sql(){ - if(isset($_SESSION['status_penduduk'])){ - $kf = $_SESSION['status_penduduk']; - $status_penduduk_sql= " AND u.status = $kf"; - return $status_penduduk_sql; - } - } - function umur_max_sql(){ - if(isset($_SESSION['umur_max'])){ - $kf = $_SESSION['umur_max']; - $umur_max_sql= " AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) <= $kf "; - return $umur_max_sql; - } - } - function umur_min_sql(){ - if(isset($_SESSION['umur_min'])){ - $kf = $_SESSION['umur_min']; - $umur_min_sql= " AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) >= $kf "; - return $umur_min_sql; - } - } - function umur_sql(){ - if(isset($_SESSION['umurx'])){ - $kf = $_SESSION['umurx']; - $umur_sql= " AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) >= (SELECT dari FROM tweb_penduduk_umur WHERE id=$kf ) AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) <= (SELECT sampai FROM tweb_penduduk_umur WHERE id=$kf ) "; - return $umur_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - if($kf == '77'){ - $filter_sql= " AND (u.status = 1 OR u.status = 2) "; - }else - $filter_sql= " AND u.status = $kf"; - return $filter_sql; - } - } - function duplikat_sql(){ - if(isset($_SESSION['duplikat'])){ - $duplikat_sql= " AND u.id NOT IN (SELECT id FROM tweb_penduduk GROUP BY nik, nama HAVING COUNT(*) = 1) "; - return $duplikat_sql; - } - } - function status_dasar_sql(){ - if(isset($_SESSION['status_dasar'])){ - $kf = $_SESSION['status_dasar']; - $status_dasar= " AND u.status_dasar = $kf"; - return $status_dasar; - } - } - function log_sql(){ - if(isset($_SESSION['log'])){ - $log_sql= " AND u.id > 1 AND u.id IN (SELECT id_pend FROM log_penduduk)"; - return $log_sql; - }else{ - $log_sql = ""; - //$log_sql= " AND u.status_dasar = 1 "; - return $log_sql; - } - } - function paging($p=1,$o=0,$log=0){ - $sql = "SELECT COUNT(u.id) AS id FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa a ON u.id_cluster = a.id LEFT JOIN tweb_keluarga d ON u.id_kk = d.id LEFT JOIN tweb_penduduk_pendidikan_kk n ON u.pendidikan_kk_id = n.id LEFT JOIN tweb_penduduk_pekerjaan p ON u.pekerjaan_id = p.id LEFT JOIN tweb_penduduk_kawin k ON u.status_kawin = k.id LEFT JOIN tweb_penduduk_sex x ON u.pendidikan_id = x.id LEFT JOIN tweb_penduduk_agama g ON u.agama_id = g.id LEFT JOIN tweb_penduduk_warganegara v ON u.warganegara_id = v.id LEFT JOIN tweb_golongan_darah m ON u.golongan_darah_id = m.id LEFT JOIN tweb_cacat f ON u.cacat_id = f.id LEFT JOIN tweb_sakit_menahun j ON u.sakit_menahun_id = j.id WHERe 1 "; - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->duplikat_sql(); - $sql .= $this->status_dasar_sql(); - $sql .= $this->sex_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $this->hubungan_sql(); - $sql .= $this->agama_sql(); - $sql .= $this->cacat_sql(); - $sql .= $this->cacatx_sql(); - $sql .= $this->menahun_sql(); - $sql .= $this->menahunx_sql(); - $sql .= $this->golongan_darah_sql(); - $sql .= $this->warganegara_sql(); - $sql .= $this->umur_min_sql(); - $sql .= $this->umur_max_sql(); - $sql .= $this->pekerjaan_sql(); - $sql .= $this->statuskawin_sql(); - $sql .= $this->pendidikan_kk_sql(); - $sql .= $this->pendidikan_sedang_sql(); - $sql .= $this->status_penduduk_sql(); - $sql .= $this->hamil_sql(); - $sql .= $this->umur_sql(); - $sql .= $this->log_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500,$log=0){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.nik'; break; - case 2: $order_sql = ' ORDER BY u.nik DESC'; break; - case 3: $order_sql = ' ORDER BY u.nama'; break; - case 4: $order_sql = ' ORDER BY u.nama DESC'; break; - case 5: $order_sql = ' ORDER BY d.no_kk'; break; - case 6: $order_sql = ' ORDER BY d.no_kk DESC'; break; - case 7: $order_sql = ' ORDER BY umur'; break; - case 8: $order_sql = ' ORDER BY umur DESC'; break; - default:$order_sql = ''; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - if($log==1) - $sql = "SELECT u.id,u.nik,u.tanggallahir,u.tempatlahir,u.status,u.status_dasar,u.id_kk,u.nama,u.nama_ayah,u.nama_ibu,a.dusun,a.rw,a.rt,d.no_kk AS no_kk,(SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) AS umur,x.nama AS sex,sd.nama AS pendidikan_sedang,n.nama AS pendidikan,p.nama AS pekerjaan,k.nama AS kawin,g.nama AS agama,m.nama AS gol_darah,hub.nama AS hubungan,log.tgl_peristiwa,log.id_detail AS status_dasar_log FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa a ON u.id_cluster = a.id LEFT JOIN tweb_keluarga d ON u.id_kk = d.id LEFT JOIN tweb_penduduk_pendidikan_kk n ON u.pendidikan_kk_id = n.id LEFT JOIN tweb_penduduk_pendidikan sd ON u.pendidikan_sedang_id = sd.id LEFT JOIN tweb_penduduk_pekerjaan p ON u.pekerjaan_id = p.id LEFT JOIN tweb_penduduk_kawin k ON u.status_kawin = k.id LEFT JOIN tweb_penduduk_sex x ON u.sex = x.id LEFT JOIN tweb_penduduk_agama g ON u.agama_id = g.id LEFT JOIN tweb_penduduk_warganegara v ON u.warganegara_id = v.id LEFT JOIN tweb_golongan_darah m ON u.golongan_darah_id = m.id LEFT JOIN tweb_cacat f ON u.cacat_id = f.id LEFT JOIN tweb_penduduk_hubungan hub ON u.kk_level = hub.id LEFT JOIN tweb_sakit_menahun j ON u.sakit_menahun_id = j.id LEFT JOIN log_penduduk log ON u.id = log.id_pend WHERE 1 "; - else - $sql = "SELECT u.id,u.nik,u.tanggallahir,u.tempatlahir,u.status,u.status_dasar,u.id_kk,u.nama,u.nama_ayah,u.nama_ibu,a.dusun,a.rw,a.rt,d.no_kk AS no_kk,(SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) AS umur,x.nama AS sex,sd.nama AS pendidikan_sedang,n.nama AS pendidikan,p.nama AS pekerjaan,k.nama AS kawin,g.nama AS agama,m.nama AS gol_darah,hub.nama AS hubungan,b.no_kk AS no_rtm,b.id AS id_rtm - FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa a ON u.id_cluster = a.id LEFT JOIN tweb_keluarga d ON u.id_kk = d.id LEFT JOIN tweb_rtm b ON u.id_rtm = b.id LEFT JOIN tweb_penduduk_pendidikan_kk n ON u.pendidikan_kk_id = n.id LEFT JOIN tweb_penduduk_pendidikan sd ON u.pendidikan_sedang_id = sd.id LEFT JOIN tweb_penduduk_pekerjaan p ON u.pekerjaan_id = p.id LEFT JOIN tweb_penduduk_kawin k ON u.status_kawin = k.id LEFT JOIN tweb_penduduk_sex x ON u.sex = x.id LEFT JOIN tweb_penduduk_agama g ON u.agama_id = g.id LEFT JOIN tweb_penduduk_warganegara v ON u.warganegara_id = v.id LEFT JOIN tweb_golongan_darah m ON u.golongan_darah_id = m.id LEFT JOIN tweb_cacat f ON u.cacat_id = f.id LEFT JOIN tweb_penduduk_hubungan hub ON u.kk_level = hub.id LEFT JOIN tweb_sakit_menahun j ON u.sakit_menahun_id = j.id WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->duplikat_sql(); - $sql .= $this->status_dasar_sql(); - $sql .= $this->sex_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $this->hubungan_sql(); - $sql .= $this->agama_sql(); - $sql .= $this->cacat_sql(); - $sql .= $this->cacatx_sql(); - $sql .= $this->menahun_sql(); - $sql .= $this->menahunx_sql(); - $sql .= $this->warganegara_sql(); - $sql .= $this->golongan_darah_sql(); - $sql .= $this->umur_min_sql(); - $sql .= $this->umur_max_sql(); - $sql .= $this->pekerjaan_sql(); - $sql .= $this->statuskawin_sql(); - $sql .= $this->pendidikan_sedang_sql(); - $sql .= $this->pendidikan_kk_sql(); - $sql .= $this->umur_sql(); - $sql .= $this->status_penduduk_sql(); - $sql .= $this->log_sql(); - $sql .= $this->hamil_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($isearch_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->sex_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $this->agama_sql(); - $sql .= $this->cacat_sql(); - $sql .= $this->cacatx_sql(); - $sql .= $this->menahun_sql(); - $sql .= $this->menahunx_sql(); - $sql .= $this->warganegara_sql(); - $sql .= $this->golongan_darah_sql(); - $sql .= $this->umur_min_sql(); - $sql .= $this->umur_max_sql(); - $sql .= $this->pekerjaan_sql(); - $sql .= $this->statuskawin_sql(); - $sql .= $this->pendidikan_sedang_sql(); - $sql .= $this->pendidikan_kk_sql(); - $sql .= $this->umur_sql(); - $sql .= $this->status_penduduk_sql(); - $sql .= $this->hamil_sql(); - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - while($idb->insert('tweb_penduduk',$data); - - $sql="SELECT MAX(id) as id FROM tweb_penduduk"; - $query = $this->db->query($sql); - $data = $query->row_array(); - $idku = $data['id']; - - $satuan=$_POST['tanggallahir']; - $blnlahir = substr($satuan,3,2); - $thnlahir= substr($satuan,6,4); - $blnskrg = (date("m")); - $thnskrg = (date("Y")); - if($_POST['status']=='3'){ - $log['id_detail']="8"; - }else{ - if(($blnlahir==$blnskrg)and($thnlahir==$thnskrg)){ - $log['id_detail']='1'; - }else{ - $log['id_detail']='5'; - } - } - $log['id_pend'] = $idku; - - $log['bulan'] = date("m"); - $log['tahun'] = date("Y"); - $log['tgl_peristiwa'] = date("d-m-Y"); - $outp = $this->db->insert('log_penduduk',$log); - - $log1['id_pend'] = $idku; - $log1['id_cluster'] = 1; - $log1['tanggal'] = date("m-d-y"); - $outp = $this->db->insert('log_perubahan_penduduk',$log1); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - - $sql = "SELECT id_kk FROM tweb_penduduk WHERE id=?"; - $query = $this->db->query($sql,$id); - $pend = $query->row_array(); - - if($data['kk_level']==1){ - $lvl['kk_level'] = 11; - $this->db->where('id_kk',$pend['id_kk']); - $this->db->where('kk_level',1); - $this->db->update('tweb_penduduk',$lvl); - - $nik['nik_kepala'] = $id; - $this->db->where('id',$pend['id_kk']); - $outp = $this->db->update('tweb_keluarga',$nik); - } - - $lokasi_file = $_FILES['foto']['tmp_name']; - $tipe_file = $_FILES['foto']['type']; - $nama_file = $_FILES['foto']['name']; - $old_foto = $data['old_foto']; - if (!empty($lokasi_file)){ - if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ - unset($data['foto']); - } else { - UploadFoto($nama_file,$old_foto); - $data['foto'] = $nama_file; - } - }else{ - unset($data['foto']); - } - - unset($data['file_foto']); - unset($data['old_foto']); - - $data['nama'] = $data['nama']; - $data['nama_ayah'] = $data['nama_ayah']; - $data['nama_ibu'] = $data['nama_ibu']; - - $data['tanggallahir'] = tgl_indo_in($data['tanggallahir']); - $data['tanggalperkawinan'] = tgl_indo_in($data['tanggalperkawinan']); - $data['tanggalperceraian'] = tgl_indo_in($data['tanggalperceraian']); - - $this->db->where('id',$id); - $outp = $this->db->update('tweb_penduduk',$data); - - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update_position($id=0){ - $sql = "SELECT id FROM tweb_penduduk_map WHERE id=?"; - $query = $this->db->query($sql,$id); - $cek = $query->row_array(); - - $data = $_POST; - unset($data['zoom']); - unset($data['map_tipe']); - if($cek['id']==$id){ - if($data['lat']){ - $this->db->where('id',$id); - $outp = $this->db->update('tweb_penduduk_map',$data); - } - }else{ - if($data['lat']){ - $data['id'] = $id; - $outp = $this->db->insert('tweb_penduduk_map',$data); - } - } - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function get_penduduk_map($id=0){ - $sql = "SELECT m.*,p.nama FROM tweb_penduduk_map m LEFT JOIN tweb_penduduk p ON m.id = p.id WHERE m.id = ? "; - $query = $this->db->query($sql,$id); - return $query->row_array(); - } - function update_status_dasar($id=0){ - $data['status_dasar'] = $_POST['status_dasar']; - $this->db->where('id',$id); - $this->db->update('tweb_penduduk',$data); - - //pindah luar desa - if($data['status_dasar'] == 3){ - $out['id_kk'] = ''; - $out['kk_level'] = ''; - $this->db->where('id',$id); - $this->db->update('tweb_penduduk',$out); - } - - $log['id_pend'] = $id; - $log['tgl_peristiwa'] = rev_tgl($_POST['tgl_peristiwa']); - $log['id_detail'] = $data['status_dasar']; - $log['bulan'] = date("m"); - $log['tahun'] = date("Y"); - $outp = $this->db->insert('log_penduduk',$log); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM tweb_penduduk WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM tweb_penduduk WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function adv_search_proses(){ - UNSET($_POST['umur1']); - UNSET($_POST['umur2']); - - UNSET($_POST['dusun']); - UNSET($_POST['rt']); - UNSET($_POST['rw']); - $i=0; - while($i++ < count($_POST)){ - $col[$i] = key($_POST); - next($_POST); - } - $i=0; - while($i++ < count($col)){ - if($_POST[$col[$i]]=="") - UNSET($_POST[$col[$i]]); - } - - $data=$_POST; - print_r($data); - $this->db->where($data); - return $this->db->get('tweb_penduduk'); - } - - function get_penduduk($id=0){ - $sql = "SELECT u.sex as id_sex,u.*,a.dusun,a.rw,a.rt,t.nama AS status,o.nama AS pendidikan_sedang, - b.nama AS pendidikan_kk,d.no_kk AS no_kk, - ( - SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id - ) - AS umur,x.nama AS sex,w.nama AS warganegara,n.nama AS pendidikan,p.nama AS pekerjaan,k.nama AS kawin,g.nama AS agama,ct.nama AS cacat - FROM tweb_penduduk u - LEFT JOIN tweb_wil_clusterdesa a ON u.id_cluster = a.id - LEFT JOIN tweb_keluarga d ON u.id_kk = d.id - LEFT JOIN tweb_penduduk_pendidikan n ON u.pendidikan_id = n.id - LEFT JOIN tweb_penduduk_pendidikan o ON u.pendidikan_sedang_id = o.id - LEFT JOIN tweb_penduduk_pendidikan_kk b ON u.pendidikan_kk_id = b.id - LEFT JOIN tweb_penduduk_warganegara w ON u.warganegara_id = w.id - LEFT JOIN tweb_penduduk_status t ON u.status = t.id - LEFT JOIN tweb_penduduk_pekerjaan p ON u.pekerjaan_id = p.id - LEFT JOIN tweb_penduduk_kawin k ON u.status_kawin = k.id - LEFT JOIN tweb_penduduk_sex x ON u.sex = x.id - LEFT JOIN tweb_cacat ct ON u.cacat_id = ct.id - LEFT JOIN tweb_penduduk_agama g ON u.agama_id = g.id WHERE u.id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - $data['tanggallahir'] = tgl_indo_out($data['tanggallahir']); - $data['tanggalperkawinan'] = tgl_indo_out($data['tanggalperkawinan']); - $data['tanggalperceraian'] = tgl_indo_out($data['tanggalperceraian']); - return $data; - } - - function list_wil(){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE zoom > '0'"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function list_dusun(){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function list_rw($dusun=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND dusun = ? AND rw <> '0'"; - $query = $this->db->query($sql,$dusun); - $data=$query->result_array(); - return $data; - } - - function list_rt($dusun='',$rw=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rw = ? AND dusun = ? AND rt <> '0'"; - $query = $this->db->query($sql,array($rw,$dusun)); - $data=$query->result_array(); - return $data; - } - - function list_rw_all(){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw <> '0'"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function list_rt_all(){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt <> '0' AND rw <> '-'"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function list_agama(){ - $sql = "SELECT * FROM tweb_penduduk_agama WHERE 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function list_hubungan(){ - $sql = "SELECT * FROM tweb_penduduk_hubungan WHERE 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function list_pendidikan(){ - $sql = "SELECT * FROM tweb_penduduk_pendidikan WHERE 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function list_pendidikan_telah(){ - $sql = "SELECT * FROM tweb_penduduk_pendidikan WHERE left(nama,6)<> 'SEDANG' "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function list_pendidikan_sedang(){ - $sql = "SELECT * FROM tweb_penduduk_pendidikan WHERE left(nama,5)<> 'TAMAT' "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function list_pendidikan_kk(){ - $sql = "SELECT * FROM tweb_penduduk_pendidikan_kk WHERE 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function list_pekerjaan(){ - $sql = "SELECT * FROM tweb_penduduk_pekerjaan WHERE 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function list_warganegara(){ - $sql = "SELECT * FROM tweb_penduduk_warganegara WHERE 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function list_status_kawin(){ - $sql = "SELECT * FROM tweb_penduduk_kawin WHERE 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function list_golongan_darah(){ - $sql = "SELECT * FROM tweb_golongan_darah WHERE 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function list_cacat(){ - $sql = "SELECT * FROM tweb_cacat WHERE 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function list_sakit_menahun(){ - $sql = "SELECT * FROM tweb_sakit_menahun WHERE 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function get_desa(){ - $sql = "SELECT * FROM config WHERE 1"; - $query = $this->db->query($sql); - return $query->row_array(); - } - function pindah_proses($id=0,$id_cluster=''){ - $this->db->where('id',$id); - $data['id_cluster'] = $id_cluster; - $outp = $this->db->update('tweb_penduduk',$data); - - $log['id_pend'] = $id; - $log['id_detail'] = "6"; - $log['bulan'] = date("m"); - $log['tahun'] = date("Y"); - $outp = $this->db->insert('log_penduduk',$log); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - /* - - unset($_SESSION['filter']); - unset($_SESSION['sex']); - unset($_SESSION['warganegara']); - unset($_SESSION['cacat']); - unset($_SESSION['menahun']); - unset($_SESSION['golongan_darah']); - unset($_SESSION['dusun']); - unset($_SESSION['rw']); - unset($_SESSION['rt']); - unset($_SESSION['hubungan']); - unset($_SESSION['agama']); - unset($_SESSION['umur_min']); - unset($_SESSION['umur_max']); - unset($_SESSION['pekerjaan_id']); - unset($_SESSION['pendidikan_sedang_id']); - unset($_SESSION['pendidikan_kk_id']); - unset($_SESSION['status_penduduk']); - unset($_SESSION['hamil']); - */ - - function list_filter($id=0){ - if($id != 0){ - $kf = ""; - $head = ""; - switch($id){ - case 1: $table = 'tweb_penduduk_hubungan'; if(isset($_SESSION['hubungan'])){$head = "STATUS HUBUNGAN DALAM KELUARGA";$kf = $_SESSION['hubungan'];} break; - case 2: $table = 'tweb_penduduk_agama'; if(isset($_SESSION['agama'])){$head = "AGAMA";$kf = $_SESSION['agama'];} break; - case 3: $table = 'tweb_penduduk_pendidikan_kk'; if(isset($_SESSION['pendidikan_kk_id'])){$head = "PENDIDIKAN DALAM KK";$kf = $_SESSION['pendidikan_kk_id'];} break; - case 4: $table = 'tweb_penduduk_pendidikan'; if(isset($_SESSION['pendidikan_sedang_id'])){$head = "PENDIDIKAN SEDANG DITEMPUH";$kf = $_SESSION['pendidikan_sedang_id'];} break; - case 5: $table = 'tweb_penduduk_pekerjaan'; if(isset($_SESSION['pekerjaan_id'])){$head = "PEKERJAAN";$kf = $_SESSION['pekerjaan_id'];} break; - case 6: $table = 'tweb_penduduk_kawin'; if(isset($_SESSION['status'])){$head = "STATUS PERKAWINAN";$kf = $_SESSION['status'];} break; - case 7: $table = 'tweb_penduduk_warganegara'; if(isset($_SESSION['warganegara'])){$head = "KEWARGANEGARAAN";$kf = $_SESSION['warganegara'];} break; - case 8: $table = 'tweb_golongan_darah'; if(isset($_SESSION['golongan_darah'])){$head = "GOLONGAN DARAH";$kf = $_SESSION['golongan_darah'];} break; - case 9: $table = 'tweb_penduduk_sex'; if(isset($_SESSION['sex'])){$head = "JENIS KELAMIN";$kf = $_SESSION['sex'];} break; - case 10: $table = 'tweb_penduduk_status'; if(isset($_SESSION['filter'])){$head = "STATUS PENDUDUK";$kf = $_SESSION['filter'];} break; - case 11: /*$table = 'tweb_status_dasar'; if(isset($_SESSION['status_dasar'])){$head = "STATUS DASAR";$kf = $_SESSION['status_dasar'];}*/ break; - case 12: $table = 'tweb_cacat'; if(isset($_SESSION['cacat'])){$head = "DIFABLE";$kf = $_SESSION['cacat'];} break; - default: $table = ""; - } - - if($kf != ""){ - $sql = "SELECT nama FROM $table WHERE id IN ($kf)"; - $query = $this->db->query($sql); - $data = $query->result_array(); - if(count($data) > 0){ - - $br = " "; - $rn = "\r\n"; - //$out = "| ".$head.":"; - $out = " _ "; - - $i=0; - while($ilist_filter($i); - $i++; - } - if($data!=""){ - $data[0] = ""; - $data[1] = ""; - } - return $data; - } - - function get_judul_statistik($tipe=0,$nomor=1){ - switch($tipe){ - case 0: $sql = "SELECT * FROM tweb_penduduk_pendidikan WHERE id=?";break; - case 1: $sql = "SELECT * FROM tweb_penduduk_pekerjaan WHERE id=?";break; - case 2: $sql = "SELECT * FROM tweb_penduduk_kawin WHERE id=?";break; - case 3: $sql = "SELECT * FROM tweb_penduduk_agama WHERE id=?";break; - case 4: $sql = "SELECT * FROM tweb_penduduk_sex WHERE id=?";break; - case 5: $sql = "SELECT * FROM tweb_penduduk_warganegara WHERE id=?";break; - case 6: $sql = "SELECT * FROM tweb_penduduk_status WHERE id=?";break; - case 7: $sql = "SELECT * FROM tweb_golongan_darah WHERE id=?";break; - case 9: $sql = "SELECT * FROM tweb_cacat WHERE id=?";break; - case 10: $sql = "SELECT * FROM tweb_sakit_menahun WHERE id=?";break; - case 11: $sql = "SELECT * FROM ref_jamkesmas WHERE id=?";break; - case 12: $sql = "SELECT * FROM tweb_penduduk_pendidikan_kk WHERE id=?";break; - case 13: $sql = "SELECT * FROM tweb_penduduk_umur WHERE id=?";break; - case 14: $sql = "SELECT * FROM tweb_penduduk_pendidikan WHERE id=?";break; - } - $query = $this->db->query($sql,$nomor); - return $query->row_array(); - } - function get_cluster($id_cluster=0){ - - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE id=$id_cluster "; - $query = $this->db->query($sql); - return $query->row_array(); - } - function randomap(){ - $sql = "SELECT u.id,id_cluster,map.lat,map.lng FROM tweb_penduduk u LEFT JOIN tweb_penduduk_map map ON u.id = map.id WHERE 1 "; - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - while($igenerateRandomString2(1); - $lng .= $this->generateRandomString2(1); - - $lat .= $this->generateRandomString(17); - $lng .= $this->generateRandomString(17); - - $data2['lat'] = $lat; - $data2['lng'] = $lng; - $data2['id'] = $id; - $this->db->insert('tweb_penduduk_map',$data2); - - $i++; - } - } - function generateRandomString($length = 5) { - $characters = '0123456789'; - $charactersLength = strlen($characters); - $randomString = ''; - for ($i = 0; $i < $length; $i++) { - $randomString .= $characters[rand(0, $charactersLength - 1)]; - } - return $randomString; - } - function generateRandomString2($length = 1) { - $characters = '5678'; - $charactersLength = strlen($characters); - $randomString = ''; - for ($i = 0; $i < $length; $i++) { - $randomString .= $characters[rand(0, $charactersLength - 1)]; - } - return $randomString; - } - function coba2(){ - $mypath="surat\\undangan\\"; - $mypath_arsip="surat\\arsip\\"; - - $path = "".str_replace("\\","/",$mypath); - $path_arsip = "".str_replace("\\","/",$mypath_arsip); - - $file = $path."pemuda.rtf"; - if(is_file($file)){ - $buffer2 =""; - - $handle = fopen($file,'r'); - $b = stream_get_contents($handle); - - $c = Parse_Data($b,'\expshrtn','{\*\themedata'); - $c = "\expshrtn".$c; - $awal = Parse_Data($b,'{','\expshrtn'); - $awal = "{".$awal; - $akhir = strstr($b,'{\*\themedata'); - - $data = $this->list_data(); - $i=1; - $h = substr_count($c,"fxnama"); - $h = 4; - $j=count($data); - $k =1; - $buffer=$c; - foreach($data AS $d){ - if($d['sex']=="PEREMPUAN") - $sex = "Sdri."; - else - $sex = "Sdr."; - - $alamat = $d['dusun'].", RT ".$d['rt']."/RW ".$d['rw']; - $buffer=str_replace("fxnama$k","\caps $d[nama]",$buffer); - $buffer=str_replace("fxalamat$k","\caps $alamat",$buffer); - $buffer=str_replace("fxpre$k","\caps $sex",$buffer); - - if($k==$h){ - $k=0; - - if($i>=$j) - $buffer2 .= $buffer; - else - $buffer2 .= $buffer." \page "; - - $buffer=$c; - } - - $k++; - $i++; - } - $buffer2 .= " \page ".$buffer; - - $buffers = $awal.$buffer2.$akhir; - - $berkas_arsip = $path_arsip."undangan.rtf"; - $handle = fopen($berkas_arsip,'w+'); - fwrite($handle,$buffers); - fclose($handle); - $_SESSION['success']=8; - header("location:".base_url($berkas_arsip)); - } - - } - - function list_dokumen($id=""){ - $sql = "SELECT * FROM dokumen WHERE id_pend = ? "; - $query = $this->db->query($sql,$id); - $data=null; - if($query) - $data=$query->result_array(); - - $i=0; - while($idb->query($sql,$id); - $data=null; - if($query) - $data=$query->result_array(); - - $i=0; - while($idb->insert('dokumen',$data); - if($outp) $_SESSION['success']=1; - } else { - $_SESSION['success']=-1; - } - } - function delete_dokumen($id=''){ - $sql = "DELETE FROM dokumen WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all_dokumen(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM dokumen WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function get_dokumen($id=0){ - $sql = "SELECT * FROM dokumen WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } -} \ No newline at end of file diff --git a/donjo-app/models/plan_area_model.php b/donjo-app/models/plan_area_model.php deleted file mode 100644 index 9b183570f..000000000 --- a/donjo-app/models/plan_area_model.php +++ /dev/null @@ -1,238 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND l.nama LIKE '$kw'"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND l.enabled = $kf"; - return $filter_sql; - } - } - function polygon_sql(){ - if(isset($_SESSION['polygon'])){ - $kf = $_SESSION['polygon']; - $polygon_sql= " AND p.id = $kf"; - return $polygon_sql; - } - } - function subpolygon_sql(){ - if(isset($_SESSION['subpolygon'])){ - $kf = $_SESSION['subpolygon']; - $subpolygon_sql= " AND m.id = $kf"; - return $subpolygon_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(l.id) AS id FROM area l LEFT JOIN polygon p ON l.ref_polygon = p.id LEFT JOIN polygon m ON p.parrent = m.id WHERE 1 "; - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->polygon_sql(); - $sql .= $this->subpolygon_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - switch($o){ - case 1: $order_sql = ' ORDER BY nama'; break; - case 2: $order_sql = ' ORDER BY nama DESC'; break; - case 3: $order_sql = ' ORDER BY enabled'; break; - case 4: $order_sql = ' ORDER BY enabled DESC'; break; - default:$order_sql = ' ORDER BY id'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT l.*,p.nama AS kategori,m.nama AS jenis,p.simbol AS simbol,p.color AS color FROM area l LEFT JOIN polygon p ON l.ref_polygon = p.id LEFT JOIN polygon m ON p.parrent = m.id "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->polygon_sql(); - $sql .= $this->subpolygon_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($idb->insert('area',$data); - } - }else{ - unset($data['foto']); - $outp = $this->db->insert('area',$data); - } - - if($outp) - $_SESSION['success']=1; - else - $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $area_file = $_FILES['foto']['tmp_name']; - $tipe_file = $_FILES['foto']['type']; - $nama_file = $_FILES['foto']['name']; - if (!empty($area_file)){ - if ($tipe_file == "image/jpg" OR $tipe_file == "image/jpeg"){ - Uploadarea($nama_file); - $data['foto'] = $nama_file; - $this->db->where('id',$id); - $outp = $this->db->update('area',$data); - } - }else{ - unset($data['foto']); - $this->db->where('id',$id); - $outp = $this->db->update('area',$data); - } - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM area WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM area WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function list_polygon(){ - $sql = "SELECT * FROM polygon WHERE tipe = 2 "; - - if(isset($_SESSION['subpolygon'])){ - $kf = $_SESSION['subpolygon']; - $sql .= " AND parrent = $kf"; - } - - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function list_subpolygon(){ - $sql = "SELECT * FROM polygon WHERE tipe = 0 "; - - if(isset($_SESSION['polygon'])){ - - $sqlx = "SELECT * FROM polygon WHERE id = ?"; - $query = $this->db->query($sqlx,$_SESSION['polygon']); - $temp=$query->row_array(); - - $kf = $temp['parrent']; - - - } - - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function area_lock($id='',$val=0){ - - $sql = "UPDATE area SET enabled=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_area($id=0){ - $sql = "SELECT * FROM area WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function update_position($id=0){ - $data = $_POST; - $this->db->where('id',$id); - $outp = $this->db->update('area',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function list_dusun(){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function get_desa(){ - $sql = "SELECT * FROM config WHERE 1"; - $query = $this->db->query($sql); - return $query->row_array(); - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/plan_garis_model.php b/donjo-app/models/plan_garis_model.php deleted file mode 100644 index 5fed9c770..000000000 --- a/donjo-app/models/plan_garis_model.php +++ /dev/null @@ -1,237 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND l.nama LIKE '$kw'"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND l.enabled = $kf"; - return $filter_sql; - } - } - function line_sql(){ - if(isset($_SESSION['line'])){ - $kf = $_SESSION['line']; - $line_sql= " AND p.id = $kf"; - return $line_sql; - } - } - function subline_sql(){ - if(isset($_SESSION['subline'])){ - $kf = $_SESSION['subline']; - $subline_sql= " AND m.id = $kf"; - return $subline_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(l.id) AS id FROM garis l LEFT JOIN line p ON l.ref_line = p.id LEFT JOIN line m ON p.parrent = m.id WHERE 1 "; - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->line_sql(); - $sql .= $this->subline_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - switch($o){ - case 1: $order_sql = ' ORDER BY nama'; break; - case 2: $order_sql = ' ORDER BY nama DESC'; break; - case 3: $order_sql = ' ORDER BY enabled'; break; - case 4: $order_sql = ' ORDER BY enabled DESC'; break; - default:$order_sql = ' ORDER BY id'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT l.*,p.nama AS kategori,m.nama AS jenis,p.simbol AS simbol FROM garis l LEFT JOIN line p ON l.ref_line = p.id LEFT JOIN line m ON p.parrent = m.id WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->line_sql(); - $sql .= $this->subline_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($idb->insert('garis',$data); - } - }else{ - unset($data['foto']); - $outp = $this->db->insert('garis',$data); - } - - if($outp) - $_SESSION['success']=1; - else - $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $garis_file = $_FILES['foto']['tmp_name']; - $tipe_file = $_FILES['foto']['type']; - $nama_file = $_FILES['foto']['name']; - if (!empty($garis_file)){ - if ($tipe_file == "image/jpg" OR $tipe_file == "image/jpeg"){ - Uploadgaris($nama_file); - $data['foto'] = $nama_file; - $this->db->where('id',$id); - $outp = $this->db->update('garis',$data); - } - }else{ - unset($data['foto']); - $this->db->where('id',$id); - $outp = $this->db->update('garis',$data); - } - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; -} - function delete($id=''){ - $sql = "DELETE FROM garis WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM garis WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function list_line(){ - $sql = "SELECT * FROM line WHERE tipe = 2 "; - - if(isset($_SESSION['subline'])){ - $kf = $_SESSION['subline']; - $sql .= " AND parrent = $kf"; - } - - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function list_subline(){ - $sql = "SELECT * FROM line WHERE tipe = 0 "; - - if(isset($_SESSION['line'])){ - - $sqlx = "SELECT * FROM line WHERE id = ?"; - $query = $this->db->query($sqlx,$_SESSION['line']); - $temp=$query->row_array(); - - $kf = $temp['parrent']; - - - } - - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function garis_lock($id='',$val=0){ - - $sql = "UPDATE garis SET enabled=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_garis($id=0){ - $sql = "SELECT * FROM garis WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function update_position($id=0){ - $data = $_POST; - $this->db->where('id',$id); - $outp = $this->db->update('garis',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function list_dusun(){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function get_desa(){ - $sql = "SELECT * FROM config WHERE 1"; - $query = $this->db->query($sql); - return $query->row_array(); - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/plan_line_model.php b/donjo-app/models/plan_line_model.php deleted file mode 100644 index 21fc55225..000000000 --- a/donjo-app/models/plan_line_model.php +++ /dev/null @@ -1,317 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (nama LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND enabled = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM line WHERE tipe = 0 "; - $sql .= $this->search_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - switch($o){ - case 1: $order_sql = ' ORDER BY nama'; break; - case 2: $order_sql = ' ORDER BY nama DESC'; break; - case 3: $order_sql = ' ORDER BY enabled'; break; - case 4: $order_sql = ' ORDER BY enabled DESC'; break; - default:$order_sql = ' ORDER BY id'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT * FROM line WHERE tipe = 0 "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($idb->insert('line',$data); - } - }else { - unset($data['simbol']); - $outp = $this->db->insert('line',$data); - } - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $lokasi_file = $_FILES['simbol']['tmp_name']; - $tipe_file = $_FILES['simbol']['type']; - $nama_file = $_FILES['simbol']['name']; - if (!empty($lokasi_file)){ - if ($tipe_file == "image/png" OR $tipe_file == "image/gif"){ - UploadSimbol($nama_file); - $data['simbol'] = $nama_file; - $this->db->where('id',$id); - $outp = $this->db->update('line',$data); - } - $_SESSION['success']=1; - } - - unset($data['simbol']); - $this->db->where('id',$id); - $outp = $this->db->update('line',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; -} - function delete($id=''){ - $sql = "DELETE FROM line WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM line WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function list_sub_line($line=1){ - $sql = "SELECT * FROM line WHERE parrent = ? AND tipe = 2 "; - - $query = $this->db->query($sql,$line); - $data=$query->result_array(); - - $i=0; - while($idb->insert('line',$data); - if($outp) $_SESSION['success']=1; - } else { - $_SESSION['success']=-1; - } - }else{ - $data = $_POST; - unset($data['simbol']); - $data['parrent'] = $parrent; - $data['tipe'] = 2; - $outp = $this->db->insert('line',$data); -} - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update_sub_line($id=0){ - $data = $_POST; - $lokasi_file = $_FILES['simbol']['tmp_name']; - $tipe_file = $_FILES['simbol']['type']; - $nama_file = $_FILES['simbol']['name']; - if (!empty($lokasi_file)){ - if ($tipe_file == "image/png" OR $tipe_file == "image/gif"){ - UploadSimbol($nama_file); - $data['simbol'] = $nama_file; - $this->db->where('id',$id); - $outp = $this->db->update('line',$data); - } - $_SESSION['success']=1; - }else{ - - unset($data['simbol']); - $this->db->where('id',$id); - $outp = $this->db->update('line',$data); - } - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; -} - function delete_sub_line($id=''){ - $sql = "DELETE FROM line WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all_sub_line(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM line WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function line_lock($id='',$val=0){ - - $sql = "UPDATE line SET enabled=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_line($id=0){ - $sql = "SELECT * FROM line WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function line_show(){ - $sql = "SELECT * FROM line WHERE enabled=?"; - $query = $this->db->query($sql,1); - $data = $query->result_array(); - return $data; - } - function list_line_atas(){ - - - $sql = "SELECT m.* FROM line m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 1"; - - $query = $this->db->query($sql); - $data=$query->result_array(); - $url = site_url("first"); - $i=0; - while($i".$data[$i]['nama'].""; - - $sql2 = "SELECT s.* FROM line s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; - $query = $this->db->query($sql2,$data[$i]['id']); - $data2=$query->result_array(); - - if($data2){ - $data[$i]['line'] = $data[$i]['line'].""; - } - $data[$i]['line'] = $data[$i]['line'].""; - $i++; - } - return $data; - } - function list_line_kiri(){ - - - $sql = "SELECT m.* FROM line m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 2"; - - $query = $this->db->query($sql); - $data=$query->result_array(); - $url = site_url("first"); - $i=0; - while($i".$data[$i]['nama'].""; - - $sql2 = "SELECT s.* FROM line s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; - $query = $this->db->query($sql2,$data[$i]['id']); - $data2=$query->result_array(); - - if($data2){ - $data[$i]['line'] = $data[$i]['line'].""; - } - $data[$i]['line'] = $data[$i]['line'].""; - $i++; - } - return $data; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/plan_lokasi_model.php b/donjo-app/models/plan_lokasi_model.php deleted file mode 100644 index 58dcdc988..000000000 --- a/donjo-app/models/plan_lokasi_model.php +++ /dev/null @@ -1,237 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND l.nama LIKE '$kw'"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND l.enabled = $kf"; - return $filter_sql; - } - } - function point_sql(){ - if(isset($_SESSION['point'])){ - $kf = $_SESSION['point']; - $point_sql= " AND p.id = $kf"; - return $point_sql; - } - } - function subpoint_sql(){ - if(isset($_SESSION['subpoint'])){ - $kf = $_SESSION['subpoint']; - $subpoint_sql= " AND m.id = $kf"; - return $subpoint_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(l.id) AS id FROM lokasi l WHERE 1 "; - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->point_sql(); - $sql .= $this->subpoint_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - switch($o){ - case 1: $order_sql = ' ORDER BY nama'; break; - case 2: $order_sql = ' ORDER BY nama DESC'; break; - case 3: $order_sql = ' ORDER BY enabled'; break; - case 4: $order_sql = ' ORDER BY enabled DESC'; break; - default:$order_sql = ' ORDER BY id'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT l.*,p.nama AS kategori,m.nama AS jenis,p.simbol AS simbol FROM lokasi l LEFT JOIN point p ON l.ref_point = p.id LEFT JOIN point m ON p.parrent = m.id WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->point_sql(); - $sql .= $this->subpoint_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($idb->insert('lokasi',$data); - } - }else{ - unset($data['foto']); - $outp = $this->db->insert('lokasi',$data); - } - - if($outp) - $_SESSION['success']=1; - else - $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $lokasi_file = $_FILES['foto']['tmp_name']; - $tipe_file = $_FILES['foto']['type']; - $nama_file = $_FILES['foto']['name']; - if (!empty($lokasi_file)){ - if ($tipe_file == "image/jpg" OR $tipe_file == "image/jpeg"){ - UploadLokasi($nama_file); - $data['foto'] = $nama_file; - $this->db->where('id',$id); - $outp = $this->db->update('lokasi',$data); - } - }else{ - unset($data['foto']); - $this->db->where('id',$id); - $outp = $this->db->update('lokasi',$data); - } - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; -} - function delete($id=''){ - $sql = "DELETE FROM lokasi WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM lokasi WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function list_point(){ - $sql = "SELECT * FROM point WHERE tipe = 2 "; - - if(isset($_SESSION['subpoint'])){ - $kf = $_SESSION['subpoint']; - $sql .= " AND parrent = $kf"; - } - - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function list_subpoint(){ - $sql = "SELECT * FROM point WHERE tipe = 0 "; - - if(isset($_SESSION['point'])){ - - $sqlx = "SELECT * FROM point WHERE id = ?"; - $query = $this->db->query($sqlx,$_SESSION['point']); - $temp=$query->row_array(); - - $kf = $temp['parrent']; - - - } - - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function lokasi_lock($id='',$val=0){ - - $sql = "UPDATE lokasi SET enabled=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_lokasi($id=0){ - $sql = "SELECT * FROM lokasi WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function update_position($id=0){ - $data = $_POST; - $this->db->where('id',$id); - $outp = $this->db->update('lokasi',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function list_dusun(){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - - function get_desa(){ - $sql = "SELECT * FROM config WHERE 1"; - $query = $this->db->query($sql); - return $query->row_array(); - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/plan_point_model.php b/donjo-app/models/plan_point_model.php deleted file mode 100644 index a66eb4ed0..000000000 --- a/donjo-app/models/plan_point_model.php +++ /dev/null @@ -1,269 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (nama LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND enabled = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM point WHERE tipe = 0 "; - $sql .= $this->search_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - switch($o){ - case 1: $order_sql = ' ORDER BY nama'; break; - case 2: $order_sql = ' ORDER BY nama DESC'; break; - case 3: $order_sql = ' ORDER BY enabled'; break; - case 4: $order_sql = ' ORDER BY enabled DESC'; break; - default:$order_sql = ' ORDER BY id'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT * FROM point WHERE tipe = 0 "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($idb->insert('point',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - - - $this->db->where('id',$id); - $outp = $this->db->update('point',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; -} - function delete($id=''){ - $sql = "DELETE FROM point WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM point WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function list_sub_point($point=1){ - $sql = "SELECT * FROM point WHERE parrent = ? AND tipe = 2 "; - - $query = $this->db->query($sql,$point); - $data=$query->result_array(); - - $i=0; - while($idb->insert('point',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update_sub_point($id=0){ - $data = $_POST; - - $this->db->where('id',$id); - $outp = $this->db->update('point',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; -} - function delete_sub_point($id=''){ - $sql = "DELETE FROM point WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all_sub_point(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM point WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function point_lock($id='',$val=0){ - - $sql = "UPDATE point SET enabled=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_point($id=0){ - $sql = "SELECT * FROM point WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function point_show(){ - $sql = "SELECT * FROM point WHERE enabled=?"; - $query = $this->db->query($sql,1); - $data = $query->result_array(); - return $data; - } - function list_simbol(){ - $sql = "SELECT * FROM gis_simbol WHERE 1"; - $query = $this->db->query($sql); - $data = $query->result_array(); - return $data; - } - function list_point_atas(){ - - - $sql = "SELECT m.* FROM point m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 1"; - - $query = $this->db->query($sql); - $data=$query->result_array(); - $url = site_url("first"); - $i=0; - while($i".$data[$i]['nama'].""; - - $sql2 = "SELECT s.* FROM point s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; - $query = $this->db->query($sql2,$data[$i]['id']); - $data2=$query->result_array(); - - if($data2){ - $data[$i]['point'] = $data[$i]['point'].""; - } - $data[$i]['point'] = $data[$i]['point'].""; - $i++; - } - return $data; - } - function list_point_kiri(){ - - - $sql = "SELECT m.* FROM point m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 2"; - - $query = $this->db->query($sql); - $data=$query->result_array(); - $url = site_url("first"); - $i=0; - while($i".$data[$i]['nama'].""; - - $sql2 = "SELECT s.* FROM point s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; - $query = $this->db->query($sql2,$data[$i]['id']); - $data2=$query->result_array(); - - if($data2){ - $data[$i]['point'] = $data[$i]['point'].""; - } - $data[$i]['point'] = $data[$i]['point'].""; - $i++; - } - return $data; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/plan_polygon_model.php b/donjo-app/models/plan_polygon_model.php deleted file mode 100644 index 860b1f43e..000000000 --- a/donjo-app/models/plan_polygon_model.php +++ /dev/null @@ -1,317 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (nama LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND enabled = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM polygon WHERE tipe = 0 "; - $sql .= $this->search_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - switch($o){ - case 1: $order_sql = ' ORDER BY nama'; break; - case 2: $order_sql = ' ORDER BY nama DESC'; break; - case 3: $order_sql = ' ORDER BY enabled'; break; - case 4: $order_sql = ' ORDER BY enabled DESC'; break; - default:$order_sql = ' ORDER BY id'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT * FROM polygon WHERE tipe = 0 "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($idb->insert('polygon',$data); - } - }else { - unset($data['simbol']); - $outp = $this->db->insert('polygon',$data); - } - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $lokasi_file = $_FILES['simbol']['tmp_name']; - $tipe_file = $_FILES['simbol']['type']; - $nama_file = $_FILES['simbol']['name']; - if (!empty($lokasi_file)){ - if ($tipe_file == "image/png" OR $tipe_file == "image/gif"){ - UploadSimbol($nama_file); - $data['simbol'] = $nama_file; - $this->db->where('id',$id); - $outp = $this->db->update('polygon',$data); - } - $_SESSION['success']=1; - } - - unset($data['simbol']); - $this->db->where('id',$id); - $outp = $this->db->update('polygon',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; -} - function delete($id=''){ - $sql = "DELETE FROM polygon WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM polygon WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function list_sub_polygon($polygon=1){ - $sql = "SELECT * FROM polygon WHERE parrent = ? AND tipe = 2 "; - - $query = $this->db->query($sql,$polygon); - $data=$query->result_array(); - - $i=0; - while($idb->insert('polygon',$data); - if($outp) $_SESSION['success']=1; - } else { - $_SESSION['success']=-1; - } - }else{ - $data = $_POST; - unset($data['simbol']); - $data['parrent'] = $parrent; - $data['tipe'] = 2; - $outp = $this->db->insert('polygon',$data); -} - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update_sub_polygon($id=0){ - $data = $_POST; - $lokasi_file = $_FILES['simbol']['tmp_name']; - $tipe_file = $_FILES['simbol']['type']; - $nama_file = $_FILES['simbol']['name']; - if (!empty($lokasi_file)){ - if ($tipe_file == "image/png" OR $tipe_file == "image/gif"){ - UploadSimbol($nama_file); - $data['simbol'] = $nama_file; - $this->db->where('id',$id); - $outp = $this->db->update('polygon',$data); - } - $_SESSION['success']=1; - }else{ - - unset($data['simbol']); - $this->db->where('id',$id); - $outp = $this->db->update('polygon',$data); - } - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; -} - function delete_sub_polygon($id=''){ - $sql = "DELETE FROM polygon WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all_sub_polygon(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM polygon WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function polygon_lock($id='',$val=0){ - - $sql = "UPDATE polygon SET enabled=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_polygon($id=0){ - $sql = "SELECT * FROM polygon WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function polygon_show(){ - $sql = "SELECT * FROM polygon WHERE enabled=?"; - $query = $this->db->query($sql,1); - $data = $query->result_array(); - return $data; - } - function list_polygon_atas(){ - - - $sql = "SELECT m.* FROM polygon m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 1"; - - $query = $this->db->query($sql); - $data=$query->result_array(); - $url = site_url("first"); - $i=0; - while($i".$data[$i]['nama'].""; - - $sql2 = "SELECT s.* FROM polygon s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; - $query = $this->db->query($sql2,$data[$i]['id']); - $data2=$query->result_array(); - - if($data2){ - $data[$i]['polygon'] = $data[$i]['polygon'].""; - } - $data[$i]['polygon'] = $data[$i]['polygon'].""; - $i++; - } - return $data; - } - function list_polygon_kiri(){ - - - $sql = "SELECT m.* FROM polygon m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 2"; - - $query = $this->db->query($sql); - $data=$query->result_array(); - $url = site_url("first"); - $i=0; - while($i".$data[$i]['nama'].""; - - $sql2 = "SELECT s.* FROM polygon s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; - $query = $this->db->query($sql2,$data[$i]['id']); - $data2=$query->result_array(); - - if($data2){ - $data[$i]['polygon'] = $data[$i]['polygon'].""; - } - $data[$i]['polygon'] = $data[$i]['polygon'].""; - $i++; - } - return $data; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/program_bantuan_model.php b/donjo-app/models/program_bantuan_model.php deleted file mode 100644 index c1bb7232a..000000000 --- a/donjo-app/models/program_bantuan_model.php +++ /dev/null @@ -1,371 +0,0 @@ -load->database(); - } - public function list_program($sasaran=0){ - if ($sasaran > 0){ - $strSQL = "SELECT p.id,p.nama,p.sasaran,p.ndesc,p.sdate,p.edate,p.userid,p.status FROM program p WHERE p.sasaran=".$sasaran; - }else{ - $strSQL = "SELECT p.id,p.nama,p.sasaran,p.ndesc,p.sdate,p.edate,p.userid,p.status FROM program p WHERE 1"; - } - $query = $this->db->query($strSQL); - $data = $query->result_array(); - return $data; - } - public function get_program($slug){ - if ($slug === false){ - $strSQL = "SELECT p.id,p.nama,p.sasaran,p.ndesc,p.sdate,p.edate,p.userid,p.status FROM program p WHERE 1"; - $query = $this->db->query($strSQL); - $data = $query->result_array(); - return $data; - }else{ - $strSQL = "SELECT p.id,p.nama,p.sasaran,p.ndesc,p.sdate,p.edate,p.userid,p.status FROM program p WHERE p.id=".$slug; - $query = $this->db->query($strSQL); - $hasil0 = $query->row_array(); - - switch ($hasil0["sasaran"]){ - case 1: - - $strSQL = "SELECT p.id,p.peserta,o.nama,w.rt,w.rw,w.dusun FROM program_peserta p - LEFT JOIN tweb_penduduk o ON p.peserta=o.nik - LEFT JOIN tweb_wil_clusterdesa w ON w.id=o.id_cluster WHERE p.program_id=".$slug; - $query = $this->db->query($strSQL); - $filter = array(); - if($query->num_rows()>0){ - $data=$query->result_array(); - $i=0; - while($idb->query($strSQL); - $data = ""; - $data=$query->result_array(); - if($query->num_rows() > 0){ - $i=0;$j=0; - while($idb->query($strSQL); - $filter = array(); - if($query->num_rows()>0){ - $data=$query->result_array(); - $i=0; - while($idb->query($strSQL); - $data = ""; - $data=$query->result_array(); - if($query->num_rows() > 0){ - $i=0;$j=0; - while($idb->query($strSQL); - $filter = array(); - if($query->num_rows()>0){ - $data=$query->result_array(); - $i=0; - while($idb->query($strSQL); - $data = ""; - $data=$query->result_array(); - if($query->num_rows() > 0){ - $i=0;$j=0; - while($idb->query($strSQL); - $filter = array(); - if($query->num_rows()>0){ - $data=$query->result_array(); - $i=0; - while($idb->query($strSQL); - $data = ""; - $data=$query->result_array(); - if($query->num_rows() > 0){ - $i=0; - while($idb->query($strSQL); - if($query->num_rows() > 0){ - $data_program = $query->result_array(); - } - - switch ($cat){ - case 1: - - $strSQL = "SELECT o.nama,o.foto,o.nik,w.rt,w.rw,w.dusun FROM tweb_penduduk o - LEFT JOIN tweb_wil_clusterdesa w ON w.id=o.id_cluster WHERE o.nik='".fixSQL($id)."'"; - $query = $this->db->query($strSQL); - if($query->num_rows() > 0){ - $row = $query->row_array(); - $data_profil = array( - "id"=>$id, - "nama"=>$row["nama"] ." - ".$row["nik"], - "ndesc"=>"Alamat: RT ".strtoupper($row["rt"])." / RW ".strtoupper($row["rw"])." ".strtoupper($row["dusun"]), - "foto"=>$row["foto"] - ); - } - - break; - case 2: - - $strSQL = "SELECT o.nik_kepala,o.no_kk,p.nama,w.rt,w.rw,w.dusun FROM tweb_keluarga o - LEFT JOIN tweb_penduduk p ON o.nik_kepala=p.id - LEFT JOIN tweb_wil_clusterdesa w ON w.id=p.id_cluster WHERE o.no_kk='".fixSQL($id)."'"; - $query = $this->db->query($strSQL); - if($query->num_rows() > 0){ - $row = $query->row_array(); - $data_profil = array( - "id"=>$id, - "nama"=> "Kepala KK : ".$row["nama"].", NO KK: ".$row["no_kk"], - "ndesc"=>"Alamat: RT ".strtoupper($row["rt"])." / RW ".strtoupper($row["rw"])." ".strtoupper($row["dusun"]), - "foto"=>"" - ); - } - - break; - case 3: - - $strSQL = "SELECT r.id, r.no_kk, o.nama, o.nik,w.rt,w.rw,w.dusun FROM tweb_rtm r - LEFT JOIN tweb_penduduk o ON o.id=r.nik_kepala - LEFT JOIN tweb_wil_clusterdesa w ON w.id=o.id_cluster - WHERE 1 - "; - $query = $this->db->query($strSQL); - if($query->num_rows() > 0){ - $row = $query->row_array(); - $data_profil = array( - "id"=>$id, - "nama"=> "Kepala RTM : ".$row["nama"].", NIK: ".$row["nik"], - "ndesc"=>"Alamat: RT ".strtoupper($row["rt"])." / RW ".strtoupper($row["rw"])." ".strtoupper($row["dusun"]), - "foto"=>"" - ); - } - - break; - case 4: - - $strSQL = "SELECT k.id as id,k.nama as nama,p.nama as ketua,p.nik as nik,w.rt,w.rw,w.dusun FROM kelompok k - LEFT JOIN tweb_penduduk p ON p.id=k.id_ketua - LEFT JOIN tweb_wil_clusterdesa w ON w.id=p.id_cluster - WHERE k.id='".fixSQL($id)."'"; - $query = $this->db->query($strSQL); - if($query->num_rows() > 0){ - $row = $query->row_array(); - $data_profil = array( - "id"=>$id, - "nama"=> $row["nama"], - "ndesc"=>"Ketua: ".$row["ketua"]." [".$row["nik"]."]
Alamat: RT ".strtoupper($row["rt"])." / RW ".strtoupper($row["rw"])." ".strtoupper($row["dusun"]), - "foto"=>"" - ); - } - break; - default: - - } - if(!$data_program==false){ - $hasil = array($data_program,$data_profil); - return $hasil; - }else{ - return null; - } - } - public function set_program(){ - $data = array( - 'sasaran' => $this->input->post('cid'), - 'nama' => fixSQL($this->input->post('nama')), - 'ndesc' => fixSQL($this->input->post('ndesc')), - 'userid' => $this->input->post('userid'), - 'sdate' => date("Y-m-d",strtotime($this->input->post('sdate'))), - 'edate' => date("Y-m-d",strtotime($this->input->post('edate'))) - ); - return $this->db->insert('program', $data); - } - public function add_peserta($nik,$id){ - $strSQL = "SELECT sasaran FROM program WHERE id=".$id; - $hasil = $this->db->query($strSQL); - if($hasil->num_rows()>0){ - $row = $hasil->row_array(); - } - $strSQL = "SELECT id FROM `program_peserta` WHERE program_id='".fixSQL($id)."' AND peserta='".fixSQL($nik)."'"; - $hasil = $this->db->query($strSQL); - if($hasil->num_rows()>0){ - return false; - }else{ - $strSQL = "INSERT INTO `program_peserta`(program_id,peserta,sasaran) VALUES('".$id."','".fixSQL($nik)."','".$row["sasaran"]."')"; - $hasil = $this->db->query($strSQL); - if($hasil){ - return true; - }else{ - return false; - } - } - } - public function update_program($id){ - $strSQL = "UPDATE `program` SET `sasaran`='".$this->input->post('cid')."', - `nama`='".fixSQL($this->input->post('nama'))."', - `ndesc`='".fixSQL($this->input->post('ndesc'))."', - `sdate`='".date("Y-m-d",strtotime($this->input->post('sdate')))."', - `edate`='".date("Y-m-d",strtotime($this->input->post('edate')))."', - `status`='".$this->input->post('status')."' - WHERE id=".$id; - - $hasil = $this->db->query($strSQL); - if($hasil){ - $_SESSION["success"] = 1; - $_SESSION["pesan"] = "Data program telah diperbarui"; - }else{ - $_SESSION["success"] = -1; - } - } - public function hapus_program($id){ - $strSQL = "DELETE FROM `program` WHERE id=".$id; - $hasil = $this->db->query($strSQL); - if($hasil){ - $_SESSION["success"] = 1; - $_SESSION["pesan"] = "Data program telah dihapus"; - }else{ - $_SESSION["success"] = -1; - } - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/rtm_model.php b/donjo-app/models/rtm_model.php deleted file mode 100644 index ae80e5ff7..000000000 --- a/donjo-app/models/rtm_model.php +++ /dev/null @@ -1,429 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari)); - $kw = '%' .$kw. '%'; - $search_sql= " AND (t.nama LIKE '$kw' OR u.no_kk LIKE '$kw') "; - return $search_sql; - } - } - function jenis_sql(){ - if(isset($_SESSION['jenis'])){ - $kh = $_SESSION['jenis']; - $jenis_sql= " AND jenis = $kh"; - return $jenis_sql; - } - } - function kelas_sql(){ - if(isset($_SESSION['kelas'])){ - $kh = $_SESSION['kelas']; - $kelas_sql= " AND kelas_sosial= $kh"; - return $kelas_sql; - } - } - function raskin_sql(){ - if(isset($_SESSION['raskin'])){ - $kh = $_SESSION['raskin']; - $raskin_sql= " AND raskin= $kh"; - return $raskin_sql; - } - } - function blt_sql(){ - if(isset($_SESSION['id_blt'])){ - $kh = $_SESSION['id_blt']; - $blt_sql= " AND id_blt= $kh"; - return $blt_sql; - } - } - function bos_sql(){ - if(isset($_SESSION['id_bos'])){ - $kh = $_SESSION['id_bos']; - $bos_sql= " AND id_bos= $kh"; - return $bos_sql; - } - } - function pkh_sql(){ - if(isset($_SESSION['id_pkh'])){ - $kh = $_SESSION['id_pkh']; - $pkh_sql= " AND id_pkh= $kh"; - return $pkh_sql; - } - } - function jampersal_sql(){ - if(isset($_SESSION['id_jampersal'])){ - $kh = $_SESSION['id_jampersal']; - $jampersal_sql= " AND id_jampersal= $kh"; - return $jampersal_sql; - } - } - function bedah_rumah_sql(){ - if(isset($_SESSION['id_bedah_rumah'])){ - $kh = $_SESSION['id_bedah_rumah']; - $bedah_rumah_sql= " AND id_bedah_rumah= $kh"; - return $bedah_rumah_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(u.id) AS id FROM tweb_rtm u LEFT JOIN tweb_penduduk t ON t.id_rtm = u.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE t.rtm_level = 1 "; - $sql .= $this->search_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.no_kk'; break; - case 2: $order_sql = ' ORDER BY u.no_kk DESC'; break; - case 3: $order_sql = ' ORDER BY kepala_kk'; break; - case 4: $order_sql = ' ORDER BY kepala_kk DESC'; break; - case 5: $order_sql = ' ORDER BY g.nama'; break; - case 6: $order_sql = ' ORDER BY g.nama DESC'; break; - default:$order_sql = ' '; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT u.*,t.nama AS kepala_kk,(SELECT COUNT(id) FROM tweb_penduduk WHERE id_rtm = u.id ) AS jumlah_anggota,c.dusun,c.rw,c.rt FROM tweb_rtm u LEFT JOIN tweb_penduduk t ON u.id = t.id_rtm AND t.rtm_level = 1 LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE 1 "; - - $sql .= $this->search_sql(); - - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($isearch_sql(); - - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($idb->query($sqlp,$data[$i]['id']); - $data[$i]['anggota'] = $query->result_array(); - - $i++; - $j++; - } - return $data; - } - function insert(){ - $nik = $_POST['nik_kepala']; - - $data['no_kk'] = "0"; - $outp = $this->db->insert('tweb_rtm',$data); - - $sql = "SELECT id FROM tweb_rtm ORDER by id DESC LIMIT 1"; - $query = $this->db->query($sql); - $kk = $query->row_array(); - - $kw = $this->get_kode_wilayah(); - $nortm = 100000+$kk['id']; - $nortm = substr($nortm,1,5); - $rtm['no_kk'] = $kw."".$nortm; - $rtm['nik_kepala'] = $nik; - $this->db->where('id',$kk['id']); - $this->db->update('tweb_rtm',$rtm); - - $default['id_rtm'] = $kk['id']; - $default['rtm_level'] = 1; - $this->db->where('id',$nik); - $this->db->update('tweb_penduduk',$default); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $temp['id_rtm'] = 0; - $temp['rtm_level'] = 0; - $this->db->where('id_rtm',$id); - $outp = $this->db->update('tweb_penduduk',$temp); - - - $sql = "DELETE FROM tweb_rtm WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM tweb_rtm WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - $default['id_rtm'] = ""; - $default['rtm_level'] = ""; - - $this->db->where('id_rtm',$id); - $this->db->update('tweb_penduduk',$default); - - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function add_anggota($id=0){ - $data = $_POST; - $temp['id_rtm'] = $id; - $temp['rtm_level'] = 2; - $this->db->where('id',$data['nik']); - $outp = $this->db->update('tweb_penduduk',$temp); - - if($temp['rtm_level']=="1"){ - $temp2['nik_kepala'] = $data['nik']; - $this->db->where('id',$temp['id_rtm']); - $outp = $this->db->update('tweb_rtm',$temp2); - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function update_anggota($id=0){ - $data = $_POST; - - if($data['rtm_level'] == 1){ - - $sql = "SELECT id_rtm FROM tweb_penduduk WHERE id=?"; - $query = $this->db->query($sql,$id); - $r = $query->row_array(); - $id_rtm = $r['id_rtm']; - - $del['rtm_level'] = 2; - $this->db->where('id_rtm',$id_rtm); - - $this->db->update('tweb_penduduk',$del); - $rtm['nik_kepala'] = $id; - $this->db->where('id',$id_rtm); - $outp = $this->db->update('tweb_rtm',$rtm); - } - - $this->db->where('id',$id); - $this->db->update('tweb_penduduk',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function rem_anggota($kk=0,$id=0){ - $temp['id_rtm'] = 0; - $temp['rtm_level'] = 0; - - $pend = $this->rtm_model->get_anggota($id); - $this->db->where('id',$id); - $outp = $this->db->update('tweb_penduduk',$temp); - if($pend['rtm_level']=='1'){ - $temp2['nik_kepala']=0; - $this->db->where('id',$pend['id_rtm']); - $outp = $this->db->update('tweb_rtm',$temp2); - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function rem_all_anggota($kk){ - $id_cb = $_POST['id_cb']; - $temp['id_rtm'] = 0; - $temp['rtm_level'] = 0; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $this->db->where('id',$id); - $outp = $this->db->update('tweb_penduduk',$temp); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_dusun($id=0){ - $sql = "SELECT * FROM tweb_rtm WHERE dusun_id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - - function get_rtm($id=0){ - $sql = "SELECT * FROM tweb_rtm WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_anggota($id=0){ - $sql = "SELECT * FROM tweb_penduduk WHERE id_rtm=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_kode_wilayah(){ - $sql = "SELECT * FROM config WHERE 1"; - $query = $this->db->query($sql); - $d = $query->row_array(); - $data = $d['kode_kabupaten'].$d['kode_kecamatan'].$d['kode_desa']; - - return $data; - } - function list_penduduk_lepas(){ - $sql = "SELECT p.id,p.nik,p.nama,h.nama as kk_level FROM tweb_penduduk p LEFT JOIN tweb_penduduk_hubungan h ON p.kk_level=h.id WHERE (status = 1 OR status = 3) AND id_rtm = 0"; - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - while($idb->query($sql,array($id)); - $data=$query->result_array(); - - - $i=0; - while($idb->query($sql,array($id)); - return $query->row_array(); - - } - function get_desa(){ - $sql = "SELECT * FROM config WHERE 1"; - $query = $this->db->query($sql); - return $query->row_array(); - } - function list_hubungan(){ - $sql = "SELECT id,nama as hubungan FROM tweb_rtm_hubungan WHERE 1"; - $query = $this->db->query($sql); - return $query->result_array(); - } - function update_nokk($id=0){ - $data = $_POST; - - $this->db->where("id",$id); - $outp=$this->db->update("tweb_rtm",$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - - } -} \ No newline at end of file diff --git a/donjo-app/models/sms_model.php b/donjo-app/models/sms_model.php deleted file mode 100644 index 3b81d4b58..000000000 --- a/donjo-app/models/sms_model.php +++ /dev/null @@ -1,717 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.SenderNumber LIKE '$kw' OR u.TextDecoded LIKE '$kw')"; - return $search_sql; - } - } - - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND u.Class = $kf"; - return $filter_sql; - } - } - - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(ID) AS id FROM inbox u WHERE 1"; - $sql .= $this->search_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function insert_autoreply(){ - $data=$_POST; - $sql = "DELETE FROM setting_sms"; - $query = $this->db->query($sql); - $outp = $this->db->insert('setting_sms',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function get_autoreply(){ - $sql = "SELECT * FROM setting_sms LIMIT 1 "; - $query = $this->db->query($sql); - $data = $query->row_array(); - return $data; - } - function list_data($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.SenderNumber'; break; - case 2: $order_sql = ' ORDER BY u.SenderNumber DESC'; break; - case 3: $order_sql = ' ORDER BY u.Class'; break; - case 4: $order_sql = ' ORDER BY u.Class DESC'; break; - case 5: $order_sql = ' ORDER BY u.ReceivingDateTime'; break; - case 6: $order_sql = ' ORDER BY u.ReceivingDateTime DESC'; break; - default:$order_sql = ' ORDER BY u.ReceivingDateTime DESC'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT p.nama,u.* FROM inbox u LEFT JOIN kontak k on u.SenderNumber=k.no_hp LEFT JOIN tweb_penduduk p on k.id_pend=p.id WHERE 1"; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - return $data; - } - function paging_terkirim($p=1,$o=0){ - $sql = "SELECT count(u.ID) as id FROM sentitems u LEFT JOIN kontak k on u.DestinationNumber=k.no_hp LEFT JOIN tweb_penduduk p on k.id_pend=p.id WHERE 1"; - - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data_terkirim($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.DestinationNumber'; break; - case 2: $order_sql = ' ORDER BY u.DestinationNumber DESC'; break; - case 3: $order_sql = ' ORDER BY u.Class'; break; - case 4: $order_sql = ' ORDER BY u.Class DESC'; break; - case 5: $order_sql = ' ORDER BY u.SendingDateTime'; break; - case 6: $order_sql = ' ORDER BY u.SendingDateTime DESC'; break; - default:$order_sql = ' ORDER BY u.SendingDateTime DESC'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT p.nama,u.* FROM sentitems u LEFT JOIN kontak k on u.DestinationNumber=k.no_hp LEFT JOIN tweb_penduduk p on k.id_pend=p.id WHERE 1"; - - - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - return $data; - } - function paging_tertunda($p=1,$o=0){ - $sql = "SELECT count(u.ID) as id FROM outbox u LEFT JOIN kontak k on u.DestinationNumber=k.no_hp LEFT JOIN tweb_penduduk p on k.id_pend=p.id WHERE 1"; - - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data_tertunda($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.DestinationNumber'; break; - case 2: $order_sql = ' ORDER BY u.DestinationNumber DESC'; break; - case 3: $order_sql = ' ORDER BY u.Class'; break; - case 4: $order_sql = ' ORDER BY u.Class DESC'; break; - case 5: $order_sql = ' ORDER BY u.SendingDateTime'; break; - case 6: $order_sql = ' ORDER BY u.SendingDateTime DESC'; break; - default:$order_sql = ' ORDER BY u.SendingDateTime DESC'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT p.nama,u.* FROM outbox u LEFT JOIN kontak k on u.DestinationNumber=k.no_hp LEFT JOIN tweb_penduduk p on k.id_pend=p.id WHERE 1"; - - - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - return $data; - } - function insert(){ - $data = $_POST; - $outp = $this->db->insert('outbox',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($Class=0,$ID=''){ - if($Class==2){ - $sql = "DELETE FROM sentitems WHERE ID=?"; - }elseif($Class==1){ - $sql = "DELETE FROM inbox WHERE ID=?"; - }else{ - $sql = "DELETE FROM outbox WHERE ID=?"; - } - $outp = $this->db->query($sql,array($ID)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all($Class=0){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $ID){ - if($Class==2){ - $sql = "DELETE FROM sentitems WHERE ID=?"; - }elseif($Class==1){ - $sql = "DELETE FROM inbox WHERE ID=?"; - }else{ - $sql = "DELETE FROM outbox WHERE ID=?"; - } - $outp = $this->db->query($sql,array($ID)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function get_sms($Class=0,$ID=0){ - if($Class==2){ - $sql = "SELECT * FROM sentitems WHERE ID=?"; - }elseif($Class==1){ - $sql = "SELECT SenderNumber AS DestinationNumber,TextDecoded FROM inbox WHERE ID=?"; - }else{ - $sql = "SELECT * FROM outbox WHERE ID=?"; - } - $query = $this->db->query($sql,array($ID)); - $data = $query->row_array(); - - return $data; - } - function list_nama(){ - $sql = "SELECT * FROM tweb_penduduk WHERE id NOT IN (SELECT id_pend FROM kontak)"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function list_kontak(){ - $sql = "SELECT a.*,b.* FROM kontak a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function get_kontak($id=0){ - $sql = "SELECT a.*,b.nama FROM kontak a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id WHERE a.id='$id'"; - - $query = $this->db->query($sql); - $data = $query->row_array(); - return $data; - } - function get_grup($id=0){ - $sql = "SELECT * FROM kontak_grup WHERE nama_grup ='$id' AND id_kontak='0' "; - - $query = $this->db->query($sql); - $data = $query->row_array(); - return $data; - } - function update_setting($ID=0){ - $password = md5($this->input->post('pass_lama')); - $pass_baru = $this->input->post('pass_baru'); - $pass_baru1 = $this->input->post('pass_baru1'); - $nama = $this->input->post('nama'); - - $sql = "SELECT password,id_grup,session FROM user WHERE id=?"; - $query=$this->db->query($sql,array($id)); - $row=$query->row(); - - if($password==$row->password){ - if($pass_baru == $pass_baru1){ - $pass_baru = md5($pass_baru); - $sql = "UPDATE user SET password=?,nama=? WHERE id=?"; - $outp = $this->db->query($sql,array($pass_baru,$nama,$id)); - } - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_grup(){ - $sql = "SELECT * FROM user_grup"; - $query = $this->db->query($sql); - return $query->result_array(); - } - function list_grup_kontak(){ - $sql = "SELECT * FROM kontak_grup group by nama_grup"; - $query = $this->db->query($sql); - return $query->result_array(); - } - function sex_sql(){ - if(isset($_SESSION['sex1'])){ - $kf = $_SESSION['sex1']; - $sex_sql= " AND u.sex = $kf"; - return $sex_sql; - } - } - function dusun_sql(){ - if(isset($_SESSION['dusun1'])){ - $kf = $_SESSION['dusun1']; - $dusun_sql= " AND a.dusun = '$kf'"; - return $dusun_sql; - } - } - function rw_sql(){ - if(isset($_SESSION['rw1'])){ - $kf = $_SESSION['rw1']; - $rw_sql= " AND a.rw = '$kf'"; - return $rw_sql; - } - } - function rt_sql(){ - if(isset($_SESSION['rt1'])){ - $kf = $_SESSION['rt1']; - $rt_sql= " AND a.rt = '$kf'"; - return $rt_sql; - } - } - function agama_sql(){ - if(isset($_SESSION['agama1'])){ - $kf = $_SESSION['agama1']; - $agama_sql= " AND u.agama_id = $kf"; - return $agama_sql; - } - } - function pekerjaan_sql(){ - if(isset($_SESSION['pekerjaan1'])){ - $kf = $_SESSION['pekerjaan1']; - $pekerjaan_sql= " AND u.pekerjaan_id = $kf"; - return $pekerjaan_sql; - } - } - function statuskawin_sql(){ - if(isset($_SESSION['status1'])){ - $kf = $_SESSION['status1']; - $statuskawin_sql= " AND u.status_kawin = $kf"; - return $statuskawin_sql; - } - } - function pendidikan_sql(){ - if(isset($_SESSION['pendidikan1'])){ - $kf = $_SESSION['pendidikan1']; - $pendidikan_sql= " AND u.pendidikan_id = $kf"; - return $pendidikan_sql; - } - } - function status_penduduk_sql(){ - if(isset($_SESSION['status_penduduk1'])){ - $kf = $_SESSION['status_penduduk1']; - $status_penduduk_sql= " AND u.status = $kf"; - return $status_penduduk_sql; - } - } - function grup_sql(){ - if(isset($_SESSION['grup1'])){ - $kf = $_SESSION['grup1']; - $grup_sql= " AND k.id IN (SELECT id_kontak FROM kontak_grup WHERE nama_grup='$kf')"; - return $grup_sql; - } - } - function umur_max_sql(){ - if(isset($_SESSION['umur_max1'])){ - $kf = $_SESSION['umur_max1']; - $umur_max_sql= " AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) <= $kf"; - return $umur_max_sql; - } - } - function umur_min_sql(){ - if(isset($_SESSION['umur_min1'])){ - $kf = $_SESSION['umur_min1']; - $umur_min_sql= " AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) >= $kf"; - return $umur_min_sql; - } - } - function send_broadcast($o=0){ - $isi=$_SESSION['TextDecoded1']; - - $sql = "SELECT no_hp FROM kontak k LEFT JOIN tweb_penduduk u on k.id_pend=u.id LEFT JOIN tweb_wil_clusterdesa a on u.id_cluster=a.id WHERE 1 "; - $sql .= $this->sex_sql(); - $sql .= $this->dusun_sql(); - $sql .= $this->rw_sql(); - $sql .= $this->rt_sql(); - $sql .= $this->agama_sql(); - $sql .= $this->umur_min_sql(); - $sql .= $this->umur_max_sql(); - $sql .= $this->pekerjaan_sql(); - $sql .= $this->statuskawin_sql(); - $sql .= $this->pendidikan_sql(); - $sql .= $this->status_penduduk_sql(); - $sql .= $this->grup_sql(); - - $query = $this->db->query($sql); - $data=$query->result_array(); - foreach($data as $hsl): - $no=$hsl['no_hp']; - $sqlku="INSERT INTO outbox(DestinationNumber,TextDecoded)values('$no','$isi')"; - $query = $this->db->query($sqlku); - endforeach; - } - function paging_kontak($p=1,$o=0){ - $sql = "SELECT COUNT(a.id) as id FROM kontak a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id WHERE 1"; - $sql .= $this->search_kontak_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data_kontak($o=0,$offset=0,$limit=500){ - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT a.*, b.nama, b.alamat_sekarang, (CASE WHEN sex='1' THEN 'Laki-laki' ELSE 'Perempuan' END) AS sex FROM kontak a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id WHERE 1"; - - $sql .= $this->search_kontak_sql(); - - - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - return $data; - } - function search_kontak_sql(){ - if(isset($_SESSION['cari_kontak'])){ - $cari = $_SESSION['cari_kontak']; - $kw = $this->db->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_kontak_sql= " AND (b.nama LIKE '$kw' OR a.no_hp LIKE '$kw')"; - return $search_kontak_sql; - } - } - function insert_kontak($id=0){ - $data=$_POST; - $sql = "DELETE FROM kontak WHERE id_pend='$_POST[id_pend]' "; - $query = $this->db->query($sql); - $outp = $this->db->insert('kontak',$data); - } - function delete_kontak($id=0){ - $sql = "DELETE FROM kontak WHERE id='$id' "; - $query = $this->db->query($sql); - } - function delete_all_kontak(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM kontak WHERE id='$id' "; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function paging_grup($p=1,$o=0){ - $sql = "SELECT COUNT(nama_grup) as id FROM (SELECT nama_grup, (SELECT COUNT(id_kontak) FROM kontak_grup WHERE id_kontak<>'0') as jumlah_kontak FROM kontak_grup WHERE id_kontak='0' ) AS TB WHERE 1 "; - $sql .= $this->search_grup_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data_grup($o=0,$offset=0,$limit=500){ - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT * FROM (SELECT a.nama_grup, (SELECT COUNT(id_kontak) FROM kontak_grup WHERE id_kontak<>'0' AND nama_grup=a.nama_grup) as jumlah_kontak FROM kontak_grup a WHERE id_kontak='0' ) AS TB WHERE 1 "; - - $sql .= $this->search_grup_sql(); - - - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - return $data; - } - function insert_grup($id=0){ - $data['nama_grup']=$_POST['nama_grup']; - $data['id_kontak']="-"; - $outp = $this->db->insert('kontak_grup',$data); - } - function update_grup($id=0){ - $nama_baru=$_POST['nama_grup']; - $nama_awal=$_POST['nama_grup_awal']; - $sql = "UPDATE kontak_grup SET nama_grup='$nama_baru' WHERE nama_grup='$nama_awal'"; - echo $sql; - $query = $this->db->query($sql); - } - function delete_grup($id=0){ - $sql = "DELETE FROM kontak_grup WHERE nama_grup='$id' "; - $query = $this->db->query($sql); - } - function delete_all_grup(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM kontak_grup WHERE nama_grup='$id' "; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function search_grup_sql(){ - if(isset($_SESSION['cari_grup'])){ - $cari = $_SESSION['cari_grup']; - $kw = $this->db->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_grup_sql= " AND (nama_grup LIKE '$kw')"; - return $search_grup_sql; - } - } - function search_anggota_sql(){ - if(isset($_SESSION['cari_anggota'])){ - $cari = $_SESSION['cari_anggota']; - $kw = $this->db->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_anggota_sql= " AND (nama LIKE '$kw')"; - return $search_anggota_sql; - } - } - function paging_anggota($id=0,$p=1,$o=0){ - $sql = "SELECT COUNT(c.id) as id FROM kontak_grup a LEFT JOIN kontak b ON a.id_kontak=b.id LEFT JOIN tweb_penduduk c ON b.id_pend=c.id WHERE a.id_kontak<>'0' AND nama_grup='$id' "; - $sql .= $this->search_anggota_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data_anggota($id=0,$o=0,$offset=0,$limit=500){ - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - $sql = "SELECT a.*,c.*,b.*,(CASE when sex='1' then 'Laki-laki' else 'Perempuan' end) as sex FROM kontak_grup a LEFT JOIN kontak b ON a.id_kontak=b.id LEFT JOIN tweb_penduduk c ON b.id_pend=c.id WHERE a.id_kontak<>'0' AND nama_grup='$id' "; - - $sql .= $this->search_anggota_sql(); - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - $i=0; - $j=$offset; - return $data; - } - function list_data_nama($id=0){ - $sql = "SELECT a.*, b.nama, b.alamat_sekarang, b.sex FROM kontak a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id WHERE a.id NOT IN (SELECT id_kontak FROM kontak_grup WHERE nama_grup='$id') "; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function insert_anggota($id=0){ - $id_cb = $_POST['id_cb']; - if(count($id_cb)){ - foreach($id_cb as $a){ - $sql = "INSERT INTO kontak_grup(nama_grup, id_kontak)VALUES('$id','$a')"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_anggota($grup=0,$id=0){ - $sql = "DELETE FROM kontak_grup WHERE nama_grup='$grup' AND id_kontak='$id'"; - $query = $this->db->query($sql); - } - function delete_all_anggota($grup=0){ - $id_cb = $_POST['id_cb']; - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM kontak_grup WHERE nama_grup='$grup' AND id_kontak='$id'"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function paging_polling($p=1,$o=0){ - $sql = "SELECT count(id_polling) as id FROM polling "; - - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data_polling($o=0,$offset=0,$limit=500){ - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - $sql = "SELECT a.*,(SELECT COUNT(b.id) FROM pertanyaan b WHERE b.id_polling=a.id_polling) as jumlah_pertanyaan FROM polling a"; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - return $data; - } - function get_data_polling($id=0){ - $sql = "SELECT * FROM polling WHERE id_polling='$id'"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function insert_polling($id=0){ - $data=$_POST; - if ($id==0){ - $outp = $this->db->insert('polling',$data); - } else { - $this->db->where('id_polling',$id); - $outp = $this->db->update('polling',$data); - } - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_polling($id=0){ - $sql = "DELETE FROM polling WHERE id_polling='$id' "; - $query = $this->db->query($sql); - } - function delete_all_polling(){ - $id_cb = $_POST['id_cb']; - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM polling WHERE id_polling='$id' "; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function paging_pertanyaan($id=0,$p=1,$o=0){ - $sql = "SELECT COUNT(c.id) as id FROM kontak_grup a LEFT JOIN kontak b ON a.id_kontak=b.id LEFT JOIN tweb_penduduk c ON b.id_pend=c.id WHERE a.id_kontak<>'0' AND nama_grup='$id' "; - $sql .= $this->search_anggota_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data_pertanyaan($id=0,$o=0,$offset=0,$limit=500){ - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - $sql = "SELECT a.*,c.*,b.*,(CASE when sex='1' then 'Laki-laki' else 'Perempuan' end) as sex FROM kontak_grup a LEFT JOIN kontak b ON a.id_kontak=b.id LEFT JOIN tweb_penduduk c ON b.id_pend=c.id WHERE a.id_kontak<>'0' AND nama_grup='$id' "; - - $sql .= $this->search_anggota_sql(); - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - $i=0; - $j=$offset; - return $data; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/surat_keluar_model.php b/donjo-app/models/surat_keluar_model.php deleted file mode 100644 index a53805463..000000000 --- a/donjo-app/models/surat_keluar_model.php +++ /dev/null @@ -1,257 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.no_surat LIKE '$kw' OR u.id_pend LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['nik'])){ - $kf = $_SESSION['nik']; - if($kf=="0"){ - $filter_sql= "";} else { - $filter_sql= " AND n.id = '".$kf."'";} - return $filter_sql; - } - } - function filterku_sql($nik=0){ - $kf = $nik; - if($kf==0){ - $filterku_sql= "";} else { - $filterku_sql= " AND u.id_pend = '".$kf."'";} - return $filterku_sql; - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM log_surat u WHERE 1"; - $sql .= $this->search_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function paging_perorangan($nik=0,$p=1,$o=0){ - $sql = "SELECT count(id_format_surat) as id FROM log_surat u LEFT JOIN tweb_penduduk n ON u.id_pend = n.id LEFT JOIN tweb_surat_format k ON u.id_format_surat = k.id LEFT JOIN tweb_desa_pamong s ON u.id_pamong = s.pamong_id WHERE 1 "; - $sql .= $this->filterku_sql($nik); - - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data_surat($nik=0,$o=0,$offset=0,$limit=500){ - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT u.*,n.nama AS nama,w.nama AS nama_user, n.nik AS nik,k.nama AS format, k.url_surat as berkas,s.pamong_nama AS pamong - FROM log_surat u - LEFT JOIN tweb_penduduk n ON u.id_pend = n.id - LEFT JOIN tweb_surat_format k ON u.id_format_surat = k.id - LEFT JOIN tweb_desa_pamong s ON u.id_pamong = s.pamong_id - LEFT JOIN user w ON u.id_user = w.id - WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->filterku_sql($nik); - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($isearch_sql(); - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($idb->query($sql,$f); - if($query->num_rows() > 0){ - $pam=$query->row_array(); - $data['id_format_surat']=$pam['id']; - }else{ - $data['id_format_surat'] = $f; - } - - $sql = "SELECT pamong_id FROM tweb_desa_pamong WHERE pamong_nama = ?"; - $query = $this->db->query($sql,$g); - if($query->num_rows() > 0){ - $pam=$query->row_array(); - $data['id_pamong']=$pam['pamong_id']; - }else{ - $data['id_pamong'] = 1; - } - - - if($data['id_pamong']=='') - $data['id_pamong'] = 1; - - $data['id_user']=$u; - $data['bulan']=date('m'); - $data['tahun']=date('Y'); - $data['no_surat']=$z; - - $this->db->insert('log_surat',$data); - - } - function grafik(){ - $sql = "select round(((jml*100)/(select count(id) from log_surat)),2) as jumlah, nama from (SELECT COUNT(l.id) as jml, f.nama from log_surat l left join tweb_surat_format f on l.id_format_surat=f.id group by l.id_format_surat) as a"; - $query = $this->db->query($sql); - $data=$query->result_array(); - return $data; - } - function update($id=0){ - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM log_surat WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM log_surat WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_penduduk(){ - $sql = "SELECT id,nik,nama FROM tweb_penduduk WHERE status = 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - while($iinput->post('pass_lama')); - $pass_baru = $this->input->post('pass_baru'); - $pass_baru1 = $this->input->post('pass_baru1'); - $nama = $this->input->post('nama'); - - $sql = "SELECT password,id_grup,session FROM user WHERE id=?"; - $query=$this->db->query($sql,array($id)); - $row=$query->row(); - - if($password==$row->password){ - if($pass_baru == $pass_baru1){ - $pass_baru = md5($pass_baru); - $sql = "UPDATE user SET password=?,nama=? WHERE id=?"; - $outp = $this->db->query($sql,array($pass_baru,$nama,$id)); - } - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_grup(){ - $sql = "SELECT * FROM user_grup"; - $query = $this->db->query($sql); - return $query->result_array(); - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/surat_master_model.php b/donjo-app/models/surat_master_model.php deleted file mode 100644 index 60b7c0021..000000000 --- a/donjo-app/models/surat_master_model.php +++ /dev/null @@ -1,241 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND nama LIKE '$kw'"; - return $search_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM tweb_surat_format u WHERE 1"; - $sql .= $this->search_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.nomor'; break; - case 2: $order_sql = ' ORDER BY u.nomor DESC'; break; - case 3: $order_sql = ' ORDER BY u.pertanyaan'; break; - case 4: $order_sql = ' ORDER BY u.pertanyaan DESC'; break; - case 5: $order_sql = ' ORDER BY u.id_kategori'; break; - case 6: $order_sql = ' ORDER BY u.id_kategori DESC'; break; - default:$order_sql = ' ORDER BY u.id'; - } - - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - - $sql = "SELECT u.* FROM tweb_surat_format u WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($idb->insert('tweb_surat_format',$data); - - $mypath="surat\\".$data['url_surat']."\\"; - $path = "".str_replace("\\","/",$mypath)."/"; - - if (!file_exists($path)) { - mkdir($path, 0777, true); - } - - - $raw="surat\\raw\\"; - $raw_path = "".str_replace("\\","/",$raw); - $file = $raw_path."template.rtf"; - $handle = fopen($file,'r'); - - $buffer = stream_get_contents($handle); - //$handle = fopen($path.$data['url_surat'],'w+'); - - $berkas = $path.$data['url_surat'].".rtf"; - $handle = fopen($berkas,'w+'); - fwrite($handle,$buffer); - fclose($handle); - - - $mypath="donjo-app\\views\\surat\\form\\"; - $path_form = "".str_replace("\\","/",$mypath)."/"; - - $raw="surat\\raw\\"; - $raw_path = "".str_replace("\\","/",$raw); - $file = $raw_path."form.raw"; - $handle = fopen($file,'r'); - - $buffer = stream_get_contents($handle); - //$handle = fopen($path_form.$data['url_surat'],'w+'); - - $berkas = $path_form.$data['url_surat'].".php"; - $handle = fopen($berkas,'w+'); - $buffer=str_replace("[nama_surat]","Surat $data[nama]",$buffer); - fwrite($handle,$buffer); - fclose($handle); - - - $mypath="donjo-app\\views\\surat\\print\\"; - $path_form = "".str_replace("\\","/",$mypath)."/"; - - $raw="surat\\raw\\"; - $raw_path = "".str_replace("\\","/",$raw); - $file = $raw_path."print.raw"; - $handle = fopen($file,'r'); - - $buffer = stream_get_contents($handle); - //$handle = fopen($path_form.$data['url_surat'],'w+'); - - $berkas = $path_form."print_".$data['url_surat'].".php"; - $handle = fopen($berkas,'w+'); - $nama_surat = strtoupper($data['nama']); - $buffer=str_replace("[nama_surat]","SURAT $nama_surat",$buffer); - fwrite($handle,$buffer); - fclose($handle); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $this->db->where('id',$id); - $outp = $this->db->update('tweb_surat_format',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function upload($url=""){ - $tipe_file = $_FILES['foto']['type']; - $name = $_FILES['foto']['name']; - $name = substr($name,strlen($name)-4,4); - - - if ($name != ".rtf"){ - $_SESSION['success']=-1; - } else { - - $vdir_upload = "surat/$url/$url.rtf"; - unlink($vdir_upload); - move_uploaded_file($_FILES["foto"]["tmp_name"], $vdir_upload); - $_SESSION['success']=1; - } - - } - function delete($id=''){ - $sql = "DELETE FROM tweb_surat_format WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM tweb_surat_format WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_atribut($id=0){ - $sql = "SELECT * FROM tweb_surat_atribut WHERE id_surat = ?"; - $query = $this->db->query($sql,$id); - $data= $query->result_array(); - - $i=0; - while($idb->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_tweb_surat_atribut($id=''){ - $sql = "SELECT * FROM tweb_surat_atribut WHERE id=?"; - $query = $this->db->query($sql,$id); - return $query->row_array(); - } - function favorit($id=0,$k=0){ - - if($k==1) - $sql = "UPDATE tweb_surat_format SET favorit = 0 WHERE id=?"; - else - $sql = "UPDATE tweb_surat_format SET favorit = 1 WHERE id=?"; - - $outp = $this->db->query($sql,$id); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function lock($id=0,$k=0){ - - if($k==1) - $sql = "UPDATE tweb_surat_format SET kunci = 0 WHERE id=?"; - else - $sql = "UPDATE tweb_surat_format SET kunci = 1 WHERE id=?"; - - $outp = $this->db->query($sql,$id); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } -} \ No newline at end of file diff --git a/donjo-app/models/surat_model.php b/donjo-app/models/surat_model.php deleted file mode 100644 index 5be0566dd..000000000 --- a/donjo-app/models/surat_model.php +++ /dev/null @@ -1,618 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - while($idb->query($sql); - $data = $query->result_array(); - return $data; - } - function list_surat_fav(){ - $sql = "SELECT * FROM tweb_surat_format WHERE kunci = 0 AND favorit = 1"; - $query = $this->db->query($sql); - $data = $query->result_array(); - return $data; - } - function list_penduduk(){ - $sql = "SELECT u.id,nik,nama,w.dusun,w.rw,w.rt FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa w ON u.id_cluster = w.id WHERE u.status = 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - while($idb->query($sql); - $data=$query->result_array(); - - - $i=0; - while($idb->query($sql); - $data=$query->result_array(); - - - $i=0; - while($idb->query($sql,$id); - $data=$query->result_array(); - - - $i=0; - while($idb->query($sql,$id); - $data = $query->row_array(); - - $data['alamat']=''; - - if($data['rt'] != "-") - $data['alamat']="RT-".$data['rt']; - - if($data['rw'] != "-") - $data['alamat']=$data['alamat']." RW-".$data['rw']; - - if($data['dusun'] != "-") - $data['alamat']=$data['alamat']." Dusun ".ununderscore($data['dusun']); - - return $data; - } - - function list_anggota($id=0,$nik=0){ - $sql = "SELECT u.*,(SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) AS umur,x.nama AS pendidikan,h.nama AS hubungan FROM tweb_penduduk u LEFT JOIN tweb_penduduk_pendidikan_kk x ON u.pendidikan_kk_id = x.id LEFT JOIN tweb_penduduk_hubungan h ON u.kk_level = h.id WHERE u.id_kk = ? AND u.nik <> ?"; - $query = $this->db->query($sql,array($id,$nik)); - $data = $query->result_array(); - - return $data; - } - - - function pengikut(){ - $id_cb = $_POST['id_cb']; - $outp=""; - if(count($id_cb)){ - foreach($id_cb as $id){ - - $outp = $outp.$id.','; - } - $outp = $outp.'7070'; - - - - $sql = "select `u`.`id` AS `id`,`u`.`nama` AS `nama`,`x`.`nama` AS `sex`,`u`.`tempatlahir` AS `tempatlahir`,`u`.`tanggallahir` AS `tanggallahir`,(select (date_format(from_days((to_days(now()) - to_days(`tweb_penduduk`.`tanggallahir`))),'%Y') + 0) AS `(date_format(from_days((to_days(now()) - to_days(``tweb_penduduk``.``tanggallahir``))),'%Y') + 0)` from `tweb_penduduk` where (`tweb_penduduk`.`id` = `u`.`id`)) AS `umur`,`w`.`nama` AS `status_kawin`,`f`.`nama` AS `warganegara`,`a`.`nama` AS `agama`,`d`.`nama` AS `pendidikan`,`j`.`nama` AS `pekerjaan`,`u`.`nik` AS `nik`,`c`.`rt` AS `rt`,`c`.`rw` AS `rw`,`c`.`dusun` AS `dusun`,`k`.`no_kk` AS `no_kk`,(select `tweb_penduduk`.`nama` AS `nama` from `tweb_penduduk` where (`tweb_penduduk`.`id` = `k`.`nik_kepala`)) AS `kepala_kk`,hb.nama AS hubungan from ((((((((`tweb_penduduk` `u` left join `tweb_penduduk_sex` `x` on((`u`.`sex` = `x`.`id`))) left join `tweb_penduduk_kawin` `w` on((`u`.`status_kawin` = `w`.`id`))) left join `tweb_penduduk_agama` `a` on((`u`.`agama_id` = `a`.`id`))) left join `tweb_penduduk_pendidikan_kk` `d` on((`u`.`pendidikan_kk_id` = `d`.`id`))) left join `tweb_penduduk_pekerjaan` `j` on((`u`.`pekerjaan_id` = `j`.`id`))) left join `tweb_wil_clusterdesa` `c` on((`u`.`id_cluster` = `c`.`id`))) left join `tweb_keluarga` `k` on((`u`.`id_kk` = `k`.`id`))) left join `tweb_penduduk_warganegara` `f` on((`u`.`warganegara_id` = `f`.`id`)) LEFT JOIN tweb_penduduk_hubungan hb ON u.kk_level = hb.id ) WHERE u.nik IN($outp)"; - $query = $this->db->query($sql); - $data = $query->result_array(); - } - return $data; - } - function list_pamong(){ - $sql = "SELECT u.* FROM tweb_desa_pamong u WHERE pamong_status=1 "; - $query = $this->db->query($sql); - $data = $query->result_array(); - return $data; - } - function get_data_surat($id=0){ - $sql = "select `u`.*,g.nama AS gol_darah,`x`.`nama` AS `sex`,(select (date_format(from_days((to_days(now()) - to_days(`tweb_penduduk`.`tanggallahir`))),'%Y') + 0) AS `(date_format(from_days((to_days(now()) - to_days(``tweb_penduduk``.``tanggallahir``))),'%Y') + 0)` from `tweb_penduduk` where (`tweb_penduduk`.`id` = `u`.`id`)) AS `umur`,`w`.`nama` AS `status_kawin`,`f`.`nama` AS `warganegara`,`a`.`nama` AS `agama`,`d`.`nama` AS `pendidikan`,`j`.`nama` AS `pekerjaan`,`c`.`rt` AS `rt`,`c`.`rw` AS `rw`,`c`.`dusun` AS `dusun`,`k`.`no_kk` AS `no_kk`,(select `tweb_penduduk`.`nama` AS `nama` from `tweb_penduduk` where (`tweb_penduduk`.`id` = `k`.`nik_kepala`)) AS `kepala_kk` from ((((((((`tweb_penduduk` `u` left join `tweb_penduduk_sex` `x` on((`u`.`sex` = `x`.`id`))) left join `tweb_penduduk_kawin` `w` on((`u`.`status_kawin` = `w`.`id`))) left join `tweb_penduduk_agama` `a` on((`u`.`agama_id` = `a`.`id`))) left join `tweb_penduduk_pendidikan_kk` `d` on((`u`.`pendidikan_kk_id` = `d`.`id`))) left join `tweb_penduduk_pekerjaan` `j` on((`u`.`pekerjaan_id` = `j`.`id`))) left join `tweb_wil_clusterdesa` `c` on((`u`.`id_cluster` = `c`.`id`))) left join `tweb_keluarga` `k` on((`u`.`id_kk` = `k`.`id`))) left join `tweb_penduduk_warganegara` `f` on((`u`.`warganegara_id` = `f`.`id`))) left join tweb_golongan_darah g on u.golongan_darah_id=g.id WHERE u.id = ?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_data_desa(){ - $sql = "SELECT * FROM config WHERE 1"; - $query = $this->db->query($sql); - return $query->row_array(); - } - function get_pamong($id=0){ - $sql = "SELECT u.* FROM tweb_desa_pamong u WHERE pamong_id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_data_pribadi($id=0){ - $sql = "SELECT u.*,h.nama as hubungan, p.nama as kepala_kk,g.nama as gol_darah,d.nama as pend,r.nama as pek,m.nama as men, w.nama as wn, n.nama as agama,c.rw,c.rt,c.dusun,(DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( u.tanggallahir ) ) , '%Y' ) +0) as umur, sex.nama as sex FROM tweb_penduduk u left join tweb_penduduk_hubungan h on u.kk_level=h.id left join tweb_keluarga k on u.id_kk=k.id left join tweb_penduduk p on k.nik_kepala=p.id left join tweb_golongan_darah g on u.golongan_darah_id=g.id left join tweb_penduduk_pendidikan_kk d on u.pendidikan_kk_id=d.id left join tweb_penduduk_pekerjaan r on u.pekerjaan_id=r.id left join tweb_cacat m on u.cacat_id=m.id left join tweb_wil_clusterdesa c on u.id_cluster=c.id left join tweb_penduduk_warganegara w on u.warganegara_id=w.id left join tweb_penduduk_agama n on u.agama_id=n.id LEFT JOIN tweb_penduduk_sex sex ON u.sex=sex.id WHERE u.id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_data_kk($id=0){ - $sql = "SELECT b.nik_kepala, b.no_kk,b.id AS id_kk, c.nama as kepala_kk, d.* FROM tweb_penduduk a LEFT JOIN tweb_keluarga b ON a.id_kk=b.id LEFT JOIN tweb_penduduk c ON b.nik_kepala=c.id LEFT JOIN tweb_wil_clusterdesa d ON c.id_cluster=d.id WHERE a.id=? "; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - - function get_penduduk_ortu($id=0){ - $sql = "SELECT u.* FROM tweb_penduduk u WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_data_istri($id=0){ - $sql = "SELECT u.*,h.nama as hubungan, p.nama as kepala_kk,g.nama as gol_darah,d.nama as pend,r.nama as pek,m.nama as men, w.nama as wn,c.rw,c.rt,c.dusun, n.nama as agama FROM tweb_penduduk u left join tweb_penduduk_hubungan h on u.kk_level=h.id left join tweb_keluarga k on u.id_kk=k.id left join tweb_penduduk p on k.nik_kepala=p.id left join tweb_golongan_darah g on u.golongan_darah_id=g.id left join tweb_penduduk_pendidikan d on u.pendidikan_id=d.id left join tweb_penduduk_pekerjaan r on u.pekerjaan_id=r.id left join tweb_cacat m on u.cacat_id=m.id left join tweb_penduduk_warganegara w on u.warganegara_id=w.id left join tweb_wil_clusterdesa c on u.id_cluster=c.id left join tweb_penduduk_agama n on u.agama_id=n.id WHERE u.id=(SELECT id FROM tweb_penduduk WHERE id_kk=(SELECT id_kk FROM tweb_penduduk WHERE id=$id AND kk_level=1) AND kk_level=3 limit 1)"; - $query = $this->db->query($sql); - $data = $query->row_array(); - return $data; - } - function get_data_suami($id=0){ - $sql = "SELECT u.*,h.nama as hubungan, p.nama as kepala_kk,g.nama as gol_darah,d.nama as pend,r.nama as pek,m.nama as men, w.nama as wn, n.nama as agama,c.rw,c.rt,c.dusun,(DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( u.tanggallahir ) ) , '%Y' ) +0) as umur FROM tweb_penduduk u left join tweb_penduduk_hubungan h on u.kk_level=h.id left join tweb_keluarga k on u.id_kk=k.id left join tweb_penduduk p on k.nik_kepala=p.id left join tweb_golongan_darah g on u.golongan_darah_id=g.id left join tweb_penduduk_pendidikan d on u.pendidikan_id=d.id left join tweb_penduduk_pekerjaan r on u.pekerjaan_id=r.id left join tweb_cacat m on u.cacat_id=m.id left join tweb_wil_clusterdesa c on u.id_cluster=c.id left join tweb_penduduk_warganegara w on u.warganegara_id=w.id left join tweb_penduduk_agama n on u.agama_id=n.id WHERE u.id=(SELECT id FROM tweb_penduduk WHERE id_kk=(SELECT id_kk FROM tweb_penduduk WHERE id=$id AND kk_level=3) AND kk_level=1 limit 1 )"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_data_ayah($id=0){ - $sql = "SELECT u.*,h.nama as hubungan, p.nama as kepala_kk,g.nama as gol_darah,d.nama as pend,r.nama as pek,m.nama as men, w.nama as wn,c.rw,c.rt,c.dusun, n.nama as agama FROM tweb_penduduk u left join tweb_penduduk_hubungan h on u.kk_level=h.id left join tweb_keluarga k on u.id_kk=k.id left join tweb_penduduk p on k.nik_kepala=p.id left join tweb_golongan_darah g on u.golongan_darah_id=g.id left join tweb_penduduk_pendidikan d on u.pendidikan_id=d.id left join tweb_penduduk_pekerjaan r on u.pekerjaan_id=r.id left join tweb_cacat m on u.cacat_id=m.id left join tweb_penduduk_warganegara w on u.warganegara_id=w.id left join tweb_wil_clusterdesa c on u.id_cluster=c.id left join tweb_penduduk_agama n on u.agama_id=n.id WHERE u.nik=(SELECT ayah_nik from tweb_penduduk where id='$id') or (u.id_kk=(SELECT id_kk FROM tweb_penduduk where id=$id) AND u.kk_level=1) limit 1"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - - function get_data_ibu($id=0){ - $sql = "SELECT u.*,h.nama as hubungan, p.nama as kepala_kk,g.nama as gol_darah,d.nama as pend,r.nama as pek,m.nama as men, w.nama as wn,c.rw,c.rt,c.dusun, n.nama as agama FROM tweb_penduduk u left join tweb_penduduk_hubungan h on u.kk_level=h.id left join tweb_keluarga k on u.id_kk=k.id left join tweb_penduduk p on k.nik_kepala=p.id left join tweb_golongan_darah g on u.golongan_darah_id=g.id left join tweb_penduduk_pendidikan d on u.pendidikan_id=d.id left join tweb_penduduk_pekerjaan r on u.pekerjaan_id=r.id left join tweb_cacat m on u.cacat_id=m.id left join tweb_penduduk_warganegara w on u.warganegara_id=w.id left join tweb_wil_clusterdesa c on u.id_cluster=c.id left join tweb_penduduk_agama n on u.agama_id=n.id WHERE u.nik=(SELECT ibu_nik from tweb_penduduk where id=$id) or (u.id_kk=(SELECT id_kk FROM tweb_penduduk where id=$id) AND u.kk_level=3) limit 1"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_dusun($dusun=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE dusun = ? AND rt = '0' AND rw = '0'"; - $query = $this->db->query($sql,$dusun); - return $query->row_array(); - } - - function get_rw($dusun='',$rw=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE dusun = ? AND rw = ? AND rt = '0'"; - $query = $this->db->query($sql,array($dusun,$rw)); - return $query->row_array(); - } - function get_rt($dusun='',$rw='',$rt=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE dusun = ? AND rw = ? AND rt = ?"; - $query = $this->db->query($sql,array($dusun,$rw,$rt)); - return $query->row_array(); - } - function get_surat($url=''){ - $sql = "SELECT * FROM tweb_surat_format WHERE url_surat = ?"; - $query = $this->db->query($sql,$url); - return $query->row_array(); - } - - function coba($url=''){ - $g=$_POST['pamong']; - $u=$_SESSION['user']; - $z=$_POST['nomor']; - - $id = $_SESSION['nik']; - $individu = $this->get_data_surat($id); - - $ayah = $_SESSION['nik_ayah']; - $ayah = $this->get_data_surat($ayah); - - $ibu = $_SESSION['nik_ibu']; - $ibu = $this->get_data_surat($ibu); - - $input = $_POST; - $tgl = tgl_indo(date("Y m d")); - $thn = date("Y"); - $config = $this->get_data_desa(); - $surat = $this->get_surat($url); - - $tgllhr = strtoupper(tgl_indo($individu['tanggallahir'])); - $individu['nama'] = strtoupper($individu['nama']); - $individu['tempatlahir'] = strtoupper($individu['tempatlahir']); - - if($individu['rt'][0] != "0" AND $individu['rt'][0] < 10) - $individu['rt'] = "0".$individu['rt']; - - if($individu['rw'][0] != "0" AND $individu['rw'][0] < 10) - $individu['rw'] = "0".$individu['rw']; - - $ayah_tgllhr = strtoupper(tgl_indo($ayah['tanggallahir'])); - $ayah['nama'] = strtoupper($ayah['nama']); - $ayah['tempatlahir'] = strtoupper($ayah['tempatlahir']); - - if($ayah['rt'][0] != "0" AND $ayah['rt'][0] < 10) - $ayah['rt'] = "0".$ayah['rt']; - - if($ayah['rw'][0] != "0" AND $ayah['rw'][0] < 10) - $ayah['rw'] = "0".$ayah['rw']; - - $ibu_tgllhr = strtoupper(tgl_indo($ibu['tanggallahir'])); - $ibu['nama'] = strtoupper($ibu['nama']); - $ibu['tempatlahir'] = strtoupper($ibu['tempatlahir']); - - if($ibu['rt'][0] != "0" AND $ibu['rt'][0] < 10) - $ibu['rt'] = "0".$ibu['rt']; - - if($ibu['rw'][0] != "0" AND $ibu['rw'][0] < 10) - $ibu['rw'] = "0".$ibu['rw']; - - $mypath="surat\\$url\\"; - $mypath_arsip="surat\\arsip\\"; - $path = "".str_replace("\\","/",$mypath); - $path_arsip = "".str_replace("\\","/",$mypath_arsip); - $file = $path."$url.rtf"; - if(is_file($file)){ - $handle = fopen($file,'r'); - $buffer = stream_get_contents($handle); - - - - $buffer=str_replace("[kode_surat]","$surat[kode_surat]",$buffer); - $buffer=str_replace("[judul_surat]",strtoupper("surat ".$surat['nama']),$buffer); - $buffer=str_replace("[JUDUL_SURAT]",strtoupper("surat ".$surat['nama']),$buffer); - $buffer=str_replace("[tgl_surat]","$tgl",$buffer); - $buffer=str_replace("[tahun]","$thn",$buffer); - - $buffer=str_replace("[nomor_surat]","$input[nomor]",$buffer); - $buffer=str_replace("[nomor_sorat]","$input[nomor]",$buffer); - - if($input['berlaku_dari'] == "") - $input['berlaku_dari'] = ".........................."; - - if($input['berlaku_sampai'] == "") - $input['berlaku_sampai'] = "........................"; - - - $buffer=str_replace("[mulai_berlaku]","$input[berlaku_dari]",$buffer); - $buffer=str_replace("[tgl_akhir]","$input[berlaku_sampai]",$buffer); - - - $buffer=str_replace("[jabatan]","$input[jabatan]",$buffer); - $buffer=str_replace("[nama_pamong]","$input[pamong]",$buffer); - $buffer=str_replace("[keterangan]","$input[keterangan]",$buffer); - $buffer=str_replace("[keperluan]","$input[keperluan]",$buffer); - $buffer=str_replace("[tujuan]","$input[tujuan]",$buffer); - - $buffer=str_replace("[kode_desa]","$config[kode_desa]",$buffer); - $buffer=str_replace("[nama_kab]","$config[nama_kabupaten]",$buffer); - $buffer=str_replace("[nama_kec]","$config[nama_kecamatan]",$buffer); - $buffer=str_replace("[nama_des]","$config[nama_desa]",$buffer); - $buffer=str_replace("[NAMA_KAB]",strtoupper($config['nama_kabupaten']),$buffer); - $buffer=str_replace("[NAMA_KEC]",strtoupper($config['nama_kecamatan']),$buffer); - $buffer=str_replace("[NAMA_DES]",strtoupper($config['nama_desa']),$buffer); - $buffer=str_replace("[nama_kepala_camat]","$config[nama_kepala_camat]",$buffer); - $buffer=str_replace("[kades]","$config[nama_kepala_desa]",$buffer); - $buffer=str_replace("[nip_kepala_camat]","$config[nip_kepala_camat]",$buffer); - $buffer=str_replace("[pos]","$config[kode_pos]",$buffer); - $buffer=str_replace("[alamat_des]","$config[alamat_kantor] Pos : $config[kode_pos]",$buffer); - - $buffer=str_replace("[alamat]","RT $individu[rt] / RW $individu[rw] $individu[dusun]",$buffer); - $buffer=str_replace("[rt]","$individu[rt]",$buffer); - $buffer=str_replace("[rw]","$individu[rw]",$buffer); - $buffer=str_replace("[dusun]","$individu[dusun]",$buffer); - $buffer=str_replace("[nama_ayah]","$individu[nama_ayah]",$buffer); - $buffer=str_replace("[nama_ibu]","$individu[nama_ibu]",$buffer); - $buffer=str_replace("[nik_ayah]","$individu[ayah_nik]",$buffer); - $buffer=str_replace("[nik_ibu]","$individu[ibu_nik]",$buffer); - $buffer=str_replace("[nama]","$individu[nama]",$buffer); - $buffer=str_replace("[sex]","$individu[sex]",$buffer); - $buffer=str_replace("[agama]","$individu[agama]",$buffer); - $buffer=str_replace("[status_kawin]","$individu[status_kawin]",$buffer); - $buffer=str_replace("[gol_darah]","$individu[gol_darah]",$buffer); - $buffer=str_replace("[pekerjaan]","$individu[pekerjaan]",$buffer); - $buffer=str_replace("[warga_negara]","$individu[warganegara]",$buffer); - $buffer=str_replace("[no_ktp]","$individu[nik]",$buffer); - $buffer=str_replace("[nik]","$individu[nik]",$buffer); - $buffer=str_replace("*usia","$individu[umur] Tahun",$buffer); - $buffer=str_replace("[usia]","$individu[umur] Tahun",$buffer); - $buffer=str_replace("[no_kk]","$individu[no_kk]",$buffer); - $buffer=str_replace("[ttl]","$individu[tempatlahir]/$tgllhr",$buffer); - - - //PENGIKUT - $pxnama = ""; - $pxnik = ""; - $pxhubungan = ""; - $pxusia = ""; - if(isset($_POST['id_cb'])){ - $pengikut = $this->pengikut(); - $nom = 1; - foreach($pengikut AS $pgkt){ - $pxnama .= $pgkt['nama']."\line \line "; - $pxnik .= $pgkt['nik']."\line \line "; - $pxhubungan .= $pgkt['hubungan']."\line \line "; - $pxusia .= $pgkt['umur']." Thn\line \line "; - $pxtglahir .= $pgkt['tanggallahir']."\line \line "; - $pxtmplahir .= $pgkt['tempatlahir']."\line \line "; - $pxttl .= $pgkt['tempatlahir'].", ".tgl_indo($pgkt['tanggallahir'])."\line "; - $pxttl2 .= $pgkt['tempatlahir'].", ".rev_tgl($pgkt['tanggallahir'])."\line "; - $pxno .= $nom."\line \line "; - - $nom++; - } - - $buffer=str_replace("[px_nama]","$pxnama",$buffer); - $buffer=str_replace("[px_nik]","$pxnik",$buffer); - $buffer=str_replace("[px_hubungan]","$pxhubungan",$buffer); - $buffer=str_replace("[px_usia]","$pxusia",$buffer); - $buffer=str_replace("[px_tempatlahir]","$pxtglahir",$buffer); - $buffer=str_replace("[px_tanggallahir]","$pxtmplahir",$buffer); - $buffer=str_replace("[px_ttl]","$pxttl",$buffer); - $buffer=str_replace("[px_ttl2]","$pxttl2",$buffer); - $buffer=str_replace("[no]","$pxno",$buffer); - - - } - - - - - $buffer=str_replace("[kode_surat]","$surat[kode_surat]",$buffer); - $buffer=str_replace("[judul_surat]",strtoupper("surat ".$surat['nama']),$buffer); - $buffer=str_replace("[JUDUL_SURAT]",strtoupper("surat ".$surat['nama']),$buffer); - $buffer=str_replace("[tgl_surat]","$tgl",$buffer); - $buffer=str_replace("[tahun]","$thn",$buffer); - - - $buffer=str_replace("[nomor_surat]","$input[nomor]",$buffer); - $buffer=str_replace("[nomor_sorat]","$input[nomor]",$buffer); - $buffer=str_replace("[mulai_berlaku]","$input[berlaku_dari]",$buffer); - $buffer=str_replace("[tgl_akhir]","$input[berlaku_sampai]",$buffer); - $buffer=str_replace("[jabatan]","$input[jabatan]",$buffer); - $buffer=str_replace("[nama_pamong]","$input[pamong]",$buffer); - $buffer=str_replace("[keterangan]","$input[keterangan]",$buffer); - $buffer=str_replace("[keperluan]","$input[keperluan]",$buffer); - $buffer=str_replace("[tujuan]","$input[tujuan]",$buffer); - $buffer=str_replace("[hari]","$input[hari]",$buffer); - $buffer=str_replace("[tgl_keg]","$input[tgl_keg]",$buffer); - $buffer=str_replace("[waktu]","$input[waktu]",$buffer); - $buffer=str_replace("[jenis_keg]","$input[jenis_keg]",$buffer); - $buffer=str_replace("[lokasi_keg]","$input[lokasi_keg]",$buffer); - $buffer=str_replace("[bidang_keg]","$input[bidang_keg]",$buffer); - $buffer=str_replace("[alamat_sekarang]","$input[alamat_sekarang]",$buffer); - - - $buffer=str_replace("[kode_desa]","$config[kode_desa]",$buffer); - $buffer=str_replace("[nama_kab]","$config[nama_kabupaten]",$buffer); - $buffer=str_replace("[nama_kec]","$config[nama_kecamatan]",$buffer); - $buffer=str_replace("[nama_des]","$config[nama_desa]",$buffer); - $buffer=str_replace("[NAMA_KAB]",strtoupper($config['nama_kabupaten']),$buffer); - $buffer=str_replace("[NAMA_KEC]",strtoupper($config['nama_kecamatan']),$buffer); - $buffer=str_replace("[NAMA_DES]",strtoupper($config['nama_desa']),$buffer); - $buffer=str_replace("[nama_kepala_camat]","$config[nama_kepala_camat]",$buffer); - $buffer=str_replace("[kades]","$config[nama_kepala_desa]",$buffer); - $buffer=str_replace("[nip_kepala_camat]","$config[nip_kepala_camat]",$buffer); - $buffer=str_replace("[pos]","$config[kode_pos]",$buffer); - $buffer=str_replace("[alamat_des]","$config[alamat_kantor] Pos : $config[kode_pos]",$buffer); - - - - $buffer=str_replace("[alamat]","$individu[dusun] RT $individu[rt] / RW $individu[rw]",$buffer); - $buffer=str_replace("[rt]","$individu[rt]",$buffer); - $buffer=str_replace("[rw]","$individu[rw]",$buffer); - $buffer=str_replace("[dusun]","$individu[dusun]",$buffer); - $buffer=str_replace("[nama_ayah]","$individu[nama_ayah]",$buffer); - $buffer=str_replace("[nama_ibu]","$individu[nama_ibu]",$buffer); - $buffer=str_replace("[nik_ayah]","$individu[ayah_nik]",$buffer); - $buffer=str_replace("[nik_ibu]","$individu[ibu_nik]",$buffer); - $buffer=str_replace("[nama]","$individu[nama]",$buffer); - $buffer=str_replace("[sex]","$individu[sex]",$buffer); - $buffer=str_replace("[agama]","$individu[agama]",$buffer); - $buffer=str_replace("[status_kawin]","$individu[status_kawin]",$buffer); - $buffer=str_replace("[gol_darah]","$individu[gol_darah]",$buffer); - $buffer=str_replace("[pekerjaan]","$individu[pekerjaan]",$buffer); - $buffer=str_replace("[pendidikan]","$individu[pendidikan]",$buffer); - $buffer=str_replace("[warga_negara]","$individu[warganegara]",$buffer); - $buffer=str_replace("[no_ktp]","$individu[nik]",$buffer); - $buffer=str_replace("[hubungan]","$individu[hubungan]",$buffer); - $buffer=str_replace("[nik]","$individu[nik]",$buffer); - $buffer=str_replace("*usia","$individu[umur] Tahun",$buffer); - $buffer=str_replace("[usia]","$individu[umur] Tahun",$buffer); - $buffer=str_replace("[no_kk]","$individu[no_kk]",$buffer); - $buffer=str_replace("[ttl]","$individu[tempatlahir]/$tgllhr",$buffer); - $buffer=str_replace("[nama_lahir]","$input[nama_lahir]",$buffer); - $buffer=str_replace("[nik_lahir]","$input[nik_lahir]",$buffer); - $buffer=str_replace("[nama_mati]","$input[nama_mati]",$buffer); - $buffer=str_replace("[nik_mati]","$input[nik_mati]",$buffer); - $buffer=str_replace("[nama_doc]","$input[nama_doc]",$buffer); - $buffer=str_replace("[dokumen]","$input[dokumen]",$buffer); - $buffer=str_replace("[alamat_nikah]","$input[alamat_nikah]",$buffer); - $buffer=str_replace("[tgl_nikah]","$input[tgl_nikah]",$buffer); - $buffer=str_replace("[nama_wali]","$input[nama_wali]",$buffer); - $buffer=str_replace("[nik_wali]","$input[nik_wali]",$buffer); - $buffer=str_replace("[alamat_wali]","$input[alamat_wali]",$buffer); - $buffer=str_replace("[kelamin_wali]","$input[kelamin_wali]",$buffer); - $buffer=str_replace("[hubungan_wali]","$input[hubungan_wali]",$buffer); - $buffer=str_replace("[agama_wali]","$input[agama_wali]",$buffer); - $buffer=str_replace("[tptlhr_wali]","$input[tptlhr_wali]",$buffer); - $buffer=str_replace("[tgllhr_wali]","$input[tgllhr_wali]",$buffer); - $buffer=str_replace("[pekerjaan_wali]","$input[pekerjaan_wali]",$buffer); - $buffer=str_replace("[sebab_wali]","$input[sebab_wali]",$buffer); - $rp_ayah=Rupiah($input['ayah_penghasilan'])." (".Rpt($input['ayah_penghasilan']).")"; - $rp_ibu=Rupiah($input['ibu_penghasilan'])." (".Rpt($input['ibu_penghasilan']).")"; - - $buffer=str_replace("[ayah_penghasilan]","$rp_ayah",$buffer); - $buffer=str_replace("[ibu_penghasilan]","$rp_ibu",$buffer); - $total = $input['ibu_penghasilan']+$input['ayah_penghasilan']; - - $rpt = Rpt($total); - $total = Rupiah($total); - $buffer=str_replace("[total]","$total",$buffer); - $buffer=str_replace("[rphuruf]","$rpt",$buffer); - - - $buffer=str_replace("[sekolah]","$input[sekolah]",$buffer); - $buffer=str_replace("[jurusan]","$input[jurusan]",$buffer); - $buffer=str_replace("[kelas]","$input[kelas]",$buffer); - - $buffer=str_replace("[ayah_alamat]","$ayah[dusun] RT $ayah[rt] / RW $ayah[rw]",$buffer); - $buffer=str_replace("[ayah_rt]","$ayah[rt]",$buffer); - $buffer=str_replace("[ayah_rw]","$ayah[rw]",$buffer); - $buffer=str_replace("[ayah_dusun]","$ayah[dusun]",$buffer); - $buffer=str_replace("[ayah_nama_ayah]","$ayah[nama_ayah]",$buffer); - $buffer=str_replace("[ayah_nama_ibu]","$ayah[nama_ibu]",$buffer); - $buffer=str_replace("[ayah_nik_ayah]","$ayah[ayah_nik]",$buffer); - $buffer=str_replace("[ayah_nik_ibu]","$ayah[ibu_nik]",$buffer); - $buffer=str_replace("[ayah_nama]","$ayah[nama]",$buffer); - $buffer=str_replace("[ayah_sex]","$ayah[sex]",$buffer); - $buffer=str_replace("[ayah_agama]","$ayah[agama]",$buffer); - $buffer=str_replace("[ayah_status_kawin]","$ayah[status_kawin]",$buffer); - $buffer=str_replace("[ayah_gol_darah]","$ayah[gol_darah]",$buffer); - $buffer=str_replace("[ayah_pekerjaan]","$ayah[pekerjaan]",$buffer); - $buffer=str_replace("[ayah_pendidikan]","$ayah[pendidikan]",$buffer); - $buffer=str_replace("[ayah_warga_negara]","$ayah[warganegara]",$buffer); - $buffer=str_replace("[ayah_no_ktp]","$ayah[nik]",$buffer); - $buffer=str_replace("[ayah_nik]","$ayah[nik]",$buffer); - $buffer=str_replace("*ayah_usia","$ayah[umur] Tahun",$buffer); - $buffer=str_replace("[ayah_usia]","$ayah[umur] Tahun",$buffer); - $buffer=str_replace("[ayah_no_kk]","$ayah[no_kk]",$buffer); - $buffer=str_replace("[ayah_ttl]","$ayah[tempatlahir]/$ayah_tgllhr",$buffer); - - $buffer=str_replace("[ibu_alamat]","$ibu[dusun] RT $ibu[rt] / RW $ibu[rw]",$buffer); - $buffer=str_replace("[ibu_rt]","$ibu[rt]",$buffer); - $buffer=str_replace("[ibu_rw]","$ibu[rw]",$buffer); - $buffer=str_replace("[ibu_dusun]","$ibu[dusun]",$buffer); - $buffer=str_replace("[ibu_nama_ayah]","$ibu[nama_ayah]",$buffer); - $buffer=str_replace("[ibu_nama_ibu]","$ibu[nama_ibu]",$buffer); - $buffer=str_replace("[ibu_nik_ayah]","$ibu[ibu_nik]",$buffer); - $buffer=str_replace("[ibu_nik_ibu]","$ibu[ibu_nik]",$buffer); - $buffer=str_replace("[ibu_nama]","$ibu[nama]",$buffer); - $buffer=str_replace("[ibu_sex]","$ibu[sex]",$buffer); - $buffer=str_replace("[ibu_agama]","$ibu[agama]",$buffer); - $buffer=str_replace("[ibu_status_kawin]","$ibu[status_kawin]",$buffer); - $buffer=str_replace("[ibu_gol_darah]","$ibu[gol_darah]",$buffer); - $buffer=str_replace("[ibu_pekerjaan]","$ibu[pekerjaan]",$buffer); - $buffer=str_replace("[ibu_pendidikan]","$ibu[pendidikan]",$buffer); - $buffer=str_replace("[ibu_warga_negara]","$ibu[warganegara]",$buffer); - $buffer=str_replace("[ibu_no_ktp]","$ibu[nik]",$buffer); - $buffer=str_replace("[ibu_nik]","$ibu[nik]",$buffer); - $buffer=str_replace("*ibu_usia","$ibu[umur] Tahun",$buffer); - $buffer=str_replace("[ibu_usia]","$ibu[umur] Tahun",$buffer); - $buffer=str_replace("[ibu_no_kk]","$ibu[no_kk]",$buffer); - $buffer=str_replace("[ibu_ttl]","$ibu[tempatlahir]/$ibu_tgllhr",$buffer); - - $buffer=str_replace("[kua]","$input[kua]",$buffer); - $buffer=str_replace("[nomor_nikah]","$input[nomor_nikah]",$buffer); - - $buffer=str_replace("[hari_lahir]","$input[hari_lahir]",$buffer); - $buffer=str_replace("[tgl_lahir]","$input[tgl_lahir]",$buffer); - $buffer=str_replace("[jam_lahir]","$input[jam_lahir]",$buffer); - $buffer=str_replace("[tpt_lahir]","$input[tpt_lahir]",$buffer); - $buffer=str_replace("[sex_lahir]","$input[sex_lahir]",$buffer); - $buffer=str_replace("[hub_lapor]","$input[hub_lapor]",$buffer); - - - $buffer=str_replace("[hari_mati]","$input[hari_mati]",$buffer); - $buffer=str_replace("[tgl_mati]","$input[tgl_mati]",$buffer); - $buffer=str_replace("[jam_mati]","$input[jam_mati]",$buffer); - $buffer=str_replace("[tpt_mati]","$input[tpt_mati]",$buffer); - $buffer=str_replace("[sebab_mati]","$input[sebab_mati]",$buffer); - - $buffer=str_replace("[nama_baru1]","$input[nama_baru1]",$buffer); - $buffer=str_replace("[tpt_baru1]","$input[tpt_baru1]",$buffer); - $buffer=str_replace("[tgl_baru1]","$input[tgl_baru1]",$buffer); - $buffer=str_replace("[hubkel_baru1]","$input[hubkel_baru1]",$buffer); - $buffer=str_replace("[nama_baru2]","$input[nama_baru2]",$buffer); - $buffer=str_replace("[tpt_baru2]","$input[tpt_baru2]",$buffer); - $buffer=str_replace("[tgl_baru2]","$input[tgl_baru2]",$buffer); - $buffer=str_replace("[hubkel_baru2]","$input[hubkel_baru2]",$buffer); - $buffer=str_replace("[nama_baru3]","$input[nama_baru3]",$buffer); - $buffer=str_replace("[tpt_baru3]","$input[tpt_baru3]",$buffer); - $buffer=str_replace("[tgl_baru3]","$input[tgl_baru3]",$buffer); - $buffer=str_replace("[hubkel_baru3]","$input[hubkel_baru3]",$buffer); - $buffer=str_replace("[nama_baru4]","$input[nama_baru4]",$buffer); - $buffer=str_replace("[tpt_baru4]","$input[tpt_baru4]",$buffer); - $buffer=str_replace("[tgl_baru4]","$input[tgl_baru4]",$buffer); - $buffer=str_replace("[hubkel_baru4]","$input[hubkel_baru4]",$buffer); - $buffer=str_replace("[nama_baru5]","$input[nama_baru5]",$buffer); - $buffer=str_replace("[tpt_baru5]","$input[tpt_baru5]",$buffer); - $buffer=str_replace("[tgl_baru5]","$input[tgl_baru5]",$buffer); - $buffer=str_replace("[hubkel_baru5]","$input[hubkel_baru5]",$buffer); - $buffer=str_replace("[nama_baru6]","$input[nama_baru6]",$buffer); - $buffer=str_replace("[tpt_baru6]","$input[tpt_baru6]",$buffer); - $buffer=str_replace("[tgl_baru6]","$input[tgl_baru6]",$buffer); - $buffer=str_replace("[hubkel_baru6]","$input[hubkel_baru6]",$buffer); - $buffer=str_replace("[saksi_baru1]","$input[saksi_baru1]",$buffer); - $buffer=str_replace("[saksi_baru2]","$input[saksi_baru2]",$buffer); - - $buffer=str_replace("[pria_status]","$input[pria_status]",$buffer); - $buffer=str_replace("[wanita_status]","$input[wanita_status]",$buffer); - $buffer=str_replace("[istri_lama]","$input[istri_lama]",$buffer); - $buffer=str_replace("[nama_calon]","$input[nama_calon]",$buffer); - $buffer=str_replace("[binti]","$input[binti]",$buffer); - $buffer=str_replace("[alamat_calon]","$input[alamat_calon]",$buffer); - $buffer=str_replace("[tpt_lahir_calon]","$input[tpt_lahir_calon]",$buffer); - $buffer=str_replace("[tgl_lahir_calon]","$input[tgl_lahir_calon]",$buffer); - $buffer=str_replace("[warga_negara_calon]","$input[warga_negara_calon]",$buffer); - $buffer=str_replace("[agama_calon]","$input[agama_calon]",$buffer); - $buffer=str_replace("[kerja_calon]","$input[kerja_calon]",$buffer); - $buffer=str_replace("[hari_nikah]","$input[hari_nikah]",$buffer); - $buffer=str_replace("[tgl_nikah]","$input[tgl_nikah]",$buffer); - $buffer=str_replace("[jam_nikah]","$input[jam_nikah]",$buffer); - $buffer=str_replace("[tpt_nikah]","$input[tpt_nikah]",$buffer); - $buffer=str_replace("[mahar_nikah]","$input[mahar_nikah]",$buffer); - - $buffer=str_replace("[kartu_beda]","$input[kartu_beda]",$buffer); - $buffer=str_replace("[identitas_beda]","$input[identitas_beda]",$buffer); - $buffer=str_replace("[nama_beda]","$input[nama_beda]",$buffer); - $buffer=str_replace("[tempatlahir]","$input[tempatlahir]",$buffer); - $buffer=str_replace("[tgllahir]","$input[tgllahir]",$buffer); - - foreach ($input as $key => $entry){ - $buffer=str_replace("[$key]",$entry,$buffer); - } - - $berkas_arsip = $path_arsip.$url."_".$individu['nik']."_".date("Y-m-d").".rtf"; - $handle = fopen($berkas_arsip,'w+'); - fwrite($handle,$buffer); - fclose($handle); - $_SESSION['success']=8; - header("location:".base_url($berkas_arsip)); - } - - } -} \ No newline at end of file diff --git a/donjo-app/models/user_model.php b/donjo-app/models/user_model.php deleted file mode 100644 index 2d666a557..000000000 --- a/donjo-app/models/user_model.php +++ /dev/null @@ -1,429 +0,0 @@ -input->post('username'); - $password = hash_password($this->input->post('password')); - - $sql = "SELECT id,password,id_grup,session FROM user WHERE username=?"; - $query=$this->db->query($sql,array($username)); - $row=$query->row(); - if($row){ - if($password==$row->password){ - $this->reset_timer(); - $data['session'] = hash_password(time().$password); - $this->db->where('id',$row->id); - $this->db->update('user',$data); - - $_SESSION['siteman'] = 1; - $_SESSION['sesi'] = $data['session']; - //$_SESSION['sesi'] = $row->session; - $_SESSION['user'] = $row->id; - $_SESSION['grup'] = $row->id_grup; - $_SESSION['per_page'] = 10; - } - else{ - $_SESSION['siteman']=-1; - } - }else{ - $_SESSION['siteman']=-1; - } - } - function sesi_grup($sesi=''){ - - $sql = "SELECT id_grup FROM user WHERE session=? AND session <> ''"; - $query=$this->db->query($sql,array($sesi)); - $row=$query->row_array(); - if($this->cek_login()){ - if(isset($row['id_grup'])){ - return $row['id_grup']; - } - }else{ - $_SESSION['siteman'] = -2; - $this->logout(); - return null; - } - } - //time out - function reset_timer(){ - $time=3600; //15menit - $_SESSION['timeout']=time()+$time; - } - function cek_login(){ - $timeout=$_SESSION['timeout']; - if(time()<$timeout){ - $this->reset_timer(); - return true; - }else{ - unset($_SESSION['timeout']); - return false; - } - } - function login(){ - $username = $this->input->post('username'); - $password = hash_password($this->input->post('password')); - - $sql = "SELECT id,password,id_grup,session FROM user WHERE id_grup=1 LIMIT 1"; - $query=$this->db->query($sql); - $row=$query->row(); - - if($password!=$row->password){ - $_SESSION['siteman'] = 1; - $_SESSION['sesi'] = $row->session; - $_SESSION['user'] = $row->id; - $_SESSION['grup'] = $row->id_grup; - $_SESSION['per_page'] = 10; - } - else{ - $_SESSION['siteman']=-1; - } - } - function logout(){ - if(isset($_SESSION['user'])){ - $id = $_SESSION['user']; - $sql = "UPDATE user SET last_login=NOW(),session='' WHERE id=?"; - $this->db->query($sql, $id); - } - - $sql = "SELECT (SELECT COUNT(id) FROM tweb_penduduk WHERE status_dasar =1) AS pend,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_dasar =1 AND sex =1) AS lk,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_dasar =1 AND sex =2) AS pr,(SELECT COUNT(id) FROM tweb_keluarga) AS kk"; - $query = $this->db->query($sql); - $data=$query->row_array(); - - $bln=date("m"); - $thn=date("Y"); - - $sql = "SELECT * FROM log_bulanan WHERE month(tgl) = $bln AND year(tgl) = $thn"; - $query = $this->db->query($sql); - $ada = $query->result_array(); - - if(!$ada){ - $this->db->insert('log_bulanan',$data); - }else{ - - $sql = "UPDATE log_bulanan SET pend=$data[pend], lk = $data[lk],pr=$data[pr],kk = $data[kk] WHERE month(tgl) = $bln AND year(tgl) = $thn"; - $this->db->query($sql); - } - - unset($_SESSION['user']); - unset($_SESSION['sesi']); - unset($_SESSION['cari']); - unset($_SESSION['filter']); - - } - function autocomplete(){ - $sql = "SELECT username FROM user - UNION SELECT nama FROM user"; - $query = $this->db->query($sql); - $data = $query->result_array(); - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (u.username LIKE '$kw' OR u.nama LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND u.id_grup = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM user u WHERE 1"; - $sql .= $this->search_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - - switch($o){ - case 1: $order_sql = ' ORDER BY u.username'; break; - case 2: $order_sql = ' ORDER BY u.username DESC'; break; - case 3: $order_sql = ' ORDER BY u.nama'; break; - case 4: $order_sql = ' ORDER BY u.nama DESC'; break; - case 5: $order_sql = ' ORDER BY g.nama'; break; - case 6: $order_sql = ' ORDER BY g.nama DESC'; break; - default:$order_sql = ' ORDER BY u.username'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - $sql = "SELECT u.*,g.nama as grup - FROM user u, user_grup g - WHERE u.id_grup = g.id"; - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - $i=0; - $j=$offset; - while($iinput->post('old_foto'); - if (!empty($lokasi_file)){ - if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ - $_SESSION['success']=-1; - } else { - UploadFoto($nama_file,$old_foto); - $data['foto'] = $nama_file; - } - } - - $data['session'] = hash_password(now()); - - $outp = $this->db->insert('user',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - unset($data['old_foto']); - unset($data['foto']); - $lokasi_file = $_FILES['foto']['tmp_name']; - $tipe_file = $_FILES['foto']['type']; - $nama_file = $_FILES['foto']['name']; - $old_foto = $this->input->post('old_foto'); - if (!empty($lokasi_file)){ - if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ - $_SESSION['success']=-1; - } else { - UploadFoto($nama_file,$old_foto); - $data['foto'] = $nama_file; - } - } - - if($data['password']=='radiisi'){ - unset($data['password']); - $this->db->where('id',$id); - $outp = $this->db->update('user',$data); - } - else{ - $data['password'] = hash_password($data['password']); - $this->db->where('id',$id); - $outp = $this->db->update('user',$data); - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM user WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM user WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function user_lock($id='',$val=0){ - - $sql = "UPDATE user SET active=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_user($id=0){ - $sql = "SELECT * FROM user WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - - - $data['password'] = 'radiisi'; - return $data; - } - function get_user2($user=''){ - $sql = "SELECT id,nama,username FROM user WHERE username=?"; - $query = $this->db->query($sql,$user); - return $query->row_array(); - } - - function update_setting($id=0){ - $password = hash_password($this->input->post('pass_lama')); - $pass_baru = $this->input->post('pass_baru'); - $pass_baru1 = $this->input->post('pass_baru1'); - $nama = $this->input->post('nama'); - - $data = $_POST; - unset($data['old_foto']); - unset($data['foto']); - $lokasi_file = $_FILES['foto']['tmp_name']; - $tipe_file = $_FILES['foto']['type']; - $nama_file = $_FILES['foto']['name']; - $old_foto = $this->input->post('old_foto'); - if (!empty($lokasi_file)){ - if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ - $_SESSION['success']=-1; - } else { - UploadFoto($nama_file,$old_foto); - $data['foto'] = $nama_file; - } - } - $sql = "UPDATE user SET foto = '$nama_file' WHERE id=?"; - $this->db->query($sql,array($id)); - - $sql = "SELECT password,id_grup,session FROM user WHERE id=?"; - $query=$this->db->query($sql,array($id)); - $row=$query->row(); - - if($password==$row->password){ - if($pass_baru !=""){ - if($pass_baru == $pass_baru1){ - $pass_baru = hash_password($pass_baru); - $sql = "UPDATE user SET password=? WHERE id=?"; - $outp = $this->db->query($sql,array($pass_baru,$id)); - } - } - } - - $sql = "UPDATE user SET nama=? WHERE id=?"; - $outp = $this->db->query($sql,array($nama,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_grup(){ - $sql = "SELECT * FROM user_grup"; - $query = $this->db->query($sql); - return $query->result_array(); - } - function sid_online(){ - $q=$_GET["q"]; - $q="sid.web.id"; - $input=""; - exec("ping -n 1 -w 1 $q", $input, $result); - if ($result == 0) - return true; - else return false; - - } - function create_xml(){ - $sql = "SELECT * FROM config WHERE 1"; - $query = $this->db->query($sql); - $desa = $query->row_array(); - $nl="\r\n"; - $string = ""; - - $string .= "".$nl; - $string .= "".$desa['nama_desa']."".$nl; - $string .= "".$desa['kode_kabupaten'].$desa['kode_kecamatan'].$desa['kode_desa']."".$nl; - $string .= "".$desa['lat']."".$nl; - $string .= "".$desa['lng']."".$nl; - - $string .= "".$nl.$nl; - - $sql = "SELECT DISTINCT(dusun) FROM tweb_wil_clusterdesa"; - $query = $this->db->query($sql); - $wilayah = $query->result_array(); - - $string .= "".$nl; - foreach($wilayah AS $wil){ - - $string .= "".$wil['dusun']."".$nl; - - } - - $string .= "".$nl.$nl; - - $sql = "SELECT * FROM data_surat"; - $query = $this->db->query($sql); - $penduduk = $query->result_array(); - - $string .= "".$nl; - foreach($penduduk AS $pend){ - - $string .= "".$nl; - $string .= "".$pend['nik']."".$nl; - $string .= "".$pend['nama']."".$nl; - $string .= "".$pend['pekerjaan']."".$nl; - $string .= "".$nl; - - } - - $string .= "".$nl.$nl; - - - $mypath="assets\\sync\\"; - $path = "".str_replace("\\","/",$mypath)."/"; - - $ccyymmdd = date("Y-m-d"); - $handle = fopen($path."sycn_data_".$ccyymmdd.".xml",'w+'); - fwrite($handle,$string); - fclose($handle); - - - - - } - function send_data(){ - - - $ip = "127.0.0.1"; - $Connect = fsockopen($ip,"80",$errno,$errstr,1); - if($Connect){ - $soap_request="$key$p[id]"; - fputs($Connect, "POST /iWsService HTTP/1.0".$newLine); - fputs($Connect, "Content-Type: text/xml".$newLine); - fputs($Connect, "Content-Length: ".strlen($soap_request).$newLine.$newLine); - fputs($Connect, $soap_request.$newLine); - $buffer=""; - while($Response=fgets($Connect, 8192)){ - $buffer.=$Response; - } - echo $buffer; - } - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/web_artikel_model.php b/donjo-app/models/web_artikel_model.php deleted file mode 100644 index 52bff82d9..000000000 --- a/donjo-app/models/web_artikel_model.php +++ /dev/null @@ -1,402 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (judul LIKE '$kw' OR isi LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND a.enabled = $kf"; - return $filter_sql; - } - } - function grup_sql(){ - if($_SESSION['grup'] == 4){ - $kf = $_SESSION['user']; - $filter_sql= " AND a.id_user = $kf"; - return $filter_sql; - } - } - function paging($cat=0,$p=1,$o=0){ - $sql = "SELECT COUNT(a.id) AS id FROM artikel a WHERE a.id_kategori = ?"; - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $query = $this->db->query($sql,$cat); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($cat=0,$o=0,$offset=0,$limit=500){ - switch($o){ - case 1: $order_sql = ' ORDER BY judul'; break; - case 2: $order_sql = ' ORDER BY judul DESC'; break; - case 3: $order_sql = ' ORDER BY enabled'; break; - case 4: $order_sql = ' ORDER BY enabled DESC'; break; - case 5: $order_sql = ' ORDER BY tgl_upload'; break; - case 6: $order_sql = ' ORDER BY tgl_upload DESC'; break; - default:$order_sql = ' ORDER BY id DESC'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT a.*,k.kategori AS kategori FROM artikel a LEFT JOIN kategori k ON a.id_kategori = k.id WHERE id_kategori = ? "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $this->grup_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql,$cat); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($idb->query($sql); - return $query->result_array(); - } - function get_kategori($cat=0){ - $sql = "SELECT kategori FROM kategori WHERE id=?"; - $query = $this->db->query($sql,$cat); - return $query->row_array(); - } - function insert($cat=1){ - $fp = time(); - $lokasi_file = $_FILES['gambar']['tmp_name']; - $tipe_file = $_FILES['gambar']['type']; - $nama_file = $_FILES['gambar']['name']; - if (!empty($lokasi_file)){ - if ($tipe_file == "image/jpeg" OR $tipe_file == "image/pjpeg"){ - UploadArtikel($nama_file,"gambar",$fp); - } - } - $lokasi_file1 = $_FILES['gambar1']['tmp_name']; - $tipe_file1 = $_FILES['gambar1']['type']; - $nama_file1 = $_FILES['gambar1']['name']; - if (!empty($lokasi_file1)){ - if ($tipe_file1 == "image/jpeg" OR $tipe_file1 == "image/pjpeg"){ - UploadArtikel($nama_file1,"gambar1",$fp); - } - } - $lokasi_file2 = $_FILES['gambar2']['tmp_name']; - $tipe_file2 = $_FILES['gambar2']['type']; - $nama_file2 = $_FILES['gambar2']['name']; - if (!empty($lokasi_file2)){ - if ($tipe_file2 == "image/jpeg" OR $tipe_file2 == "image/pjpeg"){ - UploadArtikel($nama_file2,"gambar2",$fp); - } - } - $lokasi_file3 = $_FILES['gambar3']['tmp_name']; - $tipe_file3 = $_FILES['gambar3']['type']; - $nama_file3 = $_FILES['gambar3']['name']; - if (!empty($lokasi_file3)){ - if ($tipe_file3 == "image/jpeg" OR $tipe_file3 == "image/pjpeg"){ - UploadArtikel($nama_file3,"gambar3",$fp); - } - } - $data = $_POST; - $data['id_kategori'] = $cat; - $data['id_user'] = $_SESSION['user']; - $data['gambar'] = $fp.$nama_file; - $data['gambar1'] = $fp.$nama_file1; - $data['gambar2'] = $fp.$nama_file2; - $data['gambar3'] = $fp.$nama_file3; - - if($_SESSION['grup'] == 4){ - $data['enabled'] = 2; - } - - - - $lokasi_file = $_FILES['dokumen']['tmp_name']; - $tipe_file = $_FILES['dokumen']['type']; - $nama_file = $_FILES['dokumen']['name']; - - if($nama_file) - $data['dokumen']=$nama_file; - - if($data['link_dokumen']=='') - $data['link_dokumen']= $data['judul']; - - if (!empty($lokasi_file)){ - UploadDocument2($nama_file); - } - $data['isi'] = str_replace("","
",$data['isi']); - $outp = $this->db->insert('artikel',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - $fp = time(); - - $lokasi_file = $_FILES['gambar']['tmp_name']; - $tipe_file = $_FILES['gambar']['type']; - $nama_file = $_FILES['gambar']['name']; - if (!empty($lokasi_file)){ - if ($tipe_file == "image/jpeg" OR $tipe_file == "image/pjpeg"){ - UploadArtikel($nama_file,"gambar",$fp); - $data['gambar'] = $fp.$nama_file; - } - }else{unset($data['gambar']);} - - $lokasi_file1 = $_FILES['gambar1']['tmp_name']; - $tipe_file1 = $_FILES['gambar1']['type']; - $nama_file1 = $_FILES['gambar1']['name']; - if (!empty($lokasi_file1)){ - if ($tipe_file1 == "image/jpeg" OR $tipe_file1 == "image/pjpeg"){ - UploadArtikel($nama_file1,"gambar1",$fp); - $data['gambar1'] = $fp.$nama_file1; - } - }else{unset($data['gambar1']);} - $lokasi_file2 = $_FILES['gambar2']['tmp_name']; - $tipe_file2 = $_FILES['gambar2']['type']; - $nama_file2 = $_FILES['gambar2']['name']; - if (!empty($lokasi_file2)){ - if ($tipe_file2 == "image/jpeg" OR $tipe_file2 == "image/pjpeg"){ - UploadArtikel($nama_file2,"gambar2",$fp); - $data['gambar2'] = $fp.$nama_file2; - } - }else{unset($data['gambar2']);} - $lokasi_file3 = $_FILES['gambar3']['tmp_name']; - $tipe_file3 = $_FILES['gambar3']['type']; - $nama_file3 = $_FILES['gambar3']['name']; - if(!empty($lokasi_file3)){ - if ($tipe_file3 == "image/jpeg" OR $tipe_file3 == "image/pjpeg"){ - UploadArtikel($nama_file3,"gambar3",$fp); - $data['gambar3'] = $fp.$nama_file3; - } - }else{unset($data['gambar3']);} - $lokasi_file = $_FILES['dokumen']['tmp_name']; - $tipe_file = $_FILES['dokumen']['type']; - $nama_file = $_FILES['dokumen']['name']; - - if($nama_file) - $data['dokumen']=$nama_file; - - if($data['link_dokumen']=='') - $data['link_dokumen']= $data['judul']; - - if (!empty($lokasi_file)){ - UploadDocument2($nama_file); - } - - if(isset($data['gambar_hapus'])){ - HapusArtikel($data['gambar_hapus']); - $data['gambar'] = ""; - unset($data['gambar_hapus']); - } - - if(isset($data['gambar1_hapus'])){ - HapusArtikel($data['gambar1_hapus']); - $data['gambar1'] = ""; - unset($data['gambar1_hapus']); - } - - if(isset($data['gambar2_hapus'])){ - HapusArtikel($data['gambar2_hapus']); - $data['gambar2'] = ""; - unset($data['gambar2_hapus']); - } - - if(isset($data['gambar3_hapus'])){ - HapusArtikel($data['gambar3_hapus']); - $data['gambar3'] = ""; - unset($data['gambar3_hapus']); - } - - - $data['isi'] = str_replace("
","
",$data['isi']); - $this->db->where('id',$id); - $outp = $this->db->update('artikel',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM artikel WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function hapus($id=''){ - $sql = "DELETE FROM kategori WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM artikel WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function artikel_lock($id='',$val=0){ - - $sql = "UPDATE artikel SET enabled=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_artikel($id=0){ - $sql = "SELECT a.*,u.nama AS owner FROM artikel a LEFT JOIN user u ON a.id_user = u.id WHERE a.id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - - - - - return $data; - } - - function get_headline(){ - $sql = "SELECT a.*,u.nama AS owner FROM artikel a LEFT JOIN user u ON a.id_user = u.id WHERE headline = 1 ORDER BY tgl_upload DESC LIMIT 1 "; - $query = $this->db->query($sql); - $data = $query->row_array(); - - if(empty($data)) - $data = null; - else{ - $id = $data['id']; - - $panjang=str_split($data['isi'],300); - $data['isi'] = "Baca Selengkapnya"; - } - - return $data; - } - function artikel_show(){ - $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=? AND k.tipe = 1 ORDER BY a.tgl_upload DESC LIMIT 4"; - $query = $this->db->query($sql,1); - $data = $query->result_array(); - - $i=0; - while($iBaca Selengkapnya"; - $i++; - } - return $data; - } - function insert_kategori(){ - $data['kategori'] = $_POST['kategori']; - $data['tipe'] = '2'; - $outp = $this->db->insert('kategori',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function insert_comment($id=0){ - $data = $_POST; - $data['enabled'] = 2; - $data['id_artikel'] = $id; - $outp = $this->db->insert('komentar',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_komentar($id=0){ - $sql = "SELECT * FROM komentar WHERE id_artikel = ? ORDER BY tgl_upload DESC"; - $query = $this->db->query($sql,$id); - $data = $query->result_array(); - - $i=0; - while($idb->query($sql1); - - $sql = "UPDATE artikel SET headline = 1 WHERE id=?"; - $outp = $this->db->query($sql,$id); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function slide($id=0){ - $sql = "SELECT * FROM artikel WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - - if($data['headline']=='3'){ - $sql = "UPDATE artikel SET headline = 0 WHERE id=?"; - $outp = $this->db->query($sql,$id); - }else{ - $sql = "UPDATE artikel SET headline = 3 WHERE id=?"; - $outp = $this->db->query($sql,$id); - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } -} \ No newline at end of file diff --git a/donjo-app/models/web_dokumen_model.php b/donjo-app/models/web_dokumen_model.php deleted file mode 100644 index 8674cb888..000000000 --- a/donjo-app/models/web_dokumen_model.php +++ /dev/null @@ -1,166 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (satuan LIKE '$kw' OR nama LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND enabled = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM dokumen WHERE id_pend = 0 "; - $sql .= $this->search_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - switch($o){ - case 1: $order_sql = ' ORDER BY nama'; break; - case 2: $order_sql = ' ORDER BY nama DESC'; break; - case 3: $order_sql = ' ORDER BY enabled'; break; - case 4: $order_sql = ' ORDER BY enabled DESC'; break; - case 5: $order_sql = ' ORDER BY tgl_upload'; break; - case 6: $order_sql = ' ORDER BY tgl_upload DESC'; break; - default:$order_sql = ' ORDER BY id'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT * FROM dokumen WHERE id_pend = 0 "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data = null; - if($query) - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($idb->insert('dokumen',$data); - if($outp) $_SESSION['success']=1; - } else { - $_SESSION['success']=-1; - } - } - function update($id=0){ - $data = $_POST; - $lokasi_file = $_FILES['satuan']['tmp_name']; - $nama_file = $_FILES['satuan']['name']; - $old_file = $data['old_file']; - if (!empty($lokasi_file)){ - UploadDocument($nama_file,$old_file); - unset($data['old_file']); - } else { - $_SESSION['success']=-1; - $nama_file = $data['old_file']; - } - $data['satuan'] = underscore($nama_file); - $this->db->where('id',$id); - $outp = $this->db->update('dokumen',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM dokumen WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM dokumen WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function dokumen_lock($id='',$val=0){ - - $sql = "UPDATE dokumen SET enabled=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_dokumen($id=0){ - $sql = "SELECT * FROM dokumen WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function dokumen_show(){ - $sql = "SELECT * FROM dokumen WHERE enabled=?"; - $query = $this->db->query($sql,1); - $data = $query->result_array(); - return $data; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/web_gallery_model.php b/donjo-app/models/web_gallery_model.php deleted file mode 100644 index 84bbf8de3..000000000 --- a/donjo-app/models/web_gallery_model.php +++ /dev/null @@ -1,272 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (gambar LIKE '$kw' OR nama LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND enabled = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM gambar_gallery WHERE tipe = 0 "; - $sql .= $this->search_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - switch($o){ - case 1: $order_sql = ' ORDER BY nama'; break; - case 2: $order_sql = ' ORDER BY nama DESC'; break; - case 3: $order_sql = ' ORDER BY enabled'; break; - case 4: $order_sql = ' ORDER BY enabled DESC'; break; - case 5: $order_sql = ' ORDER BY tgl_upload'; break; - case 6: $order_sql = ' ORDER BY tgl_upload DESC'; break; - default:$order_sql = ' ORDER BY id'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT * FROM gambar_gallery WHERE tipe = 0 "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($idb->insert('gambar_gallery',$data); - if($outp) $_SESSION['success']=1; - } else { - $_SESSION['success']=-1; - } - } - } - function update($id=0){ - $x = $_POST; - $lokasi_file = $_FILES['gambar']['tmp_name']; - $tipe_file = $_FILES['gambar']['type']; - $nama_file = $_FILES['gambar']['name']; - $old_gambar = $x['old_gambar']; - if (!empty($lokasi_file)){ - if ($tipe_file == "image/jpeg" OR $tipe_file == "image/pjpeg"){ - UploadGallery($nama_file,$old_gambar); - unset($x['old_gambar']); - }} else { - $_SESSION['success']=-1; - $nama_file = $x['old_gambar']; - - } - - $data['gambar'] = $nama_file; - $data['nama'] = $_POST['nama']; - $this->db->where('id',$id); - $outp = $this->db->update('gambar_gallery',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM gambar_gallery WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - $sql = "DELETE FROM gambar_gallery WHERE parrent=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM gambar_gallery WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - $sql = "DELETE FROM gambar_gallery WHERE parrent=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function gallery_lock($id='',$val=0){ - - $sql = "UPDATE gambar_gallery SET enabled=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_gallery($id=0){ - $sql = "SELECT * FROM gambar_gallery WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function gallery_show(){ - $sql = "SELECT * FROM gambar_gallery WHERE enabled=?"; - $query = $this->db->query($sql,1); - $data = $query->result_array(); - return $data; - } - function paging2($gal=0,$p=1){ - $sql = "SELECT COUNT(id) AS id FROM gambar_gallery WHERE parrent = ? AND tipe = 2 "; - $sql .= $this->search_sql(); - $query = $this->db->query($sql,$gal); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_sub_gallery($gal=1,$offset=0,$limit=500){ - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - $sql = "SELECT * FROM gambar_gallery WHERE parrent = ? AND tipe = 2 "; - - $sql .= $paging_sql; - $query = $this->db->query($sql,$gal); - $data=$query->result_array(); - - $i=0; - while($idb->insert('gambar_gallery',$data); - if($outp) $_SESSION['success']=1; - } else { - $_SESSION['success']=-1; - } - }else{ - $data = $_POST; - unset($data['gambar']); - $data['parrent'] = $parrent; - $data['tipe'] = 2; - $outp = $this->db->insert('gambar_gallery',$data); -} - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update_sub_gallery($id=0){ - $x = $_POST; - $lokasi_file = $_FILES['gambar']['tmp_name']; - $tipe_file = $_FILES['gambar']['type']; - $nama_file = $_FILES['gambar']['name']; - $old_gambar = $x['old_gambar']; - if (!empty($nama_file)){ - if ($tipe_file == "image/jpeg" OR $tipe_file == "image/pjpeg"){ - UploadGallery($nama_file,$old_gambar); - unset($x['old_gambar']); - }} else { - $_SESSION['success']=-1; - $nama_file = $x['old_gambar']; - - } - - $data['gambar'] = $nama_file; - $data['nama'] = $_POST['nama']; - $this->db->where('id',$id); - $outp = $this->db->update('gambar_gallery',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/web_kategori_model.php b/donjo-app/models/web_kategori_model.php deleted file mode 100644 index 3212e425d..000000000 --- a/donjo-app/models/web_kategori_model.php +++ /dev/null @@ -1,291 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (kategori LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND enabled = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM kategori WHERE parrent = 0"; - $sql .= $this->search_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - switch($o){ - case 1: $order_sql = ' ORDER BY kategori'; break; - case 2: $order_sql = ' ORDER BY kategori DESC'; break; - case 3: $order_sql = ' ORDER BY enabled'; break; - case 4: $order_sql = ' ORDER BY enabled DESC'; break; - default:$order_sql = ' ORDER BY id'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - $sql = "SELECT k.*,k.kategori AS kategori FROM kategori k WHERE parrent = 0"; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($idb->insert('kategori',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - - } - function update($id=0){ - $data = $_POST; - $this->db->where('id',$id); - $outp = $this->db->update('kategori',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM kategori WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM kategori WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function list_sub_kategori($kategori=1){ - $sql = "SELECT * FROM kategori WHERE parrent = ? "; - - $query = $this->db->query($sql,$kategori); - $data=$query->result_array(); - - $i=0; - while($idb->query($sql); - $data=$query->result_array(); - - $i=0; - while($idb->query($sql); - $data=$query->result_array(); - - $i=0; - while($idb->insert('kategori',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update_sub_kategori($id=0){ - $data = $_POST; - - $this->db->where('id',$id); - $outp = $this->db->update('kategori',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_sub_kategori($id=''){ - $sql = "DELETE FROM kategori WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all_sub_kategori(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM kategori WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function kategori_lock($id='',$val=0){ - - $sql = "UPDATE kategori SET enabled=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_kategori($id=0){ - $sql = "SELECT * FROM kategori WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function kategori_show(){ - $sql = "SELECT * FROM kategori WHERE enabled=?"; - $query = $this->db->query($sql,1); - $data = $query->result_array(); - return $data; - } - function list_kategori_atas(){ - - - $sql = "SELECT m.* FROM kategori m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 1"; - - $query = $this->db->query($sql); - $data=$query->result_array(); - $url = site_url("first"); - $i=0; - while($i".$data[$i]['kategori'].""; - - $sql2 = "SELECT s.* FROM kategori s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; - $query = $this->db->query($sql2,$data[$i]['id']); - $data2=$query->result_array(); - - if($data2){ - $data[$i]['kategori'] = $data[$i]['kategori'].""; - } - $data[$i]['kategori'] = $data[$i]['kategori'].""; - $i++; - } - return $data; - } - function list_kategori_kiri(){ - - - $sql = "SELECT m.* FROM kategori m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 2"; - - $query = $this->db->query($sql); - $data=$query->result_array(); - $url = site_url("first"); - $i=0; - while($i".$data[$i]['kategori'].""; - - $sql2 = "SELECT s.* FROM kategori s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; - $query = $this->db->query($sql2,$data[$i]['id']); - $data2=$query->result_array(); - - if($data2){ - $data[$i]['kategori'] = $data[$i]['kategori'].""; - } - $data[$i]['kategori'] = $data[$i]['kategori'].""; - $i++; - } - return $data; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/web_komentar_model.php b/donjo-app/models/web_komentar_model.php deleted file mode 100644 index 260285cde..000000000 --- a/donjo-app/models/web_komentar_model.php +++ /dev/null @@ -1,197 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (komentar LIKE '$kw' OR komentar LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND enabled = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM komentar WHERE 1"; - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500,$cas=0){ - switch($o){ - case 1: $order_sql = ' ORDER BY tgl_upload DESC'; break; - case 2: $order_sql = ' ORDER BY owner'; break; - case 3: $order_sql = ' ORDER BY email'; break; - case 4: $order_sql = ' ORDER BY komentar'; break; - - default:$order_sql = ' ORDER BY tgl_upload DESC'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT * FROM komentar WHERE 1 "; - if($cas==2) - $sql .= " AND id_artikel = 775"; - else - $sql .= " AND id_artikel <> 775"; - - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($idb->query($sql,$tipe); - return $query->result_array(); - } - function insert(){ - - $data = $_POST; - $data['id_user'] = $_SESSION['user']; - $outp = $this->db->insert('komentar',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - - $this->db->where('id',$id); - $outp = $this->db->update('komentar',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM komentar WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM komentar WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function komentar_lock($id='',$val=0){ - - $sql = "UPDATE komentar SET enabled=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_komentar($id=0){ - $sql = "SELECT a.* FROM komentar a WHERE a.id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - - - - - return $data; - } - function komentar_show(){ - $sql = "SELECT a.*,u.nama AS owner FROM komentar a LEFT JOIN user u ON a.id_user = u.id WHERE enabled=? ORDER BY a.tgl_upload DESC LIMIT 6"; - $query = $this->db->query($sql,1); - $data = $query->result_array(); - - $i=0; - while($iBaca Selengkapnya"; - $i++; - } - return $data; - } - function insert_comment($id=0){ - $data = $_POST; - - $data['id_komentar'] = $id; - $outp = $this->db->insert('komentar',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_komentar($id=0){ - $sql = "SELECT * FROM komentar WHERE id_komentar = ? ORDER BY tgl_upload DESC"; - $query = $this->db->query($sql,$id); - $data = $query->result_array(); - - $i=0; - while($i \ No newline at end of file diff --git a/donjo-app/models/web_menu_model.php b/donjo-app/models/web_menu_model.php deleted file mode 100644 index f8e4a7a2b..000000000 --- a/donjo-app/models/web_menu_model.php +++ /dev/null @@ -1,280 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (nama LIKE '$kw')"; - - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND enabled = $kf"; - return $filter_sql; - } - } - function paging($tip=0,$p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM menu WHERE tipe = ?"; - $sql .= $this->search_sql(); - $query = $this->db->query($sql,$tip); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($tip=0,$o=0,$offset=0,$limit=500){ - switch($o){ - case 1: $order_sql = ' ORDER BY nama'; break; - case 2: $order_sql = ' ORDER BY nama DESC'; break; - case 3: $order_sql = ' ORDER BY enabled'; break; - case 4: $order_sql = ' ORDER BY enabled DESC'; break; - default:$order_sql = ' ORDER BY id'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - if($tip==1) - $sql = "SELECT * FROM menu WHERE tipe =? "; - else - $sql = "SELECT k.id,k.kategori AS nama FROM kategori k WHERE 1"; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql,$tip); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($idb->insert('menu',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - - } - function update($id=0){ - - - $data = $_POST; - - - if($data['manual_link']!=""){ - $data['link_tipe'] = 1; - $data['link'] = $data['manual_link']; - }else{ - $data['link_tipe'] = 0; - } - UNSET($data['manual_link']); - - if($data['link']=="") - UNSET($data['link']); - - $this->db->where('id',$id); - $outp = $this->db->update('menu',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM menu WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM menu WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function list_sub_menu($menu=1){ - $sql = "SELECT * FROM menu WHERE parrent = ? AND tipe = 3 "; - - $query = $this->db->query($sql,$menu); - $data=$query->result_array(); - - $i=0; - while($idb->query($sql); - $data=$query->result_array(); - - $i=0; - while($idb->query($sql); - $data=$query->result_array(); - - $i=0; - while($idb->insert('menu',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update_sub_menu($id=0){ - $data = $_POST; - - - - - if($data['manual_link']!=""){ - $data['link_tipe'] = 1; - $data['link'] = $data['manual_link']; - }else{ - $data['link_tipe'] = 0; - } - if($data['link']==""){ - UNSET($data['link']); - } - - $this->db->where('id',$id); - $outp = $this->db->update('menu',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_sub_menu($id=''){ - $sql = "DELETE FROM menu WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all_sub_menu(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM menu WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function menu_lock($id='',$val=0){ - - $sql = "UPDATE menu SET enabled=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_menu($id=0){ - $sql = "SELECT * FROM menu WHERE id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function menu_show(){ - $sql = "SELECT * FROM menu WHERE enabled=?"; - $query = $this->db->query($sql,1); - $data = $query->result_array(); - return $data; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/web_sosmed_model.php b/donjo-app/models/web_sosmed_model.php deleted file mode 100644 index f5ce4c854..000000000 --- a/donjo-app/models/web_sosmed_model.php +++ /dev/null @@ -1,39 +0,0 @@ -db->query($sql,$id); - $data=$query->row_array(); - - return $data; - } - function list_sosmed(){ - $sql = "SELECT * FROM media_sosial WHERE 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - - return $data; - } - function update($id=0){ - - $data = $_POST; - - $sql="SELECT * FROM media_sosial WHERE id =? "; - $query = $this->db->query($sql,$id); - $hasil=$query->result_array(); - - if($hasil){ - $this->db->where('id',$id); - $outp = $this->db->update('media_sosial',$data); - }else{ - $outp = $this->db->insert('media_sosial',$data); - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/web_statis_model.php b/donjo-app/models/web_statis_model.php deleted file mode 100644 index 77c4af31c..000000000 --- a/donjo-app/models/web_statis_model.php +++ /dev/null @@ -1,192 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND (komentar LIKE '$kw' OR komentar LIKE '$kw')"; - return $search_sql; - } - } - function filter_sql(){ - if(isset($_SESSION['filter'])){ - $kf = $_SESSION['filter']; - $filter_sql= " AND enabled = $kf"; - return $filter_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM komentar WHERE 1"; - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - switch($o){ - case 1: $order_sql = ' ORDER BY tgl_upload DESC'; break; - case 2: $order_sql = ' ORDER BY owner'; break; - case 3: $order_sql = ' ORDER BY email'; break; - case 4: $order_sql = ' ORDER BY komentar'; break; - - default:$order_sql = ' ORDER BY tgl_upload DESC'; - } - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT * FROM komentar WHERE 1 "; - - $sql .= $this->search_sql(); - $sql .= $this->filter_sql(); - $sql .= $order_sql; - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - $i=0; - $j=$offset; - while($idb->query($sql,$tipe); - return $query->result_array(); - } - function insert(){ - - $data = $_POST; - $data['id_user'] = $_SESSION['user']; - $outp = $this->db->insert('komentar',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=0){ - $data = $_POST; - - $this->db->where('id',$id); - $outp = $this->db->update('komentar',$data); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $sql = "DELETE FROM komentar WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM komentar WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function komentar_lock($id='',$val=0){ - - $sql = "UPDATE komentar SET enabled=? WHERE id=?"; - $outp = $this->db->query($sql, array($val,$id)); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function get_komentar($id=0){ - $sql = "SELECT a.* FROM komentar a WHERE a.id=?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - - - - - return $data; - } - function komentar_show(){ - $sql = "SELECT a.*,u.nama AS owner FROM komentar a LEFT JOIN user u ON a.id_user = u.id WHERE enabled=? ORDER BY a.tgl_upload DESC LIMIT 6"; - $query = $this->db->query($sql,1); - $data = $query->result_array(); - - $i=0; - while($iBaca Selengkapnya"; - $i++; - } - return $data; - } - function insert_comment($id=0){ - $data = $_POST; - - $data['id_komentar'] = $id; - $outp = $this->db->insert('komentar',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_komentar($id=0){ - $sql = "SELECT * FROM komentar WHERE id_komentar = ? ORDER BY tgl_upload DESC"; - $query = $this->db->query($sql,$id); - $data = $query->result_array(); - - $i=0; - while($i \ No newline at end of file diff --git a/donjo-app/models/web_widget_model.php b/donjo-app/models/web_widget_model.php deleted file mode 100644 index 8500c9802..000000000 --- a/donjo-app/models/web_widget_model.php +++ /dev/null @@ -1,31 +0,0 @@ -db->query($sql); - $data=$query->row_array(); - - return $data; - } - function update($id=0){ - - $data = $_POST; - - $sql="SELECT * FROM widget WHERE 1 "; - $query = $this->db->query($sql); - $hasil=$query->result_array(); - - if($hasil){ - $this->db->where('id',$id); - $outp = $this->db->update('widget',$data); - }else{ - $outp = $this->db->insert('widget',$data); - } - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } -} -?> \ No newline at end of file diff --git a/donjo-app/models/wilayah_model.php b/donjo-app/models/wilayah_model.php deleted file mode 100644 index acc5fd5b4..000000000 --- a/donjo-app/models/wilayah_model.php +++ /dev/null @@ -1,395 +0,0 @@ -db->query($sql); - $data = $query->result_array(); - - $i=0; - $outp=''; - while($idb->escape_like_str($cari); - $kw = '%' .$kw. '%'; - $search_sql= " AND u.dusun LIKE '$kw'"; - return $search_sql; - } - } - function paging($p=1,$o=0){ - $sql = "SELECT COUNT(id) AS id FROM tweb_wil_clusterdesa u WHERE u.rt = '0' AND u.rw = '0' "; - $sql .= $this->search_sql(); - $query = $this->db->query($sql); - $row = $query->row_array(); - $jml_data = $row['id']; - - $this->load->library('paging'); - $cfg['page'] = $p; - $cfg['per_page'] = $_SESSION['per_page']; - $cfg['num_rows'] = $jml_data; - $this->paging->init($cfg); - - return $this->paging; - } - function list_data($o=0,$offset=0,$limit=500){ - $paging_sql = ' LIMIT ' .$offset. ',' .$limit; - - $sql = "SELECT u.*,a.nama AS nama_kadus,a.nik AS nik_kadus, - (SELECT COUNT(rw.id) FROM tweb_wil_clusterdesa rw WHERE dusun = u.dusun AND rw <> '-' AND rt = '-') AS jumlah_rw, - (SELECT COUNT(v.id) FROM tweb_wil_clusterdesa v WHERE dusun = u.dusun AND v.rt <> '0' AND v.rt <> '-') AS jumlah_rt, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = u.dusun) and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = u.dusun) AND p.sex = 1 and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_l, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = u.dusun) AND p.sex = 2 and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_p, - (SELECT COUNT(p.id) FROM tweb_keluarga k inner join tweb_penduduk p ON k.nik_kepala=p.id WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = u.dusun) AND p.kk_level = 1 and status_dasar=1) AS jumlah_kk - FROM tweb_wil_clusterdesa u LEFT JOIN tweb_penduduk a ON u.id_kepala = a.id WHERE u.rt = '0' AND u.rw = '0' ORDER BY u.rw"; - - $sql .= $this->search_sql(); - $sql .= $paging_sql; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - $j=$offset; - while($idb->insert('tweb_wil_clusterdesa',penetration($data)); - - $rw = penetration($data); - $rw['rw'] = "-"; - $this->db->insert('tweb_wil_clusterdesa',$rw); - - $rt = penetration($rw); - $rt['rt'] = "-"; - $outp = $this->db->insert('tweb_wil_clusterdesa',$rt); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update($id=''){ - if(empty($_POST['id_kepala'])){ - UNSET($_POST['id_kepala']); - }else{ - $data['id_kepala']=$_POST['id_kepala']; - $temp = $this->wilayah_model->cluster_by_id($id); - $this->db->where('dusun',$temp['dusun']); - $this->db->where('rw','0'); - $this->db->where('rt','0'); - $outp = $this->db->update('tweb_wil_clusterdesa',$data); - } - UNSET($data); - $data['dusun']=$_POST['dusun']; - $temp = $this->wilayah_model->cluster_by_id($id); - $this->db->where('dusun',$temp['dusun']); - $outp = $this->db->update('tweb_wil_clusterdesa',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete($id=''){ - $temp = $this->cluster_by_id($id); - $dusun = (penetration($temp['dusun'])); - - $sql = "DELETE FROM tweb_wil_clusterdesa WHERE dusun='$dusun'"; - $outp = $this->db->query($sql); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $dusun){ - $sql = "DELETE FROM tweb_wil_clusterdesa WHERE id=?"; - $outp = $this->db->query($sql,array($dusun)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_data_rw($id=''){ - $temp = $this->cluster_by_id($id); - $dusun = $temp['dusun']; - - $sql = "SELECT u.*,a.nama AS nama_ketua,a.nik AS nik_ketua, - (SELECT COUNT(rt.id) FROM tweb_wil_clusterdesa rt WHERE dusun = u.dusun AND rw = u.rw AND rw <> '-' AND rt <> '-' AND rt <> '0' ) AS jumlah_rt, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.sex = 1 AND p.status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_l, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.sex = 2 AND p.status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_p, - (SELECT COUNT(p.id) FROM tweb_keluarga k inner join tweb_penduduk p ON k.nik_kepala=p.id WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.kk_level = 1 AND p.status_dasar=1) AS jumlah_kk - FROM tweb_wil_clusterdesa u LEFT JOIN tweb_penduduk a ON u.id_kepala = a.id WHERE u.rt = '0' AND u.rw <> '0' AND u.dusun = '$dusun'"; - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - while($icluster_by_id($dusun); - $data['dusun']= $temp['dusun']; - $outp = $this->db->insert('tweb_wil_clusterdesa',$data); - - $rt = $data; - $rt['rt'] = "-"; - $outp = $this->db->insert('tweb_wil_clusterdesa',$rt); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update_rw($dusun='',$rw=''){ - if(empty($_POST['id_kepala'])) - UNSET($_POST['id_kepala']); - - $data = $_POST; - $temp = $this->wilayah_model->cluster_by_id($dusun); - $this->db->where('dusun',$temp['dusun']); - $this->db->where('rw',$rw); - $outp = $this->db->update('tweb_wil_clusterdesa',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_rw($id){ - $temp = $this->cluster_by_id($id); - $rw = $temp['rw']; - $dusun = $temp['dusun']; - - $sql = "DELETE FROM tweb_wil_clusterdesa WHERE rw='$rw' and dusun='$dusun'"; - $outp = $this->db->query($sql,array($id)); - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - - } - function delete_all_rw(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM tweb_wil_clusterdesa WHERE id=?"; - $outp = $this->db->query($sql,array($id)); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_data_rt($dusun='',$rw=''){ - $sql = "SELECT u.*,a.nama AS nama_ketua,a.nik AS nik_ketua, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.sex = 1 AND p.status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_l,( - SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.sex = 2 AND p.status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_p, - (SELECT COUNT(p.id) FROM tweb_keluarga k inner join tweb_penduduk p ON k.nik_kepala=p.id WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.kk_level = 1) AS jumlah_kk - FROM tweb_wil_clusterdesa u LEFT JOIN tweb_penduduk a ON u.id_kepala = a.id WHERE u.rt <> '0' AND u.rw = '$rw' AND u.dusun = '$dusun' AND u.rt <> '-'"; - - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - while($icluster_by_id($dusun); - $data['dusun']= $temp['dusun']; - $data['rw'] = $rw; - $outp = $this->db->insert('tweb_wil_clusterdesa',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update_rt($id=0){ - if(empty($_POST['id_kepala'])) - UNSET($_POST['id_kepala']); - - $data = $_POST; - $this->db->where('id',$id); - $outp = $this->db->update('tweb_wil_clusterdesa',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - - function update_dusun_map($dusun=''){ - $data = $_POST; - $this->db->where('id',$dusun); - $outp = $this->db->update('tweb_wil_clusterdesa',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function get_dusun_maps($id=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE id=?"; - $query = $this->db->query($sql,$id); - return $query->row_array(); - } - function update_rw_map($dus=0,$id=0){ - $data = $_POST; - $this->db->where('dusun',$dus); - $this->db->where('rw',$id); - $this->db->where('rt','0'); - $outp = $this->db->update('tweb_wil_clusterdesa',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function update_rt_map($dus=0,$rw=0,$id=0){ - $data = $_POST; - $this->db->where('dusun',$dus); - $this->db->where('rw',$rw); - $this->db->where('rt',$id); - $outp = $this->db->update('tweb_wil_clusterdesa',$data); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_rt($id=0){ - $sql = "DELETE FROM tweb_wil_clusterdesa WHERE id = ?"; - $outp = $this->db->query($sql,$id); - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function delete_all_rt(){ - $id_cb = $_POST['id_cb']; - - if(count($id_cb)){ - foreach($id_cb as $id){ - $sql = "DELETE FROM tweb_wil_clusterdesa WHERE id = ?"; - $outp = $this->db->query($sql,$id); - } - } - else $outp = false; - - if($outp) $_SESSION['success']=1; - else $_SESSION['success']=-1; - } - function list_penduduk(){ - $sql = "SELECT id,nik,nama FROM tweb_penduduk WHERE status = 1"; - $query = $this->db->query($sql); - $data=$query->result_array(); - - - $i=0; - while($idb->query($sql,$id); - $data=$query->result_array(); - - - $i=0; - while($idb->query($sql,$id); - $data = $query->row_array(); - return $data; - } - - function get_penduduk($id=0){ - $sql = "SELECT id,nik,nama FROM tweb_penduduk WHERE id = ?"; - $query = $this->db->query($sql,$id); - $data = $query->row_array(); - return $data; - } - function get_dusun($dusun=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE dusun = ? AND rt = '0' AND rw = '0'"; - $query = $this->db->query($sql,$dusun); - return $query->row_array(); - } - - function cluster_by_id($id=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE id = ?"; - $query = $this->db->query($sql,$id); - return $query->row_array(); - } - - function get_rw($dusun='',$rw=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE dusun = ? AND rw = ? AND rt = '0'"; - $query = $this->db->query($sql,array($dusun,$rw)); - return $query->row_array(); - } - function get_rt($dusun='',$rw='',$rt=''){ - $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE dusun = ? AND rw = ? AND rt = ?"; - $query = $this->db->query($sql,array($dusun,$rw,$rt)); - return $query->row_array(); - } - function total(){ - $sql = "SELECT (SELECT COUNT(rw.id) FROM tweb_wil_clusterdesa rw WHERE rw <> '-' AND rt = '-') AS total_rw, - (SELECT COUNT(v.id) FROM tweb_wil_clusterdesa v WHERE v.rt <> '0' AND v.rt <> '-') AS total_rt, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa ) and (status_dasar=1 OR status_dasar=4) and (status = 1 OR status = 2)) AS total_warga, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa) AND p.sex = 1 and (status_dasar=1 OR status_dasar = 4) and (status = 1 OR status = 2)) AS total_warga_l, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa) AND p.sex = 2 and (status_dasar=1 OR status_dasar = 4) and (status = 1 OR status = 2)) AS total_warga_p, - (SELECT COUNT(p.id) FROM tweb_keluarga k inner join tweb_penduduk p ON k.nik_kepala=p.id WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa) AND p.kk_level = 1 and status_dasar=1 and (status = 1 OR status = 2)) AS total_kk FROM tweb_wil_clusterdesa u LEFT JOIN tweb_penduduk a ON u.id_kepala = a.id WHERE u.rt = '0' AND u.rw = '0' limit 1"; - $query = $this->db->query($sql); - return $query->row_array(); - } - function total_rw($dusun=''){ - $sql = "select sum(jumlah_rt) as jmlrt,sum(jumlah_warga) as jmlwarga,sum(jumlah_warga_l) as jmlwargal,sum(jumlah_warga_p) as jmlwargap,sum(jumlah_kk) as jmlkk from - (SELECT u.*,a.nama AS nama_ketua,a.nik AS nik_ketua,(SELECT COUNT(rt.id) FROM tweb_wil_clusterdesa rt WHERE dusun = u.dusun AND rw = u.rw AND rw <> '-' AND rt <> '-' AND rt <> '0' ) AS jumlah_rt, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw ) and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.sex = 1 and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_l, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.sex = 2 and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_p, - (SELECT COUNT(p.id) FROM tweb_keluarga k inner join tweb_penduduk p ON k.nik_kepala=p.id WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.kk_level = 1 and status_dasar=1) AS jumlah_kk FROM tweb_wil_clusterdesa u LEFT JOIN tweb_penduduk a ON u.id_kepala = a.id WHERE u.rt = '0' AND u.rw <> '0' AND u.dusun = '$dusun') as x "; - $query = $this->db->query($sql); - $data=$query->row_array(); - return $data; - } - function total_rt($dusun='',$rw=''){ - $sql = "select sum(jumlah_warga) as jmlwarga,sum(jumlah_warga_l) as jmlwargal,sum(jumlah_warga_p) as jmlwargap,sum(jumlah_kk) as jmlkk from - (SELECT u.*,a.nama AS nama_ketua,a.nik AS nik_ketua, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga, - (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.sex = 1 and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_l,(SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.sex = 2 and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_p, - (SELECT COUNT(p.id) FROM tweb_keluarga k inner join tweb_penduduk p ON k.nik_kepala=p.id WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.kk_level = 1 and status_dasar=1) AS jumlah_kk FROM tweb_wil_clusterdesa u LEFT JOIN tweb_penduduk a ON u.id_kepala = a.id WHERE u.rt <> '0' AND u.rt <> '-' AND u.rw = '$rw' AND u.dusun = '$dusun') as x "; - $query = $this->db->query($sql); - $data=$query->row_array(); - return $data; - } -} -?> \ No newline at end of file diff --git a/donjo-app/views/analisis_grafik/penduduk_excel.php b/donjo-app/views/analisis_grafik/penduduk_excel.php deleted file mode 100644 index 1007a05c8..000000000 --- a/donjo-app/views/analisis_grafik/penduduk_excel.php +++ /dev/null @@ -1,58 +0,0 @@ - - - - -Laporan Statistik - - - - -
- -
-
- - - - -
- -
- - - - - - - - - - - - - - - - - - - - - -
NoStatistikJumlahLaki-lakiPerempuan
- - -
- - -
- - - - diff --git a/donjo-app/views/analisis_grafik/penduduk_pie.php b/donjo-app/views/analisis_grafik/penduduk_pie.php deleted file mode 100644 index e58ce7ad9..000000000 --- a/donjo-app/views/analisis_grafik/penduduk_pie.php +++ /dev/null @@ -1,162 +0,0 @@ -
- - - - -
- Statistik Keluarga - - - Statistik Penduduk - - - - - - - -
-
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
NoStatistikJumlahLaki-lakiPerempuan
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_grafik/penduduk_print.php b/donjo-app/views/analisis_grafik/penduduk_print.php deleted file mode 100644 index cfd5d549b..000000000 --- a/donjo-app/views/analisis_grafik/penduduk_print.php +++ /dev/null @@ -1,158 +0,0 @@ - - - -Laporan Statistik - - - - -
- -
- - - - - - - -
- -

PEMERINTAH KABUPATEN

-

-

KECAMATAN

-

DESA

-

LAPORAN STATISTIK

-
-
- - - - - - -
-
- - - -00001 -
-
-
- - - - -
-
- - - - -
-
- - - - - -
-
- Melaporkan Data Statistik - - -
-
- - - -
-
- - - - -
-
- Dengan rincian sebagai berikut - : -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
NoStatistikJumlahLaki-lakiPerempuan
-
- - - - -
-
- - - -
-
-
- - - - - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - -
-
- - - - -
-
- -
-
- -
- diff --git a/donjo-app/views/analisis_grafik/table.php b/donjo-app/views/analisis_grafik/table.php deleted file mode 100644 index 3ee6265ac..000000000 --- a/donjo-app/views/analisis_grafik/table.php +++ /dev/null @@ -1,135 +0,0 @@ -
- - - - -
- - - - - -
-
-
-
- - - - - - - - - - -
-
-
-
- -
-
- - - - - - - - - - - - - - - - - -
NoStatistikJumlah
- -
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_grafik/time.php b/donjo-app/views/analisis_grafik/time.php deleted file mode 100644 index 38b9b60e0..000000000 --- a/donjo-app/views/analisis_grafik/time.php +++ /dev/null @@ -1,98 +0,0 @@ -
- - - - -
- - - - - -
-
-
-
- -
-
- - - - - - - - - - - - - - - - - -
NoStatistik
- -
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_indikator/form.php b/donjo-app/views/analisis_indikator/form.php deleted file mode 100644 index d28b4a341..000000000 --- a/donjo-app/views/analisis_indikator/form.php +++ /dev/null @@ -1,108 +0,0 @@ -
- - -load->view('analisis_master/left',$data);?> -
-
-
-

Form Pertanyaan -

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tipe Pertanyaan -
- -> -> -> -> -
-
Kode Pertanyaan
Pertanyaan
Bobot - "> -
Aksi Analisis -
- -> -> -
-
Kategori Indikator -
- - -> - -
-
Publikasi Indikator -
- -> -> -
-*) Tampilkan data indikator di halaman depan website desa (Menu Data Desa -> Data Analisis). -
-
- -
- -
-
- - -
-
-
-
- -
\ No newline at end of file diff --git a/donjo-app/views/analisis_indikator/manajemen_kuisioner_form.php b/donjo-app/views/analisis_indikator/manajemen_kuisioner_form.php deleted file mode 100644 index eda8ba6d5..000000000 --- a/donjo-app/views/analisis_indikator/manajemen_kuisioner_form.php +++ /dev/null @@ -1,71 +0,0 @@ - - - -
Data Responden
-
-

Form Manajemen Responden

-
-
-
-
- - - - -
 
-
>
- -
>
- - -
-
- -
-
- -
-
-
- - -
-
-
-
-
diff --git a/donjo-app/views/analisis_indikator/parameter/ajax_form.php b/donjo-app/views/analisis_indikator/parameter/ajax_form.php deleted file mode 100644 index bb96b9a2f..000000000 --- a/donjo-app/views/analisis_indikator/parameter/ajax_form.php +++ /dev/null @@ -1,24 +0,0 @@ - - -
- - - - - - - - - - - - - - -
Kode
Jawaban
Ukuran/Nilai
-
-
- -
-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_indikator/parameter/table.php b/donjo-app/views/analisis_indikator/parameter/table.php deleted file mode 100644 index f291f6b89..000000000 --- a/donjo-app/views/analisis_indikator/parameter/table.php +++ /dev/null @@ -1,76 +0,0 @@ - -
-load->view('analisis_master/left',$data);?> -
-
-
-
-
-

Manajemen Ukuran/Nilai Indikator Analisis

-

  Indikator/Pertanyaan :

- -
- -
-
-
- -
-
-
-
-
diff --git a/donjo-app/views/analisis_indikator/table.php b/donjo-app/views/analisis_indikator/table.php deleted file mode 100644 index 88290549f..000000000 --- a/donjo-app/views/analisis_indikator/table.php +++ /dev/null @@ -1,176 +0,0 @@ - -
-load->view('analisis_master/left',$data);?> -
-
-
-
-
-

Manajemen Indikator Analisis -

-
-
- Tambah Indikator Baru -
-
-
-
-
-
- -   - -   - -
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
No Aksi">Kode ">Kode ">Kode ">Pertanyaan/Indikator ">Pertanyaan/Indikator ">Pertanyaan/Indikator ">Tipe Pertanyaan ">Tipe Pertanyaan ">Tipe Pertanyaan ">Kategori/Variabel ">Kategori/Variabel ">Kategori/Variabel ">Bobot ">Bobot ">Bobot ">Aksi Analisis ">Aksi Analisis ">Aksi Analisis 
- - - -
-
-
-
-
-
-
- - - - - -
-
-
-
- -
- start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
diff --git a/donjo-app/views/analisis_kategori/ajax_form.php b/donjo-app/views/analisis_kategori/ajax_form.php deleted file mode 100644 index d1e065c62..000000000 --- a/donjo-app/views/analisis_kategori/ajax_form.php +++ /dev/null @@ -1,15 +0,0 @@ - - -
- - - - - -
Nama Kategori/Variabel
-
-
- -
-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_kategori/form.php b/donjo-app/views/analisis_kategori/form.php deleted file mode 100644 index 2bd086316..000000000 --- a/donjo-app/views/analisis_kategori/form.php +++ /dev/null @@ -1,35 +0,0 @@ -
- - -
- -
- -
-
-

Form Data Kategori/Variabel -

-
-
-
- - - - - -
Nama Kategori/Variabel
-
- -
- -
-
- - -
-
-
-
-
-
diff --git a/donjo-app/views/analisis_kategori/table.php b/donjo-app/views/analisis_kategori/table.php deleted file mode 100644 index 534db7946..000000000 --- a/donjo-app/views/analisis_kategori/table.php +++ /dev/null @@ -1,113 +0,0 @@ - -
-load->view('analisis_master/left',$data);?> -
-
-
-
-
-

Pengaturan Kategori/Variabel -

-
-
- Tambah Kategori/Variabel Baru -
-
-
-
-
-
-
-
- - - - - -
-
-
-
- -
- - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
- -
diff --git a/donjo-app/views/analisis_klasifikasi/ajax_form.php b/donjo-app/views/analisis_klasifikasi/ajax_form.php deleted file mode 100644 index 5304841b1..000000000 --- a/donjo-app/views/analisis_klasifikasi/ajax_form.php +++ /dev/null @@ -1,23 +0,0 @@ - - -
- - - - - - - - - - - - - -
Klasifikasi
Nilai Minimal
Nilai Maksimal
-
-
- -
-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_klasifikasi/table.php b/donjo-app/views/analisis_klasifikasi/table.php deleted file mode 100644 index 7a44f79c5..000000000 --- a/donjo-app/views/analisis_klasifikasi/table.php +++ /dev/null @@ -1,134 +0,0 @@ - -
-load->view('analisis_master/left',$data);?> -
-
-
-
-
-

Manajemen Klasifikasi Analisis -

-
-
-  Tambah Klasifikasi Baru -
-
-
- -
-
-
-
-
- - - - - -
-
-
-
- -
- start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
diff --git a/donjo-app/views/analisis_laporan/ajax_multi.php b/donjo-app/views/analisis_laporan/ajax_multi.php deleted file mode 100644 index c00a7c00f..000000000 --- a/donjo-app/views/analisis_laporan/ajax_multi.php +++ /dev/null @@ -1,67 +0,0 @@ - - -
- - - - - -
-
- > - -
- -
- > - -
- -
-
-
- - -
-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_laporan/form.php b/donjo-app/views/analisis_laporan/form.php deleted file mode 100644 index 1fe0a0e67..000000000 --- a/donjo-app/views/analisis_laporan/form.php +++ /dev/null @@ -1,124 +0,0 @@ - -
-load->view('analisis_master/left',$data);?> -
-
-
-
-
-
- - - - - - - - - - - - - - - - -
Hasil Pendataan :
Nomor Identitas :
Nama Subjek :
- -

DAFTAR ANGGOTA

- - - - - - - - - - - - - - - - - - - -
NONIKNAMATANGGAL LAHIRJENIS KELAMIN 
 
- - - - - - - - - - - - = 1){$bg = "class='bg'";}else{$bg ="";} - ?> - > - - - - - - - - - - - - - - -
NoPertanyaan / IndikatorBobot - JawabanNilaiPoin
TOTAL
- - - - - - -
 
- - - - - - - - -

Berkas Bukti / Pengesahan Form Pendataan

- - - -
- -
-
-
- -
-
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_laporan/table.php b/donjo-app/views/analisis_laporan/table.php deleted file mode 100644 index 712f43bcb..000000000 --- a/donjo-app/views/analisis_laporan/table.php +++ /dev/null @@ -1,202 +0,0 @@ - - - -
-load->view('analisis_master/left',$data);?> -
-
-
-
-
-
-
- - - - - - - - - - - - - - - - -
Nama Analisis :
Subjek Analisis :
Periode :
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoRincian"> "> "> "> "> "> L/PDusunRWRT">Nilai ">Nilai ">Nilai ">Klasifikasi ">Klasifikasi ">Klasifikasi 
- -
-
-
-
-
-
-
- - - - - - -
-
-
-
- -
- start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
diff --git a/donjo-app/views/analisis_laporan/table_excel.php b/donjo-app/views/analisis_laporan/table_excel.php deleted file mode 100644 index 102d4ba4e..000000000 --- a/donjo-app/views/analisis_laporan/table_excel.php +++ /dev/null @@ -1,57 +0,0 @@ - - - -
-
- -

DATA STATISTIK ANALISIS JAWABAN

-
- - - - - - - - - - - - - - - - - - - - - - - - - -
NoL/PDusunRWRTNilaiKlasifikasi
-
- \ No newline at end of file diff --git a/donjo-app/views/analisis_laporan/table_print.php b/donjo-app/views/analisis_laporan/table_print.php deleted file mode 100644 index 08a53d810..000000000 --- a/donjo-app/views/analisis_laporan/table_print.php +++ /dev/null @@ -1,68 +0,0 @@ - - - - -Data Analisis - - - - - -
- -
-

Laporan Hasil Analisis

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoL/PDusunRWRTNilaiKlasifikasi
-
- - -
- diff --git a/donjo-app/views/analisis_master/form.php b/donjo-app/views/analisis_master/form.php deleted file mode 100644 index af39a7c5f..000000000 --- a/donjo-app/views/analisis_master/form.php +++ /dev/null @@ -1,129 +0,0 @@ - - - - - -
- - -
-
-
-
-

Form Master Analisis

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Nama Analisis
Subjek/Unit Analisis -
- -> -> -> -> -
-
Kategori Kelompok - -
Status Analisis -
- -> -> -
Rumus Penilaian Analisis
Sigma [Bobot (indikator) x Nilai (ukuran)] / "Bilangan Pembagi"
Bilangan Pembagi *) untuk tanda koma "," gunakan tanda titik "." sebagai substitusinya.
Analisis Terhubung - - *) Kosongi jika tida ada analisis terhubung. -
Deskripsi Analisis
- -
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_master/import.php b/donjo-app/views/analisis_master/import.php deleted file mode 100644 index e356cf183..000000000 --- a/donjo-app/views/analisis_master/import.php +++ /dev/null @@ -1,19 +0,0 @@ -
- - - - - - - - -
    -
  • Data yang dibutuhkan untuk Import dengan memenuhi aturan data sebagai berikut Aturan Data
  • -
  • Contoh urutan format dapat dilihat pada tautan berikut Contoh
  • -
File Master Analisis
-
-
- -
-
-
diff --git a/donjo-app/views/analisis_master/left.php b/donjo-app/views/analisis_master/left.php deleted file mode 100644 index 139a843ca..000000000 --- a/donjo-app/views/analisis_master/left.php +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - -
-

MENU ANALISIS

-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_master/menu.php b/donjo-app/views/analisis_master/menu.php deleted file mode 100644 index 36848f955..000000000 --- a/donjo-app/views/analisis_master/menu.php +++ /dev/null @@ -1,24 +0,0 @@ -
-load->view('analisis_master/left',$data);?> -
-
-

-
-
-
-


-
-
-
- -
-
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_master/nav.php b/donjo-app/views/analisis_master/nav.php deleted file mode 100644 index 0cdafcca8..000000000 --- a/donjo-app/views/analisis_master/nav.php +++ /dev/null @@ -1,30 +0,0 @@ - - \ No newline at end of file diff --git a/donjo-app/views/analisis_master/nav2.php b/donjo-app/views/analisis_master/nav2.php deleted file mode 100644 index 6ec884bde..000000000 --- a/donjo-app/views/analisis_master/nav2.php +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/donjo-app/views/analisis_master/panduan.php b/donjo-app/views/analisis_master/panduan.php deleted file mode 100644 index a20f0f381..000000000 --- a/donjo-app/views/analisis_master/panduan.php +++ /dev/null @@ -1,18 +0,0 @@ -
- - - - -
-
-

Panduan Modul

-
-
- -

Tentang SID
Sistem Informasi Desa (SID) adalah sebuah platform teknologi informasi komunikasi untuk mendukung pengelolaan sumber daya komunitas di tingkat desa. Ini bersifat terbuka bagi siapa saja yang akan bergabung dalam gerakan membangun kemandirian komunitas. Konsep pengelolaan sumber daya berada dalam payung besar gagasan Lumbung Komunitas yang dikelola oleh COMBINE Resource Institution.

Sekilas pandang sistem informasi desa
Aplikasi Gratis untuk desa yang berbasis Opensource, SID merupakan inisiatif Combine resource institution, sebuah organisasi masyarakat sipil yang sangat tekun dan dedikatif dalam mengembangkan informasi dan komunikasi alternatif berbasis masyarakat.

Awal mula SID
"Awalnya ada keinginan dari pemerintah Desa Balerante yang berharap pelayanan pemerintah desa bisa seperti pengunjung rumah sakit yang ingin mencari data pasien rawat inap, tinggal ketik nama di komputer, maka data tersebut akan keluar"
(Mart Widarto, pengelola Program Lumbung Komunitas)
Program ini mulai dibuat dari awal 2006:
1. (2006) komunitas melakukan komunikasi dan diskusi lepas tentang sebuah sistem yang bisa digunakan untuk menyimpan data.
2. (2008) Rangkaian FDG dengan pemerintah desa membahas tentang tata kelola pendokumentasian di desa
3. (2009) Ujicoba SID yang sudah dikembangkan di balerante
4. (2009-2010) Membangun SID (aplikasi) dibeberapa desa yang lain: terong (bantul), Nglegi (Gunungkidul)
5. (2011) Kandangan (Temanggung) Gilangharjo (bantul) Girikarto (gunungkidul) Talun (klaten) Pager Gunung (magelang)
6. hingga saat ini 2013 sudah banyak desa pengguna SID.

SID sebagai tanggapan atas kebutuhan:
Kalau dulu untuk mencari data penduduk menurut kelompok umur saja kesulitan karena tidak mempunyai databasenya. Dengan adanya SID menjadi lebih mudah.
(Nuryanto, Kabag Pelayanan Pemdes Terong)

Membangun sebuah sistem bukan hanya membuatkan software dan meninggalkan begitu saja, namun ada upaya untuk memadukan sistem dengan kebutuhan yang ada pada desa. sehingga software dapat memenuhi kebutuhan yang telah ada bukan memaksakan desa untuk mengikuti dan berpindah sistem. inilah yang melatari combine melaksanakan alur pengaplikasian software.
1. Bentuk tim kerja bersama pemerintah desa
2. Diskusikan basis data apa saja yang diperlukan untuk warga
3. Himpun data kependudukan warga dari Kartu Keluarga (KK)
4. Daftarkan proyek SID dan dapatkan aplikasi softwarenya di http://abcd.lumbungkomunitas.net
5. Install aplikasi software SID di komputer desa
6. Entry data penduduk ke SID
7. Basis data kependudukan sudah bisa dimanfaatkan
8. Diskusikan rencana pengembangan SID sesuai kebutuhan desa
9. Sebarluaskan informasi desa melalui beragam media untuk warga
(Elanto Wijoyono, pengelola Program Lumbung Komunitas)

Pemberdayaan data desa yang dibangun diharapkan dapat menjunjung kesejahteraan masyarakat desa, data-data tersebut dapat diperuntukkan untuk riset lebih lanjut tentang kemiskinan, tanggap bencana, sumberdaya desa yang bisa diekspose keluar dan dengan menghubungkan dari desa ke desa dapat mencontohkan banyak hal dalam keberhasilan pemberdayaannya.
(sumber: Buku Sistem Informasi Desa)

Hal-hal penting yang harus diperhatikan dalam mengaplikasikan SID
1. SID mencoba masuk keranah paling kecil dari penduduk, dengan tujuan menyatukan warga masyarakat bersama perangkat desa bersama-sama memajukan desa dengan memanfaatkan informasi dan jaringan. Konsep gotong royong sebagai kearifan lokal dipertahankan dan dikuatkan kembali.
2. Data yang dikumpulkan dijaga kerahasiaanya dari publik, Keamanan data pribadi warga mengacu pada Undang-Undang Nomor 23 Tahun 2006 tentang Administrasi Kependudukan. Penerapan sistem informasi administrasi kependudukan diatur dalam Keputusan Presiden (Keppres) No. 88/2004 tentang pengelolaan administrasi kependudukan, Undang-Undang (UU) No. 23 tahun 2006 tentang administrasi kependudukan dan Peraturan Menteri Dalam Negeri (Permendagri) No. 18/2005 serta Peraturan Pemerintah (PP) No. 37 tahun 2007 tentang administrasi kependudukan. Pencatatan data penduduk suatu daerah yang melalui sistem informasi administrasi kependudukan menjadi tanggung jawab pemerintah kabupaten dan kota dimana dalam pelaksanaannya diawali dari desa dan kelurahan sebagai awal dari pendataan penduduk disuatu daerah.
3. Software SID hanyalah sebuah alat, yang membutuhkan ketrampilan dari pengguna alat. alat ini bisa menjadi kekuatan desa apabila digunakan dengan semestinya, namun juga bisa menjadi bumerang ketika jatuh ketangan yang salah.

Pengembangan dengan ACCESS
ACCESS yang memiliki pengalaman melakukan participatory poverty assessment dengan pendekatan Community Led Action and participatory Process (CLAPP) dimana melibatkan warga secara partisipatif dalam menyusun dan menghasilkan data yang valid. Yang kemudian Memanfaatkan SAID (Sistem Administrasi dan Informasi Desa) sebagai “mesin†untuk memanfaatkan database partisipatif yang diperoleh.
ACCESS bekerjasama dengan Combine Resource Institution (CRI) bersama mengembangkan SAID di sejumlah desa di wilayah dampingan ACCESS, dan beberapa daerah telah menyatakan minatnya sebagai bagian dari upaya mereka menyediakan informasi terbaru yang lebih akurat di level yang paling bawah yaitu desa/kelurahan. Hal ini dirasakan karena Indonesia masih menghadapi kesulitan terkait dengan ketepatan data dan SAID membantu menyediakan data tersebut dari desa ke atas.

- -
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_master/table.php b/donjo-app/views/analisis_master/table.php deleted file mode 100644 index d13891edf..000000000 --- a/donjo-app/views/analisis_master/table.php +++ /dev/null @@ -1,139 +0,0 @@ - -
-
-
-
-
-

Modul Analisis Data Potensi/Sumber Daya di Tingkat Desa

-
-
-  Tambah Analisis Baru - -  Import Analisis -
-
-
-
-
-
- -   - -
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoAksi">Nama ">Nama ">Nama ">Subjek/Unit Analisis ">Subjek/Unit Analisis ">Subjek/Unit Analisis ">Status ">Status ">Status 
- - - -
-
-
-
-
-
-
- - - - - -
-
-
-
- -
- start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
diff --git a/donjo-app/views/analisis_periode/form.php b/donjo-app/views/analisis_periode/form.php deleted file mode 100644 index e45b8dbfe..000000000 --- a/donjo-app/views/analisis_periode/form.php +++ /dev/null @@ -1,75 +0,0 @@ -
- - -
-
-
-
-

Form Data Periode -

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Nama Periode
Periode Aktif -
- -> -> -
-
Tahap Pendataan -
- -> -> -> -
-
Tahun Pelaksanaan
Duplikat data pendataan sebelumnya -
- - -
-
Keterangan
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_periode/table.php b/donjo-app/views/analisis_periode/table.php deleted file mode 100644 index 855121faa..000000000 --- a/donjo-app/views/analisis_periode/table.php +++ /dev/null @@ -1,132 +0,0 @@ - -
-load->view('analisis_master/left',$data);?> -
-
-
-
-
-

Manajemen Periode Analisis -

-
-
-  Tambah Periode Baru -
-
-
-
-
-
- -
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoAksi">Periode ">Periode ">Periode ">Tahun Pelaksanaan ">Tahun Pelaksanaan ">Tahun Pelaksanaan Tahap PendataanKeteranganAktif
- - -
-
-
-
-
-
-
- - - - - - -
-
-
-
- -
- - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
diff --git a/donjo-app/views/analisis_respon/form.php b/donjo-app/views/analisis_respon/form.php deleted file mode 100644 index 7daac427d..000000000 --- a/donjo-app/views/analisis_respon/form.php +++ /dev/null @@ -1,233 +0,0 @@ - - -
- -load->view('analisis_master/left',$data);?> - -
-
-
-
-
-
-
- - - - - - - - - - - - - - - - -
Form Pendataan :
Nomor Identitas :
Nama Subjek :
- -

DAFTAR ANGGOTA

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
NOAKSINIKNAMATANGGAL LAHIRJENIS KELAMIN 
- -  
- - - - - - - - - - - - - - - - -


- - - - - -
- > - -
- - - - - - -
-
- -
-
- - - - - - -
-
- -
-
- - - -

- - - - - - - - - - -
*) Format file harus *.jpg
*) Berkas form pendataan digunakan sebagai penguat / bukti pendataan maupun untuk verifikasi data yang sudah terinput.
*) Berkas Bukti / pengesahan harus berupa file gambar dengan format .jpg, dengan ukuran maksimal 1 Mb (1 megabyte)
- - - - - - -
- - - -
-
-
-
- - - Normal - - Full Screen - -
-
-
- -
-
-
-
- - - - - - - - - -
diff --git a/donjo-app/views/analisis_respon/form_ajax.php b/donjo-app/views/analisis_respon/form_ajax.php deleted file mode 100644 index d934ce533..000000000 --- a/donjo-app/views/analisis_respon/form_ajax.php +++ /dev/null @@ -1,103 +0,0 @@ - - -
- - - - - - - - - - -

- -
- > -
- - - - - -
-
- > - -
- - - - - - -
-
- -
-
- - - - - - -
-
- -
-
- - - - -

- -
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_respon/import/aturan_ajax.php b/donjo-app/views/analisis_respon/import/aturan_ajax.php deleted file mode 100644 index 509e61372..000000000 --- a/donjo-app/views/analisis_respon/import/aturan_ajax.php +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - -
- Data yang dibutuhkan untuk import dengan memenuhi aturan data sebagai berikut : -
- Aturan Data -
-
-
- Lanjut -
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_respon/import/aturan_unduh.php b/donjo-app/views/analisis_respon/import/aturan_unduh.php deleted file mode 100644 index 2d6145f9b..000000000 --- a/donjo-app/views/analisis_respon/import/aturan_unduh.php +++ /dev/null @@ -1,59 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
NoPertanyaanJawaban
-
- * -
- - .
- -
- -
- -
--
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_respon/import/data_ajax.php b/donjo-app/views/analisis_respon/import/data_ajax.php deleted file mode 100644 index 395d8e61c..000000000 --- a/donjo-app/views/analisis_respon/import/data_ajax.php +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - -
-

Bla bla bla... Data yang dibutuhkan untuk Import dengan memenuhi aturan data sebagai berikut Aturan Data Data yang dibutuhkan untuk Import dengan memenuhi aturan data sebagai berikut Aturan Data

-
- Data yang dibutuhkan untuk Import dengan memenuhi aturan data sebagai berikut : -
- Form Excel - - Form Excel + Isi Data -
-
- analisis_respon/import/1" class="uibutton special" target="ajax-modal" rel="window" header="Unggah Format Import" >Format 1 - */ ?> - Lanjut -
diff --git a/donjo-app/views/analisis_respon/import/data_unduh.php b/donjo-app/views/analisis_respon/import/data_unduh.php deleted file mode 100644 index 3a51b6ee6..000000000 --- a/donjo-app/views/analisis_respon/import/data_unduh.php +++ /dev/null @@ -1,199 +0,0 @@ - - -
- - - - - - - - - - - "; - echo $pt['no']."
".$pt['pertanyaan']; - - if($pt['par']){ - foreach($pt['par'] AS $jb){ - echo "
".$jb['kode_jawaban']." ".$jb['jawaban']; - } - } - - echo ""; - - }else - if($pt['id_tipe'] == 2){ - - echo ""; - - } elseif($pt['id_tipe'] == 3) { - echo ""; - }else { - echo ""; - } - } - ?> - - - - - "; - echo $pt['nomor']; - echo ""; - } - ?> - - - - - - - - - - - - "; - } - }else{ - - foreach($indikator as $pt){ - //cumawarna - $bx = ""; - $false = 0; - foreach($data['par'] AS $jawab){ - $isi = ""; - if($pt['id'] == $jawab['id_indikator'] AND $false == 0){ - - if($pt['id_tipe'] == 1){ - $isi = $jawab['kode_jawaban']; - }elseif($pt['id_tipe'] == 2){ - $isi .= $jawab['kode_jawaban']; - }else{ - $isi = $jawab['jawaban']; - } - - //kosong dia - if($isi == ""){ - $bx = "style='background-color:#bbffbb;'"; - } - - //koreksi - if($jawab['korek'] == -1){ - $bx = "style='background-color:#ff9999;'"; - } - - if($pt['id_tipe'] != 2){ - $false = 1; - } - } - } - - echo ""; - } - - } - ?> - - -
NoL/PDusunRWRTBatas"; - echo $pt['no']."
".$pt['pertanyaan']; - - if($pt['par']){ - foreach($pt['par'] AS $jb){ - echo "
".$jb['kode_jawaban']." ".$jb['jawaban']; - } - } - - echo "
"; - echo $pt['no']."
".$pt['pertanyaan']; - echo "
"; - echo $pt['no']."
".$pt['pertanyaan']; - echo "
"; - - $false = 0; - $isi = ""; - foreach($data['par'] AS $jawab){ - if($pt['id'] == $jawab['id_indikator'] AND $false == 0){ - - if($pt['id_tipe'] == 1){ - $isi = $jawab['kode_jawaban']; - }elseif($pt['id_tipe'] == 2){ - $isi .= $jawab['kode_jawaban'].","; - }else{ - $isi = $jawab['jawaban']; - } - - //kosong dia - if($isi == ""){ - $bx = "style='background-color:#bbffbb;'"; - } - - //koreksi - if($jawab['korek'] == -1){ - $isi = "xxx"; - $bx = "style='background-color:#ff9999;'"; - } - - if($pt['id_tipe'] != 2){ - $false = 1; - } - } - } - - //DEL last koma - if($pt['id_tipe'] == 2){ - $jml = strlen($isi); - $isi = substr($isi,0,$jml-1); - } - - echo $isi; - echo "
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_respon/import/import.php b/donjo-app/views/analisis_respon/import/import.php deleted file mode 100644 index 4637d309b..000000000 --- a/donjo-app/views/analisis_respon/import/import.php +++ /dev/null @@ -1,18 +0,0 @@ -
- - - - - - - - -
- Pastikan format berkas telah sesuai -
Unggah Form Excel
-
-
- -
-
-
diff --git a/donjo-app/views/analisis_respon/table.php b/donjo-app/views/analisis_respon/table.php deleted file mode 100644 index d8c46f99c..000000000 --- a/donjo-app/views/analisis_respon/table.php +++ /dev/null @@ -1,185 +0,0 @@ - - - -
-load->view('analisis_master/left',$data);?> -
-
-
-
-
-
-
- - - - - - - - - - - - - - - - -
Nama Analisis :
Subjek Analisis :
Periode :
-
-
- - - - - - - - - - - - " class="uibutton special tipsy south" title="Fungsi Import harap digunakan secara seksama" target="ajax-modal" rel="window" header="Unduh Form Rujukan Import"> Import -
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoAksi"> "> "> "> "> "> L/PDusunRWRTStatus
- -
-
-
-
-
-
-
- - - - - - -
-
-
-
- -
- start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
diff --git a/donjo-app/views/analisis_statistik_jawaban/form.php b/donjo-app/views/analisis_statistik_jawaban/form.php deleted file mode 100644 index 30874163c..000000000 --- a/donjo-app/views/analisis_statistik_jawaban/form.php +++ /dev/null @@ -1,100 +0,0 @@ -
- - - -load->view('analisis_master/left',$data);?> - -
- -
-
-

Form Pertanyaan -

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Tipe Pertanyaan -
- -> -> -> -> -
-
Kode Pertanyaan
Pertanyaan
Bobot - "> -
Aksi Analisis -
- -> -> -
-
Kategori Pertanyaan -
- - -> - -
-
-
- -
- -
-
- - -
-
-
-
- -
diff --git a/donjo-app/views/analisis_statistik_jawaban/manajemen_kuisioner_form.php b/donjo-app/views/analisis_statistik_jawaban/manajemen_kuisioner_form.php deleted file mode 100644 index eda8ba6d5..000000000 --- a/donjo-app/views/analisis_statistik_jawaban/manajemen_kuisioner_form.php +++ /dev/null @@ -1,71 +0,0 @@ - - - -
Data Responden
-
-

Form Manajemen Responden

-
-
-
-
- - - - -
 
-
>
- -
>
- - -
-
- -
-
- -
-
-
- - -
-
-
-
-
diff --git a/donjo-app/views/analisis_statistik_jawaban/parameter/ajax_form.php b/donjo-app/views/analisis_statistik_jawaban/parameter/ajax_form.php deleted file mode 100644 index 445f65713..000000000 --- a/donjo-app/views/analisis_statistik_jawaban/parameter/ajax_form.php +++ /dev/null @@ -1,24 +0,0 @@ - - -
- - - - - - - - - - - - - - -
Kode
Jawaban
Nilai
-
-
- -
-
-
diff --git a/donjo-app/views/analisis_statistik_jawaban/parameter/form.php b/donjo-app/views/analisis_statistik_jawaban/parameter/form.php deleted file mode 100644 index 22daa0270..000000000 --- a/donjo-app/views/analisis_statistik_jawaban/parameter/form.php +++ /dev/null @@ -1,41 +0,0 @@ -
- - -
- -
- -
-
-

Form Data Parameter

-

  Pertanyaan :

-
-
-
- - - - - - - - - - -
Jawaban
Nilai
-
- -
- -
-
- - -
-
-
-
-
-
diff --git a/donjo-app/views/analisis_statistik_jawaban/parameter/grafik_table.php b/donjo-app/views/analisis_statistik_jawaban/parameter/grafik_table.php deleted file mode 100644 index 9f8c80254..000000000 --- a/donjo-app/views/analisis_statistik_jawaban/parameter/grafik_table.php +++ /dev/null @@ -1,136 +0,0 @@ -
-
-
-
- -

-
-
-
- - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - -
NoJawabanJumlah
-
-
- -
-
-
-
- - - - - - -
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/analisis_statistik_jawaban/parameter/subjek_excel.php b/donjo-app/views/analisis_statistik_jawaban/parameter/subjek_excel.php deleted file mode 100644 index 14ee4d111..000000000 --- a/donjo-app/views/analisis_statistik_jawaban/parameter/subjek_excel.php +++ /dev/null @@ -1,64 +0,0 @@ - - - - -Data Subjek Analisis - - - - - -
-
-
- -

DATA SUBJEK ANALISIS

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoNIKNamaDusunRWRTUmurJ. Kelamin
-
- -
- - diff --git a/donjo-app/views/analisis_statistik_jawaban/parameter/subjek_table.php b/donjo-app/views/analisis_statistik_jawaban/parameter/subjek_table.php deleted file mode 100644 index 9b4fa6367..000000000 --- a/donjo-app/views/analisis_statistik_jawaban/parameter/subjek_table.php +++ /dev/null @@ -1,85 +0,0 @@ -
- - -
-
-
-
-
-
-

-

- -
- " class="uibutton special tipsy south" title="Cetak Data" target="_blank"> Cetak - " class="uibutton special tipsy south" title="Unduh" target="_blank"> Unduh - - - - - - - - - - -
-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoNIKNamaDusunRWRTUmur (Tahun)J. Kelamin
" target="_blank">" target="_blank">
-
-
-
- -
-
-
- - diff --git a/donjo-app/views/analisis_statistik_jawaban/parameter/table.php b/donjo-app/views/analisis_statistik_jawaban/parameter/table.php deleted file mode 100644 index 062e540d6..000000000 --- a/donjo-app/views/analisis_statistik_jawaban/parameter/table.php +++ /dev/null @@ -1,79 +0,0 @@ - -
- - -
-
-
-
-
diff --git a/donjo-app/views/analisis_statistik_jawaban/parameter/table_print.php b/donjo-app/views/analisis_statistik_jawaban/parameter/table_print.php deleted file mode 100644 index a2b02ba2a..000000000 --- a/donjo-app/views/analisis_statistik_jawaban/parameter/table_print.php +++ /dev/null @@ -1,57 +0,0 @@ - - - -Data Analisis - - - - - -
-
-

DATA Analisis

-

-

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoNIKNamaDusunRWRTUmurJ. Kelamin
-
- - -
- diff --git a/donjo-app/views/analisis_statistik_jawaban/table.php b/donjo-app/views/analisis_statistik_jawaban/table.php deleted file mode 100644 index ef4722070..000000000 --- a/donjo-app/views/analisis_statistik_jawaban/table.php +++ /dev/null @@ -1,212 +0,0 @@ - -
-load->view('analisis_master/left',$data);?> -
-
-
-
-

Analisis Statistik Jawaban -

-
-
-
-
-
- -   - -   - - - - - - - - - - - - -" class="uibutton special tipsy south" title="Cetak Data" target="_blank"> Cetak -" class="uibutton special tipsy south" title="Unduh" target="_blank"> Unduh -
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
No">Pertanyaan/Indikator ">Pertanyaan/Indikator ">Pertanyaan/Indikator Total">Kode ">Kode ">Kode JawabanRespondenJumlah">Tipe Pertanyaan ">Tipe Pertanyaan ">Tipe Pertanyaan ">Kategori/Variabel ">Kategori/Variabel ">Kategori/Variabel ">Aksi Analisis ">Aksi Analisis ">Aksi Analisis 
" > - - .
- -
- -
- -
- - " >
- -
TOTAL
-
-
-
-
-
-
- - -
-
-
-
- -
- - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
-
diff --git a/donjo-app/views/analisis_statistik_jawaban/table_excel.php b/donjo-app/views/analisis_statistik_jawaban/table_excel.php deleted file mode 100644 index d953210a8..000000000 --- a/donjo-app/views/analisis_statistik_jawaban/table_excel.php +++ /dev/null @@ -1,79 +0,0 @@ - - - - -Data Analisis Jawaban - - - - - -
-
-
- -

DATA STATISTIK ANALISIS JAWABAN

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoPertanyaanTotalKodeJawabanRespondenTipe IndikatorKategori IndikatorAksi Analisis
- - .
- -
- -
- -
- -
- -
-
- -
- - diff --git a/donjo-app/views/analisis_statistik_jawaban/table_print.php b/donjo-app/views/analisis_statistik_jawaban/table_print.php deleted file mode 100644 index 793cc3322..000000000 --- a/donjo-app/views/analisis_statistik_jawaban/table_print.php +++ /dev/null @@ -1,70 +0,0 @@ - - - -Data Analisis - - - - - -
-
-

DATA Analisis

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoPertanyaanTotalKodeJawabanRespondenTipe IndikatorKategori IndikatorAksi Analisis
- - .
- -
- -
- -
- -
- -
-
- - -
- diff --git a/donjo-app/views/area/ajax_add_sub_polygon_form.php b/donjo-app/views/area/ajax_add_sub_polygon_form.php deleted file mode 100644 index 43de37fd5..000000000 --- a/donjo-app/views/area/ajax_add_sub_polygon_form.php +++ /dev/null @@ -1,20 +0,0 @@ -
- - - - - - - - - -
Nama area
Simbol - -
-
-
- - -
-
-
\ No newline at end of file diff --git a/donjo-app/views/area/ajax_wil_dusun.php b/donjo-app/views/area/ajax_wil_dusun.php deleted file mode 100644 index 185623864..000000000 --- a/donjo-app/views/area/ajax_wil_dusun.php +++ /dev/null @@ -1,105 +0,0 @@ - - - -
-
- - - - - -
-
\ - - -
-
-
\ No newline at end of file diff --git a/donjo-app/views/area/form.php b/donjo-app/views/area/form.php deleted file mode 100644 index f5859b31b..000000000 --- a/donjo-app/views/area/form.php +++ /dev/null @@ -1,73 +0,0 @@ -
- - -
-
-

Edit Properti / area

-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Nama area / Porperti
Kategori - -
Foto - -
Ganti Foto - - )* Kosongi jika tidak ingin merubah Foto. -
Keterangan
Status -
- > - - > - -
-
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/area/maps.php b/donjo-app/views/area/maps.php deleted file mode 100644 index 3e3a9ded8..000000000 --- a/donjo-app/views/area/maps.php +++ /dev/null @@ -1,99 +0,0 @@ - - - -
-
- -
-
- - -
-
-
\ No newline at end of file diff --git a/donjo-app/views/area/sub_line_table.php b/donjo-app/views/area/sub_line_table.php deleted file mode 100644 index cebc7a866..000000000 --- a/donjo-app/views/area/sub_line_table.php +++ /dev/null @@ -1,69 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/area/table.php b/donjo-app/views/area/table.php deleted file mode 100644 index fceba1361..000000000 --- a/donjo-app/views/area/table.php +++ /dev/null @@ -1,150 +0,0 @@ - - -
- - - - - -
-
-

Manajemen Properti / area

-
Modul ini masih dalam tahap pengembangan. Ide-ide dan usulan mari kita kumpulkan untuk memperkaya khazanah SID
-
-
-
-
-
-
-" class="uibutton tipsy south" title="Tambah Data" > Tambah Data Baru -
-
-
- -
-
-
-
-
- - - - - -
-
-
-
- -
-start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
- -
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/data_persil/create.php b/donjo-app/views/data_persil/create.php deleted file mode 100644 index 706e3f4e6..000000000 --- a/donjo-app/views/data_persil/create.php +++ /dev/null @@ -1,189 +0,0 @@ - -
- - - - - - -
- load->view('data_persil/menu_kiri.php') - ?> - - Pengelolaan Data Persil -
-
- - - ".$_SESSION["pesan"]." -
"; - $_SESSION["success"]==0; - } - - ?> - - - $(document).ready(function() { - var nik = {}; - nik.results = ["; - if($penduduk){ - foreach ($penduduk as $item){ - if(strlen($item["id"])>0){ - echo "{id: ".$item["id"].", name:\"".$item["nama"]."\",info:\"".$item["info"]."\"},\n"; - } - } - } - echo " - ]; - - $('#nik').flexbox(nik, { - resultTemplate: '
{name}
{info}
', - watermark: \"Cari nama di sini..\", - width: 400, - noResultsText :'Tidak ada no nik yang sesuai..', - onSelect: function() { - $('#'+'main').submit(); - } - }); - }); - -"; -if($persil_detail>0){ - if(isset($persil_detail["id"])){ - $nik = $persil_detail["nik"]; - $nama = $persil_detail["nopersil"]; - $cid = $persil_detail["persil_jenis_id"]; - $sid = $persil_detail["persil_peruntukan_id"]; - $pid = $persil_detail["id_clusterdesa"]; - $kelas = $persil_detail["kelas"]; - $luas = $persil_detail["luas"]; - $sppt = $persil_detail["no_sppt_pbb"]; - $id = $persil_detail["id"]; - }else{ - $nama = ""; - $cid = 0; - $sid = 0; - $pid = 0; - $kelas = ""; - $luas = 0; - $sppt = ""; - $cid = 0; - $id = 0; - } -}else{ - $nama = ""; - $cid = 0; - $sid = 0; - $pid = 0; - $kelas = ""; - $luas = 0; - $sppt = ""; - $cid = 0; - $id = 0; -} -echo " -
- Formulir Penambahan/Pembaruan Data Peruntukan Persil -
- Pemilik Persil -
-
- -
-
-
-
-"; -echo form_open('data_persil/simpan_persil')."\n"; -if($pemilik){ - echo " -
-
- Data Pemilik - -
-
Nama Penduduk
-
: ".$pemilik["nama"]."
-
NIK
-
: ".$pemilik["nik"]."
-
Alamat
-
: RT ".$pemilik["rt"]." / RT ".$pemilik["rw"]." - ".strtoupper($pemilik["dusun"])."
-
-
-
- "; -} -echo " -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - - -
-
-"; -echo " -
"; -?> -
-
- -
- load->view('data_persil/panduan.php'); - ?> -
-
\ No newline at end of file diff --git a/donjo-app/views/data_persil/create_ext.php b/donjo-app/views/data_persil/create_ext.php deleted file mode 100644 index 7c0e4b57b..000000000 --- a/donjo-app/views/data_persil/create_ext.php +++ /dev/null @@ -1,135 +0,0 @@ - -
- - - - - - -
- load->view('data_persil/menu_kiri.php') - ?> - - Pengelolaan Data Persil -
-
- - - ".$_SESSION["pesan"]." -
"; - $_SESSION["success"]==0; - } - - ?> - -0){ - if(isset($persil_detail["id"])){ - $nik = $persil_detail["nik"]; - $nama = $persil_detail["nopersil"]; - $cid = $persil_detail["persil_jenis_id"]; - $sid = $persil_detail["persil_peruntukan_id"]; - $pid = $persil_detail["id_clusterdesa"]; - $kelas = $persil_detail["kelas"]; - $luas = $persil_detail["luas"]; - $sppt = $persil_detail["no_sppt_pbb"]; - $id = $persil_detail["id"]; - $ext = $persil_detail["alamat_ext"]; - }else{ - $nama = ""; - $cid = 0; - $sid = 0; - $pid = ""; - $kelas = ""; - $luas = 0; - $sppt = ""; - $cid = 0; - $id = 0; - $ext = ""; - } -}else{ - $nama = ""; - $cid = 0; - $sid = 0; - $pid = ""; - $kelas = ""; - $luas = 0; - $sppt = ""; - $cid = 0; - $id = 0; - $ext = ""; -} -echo form_open('data_persil/simpan_persil')."\n"; -echo "
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- - - -
-
-"; -echo " -"; -?> -
-
- -
- load->view('data_persil/panduan.php'); - ?> -
-
\ No newline at end of file diff --git a/donjo-app/views/data_persil/detail.php b/donjo-app/views/data_persil/detail.php deleted file mode 100644 index 9b72e50db..000000000 --- a/donjo-app/views/data_persil/detail.php +++ /dev/null @@ -1,95 +0,0 @@ - -
- - - - - - -
- load->view('data_persil/menu_kiri.php') - ?> - - Pengelolaan Data Persil -
-
- - - ".$_SESSION["pesan"]." -
"; - $_SESSION["success"]==0; - } - - ?> - - -
- Data Pemilik -
-
Nama Penduduk
-
: ".$pemilik["nama"]."
-
NIK
-
: ".$pemilik["nik"]."
-
Alamat
-
: RT ".$pemilik["rt"]." / RT ".$pemilik["rw"]." - ".strtoupper($pemilik["dusun"])."
-
-
-
- "; -}else{ - echo " -
-
- Data Pemilik -
-
NAMA PEMILIK
-
: ".$persil_detail["namapemilik"]."
-
ALAMAT PEMILIK
-
: ".$persil_detail["alamat_ext"]."
-
-
-
- "; -} -echo " -
-
- Detail Persil -
-
Nomor Persil
-
: ".$persil_detail["nopersil"]."
-
Keterangan Persil
-
: ".$persil_jenis[$persil_detail["persil_jenis_id"]][0]." -
".$persil_jenis[$persil_detail["persil_jenis_id"]][1]."
-
Luas Tanah
-
: ".$persil_detail["luas"]." m2
-
Kelas Tanah
-
: ".$persil_detail["kelas"]."
-
Peruntukan
-
: ".$persil_peruntukan[$persil_detail["persil_peruntukan_id"]][0]." -
".$persil_peruntukan[$persil_detail["persil_peruntukan_id"]][1]."
-
Nomor SPPT PBB
-
: ".$persil_detail["no_sppt_pbb"]."
-
Lokasi
-
: RT ".$persil_detail["rt"]." / RW ".$persil_detail["rt"]." - ".$persil_detail["dusun"]."
-
-
-
"; -?> -
- - -
- load->view('data_persil/panduan.php'); - ?> -
-
\ No newline at end of file diff --git a/donjo-app/views/data_persil/edit.php b/donjo-app/views/data_persil/edit.php deleted file mode 100644 index cfac39789..000000000 --- a/donjo-app/views/data_persil/edit.php +++ /dev/null @@ -1,129 +0,0 @@ - -
- - - - - - -
- load->view('program_bantuan/menu_kiri.php') - ?> - - Form Penulisan Program Bantuan -
- -
- Ada Kesalahan -
-
- ".validation_errors()." -
-
- "; - } - - if($_SESSION["success"] == 1){ - echo "Simpan Berhasil"; - } - $data= $program[0]; - $cid = $data["sasaran"]; - ?> - -
- - -
-
- - "> -
-
- - -
-
- - Mulai "> - s.d "> -
- -
-
- - -
-
- - -
- load->view('program_bantuan/panduan.php') - ?> -
- - - -
\ No newline at end of file diff --git a/donjo-app/views/data_persil/import.php b/donjo-app/views/data_persil/import.php deleted file mode 100644 index b35f86be1..000000000 --- a/donjo-app/views/data_persil/import.php +++ /dev/null @@ -1,34 +0,0 @@ - -
-
- - - - - - - - - -
Contoh Format Data - Contoh urutan format dapat dilihat pada tautan berikut
-
Upload Fil XLS - (File harus dalam format .xls) -
-
-
-
-
- - -
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/data_persil/menu_kiri.php b/donjo-app/views/data_persil/menu_kiri.php deleted file mode 100644 index 986e33d88..000000000 --- a/donjo-app/views/data_persil/menu_kiri.php +++ /dev/null @@ -1,39 +0,0 @@ - -Menu Pendataan Persil - -
- Jenis Persil - -
-
- Peruntukan Persil - -
\ No newline at end of file diff --git a/donjo-app/views/data_persil/panduan.php b/donjo-app/views/data_persil/panduan.php deleted file mode 100644 index 2454c2aa4..000000000 --- a/donjo-app/views/data_persil/panduan.php +++ /dev/null @@ -1,25 +0,0 @@ - -

Keterangan

-

Modul Data Persil adalah modul untuk pengelolaan data dokumen tentang kepemilikan lahan.

-

Panduan

-

Cara menyimpan/memperbarui data Persil adalah dengan mengisikan formulir yang terdapat dari menu Tulis Data Persil Baru:

-

-

    -
  1. Kolom Data Pemilik -

    Tuliskan NIK atau Nama Pemilik Persil. Sistem akan memberikan pilihan sesuai dengan data yang tersimpan di SID

    -
  2. -
  3. Kolom Nomor Persil -

    Nomor Persil wajib diisi

    -
  4. -
  5. Kolom Keterangan Surat -

    Pilih sesuai dengan jenis surat persil

    -
  6. -
  7. Kolom Luas Tanah -

    Isikan dengan menggunakan angka saja. Bila data luasan tidak bulat, gunakan tanda titik(.) untuk menggantikan data koma pada nilai desimal. Nilai luasan dalam satuan meter persegi (m2)

    -
  8. -
  9. Kolom Nomor SPPT PBB -

    Isikan sesuai dengan data nomor SPPT PBB atas persil tersebut

    -
  10. -
-

\ No newline at end of file diff --git a/donjo-app/views/data_persil/persil.php b/donjo-app/views/data_persil/persil.php deleted file mode 100644 index 8dffb6a6a..000000000 --- a/donjo-app/views/data_persil/persil.php +++ /dev/null @@ -1,95 +0,0 @@ - - -
- - - - - - -
- load->view('data_persil/menu_kiri.php') - ?> - - Daftar Data Persil -
-
- -
-
- - -
-
- ".$_SESSION["pesan"]."
"; - $_SESSION["success"]=0; - $_SESSION["pesan"]=""; - } - ?> - -0){ - echo " -
- - - - - - - - - "; - $nomer =0; - foreach($persil as $key=>$item){ - $nomer++; - echo " - - - - - - - - "; - } - echo " - -
#Nama PemilikNIKNO PersilLuas (m2)Nomor SPPT PBB
".$nomer."
- Detail - - -
".$item["namapemilik"]."".$item["nik"]."".$item["nopersil"]."".$item["luas"]."".$item["no_sppt_pbb"]."
-
- "; - } -}else{ - echo " -
-

Belum ada Data

-
Silakan ditambahkan data persil dengan menggunakan formulir dari menu Tambah Data Persil Baru
-
- "; -} -?> -
-
- -
- load->view('data_persil/panduan.php'); - ?> -
-
diff --git a/donjo-app/views/data_persil/persil_jenis.php b/donjo-app/views/data_persil/persil_jenis.php deleted file mode 100644 index 2f6b5fd45..000000000 --- a/donjo-app/views/data_persil/persil_jenis.php +++ /dev/null @@ -1,97 +0,0 @@ - -
- - - - - - -
- load->view('data_persil/menu_kiri.php') - ?> - - Pengelolaan Data Jenis Persil -
-
- - - - - -
-
- - -
-
-
- - - -
-
-"; -echo ""; -?> -0){ - echo " -
- - - - "; - $nomer =0; - foreach($persil_jenis as $key=>$item){ - $nomer++; - echo " - - - - - "; - } - echo " - -
#NamaKeterangan
".$nomer." -
- Detail - - -
-
".$item[0]."".$item[1]."
-
- "; - } -}else{ - echo " -
-

Belum ada Data

-
Silakan ditambahkan data Jenis Persil dengan menggunakan formulir dari menu Tambah Data Jenis Persil
-
- "; -} -?> -
-
- -
- load->view('data_persil/panduan.php'); - ?> -
-
diff --git a/donjo-app/views/data_persil/persil_peruntukan.php b/donjo-app/views/data_persil/persil_peruntukan.php deleted file mode 100644 index a529497e0..000000000 --- a/donjo-app/views/data_persil/persil_peruntukan.php +++ /dev/null @@ -1,100 +0,0 @@ - -
- - - - - - -
- load->view('data_persil/menu_kiri.php') - ?> - - Pengelolaan Data Peruntukan Persil -
-
- - Formulir Penambahan/Pembaruan Data Peruntukan Persil -"; -echo form_open('data_persil/persil_peruntukan')."\n"; -echo " -
- - -
-
- - -
-
-
- - - -
-
-"; -echo " -"; -?> -0){ - echo " -
- - - - "; - $nomer =0; - foreach($persil_peruntukan as $key=>$item){ - $nomer++; - echo " - - - - - "; - } - echo " - -
#NamaKeterangan
".$nomer." -
- Detail - - -
-
".$item[0]."".$item[1]."
-
- "; - } -}else{ - echo " -
-

Belum ada Data

-
Silakan ditambahkan data Jenis Persil dengan menggunakan formulir dari menu Tambah Data Jenis Persil
-
- "; -} -?> -
-
-
-
- load->view('data_persil/panduan.php'); - ?> -
-
diff --git a/donjo-app/views/database/backup.php b/donjo-app/views/database/backup.php deleted file mode 100644 index 8795e8378..000000000 --- a/donjo-app/views/database/backup.php +++ /dev/null @@ -1,22 +0,0 @@ - -
-
-
-
-

Backup / Restore Database SID

-
-
-
-

Backup seluruh database SID (.sql) yang bisa diimport melalui perangkat PhpMyAdmin

- /exec_backup" target="confirm" message="Sistem akan melakukan proses backup database SID setelah Anda menekan tombol YA. Simpan file (.sql) tersebut di tempat yang aman." header="Backup Database SID">Backup Database -
-
-

- Proses restore database SID disarankan menggunakan perangkat PhpMyAdmin untuk meminimalkan kesalahan. Silakan klik tombol berikut untuk masuk ke halaman PhpMyadmin. -

- - - -
-
-
\ No newline at end of file diff --git a/donjo-app/views/database/export.php b/donjo-app/views/database/export.php deleted file mode 100644 index 1e25cc05c..000000000 --- a/donjo-app/views/database/export.php +++ /dev/null @@ -1,81 +0,0 @@ -load->database(); - - $mysqlUserName = $CI->db->username; - $mysqlPassword = $CI->db->password; - $mysqlHostName = $CI->db->hostname; - $DbName = $CI->db->database;; - $backup_name = "sid.sql"; - - Export_Database($mysqlHostName,$mysqlUserName,$mysqlPassword,$DbName, $tables=false, $backup_name=false ); - - function Export_Database($host,$user,$pass,$name, $tables=false, $backup_name=false ) - { - $mysqli = new mysqli($host,$user,$pass,$name); - $mysqli->select_db($name); - $mysqli->query("SET NAMES 'utf8'"); - - $queryTables = $mysqli->query('SHOW TABLES'); - while($row = $queryTables->fetch_row()) - { - $target_tables[] = $row[0]; - } - if($tables !== false) - { - $target_tables = array_intersect( $target_tables, $tables); - } - foreach($target_tables as $table) - { - $result = $mysqli->query('SELECT * FROM '.$table); - $fields_amount = $result->field_count; - $rows_num=$mysqli->affected_rows; - $res = $mysqli->query('SHOW CREATE TABLE '.$table); - $TableMLine = $res->fetch_row(); - $content = (!isset($content) ? '' : $content) . "\n\n".$TableMLine[1].";\n\n"; - - for ($i = 0, $st_counter = 0; $i < $fields_amount; $i++, $st_counter=0) - { - while($row = $result->fetch_row()) - { //when started (and every after 100 command cycle): - if ($st_counter%100 == 0 || $st_counter == 0 ) - { - $content .= "\nINSERT INTO ".$table." VALUES"; - } - $content .= "\n("; - for($j=0; $j<$fields_amount; $j++) - { - $row[$j] = str_replace("\n","\\n", addslashes($row[$j]) ); - if (isset($row[$j])) - { - $content .= '"'.$row[$j].'"' ; - } - else - { - $content .= '""'; - } - if ($j<($fields_amount-1)) - { - $content.= ','; - } - } - $content .=")"; - if ( (($st_counter+1)%100==0 && $st_counter!=0) || $st_counter+1==$rows_num) - { - $content .= ";"; - } - else - { - $content .= ","; - } - $st_counter=$st_counter+1; - } - } $content .="\n\n\n"; - } - $_SESSION['success'] = 1; - $backup_name = $backup_name ? $backup_name : $name."_(".date('H-i-s')."_".date('d-m-Y').")_".rand(1,11111111).".sql"; - header('Content-Type: application/octet-stream'); - header("Content-Transfer-Encoding: Binary"); - header("Content-disposition: attachment; filename=\"".$backup_name."\""); - echo $content; exit; - } \ No newline at end of file diff --git a/donjo-app/views/dokumen/form.php b/donjo-app/views/dokumen/form.php deleted file mode 100644 index 954c4e557..000000000 --- a/donjo-app/views/dokumen/form.php +++ /dev/null @@ -1,47 +0,0 @@ -
- - -
-
-

Form Manajemen Dokumen

-
-
-
-
- - - - - - - - - - - - - - - - -
Judul Dokumen
Dokumen -
- -
-
Upload Dokumen (Kosongkan jika tidak ingin mengubah dokumen)
-
- -
-
- -
-
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/dokumen/table.php b/donjo-app/views/dokumen/table.php deleted file mode 100644 index ddb4d1155..000000000 --- a/donjo-app/views/dokumen/table.php +++ /dev/null @@ -1,139 +0,0 @@ - -
- - - - -
-
-

Manajemen Dokumen

-
-
-
-
-
-
-  Tambah Dokumen Baru -
-
-
- -
-
-
-
-
- - - - - -
-
-
-
- -
- - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
-
diff --git a/donjo-app/views/export/exp.php b/donjo-app/views/export/exp.php deleted file mode 100644 index 21f21939a..000000000 --- a/donjo-app/views/export/exp.php +++ /dev/null @@ -1,64 +0,0 @@ -
- - - -
-
-
-
-
-

Export Data Desa

-
-
-
-
- - - - - - - - - - - - - - - - - -
Export Data Penduduk (.sid) - -
Export Data Analisis (.sid) - -
Export Data Penduduk (.xls) - -
Export Data Penduduk (.csv) - -
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/export/penduduk_csv.php b/donjo-app/views/export/penduduk_csv.php deleted file mode 100644 index c4df4723f..000000000 --- a/donjo-app/views/export/penduduk_csv.php +++ /dev/null @@ -1,11 +0,0 @@ - -Dusun,RW,RT,Nama,Nomor KK,Nomor NIK,Jenis Kelamin,Tempat Lahir,Tanggal Lahir,Agama,Pendidikan (dLm KK),Pendidikan (sdg ditemph),Pekerjaan,Kawin,Hub. Keluarga,Kewarganegaraan,NIK Ayah,Nama Ayah,NIK Ibu,Nama Ibu,Gol. Darah - -,,,"",,,,,,,,,,,,,,"",,"", - \ No newline at end of file diff --git a/donjo-app/views/export/penduduk_excel.php b/donjo-app/views/export/penduduk_excel.php deleted file mode 100644 index 1b1513695..000000000 --- a/donjo-app/views/export/penduduk_excel.php +++ /dev/null @@ -1,82 +0,0 @@ - - - - -Data Penduduk - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DusunRWRTNamaNomor KKNomor NIKJenis KelaminTempat LahirTanggal LahirAgamaPendidikan (dLm KK)Pendidikan (sdg ditemph)PekerjaanKawinHub. KeluargaKewarganegaraanNama AyahNama IbuGol. Darah
-
-
- - diff --git a/donjo-app/views/feed.php b/donjo-app/views/feed.php deleted file mode 100644 index 4f51c7240..000000000 --- a/donjo-app/views/feed.php +++ /dev/null @@ -1,37 +0,0 @@ - - - Desa ". $data_config["nama_desa"] ." - ". base_url() ." - Situs Web Desa ". $data_config["nama_desa"] ." Kec. ". $data_config["nama_kecamatan"] ." Kab. ". $data_config["nama_kabupaten"] ." - ". $data_config["nama_propinsi"] ." - ID - Sistem Informasi Desa v". VERSI_SID ." - ".date(DATE_RFC2822)." - - Desa ". $data_config["nama_desa"] ." - ". base_url("assets/files/logo/".$data_config["logo"]."") ." - ". base_url() ." - - - "; -foreach($feeds as $key=>$item) -{ - if(strlen(trim($item["judul"]))>0) - { - $kategori = (strlen(trim($item["kategori"]))==0)? "Artikel":$item["kategori"]; - $details .= " - - ".htmlspecialchars($item["judul"])." - ".$item["url"]." - Situs Web Desa ". $data_config["nama_desa"] ." - ".date(DATE_RFC2822,strtotime($item["tgl"]))." - - - ".htmlspecialchars($item["url"])." - - \n"; - } -} -$details .=" -"; -printf($details); \ No newline at end of file diff --git a/donjo-app/views/footer.php b/donjo-app/views/footer.php deleted file mode 100644 index 72fe981f3..000000000 --- a/donjo-app/views/footer.php +++ /dev/null @@ -1,8 +0,0 @@ -
- - - - diff --git a/donjo-app/views/gallery/form.php b/donjo-app/views/gallery/form.php deleted file mode 100644 index 1b448f631..000000000 --- a/donjo-app/views/gallery/form.php +++ /dev/null @@ -1,47 +0,0 @@ -
- - -
-
-

Form Manajemen Gallery

-
-
-
-
- - - - - - - - - - - - - - - - -
Nama Album
Gambar -
- -
-
Upload Gambar (Kosongi jika tidak ingin mengubah gambar)
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/gallery/form_sub_gallery.php b/donjo-app/views/gallery/form_sub_gallery.php deleted file mode 100644 index 85210b4ea..000000000 --- a/donjo-app/views/gallery/form_sub_gallery.php +++ /dev/null @@ -1,47 +0,0 @@ -
- - -
-
-

Form Sub Gallery

-
-
-
-
- - - - - - - - - - - - - - - - -
Judul Gambar
Judul Gambar -
- -
-
Upload Gambar (Kosongi jika tidak ingin mengubah gambar)
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/gallery/sub_gallery_table.php b/donjo-app/views/gallery/sub_gallery_table.php deleted file mode 100644 index bf0f98b49..000000000 --- a/donjo-app/views/gallery/sub_gallery_table.php +++ /dev/null @@ -1,147 +0,0 @@ - -
- - - - -
-
-
-
-
-
-

Manajemen Gallery Album

-
-
- " class="uibutton tipsy south" title="Tambah Data" > Tambah Gambar Baru - -
-
-
- -
-
-
-
-
- " class="uibutton">Kembali - - - - - -
-
-
-
- -
- - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
-
diff --git a/donjo-app/views/gallery/table.php b/donjo-app/views/gallery/table.php deleted file mode 100644 index fc46c58dc..000000000 --- a/donjo-app/views/gallery/table.php +++ /dev/null @@ -1,158 +0,0 @@ - - - - -
- - - - -
-
-

Manajemen Gallery

-
-
-
-
-
-
-  Tambah Album Baru - -
-
-
- -
-
-
-
-
- - - - - -
-
-
-
- -
- - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
-
diff --git a/donjo-app/views/garis/ajax_add_sub_line_form.php b/donjo-app/views/garis/ajax_add_sub_line_form.php deleted file mode 100644 index b0f708e5e..000000000 --- a/donjo-app/views/garis/ajax_add_sub_line_form.php +++ /dev/null @@ -1,20 +0,0 @@ -
- - - - - - - - - -
Nama garis
Simbol - -
-
-
- - -
-
-
\ No newline at end of file diff --git a/donjo-app/views/garis/form.php b/donjo-app/views/garis/form.php deleted file mode 100644 index 82e8728ae..000000000 --- a/donjo-app/views/garis/form.php +++ /dev/null @@ -1,73 +0,0 @@ -
- - -
-
-

Edit Properti / garis

-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - -
Nama garis / Porperti
Kategori - -
Foto -
- -
-
Ganti Foto - - )* Kosongi jika tidak ingin merubah Foto. -
Status -
- > - - > - -
-
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/garis/maps.php b/donjo-app/views/garis/maps.php deleted file mode 100644 index fb2179da8..000000000 --- a/donjo-app/views/garis/maps.php +++ /dev/null @@ -1,103 +0,0 @@ - - - -
-
- -
-
- - -
-
-
\ No newline at end of file diff --git a/donjo-app/views/garis/sub_line_table.php b/donjo-app/views/garis/sub_line_table.php deleted file mode 100644 index e0231c6a1..000000000 --- a/donjo-app/views/garis/sub_line_table.php +++ /dev/null @@ -1,69 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/garis/table.php b/donjo-app/views/garis/table.php deleted file mode 100644 index 6ab1c02c1..000000000 --- a/donjo-app/views/garis/table.php +++ /dev/null @@ -1,150 +0,0 @@ - - -
- - - - - -
-
-

Manajemen Properti / garis

-
Modul ini masih dalam tahap pengembangan. Ide-ide dan usulan mari kita kumpulkan untuk memperkaya khazanah SID
-
-
-
-
-
-
-" class="uibutton tipsy south" title="Tambah Data" > Tambah Data Baru -
-
-
- -
-
-
-
-
- - - - - -
-
-
-
- -
-start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
- -
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/garis/table2.php b/donjo-app/views/garis/table2.php deleted file mode 100644 index 02814270e..000000000 --- a/donjo-app/views/garis/table2.php +++ /dev/null @@ -1,148 +0,0 @@ - -
- - - - - -
-
-

Manajemen Properti / garis

-
-
-
-
-
-
-" class="uibutton tipsy south" title="Tambah Data" > Tambah Data Baru -
-
-
- -
-
-
-
-
- - - - - -
-
-
-
- -
-start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
- -
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/gis/ajax_adv_search_form.php b/donjo-app/views/gis/ajax_adv_search_form.php deleted file mode 100644 index 9720b725f..000000000 --- a/donjo-app/views/gis/ajax_adv_search_form.php +++ /dev/null @@ -1,111 +0,0 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Nama
Umur -
Dusun -
Jenis Kelamin - -
Pekerjaan -
Status Perkawinan -
Agama - -
Pendidikan Terakhir - -
Status Penduduk -
-
-
- - -
-
-
\ No newline at end of file diff --git a/donjo-app/views/gis/header.php b/donjo-app/views/gis/header.php deleted file mode 100644 index eb448ae61..000000000 --- a/donjo-app/views/gis/header.php +++ /dev/null @@ -1,109 +0,0 @@ - - - - -Sistem Informasi Desa - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/donjo-app/views/gis/maps.php b/donjo-app/views/gis/maps.php deleted file mode 100644 index d234b9497..000000000 --- a/donjo-app/views/gis/maps.php +++ /dev/null @@ -1,321 +0,0 @@ - - -
- -
-
-
- - - - - - - - - - - - - -" class="uibutton tipsy south" title="Clear Pencarian" style=""> Clear - -
-
-
\ No newline at end of file diff --git a/donjo-app/views/gis/menu.php b/donjo-app/views/gis/menu.php deleted file mode 100644 index 9778ec44b..000000000 --- a/donjo-app/views/gis/menu.php +++ /dev/null @@ -1,37 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/header-gis.php b/donjo-app/views/header-gis.php deleted file mode 100644 index 7fbbcbd44..000000000 --- a/donjo-app/views/header-gis.php +++ /dev/null @@ -1,105 +0,0 @@ - - - - - -SID - Desa <?php echo $desa['nama_desa'] ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -header_model->init_penduduk(); ?> - - - - -
- - - - - - - - - - -
-
- - - - - - -
-
diff --git a/donjo-app/views/header-min.php b/donjo-app/views/header-min.php deleted file mode 100644 index a82628f34..000000000 --- a/donjo-app/views/header-min.php +++ /dev/null @@ -1,38 +0,0 @@ - - - - - SID - Desa <?php echo $desa['nama_desa'] ?> - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
diff --git a/donjo-app/views/header.php b/donjo-app/views/header.php deleted file mode 100644 index 5254cf7e7..000000000 --- a/donjo-app/views/header.php +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SID - Desa <?php echo $desa['nama_desa'] ?> - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
-
- - - - - - -
-
diff --git a/donjo-app/views/home/about.php b/donjo-app/views/home/about.php deleted file mode 100644 index c3568c2e6..000000000 --- a/donjo-app/views/home/about.php +++ /dev/null @@ -1,59 +0,0 @@ -
-Anda sedang menggunakan aplikasi Sistem Informasi Desa (SID) versi
-
-
APAKAH SISTEM INFORMASI (SID)?

-
-Aplikasi Sistem Informasi Desa (SID) merupakan bagian dari prakarsa pengembangan seperangkat alat dan proses pemanfaatan data dan informasi untuk mendukung pengelolaan sumberdaya berbasis komunitas di tingkat desa. Prakarsa ini dikelola oleh lembaga swadaya masyarakat Yayasan Combine Resource Institution (CRI) bersama jejaring organisasi mitra, komunitas, dan lembaga pemerintahan lintas sektor dan lintas daerah di Indonesia sejak tahun 2009. -
-
-PERSETUJUAN LISENSI
-
-Perangkat lunak ini beserta semua hak kekayaan intelektual yang terkait adalah milik Yayasan Combine Resource Institution, yang kemudian disebut CRI, yang berkedudukan di Jl. K.H. Ali Maksum No. 183 Pelemsewu, Panggungharjo, Sewon, Bantul, Daerah Istimewa Yogyakarta, Indonesia. -
-
-Sistem Informasi Desa (SID) secara teknis terdiri atas "perangkat lunak" (kode sumber program dan aplikasi-aplikasi turunannya) dan "layanan" (sistem perangkat lunak klien dan server yang membentuk satu kesatuan fungsi). Perangkat lunak dan kode sumber Sistem Informasi Desa ini tidak untuk komersial, bersumber terbuka, serta berlisensi GNU GPL Versi 3 (Periksa lebih lanjut di http://www.gnu.org/licenses/gpl.html). Penggunaan layanan Sistem Informasi Desa diizinkan mengikuti ketentuan yang dijelaskan di ketentuan ini. -
-
-Layanan Sistem Informasi Desa (SID) hanya ditujukan untuk penggunaan pribadi atas nama kelembagaan berupa lembaga pemerintah desa/kelurahan, yang dapat dikoordinasikan oleh dan/atau bersama pemerintah kabupaten/kota setempat di wilayah Republik Indonesia. Jika Anda ingin menggunakan Sistem Informasi Desa (SID) untuk tujuan apa pun selain itu atau punya kebutuhan tambahan, kami menawarkan layanan tambahan yang akan diatur dalam kesepakatan yang khusus/berbeda. Untuk informasi lebih lanjut, silakan kirim email ke office[at]combine.or.id. -
-
-Ketentuan Penggunaan
-
-Dengan menggunakan layanan Sistem Informasi Desa (SID), Anda setuju tidak akan menggunakannya dengan cara apa pun yang melanggar hukum di Republik Indonesia atau hak pihak ketiga. -
-
-Penggunaan Pribadi atau Tertentu
-
-Dengan menggunakan Sistem Informasi Desa (SID), Anda setuju menggunakan layanan ini hanya untuk penggunaan pribadi, non-komersial. Anda tidak diperkenankan (dan tidak diperkenankan membolehkan pihak ketiga) meminjamkan, menyewakan, mengadakan sublisensi, menjual, menjual kembali, atau melakukan segala bentuk distribusi layanan Sistem Informasi Desa (SID) lainnya untuk tujuan komersial. -
-
-Pernyataan tentang Batasan Kewajiban
-
-Layanan Sistem Informasi Desa (SID) diberikan oleh CRI "sebagaimana adanya" dan tanpa disertai jaminan atau kewajiban apa pun, tersurat maupun tersirat. Sistem Informasi Desa (SID) menyangkal semua jaminan dan kewajiban yang berkaitan dengan penggunaan layanan ini meliputi cedera pribadi maupun segala bentuk kerugian pribadi atau komersial yang bersifat insidental, khusus, tak langsung, atau sebab-akibat, termasuk kehilangan data dan gangguan bisnis. -
-
-Layanan Penggunaan
-
-Penggunaan layanan Sistem Informasi Desa (SID) akan terhubung pada sistem informasi jaringan desa-desa penerap SID yang dikelola oleh CRI untuk kepentingan layanan administrasi dan sertifikasi pengguna, layanan dukungan teknis pengguna, dan analisis kebutuhan pengembangan ke depan. -
-
-Penghentian Layanan; Pelanggaran Ketentuan Layanan
-
-CRI dengan Sistem Informasi Desa (SID) berhak atas keputusannya sendiri untuk mengakhiri lisensi ini kapan pun dengan atau tanpa alasan apa pun dan tanpa berakibat hukuman. Dengan menggunakan Sistem Informasi Desa (SID), Anda setuju tidak akan menggunakan layanan ini dengan cara apa pun yang melanggar Ketentuan Penggunaan dan Persetujuan Lisensi. -
-
-Sebagai pengguna, Anda bebas membatalkan persetujuan lisensi ini kapan pun dengan menghentikan pemakaian sebagian dan seluruh layanan Sistem Informasi Desa (SID) serta menghapus semua jejak penggunaan perangkat lunak ini dari perangkat Anda. -
-
-
-KONTAK DAN INFORMASI
-
-Combine Resource Institution
-Alamat: Jl. K.H. Ali Maksum No. 183 Panggungharjo, Sewon, Bantul, D.I. Yogyakarta 55188 INDONESIA
-Telp. / Faks. : +62 274 - 411 123
-e-mail: office[at]combine.or.id
-Twitter: @combineri
-Group Facebook: Sistem Informasi Desa
-Website: http://combine.or.id
-
-
\ No newline at end of file diff --git a/donjo-app/views/home/ajax_kantor_desa_maps.php b/donjo-app/views/home/ajax_kantor_desa_maps.php deleted file mode 100644 index f46c43517..000000000 --- a/donjo-app/views/home/ajax_kantor_desa_maps.php +++ /dev/null @@ -1,67 +0,0 @@ - - -
-
-
- -
-
\ No newline at end of file diff --git a/donjo-app/views/home/ajax_wilayah_desa_maps.php b/donjo-app/views/home/ajax_wilayah_desa_maps.php deleted file mode 100644 index a3241f150..000000000 --- a/donjo-app/views/home/ajax_wilayah_desa_maps.php +++ /dev/null @@ -1,95 +0,0 @@ - - - -
-
-
- - -
-
\ No newline at end of file diff --git a/donjo-app/views/home/desa.php b/donjo-app/views/home/desa.php deleted file mode 100644 index ce72da2dc..000000000 --- a/donjo-app/views/home/desa.php +++ /dev/null @@ -1,29 +0,0 @@ -
- - - -
-
- -
-
-
-
-

Tentang SID

-
-
-
- load->view('home/about.php');?> -
-
-
-
- Kembali -
-
-
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/home/konfigurasi_form.php b/donjo-app/views/home/konfigurasi_form.php deleted file mode 100644 index 7fda0d252..000000000 --- a/donjo-app/views/home/konfigurasi_form.php +++ /dev/null @@ -1,103 +0,0 @@ -
- - -
-
- -
-
-

Pengaturan

-
-
" method="POST" enctype="multipart/form-data"> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Nama Desa Kode Kode POS
Nama Kepala Desa
NIP Kepala Desa
Alamat Kantor Desa
e-mail Desa
Nama Kecamatan Kode
Nama Camat
NIP Camat
Nama Kabupaten Kode
Nama Provinsi Kode
Lambang -
- - - - - -
-
Ganti Lambang (Kosongkan jika tidak ingin mengubah lambang)
Lokasi Kantor / Wilayah Desa dalam Peta - " class="uibutton confirm" target="ajax-modalz" rel="window-lok" header="Lokasi " title="Lokasi ">Kantor Desa

- " class="uibutton confirm" target="ajax-modalz" rel="window-wil" header="Wilayah " title="Wilayah ">Wilayah Desa -
Google API Key
*) Kode unik yang didapatkan dari pendaftaran akun Google Maps. Klik di sini untuk petunjuk lebih jelas: Google API Key
-
- -
-
- - - - - -
-
-
- - -
-
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/home/nav.php b/donjo-app/views/home/nav.php deleted file mode 100644 index 62f909914..000000000 --- a/donjo-app/views/home/nav.php +++ /dev/null @@ -1,15 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/home/pengurus.php b/donjo-app/views/home/pengurus.php deleted file mode 100644 index 3b8c94b49..000000000 --- a/donjo-app/views/home/pengurus.php +++ /dev/null @@ -1,81 +0,0 @@ - -
- - - -
-
- -
-
-
-
-

Pemerintah Desa

-
-  Tambah Perangkat Desa -
-
-
-
-
-
- -
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
NoAksiNamaN.I.PJabatan 
- - -  
-
-
-
-
-
-
-
-
-
-
-
diff --git a/donjo-app/views/home/pengurus_form.php b/donjo-app/views/home/pengurus_form.php deleted file mode 100644 index 21eccecc0..000000000 --- a/donjo-app/views/home/pengurus_form.php +++ /dev/null @@ -1,58 +0,0 @@ -
- - - - -
-
-
-
-
-

Form Perangkat Desa

-
-
-
- - - - - - - - - - - - - - - - - - - - - -
Nama
NIP
NIK
Jabatan
Status -
- > - - > - -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/donjo-app/views/import/imp.php b/donjo-app/views/import/imp.php deleted file mode 100644 index ecb8ad1d8..000000000 --- a/donjo-app/views/import/imp.php +++ /dev/null @@ -1,129 +0,0 @@ -
- -
-
-

Import Database Kependudukan

-
-
-
- - -

Import Data Penduduk dan Keluarga (Basis NIK dan Nomor KK)

-
- - - - - - - - - - - - - - - - - - - - - - - - -
-

- Mempersiapkan database dengan tipe spreadsheet (.xls) untuk diimport ke dalam database SID: -
-

    -
  1. Pastikan format data yang akan diimport sudah sesuai dengan aturan import data: -
    -
    -> Boleh menggunakan tanda ' (petik satu) dalam penggunaan nama, -
    -> Struktur RT RW, jika tidak ada dalam struktur wilayah desa diganti dengan tanda (min/strip/dash) -
    -> Data (Jenis Kelamin, Agama, Pendidikan, Pekerjaan, Status Perkawinan, Status Hubungan dalam Keluarga, Kewarganegaraan, Golongan darah, Jamkesmas, raskin, klasifikasi sosial ekonomi) terwakili dengan Kode Nomor. Misal : laki-laki terwakili dengan nomor 1 dan perempuan dengan nomor 2
    -
    -
  2. Simpan (Save) file spreadsheet sebagai .xls file (jika Anda memakai excel 2007 gunakan Save As pilih format .xls) -
  3. Pastikan tipe spreadsheet berekstensi .xls format Excel 2003 -
  4. Data yang dibutuhkan untuk import dengan memenuhi aturan data. -
- UNDUH LAMPIRAN : Aturan Data - Contoh Format
-

-
-   -
- Pilih File .xls: - - - - Import Data Penduduk - -   -
-

Jumlah Data Gagal -

- - -
-

Letak Baris Data Gagal: -

- - -
-

Total Data Berhasil: -

- - -
-
- -
-

Import Pengelompokan Data Rumah Tangga

-
- - - - - - - - - - -
-

- Pengelompokan data penduduk yang sudah tersimpan di dalam database SID, sehingga terkelompokkan secara otomatis berdasarkan nomor urut rumah tangga: -
-

    -
  1. Pastikan format data yang akan diimport sudah sesuai dengan aturan import data: -
  2. Simpan (Save) file speradsheet sebagai .xls file (jika Anda memakai excel 2007 gunakan Save As pilih format .xls) -
  3. Pastikan tipe spreadsheet berekstensi .xls format Excel 2003 -
  4. Data yang dibutuhkan untuk import dengan memenuhi aturan data. -
- UNDUH LAMPIRAN : Aturan Data - Contoh Format
-

-
-   -
- Pilih File .xls: - - - - Import Data Pengelompokan Rumah Tangga - -   -
-
- -
-
-
-
-
- - - \ No newline at end of file diff --git a/donjo-app/views/import/ppls.php b/donjo-app/views/import/ppls.php deleted file mode 100644 index e3354d104..000000000 --- a/donjo-app/views/import/ppls.php +++ /dev/null @@ -1,92 +0,0 @@ -
- - - -
-
-
-
-
-

Import Data PBDT

-
-
-
- - - - - - - - */ ?> - - - - - - - - - - - - - - - - - - - - - -
- Rumah Tangga .xls: - - - - - -   -
- PBDT Individu .xls: - - - - - -   -
-

Jumlah Data Gagal -

- - -
-

Letak Baris Data Gagal: -

- - -
-

Tota Data Berhasil: -

- - -
- - - -
-
-
-
-
-
-
-
-
-
-
- - - \ No newline at end of file diff --git a/donjo-app/views/import/siak.php b/donjo-app/views/import/siak.php deleted file mode 100644 index 6eb51cc7f..000000000 --- a/donjo-app/views/import/siak.php +++ /dev/null @@ -1,52 +0,0 @@ -
- -
-
-
-
-

Import Data SIAK

-
-
-
- -
-

Unggah Berkas

-
- 1){ - echo $_SESSION["SIAK"]; - } - $_SESSION["SIAK"] = ""; - - $max_upload = (int)(ini_get('upload_max_filesize')); - $max_post = (int)(ini_get('post_max_size')); - $memory_limit = (int)(ini_get('memory_limit')); - $upload_mb = min($max_upload, $max_post, $memory_limit)/10; - echo "

Batas Maksimal Pengunggahan Berkas ".$upload_mb." MB

-

Proses ini akan membutuhkan waktu beberapa menit, menyesuaikan dengan spesifikasi - komputer server SID dan sambungan internet yang tersedia.

"; - - ?> -
-
-
- - - - - - - -
Berkas DK :
Berkas BW :
  - Import -
-
-
-
- -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/init.php b/donjo-app/views/init.php deleted file mode 100644 index 90e65e0b2..000000000 --- a/donjo-app/views/init.php +++ /dev/null @@ -1,82 +0,0 @@ - - - - - Sistem Informasi Desa (SID) - - - - - - - - - - - - - - - - - - - - -
-

BERHASIL!

-

Anda baru saja menginstall aplikasi SID dengan lancar.

-Mulai SID       -

- - - diff --git a/donjo-app/views/install.php b/donjo-app/views/install.php deleted file mode 100644 index a71c42f02..000000000 --- a/donjo-app/views/install.php +++ /dev/null @@ -1,53 +0,0 @@ - - - - - Sistem Informasi Desa (SID) - - - - - - - - - - - - - - - - - - - -
-

Instalasi Database SID

-
-
-

Klik “Lanjut” untuk memulai proses instalasi database SID. Proses instalasi memerlukan waktu singkat. Setelah selesai, Anda akan mendapatkan “username” dan “password”. Catat/simpan “username” dan “password” sebelum meneruskan ke langkah selanjutnya.


-Lanjut      -
-
- - diff --git a/donjo-app/views/kategori/ajax_add_sub_kategori_form.php b/donjo-app/views/kategori/ajax_add_sub_kategori_form.php deleted file mode 100644 index 897705072..000000000 --- a/donjo-app/views/kategori/ajax_add_sub_kategori_form.php +++ /dev/null @@ -1,15 +0,0 @@ -
- - - - - -
Sub Kategori - -
-
-
- -
-
-
\ No newline at end of file diff --git a/donjo-app/views/kategori/form.php b/donjo-app/views/kategori/form.php deleted file mode 100644 index b1bae1ee1..000000000 --- a/donjo-app/views/kategori/form.php +++ /dev/null @@ -1,62 +0,0 @@ - -
- - - -
-
-Kategori kategori - -
-
-
-
-
- - - - - -
Nama Kategori
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/kategori/sub_kategori_table.php b/donjo-app/views/kategori/sub_kategori_table.php deleted file mode 100644 index 3ea0f4aba..000000000 --- a/donjo-app/views/kategori/sub_kategori_table.php +++ /dev/null @@ -1,77 +0,0 @@ - diff --git a/donjo-app/views/kategori/table.php b/donjo-app/views/kategori/table.php deleted file mode 100644 index 3d319da99..000000000 --- a/donjo-app/views/kategori/table.php +++ /dev/null @@ -1,136 +0,0 @@ - -
- - - - -
-
-

Pengelolaan Kategori

- -
- -
-
diff --git a/donjo-app/views/kelompok/anggota/cetak.php b/donjo-app/views/kelompok/anggota/cetak.php deleted file mode 100644 index b06ea4f06..000000000 --- a/donjo-app/views/kelompok/anggota/cetak.php +++ /dev/null @@ -1,51 +0,0 @@ - - - -Data Kelompok - <?php echo $kelompok['nama']?> - - - - - -
-
-
- -

DATA KELOMPOK -

-
- - - - - - - - - - - - - - - - - - - - - - - -
NoNIKNamaAlamatUmur (Tahun)Jenis Kelamin
-
- -
- - diff --git a/donjo-app/views/kelompok/anggota/excel.php b/donjo-app/views/kelompok/anggota/excel.php deleted file mode 100644 index 21fffa430..000000000 --- a/donjo-app/views/kelompok/anggota/excel.php +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Data Kelompok - <?php echo $kelompok['nama']?> - - - - - -
-
-
- -

DATA KELOMPOK -

-
- - - - - - - - - - - - - - - - - - - - - - - -
NoNIKNamaAlamatUmur (Tahun)Jenis Kelamin
-
- -
- - diff --git a/donjo-app/views/kelompok/anggota/form.php b/donjo-app/views/kelompok/anggota/form.php deleted file mode 100644 index 532caa15f..000000000 --- a/donjo-app/views/kelompok/anggota/form.php +++ /dev/null @@ -1,62 +0,0 @@ - -
- - -
-
-
-
-

Form Input Anggota

-
-
-
- - - - - - - - - - -
NIK / Nama Penduduk -
-
Nomor Anggota -
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/kelompok/anggota/table.php b/donjo-app/views/kelompok/anggota/table.php deleted file mode 100644 index d8b85b7b7..000000000 --- a/donjo-app/views/kelompok/anggota/table.php +++ /dev/null @@ -1,69 +0,0 @@ - diff --git a/donjo-app/views/kelompok/cetak.php b/donjo-app/views/kelompok/cetak.php deleted file mode 100644 index 805d4ede8..000000000 --- a/donjo-app/views/kelompok/cetak.php +++ /dev/null @@ -1,49 +0,0 @@ - - - -Data Kelompok - - - - - -
-
-
- -

DATA KELOMPOK

-
- - - - - - - - - - - - - - - - - - - - - -
NoNamaNama KetuaKategori KelompokJumlah Anggota
-
- -
- - diff --git a/donjo-app/views/kelompok/excel.php b/donjo-app/views/kelompok/excel.php deleted file mode 100644 index 4373f1d45..000000000 --- a/donjo-app/views/kelompok/excel.php +++ /dev/null @@ -1,56 +0,0 @@ - - - - -Data Kelompok - - - - - -
-
-
- -

DATA KELOMPOK

-
- - - - - - - - - - - - - - - - - - - - - -
NoNamaNama KetuaKategori KelompokJumlah Anggota
-
- -
- - diff --git a/donjo-app/views/kelompok/form.php b/donjo-app/views/kelompok/form.php deleted file mode 100644 index 233a8b2a0..000000000 --- a/donjo-app/views/kelompok/form.php +++ /dev/null @@ -1,90 +0,0 @@ - - - - -
- - - - -
-
-
-
-

Form Master kelompok

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
Nama kelompok
Nomor / Kode kelompok
Kategori Kelompok - -
Nama/NIK Pimpinan -
-
Deskripsi kelompok
- -
-
-
-
- -
-
-
- -
-
-
-
-
-
-
diff --git a/donjo-app/views/kelompok/table.php b/donjo-app/views/kelompok/table.php deleted file mode 100644 index d518cb2bd..000000000 --- a/donjo-app/views/kelompok/table.php +++ /dev/null @@ -1,157 +0,0 @@ - -
- - - - -
-
-Kategori Kelompok -
-
-
-
-
-
- - -
-
-
-
-
- - - - - -
-
-
-
- -
- - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
-
diff --git a/donjo-app/views/kelompok_master/form.php b/donjo-app/views/kelompok_master/form.php deleted file mode 100644 index ca9643c2c..000000000 --- a/donjo-app/views/kelompok_master/form.php +++ /dev/null @@ -1,39 +0,0 @@ -
-
-
-
-

Form Kategori Kelompok

-
-
-
- - - - - - - - - - - - -
Kategori/ Kategori Kelompok
Deskripsi
- -
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/kelompok_master/table.php b/donjo-app/views/kelompok_master/table.php deleted file mode 100644 index ce5aeb6e7..000000000 --- a/donjo-app/views/kelompok_master/table.php +++ /dev/null @@ -1,112 +0,0 @@ - -
-
-
-
-
-
-

Modul kelompok

-
-
-  Tambah Kategori Kelompok Baru -
-
-
- - -
-
- -
-
-
-
-
- - - - - - -
-
-
-
- -
- - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
diff --git a/donjo-app/views/komentar/form.php b/donjo-app/views/komentar/form.php deleted file mode 100644 index 8be125268..000000000 --- a/donjo-app/views/komentar/form.php +++ /dev/null @@ -1,55 +0,0 @@ -
- - - -
- -
-

Komentar

-
-
-
-
- - - - - - - - - - - - - - - - -
Pengirim
Email
- -
Status -
-> - -> - -
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/komentar/table.php b/donjo-app/views/komentar/table.php deleted file mode 100644 index 526007270..000000000 --- a/donjo-app/views/komentar/table.php +++ /dev/null @@ -1,136 +0,0 @@ - -
- - - - -
-
-

Manajemen Komentar

-
-
-
-
-
-
-
-
-
- -
-
-
-
-
- - - - - -
-
-
-
- -
-start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
- -
-
-
-
-
diff --git a/donjo-app/views/lapor/form.php b/donjo-app/views/lapor/form.php deleted file mode 100644 index 9cb7c5962..000000000 --- a/donjo-app/views/lapor/form.php +++ /dev/null @@ -1,55 +0,0 @@ -
- - - -
- -
-

Komentar

-
-
-
-
- - - - - - - - - - - - - - - - -
Pengirim
e-mail
- -
Status -
-> - -> - -
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/lapor/nav.php b/donjo-app/views/lapor/nav.php deleted file mode 100644 index 1e643e9e3..000000000 --- a/donjo-app/views/lapor/nav.php +++ /dev/null @@ -1,10 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/lapor/table.php b/donjo-app/views/lapor/table.php deleted file mode 100644 index 30b836fb3..000000000 --- a/donjo-app/views/lapor/table.php +++ /dev/null @@ -1,136 +0,0 @@ - -
- - - - -
-
-

Manajemen Komentar

-
-
-
-
-
-
-
-
-
- -
-
-
-
-
- - - - - -
-
-
-
- -
-start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
- -
-
-
-
-
diff --git a/donjo-app/views/laporan/bulanan.php b/donjo-app/views/laporan/bulanan.php deleted file mode 100644 index 1acb717f9..000000000 --- a/donjo-app/views/laporan/bulanan.php +++ /dev/null @@ -1,225 +0,0 @@ -
- - - -
-
-
- -
- - - - - - - - - -

PEMERINTAH KABUPATEN/KOTA

LAMPIRAN A - 9

LAPORAN PERKEMBANGAN PENDUDUK

- - - - - - - - - - - - - - - - - - - - - - - - - -
Desa/Kelurahan:
Kecamatan:
Tahun:
Bulan: - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
No.
PERINCIAN
- - - - - - - - -
Warga Negara Indonesia
Laki-laki
Perempuan
-
- - - - - - - - -
Orang Asing
Laki-laki
Perempuan
-
- - - - - - - - - -
Jumlah
Laki-laki
Perempuan
L + P
-
1
2
3
4
5
6
7
8
9
1
Kelahiran bulan ini
2
Kematian bulan ini
3
Pendatang bulan ini
4
Pindah bulan ini
5
Penduduk awal bulan ini
6
Penduduk akhir bulan ini
-

 

-

 

-

 

-

 

-

 

-
-
- -
-
- -
-
- -
-
-
diff --git a/donjo-app/views/laporan/bulanan_excel.php b/donjo-app/views/laporan/bulanan_excel.php deleted file mode 100644 index 70946b4d0..000000000 --- a/donjo-app/views/laporan/bulanan_excel.php +++ /dev/null @@ -1,185 +0,0 @@ - - - - -Cetak Laporan Bulanan - - - - -
- -
- - - - - - - - - - - -

PEMERINTAH KABUPATEN/KOTA

LAMPIRAN A - 9

LAPORAN BULANAN DESA/KELURAHAN

-
- - - - - - - - - - - - - - - - - - - - - -
Desa/Kelurahan:
Kecamatan:
Laporan Bulan: tahun
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
No.
PERINCIAN
- - - - - - - - -
Warga Negara Indonesia
Laki-laki
Perempuan
-
- - - - - - - - -
Orang Asing
Laki-laki
Perempuan
-
- - - - - - - - - -
Jumlah
Laki-laki
Perempuan
L + P
-
1
2
3
4
5
6
7
8
9
1
Penduduk awal bulan ini
2
Kelahiran bulan ini
3
Kematian bulan ini
4
Pendatang bulan ini
5
Pindah bulan ini
6
Penduduk akhir bulan ini
-

 

-

 

-
- -
- diff --git a/donjo-app/views/laporan/bulanan_print.php b/donjo-app/views/laporan/bulanan_print.php deleted file mode 100644 index 340dd4a2f..000000000 --- a/donjo-app/views/laporan/bulanan_print.php +++ /dev/null @@ -1,177 +0,0 @@ - - - -Cetak Laporan Bulanan - - - - -
- -
- - - - - - - - - - - -

PEMERINTAH KABUPATEN/KOTA

LAMPIRAN A - 9

LAPORAN BULANAN DESA/KELURAHAN

-
- - - - - - - - - - - - - - - - - - - - - -
Desa/Kelurahan:
Kecamatan:
Laporan Bulan: tahun
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
No.
PERINCIAN
- - - - - - - - -
Warga Negara Indonesia
Laki-laki
Perempuan
-
- - - - - - - - -
Orang Asing
Laki-laki
Perempuan
-
- - - - - - - - - -
Jumlah
Laki-laki
Perempuan
L + P
-
1
2
3
4
5
6
7
8
9
1
Penduduk awal bulan ini
2
Kelahiran bulan ini
3
Kematian bulan ini
4
Pendatang bulan ini
5
Pindah bulan ini
6
Penduduk akhir bulan ini
-

 

-

 

-
- -
- diff --git a/donjo-app/views/laporan/kelompok.php b/donjo-app/views/laporan/kelompok.php deleted file mode 100644 index 019669813..000000000 --- a/donjo-app/views/laporan/kelompok.php +++ /dev/null @@ -1,193 +0,0 @@ -
- - -
-
-
- -
- - - - - - - - - - - - - -

PEMERINTAH KABUPATEN/KOTA

LAMPIRAN A - 9

DATA PILAH KEPENDUDUKAN MENURUT UMUR DAN FAKTOR KERENTANAN

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Desa/Kelurahan:
Kecamatan:
Periode:
Dusun: - -
- - - - -

DATA PILAH DUSUN

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DUSUN
RW
RT
KK
Kondisi dan Kelompok Umur
Hamil
Menyusui
Cacat
L
P
Dibawah 1 Tahun
1-5 Tahun
6-12 Tahun
13-15 Tahun
16-18 Tahun
19-59 Tahun
Diatas 60 Tahun
Tua
Muda
L
P
">">">">">">">">">">">">">">
Total
-

 

-

 

-

 

-
-
-
- -
-
- - -
-
- -
-
-
diff --git a/donjo-app/views/laporan/kelompok_excel.php b/donjo-app/views/laporan/kelompok_excel.php deleted file mode 100644 index 5d22a8f2e..000000000 --- a/donjo-app/views/laporan/kelompok_excel.php +++ /dev/null @@ -1,165 +0,0 @@ - -
- -
- - - - - - - - -

PEMERINTAH KABUPATEN/KOTA

LAMPIRAN A - 9

DATA PILAH KEPENDUDUKAN MENURUT UMUR DAN FAKTOR KERENTANAN

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Desa/Kelurahan:
Kecamatan:
Periode:
Dusun: - -
-
- - - - -

DATA PILAH DUSUN

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DUSUN
RW
RT
KK
Kondisi dan Kelompok Umur
Hamil
Menyusui
Cacat
L
P
Dibawah 1 Tahun
1-5 Tahun
6-12 Tahun
13-15 Tahun
16-18 Tahun
19-59 Tahun
Diatas 60 Tahun
Tua
Muda
L
P
Total
-

 

-

 

-

 

-
-
- -
\ No newline at end of file diff --git a/donjo-app/views/laporan/kelompok_print.php b/donjo-app/views/laporan/kelompok_print.php deleted file mode 100644 index 64dbedf21..000000000 --- a/donjo-app/views/laporan/kelompok_print.php +++ /dev/null @@ -1,160 +0,0 @@ - - - -Cetak Laporan Kelompok Rentan - - - - -
- -
- - - - - - - - - - - -

PEMERINTAH KABUPATEN/KOTA

LAMPIRAN A - 9

DATA PILAH KEPENDUDUKAN MENURUT UMUR DAN FAKTOR KERENTANAN

-
- - - - - - - - - - - - - - - - - - - - - -
Desa/Kelurahan:
Kecamatan:
Periode:
-
- - - - -

DATA PILAH DUSUN

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DUSUN
RW
RT
KK
Kondisi dan Kelompok Umur
Hamil
Menyusui
Cacat
L
P
Dibawah 1 Tahun
1-5 Tahun
6-12 Tahun
13-15 Tahun
16-18 Tahun
19-59 Tahun
Diatas 60 Tahun
Tua
Muda
L
P
Total
-

 

-

 

-

 

-
-
- -
- diff --git a/donjo-app/views/laporan/keluarga.php b/donjo-app/views/laporan/keluarga.php deleted file mode 100644 index 07e2edf59..000000000 --- a/donjo-app/views/laporan/keluarga.php +++ /dev/null @@ -1,163 +0,0 @@ -
- - - - -
-
Laporan : - -
-
Statistik Keluarga Berdasarkan : - -
- -
Statistik Penduduk Berdasarkan : - -
-
Statistik Keluarga Berdasarkan : - -
- -
-
-

Laporan

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - -
NoNamaJumlah KK
-
-
-
-
-
-
-
- - - - - -
-
-
-
- -
- - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/laporan/pendidikan.php b/donjo-app/views/laporan/pendidikan.php deleted file mode 100644 index 40e5b6695..000000000 --- a/donjo-app/views/laporan/pendidikan.php +++ /dev/null @@ -1,102 +0,0 @@ -
-

Wilayah administratif

-
-
-
-
-
-
-  Tambah Pengurus Desa -
-
-
-
-
-
-
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoAksiNamaJabatabN.I.PNo. TeleponAlamat
- - - - - " class="ui-icons icon-edit tipsy south" title="Edit Data">" class="ui-icons icon-remove tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> - -
-
-
-
-
-
-
- - - - - -
-
-
-
- -
- - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
\ No newline at end of file diff --git a/donjo-app/views/laporan/penduduk.php b/donjo-app/views/laporan/penduduk.php deleted file mode 100644 index 6a401abdc..000000000 --- a/donjo-app/views/laporan/penduduk.php +++ /dev/null @@ -1,111 +0,0 @@ -
- - - - -
-
Laporan : - -
- - -
-
-

Laporan

-
-
-
- -
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - -
NoStatistikJumlahLaki-lakiPerempuan
-
-
-
-
-
-
" method="post"> - - - - - -
-
-
-
- -
- - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/laporan/penduduk_tetap.php b/donjo-app/views/laporan/penduduk_tetap.php deleted file mode 100644 index e47099863..000000000 --- a/donjo-app/views/laporan/penduduk_tetap.php +++ /dev/null @@ -1,158 +0,0 @@ -
- - - - -
-
Laporan : - -
- -
Penduduk Desa - -
- - -
-
-

Manajemen Penduduk

-
-
-
-
-
-
-  Tambah Data -
-
-
-
-
-
- - - " class="uibutton tipsy south" title="Clear Pencarian"> Clear -
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoAksi">NIK">NIK">NIK">Nama ">Nama ">Nama No. KKAlamatPendidikanUmurPekerjaanStatus PerkawinanStatus Penduduk
- - -" class="ui-icons icon-edit tipsy south" title="Edit Data">" target="ajax-modalz" rel="window" header="Lokasi " class="ui-icons icon-maps tipsy south" title="Lokasi ">" class="ui-icons icon-remove tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> -" id="test" name="">">">
-
-
-
-
-
-
- - - - - -
-
-
-
- -
- -start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
- -
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/laporan/perubahan.php b/donjo-app/views/laporan/perubahan.php deleted file mode 100644 index 48f8f0ed4..000000000 --- a/donjo-app/views/laporan/perubahan.php +++ /dev/null @@ -1,199 +0,0 @@ -
- - - - -
-
Laporan : - -
- -
-
-
- -
- - - - - - - - - -

PEMERINTAH KABUPATEN/KOTA

LAPORAN PERUBAHAN PENDUDUK

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Desa/Kelurahan:
Kecamatan:
Kabupaten:
Laporan Bulan:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NO
DUSUN
PENDUDUK AKHIR BULAN LALU
PERUBAHAN PENDUDUK
PENDUDUK AKHIR BULAN INI
KELAHIRAN
DATANG
PERGI
KEMATIAN
L
P
JML
L
P
JML
L
P
JML
L
P
JML
L
P
JML
L
P
JML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Total
-

 

-

 

-

 

-
-
- -
-
- -
-
- -
-
-
\ No newline at end of file diff --git a/donjo-app/views/laporan/perubahan_print.php b/donjo-app/views/laporan/perubahan_print.php deleted file mode 100644 index 807dee55d..000000000 --- a/donjo-app/views/laporan/perubahan_print.php +++ /dev/null @@ -1,169 +0,0 @@ - - - -Cetak Laporan Perubahan Penduduk - - - - -
- -
- - - - - - - - -

PEMERINTAH KABUPATEN/KOTA

LAPORAN PERUBAHAN PENDUDUK

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Desa/Kelurahan:
Kecamatan:
Kabupaten:
Laporan Bulan:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NO
DUSUN
PENDUDUK AKHIR BULAN LALU
PERUBAHAN PENDUDUK
PENDUDUK AKHIR BULAN INI
KELAHIRAN
DATANG
PERGI
KEMATIAN
L
P
JML
L
P
JML
L
P
JML
L
P
JML
L
P
JML
L
P
JML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Total
-

 

-

 

-

 

-
- -
- diff --git a/donjo-app/views/layouts/analisis.tpl.php b/donjo-app/views/layouts/analisis.tpl.php deleted file mode 100644 index 13e657816..000000000 --- a/donjo-app/views/layouts/analisis.tpl.php +++ /dev/null @@ -1,58 +0,0 @@ -load->view('layouts/header.php');?> -
-
-
- load->view('partials/analisis.php'); - }else{ ?> -

DAFTAR DATA STATISTIK ANALISIS DI TINGKAT DESA

-

Klik judul Analisis untuk melihat tampilan detail data statistik


-
    - -
    -
    - -

    -
    -
    -
    - - - - - - - - - - - - - - - - -
    Pendataan :
    Subjek :
    Tahun :
    -
    -
    - -
-
-
-
-
- load->view('partials/side.right.stat.php');?> -
-
- - -
- - \ No newline at end of file diff --git a/donjo-app/views/layouts/arsip.tpl.php b/donjo-app/views/layouts/arsip.tpl.php deleted file mode 100644 index 7c67f14b9..000000000 --- a/donjo-app/views/layouts/arsip.tpl.php +++ /dev/null @@ -1,19 +0,0 @@ -load->view('layouts/header.php');?> -
-
-
- load->view('partials/arsip.php');?> -
-
-
-
-
- load->view('partials/side.right.php');?> -
-
- -
- - \ No newline at end of file diff --git a/donjo-app/views/layouts/artikel.tpl.php b/donjo-app/views/layouts/artikel.tpl.php deleted file mode 100644 index 5bf150d17..000000000 --- a/donjo-app/views/layouts/artikel.tpl.php +++ /dev/null @@ -1,24 +0,0 @@ -load->view('layouts/header.php');?> -
-
-
- load->view('partials/artikel.php'); - ?> -
-
-
-
-
- load->view('partials/side.right.php');?> -
-
- - - - - \ No newline at end of file diff --git a/donjo-app/views/layouts/gallery.tpl.php b/donjo-app/views/layouts/gallery.tpl.php deleted file mode 100644 index b25b9ca72..000000000 --- a/donjo-app/views/layouts/gallery.tpl.php +++ /dev/null @@ -1,19 +0,0 @@ -load->view('layouts/header.php');?> -
-
-
- load->view('partials/gallery.php');?> -
-
-
-
-
- load->view('partials/side.right.php');?> -
-
- - - - \ No newline at end of file diff --git a/donjo-app/views/layouts/header.php b/donjo-app/views/layouts/header.php deleted file mode 100644 index 9f0644734..000000000 --- a/donjo-app/views/layouts/header.php +++ /dev/null @@ -1,95 +0,0 @@ - - - - - <?php if(@$single_artikel){echo $single_artikel['judul']." - ";}?>Website Desa <?php echo unpenetration($desa['nama_desa']);?> - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- -
- -
-
- - <?php echo $desa['nama_desa']?> - -
-
-
-
- - 0){ - $this->load->view('layouts/teks_berjalan.php'); - } ?> - - - -
-
diff --git a/donjo-app/views/layouts/main.tpl.php b/donjo-app/views/layouts/main.tpl.php deleted file mode 100644 index a818c5416..000000000 --- a/donjo-app/views/layouts/main.tpl.php +++ /dev/null @@ -1,19 +0,0 @@ -load->view('layouts/header.php');?> -
-
-
- load->view('partials/content.php');?> -
-
-
-
-
- load->view('partials/side.right.php');?> -
-
- -
- - \ No newline at end of file diff --git a/donjo-app/views/layouts/mandiri.php b/donjo-app/views/layouts/mandiri.php deleted file mode 100644 index 2ce961357..000000000 --- a/donjo-app/views/layouts/mandiri.php +++ /dev/null @@ -1,26 +0,0 @@ -load->view('layouts/header.php');?> -
-
-
- load->view('partials/mandiri.php'); - elseif($m==2) - $this->load->view('partials/layanan.php'); - else - $this->load->view('partials/lapor.php'); - ?> -
-
-
-
-
- load->view('partials/side.right.php');?> -
-
- - - - \ No newline at end of file diff --git a/donjo-app/views/layouts/slide.php b/donjo-app/views/layouts/slide.php deleted file mode 100644 index e6364469e..000000000 --- a/donjo-app/views/layouts/slide.php +++ /dev/null @@ -1,14 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/layouts/stat.tpl.php b/donjo-app/views/layouts/stat.tpl.php deleted file mode 100644 index be249e1d8..000000000 --- a/donjo-app/views/layouts/stat.tpl.php +++ /dev/null @@ -1,36 +0,0 @@ -load->view('layouts/header.php');?> -
-
-
- load->view('partials/statistik_sos.php'); - }elseif($tipex==3){ - $this->load->view('partials/statistik_ras.php'); - }else{ - $this->load->view('partials/statistik_jam.php'); - } - }elseif($tipe == 3){ - $this->load->view('partials/wilayah.php'); - }else{ - $this->load->view('partials/statistik.php'); - } - ?> -
-
-
-
-
- load->view('partials/side.right.stat.php');?> -
-
- - - - - \ No newline at end of file diff --git a/donjo-app/views/layouts/sub_gallery.tpl.php b/donjo-app/views/layouts/sub_gallery.tpl.php deleted file mode 100644 index ee4f2d2f1..000000000 --- a/donjo-app/views/layouts/sub_gallery.tpl.php +++ /dev/null @@ -1,19 +0,0 @@ -load->view('layouts/header.php');?> -
-
-
- load->view('partials/sub_gallery.php');?> -
-
-
-
-
- load->view('partials/side.right.php');?> -
-
- - - - \ No newline at end of file diff --git a/donjo-app/views/layouts/teks_berjalan.php b/donjo-app/views/layouts/teks_berjalan.php deleted file mode 100644 index e8e193a42..000000000 --- a/donjo-app/views/layouts/teks_berjalan.php +++ /dev/null @@ -1,88 +0,0 @@ -
- - - -
\ No newline at end of file diff --git a/donjo-app/views/line/ajax_add_sub_line_form.php b/donjo-app/views/line/ajax_add_sub_line_form.php deleted file mode 100644 index 24bfbde3e..000000000 --- a/donjo-app/views/line/ajax_add_sub_line_form.php +++ /dev/null @@ -1,21 +0,0 @@ -
- - - - - - - - - -
Nama line
Warna - -
-
-
- - -
-
-
- \ No newline at end of file diff --git a/donjo-app/views/line/form.php b/donjo-app/views/line/form.php deleted file mode 100644 index 29fee42a2..000000000 --- a/donjo-app/views/line/form.php +++ /dev/null @@ -1,37 +0,0 @@ -
- - -
-
-
-
- - - - - - - - - - -
Nama Kategori
Warna - -
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/line/sub_line_table.php b/donjo-app/views/line/sub_line_table.php deleted file mode 100644 index efd98c2e4..000000000 --- a/donjo-app/views/line/sub_line_table.php +++ /dev/null @@ -1,67 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/line/table.php b/donjo-app/views/line/table.php deleted file mode 100644 index cd6387d3d..000000000 --- a/donjo-app/views/line/table.php +++ /dev/null @@ -1,128 +0,0 @@ - -
- - - - -
-
-

Manajemen Kategori line

-
Modul ini masih dalam tahap pengembangan. Ide-ide dan usulan mari kita kumpulkan untuk memperkaya khazanah SID
-
- -
-
\ No newline at end of file diff --git a/donjo-app/views/lokasi/ajax_add_sub_point_form.php b/donjo-app/views/lokasi/ajax_add_sub_point_form.php deleted file mode 100644 index 98594c41c..000000000 --- a/donjo-app/views/lokasi/ajax_add_sub_point_form.php +++ /dev/null @@ -1,20 +0,0 @@ -
- - - - - - - - - -
Nama lokasi
Simbol - -
-
-
- - -
-
-
\ No newline at end of file diff --git a/donjo-app/views/lokasi/form.php b/donjo-app/views/lokasi/form.php deleted file mode 100644 index bd2388057..000000000 --- a/donjo-app/views/lokasi/form.php +++ /dev/null @@ -1,77 +0,0 @@ -
- - -
-
-

Edit Properti / Lokasi

-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Nama Lokasi / Porperti
Kategori - -
Foto -
- -
-
Ganti Foto - - )* Kosongi jika tidak ingin merubah Foto. -
Keterangan
Status -
- > - - > - -
-
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/lokasi/maps.php b/donjo-app/views/lokasi/maps.php deleted file mode 100644 index 52d4e7f67..000000000 --- a/donjo-app/views/lokasi/maps.php +++ /dev/null @@ -1,68 +0,0 @@ - - -
-
- - - -
-
- - -
-
-
\ No newline at end of file diff --git a/donjo-app/views/lokasi/sub_point_table.php b/donjo-app/views/lokasi/sub_point_table.php deleted file mode 100644 index a178d11c2..000000000 --- a/donjo-app/views/lokasi/sub_point_table.php +++ /dev/null @@ -1,70 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/lokasi/table.php b/donjo-app/views/lokasi/table.php deleted file mode 100644 index 5fa764279..000000000 --- a/donjo-app/views/lokasi/table.php +++ /dev/null @@ -1,149 +0,0 @@ - -
- - - - - -
-
-

Manajemen Properti / Lokasi

-
Modul ini masih dalam tahap pengembangan. Ide-ide dan usulan mari kita kumpulkan untuk memperkaya khazanah SID
-
-
-
-
-
-
-" class="uibutton tipsy south" title="Tambah Data" > Tambah Data Baru -
-
-
- -
-
-
-
-
- - - - - -
-
-
-
- -
-start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
- -
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/man_user/manajemen_user_form.php b/donjo-app/views/man_user/manajemen_user_form.php deleted file mode 100644 index dc09f0e94..000000000 --- a/donjo-app/views/man_user/manajemen_user_form.php +++ /dev/null @@ -1,114 +0,0 @@ - -
- - -
-
-
-
-

Form Manajemen Pengguna / User

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level -
- - -> -> -> - -> -
-
Username
Passwordvalue="radiisi"/>
Nama
Nomor HP
e-mail
Foto -
- - - - - -
-
Ganti Foto (Kosongkan jika tidak ingin mengubah foto)
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/man_user/manajemen_user_table.php b/donjo-app/views/man_user/manajemen_user_table.php deleted file mode 100644 index 67ff69547..000000000 --- a/donjo-app/views/man_user/manajemen_user_table.php +++ /dev/null @@ -1,147 +0,0 @@ - -
- - -
-
-

Manajemen Pengguna

-
-
-
-
-
-
-  Tambah Penguna Baru -
-
-
-
-
-
- -
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NoAksi">Username">Username">Username">Nama Pengguna ">Nama Pengguna ">Nama Pengguna ">Level ">Level ">Level Last Login
- - - - -
-
-
-
-
-
-
- - - - - -
-
-
-
- -
- - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
-
diff --git a/donjo-app/views/man_user/nav.php b/donjo-app/views/man_user/nav.php deleted file mode 100644 index 6867cbe06..000000000 --- a/donjo-app/views/man_user/nav.php +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/mandiri/ajax_pin.php b/donjo-app/views/mandiri/ajax_pin.php deleted file mode 100644 index d8686cfdc..000000000 --- a/donjo-app/views/mandiri/ajax_pin.php +++ /dev/null @@ -1,50 +0,0 @@ - - - -
- - - - - - - - - - - - -
NIK / Nama Penduduk -
-
- Jika PIN tidak diisi maka sistem akan menghasilkan PIN secara acak. -
PIN - -
-
-
- - -
-
-
\ No newline at end of file diff --git a/donjo-app/views/mandiri/mandiri.php b/donjo-app/views/mandiri/mandiri.php deleted file mode 100644 index 16992d6f2..000000000 --- a/donjo-app/views/mandiri/mandiri.php +++ /dev/null @@ -1,119 +0,0 @@ -
- - - -
-
-
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - -
NoNIKNama PendudukTanggal BuatLogin Terakhir
-
-
-
-
-
- - - - - -
-
-
-
- -
- start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
- -
-
-
-
-
- - diff --git a/donjo-app/views/menu/ajax_add_sub_menu_form.php b/donjo-app/views/menu/ajax_add_sub_menu_form.php deleted file mode 100644 index d0a8d8924..000000000 --- a/donjo-app/views/menu/ajax_add_sub_menu_form.php +++ /dev/null @@ -1,43 +0,0 @@ - -
- - - - - - - - - -
Nama Sub Menu - -
Link - -
-
-
- - -
-
-
\ No newline at end of file diff --git a/donjo-app/views/menu/form.php b/donjo-app/views/menu/form.php deleted file mode 100644 index 7787294f6..000000000 --- a/donjo-app/views/menu/form.php +++ /dev/null @@ -1,74 +0,0 @@ - -
- - - -
-
-Kategori Menu - -
-
-
-
-
- - - - - - - - - - - - - - - -
Nama Menu
Link Sebelumnya
Auto Link - *)kosongi kolom auto link jika yang diisi kolom manual link. -
-
- -
- -
-
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/donjo-app/views/menu/sub_menu_table.php b/donjo-app/views/menu/sub_menu_table.php deleted file mode 100644 index f60a6368d..000000000 --- a/donjo-app/views/menu/sub_menu_table.php +++ /dev/null @@ -1,77 +0,0 @@ - diff --git a/donjo-app/views/menu/table.php b/donjo-app/views/menu/table.php deleted file mode 100644 index 5f508774d..000000000 --- a/donjo-app/views/menu/table.php +++ /dev/null @@ -1,131 +0,0 @@ - -
- - - - -
-
-
-
-
-
-

Manajemen Menu Statis

-
-
-" class="uibutton tipsy south" title="Tambah Data" > Tambah Menu Baru -
-
-
- -
-
-
-
-
- - - - - -
-
-
-
- -
-start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
- -
-
-
-
-
diff --git a/donjo-app/views/nav.php b/donjo-app/views/nav.php deleted file mode 100644 index b41500737..000000000 --- a/donjo-app/views/nav.php +++ /dev/null @@ -1,21 +0,0 @@ - diff --git a/donjo-app/views/partials/admin.tpl.php b/donjo-app/views/partials/admin.tpl.php deleted file mode 100644 index 610d90383..000000000 --- a/donjo-app/views/partials/admin.tpl.php +++ /dev/null @@ -1,144 +0,0 @@ -
- -
\ No newline at end of file diff --git a/donjo-app/views/partials/analisis.php b/donjo-app/views/partials/analisis.php deleted file mode 100644 index f1fd41d1c..000000000 --- a/donjo-app/views/partials/analisis.php +++ /dev/null @@ -1,97 +0,0 @@ -


- -
- - - - - -
-
- - - - - - - - - - - - - - - - - -
NoJawabanJumlah Responden
-
- -
-
-
\ No newline at end of file diff --git a/donjo-app/views/partials/arsip.php b/donjo-app/views/partials/arsip.php deleted file mode 100644 index 495faea82..000000000 --- a/donjo-app/views/partials/arsip.php +++ /dev/null @@ -1,64 +0,0 @@ - -
-

Arsip Konten Situs Web ".$desa["nama_desa"]."

-
"; - if(count($farsip)>0){ - echo " - - - - "; - foreach($farsip AS $data){ - echo " - - - - - "; - } - echo " - -
".$data["no"]."".$data["tgl"]."".$data["isi"]."
- "; - - }else{ - echo "Belum ada arsip konten web."; - } - - echo " -
"; - if(count($farsip)>0){ - echo " -
- -
- "; - } - echo " -
- - "; -?> \ No newline at end of file diff --git a/donjo-app/views/partials/artikel-x.php b/donjo-app/views/partials/artikel-x.php deleted file mode 100644 index 43bc12dd7..000000000 --- a/donjo-app/views/partials/artikel-x.php +++ /dev/null @@ -1,88 +0,0 @@ - -
-
-

-
-
-

- - - - - - - -

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Ditulis oleh:
- Pada: -
- - -
  -
-
-

Komentar Artikel Terkait

- - -
- -
- -

Berkata: -

-
-
- - -
-
-

Post Komentar :

-
- - " method=POST onSubmit=\"return validasi(this)\"> - - - - - -
Nama
Alamat e-mail
Komentar
 

-
- -
- \ No newline at end of file diff --git a/donjo-app/views/partials/artikel.php b/donjo-app/views/partials/artikel.php deleted file mode 100644 index 16dfe6ad2..000000000 --- a/donjo-app/views/partials/artikel.php +++ /dev/null @@ -1,124 +0,0 @@ - -

".$single_artikel["judul"]."

-

".$single_artikel['owner']." ".tgl_indo2($single_artikel['tgl_upload'])."

- "; - - if($single_artikel['gambar']!=''){ - if(is_file("assets/files/artikel/kecil_".$single_artikel['gambar'])) { - echo ""; - } - } - echo " -
".$single_artikel["isi"]."
"; - - if($single_artikel['dokumen']!=''){ - if(is_file("assets/files/dokumen/".$single_artikel['dokumen'])) { - echo "

Dokumen Lampiran : ".$single_artikel['link_dokumen']."


"; - } - } - if($single_artikel['gambar1']!=''){ - if(is_file("assets/files/artikel/kecil_".$single_artikel['gambar1'])) { - echo ""; - } - } - if($single_artikel['gambar2']!=''){ - if(is_file("assets/files/artikel/kecil_".$single_artikel['gambar2'])) { - echo ""; - } - } - if($single_artikel['gambar3']!=''){ - if(is_file("assets/files/artikel/kecil_".$single_artikel['gambar3'])) { - echo ""; - } - } - echo " -
- - "; ?> - - -
- "; - if(is_array($komentar)){ - echo " -
-

Komentar atas ".$single_artikel["judul"]."

-
- "; - foreach($komentar AS $data){ - if($data['enabled']==1){ - echo " -
-
- ".$data['owner']." ".tgl_indo2($data['tgl_upload'])." -
-
-
".$data['komentar']."
-
-
"; - } - } - echo " -
-
- "; - }else{ - echo "
Belum ada komentar atas artikel ini, silakan tuliskan dalam formulir berikut ini
"; - } - echo " -
-
-
-

Formulir Penulisan Komentar

-
-
- - - - - -
Nama
Alamat e-mail
Komentar
 
-
-
-
-
-
- "; -}else{ - echo " -
-
-

Maaf, data tidak ditemukan

-
- Anda telah terdampar di halaman yang datanya tidak ada lagi di web ini. Mohon periksa kembali atau laporkan kepada kami. -
-
-
- "; -} -?> \ No newline at end of file diff --git a/donjo-app/views/partials/bottom.php b/donjo-app/views/partials/bottom.php deleted file mode 100644 index fbdfee11f..000000000 --- a/donjo-app/views/partials/bottom.php +++ /dev/null @@ -1,13 +0,0 @@ - -
-
- - - - - - - -
-
- \ No newline at end of file diff --git a/donjo-app/views/partials/bottom_admin.tpl.php b/donjo-app/views/partials/bottom_admin.tpl.php deleted file mode 100644 index 720132451..000000000 --- a/donjo-app/views/partials/bottom_admin.tpl.php +++ /dev/null @@ -1,25 +0,0 @@ -
    - Menu_model->get_menu('bottom') as $key => $item):?> - session->userdata('group_id') && $item->group_id == $this->session->userdata('group_id') || $item->group_id == '0'):?> - > - url != '') { - echo "" .$item->title. ""; - } - else { - echo anchor($item->controller .'/'. $item->view,$item->title); - } - ?> - - -
  • |
  • -
  • - -
  • -
  • |
  • - -
  • - -
  • - -
\ No newline at end of file diff --git a/donjo-app/views/partials/bottom_menu.tpl.php b/donjo-app/views/partials/bottom_menu.tpl.php deleted file mode 100644 index ab1b22698..000000000 --- a/donjo-app/views/partials/bottom_menu.tpl.php +++ /dev/null @@ -1,14 +0,0 @@ -
    - -
  • |
  • -
  • -
  • -
  • |
  • -
  • - -
  • -
  • - -
  • - -
\ No newline at end of file diff --git a/donjo-app/views/partials/breadcrumb.tpl.php b/donjo-app/views/partials/breadcrumb.tpl.php deleted file mode 100644 index e89f2afd1..000000000 --- a/donjo-app/views/partials/breadcrumb.tpl.php +++ /dev/null @@ -1,2 +0,0 @@ -breadcrumbs->generate_breadcrumb()):?> - breadcrumbs->generate_breadcrumb();?> \ No newline at end of file diff --git a/donjo-app/views/partials/cek.php b/donjo-app/views/partials/cek.php deleted file mode 100644 index eb73a25c6..000000000 --- a/donjo-app/views/partials/cek.php +++ /dev/null @@ -1,17 +0,0 @@ -
-

Artikel

-
  • - - - -Program
    -Posted on March 4, 2013 -
  • -
  • - - - -Suara Komunitas
    -Posted on March 4, 2013 -
  • -
    \ No newline at end of file diff --git a/donjo-app/views/partials/chart.php b/donjo-app/views/partials/chart.php deleted file mode 100644 index 83e863fc2..000000000 --- a/donjo-app/views/partials/chart.php +++ /dev/null @@ -1,61 +0,0 @@ -
    - - - - - -
    - \ No newline at end of file diff --git a/donjo-app/views/partials/content.php b/donjo-app/views/partials/content.php deleted file mode 100644 index aeeba57dc..000000000 --- a/donjo-app/views/partials/content.php +++ /dev/null @@ -1,162 +0,0 @@ - -
    -

    ". $headline['judul'] ."

    -
    ". $headline['owner'].", ". tgl_indo2($headline['tgl_upload'])."
    -
    -
    "; - if($headline["gambar"]!=""){ - if(is_file("assets/files/artikel/sedang_".$headline['gambar'])){ - echo " - - "; - }else{ - echo " - "; - } - } - $head = explode("

    ",$headline['isi']); - echo $head[0]."

    "; - - echo " -
    -
    "; -} -$title = (!empty($judul_kategori))? $judul_kategori: "Artikel Terkini"; -if(is_array($title)){ - foreach($title as $item){ - $title= $item; - } -} -echo " -
    -
    -

    ".$title."

    -
    -
    -"; -function clean($string) { - $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens. - - return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars. -} -if($artikel){ - echo " -
    -
      "; - foreach($artikel as $data){ - $teks = fixTag($data['isi']); - if(strlen($teks)>310){ - $abstrak = substr($teks,0,strpos($teks," ",300)); - }else{ - $abstrak = $teks; - } - $judul = str_replace(" ","-",$data['judul']); - $judul = preg_replace('/[^A-Za-z0-9\-]/','-', $judul); - echo " -
    • -

      ". $data["judul"] ."

      - -
      -
      ".tgl_indo2($data['tgl_upload'])." ".$data['owner']."
      -
      "; - if($data['gambar']!=''){ - if(is_file("assets/files/artikel/kecil_".$data['gambar'])) { - echo "\""."; - }else{ - echo "\""."; - } - } - echo " -
      - ".$abstrak." ..selengkapnya -
      -
      -
    • "; - } - echo " -
    -
    - "; - -}else{ - echo " -
    -
    -

    Maaf, belum ada data

    -
    -

    Belum ada artikel yang dituliskan dalam ".$title.".

    -

    Silakan kunjungi situs web kami dalam waktu dekat.

    -
    -
    -
    - "; -} -echo " -
    "; -if($artikel){ - echo " -
    - -
    - "; -} - echo " -
    -"; -?> - \ No newline at end of file diff --git a/donjo-app/views/partials/copywright.tpl.php b/donjo-app/views/partials/copywright.tpl.php deleted file mode 100644 index 763ecba57..000000000 --- a/donjo-app/views/partials/copywright.tpl.php +++ /dev/null @@ -1 +0,0 @@ -

    Website desa ini berbasis Aplikasi Sistem Informasi Desa (SID) yang diprakarsai dan dikembangkan oleh Combine Resource Institution sejak 2009 dengan merujuk pada GNU GENERAL PUBLIC LICENSE Version 3. Isi website ini berada di bawah ketentuan yang diatur dalam Undang-Undang Republik Indonesia Nomor 14 Tahun 2008 tentang Keterbukaan Informasi Publik dan Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

    \ No newline at end of file diff --git a/donjo-app/views/partials/gallery.php b/donjo-app/views/partials/gallery.php deleted file mode 100644 index 805472aeb..000000000 --- a/donjo-app/views/partials/gallery.php +++ /dev/null @@ -1,30 +0,0 @@ - -
    -

    Arsip Galeri ".$desa["nama_desa"]."

    -
    -
      "; - $i=1; - foreach($gallery AS $data){ - if(is_file("assets/files/galeri/sedang_".$data['gambar'])) { - echo " -
    • -
      - - -
      - -
    • "; - if(fmod($i,2)==0){echo "
      ";} - $i++; - } - } - echo " -
    -
    -
    -
    - - "; -?> \ No newline at end of file diff --git a/donjo-app/views/partials/high.php b/donjo-app/views/partials/high.php deleted file mode 100644 index 1c6699bce..000000000 --- a/donjo-app/views/partials/high.php +++ /dev/null @@ -1,67 +0,0 @@ -
    - -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/partials/lapor.php b/donjo-app/views/partials/lapor.php deleted file mode 100644 index 2e2e37f92..000000000 --- a/donjo-app/views/partials/lapor.php +++ /dev/null @@ -1,25 +0,0 @@ -
    - -
    -Sila laporkan perubahan data dan/atau informasi penting lainnya yang terkait dengan profil Anda kepada pemerintah desa melalui formulir ini. - - - - - - - - - - - - - - - - -
    Pengirim
    NIK
    Laporan -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/partials/layanan.php b/donjo-app/views/partials/layanan.php deleted file mode 100644 index 7c5bcfd2c..000000000 --- a/donjo-app/views/partials/layanan.php +++ /dev/null @@ -1,34 +0,0 @@ -
    -

    DAFTAR REKAM CETAK SURAT

    - - - - - - - - - - - - - - - - - - - - - - -
    NoNomor SuratJenis SuratNama StafTanggal
    -
    - - - - load->view('surat/signature.php');?> -
    -
      -
    -
    \ No newline at end of file diff --git a/donjo-app/views/partials/mandiri.php b/donjo-app/views/partials/mandiri.php deleted file mode 100644 index d1d919b6c..000000000 --- a/donjo-app/views/partials/mandiri.php +++ /dev/null @@ -1,181 +0,0 @@ -
    -

    BIODATA PENDUDUK

    -" target="_blank" class="uibutton special" >Cetak Biodata - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - - -
    -
    Nama:
    Akta lahir:
    Dusun:
    RT/ RW: /
    Jenis Kelamin:
    Tempat / Tanggal Lahir: /
    Agama:
    Pendidikan dalam KK:
    Pendidikan sedang ditempuh:
    Pekerjaan:
    Status Kawin:
    Warga Negara:
    Dokumen Paspor:
    Dokumen KITAS:
    Alamat Sebelumnya:
    Alamat Sekarang:
    Akta perkawinan:
    Tanggal perkawinan:
    Akta perceraian:
    Tanggal perceraian:
    Cacat:
    Status:
    Data Orang Tua
    NIK Ayah:
    Nama Ayah:
    NIK Ibu:
    Nama Ibu:
     
    - -

    KEANGGOTAAN KELOMPOK

    - - - - - - - - - - - - - - - - - - - -
    NoNama KelompokKategori Kelompok
    - -

    DOKUMEN / KELENGKAPAN PENDUDUK

    - - - - - - - - - - - - - - - - - - - - - -
    NoNama DokumenFileTanggal Upload
    - - -
    \ No newline at end of file diff --git a/donjo-app/views/partials/menu.left.php b/donjo-app/views/partials/menu.left.php deleted file mode 100644 index fd2f0a207..000000000 --- a/donjo-app/views/partials/menu.left.php +++ /dev/null @@ -1,8 +0,0 @@ -
    - -
    \ No newline at end of file diff --git a/donjo-app/views/partials/menu.tpl.php b/donjo-app/views/partials/menu.tpl.php deleted file mode 100644 index c96f9c19e..000000000 --- a/donjo-app/views/partials/menu.tpl.php +++ /dev/null @@ -1,8 +0,0 @@ - -
    - -
    \ No newline at end of file diff --git a/donjo-app/views/partials/print_kk.php b/donjo-app/views/partials/print_kk.php deleted file mode 100644 index 3e2356178..000000000 --- a/donjo-app/views/partials/print_kk.php +++ /dev/null @@ -1,446 +0,0 @@ - - - - <?php echo $id; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -












    KARTU KELUARGA

    NO.

    Nama Kepala Keluarga
    :

    Kecamatan:



    Alamat
    :

    Kabupaten / Kota:



    Rt / Rw
    :

    Kode pos:



    Kelurahan / Desa
    :

    Propinsi:



    No.Nama LengkapNIK/NKSJenis KelaminTempat LahirTanggal LahirAgamaPendidikanPekerjaan

    123456789

























































































    NO.Status PerkawinanStatus Hubungan dalam keluargaKewarganegaraanDokumen ImigrasiNama Orang tua





    No. PasporNo. KITAS / KITAPAyahIbu


    10111213141516














































































    ........,........200..

    Dikeluarkan Tanggal:


    Kepala Keluarga,

    Camat / lurah /kepala desa













    LEMBAR :
    I. KEPADA KELUARGA









    ii. RT









    iii. Desa / Kelurahan









    iv. Kecamatan
    Tanda tangan/Cap Jempol

    NIP.












    - - \ No newline at end of file diff --git a/donjo-app/views/partials/scroller.php b/donjo-app/views/partials/scroller.php deleted file mode 100644 index 35c2903ed..000000000 --- a/donjo-app/views/partials/scroller.php +++ /dev/null @@ -1,68 +0,0 @@ - - - -
    -
    -
    -
    - - - -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/partials/side.left.php b/donjo-app/views/partials/side.left.php deleted file mode 100644 index d109e6ab5..000000000 --- a/donjo-app/views/partials/side.left.php +++ /dev/null @@ -1,16 +0,0 @@ -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/partials/side.right.php b/donjo-app/views/partials/side.right.php deleted file mode 100644 index 90977566e..000000000 --- a/donjo-app/views/partials/side.right.php +++ /dev/null @@ -1,355 +0,0 @@ - 1 && $_SESSION['mandiri_wait'] == 1) { ?> -
    -
    -

    Layanan Mandiri


    - Silakan datang / hubungi perangkat desa untuk mendapatkan kode PIN Anda. -
    -
    -

    Gagal 3 kali. Sila coba kembali dalam detik lagi

    -
    - Login Gagal. Username atau Password yang Anda masukkan salah! -
    -
    -
    - -
    -
    -

    Layanan Mandiri


    - Silakan datang / hubungi perangkat desa untuk mendapatkan kode PIN Anda. -
    -
    -

    Masukkan NIK dan PIN!

    -
    - - - - - -
    - Kesempatan mencoba kali lagi. -
    - - -
    - Login Gagal. Username atau Password yang Anda masukkan salah! -
    - - -
    -
    -
    - -
    -
    -

    Layanan Mandiri

    -
    -
    -
    -
    - -
    -
    -

    Layanan Mandiri


    - Untuk keamanan, sila ubah kode PIN Anda. -
    -
    -

    Masukkan PIN Baru

    -
    - - - -
    -
    - Silakan login kembali setelah PIN baru disimpan. -
    -
    -
    - -
    -
    -

    Layanan Mandiri


    - Untuk keamanan, silakan ubah kode PIN Anda. -
    -
    -
    - PIN baru berhasil disimpan! -
    -
    -
    - - - - - - -
    -
    -

    Agenda

    -
    -
    - -
    -
    - - - - -
    - -
    - -
    -
    - - - -
    -
    -

    Komentar Terkini

    -
    -
    - -
    -
    - - -
    -
    -

    Media Sosial

    -
    -
    - \"""; - } ?> -
    -
    - -
    -
    -

    Statistik Kunjungan

    -
    -
    - db->query("SELECT Tanggal,ipAddress FROM sys_traffic WHERE Tanggal='" . date("Y-m-d") . "'"); - if ($cek->num_rows() == 0) { - $up = $this->db->query("INSERT INTO sys_traffic (Tanggal,ipAddress,Jumlah) VALUES ('" . date("Y-m-d") . "','" . $ip . "','1')"); - $_SESSION['MemberOnline'] = date('Y-m-d H:i:s'); - } else { - $res = $cek->row(0); - $ipaddr = $res->ipAddress; - $up = $this->db->query("UPDATE sys_traffic SET Jumlah=Jumlah + 1,ipAddress='" . $ip . "' WHERE Tanggal='" . date("Y-m-d") . "'"); - $_SESSION['MemberOnline'] = date('Y-m-d H:i:s'); - } - } - $rs = $this->db->query('SELECT Jumlah AS Visitor FROM sys_traffic WHERE Tanggal="' . date("Y-m-d") . '" LIMIT 1'); - if ($rs->num_rows() > 0) { - $visitor = $rs->row(0); - $today = $visitor->Visitor; - } else { - $today = 0; - } - $strSQL = "SELECT Jumlah AS Visitor FROM sys_traffic WHERE - Tanggal=(SELECT DATE_ADD(CURDATE(),INTERVAL -1 DAY) FROM sys_traffic LIMIT 1) - LIMIT 1"; - $rs = $this->db->query($strSQL); - if ($rs->num_rows() > 0) { - $visitor = $rs->row(0); - $yesterday = $visitor->Visitor; - } else { - $yesterday = 0; - } - $rs = $this->db->query('SELECT SUM(Jumlah) as Total FROM sys_traffic'); - $visitor = $rs->row(0); - $total = $visitor->Total; - function num_toimage($tot, $jumlah) - { - $pattern = ''; - for ($j = 0; $j < $jumlah; $j++) { - $pattern .= '0'; - } - $len = strlen($tot); - $length = strlen($pattern) - $len; - $start = substr($pattern, 0, $length) . substr($tot, 0, $len - 1); - $last = substr($tot, $len - 1, 1); - $last_rpc = ''; - $inc = str_replace($last, $last_rpc, $last); - for ($i = 0; $i <= 9; $i++) { - $rpc = ''; - $start = str_replace($i, $rpc, $start); - } - $num = $start . $inc; - $num = str_replace('_BASE_URL_', base_url(), $num); - return $num; - } - ?> -
    - - - - - - - - - - - - - -
    Hari ini
    Kemarin
    Jumlah pengunjung
    -
    -
    -
    - - -
    - -
    -
      - -
    • ">
    • - -
    -
    -
    - - - -
    -

    " . $data["judul"] . "

    -
    -
    - " . $data['isi'] . " -
    - - "; - } -} -?> - - - - -
    -

    Lokasi " . $desa["nama_desa"] . "

    -
    -
    -
    - "; - ?> - - tampilkan dalam peta lebih besar
    -
    - - "; - ?> - \ No newline at end of file diff --git a/donjo-app/views/partials/side.right.stat.php b/donjo-app/views/partials/side.right.stat.php deleted file mode 100644 index 34209eec7..000000000 --- a/donjo-app/views/partials/side.right.stat.php +++ /dev/null @@ -1,176 +0,0 @@ - -
    -
    -

    Info Media Sosial

    -
    -
    -\"".$data["nama"]."\""; -} -?> -
    -
    - - -
    -

    Lokasi ". $desa["nama_desa"] ."

    -
    -
    -
    - "; - ?> - - tampilkan dalam peta lebih besar
    -
    - - "; -} -?> -
    -
    -

    Statistik Pengunjung

    -
    -
    - db->query("SELECT Tanggal,ipAddress FROM sys_traffic WHERE Tanggal='".date("Y-m-d")."'"); - if($cek->num_rows()==0){ - $up = $this->db->query("INSERT INTO sys_traffic (Tanggal,ipAddress,Jumlah) VALUES ('".date("Y-m-d")."','".$ip."','1')"); - $_SESSION['MemberOnline']=date('Y-m-d H:i:s'); - }else{ - $res = mysql_fetch_array($cek); - $ipaddr = $res['ipAddress'].$ip; - $up = $this->db->query("UPDATE sys_traffic SET Jumlah=Jumlah + 1,ipAddress='".$ipx."' WHERE Tanggal='".date("Y-m-d")."'"); - $_SESSION['MemberOnline']=date('Y-m-d H:i:s'); - } - } - $rs = $this->db->query('SELECT Jumlah AS Visitor FROM sys_traffic WHERE Tanggal="'.date("Y-m-d").'" LIMIT 1'); - if($rs->num_rows()>0){ - $visitor = $rs->row(0); - $today = $visitor->Visitor; - }else{ - $today = 0; - } - $strSQL = "SELECT Jumlah AS Visitor FROM sys_traffic WHERE - Tanggal=(SELECT DATE_ADD(CURDATE(),INTERVAL -1 DAY) FROM sys_traffic LIMIT 1) - LIMIT 1"; - $rs = $this->db->query($strSQL); - if($rs->num_rows()>0){ - $visitor = $rs->row(0); - $yesterday = $visitor->Visitor; - }else{ - $yesterday = 0; - } - $rs = $this->db->query('SELECT SUM(Jumlah) as Total FROM sys_traffic'); - $visitor = $rs->row(0); - $total = $visitor->Total; - function num_toimage($tot,$jumlah){ - $pattern=''; - for($j=0;$j<$jumlah;$j++){ - $pattern .= '0'; - } - $len = strlen($tot); - $length = strlen($pattern)-$len; - $start = substr($pattern,0,$length).substr($tot,0,$len-1); - $last = substr($tot,$len-1,1); - $last_rpc= ''; - $inc = str_replace($last,$last_rpc,$last); - for($i=0;$i<=9;$i++){ - $rpc =''; - $start=str_replace($i,$rpc,$start); - } - $num = $start.$inc; - $num = str_replace('_BASE_URL_',base_url(),$num); - return $num; - } - ?> -
    - - - - - - - - - - - - - -
    Hari ini
    Kemarin
    Jumlah pengunjung
    -
    -
    -
    - -
    - -
    -
      - -
    • ">
    • - -
    -
    -
    - - -
    -

    ".$data["judul"]."

    -
    -
    - ".$data['isi']." -
    - - "; - } -} -?> \ No newline at end of file diff --git a/donjo-app/views/partials/statistik.php b/donjo-app/views/partials/statistik.php deleted file mode 100644 index 62f5fcacc..000000000 --- a/donjo-app/views/partials/statistik.php +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - - -
    -

    Statistik Berdasar
    ". strtoupper($heading)."

    -
    -
    "; - $strC = ($tipe==1)? "btn-primary":"btn-default"; - echo "Bar Graph"; - $strC = ($tipe==0)? "btn-primary":"btn-default"; - echo "Pie Cart -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -

    Tabel Data Kependudukan berdasar ". $heading."

    -
    -
    - - - - - - - - - - - - - - - - "; - $i=0; $l=0; $p=0; - $hide="";$h=0; - $jm = count($stat); - foreach($stat as $data){ - $h++; - if($h > 10 AND $jm > 11)$hide="hide"; - echo " - - - - - - - - - "; - $i=$i+$data['jumlah']; - $l=$l+$data['laki']; $p=$p+$data['perempuan']; - } - echo " - -
    NoKelompokJumlahLaki-lakiPerempuan
    n%n%n%
    ".$data['no']."".$data['nama']."".$data['jumlah']."".$data['persen']."".$data['laki']."".$data['persen1']."".$data['perempuan']."".$data['persen2']."
    "; - if($hide=="hide"){ - echo " -
    - -
    - "; - } - echo " -
    -
    "; \ No newline at end of file diff --git a/donjo-app/views/partials/statistik_blt.php b/donjo-app/views/partials/statistik_blt.php deleted file mode 100644 index f4cd6f94b..000000000 --- a/donjo-app/views/partials/statistik_blt.php +++ /dev/null @@ -1,183 +0,0 @@ - - - -
    -

    Grafik Data Penerima Bantuan Langsung Tunai

    -
    -
    "; - $strC = ($tipe==1)? "btn-primary":"btn-default"; - echo "Bar Graph"; - $strC = ($tipe==0)? "btn-primary":"btn-default"; - echo "Pie Cart -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -

    Tabel Data Penerima Bantuan Langsung Tunai

    -
    -
    - - - - - - - - - - - - - - - - "; - $i=0; $l=0; $p=0; - foreach($stat as $data){ - echo " - - - - - - - - - "; - $i=$i+$data['jumlah']; - $l=$l+$data['laki']; $p=$p+$data['perempuan']; - } - echo " - -
    NoKelompokJumlahLaki-lakiPerempuan
    n%n%n%
    ".$data['no']."".$data['nama']."".$data['jumlah']."".$data['persen']."".$data['laki']."".$data['persen1']."".$data['perempuan']."".$data['persen2']."
    "; - - echo " -
    -
    "; -?> -
    - -
    - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoStatistikPopulasiMemperoleh Bantuan Langsung Tunai
    Jumlah
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/partials/statistik_jam.php b/donjo-app/views/partials/statistik_jam.php deleted file mode 100644 index 9a202c51b..000000000 --- a/donjo-app/views/partials/statistik_jam.php +++ /dev/null @@ -1,125 +0,0 @@ - - - -
    -

    Statistik Kependudukan berdasarkan Penerimaan Jamkesmas

    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -

    Tabel Statistik Kependudukan berdasarkan Penerimaan Jamkesmas

    -
    -
    - - - - - - - - - "; - - $i=0;$j=0; - - foreach($main as $data){ - echo " - - - - "; - $i=$i+$data['jumlah']; - $j=$j+$data['jamkesmas']; - } - echo " - - -
    #KelompokJumlah
    ".$data['id']."".$data['nama']."".$data['jumlah']."
    JUMLAH".$i."
    "; - - echo " -
    -
    "; -?> \ No newline at end of file diff --git a/donjo-app/views/partials/statistik_ras.php b/donjo-app/views/partials/statistik_ras.php deleted file mode 100644 index ecbcc0f96..000000000 --- a/donjo-app/views/partials/statistik_ras.php +++ /dev/null @@ -1,122 +0,0 @@ - - - -
    -

    Grafik Penerima Bantuan Raskin

    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -

    Tabel Data Penerima Bantuan Raskin

    -
    -
    - - - - - - - - - "; - $i=0; - foreach($main as $data){ - echo " - - - - "; - $i=$i+$data['jumlah']; - } - echo " - - -
    #KelompokJumlah
    ".$data['id']."".$data['nama']."".$data['jumlah']."
    JUMLAH".$i."
    "; - - echo " -
    -
    "; -?> \ No newline at end of file diff --git a/donjo-app/views/partials/statistik_sos.php b/donjo-app/views/partials/statistik_sos.php deleted file mode 100644 index c98da4f90..000000000 --- a/donjo-app/views/partials/statistik_sos.php +++ /dev/null @@ -1,113 +0,0 @@ - - - -
    -

    Grafik Statistik Kependudukan berdasarkan Indeks Kemiskinan

    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -

    Tabel Statistik Kependudukan berdasarkan Indeks Kemiskinan

    -
    -
    - - - - - - - - - "; - $i=0; - foreach($main as $data){ - echo " - - - - "; - $i=$i+$data['jumlah']; - } - echo " - - -
    #KelompokJumlah
    ".$data['id']."".$data['nama']."".$data['jumlah']."
    JUMLAH".$i."
    "; - - echo " -
    -
    "; -?> \ No newline at end of file diff --git a/donjo-app/views/partials/sub_gallery.php b/donjo-app/views/partials/sub_gallery.php deleted file mode 100644 index 529507a30..000000000 --- a/donjo-app/views/partials/sub_gallery.php +++ /dev/null @@ -1,30 +0,0 @@ - -
    -

    Arsip Galeri ".$desa["nama_desa"]."

    -
    -
      "; - $i=1; - foreach($gallery AS $data){ - if(is_file("assets/files/galeri/sedang_".$data['gambar'])) { - echo " -
    • -
      - - -
      -
      ". $data["nama"]."
      -
    • "; - if(fmod($i,2)==0){echo "
      ";} - $i++; - } - } - echo " -
    -
    -
    -
    - - "; -?> \ No newline at end of file diff --git a/donjo-app/views/partials/wilayah.php b/donjo-app/views/partials/wilayah.php deleted file mode 100644 index 312ea6553..000000000 --- a/donjo-app/views/partials/wilayah.php +++ /dev/null @@ -1,55 +0,0 @@ - -
    -

    Tabel Data Kependudukan berdasar ". $heading."

    -
    -
    "; - if(count($main) > 0){ - echo " - - - - - - - - - - - - - "; - foreach($main as $data){ - echo " - - - - - - - - - "; - } - echo " - - - - - - - - - - - -
    NoNama DusunNama Kepala DusunJumlah RTJumlah KKJiwaLkPr
    ".$data['no']."".strtoupper(unpenetration(ununderscore($data['dusun'])))."".strtoupper(unpenetration($data['nama_kadus']))."".$data['jumlah_rt']."".$data['jumlah_kk']."".$data['jumlah_warga']."".$data['jumlah_warga_l']."".$data['jumlah_warga_p']."
    TOTAL".$total['total_rt']."".$total['total_kk']."".$total['total_warga']."".$total['total_warga_l']."".$total['total_warga_p']."
    "; - }else{ - echo "
    Belum ada data
    "; - } - - echo " -
    - "; -?> \ No newline at end of file diff --git a/donjo-app/views/plan/menu.php b/donjo-app/views/plan/menu.php deleted file mode 100644 index 77ff8c506..000000000 --- a/donjo-app/views/plan/menu.php +++ /dev/null @@ -1,48 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/plan/nav.php b/donjo-app/views/plan/nav.php deleted file mode 100644 index e23d79bb0..000000000 --- a/donjo-app/views/plan/nav.php +++ /dev/null @@ -1,24 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/point/ajax_add_sub_point_form.php b/donjo-app/views/point/ajax_add_sub_point_form.php deleted file mode 100644 index b49106e3e..000000000 --- a/donjo-app/views/point/ajax_add_sub_point_form.php +++ /dev/null @@ -1,48 +0,0 @@ -
    - - - - - - - - - -
    Nama Point
    Simbol -
    -
    - - - - - -
    -
    -
    -
    - - -
    -
    -
    - \ No newline at end of file diff --git a/donjo-app/views/point/form.php b/donjo-app/views/point/form.php deleted file mode 100644 index 3bda82e2f..000000000 --- a/donjo-app/views/point/form.php +++ /dev/null @@ -1,65 +0,0 @@ -
    - - -
    -
    -
    -
    - - - - - - - - - - -
    Nama Kategori
    Simbol -
    -
    - - - - - -
    -
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    - \ No newline at end of file diff --git a/donjo-app/views/point/sub_point_table.php b/donjo-app/views/point/sub_point_table.php deleted file mode 100644 index 2eb69d517..000000000 --- a/donjo-app/views/point/sub_point_table.php +++ /dev/null @@ -1,69 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/point/table.php b/donjo-app/views/point/table.php deleted file mode 100644 index 9ca982eb3..000000000 --- a/donjo-app/views/point/table.php +++ /dev/null @@ -1,141 +0,0 @@ - - -
    - - - - - -
    -
    -

    Manajemen Kategori Point

    -
    Modul ini masih dalam tahap pengembangan. Ide-ide dan usulan mari kita kumpulkan untuk memperkaya khazanah SID
    -
    - -
    -
    \ No newline at end of file diff --git a/donjo-app/views/point/table2.php b/donjo-app/views/point/table2.php deleted file mode 100644 index 31f504e81..000000000 --- a/donjo-app/views/point/table2.php +++ /dev/null @@ -1,133 +0,0 @@ - -
    - - - - - -
    -
    -

    Manajemen Kategori Point

    -
    -
    -
    -
    -
    -
    -" class="uibutton tipsy south" title="Tambah Data" > Tambah Kategori Baru -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    -start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
    - -
    -
    -
    -
    -
    diff --git a/donjo-app/views/polygon/ajax_add_sub_polygon_form.php b/donjo-app/views/polygon/ajax_add_sub_polygon_form.php deleted file mode 100644 index 8fa63020f..000000000 --- a/donjo-app/views/polygon/ajax_add_sub_polygon_form.php +++ /dev/null @@ -1,35 +0,0 @@ -
    - - -
    -
    -
    -
    - - - - - - - - - -
    Nama polygon
    Warna - -
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/polygon/form.php b/donjo-app/views/polygon/form.php deleted file mode 100644 index 9aa109253..000000000 --- a/donjo-app/views/polygon/form.php +++ /dev/null @@ -1,37 +0,0 @@ -
    - - -
    -
    -
    -
    - - - - - - - - - - -
    Nama Kategori
    Warna - -
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/polygon/sub_polygon_table.php b/donjo-app/views/polygon/sub_polygon_table.php deleted file mode 100644 index f961f4d92..000000000 --- a/donjo-app/views/polygon/sub_polygon_table.php +++ /dev/null @@ -1,69 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/polygon/table.php b/donjo-app/views/polygon/table.php deleted file mode 100644 index 14653e947..000000000 --- a/donjo-app/views/polygon/table.php +++ /dev/null @@ -1,132 +0,0 @@ - -
    - - - - - -
    -
    -

    Manajemen Kategori polygon

    -
    Modul ini masih dalam tahap pengembangan. Ide-ide dan usulan mari kita kumpulkan untuk memperkaya khazanah SID
    -
    -
    -
    -
    -
    -
    -" class="uibutton tipsy south" title="Tambah Data" > Tambah Kategori Baru -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    -start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
    - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/print/headjs.php b/donjo-app/views/print/headjs.php deleted file mode 100644 index 7293ad5c8..000000000 --- a/donjo-app/views/print/headjs.php +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/donjo-app/views/program_bantuan/create.php b/donjo-app/views/program_bantuan/create.php deleted file mode 100644 index d1ab27341..000000000 --- a/donjo-app/views/program_bantuan/create.php +++ /dev/null @@ -1,127 +0,0 @@ - -
    - - - - - - -
    - load->view('program_bantuan/menu_kiri.php') - ?> - - Form Penulisan Program Bantuan -
    -
    - -
    - Ada Kesalahan -
    -
    - ".validation_errors()." -
    -
    - "; - } - $cid = @$_REQUEST["cid"]; - ?> - -
    - - -
    -
    - - -
    -
    - - -
    -
    - - Mulai - s.d -
    - -
    -
    - - -
    -
    - -
    -
    - -
    - load->view('program_bantuan/panduan.php') - ?> -
    - - - -
    \ No newline at end of file diff --git a/donjo-app/views/program_bantuan/detail.php b/donjo-app/views/program_bantuan/detail.php deleted file mode 100644 index 158b6d5e1..000000000 --- a/donjo-app/views/program_bantuan/detail.php +++ /dev/null @@ -1,106 +0,0 @@ - -
    - - - - - -
    - load->view('program_bantuan/menu_kiri.php') - ?> - -
    -
    - Detail Program -
    - - - - - - -
    Nama Program".strtoupper($program[0]["nama"])."
    Sasaran Peserta".$sasaran[$program[0]["sasaran"]]."
    Masa Berlaku".fTampilTgl($program[0]["sdate"],$program[0]["edate"])."
    Keterangan".$program[0]["ndesc"]."
    -
    - "; - - if($program[0]["status"] == 0){ - echo " -
    -
    - Formulir Penambahan Peserta -
    -
    - -
    -
    -
    -
    -
    - "; - echo " - - "; - } - $peserta = $program[1]; - ?> - Daftar Peserta Program - - - - $item){ - $nomer++; - ?> - - - - - - - -
    #Nama PesertaKeterangan
    ">
    - -
    -
    - -
    -
    \ No newline at end of file diff --git a/donjo-app/views/program_bantuan/edit.php b/donjo-app/views/program_bantuan/edit.php deleted file mode 100644 index 7b9134a92..000000000 --- a/donjo-app/views/program_bantuan/edit.php +++ /dev/null @@ -1,134 +0,0 @@ - -
    - - - - - - -
    - load->view('program_bantuan/menu_kiri.php') - ?> - -
    -
    - - Form Penulisan Program Bantuan -
    - -
    - Ada Kesalahan -
    -
    - ".validation_errors()." -
    -
    - "; - } - - if($_SESSION["success"] == 1){ - echo "Simpan Berhasil"; - } - $data= $program[0]; - $cid = $data["sasaran"]; - ?> - -
    - - -
    -
    - - "> -
    -
    - - -
    -
    - - Mulai "> - s.d "> -
    - -
    -
    - - -
    -
    - -
    -
    - -
    - load->view('program_bantuan/panduan.php') - ?> -
    - - - -
    \ No newline at end of file diff --git a/donjo-app/views/program_bantuan/form.php b/donjo-app/views/program_bantuan/form.php deleted file mode 100644 index 0e4de687f..000000000 --- a/donjo-app/views/program_bantuan/form.php +++ /dev/null @@ -1,117 +0,0 @@ - -
    - - - - - - -
    - load->view('program_bantuan/menu_kiri.php') - ?> - - Form Penulisan Program Bantuan -
    - - -
    - - -
    -
    - - -
    -
    - - -
    -
    - - Mulai - s.d -
    - -
    -
    - - -
    -
    - -
    -
    -

    Panduan

    -

    Isikanlah formulir disamping ini untuk menambahkan data program bantuan.

    -

    -

      -
    • Kolom Sasaran Program -

      Pilihlah salah satu dari sasaran program, apakah pribadi/perorangan, keluarga/kk, Rumah Tangga, ataupu Organisasi/kelompok warga

      -
    • -
    • Kolom Nama Program -

      Nama program wajib diisi

      -
    • -
    • Kolom Keterangan Program -

      Isikan keterangan program ini

      -
    • -
    -

    -
    - - - -
    \ No newline at end of file diff --git a/donjo-app/views/program_bantuan/formsuccess.php b/donjo-app/views/program_bantuan/formsuccess.php deleted file mode 100644 index 0fd72d4ff..000000000 --- a/donjo-app/views/program_bantuan/formsuccess.php +++ /dev/null @@ -1,34 +0,0 @@ - -
    - - - - - - -
    - load->view('program_bantuan/menu_kiri.php') - ?> - -
    - Ada Kesalahan -
    -
    - ".validation_errors()." -
    - - "; - } - - ?> -
    - load->view('program_bantuan/panduan.php') - ?> -
    -
    \ No newline at end of file diff --git a/donjo-app/views/program_bantuan/menu_kiri.php b/donjo-app/views/program_bantuan/menu_kiri.php deleted file mode 100644 index 000083674..000000000 --- a/donjo-app/views/program_bantuan/menu_kiri.php +++ /dev/null @@ -1,9 +0,0 @@ - -Daftar Program Bantuan - \ No newline at end of file diff --git a/donjo-app/views/program_bantuan/panduan.php b/donjo-app/views/program_bantuan/panduan.php deleted file mode 100644 index c145f4a71..000000000 --- a/donjo-app/views/program_bantuan/panduan.php +++ /dev/null @@ -1,22 +0,0 @@ - -

    Keterangan

    -

    Program Bantuan adalah modul untuk pengelolaan data aktivitas program kerja dan keterlibatan warga, baik secara personal, keluarga, rumah tangga, maupun kelompok/organisasi.

    -

    Panduan

    -

    Cara menyimpan/memperbarui data Program Bantuan adalah dengan mengisikan formulir yang terdapat dari menu Tulis Program Bantuan Baru:

    -

    -

      -
    • Kolom Sasaran Program -

      Pilihlah salah satu dari sasaran program, apakah pribadi/perorangan, keluarga/kk, Rumah Tangga, ataupu Organisasi/kelompok warga

      -
    • -
    • Kolom Nama Program -

      Nama program wajib diisi

      -
    • -
    • Kolom Keterangan Program -

      Isikan keterangan program ini

      -
    • -
    • Kolom Rentang Waktu -

      Isikan keterangan waktu masa kerja program akan berlangsung

      -
    • -
    -

    \ No newline at end of file diff --git a/donjo-app/views/program_bantuan/peserta.php b/donjo-app/views/program_bantuan/peserta.php deleted file mode 100644 index 7b2ec18c8..000000000 --- a/donjo-app/views/program_bantuan/peserta.php +++ /dev/null @@ -1,57 +0,0 @@ - -
    - - - - - - -
    - load->view('program_bantuan/menu_kiri.php') - - - ?> - - Profil Penerima Manfaat Program - - - - -
    Nama".strtoupper($profil["nama"])."
    Keterangan".$profil["ndesc"]."
    - - "; - - $programkerja = $program[0]; - ?> - Program yang pernah diikuti -
    - - - - - - - - - - - - - -
    #Waktu/TanggalNama ProgramKeterangan
    ">
    -
    -
    - load->view('program_bantuan/panduan.php'); - ?> -
    -
    \ No newline at end of file diff --git a/donjo-app/views/program_bantuan/program.php b/donjo-app/views/program_bantuan/program.php deleted file mode 100644 index 6d861c425..000000000 --- a/donjo-app/views/program_bantuan/program.php +++ /dev/null @@ -1,67 +0,0 @@ - -
    - - - - - - -
    - load->view('program_bantuan/menu_kiri.php') - ?> - -
    -
    - Daftar Program Bantuan"; - }else{ - echo "Daftar Program Bantuan dengan Sasaran ".$sasaran[$tampil].""; - } - - if($_SESSION["success"]==1){ - echo " -
    - ".$_SESSION["pesan"]." -
    "; - $_SESSION["success"]==0; - } - - ?> - - -
    -
    -
    - load->view('program_bantuan/panduan.php'); - ?> -
    -
    diff --git a/donjo-app/views/program_bantuan/unduh-sheet.php b/donjo-app/views/program_bantuan/unduh-sheet.php deleted file mode 100644 index 0bb24a883..000000000 --- a/donjo-app/views/program_bantuan/unduh-sheet.php +++ /dev/null @@ -1,51 +0,0 @@ - - - - -Peserta Program <?php echo $peserta[0]["nama"];?> - - - - - -
    -
    - -

    Daftar Peserta Program

    -

    -
    -
    -
    - - - - - - - - - - - $item){ - echo " - - - - "; - $i++; - } - ?> - -
    NoIDNamaKeterangan
    ".$i."'".$item["nik"]."".$item["nama"]."".$item["info"]."
    -
    -
    - - diff --git a/donjo-app/views/setting.php b/donjo-app/views/setting.php deleted file mode 100644 index 46882a781..000000000 --- a/donjo-app/views/setting.php +++ /dev/null @@ -1,59 +0,0 @@ - -
    " method="POST" id="validasi" enctype="multipart/form-data"> -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Username
    Nama
    Password Lama
    Password Baru
    Password Baru [Ulangi]
    Foto -
    - - - - - -
    -
    Ganti Foto (Kosongi jika tidak ingin merubah foto)
    -
    -
    -
    -
    - -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/setting/modul/form.php b/donjo-app/views/setting/modul/form.php deleted file mode 100644 index da7fc06b0..000000000 --- a/donjo-app/views/setting/modul/form.php +++ /dev/null @@ -1,46 +0,0 @@ -
    -
    -
    -
    -

    Form Pengaturan Modul

    -
    -
    -
    - - - - - - - - - - - - - - - - - -
    Nama Modul
    URL
    Ikon
    Status -
    - > - > -
    -
    -
    -
    -
    - -
    -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/setting/modul/table.php b/donjo-app/views/setting/modul/table.php deleted file mode 100644 index 1823a018d..000000000 --- a/donjo-app/views/setting/modul/table.php +++ /dev/null @@ -1,79 +0,0 @@ - -
    -
    -
    -
    -
    -

    Pengaturan Modul

    -
    -
    -
    -
    -
    - -
    -
    - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoAksiNama Modul URLStatus 
    - - - -  
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    diff --git a/donjo-app/views/setting/nav.php b/donjo-app/views/setting/nav.php deleted file mode 100644 index 7f62fb73b..000000000 --- a/donjo-app/views/setting/nav.php +++ /dev/null @@ -1,9 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_add_anggota_form.php b/donjo-app/views/sid/kependudukan/ajax_add_anggota_form.php deleted file mode 100644 index e75c0cd30..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_add_anggota_form.php +++ /dev/null @@ -1,78 +0,0 @@ - - - - -
    - - - - - - - - - - - - - - -
    NIK / Nama Penduduk -
    -
    -
    Hubungan -
    -
    -

    KK No. Keluarga :

    -
    - - - - - - - - - - - - - - - - - - - - -
    NoNIKNamaHubungan
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_add_anggota_rtm_form.php b/donjo-app/views/sid/kependudukan/ajax_add_anggota_rtm_form.php deleted file mode 100644 index 05e7eb79d..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_add_anggota_rtm_form.php +++ /dev/null @@ -1,64 +0,0 @@ - -
    - - - - - - - - -
    NIK / Nama Penduduk -
    -
      -
    -
    -

    KK No. Keluarga :

    -
    - - - - - - - - - - - - - - - - - - - - -
    NoNIKNamaHubungan
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_add_keluarga.php b/donjo-app/views/sid/kependudukan/ajax_add_keluarga.php deleted file mode 100644 index 80d049513..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_add_keluarga.php +++ /dev/null @@ -1,44 +0,0 @@ - - - -
    - - - - - - - - - -
    NIK Kepala Keluarga -
    -
    Nomor KK - -
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_add_rtm.php b/donjo-app/views/sid/kependudukan/ajax_add_rtm.php deleted file mode 100644 index d12a15821..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_add_rtm.php +++ /dev/null @@ -1,49 +0,0 @@ - - - -
    - - - - - - - - - - - - - -
    NIK Kepala Rumah Tangga -
    -
     
    Keterangan
    - Silakan cari nama / NIK dari data penduduk yang sudah terinput.
    - Penduduk yang dipilih otomatis berstatus sebagai Kepala Rumah Tangga baru tersebut. -
    -
    -
    - - -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_add_rtm_kk.php b/donjo-app/views/sid/kependudukan/ajax_add_rtm_kk.php deleted file mode 100644 index 17a27ca9f..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_add_rtm_kk.php +++ /dev/null @@ -1,41 +0,0 @@ - - - -
    - - - - - - - - - -
    Nomor KK RTM -
    -
    Nomor RTM - -
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_adv_search_form.php b/donjo-app/views/sid/kependudukan/ajax_adv_search_form.php deleted file mode 100644 index 43ec6f5e6..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_adv_search_form.php +++ /dev/null @@ -1,92 +0,0 @@ -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Umur -
    Pekerjaan -
    Status Perkawinan -
    Agama - -
    Pendidikan Sedang - -
    Pendidikan KK - -
    Status Hubungan Dalam Keluarga - -
    Golongan Darah - -
    Cacat / Difable - -
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_delete.php b/donjo-app/views/sid/kependudukan/ajax_delete.php deleted file mode 100644 index 6cfd29155..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_delete.php +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - -
    Anda tidak berhak menghapus data ini. Hubungi administrator!
    -
    -
    - - -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_edit_anggota_form.php b/donjo-app/views/sid/kependudukan/ajax_edit_anggota_form.php deleted file mode 100644 index 055a054d3..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_edit_anggota_form.php +++ /dev/null @@ -1,40 +0,0 @@ -
    -
    -

    KK No. Keluarga :

    -
    - - - - - - - - - - - - - - - - - - -
    NIK - -
    Nama Penduduk - -
    -
    Hubungan -
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_edit_anggota_rtm.php b/donjo-app/views/sid/kependudukan/ajax_edit_anggota_rtm.php deleted file mode 100644 index 2a3236699..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_edit_anggota_rtm.php +++ /dev/null @@ -1,39 +0,0 @@ -
    -
    -

    KK No. Keluarga :

    -
    - - - - - - - - - - - - - - - - - - -
    NIK - -
    Nama Penduduk - -
    -
    Hubungan -
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_edit_no_rtm.php b/donjo-app/views/sid/kependudukan/ajax_edit_no_rtm.php deleted file mode 100644 index 697f1fdc5..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_edit_no_rtm.php +++ /dev/null @@ -1,17 +0,0 @@ -
    - - - - - - -
    Nomor Rumah Tangga - -
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_edit_nokk.php b/donjo-app/views/sid/kependudukan/ajax_edit_nokk.php deleted file mode 100644 index b901e9f8e..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_edit_nokk.php +++ /dev/null @@ -1,65 +0,0 @@ - - -
    - - - - - - - - - - - - - - - - - - - - - -*/ ?> - -
    Nomor KK - -
    Raskin -
    - > - - > - -
    -
    BLSM -
    - > - - > - -
    -
    PKH -
    - > - - > - -
    -
    Bedah Rumah -
    - > - - > - -
    -
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_edit_status_dasar.php b/donjo-app/views/sid/kependudukan/ajax_edit_status_dasar.php deleted file mode 100644 index e50c874e2..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_edit_status_dasar.php +++ /dev/null @@ -1,41 +0,0 @@ - - - - - -
    - - - - - - - - - - - - -
    Peristiwa Penting -
    - > - - > - - > - -
    -
      -
    - Tanggal Peristiwa - - : -
    -
    -
    - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_pindah_form.php b/donjo-app/views/sid/kependudukan/ajax_pindah_form.php deleted file mode 100644 index bb0df1a59..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_pindah_form.php +++ /dev/null @@ -1,60 +0,0 @@ - -
    - - - - - - - - -
    Dusun -
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/ajax_query.php b/donjo-app/views/sid/kependudukan/ajax_query.php deleted file mode 100644 index 62da6532f..000000000 --- a/donjo-app/views/sid/kependudukan/ajax_query.php +++ /dev/null @@ -1,23 +0,0 @@ - - -Firstname -"; -while($row = mysql_fetch_array($result)) - { - echo ""; - echo "" . $row['id'] . ""; - echo ""; - } -echo ""; -mysql_close($con); -?> \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/cetak_biodata.php b/donjo-app/views/sid/kependudukan/cetak_biodata.php deleted file mode 100644 index 0e8500632..000000000 --- a/donjo-app/views/sid/kependudukan/cetak_biodata.php +++ /dev/null @@ -1,186 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - -
    - -
    - -
    -

    BIODATA PENDUDUK WARGANEGARA INDONESIA

    -
    -
    -
    -
    - - -
    - - - - - - - - - - - - - -
    Kabupaten:Desa:
    Kecamatan:Dusun:
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DATA PERSONAL
    1.Nama:
    2.NIK:
    3.Dusun:
    4.RT/ RW: /
    5.Jenis Kelamin:
    6.Tempat / Tanggal Lahir: /
    7.Agama:
    8.Pendidikan:
    9.Pekerjaan:
    10.Status Kawin:
    11.Warga Negara:
    12.Alamat Sekarang:
    13.Akta perkawinan:
    14.Data Orang Tua
    15.NIK Ayah:
    16.Nama Ayah:
    17.NIK Ibu:
    18.Nama Ibu:
    19.Status:
    DATA KEPEMILIKAN DOKUMEN
    1.Nomor Kartu Keluarga (No.KK):
    2.Nomor Akta Kelahiran:
    3.Dokumen Pasport:
    4.Dokumen Kitas:
    5.Nomor Paspor:
    6.Nomor Perkawinan:
    7.Tanggal perkawinan:
    8.Akta perceraian:
    9.Tanggal perceraian:
    -
    -
    - - - -
    -
    - - - diff --git a/donjo-app/views/sid/kependudukan/cetak_kk.php b/donjo-app/views/sid/kependudukan/cetak_kk.php deleted file mode 100644 index 852f28115..000000000 --- a/donjo-app/views/sid/kependudukan/cetak_kk.php +++ /dev/null @@ -1,131 +0,0 @@ -load->view('print/headjs.php');?> - -
    - - -
    -
    -

    KARTU KELUARGA

    -

    SALINAN

    -
    No.
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Nama KK: Kecamatan:
    Alamat: Kabupaten/Kota:
    RT / RW: / Kode Pos:
    Kelurahan/Desa: Provinsi:
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNamaNIKJenis KelaminTempat LahirTanggal LahirAgamaPendidikanPekerjaan
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoStatus PerkawinanStatus Hubungan dalam KeluargaKewarganegaraanNo. PasporNo. KITAS / KITAPNama AyahNama IbuGolongan darah
    -
    - - - - - - - - - - - - - - - - - - - - - -
    ,
     
    KEPALA KELUARGAKEPALA DESA
     
     
     
     
    -
    - -
    -
    -
    - - - \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/cetak_rtm.php b/donjo-app/views/sid/kependudukan/cetak_rtm.php deleted file mode 100644 index 18f96199e..000000000 --- a/donjo-app/views/sid/kependudukan/cetak_rtm.php +++ /dev/null @@ -1,129 +0,0 @@ -load->view('print/headjs.php');?> - -
    - - -
    -
    -

    KARTU RUMAH TANGGA

    -

    SALINAN

    -
    No.
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Nama KK: Kecamatan:
    Alamat: Kabupaten/Kota:
    RT / RW: / Kode Pos:
    Kelurahan/Desa: Provinsi:
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNamaNIKNOMOR KKJenis KelaminTempat LahirTanggal LahirAgamaPendidikanPekerjaan
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoStatus PerkawinanStatus Hubungan dalam KeluargaKewarganegaraanNama AyahNama IbuGolongan darah
    -
    - - - - - - - - - - - - - - - - - - - - - -
    ,
     
    KEPALA KELUARGAKEPALA DESA
     
     
     
     
    -
    - -
    -
    -
    - - - \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/dokumen_ajax.php b/donjo-app/views/sid/kependudukan/dokumen_ajax.php deleted file mode 100644 index 9f8685831..000000000 --- a/donjo-app/views/sid/kependudukan/dokumen_ajax.php +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - -
    NoNama DokumenTgl Upload
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/dokumen_form.php b/donjo-app/views/sid/kependudukan/dokumen_form.php deleted file mode 100644 index 1d7324a27..000000000 --- a/donjo-app/views/sid/kependudukan/dokumen_form.php +++ /dev/null @@ -1,32 +0,0 @@ - -
    - - - - - - - - - -
    Nama / Jenis Dokumen - -
    Berkas Dokumen - -
    - -
    -
    -
    - -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/kartu_keluarga.php b/donjo-app/views/sid/kependudukan/kartu_keluarga.php deleted file mode 100644 index aa02dc2d8..000000000 --- a/donjo-app/views/sid/kependudukan/kartu_keluarga.php +++ /dev/null @@ -1,181 +0,0 @@ - -
    - - - -
    -
    -

    Form Manajemen KK :

    -
    -
    -
    - -
    - -
    -

    KARTU KELUARGA

    -

    SALINAN

    -

    No.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    Alamat: Kabupaten:
    RT/RW: / Kode Pos:
    Kelurahan/Desa: Propinsi:
    Kecamatan: Jumlah Anggota Keluarga:
    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNamaNIKJenis KelaminTempat LahirTanggal LahirAgamaPendidikanPekerjaan
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoStatus PerkawinanStatus Hubungan dalam KeluargaKewarganegaraanNo. PasporNo. KITAS / KITAPNama AyahNama IbuGolongan darah
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    -

    -
    - -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/kartu_rtm.php b/donjo-app/views/sid/kependudukan/kartu_rtm.php deleted file mode 100644 index 3f8e5fc53..000000000 --- a/donjo-app/views/sid/kependudukan/kartu_rtm.php +++ /dev/null @@ -1,176 +0,0 @@ - -
    - - - -
    -
    -

    Form Manajemen KK :

    -
    -
    -
    - -
    - -
    -

    KARTU RUMAH TANGGA

    -

    No.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    Alamat: Kabupaten:
    RT/RW: / Kode Pos:
    Kelurahan/Desa: Propinsi:
    Kecamatan: Jumlah Anggota Rumah Tangga:
    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNamaNIKNOMOR KKJenis KelaminTempat LahirTanggal LahirAgamaPendidikanPekerjaan
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoStatus PerkawinanStatus Hubungan dalam KeluargaKewarganegaraanNama AyahNama IbuGolongan darah
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    -

    -
    - -
    -
    -
    -
    diff --git a/donjo-app/views/sid/kependudukan/keluarga.php b/donjo-app/views/sid/kependudukan/keluarga.php deleted file mode 100644 index a617f1458..000000000 --- a/donjo-app/views/sid/kependudukan/keluarga.php +++ /dev/null @@ -1,178 +0,0 @@ - -
    - - - -
    -
    -

    Data Keluarga

    -
    -
    -
    -
    -
    -
    -  Tambah KK Baru - -  Tambah KK - - - - " target="_blank" class="uibutton tipsy south" title="Cetak" > Cetak - - " target="_blank" class="uibutton tipsy south" title="Unduh" > Unduh -   - - - - - - - - - - - -
    -
    -
    - - -
    - -
    - -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -
    -
    diff --git a/donjo-app/views/sid/kependudukan/keluarga_anggota.php b/donjo-app/views/sid/kependudukan/keluarga_anggota.php deleted file mode 100644 index 0a090fd40..000000000 --- a/donjo-app/views/sid/kependudukan/keluarga_anggota.php +++ /dev/null @@ -1,79 +0,0 @@ - diff --git a/donjo-app/views/sid/kependudukan/keluarga_excel.php b/donjo-app/views/sid/kependudukan/keluarga_excel.php deleted file mode 100644 index 41e8bc6ba..000000000 --- a/donjo-app/views/sid/kependudukan/keluarga_excel.php +++ /dev/null @@ -1,65 +0,0 @@ - - - - -Data Keluarga - - - - - -
    -
    -

    DATA KELUARGA

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNomor KKNIK Kepala KeluargaKepala KeluargaJumlah AnggotaJenis KelaminDusunRWRTTanggal Terdaftar
    -
    - - -
    - diff --git a/donjo-app/views/sid/kependudukan/keluarga_form.php b/donjo-app/views/sid/kependudukan/keluarga_form.php deleted file mode 100644 index 904837748..000000000 --- a/donjo-app/views/sid/kependudukan/keluarga_form.php +++ /dev/null @@ -1,251 +0,0 @@ - - - - - -
    - - - -
    -
    -

    Form Manajemen KK

    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Nomor KK
    Data Kepala Keluarga BaruNIK / Nama Kepala Keluarga -
    -
    Dusun -
    RW -
    RT -
    Foto -
    - -
    -
    Ganti Foto (Kosongi jika tidak ingin merubah foto)
    Nomor KK
    Nama
    NIK
    Jenis Kelamin -
    - - - - -
    -
    Tempat Lahir
    Tanggal Lahir
    Agama -
    Pendidikan dalam KK -
    Pekerjaan -
    Status Perkawinan -
    Hubungan dalam Keluarga -
    Kewarganegaraan -
    No Pasport
    No Kitas/Kitap
    NIK Ayah
    NIK Ibu
    Nama Ayah
    Nama Ibu
    Golongan Darah -
    Status -
    - - -
    -
    -
    -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/keluarga_form_a.php b/donjo-app/views/sid/kependudukan/keluarga_form_a.php deleted file mode 100644 index 5cc0416af..000000000 --- a/donjo-app/views/sid/kependudukan/keluarga_form_a.php +++ /dev/null @@ -1,198 +0,0 @@ - -
    - - - -
    -
    -

    Form Manajemen KK

    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    No. KK
    Kepala Keluarga
    Dusun
    RW
    RT
    Foto -
    - -
    -
    Ganti Foto (Kosongi jika tidak ingin merubah foto)
    Nama
    NIK
    Jenis Kelamin -
    - - - - -
    -
    Tempat Lahir
    Tanggal Lahir
    Agama -
    Pendidikan dalam KK -
    Pekerjaan -
    Status Perkawinan -
    Hubungan dalam Keluarga -
    Kewarganegaraan -
    No Pasport
    No Kitas/Kitap
    NIK Ayah
    NIK Ibu
    Nama Ayah
    Nama Ibu
    Golongan Darah -
    Status -
    - - -
    -
    -
    -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/keluarga_jamkesmas.php b/donjo-app/views/sid/kependudukan/keluarga_jamkesmas.php deleted file mode 100644 index 9c5ced6b1..000000000 --- a/donjo-app/views/sid/kependudukan/keluarga_jamkesmas.php +++ /dev/null @@ -1,151 +0,0 @@ - - - -
    - - -
    -

    Data Keluarga

    -
    -
    -
    -
    -
    -
    - - - - - - - - - - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - -
    NoStatistikPopulasiMemperoleh Jamkesmas
    -
    -
    -
    -
    - \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/keluarga_print.php b/donjo-app/views/sid/kependudukan/keluarga_print.php deleted file mode 100644 index 59252622a..000000000 --- a/donjo-app/views/sid/kependudukan/keluarga_print.php +++ /dev/null @@ -1,52 +0,0 @@ - - - -Data Keluarga - - - - -
    -
    -

    DATA KELUARGA

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNomor KKNIK Kepala KeluargaKepala KeluargaJumlah AnggotaJenis KelaminDusunRWRTTanggal Terdaftar
    -
    - - -
    - diff --git a/donjo-app/views/sid/kependudukan/keluarga_raskin.php b/donjo-app/views/sid/kependudukan/keluarga_raskin.php deleted file mode 100644 index a80a77579..000000000 --- a/donjo-app/views/sid/kependudukan/keluarga_raskin.php +++ /dev/null @@ -1,150 +0,0 @@ - - - -
    - -
    -

    Data Keluarga

    -
    -
    -
    -
    -
    -
    - - - - - - - - - - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - -
    NoStatistikPopulasiMemperoleh Raskin
    -
    -
    -
    -
    - \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/keluarga_sosial.php b/donjo-app/views/sid/kependudukan/keluarga_sosial.php deleted file mode 100644 index 9eb5ef114..000000000 --- a/donjo-app/views/sid/kependudukan/keluarga_sosial.php +++ /dev/null @@ -1,140 +0,0 @@ - - - -
    - - -
    -

    Data Keluarga

    -
    -
    -
    -
    -
    -
    - - - - - - - - - - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - -
    NoStatistikPopulasi
    -
    -
    -
    -
    - \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/keluarga_statistik.php b/donjo-app/views/sid/kependudukan/keluarga_statistik.php deleted file mode 100644 index 69ad371e2..000000000 --- a/donjo-app/views/sid/kependudukan/keluarga_statistik.php +++ /dev/null @@ -1,185 +0,0 @@ - - - -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - -start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
    - -
    -
    - - - diff --git a/donjo-app/views/sid/kependudukan/penduduk_detail.php b/donjo-app/views/sid/kependudukan/penduduk_detail.php deleted file mode 100644 index 7fdda772d..000000000 --- a/donjo-app/views/sid/kependudukan/penduduk_detail.php +++ /dev/null @@ -1,214 +0,0 @@ -
    - - -
    -
    -

    Form Data Penduduk

    -
    -
    -
    -
    -

    BIODATA PENDUDUK

    -

    No.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - - -
    -
    Nama:
    Akta lahir:
    Dusun:
    RT/ RW: /
    Jenis Kelamin:
    Tempat / Tanggal Lahir: /
    Agama:
    Pendidikan dalam KK:
    Pendidikan sedang ditempuh:
    Pekerjaan:
    Status Kawin:
    Warga Negara:
    Dokumen Paspor:
    Dokumen KITAS:
    Alamat Sebelumnya:
    Alamat Sekarang:
    Akta perkawinan:
    Tanggal perkawinan:
    Akta perceraian:
    Tanggal perceraian:
    Status Kehamilan:
    Ibu Menyusui:
    Cacat:
    Status:
    Data Orang Tua
    NIK Ayah:
    Nama Ayah:
    NIK Ibu:
    Nama Ibu:
     
    - -

    KEANGGOTAAN KELOMPOK

    - - - - - - - - - - - - - - - - - - - -
    NoNama KelompokKategori Kelompok
    - -

    DOKUMEN / KELENGKAPAN PENDUDUK

    - - - - - - - - - - - - - - - - - - - - - -
    NoNama DokumenFileTanggal Upload
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/penduduk_dokumen.php b/donjo-app/views/sid/kependudukan/penduduk_dokumen.php deleted file mode 100644 index b21576766..000000000 --- a/donjo-app/views/sid/kependudukan/penduduk_dokumen.php +++ /dev/null @@ -1,59 +0,0 @@ -
    -
    -
    -
    -

    Dokumen / Kelengkpan Penduduk - []

    -
    -
    - " class="uibutton"> Tambah Dokumen -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoAksiNama DokumenFileTanggal Upload
    - -
    -
    - -
    -
    -
    -
    diff --git a/donjo-app/views/sid/kependudukan/penduduk_excel.php b/donjo-app/views/sid/kependudukan/penduduk_excel.php deleted file mode 100644 index 8773c7cf4..000000000 --- a/donjo-app/views/sid/kependudukan/penduduk_excel.php +++ /dev/null @@ -1,86 +0,0 @@ - - - - -Data Penduduk - - - - - -
    -
    -
    - -

    DATA PENDUDUK

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNIKNamaNo. KKDusunRWRTPendidikan (dLm KK)Pendidikan (sdg ditemph)PekerjaanTanggal LahirTempat LahirUmurKawinHub. KeluargaGol. DarahNama AyahNama IbuStatus
    -
    - -
    - - diff --git a/donjo-app/views/sid/kependudukan/penduduk_form.php b/donjo-app/views/sid/kependudukan/penduduk_form.php deleted file mode 100644 index b110d31b4..000000000 --- a/donjo-app/views/sid/kependudukan/penduduk_form.php +++ /dev/null @@ -1,351 +0,0 @@ - - -
    - - - - -
    -
    -

    Form Data Penduduk

    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ - ?> - - - - - - - - - - - - - - - -
    Dusun -
    RW -
    RT -
    Foto -
    - - - - - -
    -
    Ganti Foto (Kosongkan jika tidak ingin mengubah foto)
    Nama
    NIK
    Akta Kelahiran
    Jenis Kelamin -
    - > - - > - -
    -
    Tempat Lahir
    Tanggal Lahir
    Agama -
    Pendidikan dalam KK -
    Pendidikan sedang ditempuh -
    Pekerjaan -
    Status Kawin -
    Hubungan dalam Keluarga -
    Warganegara -
    Dokumen Paspor
    Dokumen KITAS
    Akta Perkawinan
    Tanggal Perkawinan
    Akta Perceraian
    Tanggal Perceraian
    NIK Ayah
    NIK Ibu
    Nama Ayah
    Nama Ibu
    Golongan Darah -
    Status -
    - - > - > - > -
    -
    Alamat Sebelumnya
    Alamat Sekarang
    Cacat -
    Status Kehamilan/ Ibu Menyusui -
    - > - > - > - > -
    -
    JAMKESMAS -
    - > - - > - - > - -
    -
    Lokasi Penduduk - " target="ajax-modalz" rel="window" header="Lokasi " class="uibutton special" title="Lokasi ">Edit Lokasi -
     
    DOKUMEN / KELENGKAPAN PENDUDUK
    Dokumen / Kelengkapan Penduduk - " class="uibutton confirm">Manajemen Dokumen -
    - - - - - - - - - - - - - - - - - - - - - -
    NoNama DokumenFileTanggal Upload
    -
    -
    -
    - -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    diff --git a/donjo-app/views/sid/kependudukan/penduduk_log.php b/donjo-app/views/sid/kependudukan/penduduk_log.php deleted file mode 100644 index 48e63d3c5..000000000 --- a/donjo-app/views/sid/kependudukan/penduduk_log.php +++ /dev/null @@ -1,203 +0,0 @@ - -
    - - -
    -
    -

    Manajemen Penduduk

    -
    -
    -
    - -
    -
    -
    - - -
    -
    - -
    -
    -
    -
    - - - - - - - - - - - - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoAksi">NIK">NIK">NIK">Nama ">Nama ">Nama  - - ">No. KK - - ">No. KK - ">No. KK - -  DusunRWRT - - ">Umur - - ">Umur - ">Umur - -  StatusTanggal (Kejadian)
    - - - " class="uibutton tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> - " id="test" name="">">">
    -
    -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - -start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
    - -
    -
    -
    -
    -
    diff --git a/donjo-app/views/sid/kependudukan/penduduk_print.php b/donjo-app/views/sid/kependudukan/penduduk_print.php deleted file mode 100644 index b0e5edbc4..000000000 --- a/donjo-app/views/sid/kependudukan/penduduk_print.php +++ /dev/null @@ -1,80 +0,0 @@ - - - -Data Penduduk - - - - - -
    -
    - ".$_SESSION['judul_statistik_cetak'].""; unset($_SESSION['judul_statistik']);}else{ ?> -

    DATA PENDUDUK

    - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNIKNamaNo. KKDusunRWRTPendidikan (dLm KK)Pendidikan (sdg ditemph)PekerjaanTanggal LahirTempat LahirUmurKawinHub. KeluargaGol. DarahNama AyahNama IbuStatus
    -
    - - -
    - diff --git a/donjo-app/views/sid/kependudukan/rtm.php b/donjo-app/views/sid/kependudukan/rtm.php deleted file mode 100644 index 1db04ada5..000000000 --- a/donjo-app/views/sid/kependudukan/rtm.php +++ /dev/null @@ -1,171 +0,0 @@ - -
    - - - -
    -
    -
    -
    -

    Pengaturan / Pengelompokan Rumah Tangga

    -
    -
    -  Tambah Rumah Tangga - - - - - - " target="_blank" class="uibutton tipsy south" title="Cetak" > Cetak - - " target="_blank" class="uibutton tipsy south" title="Unduh" > Unduh - " target="_blank" class="uibutton special tipsy south" title="Unduh" > Excel PBDT - */ ?> -   - - - - - - - - - - -
    -
    -
    -
    - - - -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -
    -
    diff --git a/donjo-app/views/sid/kependudukan/rtm_anggota.php b/donjo-app/views/sid/kependudukan/rtm_anggota.php deleted file mode 100644 index 78db03dfc..000000000 --- a/donjo-app/views/sid/kependudukan/rtm_anggota.php +++ /dev/null @@ -1,82 +0,0 @@ -
    - - -
    -
    -
    -
    -
    -
    -

    Daftar Anggota Rumah Tangga : -

    - -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoAksiNIKNomor KKNamaJenis KelaminHubunganNama AyahNama IbuAlamat
    - - - -
    -
    -
    - -
    -
    -
    diff --git a/donjo-app/views/sid/kependudukan/rtm_excel.php b/donjo-app/views/sid/kependudukan/rtm_excel.php deleted file mode 100644 index f8b227c2f..000000000 --- a/donjo-app/views/sid/kependudukan/rtm_excel.php +++ /dev/null @@ -1,42 +0,0 @@ - -
    -
    -

    Data Rumah Tangga

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNomor Rumah TanggaKepala Rumah TanggaJumlah AnggotaDusunRWRTTanggal Terdaftar
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/rtm_excel_pbdt.php b/donjo-app/views/sid/kependudukan/rtm_excel_pbdt.php deleted file mode 100644 index 50c56c61d..000000000 --- a/donjo-app/views/sid/kependudukan/rtm_excel_pbdt.php +++ /dev/null @@ -1,139 +0,0 @@ - - - -
    -
    -
    - -
    - - - - -
    PBDK2016.FKP.01
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    BLOK I. IDENTITAS WILAYAH SLS
    1KabupatenGUNUNGKIDUL  4Nama SLS lengkap dibawah Desa   Padukuhan:: 
    2Kecamatan      RT / RW::
    3Desa  5Jumlah RTS pada kolom (5) yg berkode 1 di SLS  -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    BLOK II. DAFTAR RTS
    Nomor RTSNama Kepala Rumah Tangga(KRT)/Nomor Induk Kependudukan(NIK)Nama Anggota Rumah Tangga (ART) LainnyaJumlah ARTAlamat Lengkap (nama jalan/gang/lorong/nomor, RT/RW/dusun)Apakah rumah tangga masih ada? (Lingkar iKODE)
    - 1. Ada, Status Kesejahteraan Tetap
    - 2. Ada, Status Kesejahteraan Berubah
    - 3. Ganti Kepala Rumah Tangga
    - 4. Pindah
    - 5. Meninggal
    - 6. Berubah Jml / Komposisi ART
    - 7. Baru
    - 8. Tidak dikenal/diketahui -
    KeteranganTelah diperiksa oleh asisten fasilitator (v)
    (01)(02)(03)(04)(05)(06)(07)(08)
    - RT RW   1     2     3     4     5     6     7     8  
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/kependudukan/rtm_print.php b/donjo-app/views/sid/kependudukan/rtm_print.php deleted file mode 100644 index b405e9096..000000000 --- a/donjo-app/views/sid/kependudukan/rtm_print.php +++ /dev/null @@ -1,47 +0,0 @@ - - - -Data Rumah Tangga - - - - -
    -
    -

    Data Rumah Tangga

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNomor Rumah TanggaKepala Rumah TanggaJumlah AnggotaDusunRWRTTanggal Terdaftar
    -
    - - -
    - diff --git a/donjo-app/views/sid/nav.php b/donjo-app/views/sid/nav.php deleted file mode 100644 index 8d019fc3e..000000000 --- a/donjo-app/views/sid/nav.php +++ /dev/null @@ -1,19 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/sid/wilayah/ajax_wil_dusun.php b/donjo-app/views/sid/wilayah/ajax_wil_dusun.php deleted file mode 100644 index 49f173e76..000000000 --- a/donjo-app/views/sid/wilayah/ajax_wil_dusun.php +++ /dev/null @@ -1,105 +0,0 @@ - - - -
    -
    - - - - - -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/wilayah/ajax_wil_rw.php b/donjo-app/views/sid/wilayah/ajax_wil_rw.php deleted file mode 100644 index 4b7aafa1f..000000000 --- a/donjo-app/views/sid/wilayah/ajax_wil_rw.php +++ /dev/null @@ -1,105 +0,0 @@ - - - -
    -
    - - - - - -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/wilayah/list_dusun_rt.php b/donjo-app/views/sid/wilayah/list_dusun_rt.php deleted file mode 100644 index 30b44d498..000000000 --- a/donjo-app/views/sid/wilayah/list_dusun_rt.php +++ /dev/null @@ -1,106 +0,0 @@ -
    - - - - -
    -
    - -
    - -
    -
    -

    Wilayah Administratif RT (RW / Dusun )

    -
    -
    -
    -
    -
    -
    - " class="uibutton tipsy south" title="Tambah Data" > Tambah RT -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoAksiNomor RTNIK Ketua RTNama Ketua RTJumlah KKJiwaLKPR
    - - - " class="fa fa-pencil" title="Edit Data">" class="fa fa-trash-o" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> -
    NoTotaltotal_kktotal_jiwatotal_lktotal_pr
    -
    -
    - -
    -
    -
    diff --git a/donjo-app/views/sid/wilayah/wilayah.php b/donjo-app/views/sid/wilayah/wilayah.php deleted file mode 100644 index a12903875..000000000 --- a/donjo-app/views/sid/wilayah/wilayah.php +++ /dev/null @@ -1,155 +0,0 @@ - -
    - - - -
    -
    -
    -
    -

    Wilayah Administratif Dusun

    - -
    - - -
    -
    - -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -
    -
    diff --git a/donjo-app/views/sid/wilayah/wilayah_cetak.php b/donjo-app/views/sid/wilayah/wilayah_cetak.php deleted file mode 100644 index 7e3d587b3..000000000 --- a/donjo-app/views/sid/wilayah/wilayah_cetak.php +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNama DusunNama KadusRWRTKKJiwaLKPR
    - - " title="Rincian Sub Wilayah">" title="Rincian Sub Wilayah">
    NoTotal
    \ No newline at end of file diff --git a/donjo-app/views/sid/wilayah/wilayah_excel.php b/donjo-app/views/sid/wilayah/wilayah_excel.php deleted file mode 100644 index 7c3be362c..000000000 --- a/donjo-app/views/sid/wilayah/wilayah_excel.php +++ /dev/null @@ -1,66 +0,0 @@ - - - - -Data Wilayah - - - - -
    -
    -

    DATA WILAYAH ADMINISTRASI

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNama DusunNama KadusRWRTKKJiwaLKPR
    -
    - -
    - diff --git a/donjo-app/views/sid/wilayah/wilayah_form.php b/donjo-app/views/sid/wilayah/wilayah_form.php deleted file mode 100644 index a804c718f..000000000 --- a/donjo-app/views/sid/wilayah/wilayah_form.php +++ /dev/null @@ -1,66 +0,0 @@ - -
    - - -
    -
    -
    -
    -

    Form Data Dusun

    - - - - - - - - - - - - - - - -
    Nama Dusun
    Kepala Dusun Sebelumnya - -
    NIK - -
    NIK / Nama Kepala Dusun -
    -
    -
    - -
    -
    - -
    -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/wilayah/wilayah_form_rt.php b/donjo-app/views/sid/wilayah/wilayah_form_rt.php deleted file mode 100644 index 73c916600..000000000 --- a/donjo-app/views/sid/wilayah/wilayah_form_rt.php +++ /dev/null @@ -1,65 +0,0 @@ - -
    - - -
    -
    -
    -
    -

    Form Data RT

    - - - - - - - - - - - - - - - -
    Nomor RT
    Ketua RT Sebelumnya - -
    NIK - -
    NIK / Nama Ketua RT -
    -
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/wilayah/wilayah_form_rw.php b/donjo-app/views/sid/wilayah/wilayah_form_rw.php deleted file mode 100644 index a253e4e91..000000000 --- a/donjo-app/views/sid/wilayah/wilayah_form_rw.php +++ /dev/null @@ -1,66 +0,0 @@ - -
    - - -
    -
    -
    -
    -

    Form Data RW

    - - - - - - - - - - - - - - - -
    Nomor RW
    Ketua RW Sebelumnya - -
    NIK - -
    NIK / Nama Ketua RW -
    -
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sid/wilayah/wilayah_print.php b/donjo-app/views/sid/wilayah/wilayah_print.php deleted file mode 100644 index 75dc73a51..000000000 --- a/donjo-app/views/sid/wilayah/wilayah_print.php +++ /dev/null @@ -1,74 +0,0 @@ - - - -Data Wilayah - - - - - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -
    -
    -

    Data Kependudukan berdasarkan Wilayah

    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNama DusunNama KadusRWRTKKJiwaLKPR
    -
    - -
    - - diff --git a/donjo-app/views/sid/wilayah/wilayah_rt.php b/donjo-app/views/sid/wilayah/wilayah_rt.php deleted file mode 100644 index 141119cae..000000000 --- a/donjo-app/views/sid/wilayah/wilayah_rt.php +++ /dev/null @@ -1,90 +0,0 @@ -
    - - - -
    -
    -
    - -
    -
    diff --git a/donjo-app/views/sid/wilayah/wilayah_rt_excel.php b/donjo-app/views/sid/wilayah/wilayah_rt_excel.php deleted file mode 100644 index 52bc726db..000000000 --- a/donjo-app/views/sid/wilayah/wilayah_rt_excel.php +++ /dev/null @@ -1,62 +0,0 @@ - - - - -Data Wilayah - - - - -
    -
    -

    DATA RT DAN JUMLAH PENDUDUK

    -

    DUSUN RW

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoRTNIK Ketua RTNama Ketua RTJumlah KKJiwaLKPR
    - - - - -
    -
    - - -
    - diff --git a/donjo-app/views/sid/wilayah/wilayah_rt_print.php b/donjo-app/views/sid/wilayah/wilayah_rt_print.php deleted file mode 100644 index 99951ee90..000000000 --- a/donjo-app/views/sid/wilayah/wilayah_rt_print.php +++ /dev/null @@ -1,55 +0,0 @@ - - - -Data Wilayah - - - - -
    -
    -

    DATA RT DAN JUMLAH PENDUDUK

    -

    DUSUN RW

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoRTNIK Ketua RTNama Ketua RTJumlah KKJiwaLKPR
    - - - - -
    -
    - - -
    - diff --git a/donjo-app/views/sid/wilayah/wilayah_rw.php b/donjo-app/views/sid/wilayah/wilayah_rw.php deleted file mode 100644 index 2142454f6..000000000 --- a/donjo-app/views/sid/wilayah/wilayah_rw.php +++ /dev/null @@ -1,93 +0,0 @@ - diff --git a/donjo-app/views/sid/wilayah/wilayah_rw_excel.php b/donjo-app/views/sid/wilayah/wilayah_rw_excel.php deleted file mode 100644 index bf2554196..000000000 --- a/donjo-app/views/sid/wilayah/wilayah_rw_excel.php +++ /dev/null @@ -1,65 +0,0 @@ - - - - -Data Wilayah - - - - -
    -
    -

    DATA RW DAN JUMLAH PENDUDUK

    -

    DUSUN

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoRWNIK Ketua RWNama Ketua RWJumlah RTJumlah KKJiwaLKPR
    - - - - - -
    -
    - - -
    - diff --git a/donjo-app/views/sid/wilayah/wilayah_rw_print.php b/donjo-app/views/sid/wilayah/wilayah_rw_print.php deleted file mode 100644 index 7d0c9fb55..000000000 --- a/donjo-app/views/sid/wilayah/wilayah_rw_print.php +++ /dev/null @@ -1,58 +0,0 @@ - - - -Data Wilayah - - - - -
    -
    -

    DATA RW DAN JUMLAH PENDUDUK

    -

    DUSUN

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoRWNIK Ketua RWNama Ketua RWJumlah RTJumlah KKJiwaLKPR
    - - - - - -
    -
    - - -
    - diff --git a/donjo-app/views/siteman.php b/donjo-app/views/siteman.php deleted file mode 100644 index 3b2919c3b..000000000 --- a/donjo-app/views/siteman.php +++ /dev/null @@ -1,43 +0,0 @@ - - - - - SID <?= VERSI_SID ?> Login - - - -
    - -
    -
    SID
    -
    ver.
    - -
    Desa
    -
    Kecamatan
    -
    Kabupaten
    -
    -
    -
    -
    -

    Masukkan Username dan Password

    -
    - - - - -
    - Login Gagal. Username atau Password yang Anda masukkan salah! -
    - -
    - Tidak ada aktivitas dalam jangka waktu yang cukup lama. Demi keamanan silakan Login kembali. -
    - -
    -
    -
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/sms/ajax_anggota_form.php b/donjo-app/views/sms/ajax_anggota_form.php deleted file mode 100644 index a6a01ea11..000000000 --- a/donjo-app/views/sms/ajax_anggota_form.php +++ /dev/null @@ -1,42 +0,0 @@ - - -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - -
    NoNama Jenis KelaminAlamatNo HP
    - -
    -
    -
    - - -
    - -
    \ No newline at end of file diff --git a/donjo-app/views/sms/ajax_broadcast_form.php b/donjo-app/views/sms/ajax_broadcast_form.php deleted file mode 100644 index 1ec4c8a44..000000000 --- a/donjo-app/views/sms/ajax_broadcast_form.php +++ /dev/null @@ -1,122 +0,0 @@ - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Umur -
    Dusun -
    Jenis Kelamin - -
    Pekerjaan -
    Status Perkawinan -
    Agama - -
    Pendidikan Terakhir - -
    Status Penduduk -
    Group Kontak - -
    Isi Pesan
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sms/ajax_grup_form.php b/donjo-app/views/sms/ajax_grup_form.php deleted file mode 100644 index d763833c1..000000000 --- a/donjo-app/views/sms/ajax_grup_form.php +++ /dev/null @@ -1,17 +0,0 @@ - - -
    - - - - - -
    Nama Group -
    -
    - - -
    - -
    \ No newline at end of file diff --git a/donjo-app/views/sms/ajax_kontak_form.php b/donjo-app/views/sms/ajax_kontak_form.php deleted file mode 100644 index 525c76e58..000000000 --- a/donjo-app/views/sms/ajax_kontak_form.php +++ /dev/null @@ -1,28 +0,0 @@ - - -
    - - - - - - - - - -
    Nama - -
    No HP
    -
    - - -
    - -
    \ No newline at end of file diff --git a/donjo-app/views/sms/ajax_kontak_form_edit.php b/donjo-app/views/sms/ajax_kontak_form_edit.php deleted file mode 100644 index 3c1625f64..000000000 --- a/donjo-app/views/sms/ajax_kontak_form_edit.php +++ /dev/null @@ -1,20 +0,0 @@ - - -
    - - - - - - - - - -
    Nama
    No HP
    -
    - - -
    - -
    \ No newline at end of file diff --git a/donjo-app/views/sms/ajax_penduduk_pindah_form.php b/donjo-app/views/sms/ajax_penduduk_pindah_form.php deleted file mode 100644 index c35cc504f..000000000 --- a/donjo-app/views/sms/ajax_penduduk_pindah_form.php +++ /dev/null @@ -1,58 +0,0 @@ - -
    - - - - - - - - -
    Dusun -
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sms/ajax_penduduk_pindah_form_rt.php b/donjo-app/views/sms/ajax_penduduk_pindah_form_rt.php deleted file mode 100644 index ac6441bad..000000000 --- a/donjo-app/views/sms/ajax_penduduk_pindah_form_rt.php +++ /dev/null @@ -1,7 +0,0 @@ - RT - - \ No newline at end of file diff --git a/donjo-app/views/sms/ajax_penduduk_pindah_form_rw.php b/donjo-app/views/sms/ajax_penduduk_pindah_form_rw.php deleted file mode 100644 index 07c4f275c..000000000 --- a/donjo-app/views/sms/ajax_penduduk_pindah_form_rw.php +++ /dev/null @@ -1,7 +0,0 @@ -RW - - \ No newline at end of file diff --git a/donjo-app/views/sms/ajax_polling_form.php b/donjo-app/views/sms/ajax_polling_form.php deleted file mode 100644 index 8204f3ea4..000000000 --- a/donjo-app/views/sms/ajax_polling_form.php +++ /dev/null @@ -1,22 +0,0 @@ - - -
    - - - - - - - - - -
    Nama Polling -
    Keterangan -
    -
    - - -
    - -
    \ No newline at end of file diff --git a/donjo-app/views/sms/ajax_sms_form.php b/donjo-app/views/sms/ajax_sms_form.php deleted file mode 100644 index b5aea9d2a..000000000 --- a/donjo-app/views/sms/ajax_sms_form.php +++ /dev/null @@ -1,20 +0,0 @@ - - -
    - - - - - - - - - -
    No. Tujuan
    Isi Pesan
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sms/ajax_sms_form_kirim.php b/donjo-app/views/sms/ajax_sms_form_kirim.php deleted file mode 100644 index ff453fad2..000000000 --- a/donjo-app/views/sms/ajax_sms_form_kirim.php +++ /dev/null @@ -1,44 +0,0 @@ - - - -
    - - - - - - - - - -
    No HP Tujuan -
    -
    Pesan - -
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sms/berita_terkirim.php b/donjo-app/views/sms/berita_terkirim.php deleted file mode 100644 index f8036d5b9..000000000 --- a/donjo-app/views/sms/berita_terkirim.php +++ /dev/null @@ -1,132 +0,0 @@ - -
    - - - - -
    -
    - -
    - -
    -
    -

    Berita Terkirim

    -
    -
    -
    -
    -
    -
    -  Tulis Pesan Baru -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -
    -
    diff --git a/donjo-app/views/sms/create_sms.php b/donjo-app/views/sms/create_sms.php deleted file mode 100644 index 5b4407be7..000000000 --- a/donjo-app/views/sms/create_sms.php +++ /dev/null @@ -1,125 +0,0 @@ - -
    - - - - -
    -
    - -
    - -
    -
    -

    Kirim Pesan

    -
    -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNama">Nomor HP">Nomor HP">Nomor HPIsi Pesan">Dikirim ">Dikirim ">Dikirim 
    -
    -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -
    -
    diff --git a/donjo-app/views/sms/group.php b/donjo-app/views/sms/group.php deleted file mode 100644 index ad475e524..000000000 --- a/donjo-app/views/sms/group.php +++ /dev/null @@ -1,119 +0,0 @@ - -
    - - - - -
    -
    - -
    - -
    -
    -

    Manajemen Group Kontak

    -
    -
    -
    -
    -
    -
    -  Tambah Group -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -
    -
    diff --git a/donjo-app/views/sms/group_detail.php b/donjo-app/views/sms/group_detail.php deleted file mode 100644 index 78d3b74d8..000000000 --- a/donjo-app/views/sms/group_detail.php +++ /dev/null @@ -1,121 +0,0 @@ - -
    - - - - -
    -
    - -
    - -
    -
    -

    Manajemen Anggota Group Kontak -
    -
    - -
    -
    -
    - ');$('#'+'mainform').submit();}"> - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoAksiNama AnggotaJenis KelaminAlamatNo HP
    - - - " class="uibutton tipsy south" title="Hapus Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> - ">
    - -
    -
    -
    -
    -
    -
    " method="post"> - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -

    -
    diff --git a/donjo-app/views/sms/kontak.php b/donjo-app/views/sms/kontak.php deleted file mode 100644 index 8d802e237..000000000 --- a/donjo-app/views/sms/kontak.php +++ /dev/null @@ -1,123 +0,0 @@ - -
    - - - - -
    -
    - -
    - -
    -
    -

    Manajemen Nomer Kontak

    -
    -
    -
    -
    -
    -
    -  Tambah Kontak -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -
    -
    diff --git a/donjo-app/views/sms/manajemen_sms_form.php b/donjo-app/views/sms/manajemen_sms_form.php deleted file mode 100644 index 6e635fd69..000000000 --- a/donjo-app/views/sms/manajemen_sms_form.php +++ /dev/null @@ -1,152 +0,0 @@ - - -
    - - - -
    -
    -

    Info Terbaru

    -
    -

    - If your Windows Vista or 7, has problems running one of our programs, there is a compatibility mode you can easily set per application. To configure this for your application, just locate the installation directory and right click on the .exe, select Properties from the menu. - Select the Compatibility tab and choose what compatibility you would like to run the program in. You can also choose - Run? this program as an administrator. There will be a tutorial coming soon on this subject. -

    -
    -
    -
    -
    -

    Form Manajemen User

    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Group -
    - - - > - > - - > -
    -
    Username
    Password
    Nama
    Nomor HP
    Mail
    Nama Bendahara
    NIP Bendahara
    Nama Pengguna Anggaran
    NIP Pengguna Anggaran
    Foto -
    - - - - - -
    -
    Ganti Foto (Kosongi jika tidak ingin merubah foto)
    -
    - -
    -
    - -
    -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sms/manajemen_sms_table.php b/donjo-app/views/sms/manajemen_sms_table.php deleted file mode 100644 index 334f9817b..000000000 --- a/donjo-app/views/sms/manajemen_sms_table.php +++ /dev/null @@ -1,133 +0,0 @@ - -
    - - - - -
    -
    - -
    - -
    -
    -

    Kotak Masuk

    -
    -
    -
    -
    -
    -
    -  Tulis Pesan Baru -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -
    -
    diff --git a/donjo-app/views/sms/nav.php b/donjo-app/views/sms/nav.php deleted file mode 100644 index aae3668a3..000000000 --- a/donjo-app/views/sms/nav.php +++ /dev/null @@ -1,14 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/sms/pertanyaan.php b/donjo-app/views/sms/pertanyaan.php deleted file mode 100644 index 7ebf57bc0..000000000 --- a/donjo-app/views/sms/pertanyaan.php +++ /dev/null @@ -1,122 +0,0 @@ - -
    - - - - -
    -
    - -
    - -
    -
    -

    Manajemen Anggota Group Kontak -
    -
    - -
    -
    -
    - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoAksiNama AnggotaJenis KelaminAlamatNo HP
    - - - " class="ui-icons icon-remove tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> -
    - -
    -
    -
    -
    -
    -
    " method="post"> - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -

    -
    \ No newline at end of file diff --git a/donjo-app/views/sms/pesan_tertunda.php b/donjo-app/views/sms/pesan_tertunda.php deleted file mode 100644 index 8ae983783..000000000 --- a/donjo-app/views/sms/pesan_tertunda.php +++ /dev/null @@ -1,132 +0,0 @@ - -
    - - - - -
    -
    - -
    - -
    -
    -

    Pesan Tertunda

    -
    -
    -
    -
    -
    -
    -  Tulis Pesan Baru -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -
    -
    diff --git a/donjo-app/views/sms/polling.php b/donjo-app/views/sms/polling.php deleted file mode 100644 index 66923b9ab..000000000 --- a/donjo-app/views/sms/polling.php +++ /dev/null @@ -1,117 +0,0 @@ - -
    - - - - -
    -
    - -
    - -
    -
    -

    Polling SMS

    -
    -
    -
    -
    -
    -
    -  Tambah Polling -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - -
    NoAksiNama PollingKeteranganJumlah Pertanyaan
    - - - " class="ui-icons icon-edit tipsy south" title="Edit Data" target="ajax-modalx" rel="window" header="Edit Data"> - " class="ui-icons icon-remove tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> - " class="ui-icons icon-document-table tipsy south" title="Rincian Anggota"> -
    -
    -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sms/setting.php b/donjo-app/views/sms/setting.php deleted file mode 100644 index b1d305da3..000000000 --- a/donjo-app/views/sms/setting.php +++ /dev/null @@ -1,70 +0,0 @@ - - -
    - - - -
    -
    - -
    - -
    -
    -

    Pengaturan Balas Otomatis

    -
    -
    -
    -
    - - - - -
    Isi Pesan Autoreply
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sosmed/facebook.php b/donjo-app/views/sosmed/facebook.php deleted file mode 100644 index 1d038e68d..000000000 --- a/donjo-app/views/sosmed/facebook.php +++ /dev/null @@ -1,56 +0,0 @@ -
    - - - -
    - - - -
    -
    -
    - - - - - - - - -
    Link Akun Facebook
    Aktif -
    - - > - > -
    -
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sosmed/google.php b/donjo-app/views/sosmed/google.php deleted file mode 100644 index 07762fa37..000000000 --- a/donjo-app/views/sosmed/google.php +++ /dev/null @@ -1,58 +0,0 @@ -
    - - - -
    - - - -
    -

    Pengaturan Google

    -
    -
    -
    -
    - - - - - - - - -
    Link Akun Google
    Aktif -
    - - > - > -
    -
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sosmed/instagram.php b/donjo-app/views/sosmed/instagram.php deleted file mode 100644 index dbe9fce18..000000000 --- a/donjo-app/views/sosmed/instagram.php +++ /dev/null @@ -1,58 +0,0 @@ -
    - - - -
    - - - -
    -

    Pengaturan Google

    -
    -
    -
    -
    - - - - - - - - -
    Link Akun Google
    Aktif -
    - - > - > -
    -
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sosmed/twitter.php b/donjo-app/views/sosmed/twitter.php deleted file mode 100644 index 955f93304..000000000 --- a/donjo-app/views/sosmed/twitter.php +++ /dev/null @@ -1,58 +0,0 @@ -
    - - - -
    - - - -
    -

    Pengaturan Twitter

    -
    -
    -
    -
    - - - - - - - - -
    Link Akun Twitter
    Aktif -
    - - > - > -
    -
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/sosmed/youtube.php b/donjo-app/views/sosmed/youtube.php deleted file mode 100644 index 41460ecc0..000000000 --- a/donjo-app/views/sosmed/youtube.php +++ /dev/null @@ -1,58 +0,0 @@ -
    - - - -
    - - - -
    -

    Pengaturan Youtube

    -
    -
    -
    -
    - - - - - - - - -
    Link Akun Youtube
    Aktif -
    - - > - > -
    -
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/statistik/ajax_rentang_form.php b/donjo-app/views/statistik/ajax_rentang_form.php deleted file mode 100644 index 2facc3448..000000000 --- a/donjo-app/views/statistik/ajax_rentang_form.php +++ /dev/null @@ -1,17 +0,0 @@ - - -
    - - - - - -
    Rentang - -
    -
    - - -
    - -
    \ No newline at end of file diff --git a/donjo-app/views/statistik/laporan/bulanan.php b/donjo-app/views/statistik/laporan/bulanan.php deleted file mode 100644 index d3e8fa7cf..000000000 --- a/donjo-app/views/statistik/laporan/bulanan.php +++ /dev/null @@ -1,230 +0,0 @@ -
    - - - -
    -
    -
    - -
    - - - - - - - - - - - -

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN KELURAHAN

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Kelurahan:
    Kecamatan:
    Tahun:
    Bulan: - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    No.
    PERINCIAN
    - - - - - - - - -
    Warga Negara Indonesia
    Laki-laki
    Perempuan
    -
    - - - - - - - - -
    Orang Asing
    Laki-laki
    Perempuan
    -
    - - - - - - - - - -
    Jumlah
    Laki-laki
    Perempuan
    L + P
    -
    1
    2
    3
    4
    5
    6
    7
    8
    9
    1
    Penduduk awal bulan ini
    2
    Kelahiran bulan ini
    3
    Kematian bulan ini
    4
    Pendatang bulan ini
    5
    Pindah bulan ini
    6
    Penduduk akhir bulan ini
    7
    Penduduk hilang bulan ini
    -

     

    -

     

    -

     

    -

     

    -

     

    -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/statistik/laporan/bulanan_excel.php b/donjo-app/views/statistik/laporan/bulanan_excel.php deleted file mode 100644 index 2fa4bf423..000000000 --- a/donjo-app/views/statistik/laporan/bulanan_excel.php +++ /dev/null @@ -1,196 +0,0 @@ - - - - -Cetak Laporan Bulanan - - - - -
    - -
    - - - - - - - - - - - -

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN KELURAHAN

    -
    - - - - - - - - - - - - - - - - - - - - - -
    Kelurahan:
    Kecamatan:
    Laporan Bulan: tahun
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    No.
    PERINCIAN
    - - - - - - - - -
    Warga Negara Indonesia
    Laki-laki
    Perempuan
    -
    - - - - - - - - -
    Orang Asing
    Laki-laki
    Perempuan
    -
    - - - - - - - - - -
    Jumlah
    Laki-laki
    Perempuan
    L + P
    -
    1
    2
    3
    4
    5
    6
    7
    8
    9
    1
    Penduduk awal bulan ini
    2
    Kelahiran bulan ini
    3
    Kematian bulan ini
    4
    Pendatang bulan ini
    5
    Pindah bulan ini
    6
    Penduduk akhir bulan ini
    7
    Penduduk hilang bulan ini
    -

     

    -

     

    -
    - -
    - diff --git a/donjo-app/views/statistik/laporan/bulanan_print.php b/donjo-app/views/statistik/laporan/bulanan_print.php deleted file mode 100644 index 7c108ceb1..000000000 --- a/donjo-app/views/statistik/laporan/bulanan_print.php +++ /dev/null @@ -1,189 +0,0 @@ - - - -Cetak Laporan Bulanan - - - - -
    - -
    - - - - - - - - - - - -

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN KELURAHAN

    -
    - - - - - - - - - - - - - - - - - - - - - -
    Kelurahan:
    Kecamatan:
    Laporan Bulan: tahun
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    No.
    PERINCIAN
    - - - - - - - - -
    Warga Negara Indonesia
    Laki-laki
    Perempuan
    -
    - - - - - - - - -
    Orang Asing
    Laki-laki
    Perempuan
    -
    - - - - - - - - - -
    Jumlah
    Laki-laki
    Perempuan
    L + P
    -
    1
    2
    3
    4
    5
    6
    7
    8
    9
    1
    Penduduk awal bulan ini
    2
    Kelahiran bulan ini
    3
    Kematian bulan ini
    4
    Pendatang bulan ini
    5
    Pindah bulan ini
    6
    Penduduk akhir bulan ini
    7
    Penduduk hilang bulan ini
    -

     

    -

     

    -
    - -
    - diff --git a/donjo-app/views/statistik/laporan/kelompok.php b/donjo-app/views/statistik/laporan/kelompok.php deleted file mode 100644 index 73f61590d..000000000 --- a/donjo-app/views/statistik/laporan/kelompok.php +++ /dev/null @@ -1,167 +0,0 @@ -
    - - - -
    -
    -
    - -
    - - - - - - - - - - - - - -

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN KELURAHAN

    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Kelurahan:
    Kecamatan:
    Laporan Bulan:
    Dusun: - -
    - - - -

    DATA PILAH DUSUN

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    RW
    RT
    - - - - - - - - -
    KK
    L
    P
    -
    - - - - - - - - - - - - -
    Kondisi dan kelompok umur
    Bayi(<1thn)
    Balita(1-5thn)
    SD(6-12thn)
    SMP(13-15thn)
    SMA(16-18thn)
    Lansia(>60)
    -
    - - - - - - - - -
    Difabel
    Fisik
    Mental
    -
    - - - - - - - - -
    Sakit Menahun
    L
    P
    -
    Hamil
    -

     

    -

     

    -

     

    -
    -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/statistik/laporan/kelompok_excel.php b/donjo-app/views/statistik/laporan/kelompok_excel.php deleted file mode 100644 index c2665b580..000000000 --- a/donjo-app/views/statistik/laporan/kelompok_excel.php +++ /dev/null @@ -1,147 +0,0 @@ - - - - -Cetak Laporan Kelompok Rentan - - - - -
    - -
    - - - - - - - - - - - -

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN KELURAHAN

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Kelurahan:
    Kecamatan:
    Laporan Bulan:
    Dusun: - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    RW
    RT
    - - - - - - - - -
    KK
    L
    P
    -
    - - - - - - - - - - - - -
    Kondisi dan kelompok umur
    Bayi(<1thn)
    Balita(1-5thn)
    SD(6-12thn)
    SMP(13-15thn)
    SMA(16-18thn)
    Lansia(>60)
    -
    - - - - - - - - -
    Difabel
    Fisik
    Mental
    -
    - - - - - - - - -
    Sakit Menahun
    L
    P
    -
    Hamil
    -

     

    -

     

    -

     

    -
    -
    - - - diff --git a/donjo-app/views/statistik/laporan/kelompok_print.php b/donjo-app/views/statistik/laporan/kelompok_print.php deleted file mode 100644 index 4c31739fd..000000000 --- a/donjo-app/views/statistik/laporan/kelompok_print.php +++ /dev/null @@ -1,141 +0,0 @@ - - - -Cetak Laporan Kelompok Rentan - - - - -
    - -
    - - - - - - - - - - - -

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN KELURAHAN

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Kelurahan:
    Kecamatan:
    Laporan Bulan:
    Dusun: - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    RW
    RT
    - - - - - - - - -
    KK
    L
    P
    -
    - - - - - - - - - - - - -
    Kondisi dan kelompok umur
    Bayi(<1thn)
    Balita(1-5thn)
    SD(6-12thn)
    SMP(13-15thn)
    SMA(16-18thn)
    Lansia(>60)
    -
    - - - - - - - - -
    Difabel
    Fisik
    Mental
    -
    - - - - - - - - -
    Sakit Menahun
    L
    P
    -
    Hamil
    -

     

    -

     

    -

     

    -
    -
    - - - diff --git a/donjo-app/views/statistik/laporan/keluarga.php b/donjo-app/views/statistik/laporan/keluarga.php deleted file mode 100644 index 07e2edf59..000000000 --- a/donjo-app/views/statistik/laporan/keluarga.php +++ /dev/null @@ -1,163 +0,0 @@ -
    - - - - -
    -
    Laporan : - -
    -
    Statistik Keluarga Berdasarkan : - -
    - -
    Statistik Penduduk Berdasarkan : - -
    -
    Statistik Keluarga Berdasarkan : - -
    - -
    -
    -

    Laporan

    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - -
    NoNamaJumlah KK
    -
    -
    -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/statistik/laporan/pendidikan.php b/donjo-app/views/statistik/laporan/pendidikan.php deleted file mode 100644 index 7cd9738a8..000000000 --- a/donjo-app/views/statistik/laporan/pendidikan.php +++ /dev/null @@ -1,102 +0,0 @@ -
    -

    Wilayah administratif

    -
    -
    -
    -
    -
    -
    -  Tambah Pengurus -
    -
    -
    -
    -
    -
    -
    -
    - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoAksiNamaJabatabN.I.PNo. TeleponAlamat
    - - - - - " class="ui-icons icon-edit tipsy south" title="Edit Data">" class="ui-icons icon-remove tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> - -
    -
    -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/statistik/laporan/penduduk.php b/donjo-app/views/statistik/laporan/penduduk.php deleted file mode 100644 index 6a401abdc..000000000 --- a/donjo-app/views/statistik/laporan/penduduk.php +++ /dev/null @@ -1,111 +0,0 @@ -
    - - - - -
    -
    Laporan : - -
    - - -
    -
    -

    Laporan

    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - -
    NoStatistikJumlahLaki-lakiPerempuan
    -
    -
    -
    -
    -
    -
    " method="post"> - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/statistik/laporan/penduduk_tetap.php b/donjo-app/views/statistik/laporan/penduduk_tetap.php deleted file mode 100644 index cfcb8d869..000000000 --- a/donjo-app/views/statistik/laporan/penduduk_tetap.php +++ /dev/null @@ -1,158 +0,0 @@ -
    - - - - -
    -
    Laporan : - -
    - -
    Penduduk Kelurahan - -
    - - -
    -
    -

    Manajemen Penduduk

    -
    -
    -
    -
    -
    -
    -  Tambah Data -
    -
    -
    -
    -
    -
    - - - " class="uibutton tipsy south" title="Clear Pencarian"> Clear -
    -
    - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoAksi">NIK">NIK">NIK">Nama ">Nama ">Nama No. KKAlamatPendidikanUmurPekerjaanStatus PerkawinanStatus Penduduk
    - - -" class="ui-icons icon-edit tipsy south" title="Edit Data">" target="ajax-modalz" rel="window" header="Lokasi " class="ui-icons icon-maps tipsy south" title="Lokasi ">" class="ui-icons icon-remove tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> -" id="test" name="">">">
    -
    -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - -start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
    - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/statistik/laporan/perubahan.php b/donjo-app/views/statistik/laporan/perubahan.php deleted file mode 100644 index 854d51dd5..000000000 --- a/donjo-app/views/statistik/laporan/perubahan.php +++ /dev/null @@ -1,199 +0,0 @@ -
    - - - - -
    -
    Laporan : - -
    - -
    -
    -
    - -
    - - - - - - - - - -

    PEMERINTAH KABUPATEN/KOTA

    LAPORAN PERUBAHAN PENDUDUK

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Kelurahan:
    Kecamatan:
    Kabupaten:
    Laporan Bulan:
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NO
    DUSUN
    PENDUDUK AKHIR BULAN LALU
    PERUBAHAN PENDUDUK
    PENDUDUK AKHIR BULAN INI
    KELAHIRAN
    DATANG
    PERGI
    KEMATIAN
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    Total
    -

     

    -

     

    -

     

    -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/statistik/laporan/perubahan_print.php b/donjo-app/views/statistik/laporan/perubahan_print.php deleted file mode 100644 index f779dec9b..000000000 --- a/donjo-app/views/statistik/laporan/perubahan_print.php +++ /dev/null @@ -1,169 +0,0 @@ - - - -Cetak Laporan Perubahan Penduduk - - - - -
    - -
    - - - - - - - - -

    PEMERINTAH KABUPATEN/KOTA

    LAPORAN PERUBAHAN PENDUDUK

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Kelurahan:
    Kecamatan:
    Kabupaten:
    Laporan Bulan:
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NO
    DUSUN
    PENDUDUK AKHIR BULAN LALU
    PERUBAHAN PENDUDUK
    PENDUDUK AKHIR BULAN INI
    KELAHIRAN
    DATANG
    PERGI
    KEMATIAN
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    Total
    -

     

    -

     

    -

     

    -
    - - - diff --git a/donjo-app/views/statistik/menu.php b/donjo-app/views/statistik/menu.php deleted file mode 100644 index 18000e52a..000000000 --- a/donjo-app/views/statistik/menu.php +++ /dev/null @@ -1,48 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/statistik/nav.php b/donjo-app/views/statistik/nav.php deleted file mode 100644 index a9640839d..000000000 --- a/donjo-app/views/statistik/nav.php +++ /dev/null @@ -1,13 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/statistik/penduduk.php b/donjo-app/views/statistik/penduduk.php deleted file mode 100644 index a18f20677..000000000 --- a/donjo-app/views/statistik/penduduk.php +++ /dev/null @@ -1,156 +0,0 @@ - diff --git a/donjo-app/views/statistik/penduduk_excel.php b/donjo-app/views/statistik/penduduk_excel.php deleted file mode 100644 index fc8baddc9..000000000 --- a/donjo-app/views/statistik/penduduk_excel.php +++ /dev/null @@ -1,58 +0,0 @@ - - - - -Laporan Data Statistik Kependudukan menurut - - - - -
    - -
    - - - - - -
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    NoKategori KelompokJumlahLaki-lakiPerempuan
    - - -
    - - -
    -
    - -
    - diff --git a/donjo-app/views/statistik/penduduk_graph.php b/donjo-app/views/statistik/penduduk_graph.php deleted file mode 100644 index abfbf9236..000000000 --- a/donjo-app/views/statistik/penduduk_graph.php +++ /dev/null @@ -1,168 +0,0 @@ -
    - - - - - -
    - Statistik Penduduk - - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoKategori KelompokJumlahLaki-lakiPerempuan
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/statistik/penduduk_pie.php b/donjo-app/views/statistik/penduduk_pie.php deleted file mode 100644 index a236f485e..000000000 --- a/donjo-app/views/statistik/penduduk_pie.php +++ /dev/null @@ -1,143 +0,0 @@ -
    - - - - -
    - Statistik Penduduk - - - - - - - -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoKategori KelompokJumlahLaki-lakiPerempuan
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/statistik/penduduk_print.php b/donjo-app/views/statistik/penduduk_print.php deleted file mode 100644 index 818e5b872..000000000 --- a/donjo-app/views/statistik/penduduk_print.php +++ /dev/null @@ -1,134 +0,0 @@ - - - -Laporan Statistik - - - - -
    - -
    - - - - - - - -
    - -

    PEMERINTAH KABUPATEN

    -

    -

    KECAMATAN

    -

    DESA

    -

    LAPORAN DATA STATISTIK KEPENDUDUKAN MENURUT

    -
    -
    - - - -
    - - - - - -
    -
    - - - -
    -
    - - - -
    -
    - - - - -
    -
    - - : -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoStatistikJumlahLaki-lakiPerempuan
    -
    - - - - -
    -
    - - - -
    -
    -
    - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - -
    -
    - - - - -
    -
    - -
    - diff --git a/donjo-app/views/statistik/rentang_umur.php b/donjo-app/views/statistik/rentang_umur.php deleted file mode 100644 index f516fe3a1..000000000 --- a/donjo-app/views/statistik/rentang_umur.php +++ /dev/null @@ -1,65 +0,0 @@ - - diff --git a/donjo-app/views/surat/form/surat_bio_penduduk.php b/donjo-app/views/surat/form/surat_bio_penduduk.php deleted file mode 100644 index 7c2f62b99..000000000 --- a/donjo-app/views/surat/form/surat_bio_penduduk.php +++ /dev/null @@ -1,171 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Biodata Penduduk

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    DATA PRIBADI :
    Alamat Sebelumnya
    No Paspor
    Tanggal Berakhir Paspor
    Akte Kelahiran
    No Akte Kelahiran
    Akte Perkawinan /Buku Nikah
    No Akte Perkawinan /Buku Nikah
    Tanggal Akte Perkawinan /Buku Nikah
    Akte Perceraian
    Tanggal Perceraian
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_izin_keramaian.php b/donjo-app/views/surat/form/surat_izin_keramaian.php deleted file mode 100644 index 6f053cbc5..000000000 --- a/donjo-app/views/surat/form/surat_izin_keramaian.php +++ /dev/null @@ -1,146 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Pengantar Izin Keramaian

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Jenis Acara - -
    Keperluan - -
    Berlaku - sampai -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_izin_orangtua.php b/donjo-app/views/surat/form/surat_izin_orangtua.php deleted file mode 100644 index 2383b6505..000000000 --- a/donjo-app/views/surat/form/surat_izin_orangtua.php +++ /dev/null @@ -1,164 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Izin Orang Tua

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    DATA PASANGAN :
    Nama Lengkap - -
    Tempat Tanggal Lahir - - -
    Warganegara - -
    Agama - -
    Pekerjaan - -
    Tempat Tinggal - -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_jalan.php b/donjo-app/views/surat/form/surat_jalan.php deleted file mode 100644 index 3e3b0f010..000000000 --- a/donjo-app/views/surat/form/surat_jalan.php +++ /dev/null @@ -1,140 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Bepergian / Jalan

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Keterangan - -
    Berlaku - sampai -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_kehendak_nikah.php b/donjo-app/views/surat/form/surat_kehendak_nikah.php deleted file mode 100644 index e4ffab0d7..000000000 --- a/donjo-app/views/surat/form/surat_kehendak_nikah.php +++ /dev/null @@ -1,190 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Pemberitahuan Kehendak Nikah

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama yang Melapor -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Calon Mempelai Pria
    Calon Mempelai Wanita
    Hari, Tanggal, Jam, - , -
    Mas Kawin
    Tunai / Hutang
    Tempat
    Jumlah Lampiran
    Lampiran 1
    Lampiran 2
    Lampiran 3
    Lampiran 4
    Lampiran 5
    Lampiran 6
    Lampiran 7
    Lampiran 8
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_asalusul.php b/donjo-app/views/surat/form/surat_ket_asalusul.php deleted file mode 100644 index ee7204117..000000000 --- a/donjo-app/views/surat/form/surat_ket_asalusul.php +++ /dev/null @@ -1,186 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Keterangan Asal Usul

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    DATA AYAH (Isi jika ayah bukan warga desa ini)
    Nama
    Tempat Tanggal Lahir -
    Warganegara
    Agama
    Pekerjaan
    Tempat Tinggal
    DATA IBU (Isi jika ibu bukan warga desa ini)
    Nama
    Tempat Tanggal Lahir -
    Warganegara
    Agama
    Pekerjaan
    Tempat Tinggal
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_beda_nama.php b/donjo-app/views/surat/form/surat_ket_beda_nama.php deleted file mode 100644 index 3aefb9e02..000000000 --- a/donjo-app/views/surat/form/surat_ket_beda_nama.php +++ /dev/null @@ -1,172 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Keterangan Beda Identitas

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    IDENTITAS KEDUA
    Identitas dalam (nama kartu)
    Nomor identitas
    Nama
    Tempat Tanggal Lahir -
    Jenis Kelamin
    Alamat
    Agama
    Pekerjaan
    Keterangan
    Perbedaan
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_catatan_kriminal.php b/donjo-app/views/surat/form/surat_ket_catatan_kriminal.php deleted file mode 100644 index 3f5a56e11..000000000 --- a/donjo-app/views/surat/form/surat_ket_catatan_kriminal.php +++ /dev/null @@ -1,137 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Formulir Layanan: Surat Pengantar SKCK

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Keterangan - -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    -
    - -
    -
    -
    - - - - - -
    -
    -
    - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_domisili_usaha.php b/donjo-app/views/surat/form/surat_ket_domisili_usaha.php deleted file mode 100644 index 8bdd49f3c..000000000 --- a/donjo-app/views/surat/form/surat_ket_domisili_usaha.php +++ /dev/null @@ -1,140 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Keterangan Domisili Usaha

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Nama/ Jenis Usaha - -
    Keterangan - -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_jual_beli.php b/donjo-app/views/surat/form/surat_ket_jual_beli.php deleted file mode 100644 index e7b39ef6b..000000000 --- a/donjo-app/views/surat/form/surat_ket_jual_beli.php +++ /dev/null @@ -1,171 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Keterangan Jual Beli

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    BARANG JUAL BELI
    Jenis Barang
    Rincian Barang
    IDENTITAS PEMBELI
    Nomor identitas
    Nama
    Tempat Tanggal Lahir -
    Jenis Kelamin
    Alamat
    Pekerjaan
    Nama ketua adat
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_kehilangan.php b/donjo-app/views/surat/form/surat_ket_kehilangan.php deleted file mode 100644 index 2423127ba..000000000 --- a/donjo-app/views/surat/form/surat_ket_kehilangan.php +++ /dev/null @@ -1,146 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Pengantar Keterangan Kehilangan

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Barang yang hilang - -
    Rincian - -
    Keterangan kejadian - -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_kelahiran.php b/donjo-app/views/surat/form/surat_ket_kelahiran.php deleted file mode 100644 index 6676e4c17..000000000 --- a/donjo-app/views/surat/form/surat_ket_kelahiran.php +++ /dev/null @@ -1,173 +0,0 @@ - - -
    -
    -
    -

    Surat Keterangan Kelahiran

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama Ibu -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat
    DATA KELAHIRAN :
    Hari/ Tanggal/ Jam / - / -
    Tempat kelahiran -
    Nama Bayi
    Jenis Kelamin Bayi
    DATA PELAPOR :
    Nama
    NIK
    Umur tahun
    Pekerjaan
    Alamat
    Hubungan Pelapor dengan Bayi
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    -
    - -
    -
    -
    - - - - -
    -
    -
    - -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_kematian.php b/donjo-app/views/surat/form/surat_ket_kematian.php deleted file mode 100644 index 6940b291f..000000000 --- a/donjo-app/views/surat/form/surat_ket_kematian.php +++ /dev/null @@ -1,177 +0,0 @@ - - -
    - - - -
    -
    -Surat Administrasi - -
    - -
    -
    -
    -
    -
    -

    Surat Keterangan Kematian

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama yang Meninggal -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat
    Hari/ Tanggal/ Jam/ - / -
    Tempat Meninggal
    Penyebab Kematian
    DATA PELAPOR
    Nama
    NIK
    Tanggal Lahir
    Pekerjaan
    Alamat
    Hubungan dengan yang mati
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    -
    - -
    -
    -
    - - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_kematian_suami_istri.php b/donjo-app/views/surat/form/surat_ket_kematian_suami_istri.php deleted file mode 100644 index 2703568d1..000000000 --- a/donjo-app/views/surat/form/surat_ket_kematian_suami_istri.php +++ /dev/null @@ -1,167 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Keterangan Kematian Suami/Istri

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama []
    Nomor Surat - -
    DATA ORANG MENINGGAL :
    Nama
    Bin/ Binti
    Tempat Tanggal Lahir -
    Warganegara
    Agama
    Pekerjaan
    Tempat Tinggal
    Tanggal Meninggal
    Tempat Meninggal
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_ktp_dlm_proses.php b/donjo-app/views/surat/form/surat_ket_ktp_dlm_proses.php deleted file mode 100644 index b5154b1b8..000000000 --- a/donjo-app/views/surat/form/surat_ket_ktp_dlm_proses.php +++ /dev/null @@ -1,129 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Keterangan KTP dalam Proses

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_kurang_mampu.php b/donjo-app/views/surat/form/surat_ket_kurang_mampu.php deleted file mode 100644 index 82ba39c7c..000000000 --- a/donjo-app/views/surat/form/surat_ket_kurang_mampu.php +++ /dev/null @@ -1,134 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Keterangan Kurang Mampu

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Keterangan - -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_lahir_mati.php b/donjo-app/views/surat/form/surat_ket_lahir_mati.php deleted file mode 100644 index f5b9bdcb5..000000000 --- a/donjo-app/views/surat/form/surat_ket_lahir_mati.php +++ /dev/null @@ -1,161 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Keterangan Lahir Mati

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Hari, Tanggal Mati -, - -
    Tempat Mati - -
    Lama di Kandungan - bulan -
    Pelapor - -
    Hubungan dengan yang Lahir Mati - -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_nikah.php b/donjo-app/views/surat/form/surat_ket_nikah.php deleted file mode 100644 index ccc0812c4..000000000 --- a/donjo-app/views/surat/form/surat_ket_nikah.php +++ /dev/null @@ -1,170 +0,0 @@ - - -
    - - - -
    -
    -Surat Administrasi - -
    -
    -
    -
    -
    -
    -

    Surat Keterangan Untuk Nikah

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Keterangan - -
    Bin/Binti - -
    Jika pria, terangkan jejaka, duda atau beristri dan berapa istrinya - -
    Jika wanita, terangkan gadis atau janda - -
    Nama Istri/Suami terdahulu - -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_orangtua.php b/donjo-app/views/surat/form/surat_ket_orangtua.php deleted file mode 100644 index fa8b59069..000000000 --- a/donjo-app/views/surat/form/surat_ket_orangtua.php +++ /dev/null @@ -1,200 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Keterangan Tentang Orang Tua

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    DATA AYAH :
    Nama Lengkap - -
    Tempat Tanggal Lahir - - -
    Warganegara - -
    Agama - -
    Pekerjaan - -
    Tempat Tinggal - -
    DATA IBU :
    Nama Lengkap - -
    Tempat Tanggal Lahir - - -
    Warganegara - -
    Agama - -
    Pekerjaan - -
    Tempat Tinggal - -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_penduduk.php b/donjo-app/views/surat/form/surat_ket_penduduk.php deleted file mode 100644 index 65ca1bf2e..000000000 --- a/donjo-app/views/surat/form/surat_ket_penduduk.php +++ /dev/null @@ -1,139 +0,0 @@ - - -
    - - - -
    -
    -
    -

    Surat Keterangan

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Keterangan - -
    Berlaku - sampai -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_pengantar.php b/donjo-app/views/surat/form/surat_ket_pengantar.php deleted file mode 100644 index 67324b40b..000000000 --- a/donjo-app/views/surat/form/surat_ket_pengantar.php +++ /dev/null @@ -1,135 +0,0 @@ - - -
    -
    -
    -

    Formulir Layanan: Surat Keterangan

    -
    -
    - - - - - -
    NIK / Nama -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat
    Pendidikan
    Warganegara / Agama / -
    Dokumen Kelengkapan / Syarat - " class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama []
    Nomor Surat
    Keperluan
    Tujuan
    Keterangan
    Berlaku sampai
    Staf Pemerintah Desa
    Sebagai
    -
    -
    -
    -
    - -
    -
    -
    - - - -
    -
    -
    - -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_pindah_penduduk.php b/donjo-app/views/surat/form/surat_ket_pindah_penduduk.php deleted file mode 100644 index 802517fb0..000000000 --- a/donjo-app/views/surat/form/surat_ket_pindah_penduduk.php +++ /dev/null @@ -1,243 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Keterangan Pindah Penduduk

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Alasan Pindah - -
    Jumlah Pengikut - -
    Pengikut -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNIKNamaJKUmurStatus KawinPendidikan
    - -
    -
    -
    Pindah Ke
    RW - -
    RT - -
    Kampung - -
    Kelurahan - -
    Kecamatan - -
    kabupaten - -
    provinsi - -
    Berlaku - -
    Keterangan - -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    -
    - -
    -
    -
    - - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_ket_usaha.php b/donjo-app/views/surat/form/surat_ket_usaha.php deleted file mode 100644 index 53e7974e1..000000000 --- a/donjo-app/views/surat/form/surat_ket_usaha.php +++ /dev/null @@ -1,146 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Keterangan Usaha

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Nama/ Jenis Usaha - -
    Keterangan - -
    Berlaku - sampai -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_keterangan_rahasia.php b/donjo-app/views/surat/form/surat_keterangan_rahasia.php deleted file mode 100644 index 42d7432b6..000000000 --- a/donjo-app/views/surat/form/surat_keterangan_rahasia.php +++ /dev/null @@ -1,216 +0,0 @@ - - -
    - - - - -
    -
    -
    -

    Formulir Layanan : Surat Keterangan Rahasia

    -
    -
    - - - - - -
    NIK / Nama -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat
    Pendidikan
    Warganegara / Agama /
    Data Keluarga / KK - Tampilkan - Sembunyikan -
    Keluarga -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNIKNamaJKHubunganUmurStatus KawinPendidikan
    - -
    -
    -
    Dokumen Kelengkapan / Syarat - " class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama []
    Nomor Surat
    Keperluan - -
    Tujuan - -
    Keterangan - -
    Berlaku sampai
    Staf/ Jabatan Pemerintah Desa -
    Sebagai -
    -
    -
    -
    -
    - -
    -
    -
    - - - - -
    -
    -
    - -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_lap_kehilangan.php b/donjo-app/views/surat/form/surat_lap_kehilangan.php deleted file mode 100644 index f8b9cd937..000000000 --- a/donjo-app/views/surat/form/surat_lap_kehilangan.php +++ /dev/null @@ -1,152 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Pengantar Keterangan Kehilangan

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Hari - -
    Tanggal - -
    Tempat - -
    Barang yang hilang - -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_permohonan_akta.php b/donjo-app/views/surat/form/surat_permohonan_akta.php deleted file mode 100644 index 8fa593663..000000000 --- a/donjo-app/views/surat/form/surat_permohonan_akta.php +++ /dev/null @@ -1,165 +0,0 @@ - - -
    - - - -
    -
    -Surat Administrasi - -
    - -
    -
    -
    -
    -
    -

    Surat Permohonan Akte Lahir

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama kepala Keluarga -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat
    Nama Anak
    Tempat Tanggal lahir -
    Hari Lahir
    Alamat
    Nama Ayah
    Nama Ibu
    Alamat
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_permohonan_duplikat_kelahiran.php b/donjo-app/views/surat/form/surat_permohonan_duplikat_kelahiran.php deleted file mode 100644 index c2993dbc7..000000000 --- a/donjo-app/views/surat/form/surat_permohonan_duplikat_kelahiran.php +++ /dev/null @@ -1,168 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Pengantar Permohonan Duplikat Kelahiran

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Hari lahir, Pukul -
    Tempat Lahir
    DATA PELAPOR :
    Nama
    NIK
    Jenis Kelamin
    Tempat Lahir
    Tanggal lahir
    Pekerjaan
    Alamat
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_pernyataan_akta.php b/donjo-app/views/surat/form/surat_pernyataan_akta.php deleted file mode 100644 index 62a04f361..000000000 --- a/donjo-app/views/surat/form/surat_pernyataan_akta.php +++ /dev/null @@ -1,155 +0,0 @@ - - -
    - - - -
    -
    -Surat Administrasi - -
    -
    -
    -
    -
    -
    -

    Surat Pernyataan Belum Memiliki Akte Lahir

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama Ayah -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat
    DATA KELAHIRAN
    Nama
    Tempat Tanggal Lahir -
    Jenis Kelamin
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_persetujuan_mempelai.php b/donjo-app/views/surat/form/surat_persetujuan_mempelai.php deleted file mode 100644 index 23447a41c..000000000 --- a/donjo-app/views/surat/form/surat_persetujuan_mempelai.php +++ /dev/null @@ -1,165 +0,0 @@ - - -
    - - - -
    -
    -Surat Administrasi - -
    -
    -
    -
    -
    -
    -

    Surat Persetujuan Mempelai

    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Nomor Surat
    DATA SUAMI (Berasal dari desa) :
    Nama Suami - -*) Diisi jika suami berasal dari dalam desa
    DATA SUAMI (Berasal dari luar desa) :
    Nama Lengkap*) Diisi jika suami berasal dari luar desa
    Bin
    Tempat Tanggal Lahir -
    Warganegara
    Agama
    Pekerjaan
    Tempat Tinggal
    DATA ISTRI (Berasal dari desa) :
    Nama Istri - -*) Diisi jika istri berasal dari dalam desa
    DATA ISTRI (Berasal dari luar desa) :
    Nama Lengkap*) Diisi jika istri berasal dari luar desa
    Bin
    Tempat Tanggal Lahir -
    Warganegara
    Agama
    Pekerjaan
    Tempat Tinggal
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/form/surat_pindah_antar_kab_prov.php b/donjo-app/views/surat/form/surat_pindah_antar_kab_prov.php deleted file mode 100644 index fb9e07c28..000000000 --- a/donjo-app/views/surat/form/surat_pindah_antar_kab_prov.php +++ /dev/null @@ -1,140 +0,0 @@ - - -
    - - -
    -
    -
    -
    -
    -

    Surat Pengantar Pindah Antar Kabupaten/Kota atau Provinsi

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat Tanggal Lahir (Umur) - ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    Dokumen Kelengkapan / Syarat -" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] -
    Nomor Surat - -
    Alamat Tujuan Pindah - -
    Jumlah Keluarga yang Pindah - orang -
    Staf Pemerintah Desa - -
    Sebagai - -
    -
    - -
    - -
    -
    - - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/format_surat.php b/donjo-app/views/surat/format_surat.php deleted file mode 100644 index 7c01cdc44..000000000 --- a/donjo-app/views/surat/format_surat.php +++ /dev/null @@ -1,64 +0,0 @@ - -
    -
    -
    -
    -
    -
    -

    Menu Cepat Pencarian / Cetak Layanan Surat

    -
    -
    -
    - -
    -
    -

    -
    -

    Layanan Surat Administrasi Kependudukan

    -
    -
    -
    -

    Jenis-jenis surat dapat diubah, ditambah, atau dikurangi dengan menggunakan fungsi pengaturan di Menu Master Surat.

    - - - - - - -
    -
    -
    -
    -
    -
    - - - - - - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/nav.php b/donjo-app/views/surat/nav.php deleted file mode 100644 index 37eec2ead..000000000 --- a/donjo-app/views/surat/nav.php +++ /dev/null @@ -1,16 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/surat/panduan.php b/donjo-app/views/surat/panduan.php deleted file mode 100644 index 96ca9e09a..000000000 --- a/donjo-app/views/surat/panduan.php +++ /dev/null @@ -1,12 +0,0 @@ -
    -
    -
    -

    Panduan Pembuatan Surat Administrasi Kependudukan

    -
    -
    -
    - load->view('surat/signature.php');?> -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_bio_penduduk.php b/donjo-app/views/surat/print/print_surat_bio_penduduk.php deleted file mode 100644 index 1bfa5f997..000000000 --- a/donjo-app/views/surat/print/print_surat_bio_penduduk.php +++ /dev/null @@ -1,113 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -
    -
    -

    BIODATA PENDUDUK

    -

    Nomor :

    -
    -
    -
    - - - - - -
    I. DATA KELUARGA
    Nama Kepala Keluarga:
    Nomor Kartu Keluarga:
    Alamat Keluarga:RT. , RW. , Dusun , Desa , Kec. , Kab.
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    II. DATA INDIVIDU
    Nama Lengkap:
    NIK:
    Alamat Sebelumnya:
    Nomor Paspor:
    Tanggal Berakhir Paspor:
    Jenis Kelamin:
    Tempat Lahir:
    Tanggal Lahir:
    Akte Kelahiran /Surat Kelahiran:
    No Akte Kelahiran:
    Golongan Darah:
    Agama:
    Status:
    Akte Perkawinan /Buku Nikah:
    No Akte /Buku Nikah:
    Tgl. Akte /Buku Nikah:
    Akte Perceraian:
    Tanggal Perceraian:
    Status Hubungan dalam Keluarga:
    Kelainan Fisik / Mental: /
    Pendidikan Terakhir:
    Pekerjaan:
    -
    - - - - - - - -
    III. DATA ORANG TUA
    Nama Ibu:
    NIK Ibu:
    Nama Ayah:
    NIK Ayah:
    - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_izin_keramaian.php b/donjo-app/views/surat/print/print_surat_izin_keramaian.php deleted file mode 100644 index 7b216720d..000000000 --- a/donjo-app/views/surat/print/print_surat_izin_keramaian.php +++ /dev/null @@ -1,96 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT PENGANTAR IZIN KERAMAIAN

    -

    Nomor :

    -
    -
    - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    -
    - - - - - - - - - - - - - -
    Nama Lengkap:
    NIK/ No. KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pekerjaan:
    Pendidikan:
    Kewarganegaraan :
    Keterangan :Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam -No. KK: dengan NIK: , kepala keluarga : .
    Keperluan : Sebagai pengantar untuk mendapatkan Surat Izin Keramaian berupa mulai tanggal sampai dengan dengan keperluan .
    - - - - - - - - - - - -
    Demikian surat keterangan ini kami buat untuk dapat dipergunakan sebagaimana mestinya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    Pemegang Surat
    ( )( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_izin_orangtua.php b/donjo-app/views/surat/print/print_surat_izin_orangtua.php deleted file mode 100644 index f7f2fa034..000000000 --- a/donjo-app/views/surat/print/print_surat_izin_orangtua.php +++ /dev/null @@ -1,124 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN IZIN ORANG TUA

    -

    No:

    -
    -
    - - - - - -
    Yang bertanda tangan dibawah ini:
    -
    - - - - - - - - - - - - - - -
    Nama Lengkap:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    Nama Lengkap:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    - - - - - - -
    Adalah ayah kandung dan ibu kandung dari
    - - - - - - - -
    Nama Lengkap:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    - - - - - - -
    Memberikan izin kepadanya untuk melakukan pernikahan dengan:
    - - - - - - - -
    Nama Lengkap:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    - - - - - - - - - -
    Demikianlah surat izin ini dibuat dengan kesadaran tanpa ada paksaan dari siapapun juga dan dipergunakan seperlunya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    I. AyahII. Ibu
    ( )( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_jalan.php b/donjo-app/views/surat/print/print_surat_jalan.php deleted file mode 100644 index 2eef09e62..000000000 --- a/donjo-app/views/surat/print/print_surat_jalan.php +++ /dev/null @@ -1,95 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN BEPERGIAN

    -

    Nomor :

    - -
    - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    - - - - - - - - - - - - - - -
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Keterangan :Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam -No. KK: dengan NIK: , kepala keluarga : .
    Keperluan :
    Berlaku mulai : sampai dengan
    - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_kehendak_nikah.php b/donjo-app/views/surat/print/print_surat_kehendak_nikah.php deleted file mode 100644 index 8efce8b3d..000000000 --- a/donjo-app/views/surat/print/print_surat_kehendak_nikah.php +++ /dev/null @@ -1,120 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -
    - - - - - - - - - -
    Lampiran: lembar ,
    Perihal:Pemberitahuan Kehendak Nikah
    - - - - - - - - - - - - - -
    Kepada Yth.
    Kepala KUA / Penghulu Kecamatan
    - - - - - - - - - - - -
    - - - - - - - - - - - - - - - -
    Assalamualaikum Wr. Wb.
    Dengan ini kami memberitahukan bahwa akan dilangsungkan pernikahan antara dengan pada hari , tanggal jam dengan maskawin berupa dibayar bertempat di
    Bersama ini kami lampirkan surat-surat yang diperlukan untuk diperiksa, sebagai berikut :
    Kami mohon pernikahan tersebut dapat dihadiri/ diawasi dan dicatat oleh Bapak Penghulu sesuai dengan ketentuan perundang-undangan yang berlaku.
    Wassalamualaikum Wr. Wb.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Diterima Tanggal : ________________
    Yang menerimaYang memberitahukan
    Kepala KUA/ Penghulu *)Calon mempelai / Wali/ Wakil Wali *)
    __________________________( )
    *) coret yang tidak perlu
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_asalusul.php b/donjo-app/views/surat/print/print_surat_ket_asalusul.php deleted file mode 100644 index 177bf9676..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_asalusul.php +++ /dev/null @@ -1,142 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN ASAL - USUL

    -

    No:

    -
    -
    - - - - - -
    Yang bertanda tangan dibawah ini menerangkan dengan sesungguhnya bahwa:
    -
    - - - - - - - -
    Nama Lengkap:
    Tempat dan Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    - - - - - - -
    adalah benar anak kandung dari pernikahan seorang pria:
    - - - - - - - - -
    Nama Lengkap:
    Tempat/Tgl. Lahir: ,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    - - - - - - - - -
    Nama Lengkap:
    Tempat/Tgl. Lahir: ,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    - - - - - - - -
    dengan seorang wanita:
    - - - - - - - - -
    Nama Lengkap:
    Tempat dan Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RW. , RT. , Dusun , Kel. , Kec. , Kab.
    - - - - - - - - -
    Nama Lengkap:
    Tempat dan Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    - - - - - - - - - - - - - -
    Demikianlah, surat keterangan ini dibuat dengan mengingat sumpah jabatan dan untuk dipergunakan seperlunya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_beda_nama.php b/donjo-app/views/surat/print/print_surat_ket_beda_nama.php deleted file mode 100644 index 1b3ac2dbe..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_beda_nama.php +++ /dev/null @@ -1,103 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN BEDA IDENTITAS

    -

    Nomor :

    -
    -
    - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    -
    - - - - - - - - - - - - - - - - - - - - - -
    I. Identitas dalam KK
    Nama Lengkap:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RW. , RT. , Dusun , Desa , Kec. , Kab.
    Agama:
    Pekerjaan:
    II. Identitas dalam
    No Identitas:
    Nama:
    Tempat dan Tanggal Lahir:
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:
    Agama:
    Pekerjaan:
    Keterangan:
    - - - - - - - - - - - -
    Adalah benar-benar warga Desa dan merupakan orang yang sama namun terdapat perbedaan seperti tersebut di atas. Adapun data yang benar dan dipakai seperti yang tercantum di Kartu Keluarga (KK).
    Demikian surat keterangan ini dibuat dengan sesungguhnya agar dapat dipergunakan sebagaimana mestinya
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_catatan_kriminal.php b/donjo-app/views/surat/print/print_surat_ket_catatan_kriminal.php deleted file mode 100644 index 669c0368b..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_catatan_kriminal.php +++ /dev/null @@ -1,96 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    PENGANTAR SURAT KETERANGAN CATATAN KEPOLISIAN

    -

    Nomor :

    -
    -
    - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    -
    - - - - - - - - - - - - - -
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Keterangan :Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam -No. KK: dengan NIK: , kepala keluarga : menurut data kami tidak pernah terlibat perkara Polisi dan beradat istiadat baik
    Keperluan : Sebagai pengantar untuk mendapatkan SKCK yang akan dipergunakan untuk
    - - - - - - - - - - - -
    Demikian Surat ini dibuat, untuk dipergunakan sebagaimana mestinya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_domisili_usaha.php b/donjo-app/views/surat/print/print_surat_ket_domisili_usaha.php deleted file mode 100644 index 84c771ff0..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_domisili_usaha.php +++ /dev/null @@ -1,102 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN TEMPAT BERDOMISILI USAHA

    -

    Nomor :

    -
    -
    - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    -
    - - - - - - - - - - - - - -
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Bahwa yang tersebut namanya diatas, memang benar penduduk kami yang memiliki usaha , berlokasi di Dusun , Desa , Kecamatan , Kabupaten .
    Demikian surat keterangan ini dibuat dengan sebenarnya agar dapat dipergunakan sebagaimana mestinya.
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    Pemegang Surat
    ( )( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_jual_beli.php b/donjo-app/views/surat/print/print_surat_ket_jual_beli.php deleted file mode 100644 index aac171e9e..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_jual_beli.php +++ /dev/null @@ -1,99 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN JUAL BELI

    -

    Nomor :

    -
    -
    - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    -
    - - - - - - - - - - - - - - - - - -
    Nama Lengkap:
    Tempat dan Tgl. Lahir (Umur):, ( Tahun)
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RW. , RT. , Dusun , Desa , Kec. , Kab.
    Pekerjaan:
    Yang bersangkutan hendak menjual . - tersebut tidak dalam sengketa dengan pihak lain sehingga dapat dijual kepada pihak kedua yaitu:
    Nama:
    Tempat dan Tanggal Lahir:,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:
    Pekerjaan:
    Keterangan:
    - - - - - - - - - - -
    Demikian surat keterangan ini dibuat dengan sesungguhnya agar dapat dipergunakan sebagaimana mestinya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Mengetahui,,
    Ketua Adat
    ( )( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_kehilangan.php b/donjo-app/views/surat/print/print_surat_ket_kehilangan.php deleted file mode 100644 index 83444ee39..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_kehilangan.php +++ /dev/null @@ -1,96 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN KEHILANGAN

    -

    Nomor :

    -
    -
    - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    -
    - - - - - - - - - - - - - - - - -
    Nama Lengkap:
    NIK/ No. KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pekerjaan:
    Pendidikan:
    Kewarganegaraan :
    Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam -No. KK: dengan NIK: .
    Orang tersebut telah datang kepada kami untuk melapor dan mengaku telah kehilangan .
    Rincian : .
    Keterangan: .
    Demikian surat keterangan ini dibuat dengan sebenarnya agar dapat dipergunakan sebagaimana mestinya.
    - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    Pemegang Surat
    ( )( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_kelahiran.php b/donjo-app/views/surat/print/print_surat_ket_kelahiran.php deleted file mode 100644 index 0322c284a..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_kelahiran.php +++ /dev/null @@ -1,119 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN KELAHIRAN

    -

    No:

    -
    -
    - - -
    Yang bertanda tangan dibawah ini , Kecamatan , Kabupaten - , Provinsi menerangkan bahwa pada:
    -
    - - - - - - - - - - - - - -tr> - - - - - - - - - - - - - - - - - - - - - - - - -
    Hari:
    Tanggal:
    Pukul :
    Tempat Kelahiran:
    Telah lahir seorang anak bernama :
    Dari seorang ibu :
    Nama Lengkap:
    NIK:
    Umur: tahun
    Pekerjaan:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Istri dari :
    Nama Lengkap:
    NIK:
    Umur: tahun
    Pekerjaan:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Hubungan pelapor dengan bayi ::
    Surat keterangan ini dibuat berdasarkan keterangan pelapor :
    Nama Lengkap:
    NIK:
    Umur: tahun
    Pekerjaan:
    Alamat:
    Hubungan pelapor dengan bayi :
    - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_kematian.php b/donjo-app/views/surat/print/print_surat_ket_kematian.php deleted file mode 100644 index 01804ed0a..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_kematian.php +++ /dev/null @@ -1,110 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN KEMATIAN

    -

    No:

    -
    -
    - - - - - -
    Yang bertanda tangan dibawah ini , Kecamatan , Kabupaten - , Provinsi menerangkan bahwa:
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Nama:
    NIK:
    Jenis Kelamin:
    Tempat dan Tgl. Lahir :,
    Agama:/
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Telah meninggal dunia pada:
    Hari/ Tanggal/ Jam://
    Bertempat di:
    Penyebab Kematian:
    Surat keterangan ini dibuat berdasarkan keterangan pelapor :
    Nama:
    NIK:
    Tgl Lahir/:
    Pekerjaan:
    Alamat:
    Hubungan dengan yang mati:
    - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    *)nama terang
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_kematian_suami_istri.php b/donjo-app/views/surat/print/print_surat_ket_kematian_suami_istri.php deleted file mode 100644 index d7ad6f0d3..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_kematian_suami_istri.php +++ /dev/null @@ -1,102 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN KEMATIAN SUAMI/ISTRI

    -

    No:

    -
    -
    - - - - - -
    Yang bertanda tangan dibawah ini menerangkan dengan sesungguhnya bahwa:
    - - - - - - - - - -
    Nama Lengkap:
    Tempat/Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    telah meninggal dunia pada tanggal:
    di:
    - - - - - - - -
    Nama Lengkap:
    Tempat dan Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    - - - - - - - - - - - - - - -
    adalah orang yang telah meninggal tersebut di atas.
    Demikianlah, surat keterangan ini dibua dengan mengingat sumpah jabatan dan untuk dipergunakan seperlunya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    *)nama terang
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_ktp_dlm_proses.php b/donjo-app/views/surat/print/print_surat_ket_ktp_dlm_proses.php deleted file mode 100644 index f4de01bc5..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_ktp_dlm_proses.php +++ /dev/null @@ -1,102 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN KTP DALAM PROSES

    -

    Nomor :

    -
    -
    -
    - - -
    Yang bertanda tangan dibawah ini , Kecamatan , Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    - - - - - - - - - - - - -
    Nama Lengkap:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pekerjaan:
    Kewarganegaraan :
    - -
    Orang tersebut di atas adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , yang saat ini Kartu Tanda Penduduk sedang dalam proses.
    -
    - - -
    -Demikian surat keterangan ini dibuat dengan sesungguhnya untuk dapat digunakan sebagaimana mestinya.
    - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_kurang_mampu.php b/donjo-app/views/surat/print/print_surat_ket_kurang_mampu.php deleted file mode 100644 index f0c7883d6..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_kurang_mampu.php +++ /dev/null @@ -1,96 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN KURANG MAMPU

    -

    Nomor :

    -
    -
    - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    -
    - - - - - - - - - - - - - -
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Keterangan :Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam -No. KK: dengan NIK: , kepala keluarga : yang perekonomiannya kurang mampu.
    Keperluan :
    - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_lahir_mati.php b/donjo-app/views/surat/print/print_surat_ket_lahir_mati.php deleted file mode 100644 index 797f98f8b..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_lahir_mati.php +++ /dev/null @@ -1,94 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN LAHIR MATI

    -

    Nomor :

    -
    -
    - - - - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa seorang ibu:
    - - - - - - - - - - -
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Pekerjaan:
    Kewarganegaraan :
    Pada hari, tanggal: ,
    di :
    - - - - - - - - - - - - -
    telah lahir bayi dalam keadaan mati, setelah dikandungannya selama bulan
    Surat keterangan Lahir Mati ini dibuat atas dasar yang sebenarnya.
    Pelapor:
    Hubungn dengan yang Lahir Mati :
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_nikah.php b/donjo-app/views/surat/print/print_surat_ket_nikah.php deleted file mode 100644 index 9ece0aebd..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_nikah.php +++ /dev/null @@ -1,99 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN UNTUK NIKAH

    -

    No:

    -
    -
    - - - - - -
    Yang bertanda tangan dibawah ini menerangkan dengan sesungguhnya bahwa:
    - - - - - - - - - - - - - -
    Nama Lengkap:
    Jenis Kelamin:
    Tempat dan Tgl. Lahir :,
    Warga negara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    Bin/Binti:
    Status Perkawinan
    a. Jika pria, terangkan jejaka, duda atau beristri dan berapa istrinya:
    b. Jika wanita, terangkan gadis atau janda:
    Nama Istri/Suami terdahulu:
    - - - - - - - - - - - - - - -
    Demikianlah, surat keterangan ini dibuat dengan mengingat sumpah jabatan dan untuk dipergunakan seperlunya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    *)nama lengkap -
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_orangtua.php b/donjo-app/views/surat/print/print_surat_ket_orangtua.php deleted file mode 100644 index aaaecad03..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_orangtua.php +++ /dev/null @@ -1,123 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN TENTANG ORANG TUA

    -

    No:

    -
    -
    - - - - - -
    Yang bertanda tangan dibawah ini menerangkan dengan sesungguhnya bahwa:
    -
    - - - - - - - - - - - - - - - - -
    Nama Lengkap:
    Tempat/Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    Nama Lengkap:
    Tempat/Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    - - - - - - - - - - - - -
    adalah benar ayah dan ibu kandung dari seorang:
    - - - - - - - -
    Nama Lengkap:
    Tempat dan Tgl. Lahir:
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    - - - - - - - - - - - - - - -
    Demikianlah, surat keterangan ini dibuat dengan mengingat sumpah jabatan dan untuk dipergunakan seperlunya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    *)nama lengkap
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_penduduk.php b/donjo-app/views/surat/print/print_surat_ket_penduduk.php deleted file mode 100644 index 379055319..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_penduduk.php +++ /dev/null @@ -1,100 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN PENDUDUK

    -

    Nomor :

    - - - - -
    - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    - - - - - - - - - - - - - - -
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Berlaku mulai : sampai dengan
    Keperluan :
    Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam -No. KK: dengan NIK: , kepala keluarga : .
    - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_pengantar.php b/donjo-app/views/surat/print/print_surat_ket_pengantar.php deleted file mode 100644 index 8e2e0626a..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_pengantar.php +++ /dev/null @@ -1,104 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -
    -
    -

    SURAT KETERANGAN

    -

    Nomor :

    - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    -
    - - - - - - - - - - - - - - - - - - -
    Nama Lengkap:
    Nomor KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Keterangan :
    Keperluan :
    Berlaku mulai : sampai dengan
    - - - - - - - - - - - -
    Demikian Surat Keterangan ini kami buat untuk dapat dipergunakan sebagaimana mestinya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    - -
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_pindah_penduduk.php b/donjo-app/views/surat/print/print_surat_ket_pindah_penduduk.php deleted file mode 100644 index 8d4876e06..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_pindah_penduduk.php +++ /dev/null @@ -1,128 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN PINDAH

    -

    No:

    - -
    - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan bahwa:
    - - - - - - - - - - - - - - -
    Nama Lengkap:
    Jenis Kelamin:
    Tempat dan Tgl. Lahir :,
    Status:
    Kewarganegaraan / Agama: /
    Pekerjaan:
    No KTP:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Alamat yang dituju:RT. , RW. , Kampung , Dusun , Desa , Kec. , Kab.
    Alasan :
    Tanggal pindah :
    Jumlah Pengikut : orang
    - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNIKNamaJKUmurStatus Kawin
    - - - - - - - - - - -
    Surat keterangan ini diterbitkan sebagai .
    Demikianlah surat ini kami buat dengan sesungguhnya semoga dapat dipergunakan sebagaimana mestinya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    Pemegang Surat
    ( )( )
    -
    -
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_ket_usaha.php b/donjo-app/views/surat/print/print_surat_ket_usaha.php deleted file mode 100644 index c2ea33d6a..000000000 --- a/donjo-app/views/surat/print/print_surat_ket_usaha.php +++ /dev/null @@ -1,104 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN USAHA

    -

    Nomor :

    -
    -
    - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    -
    - - - - - - - - - - - - - - -
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Keterangan :Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam -No. KK: dengan NIK: , kepala keluarga : yang memiliki usaha
    Keperluan :
    Berlaku mulai : sampai dengan
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    Pemegang Surat
    ( )( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_keterangan_rahasia.php b/donjo-app/views/surat/print/print_surat_keterangan_rahasia.php deleted file mode 100644 index f6e717c05..000000000 --- a/donjo-app/views/surat/print/print_surat_keterangan_rahasia.php +++ /dev/null @@ -1,112 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - - - -
    - - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    - -
    -
    - -

    SURAT KETERANGAN RAHASIA

    -

    Nomor :

    -
    - - - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    -
    - - - - - - - - - - - - - - - - - - -
    Nama Lengkap:
    Nomor KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Keterangan :
    Keperluan :
    Berlaku mulai : sampai dengan
    - - - - - - - - - - - -
    Demikian Surat Keterangan ini kami buat untuk dapat dipergunakan sebagaimana mestinya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_lap_kehilangan.php b/donjo-app/views/surat/print/print_surat_lap_kehilangan.php deleted file mode 100644 index fc278a773..000000000 --- a/donjo-app/views/surat/print/print_surat_lap_kehilangan.php +++ /dev/null @@ -1,96 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT PENGANTAR LAPORAN KEHILANGAN

    -

    Nomor :

    -
    -
    - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    -
    - - - - - - - - - - - - - -
    Nama Lengkap:
    NIK/ No. KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pekerjaan:
    Pendidikan:
    Kewarganegaraan :
    Keterangan :Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam -No. KK: dengan NIK: , kepala keluarga : .
    Keperluan : Sebagai pengantar untuk mendapatkan Surat Kehilangan yang akan dipergunakan untuk .
    - - - - - - - - - - - -
    Demikian surat keterangan ini kami buat untuk dapat dipergunakan sebagaimana mestinya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    Pemegang Surat
    ( )( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_permohonan_akta.php b/donjo-app/views/surat/print/print_surat_permohonan_akta.php deleted file mode 100644 index f303a951a..000000000 --- a/donjo-app/views/surat/print/print_surat_permohonan_akta.php +++ /dev/null @@ -1,139 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - -
    ,
    Nomor:
    Perihal:Permohonan Akta Kelahiran
    - - - - - - - - - - - - - - - - -

    Kepada Yth.

    Kepala Pengadilan Agama
    Kabupaten
    - - - - - - - - - - - - -
    Yang bertanda tangan dibawah ini , Kecamatan , - Kabupaten , Provinsi menerangkan bahwa:
    - - - - - - - - - - - - - - - - -
    Nama Lengkap:
    Tempat dan Tgl. Lahir :,
    Pekerjaan :
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Mengajukan permohonan untuk diterbitkan penetapan Pengadilan Negeri sebagai persyaratan pencatatan peristiwa kelahiran dan penerbitan kutipan Akta Kelahiran atas nama:
    Nama:
    Tempat dan Tanggal Lahir:,
    Hari Lahir:
    Alamat:
    Nama Orang Tua
    Nama Ayah:
    Nama Ibu:
    Alamat Orang Tua:
    - - - -
    - - - - - - - - - - - - -
    Demikian Surat Keterangan ini dibuat dengan sesungguhnya agar dapat dipergunakan sebagaimana mestinya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_permohonan_duplikat_kelahiran.php b/donjo-app/views/surat/print/print_surat_permohonan_duplikat_kelahiran.php deleted file mode 100644 index 60096885c..000000000 --- a/donjo-app/views/surat/print/print_surat_permohonan_duplikat_kelahiran.php +++ /dev/null @@ -1,111 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT PERMOHONAN DUPLIKAT KELAHIRAN

    -

    Nomor :

    -
    -
    - - -
    Dengan ini kami mengajukan orang untuk mengadakan Permohonan Duplikat Kelahiran seperti tersebut di bawah ini :
    -
    - - - - - - - - - - - - - - - - - - - - - -
    Nama Lengkap:
    NIK:
    Jenis Kelamin:
    Tanggal Lahir:
    Agama:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Telah lahir pada :
    Hari, Tanggal, Pukul:,
    Bertempat di:
    Nama Ibu:
    NIK:
    Tanggal lahir:
    Pekerjaan:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Nama Ayah:
    NIK:
    Tanggal lahir:
    Pekerjaan:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    -
    - -Surat Keterangan ini dibuat berdasarkan keterangan pelapor : - - - - - - -
    Nama Lengkap:
    NIK/ No. KTP:
    Tempat dan Tgl. Lahir :
    Jenis Kelamin:
    Pekerjaan:
    Alamat:
    - - - - - - - - - - -
    Demikian surat keterangan ini dibuat, atas perhatian dan terkabulnya diucapkan terimakasih.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_pernyataan_akta.php b/donjo-app/views/surat/print/print_surat_pernyataan_akta.php deleted file mode 100644 index 2a8e68c80..000000000 --- a/donjo-app/views/surat/print/print_surat_pernyataan_akta.php +++ /dev/null @@ -1,88 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT PERNYATAAN BELUM MEMILIKI AKTA KELAHIRAN

    -

    No:

    -
    -
    - - - - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    -
    - - - - - - - - - - -
    Nama Lengkap:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Nama Ayah:
    Nama Ibu:
    Betul-betul belum pernah memiliki AKTA KELAHIRAN.
    Demikian Surat Keterangan ini kami buat dengan sesungguhnya agar dapat dipergunakan sebagaimanan mestinya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_persetujaun_mempelai.php b/donjo-app/views/surat/print/print_surat_persetujaun_mempelai.php deleted file mode 100644 index 6e2b2ca07..000000000 --- a/donjo-app/views/surat/print/print_surat_persetujaun_mempelai.php +++ /dev/null @@ -1,134 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT PERSETUJUAN MEMPELAI

    -

    NO:

    -
    -
    - - - - - -
    Yang bertanda tangan dibawah ini :
    -
    - - - - - - -
    I. Calon Suami
    - - - - - - - - - - - - - - - - - - -
    Nama Lengkap:
    Bin:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Nama Lengkap:
    Bin:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    - - - - - - -
    II. Calon Istri
    - - - - - - - - - - - - - - - - - - -
    Nama Lengkap:
    Binti:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Nama Lengkap:
    Binti:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    - - - - - - - - - - - - - -
    Menyatakan dengan sesungguhnya bahwa atas dasar sukarela dengan kesadaran sendiri, tanpa paksaan dari siapapun untuk melangsungkan pernikahan.
    Demikianlah surat persetujuan ini dibuat untuk dipergunakan seperlunya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    I. Calon SuamiII. Calon Istri
    ( )( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/print/print_surat_pindah_antar_kab_prov.php b/donjo-app/views/surat/print/print_surat_pindah_antar_kab_prov.php deleted file mode 100644 index 50ec48d95..000000000 --- a/donjo-app/views/surat/print/print_surat_pindah_antar_kab_prov.php +++ /dev/null @@ -1,95 +0,0 @@ -load->view('print/headjs.php');?> - -
    -
    - -
    - - -
    -

    PEMERINTAH KABUPATEN

    -

    KECAMATAN

    -

    DESA

    -
    -
    -
    -

    SURAT KETERANGAN PINDAH

    -

    ANTAR KABUPATEN/KOTA ATAU ANTAR PROVINSI

    -

    Nomor :

    -
    -
    - - -
    Yang bertanda tangan dibawah ini , Kecamatan , -Kabupaten , Provinsi menerangkan Permohonan Pindah Penduduk WNI dengan data sebagai berikut :
    -
    - - - - - - - - -
    Nama Lengkap:
    NIK:
    Nomor Kartu Keluarga:
    Nama Kepala Keluarga:
    Alamat Sekarang:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Alamat Tujuan Pindah:
    Jumlah Keluarga yang Pindah: orang
    - -
    Adapun Permohonan Pindah Penduduk WNI yang bersangkutan sebagaimana terlampir.
    - - - - - - - - - - - -
    Demikian surat keterangan ini dibuat dengan sesungguhnya untuk dapat digunakan sebagaimana mestinya.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ,
    ( )
    -
    -
    -
    - - \ No newline at end of file diff --git a/donjo-app/views/surat/signature.php b/donjo-app/views/surat/signature.php deleted file mode 100644 index 66a4a9326..000000000 --- a/donjo-app/views/surat/signature.php +++ /dev/null @@ -1,262 +0,0 @@ -

    Salah satu fungsi aplikasi Sistem Informasi Desa (SID) adalah untuk mengoptimalkan pelayanan administrasi publik berbasis data. Pelayanan administrasi publik yang bisa dilakukan dengan aplikasi SID meliputi pelayanan olah data dan pelayanan olah dokumen/surat. Pelayanan olah data dapat dilakukan dengan memanfaatkan fungsi-fungsi statistik yang dapat dimanfaatkan untuk laporan dan rujukan pengambilan keputusan. Pelayanan olah dokumen bisa dilakukan dari data yang telah diolah dan/atau dari pengelolaan administrasi surat-menyurat.

    -

    Aplikasi SID menghimpun seluruh data penduduk desa, sehingga bisa digunakan untuk data dasar pembuatan surat administrasi kependudukan. Pelayanan administrasi persuratan itu dapat dikelola oleh pemerintah desa di kantor pemerintah desa masing-masing. Tata cara pemanfaatan module cetak surat aplikasi SID dalam alur pelayanan publik di kantor desa secara garis besar dapat dilakukan dengan urutan sebagai berikut:

    -

    -

      -
    1. Penduduk pemohon surat datang dengan membawa kartu identitas diri (KTP atau Kartu Keluarga/KK) dan diterima oleh staf pemerintah desa yang bertugas dalam pelayanan.
    2. -
    3. Pastikan keberadaan dan status penduduk tersebut dalam database SID di Module "Penduduk". Gunakan fasilitas "Cari" dengan mengisikan nama atau NIK penduduk tersebut. Jika ada perubahan status, perbarui saat itu juga berdasarkan laporan penduduk yang bersangkutan. Jika penduduk tersebut belum terdaftar dalam database, masukkan data penduduk yang bersangkutan ke dalam SID merujuk pada dokumen kependudukan yang dimilikinya (wajib disertai dengan dokumen pendukung lainnya bagi penduduk pendatang/tinggal sementara). Jika data penduduk tersebut sudah tersimpan dalam SID, pembuatan surat dapat dilakukan.
    4. -
    5. Klik module "Cetak Surat" untuk memulai pembuatan surat.
    6. -
    7. Klik salah satu jenis surat yang akan dibuat, sesuaikan dengan jenis urusan yang diajukan oleh penduduk pemohon surat. Pastikan surat yang akan dicetak telah disiapkan templatenya di Menu "Master Surat"
    8. -
    9. Isikan NIK / Nama, nomor surat, keterangan, dan hal lainnya sesuai kolom isian pada jenis surat yang dibuat.
    10. -
    11. Pilih nama dan jabatan kepala desa atau perangkat desa yang berwenang melakukan pengesahan atas nama kepala desa.
    12. -
    13. Setelah semua kolom terisi dengan benar, surat bisa langsung dicetak dengan klik tombol "Cetak" di bagian kanan bawah, atau bisa diedit lebih lanjut ke versi .doc dengan klik "Unduh" di bagian kanan bawah.
    14. -
    15. Surat dapat dicetak 2 eksemplar, 1 eks. untuk penduduk pemohon surat dan 1 eks. untuk arsip pemerintah desa.
    16. -
    17. Setiap jenis surat yang tercetak akan tersimpan data lognya di Menu "Surat Keluar"
    18. -

    -
    -

    PANDUAN KODE EKSPORT SURAT

    -
    -

    PRINSIP FUNGSI
    [kata_template] -> akan digantikan dengan data di bawah ini (sebelah kanan)

    DATA SURAT
    [kode_surat] -> $surat[kode_surat]
    -[judul_surat]",strtoupper("surat ".$surat['nama']),$buffer);
    -[JUDUL_SURAT]",strtoupper("surat ".$surat['nama']),$buffer);
    -[tgl_surat] -> $tgl
    -[tahun] -> $thn
    -[nomor_surat] -> $input[nomor]
    -[nomor_sorat] -> $input[nomor]
    -[mulai_berlaku] -> $input[berlaku_dari]
    -[tgl_akhir] -> $input[berlaku_sampai]
    -[jabatan] -> $input[jabatan]
    -[nama_pamong] -> $input[pamong]
    -[keterangan] -> $input[keterangan]
    -[keperluan] -> $input[keperluan]
    -[tujuan] -> $input[tujuan]
    -[kode_desa] -> $config[kode_desa]
    -[nama_kab] -> $config[nama_kabupaten]
    -[nama_kec] -> $config[nama_kecamatan]
    -[nama_des] -> $config[nama_desa]
    -[NAMA_KAB]",strtoupper($config['nama_kabupaten']),$buffer);
    -[NAMA_KEC]",strtoupper($config['nama_kecamatan']),$buffer);
    -[NAMA_DES]",strtoupper($config['nama_desa']),$buffer);
    -[nama_kepala_camat] -> $config[nama_kepala_camat]
    -[kades] -> $config[nama_kepala_desa]
    -[nip_kepala_camat] -> $config[nip_kepala_camat]
    -[pos] -> $config[kode_pos]
    -[alamat_des] -> $config[alamat_kantor] Pos : $config[kode_pos]
    -[alamat] -> RT $individu[rt] / RW $individu[rw] $individu[dusun]
    -[rt] -> $individu[rt]
    -[rw] -> $individu[rw]
    -[dusun] -> $individu[dusun]
    -[nama_ayah] -> $individu[nama_ayah]
    -[nama_ibu] -> $individu[nama_ibu]
    -[nik_ayah] -> $individu[ayah_nik]
    -[nik_ibu] -> $individu[ibu_nik]
    -[nama] -> $individu[nama]
    -[sex] -> $individu[sex]
    -[agama] -> $individu[agama]
    -[status_kawin] -> $individu[status_kawin]
    -[gol_darah] -> $individu[gol_darah]
    -[pekerjaan] -> $individu[pekerjaan]
    -[warga_negara] -> $individu[warganegara]
    -[no_ktp] -> $individu[nik]
    -[nik] -> $individu[nik]
    -*usia -> $individu[umur] Tahun
    -[usia] -> $individu[umur] Tahun
    -[no_kk] -> $individu[no_kk]
    -[ttl] -> $individu[tempatlahir]/$tgllhr
    -[px_nama] -> $pxnama
    -[px_nik] -> $pxnik
    -[px_hubungan] -> $pxhubungan
    -[px_usia] -> $pxusia
    -[px_tempatlahir] -> $pxtglahir
    -[px_tanggallahir] -> $pxtmplahir
    -[px_ttl] -> $pxttl
    -[px_ttl2] -> $pxttl2
    -[no] -> $pxno
    -[kode_surat] -> $surat[kode_surat]
    -[judul_surat]",strtoupper("surat ".$surat['nama']),$buffer);
    -[JUDUL_SURAT]",strtoupper("surat ".$surat['nama']),$buffer);
    -[tgl_surat] -> $tgl
    -[tahun] -> $thn
    -[nomor_surat] -> $input[nomor]
    -[nomor_sorat] -> $input[nomor]
    -[mulai_berlaku] -> $input[berlaku_dari]
    -[tgl_akhir] -> $input[berlaku_sampai]
    -[jabatan] -> $input[jabatan]
    -[nama_pamong] -> $input[pamong]
    -[keterangan] -> $input[keterangan]
    -[keperluan] -> $input[keperluan]
    -[tujuan] -> $input[tujuan]
    -[hari] -> $input[hari]
    -[tgl_keg] -> $input[tgl_keg]
    -[waktu] -> $input[waktu]
    -[jenis_keg] -> $input[jenis_keg]
    -[lokasi_keg] -> $input[lokasi_keg]
    -[bidang_keg] -> $input[bidang_keg]
    -[alamat_sekarang] -> $input[alamat_sekarang]
    -[kode_desa] -> $config[kode_desa]
    -[nama_kab] -> $config[nama_kabupaten]
    -[nama_kec] -> $config[nama_kecamatan]
    -[nama_des] -> $config[nama_desa]
    -[NAMA_KAB]",strtoupper($config['nama_kabupaten']),$buffer);
    -[NAMA_KEC]",strtoupper($config['nama_kecamatan']),$buffer);
    -[NAMA_DES]",strtoupper($config['nama_desa']),$buffer);
    -[nama_kepala_camat] -> $config[nama_kepala_camat]
    -[kades] -> $config[nama_kepala_desa]
    -[nip_kepala_camat] -> $config[nip_kepala_camat]
    -[pos] -> $config[kode_pos]
    -[alamat_des] -> $config[alamat_kantor] Pos : $config[kode_pos]
    -[alamat] -> $individu[dusun] RT $individu[rt] / RW $individu[rw]
    -[rt] -> $individu[rt]
    -[rw] -> $individu[rw]
    -[dusun] -> $individu[dusun]
    -[nama_ayah] -> $individu[nama_ayah]
    -[nama_ibu] -> $individu[nama_ibu]
    -[nik_ayah] -> $individu[ayah_nik]
    -[nik_ibu] -> $individu[ibu_nik]
    -[nama] -> $individu[nama]
    -[sex] -> $individu[sex]
    -[agama] -> $individu[agama]
    -[status_kawin] -> $individu[status_kawin]
    -[gol_darah] -> $individu[gol_darah]
    -[pekerjaan] -> $individu[pekerjaan]
    -[pendidikan] -> $individu[pendidikan]
    -[warga_negara] -> $individu[warganegara]
    -[no_ktp] -> $individu[nik]
    -[hubungan] -> $individu[hubungan]
    -[nik] -> $individu[nik]
    -*usia -> $individu[umur] Tahun
    -[usia] -> $individu[umur] Tahun
    -[no_kk] -> $individu[no_kk]
    -[ttl] -> $individu[tempatlahir]/$tgllhr
    -[nama_lahir] -> $input[nama_lahir]
    -[nik_lahir] -> $input[nik_lahir]
    -[nama_mati] -> $input[nama_mati]
    -[nik_mati] -> $input[nik_mati]
    -[nama_doc] -> $input[nama_doc]
    -[dokumen] -> $input[dokumen]
    -[alamat_nikah] -> $input[alamat_nikah]
    -[tgl_nikah] -> $input[tgl_nikah]
    -[nama_wali] -> $input[nama_wali]
    -[nik_wali] -> $input[nik_wali]
    -[alamat_wali] -> $input[alamat_wali]
    -[kelamin_wali] -> $input[kelamin_wali]
    -[hubungan_wali] -> $input[hubungan_wali]
    -[agama_wali] -> $input[agama_wali]
    -[tptlhr_wali] -> $input[tptlhr_wali]
    -[tgllhr_wali] -> $input[tgllhr_wali]
    -[pekerjaan_wali] -> $input[pekerjaan_wali]
    -[sebab_wali] -> $input[sebab_wali]
    -[ayah_penghasilan] -> $rp_ayah
    -[ibu_penghasilan] -> $rp_ibu
    -[total] -> $total
    -[rphuruf] -> $rpt
    -[sekolah] -> $input[sekolah]
    -[jurusan] -> $input[jurusan]
    -[kelas] -> $input[kelas]
    -[ayah_alamat] -> $ayah[dusun] RT $ayah[rt] / RW $ayah[rw]
    -[ayah_rt] -> $ayah[rt]
    -[ayah_rw] -> $ayah[rw]
    -[ayah_dusun] -> $ayah[dusun]
    -[ayah_nama_ayah] -> $ayah[nama_ayah]
    -[ayah_nama_ibu] -> $ayah[nama_ibu]
    -[ayah_nik_ayah] -> $ayah[ayah_nik]
    -[ayah_nik_ibu] -> $ayah[ibu_nik]
    -[ayah_nama] -> $ayah[nama]
    -[ayah_sex] -> $ayah[sex]
    -[ayah_agama] -> $ayah[agama]
    -[ayah_status_kawin] -> $ayah[status_kawin]
    -[ayah_gol_darah] -> $ayah[gol_darah]
    -[ayah_pekerjaan] -> $ayah[pekerjaan]
    -[ayah_pendidikan] -> $ayah[pendidikan]
    -[ayah_warga_negara] -> $ayah[warganegara]
    -[ayah_no_ktp] -> $ayah[nik]
    -[ayah_nik] -> $ayah[nik]
    -*ayah_usia -> $ayah[umur] Tahun
    -[ayah_usia] -> $ayah[umur] Tahun
    -[ayah_no_kk] -> $ayah[no_kk]
    -[ayah_ttl] -> $ayah[tempatlahir]/$ayah_tgllhr
    -[ibu_alamat] -> $ibu[dusun] RT $ibu[rt] / RW $ibu[rw]
    -[ibu_rt] -> $ibu[rt]
    -[ibu_rw] -> $ibu[rw]
    -[ibu_dusun] -> $ibu[dusun]
    -[ibu_nama_ayah] -> $ibu[nama_ayah]
    -[ibu_nama_ibu] -> $ibu[nama_ibu]
    -[ibu_nik_ayah] -> $ibu[ibu_nik]
    -[ibu_nik_ibu] -> $ibu[ibu_nik]
    -[ibu_nama] -> $ibu[nama]
    -[ibu_sex] -> $ibu[sex]
    -[ibu_agama] -> $ibu[agama]
    -[ibu_status_kawin] -> $ibu[status_kawin]
    -[ibu_gol_darah] -> $ibu[gol_darah]
    -[ibu_pekerjaan] -> $ibu[pekerjaan]
    -[ibu_pendidikan] -> $ibu[pendidikan]
    -[ibu_warga_negara] -> $ibu[warganegara]
    -[ibu_no_ktp] -> $ibu[nik]
    -[ibu_nik] -> $ibu[nik]
    -*ibu_usia -> $ibu[umur] Tahun
    -[ibu_usia] -> $ibu[umur] Tahun
    -[ibu_no_kk] -> $ibu[no_kk]
    -[ibu_ttl] -> $ibu[tempatlahir]/$ibu_tgllhr
    -[kua] -> $input[kua]
    -[nomor_nikah] -> $input[nomor_nikah]
    -[hari_lahir] -> $input[hari_lahir]
    -[tgl_lahir] -> $input[tgl_lahir]
    -[jam_lahir] -> $input[jam_lahir]
    -[tpt_lahir] -> $input[tpt_lahir]
    -[sex_lahir] -> $input[sex_lahir]
    -[hub_lapor] -> $input[hub_lapor]
    -[hari_mati] -> $input[hari_mati]
    -[tgl_mati] -> $input[tgl_mati]
    -[jam_mati] -> $input[jam_mati]
    -[tpt_mati] -> $input[tpt_mati]
    -[sebab_mati] -> $input[sebab_mati]
    -[nama_baru1] -> $input[nama_baru1]
    -[tpt_baru1] -> $input[tpt_baru1]
    -[tgl_baru1] -> $input[tgl_baru1]
    -[hubkel_baru1] -> $input[hubkel_baru1]
    -[nama_baru2] -> $input[nama_baru2]
    -[tpt_baru2] -> $input[tpt_baru2]
    -[tgl_baru2] -> $input[tgl_baru2]
    -[hubkel_baru2] -> $input[hubkel_baru2]
    -[nama_baru3] -> $input[nama_baru3]
    -[tpt_baru3] -> $input[tpt_baru3]
    -[tgl_baru3] -> $input[tgl_baru3]
    -[hubkel_baru3] -> $input[hubkel_baru3]
    -[nama_baru4] -> $input[nama_baru4]
    -[tpt_baru4] -> $input[tpt_baru4]
    -[tgl_baru4] -> $input[tgl_baru4]
    -[hubkel_baru4] -> $input[hubkel_baru4]
    -[nama_baru5] -> $input[nama_baru5]
    -[tpt_baru5] -> $input[tpt_baru5]
    -[tgl_baru5] -> $input[tgl_baru5]
    -[hubkel_baru5] -> $input[hubkel_baru5]
    -[nama_baru6] -> $input[nama_baru6]
    -[tpt_baru6] -> $input[tpt_baru6]
    -[tgl_baru6] -> $input[tgl_baru6]
    -[hubkel_baru6] -> $input[hubkel_baru6]
    -[saksi_baru1] -> $input[saksi_baru1]
    -[saksi_baru2] -> $input[saksi_baru2]
    -[pria_status] -> $input[pria_status]
    -[wanita_status] -> $input[wanita_status]
    -[istri_lama] -> $input[istri_lama]
    -[nama_calon] -> $input[nama_calon]
    -[binti] -> $input[binti]
    -[alamat_calon] -> $input[alamat_calon]
    -[tpt_lahir_calon] -> $input[tpt_lahir_calon]
    -[tgl_lahir_calon] -> $input[tgl_lahir_calon]
    -[warga_negara_calon] -> $input[warga_negara_calon]
    -[agama_calon] -> $input[agama_calon]
    -[kerja_calon] -> $input[kerja_calon]
    -[hari_nikah] -> $input[hari_nikah]
    -[tgl_nikah] -> $input[tgl_nikah]
    -[jam_nikah] -> $input[jam_nikah]
    -[tpt_nikah] -> $input[tpt_nikah]
    -[mahar_nikah] -> $input[mahar_nikah]
    -[kartu_beda] -> $input[kartu_beda]
    -[identitas_beda] -> $input[identitas_beda]
    -[nama_beda] -> $input[nama_beda]
    -[tempatlahir] -> $input[tempatlahir]
    -[tgllahir] -> $input[tgllahir]
    -

    -Referensi file -> surat_model.php baris ke 277 -

    -

    Demikian panduan pembuatan surat dengan menggunakan aplikasi SID. Selamat menyelenggarakan pelayanan administrasi publik.

    \ No newline at end of file diff --git a/donjo-app/views/surat/surat_keluar.php b/donjo-app/views/surat/surat_keluar.php deleted file mode 100644 index 431ce8517..000000000 --- a/donjo-app/views/surat/surat_keluar.php +++ /dev/null @@ -1,125 +0,0 @@ -
    - - - - -
    - - -
    - -
    -
    -
    -

    Manajemen Surat Keluar

    -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ".$data['no_surat']." "; - }else{ - echo ""; - } - ?> - - - - - - - - -
    NoNomor SuratNomor SuratNomor SuratJenis SuratNama PendudukNama PendudukNama PendudukNama Staf Pemerintah DesaTanggalTanggalTanggalUser
    ".$data['no_surat']."
    -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - -
    - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    -
    -
    diff --git a/donjo-app/views/surat/surat_keluar_graph.php b/donjo-app/views/surat/surat_keluar_graph.php deleted file mode 100644 index b50430037..000000000 --- a/donjo-app/views/surat/surat_keluar_graph.php +++ /dev/null @@ -1,99 +0,0 @@ - -
    - - - -
    -Menu Surat Keluar - - -
    - -
    -
    -
    -

    Grafik Surat Keluar

    -
    - -
    - - - - -
    - -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat/surat_keluar_perorangan.php b/donjo-app/views/surat/surat_keluar_perorangan.php deleted file mode 100644 index 2136e9cf6..000000000 --- a/donjo-app/views/surat/surat_keluar_perorangan.php +++ /dev/null @@ -1,165 +0,0 @@ - - -
    - - - -
    - - -
    - -
    -
    -
    -

    Rekam Surat Perseorangan

    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    NIK / Nama -
    -
    -
    -
    Tempat/ Tanggal Lahir (Umur) - / ( Tahun) -
    Alamat - -
    Pendidikan - -
    Warganegara / Agama - / -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NoNomor SuratNomor SuratNomor SuratJenis SuratNama Staf Pemerintah DesaTanggalTanggalTanggal
    -
    - -
    -
    -
    -
    " method="post"> - - - - - -
    -
    -
    -
    - -
    - - start_link;$i<=$paging->end_link;$i++): ?> - " class="uibutton"> - -
    - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat_master/ajax-upload.php b/donjo-app/views/surat_master/ajax-upload.php deleted file mode 100644 index de76d3cd6..000000000 --- a/donjo-app/views/surat_master/ajax-upload.php +++ /dev/null @@ -1,28 +0,0 @@ - -
    -
    - - - - - -
    Upload Template - (File harus dalam format .rtf) -
    -
    -
    -
    -
    - - -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat_master/atribut/ajax_form.php b/donjo-app/views/surat_master/atribut/ajax_form.php deleted file mode 100644 index fa9eea84d..000000000 --- a/donjo-app/views/surat_master/atribut/ajax_form.php +++ /dev/null @@ -1,26 +0,0 @@ - - -
    - - - - - - - - - - - - - - - - -
    Atribut
    Tipe
    Nilai
    Nilai
    -
    -
    - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat_master/atribut/form.php b/donjo-app/views/surat_master/atribut/form.php deleted file mode 100644 index eaeff5799..000000000 --- a/donjo-app/views/surat_master/atribut/form.php +++ /dev/null @@ -1,39 +0,0 @@ -
    - - -
    -
    -
    -
    -

    Form Data Parameter

    -

      Pertanyaan :

    -
    -
    -
    - - - - - - - - - - -
    Jawaban
    Nilai
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat_master/atribut/table.php b/donjo-app/views/surat_master/atribut/table.php deleted file mode 100644 index fe1671bc0..000000000 --- a/donjo-app/views/surat_master/atribut/table.php +++ /dev/null @@ -1,77 +0,0 @@ - - diff --git a/donjo-app/views/surat_master/form.php b/donjo-app/views/surat_master/form.php deleted file mode 100644 index ff979bd46..000000000 --- a/donjo-app/views/surat_master/form.php +++ /dev/null @@ -1,33 +0,0 @@ -
    -
    -
    -
    -

    Form Layanan Administrasi Surat

    -
    -
    -
    - - - - - - - - - -
    Kode Surat
    Nama LayananSURAT
    -
    - -
    -
    - -
    -
    -
    - - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat_master/manajemen_kuisioner_form.php b/donjo-app/views/surat_master/manajemen_kuisioner_form.php deleted file mode 100644 index 8f2f34c56..000000000 --- a/donjo-app/views/surat_master/manajemen_kuisioner_form.php +++ /dev/null @@ -1,70 +0,0 @@ - - -
    Data Responden
    -
    -

    Form Manajemen Responden

    -
    -
    -
    -
    - - - - -
     
    -
    >
    - -
    >
    - - -
    -
    - -
    -
    - -
    -
    -
    - - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/surat_master/table.php b/donjo-app/views/surat_master/table.php deleted file mode 100644 index 437db852d..000000000 --- a/donjo-app/views/surat_master/table.php +++ /dev/null @@ -1,138 +0,0 @@ - - diff --git a/donjo-app/views/web/artikel/ajax_add_kategori_form.php b/donjo-app/views/web/artikel/ajax_add_kategori_form.php deleted file mode 100644 index 73b3b1663..000000000 --- a/donjo-app/views/web/artikel/ajax_add_kategori_form.php +++ /dev/null @@ -1,16 +0,0 @@ -
    - - - - - -
    Nama Kategori - -
    -
    -
    - - -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/web/artikel/form.php b/donjo-app/views/web/artikel/form.php deleted file mode 100644 index eb87c6077..000000000 --- a/donjo-app/views/web/artikel/form.php +++ /dev/null @@ -1,141 +0,0 @@ - - - -
    - - -
    -
    -
    -
    -

    Form Artikel

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Judul Artikel
    Isi Artikel
    - -
    -  -
    Dokumen Lampiran
    Dokumen -Download -
    Nama Dokumen (Nantinya akan menjadi link unduh/download)
    -  -
    Gambar -
    - -
    Hapus Gambar -
    Unggah/Upload Gambar Utama (Kosongi jika tidak ingin mengubah gambar)
    Gambar - -
    - -
    Hapus Gambar -
    Gambar Tambahan (Kosongi jika tidak ingin mengubah gambar)
    Gambar - -
    - -
    Hapus Gambar -
    Gambar Tambahan (Kosongi jika tidak ingin mengubah gambar)
    Gambar - -
    - -
    Hapus Gambar -
    Gambar Tambahan (Kosongi jika tidak ingin mengubah gambar)
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/web/artikel/table.php b/donjo-app/views/web/artikel/table.php deleted file mode 100644 index 1cccd4620..000000000 --- a/donjo-app/views/web/artikel/table.php +++ /dev/null @@ -1,199 +0,0 @@ - -
    - - - - - -
    -
    -Kategori Artikel -
    - -Artikel Statis - -
    -
    - -
    -
    -
    -
    -
    -
    -" class="uibutton tipsy south" title="Tambah Data" > Tambah Baru - -
    -
    - -
    - -
    - -
    - -
    -
    -
    -
    -
    " method="post"> - - - - - -
    -
    -
    -
    - -
    -start_link;$i<=$paging->end_link;$i++): ?> -" class="uibutton"> - -
    - -
    -
    -
    -
    -
    diff --git a/donjo-app/views/web/artikel/widget-form.php b/donjo-app/views/web/artikel/widget-form.php deleted file mode 100644 index 9403ce8c0..000000000 --- a/donjo-app/views/web/artikel/widget-form.php +++ /dev/null @@ -1,111 +0,0 @@ -
    - - -
    -
    -
    -
    -

    Form Pengaturan Customizable Widget

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Judul Widget
    Kode Widget
    - -
    -  -
    Gambar -
    - -
    -
    Dokumen Lampiran
    Nama Dokumen (akan menjadi link unduh/download)
    Unggah/Upload Gambar Utama (Kosongi jika tidak ingin mengubah gambar)
    Gambar - -
    - -
    -
    Gambar Tambahan (Kosongi jika tidak ingin mengubah gambar)
    Gambar - -
    - -
    -
    Gambar Tambahan (Kosongi jika tidak ingin mengubah gambar)
    Gambar - -
    - -
    -
    Gambar Tambahan (Kosongi jika tidak ingin mengubah gambar)
    -
    - -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/donjo-app/views/web/nav.php b/donjo-app/views/web/nav.php deleted file mode 100644 index 045170506..000000000 --- a/donjo-app/views/web/nav.php +++ /dev/null @@ -1,37 +0,0 @@ - \ No newline at end of file diff --git a/donjo-app/views/web/spacer.php b/donjo-app/views/web/spacer.php deleted file mode 100644 index 8d543b0e8..000000000 --- a/donjo-app/views/web/spacer.php +++ /dev/null @@ -1,5 +0,0 @@ -
    - -
    - \ No newline at end of file From 1b8c1584380587ed38f60e4a8d9ecea85489b023 Mon Sep 17 00:00:00 2001 From: satujalur <98323567+satujalur@users.noreply.github.com> Date: Wed, 19 Oct 2022 20:36:52 +0700 Subject: [PATCH 5/6] pindahkan ke app --- app/.htaccess | 6 + app/cache/index.html | 11 + app/config/autoload.php | 135 ++ app/config/config.php | 534 ++++++ app/config/constants.php | 87 + app/config/database.php | 96 ++ app/config/doctypes.php | 24 + app/config/foreign_chars.php | 114 ++ app/config/hooks.php | 13 + app/config/index.html | 11 + app/config/memcached.php | 19 + app/config/migration.php | 84 + app/config/mimes.php | 186 ++ app/config/profiler.php | 14 + app/config/routes.php | 54 + app/config/smileys.php | 64 + app/config/user_agents.php | 222 +++ app/controllers/Analisis_grafik.php | 124 ++ app/controllers/Analisis_indikator.php | 189 +++ app/controllers/Analisis_kategori.php | 92 + app/controllers/Analisis_klasifikasi.php | 87 + app/controllers/Analisis_laporan.php | 184 ++ app/controllers/Analisis_master.php | 167 ++ app/controllers/Analisis_periode.php | 109 ++ app/controllers/Analisis_respon.php | 208 +++ .../Analisis_statistik_jawaban.php | 353 ++++ app/controllers/Area.php | 153 ++ app/controllers/Data_persil.php | 207 +++ app/controllers/Database.php | 163 ++ app/controllers/Dokumen.php | 102 ++ app/controllers/Feed.php | 16 + app/controllers/First.php | 393 +++++ app/controllers/Gallery.php | 174 ++ app/controllers/Garis.php | 150 ++ app/controllers/Gis.php | 258 +++ app/controllers/Hom_desa.php | 80 + app/controllers/Kategori.php | 151 ++ app/controllers/Kelompok.php | 227 +++ app/controllers/Kelompok_master.php | 110 ++ app/controllers/Keluar.php | 102 ++ app/controllers/Keluarga.php | 793 +++++++++ app/controllers/Komentar.php | 105 ++ app/controllers/Lapor.php | 105 ++ app/controllers/Laporan.php | 114 ++ app/controllers/Laporan_rentan.php | 64 + app/controllers/Line.php | 162 ++ app/controllers/Main.php | 53 + app/controllers/Man_user.php | 102 ++ app/controllers/Mandiri.php | 78 + app/controllers/Menu.php | 157 ++ app/controllers/Modul.php | 89 + app/controllers/Penduduk.php | 706 ++++++++ app/controllers/Penduduk_log.php | 169 ++ app/controllers/Pengurus.php | 89 + app/controllers/Plan.php | 160 ++ app/controllers/Point.php | 163 ++ app/controllers/Polygon.php | 166 ++ app/controllers/Program_bantuan.php | 107 ++ app/controllers/Rtm.php | 314 ++++ app/controllers/Sid_core.php | 445 +++++ app/controllers/Siteman.php | 36 + app/controllers/Sms.php | 624 +++++++ app/controllers/Sosmed.php | 83 + app/controllers/Statistik.php | 317 ++++ app/controllers/Surat.php | 122 ++ app/controllers/Surat_master.php | 184 ++ app/controllers/User_setting.php | 27 + app/controllers/Web.php | 140 ++ app/controllers/Welcome.php | 25 + app/controllers/Widget.php | 44 + app/controllers/index.html | 11 + app/core/index.html | 11 + app/helpers/Donjolib_helper.php | 563 ++++++ app/helpers/Excel_helper.php | 1508 +++++++++++++++++ app/helpers/Pict_helper.php | 478 ++++++ app/helpers/index.html | 11 + app/hooks/index.html | 11 + app/index.html | 11 + app/language/english/index.html | 11 + app/language/index.html | 11 + app/libraries/Paging.php | 60 + app/libraries/index.html | 11 + app/logs/index.html | 11 + app/models/Analisis_grafik_model.php | 232 +++ app/models/Analisis_import_model.php | 103 ++ app/models/Analisis_indikator_model.php | 252 +++ app/models/Analisis_kategori_model.php | 137 ++ app/models/Analisis_klasifikasi_model.php | 137 ++ app/models/Analisis_laporan_model.php | 374 ++++ app/models/Analisis_master_model.php | 187 ++ app/models/Analisis_periode_model.php | 204 +++ app/models/Analisis_respon_model.php | 1266 ++++++++++++++ .../Analisis_statistik_jawaban_model.php | 311 ++++ app/models/Apis.php | 13 + app/models/Config_model.php | 403 +++++ app/models/Data_persil_model.php | 296 ++++ app/models/Export_model.php | 292 ++++ app/models/Feed_model.php | 41 + app/models/First_artikel_m.php | 286 ++++ app/models/First_gallery_m.php | 67 + app/models/First_keluarga_m.php | 43 + app/models/First_m.php | 86 + app/models/First_menu_m.php | 77 + app/models/First_penduduk_m.php | 222 +++ app/models/First_slide_m.php | 12 + app/models/Header_model.php | 82 + app/models/Import_model.php | 745 ++++++++ app/models/Kelompok_master_model.php | 144 ++ app/models/Kelompok_model.php | 214 +++ app/models/Keluarga_model.php | 870 ++++++++++ app/models/Laporan_bulanan_model.php | 316 ++++ app/models/Laporan_penduduk_model.php | 264 +++ app/models/Laporan_perubahan_model.php | 76 + app/models/Mandiri_model.php | 186 ++ app/models/Modul_model.php | 89 + app/models/Pamong_model.php | 110 ++ app/models/Penduduk_model.php | 1093 ++++++++++++ app/models/Plan_area_model.php | 238 +++ app/models/Plan_garis_model.php | 237 +++ app/models/Plan_line_model.php | 317 ++++ app/models/Plan_lokasi_model.php | 237 +++ app/models/Plan_point_model.php | 269 +++ app/models/Plan_polygon_model.php | 317 ++++ app/models/Program_bantuan_model.php | 371 ++++ app/models/Rtm_model.php | 429 +++++ app/models/Sms_model.php | 717 ++++++++ app/models/Surat_keluar_model.php | 257 +++ app/models/Surat_master_model.php | 241 +++ app/models/Surat_model.php | 618 +++++++ app/models/User_model.php | 429 +++++ app/models/Web_artikel_model.php | 402 +++++ app/models/Web_dokumen_model.php | 166 ++ app/models/Web_gallery_model.php | 272 +++ app/models/Web_kategori_model.php | 291 ++++ app/models/Web_komentar_model.php | 197 +++ app/models/Web_menu_model.php | 280 +++ app/models/Web_sosmed_model.php | 39 + app/models/Web_statis_model.php | 192 +++ app/models/Web_widget_model.php | 31 + app/models/Wilayah_model.php | 395 +++++ app/models/index.html | 11 + app/third_party/index.html | 11 + app/views/analisis_grafik/penduduk_excel.php | 58 + app/views/analisis_grafik/penduduk_pie.php | 162 ++ app/views/analisis_grafik/penduduk_print.php | 158 ++ app/views/analisis_grafik/table.php | 135 ++ app/views/analisis_grafik/time.php | 98 ++ app/views/analisis_indikator/form.php | 108 ++ .../manajemen_kuisioner_form.php | 71 + .../parameter/ajax_form.php | 24 + .../analisis_indikator/parameter/table.php | 76 + app/views/analisis_indikator/table.php | 176 ++ app/views/analisis_kategori/ajax_form.php | 15 + app/views/analisis_kategori/form.php | 35 + app/views/analisis_kategori/table.php | 113 ++ app/views/analisis_klasifikasi/ajax_form.php | 23 + app/views/analisis_klasifikasi/table.php | 134 ++ app/views/analisis_laporan/ajax_multi.php | 67 + app/views/analisis_laporan/form.php | 124 ++ app/views/analisis_laporan/table.php | 202 +++ app/views/analisis_laporan/table_excel.php | 57 + app/views/analisis_laporan/table_print.php | 68 + app/views/analisis_master/form.php | 129 ++ app/views/analisis_master/import.php | 19 + app/views/analisis_master/left.php | 46 + app/views/analisis_master/menu.php | 24 + app/views/analisis_master/nav.php | 30 + app/views/analisis_master/nav2.php | 10 + app/views/analisis_master/panduan.php | 18 + app/views/analisis_master/table.php | 139 ++ app/views/analisis_periode/form.php | 75 + app/views/analisis_periode/table.php | 132 ++ app/views/analisis_respon/form.php | 233 +++ app/views/analisis_respon/form_ajax.php | 103 ++ .../analisis_respon/import/aturan_ajax.php | 18 + .../analisis_respon/import/aturan_unduh.php | 59 + .../analisis_respon/import/data_ajax.php | 28 + .../analisis_respon/import/data_unduh.php | 199 +++ app/views/analisis_respon/import/import.php | 18 + app/views/analisis_respon/table.php | 185 ++ app/views/analisis_statistik_jawaban/form.php | 100 ++ .../manajemen_kuisioner_form.php | 71 + .../parameter/ajax_form.php | 24 + .../parameter/form.php | 41 + .../parameter/grafik_table.php | 136 ++ .../parameter/subjek_excel.php | 64 + .../parameter/subjek_table.php | 85 + .../parameter/table.php | 79 + .../parameter/table_print.php | 57 + .../analisis_statistik_jawaban/table.php | 212 +++ .../table_excel.php | 79 + .../table_print.php | 70 + app/views/area/ajax_add_sub_polygon_form.php | 20 + app/views/area/ajax_wil_dusun.php | 105 ++ app/views/area/form.php | 73 + app/views/area/maps.php | 99 ++ app/views/area/sub_line_table.php | 69 + app/views/area/table.php | 150 ++ app/views/data_persil/create.php | 189 +++ app/views/data_persil/create_ext.php | 135 ++ app/views/data_persil/detail.php | 95 ++ app/views/data_persil/edit.php | 129 ++ app/views/data_persil/import.php | 34 + app/views/data_persil/menu_kiri.php | 39 + app/views/data_persil/panduan.php | 25 + app/views/data_persil/persil.php | 95 ++ app/views/data_persil/persil_jenis.php | 97 ++ app/views/data_persil/persil_peruntukan.php | 100 ++ app/views/database/backup.php | 22 + app/views/database/export.php | 81 + app/views/dokumen/form.php | 47 + app/views/dokumen/table.php | 139 ++ app/views/errors/cli/error_404.php | 8 + app/views/errors/cli/error_db.php | 8 + app/views/errors/cli/error_exception.php | 21 + app/views/errors/cli/error_general.php | 8 + app/views/errors/cli/error_php.php | 21 + app/views/errors/cli/index.html | 11 + app/views/errors/html/error_404.php | 64 + app/views/errors/html/error_db.php | 64 + app/views/errors/html/error_exception.php | 32 + app/views/errors/html/error_general.php | 64 + app/views/errors/html/error_php.php | 33 + app/views/errors/html/index.html | 11 + app/views/errors/index.html | 11 + app/views/export/exp.php | 64 + app/views/export/penduduk_csv.php | 11 + app/views/export/penduduk_excel.php | 82 + app/views/feed.php | 37 + app/views/footer.php | 8 + app/views/gallery/form.php | 47 + app/views/gallery/form_sub_gallery.php | 47 + app/views/gallery/sub_gallery_table.php | 147 ++ app/views/gallery/table.php | 158 ++ app/views/garis/ajax_add_sub_line_form.php | 20 + app/views/garis/form.php | 73 + app/views/garis/maps.php | 103 ++ app/views/garis/sub_line_table.php | 69 + app/views/garis/table.php | 150 ++ app/views/garis/table2.php | 148 ++ app/views/gis/ajax_adv_search_form.php | 111 ++ app/views/gis/header.php | 109 ++ app/views/gis/maps.php | 321 ++++ app/views/gis/menu.php | 37 + app/views/header-gis.php | 105 ++ app/views/header-min.php | 38 + app/views/header.php | 83 + app/views/home/about.php | 59 + app/views/home/ajax_kantor_desa_maps.php | 67 + app/views/home/ajax_wilayah_desa_maps.php | 95 ++ app/views/home/desa.php | 29 + app/views/home/konfigurasi_form.php | 103 ++ app/views/home/nav.php | 15 + app/views/home/pengurus.php | 81 + app/views/home/pengurus_form.php | 58 + app/views/import/imp.php | 129 ++ app/views/import/ppls.php | 92 + app/views/import/siak.php | 52 + app/views/index.html | 11 + app/views/init.php | 82 + app/views/install.php | 53 + .../kategori/ajax_add_sub_kategori_form.php | 15 + app/views/kategori/form.php | 62 + app/views/kategori/sub_kategori_table.php | 77 + app/views/kategori/table.php | 136 ++ app/views/kelompok/anggota/cetak.php | 51 + app/views/kelompok/anggota/excel.php | 59 + app/views/kelompok/anggota/form.php | 62 + app/views/kelompok/anggota/table.php | 69 + app/views/kelompok/cetak.php | 49 + app/views/kelompok/excel.php | 56 + app/views/kelompok/form.php | 90 + app/views/kelompok/table.php | 157 ++ app/views/kelompok_master/form.php | 39 + app/views/kelompok_master/table.php | 112 ++ app/views/komentar/form.php | 55 + app/views/komentar/table.php | 136 ++ app/views/lapor/form.php | 55 + app/views/lapor/nav.php | 10 + app/views/lapor/table.php | 136 ++ app/views/laporan/bulanan.php | 225 +++ app/views/laporan/bulanan_excel.php | 185 ++ app/views/laporan/bulanan_print.php | 177 ++ app/views/laporan/kelompok.php | 193 +++ app/views/laporan/kelompok_excel.php | 165 ++ app/views/laporan/kelompok_print.php | 160 ++ app/views/laporan/keluarga.php | 163 ++ app/views/laporan/pendidikan.php | 102 ++ app/views/laporan/penduduk.php | 111 ++ app/views/laporan/penduduk_tetap.php | 158 ++ app/views/laporan/perubahan.php | 199 +++ app/views/laporan/perubahan_print.php | 169 ++ app/views/layouts/analisis.tpl.php | 58 + app/views/layouts/arsip.tpl.php | 19 + app/views/layouts/artikel.tpl.php | 24 + app/views/layouts/gallery.tpl.php | 19 + app/views/layouts/header.php | 95 ++ app/views/layouts/main.tpl.php | 19 + app/views/layouts/mandiri.php | 26 + app/views/layouts/slide.php | 14 + app/views/layouts/stat.tpl.php | 36 + app/views/layouts/sub_gallery.tpl.php | 19 + app/views/layouts/teks_berjalan.php | 88 + app/views/line/ajax_add_sub_line_form.php | 21 + app/views/line/form.php | 37 + app/views/line/sub_line_table.php | 67 + app/views/line/table.php | 128 ++ app/views/lokasi/ajax_add_sub_point_form.php | 20 + app/views/lokasi/form.php | 77 + app/views/lokasi/maps.php | 68 + app/views/lokasi/sub_point_table.php | 70 + app/views/lokasi/table.php | 149 ++ app/views/man_user/manajemen_user_form.php | 114 ++ app/views/man_user/manajemen_user_table.php | 147 ++ app/views/man_user/nav.php | 7 + app/views/mandiri/ajax_pin.php | 50 + app/views/mandiri/mandiri.php | 119 ++ app/views/menu/ajax_add_sub_menu_form.php | 43 + app/views/menu/form.php | 74 + app/views/menu/sub_menu_table.php | 77 + app/views/menu/table.php | 131 ++ app/views/nav.php | 21 + app/views/partials/admin.tpl.php | 144 ++ app/views/partials/analisis.php | 97 ++ app/views/partials/arsip.php | 64 + app/views/partials/artikel-x.php | 88 + app/views/partials/artikel.php | 124 ++ app/views/partials/bottom.php | 13 + app/views/partials/bottom_admin.tpl.php | 25 + app/views/partials/bottom_menu.tpl.php | 14 + app/views/partials/breadcrumb.tpl.php | 2 + app/views/partials/cek.php | 17 + app/views/partials/chart.php | 61 + app/views/partials/content.php | 162 ++ app/views/partials/copywright.tpl.php | 1 + app/views/partials/gallery.php | 30 + app/views/partials/high.php | 67 + app/views/partials/lapor.php | 25 + app/views/partials/layanan.php | 34 + app/views/partials/mandiri.php | 181 ++ app/views/partials/menu.left.php | 8 + app/views/partials/menu.tpl.php | 8 + app/views/partials/print_kk.php | 446 +++++ app/views/partials/scroller.php | 68 + app/views/partials/side.left.php | 16 + app/views/partials/side.right.php | 355 ++++ app/views/partials/side.right.stat.php | 176 ++ app/views/partials/statistik.php | 176 ++ app/views/partials/statistik_blt.php | 183 ++ app/views/partials/statistik_jam.php | 125 ++ app/views/partials/statistik_ras.php | 122 ++ app/views/partials/statistik_sos.php | 113 ++ app/views/partials/sub_gallery.php | 30 + app/views/partials/wilayah.php | 55 + app/views/plan/menu.php | 48 + app/views/plan/nav.php | 24 + app/views/point/ajax_add_sub_point_form.php | 48 + app/views/point/form.php | 65 + app/views/point/sub_point_table.php | 69 + app/views/point/table.php | 141 ++ app/views/point/table2.php | 133 ++ .../polygon/ajax_add_sub_polygon_form.php | 35 + app/views/polygon/form.php | 37 + app/views/polygon/sub_polygon_table.php | 69 + app/views/polygon/table.php | 132 ++ app/views/print/headjs.php | 20 + app/views/program_bantuan/create.php | 127 ++ app/views/program_bantuan/detail.php | 106 ++ app/views/program_bantuan/edit.php | 134 ++ app/views/program_bantuan/form.php | 117 ++ app/views/program_bantuan/formsuccess.php | 34 + app/views/program_bantuan/menu_kiri.php | 9 + app/views/program_bantuan/panduan.php | 22 + app/views/program_bantuan/peserta.php | 57 + app/views/program_bantuan/program.php | 67 + app/views/program_bantuan/unduh-sheet.php | 51 + app/views/setting.php | 59 + app/views/setting/modul/form.php | 46 + app/views/setting/modul/table.php | 79 + app/views/setting/nav.php | 9 + .../kependudukan/ajax_add_anggota_form.php | 78 + .../ajax_add_anggota_rtm_form.php | 64 + .../sid/kependudukan/ajax_add_keluarga.php | 44 + app/views/sid/kependudukan/ajax_add_rtm.php | 49 + .../sid/kependudukan/ajax_add_rtm_kk.php | 41 + .../sid/kependudukan/ajax_adv_search_form.php | 92 + app/views/sid/kependudukan/ajax_delete.php | 14 + .../kependudukan/ajax_edit_anggota_form.php | 40 + .../kependudukan/ajax_edit_anggota_rtm.php | 39 + .../sid/kependudukan/ajax_edit_no_rtm.php | 17 + app/views/sid/kependudukan/ajax_edit_nokk.php | 65 + .../kependudukan/ajax_edit_status_dasar.php | 41 + .../sid/kependudukan/ajax_pindah_form.php | 60 + app/views/sid/kependudukan/ajax_query.php | 23 + app/views/sid/kependudukan/cetak_biodata.php | 186 ++ app/views/sid/kependudukan/cetak_kk.php | 131 ++ app/views/sid/kependudukan/cetak_rtm.php | 129 ++ app/views/sid/kependudukan/dokumen_ajax.php | 26 + app/views/sid/kependudukan/dokumen_form.php | 32 + app/views/sid/kependudukan/kartu_keluarga.php | 181 ++ app/views/sid/kependudukan/kartu_rtm.php | 176 ++ app/views/sid/kependudukan/keluarga.php | 178 ++ .../sid/kependudukan/keluarga_anggota.php | 79 + app/views/sid/kependudukan/keluarga_excel.php | 65 + app/views/sid/kependudukan/keluarga_form.php | 251 +++ .../sid/kependudukan/keluarga_form_a.php | 198 +++ .../sid/kependudukan/keluarga_jamkesmas.php | 151 ++ app/views/sid/kependudukan/keluarga_print.php | 52 + .../sid/kependudukan/keluarga_raskin.php | 150 ++ .../sid/kependudukan/keluarga_sosial.php | 140 ++ .../sid/kependudukan/keluarga_statistik.php | 185 ++ app/views/sid/kependudukan/maps.php | 64 + app/views/sid/kependudukan/penduduk.php | 234 +++ .../sid/kependudukan/penduduk_detail.php | 214 +++ .../sid/kependudukan/penduduk_dokumen.php | 59 + app/views/sid/kependudukan/penduduk_excel.php | 86 + app/views/sid/kependudukan/penduduk_form.php | 351 ++++ app/views/sid/kependudukan/penduduk_log.php | 203 +++ app/views/sid/kependudukan/penduduk_print.php | 80 + app/views/sid/kependudukan/rtm.php | 171 ++ app/views/sid/kependudukan/rtm_anggota.php | 82 + app/views/sid/kependudukan/rtm_excel.php | 42 + app/views/sid/kependudukan/rtm_excel_pbdt.php | 139 ++ app/views/sid/kependudukan/rtm_print.php | 47 + app/views/sid/nav.php | 19 + app/views/sid/wilayah/ajax_wil_dusun.php | 105 ++ app/views/sid/wilayah/ajax_wil_rw.php | 105 ++ app/views/sid/wilayah/list_dusun_rt.php | 106 ++ app/views/sid/wilayah/wilayah.php | 155 ++ app/views/sid/wilayah/wilayah_cetak.php | 51 + app/views/sid/wilayah/wilayah_excel.php | 66 + app/views/sid/wilayah/wilayah_form.php | 66 + app/views/sid/wilayah/wilayah_form_rt.php | 65 + app/views/sid/wilayah/wilayah_form_rw.php | 66 + app/views/sid/wilayah/wilayah_print.php | 74 + app/views/sid/wilayah/wilayah_rt.php | 90 + app/views/sid/wilayah/wilayah_rt_excel.php | 62 + app/views/sid/wilayah/wilayah_rt_print.php | 55 + app/views/sid/wilayah/wilayah_rw.php | 93 + app/views/sid/wilayah/wilayah_rw_excel.php | 65 + app/views/sid/wilayah/wilayah_rw_print.php | 58 + app/views/siteman.php | 43 + app/views/sms/ajax_anggota_form.php | 42 + app/views/sms/ajax_broadcast_form.php | 122 ++ app/views/sms/ajax_grup_form.php | 17 + app/views/sms/ajax_kontak_form.php | 28 + app/views/sms/ajax_kontak_form_edit.php | 20 + app/views/sms/ajax_penduduk_pindah_form.php | 58 + .../sms/ajax_penduduk_pindah_form_rt.php | 7 + .../sms/ajax_penduduk_pindah_form_rw.php | 7 + app/views/sms/ajax_polling_form.php | 22 + app/views/sms/ajax_sms_form.php | 20 + app/views/sms/ajax_sms_form_kirim.php | 44 + app/views/sms/berita_terkirim.php | 132 ++ app/views/sms/create_sms.php | 125 ++ app/views/sms/group.php | 119 ++ app/views/sms/group_detail.php | 121 ++ app/views/sms/kontak.php | 123 ++ app/views/sms/manajemen_sms_form.php | 152 ++ app/views/sms/manajemen_sms_table.php | 133 ++ app/views/sms/nav.php | 14 + app/views/sms/pertanyaan.php | 122 ++ app/views/sms/pesan_tertunda.php | 132 ++ app/views/sms/polling.php | 117 ++ app/views/sms/setting.php | 70 + app/views/sosmed/facebook.php | 56 + app/views/sosmed/google.php | 58 + app/views/sosmed/instagram.php | 58 + app/views/sosmed/twitter.php | 58 + app/views/sosmed/youtube.php | 58 + app/views/statistik/ajax_rentang_form.php | 17 + app/views/statistik/laporan/bulanan.php | 230 +++ app/views/statistik/laporan/bulanan_excel.php | 196 +++ app/views/statistik/laporan/bulanan_print.php | 189 +++ app/views/statistik/laporan/kelompok.php | 167 ++ .../statistik/laporan/kelompok_excel.php | 147 ++ .../statistik/laporan/kelompok_print.php | 141 ++ app/views/statistik/laporan/keluarga.php | 163 ++ app/views/statistik/laporan/pendidikan.php | 102 ++ app/views/statistik/laporan/penduduk.php | 111 ++ .../statistik/laporan/penduduk_tetap.php | 158 ++ app/views/statistik/laporan/perubahan.php | 199 +++ .../statistik/laporan/perubahan_print.php | 169 ++ app/views/statistik/menu.php | 48 + app/views/statistik/nav.php | 13 + app/views/statistik/penduduk.php | 156 ++ app/views/statistik/penduduk_excel.php | 58 + app/views/statistik/penduduk_graph.php | 168 ++ app/views/statistik/penduduk_pie.php | 143 ++ app/views/statistik/penduduk_print.php | 134 ++ app/views/statistik/rentang_umur.php | 65 + app/views/surat/form/surat_bio_penduduk.php | 171 ++ app/views/surat/form/surat_izin_keramaian.php | 146 ++ app/views/surat/form/surat_izin_orangtua.php | 164 ++ app/views/surat/form/surat_jalan.php | 140 ++ app/views/surat/form/surat_kehendak_nikah.php | 190 +++ app/views/surat/form/surat_ket_asalusul.php | 186 ++ app/views/surat/form/surat_ket_beda_nama.php | 172 ++ .../surat/form/surat_ket_catatan_kriminal.php | 137 ++ .../surat/form/surat_ket_domisili_usaha.php | 140 ++ app/views/surat/form/surat_ket_jual_beli.php | 171 ++ app/views/surat/form/surat_ket_kehilangan.php | 146 ++ app/views/surat/form/surat_ket_kelahiran.php | 173 ++ app/views/surat/form/surat_ket_kematian.php | 177 ++ .../form/surat_ket_kematian_suami_istri.php | 167 ++ .../surat/form/surat_ket_ktp_dlm_proses.php | 129 ++ .../surat/form/surat_ket_kurang_mampu.php | 134 ++ app/views/surat/form/surat_ket_lahir_mati.php | 161 ++ app/views/surat/form/surat_ket_nikah.php | 170 ++ app/views/surat/form/surat_ket_orangtua.php | 200 +++ app/views/surat/form/surat_ket_penduduk.php | 139 ++ app/views/surat/form/surat_ket_pengantar.php | 135 ++ .../surat/form/surat_ket_pindah_penduduk.php | 243 +++ app/views/surat/form/surat_ket_usaha.php | 146 ++ .../surat/form/surat_keterangan_rahasia.php | 216 +++ app/views/surat/form/surat_lap_kehilangan.php | 152 ++ .../surat/form/surat_permohonan_akta.php | 165 ++ .../surat_permohonan_duplikat_kelahiran.php | 168 ++ .../surat/form/surat_pernyataan_akta.php | 155 ++ .../surat/form/surat_persetujuan_mempelai.php | 165 ++ .../form/surat_pindah_antar_kab_prov.php | 140 ++ app/views/surat/format_surat.php | 64 + app/views/surat/nav.php | 16 + app/views/surat/panduan.php | 12 + .../surat/print/print_surat_bio_penduduk.php | 113 ++ .../print/print_surat_izin_keramaian.php | 96 ++ .../surat/print/print_surat_izin_orangtua.php | 124 ++ app/views/surat/print/print_surat_jalan.php | 95 ++ .../print/print_surat_kehendak_nikah.php | 120 ++ .../surat/print/print_surat_ket_asalusul.php | 142 ++ .../surat/print/print_surat_ket_beda_nama.php | 103 ++ .../print_surat_ket_catatan_kriminal.php | 96 ++ .../print/print_surat_ket_domisili_usaha.php | 102 ++ .../surat/print/print_surat_ket_jual_beli.php | 99 ++ .../print/print_surat_ket_kehilangan.php | 96 ++ .../surat/print/print_surat_ket_kelahiran.php | 119 ++ .../surat/print/print_surat_ket_kematian.php | 110 ++ .../print_surat_ket_kematian_suami_istri.php | 102 ++ .../print/print_surat_ket_ktp_dlm_proses.php | 102 ++ .../print/print_surat_ket_kurang_mampu.php | 96 ++ .../print/print_surat_ket_lahir_mati.php | 94 + .../surat/print/print_surat_ket_nikah.php | 99 ++ .../surat/print/print_surat_ket_orangtua.php | 123 ++ .../surat/print/print_surat_ket_penduduk.php | 100 ++ .../surat/print/print_surat_ket_pengantar.php | 104 ++ .../print/print_surat_ket_pindah_penduduk.php | 128 ++ .../surat/print/print_surat_ket_usaha.php | 104 ++ .../print/print_surat_keterangan_rahasia.php | 112 ++ .../print/print_surat_lap_kehilangan.php | 96 ++ .../print/print_surat_permohonan_akta.php | 139 ++ ...nt_surat_permohonan_duplikat_kelahiran.php | 111 ++ .../print/print_surat_pernyataan_akta.php | 88 + .../print_surat_persetujaun_mempelai.php | 134 ++ .../print_surat_pindah_antar_kab_prov.php | 95 ++ app/views/surat/signature.php | 262 +++ app/views/surat/surat_keluar.php | 125 ++ app/views/surat/surat_keluar_graph.php | 99 ++ app/views/surat/surat_keluar_perorangan.php | 165 ++ app/views/surat_master/ajax-upload.php | 28 + app/views/surat_master/atribut/ajax_form.php | 26 + app/views/surat_master/atribut/form.php | 39 + app/views/surat_master/atribut/table.php | 77 + app/views/surat_master/form.php | 33 + .../surat_master/manajemen_kuisioner_form.php | 70 + app/views/surat_master/table.php | 138 ++ .../web/artikel/ajax_add_kategori_form.php | 16 + app/views/web/artikel/form.php | 141 ++ app/views/web/artikel/table.php | 199 +++ app/views/web/artikel/widget-form.php | 111 ++ app/views/web/nav.php | 37 + app/views/web/spacer.php | 5 + app/views/welcome_message.php | 100 ++ index.php | 2 +- 573 files changed, 70342 insertions(+), 1 deletion(-) create mode 100644 app/.htaccess create mode 100644 app/cache/index.html create mode 100644 app/config/autoload.php create mode 100644 app/config/config.php create mode 100644 app/config/constants.php create mode 100644 app/config/database.php create mode 100644 app/config/doctypes.php create mode 100644 app/config/foreign_chars.php create mode 100644 app/config/hooks.php create mode 100644 app/config/index.html create mode 100644 app/config/memcached.php create mode 100644 app/config/migration.php create mode 100644 app/config/mimes.php create mode 100644 app/config/profiler.php create mode 100644 app/config/routes.php create mode 100644 app/config/smileys.php create mode 100644 app/config/user_agents.php create mode 100644 app/controllers/Analisis_grafik.php create mode 100644 app/controllers/Analisis_indikator.php create mode 100644 app/controllers/Analisis_kategori.php create mode 100644 app/controllers/Analisis_klasifikasi.php create mode 100644 app/controllers/Analisis_laporan.php create mode 100644 app/controllers/Analisis_master.php create mode 100644 app/controllers/Analisis_periode.php create mode 100644 app/controllers/Analisis_respon.php create mode 100644 app/controllers/Analisis_statistik_jawaban.php create mode 100644 app/controllers/Area.php create mode 100644 app/controllers/Data_persil.php create mode 100644 app/controllers/Database.php create mode 100644 app/controllers/Dokumen.php create mode 100644 app/controllers/Feed.php create mode 100644 app/controllers/First.php create mode 100644 app/controllers/Gallery.php create mode 100644 app/controllers/Garis.php create mode 100644 app/controllers/Gis.php create mode 100644 app/controllers/Hom_desa.php create mode 100644 app/controllers/Kategori.php create mode 100644 app/controllers/Kelompok.php create mode 100644 app/controllers/Kelompok_master.php create mode 100644 app/controllers/Keluar.php create mode 100644 app/controllers/Keluarga.php create mode 100644 app/controllers/Komentar.php create mode 100644 app/controllers/Lapor.php create mode 100644 app/controllers/Laporan.php create mode 100644 app/controllers/Laporan_rentan.php create mode 100644 app/controllers/Line.php create mode 100644 app/controllers/Main.php create mode 100644 app/controllers/Man_user.php create mode 100644 app/controllers/Mandiri.php create mode 100644 app/controllers/Menu.php create mode 100644 app/controllers/Modul.php create mode 100644 app/controllers/Penduduk.php create mode 100644 app/controllers/Penduduk_log.php create mode 100644 app/controllers/Pengurus.php create mode 100644 app/controllers/Plan.php create mode 100644 app/controllers/Point.php create mode 100644 app/controllers/Polygon.php create mode 100644 app/controllers/Program_bantuan.php create mode 100644 app/controllers/Rtm.php create mode 100644 app/controllers/Sid_core.php create mode 100644 app/controllers/Siteman.php create mode 100644 app/controllers/Sms.php create mode 100644 app/controllers/Sosmed.php create mode 100644 app/controllers/Statistik.php create mode 100644 app/controllers/Surat.php create mode 100644 app/controllers/Surat_master.php create mode 100644 app/controllers/User_setting.php create mode 100644 app/controllers/Web.php create mode 100644 app/controllers/Welcome.php create mode 100644 app/controllers/Widget.php create mode 100644 app/controllers/index.html create mode 100644 app/core/index.html create mode 100644 app/helpers/Donjolib_helper.php create mode 100644 app/helpers/Excel_helper.php create mode 100644 app/helpers/Pict_helper.php create mode 100644 app/helpers/index.html create mode 100644 app/hooks/index.html create mode 100644 app/index.html create mode 100644 app/language/english/index.html create mode 100644 app/language/index.html create mode 100644 app/libraries/Paging.php create mode 100644 app/libraries/index.html create mode 100644 app/logs/index.html create mode 100644 app/models/Analisis_grafik_model.php create mode 100644 app/models/Analisis_import_model.php create mode 100644 app/models/Analisis_indikator_model.php create mode 100644 app/models/Analisis_kategori_model.php create mode 100644 app/models/Analisis_klasifikasi_model.php create mode 100644 app/models/Analisis_laporan_model.php create mode 100644 app/models/Analisis_master_model.php create mode 100644 app/models/Analisis_periode_model.php create mode 100644 app/models/Analisis_respon_model.php create mode 100644 app/models/Analisis_statistik_jawaban_model.php create mode 100644 app/models/Apis.php create mode 100644 app/models/Config_model.php create mode 100644 app/models/Data_persil_model.php create mode 100644 app/models/Export_model.php create mode 100644 app/models/Feed_model.php create mode 100644 app/models/First_artikel_m.php create mode 100644 app/models/First_gallery_m.php create mode 100644 app/models/First_keluarga_m.php create mode 100644 app/models/First_m.php create mode 100644 app/models/First_menu_m.php create mode 100644 app/models/First_penduduk_m.php create mode 100644 app/models/First_slide_m.php create mode 100644 app/models/Header_model.php create mode 100644 app/models/Import_model.php create mode 100644 app/models/Kelompok_master_model.php create mode 100644 app/models/Kelompok_model.php create mode 100644 app/models/Keluarga_model.php create mode 100644 app/models/Laporan_bulanan_model.php create mode 100644 app/models/Laporan_penduduk_model.php create mode 100644 app/models/Laporan_perubahan_model.php create mode 100644 app/models/Mandiri_model.php create mode 100644 app/models/Modul_model.php create mode 100644 app/models/Pamong_model.php create mode 100644 app/models/Penduduk_model.php create mode 100644 app/models/Plan_area_model.php create mode 100644 app/models/Plan_garis_model.php create mode 100644 app/models/Plan_line_model.php create mode 100644 app/models/Plan_lokasi_model.php create mode 100644 app/models/Plan_point_model.php create mode 100644 app/models/Plan_polygon_model.php create mode 100644 app/models/Program_bantuan_model.php create mode 100644 app/models/Rtm_model.php create mode 100644 app/models/Sms_model.php create mode 100644 app/models/Surat_keluar_model.php create mode 100644 app/models/Surat_master_model.php create mode 100644 app/models/Surat_model.php create mode 100644 app/models/User_model.php create mode 100644 app/models/Web_artikel_model.php create mode 100644 app/models/Web_dokumen_model.php create mode 100644 app/models/Web_gallery_model.php create mode 100644 app/models/Web_kategori_model.php create mode 100644 app/models/Web_komentar_model.php create mode 100644 app/models/Web_menu_model.php create mode 100644 app/models/Web_sosmed_model.php create mode 100644 app/models/Web_statis_model.php create mode 100644 app/models/Web_widget_model.php create mode 100644 app/models/Wilayah_model.php create mode 100644 app/models/index.html create mode 100644 app/third_party/index.html create mode 100644 app/views/analisis_grafik/penduduk_excel.php create mode 100644 app/views/analisis_grafik/penduduk_pie.php create mode 100644 app/views/analisis_grafik/penduduk_print.php create mode 100644 app/views/analisis_grafik/table.php create mode 100644 app/views/analisis_grafik/time.php create mode 100644 app/views/analisis_indikator/form.php create mode 100644 app/views/analisis_indikator/manajemen_kuisioner_form.php create mode 100644 app/views/analisis_indikator/parameter/ajax_form.php create mode 100644 app/views/analisis_indikator/parameter/table.php create mode 100644 app/views/analisis_indikator/table.php create mode 100644 app/views/analisis_kategori/ajax_form.php create mode 100644 app/views/analisis_kategori/form.php create mode 100644 app/views/analisis_kategori/table.php create mode 100644 app/views/analisis_klasifikasi/ajax_form.php create mode 100644 app/views/analisis_klasifikasi/table.php create mode 100644 app/views/analisis_laporan/ajax_multi.php create mode 100644 app/views/analisis_laporan/form.php create mode 100644 app/views/analisis_laporan/table.php create mode 100644 app/views/analisis_laporan/table_excel.php create mode 100644 app/views/analisis_laporan/table_print.php create mode 100644 app/views/analisis_master/form.php create mode 100644 app/views/analisis_master/import.php create mode 100644 app/views/analisis_master/left.php create mode 100644 app/views/analisis_master/menu.php create mode 100644 app/views/analisis_master/nav.php create mode 100644 app/views/analisis_master/nav2.php create mode 100644 app/views/analisis_master/panduan.php create mode 100644 app/views/analisis_master/table.php create mode 100644 app/views/analisis_periode/form.php create mode 100644 app/views/analisis_periode/table.php create mode 100644 app/views/analisis_respon/form.php create mode 100644 app/views/analisis_respon/form_ajax.php create mode 100644 app/views/analisis_respon/import/aturan_ajax.php create mode 100644 app/views/analisis_respon/import/aturan_unduh.php create mode 100644 app/views/analisis_respon/import/data_ajax.php create mode 100644 app/views/analisis_respon/import/data_unduh.php create mode 100644 app/views/analisis_respon/import/import.php create mode 100644 app/views/analisis_respon/table.php create mode 100644 app/views/analisis_statistik_jawaban/form.php create mode 100644 app/views/analisis_statistik_jawaban/manajemen_kuisioner_form.php create mode 100644 app/views/analisis_statistik_jawaban/parameter/ajax_form.php create mode 100644 app/views/analisis_statistik_jawaban/parameter/form.php create mode 100644 app/views/analisis_statistik_jawaban/parameter/grafik_table.php create mode 100644 app/views/analisis_statistik_jawaban/parameter/subjek_excel.php create mode 100644 app/views/analisis_statistik_jawaban/parameter/subjek_table.php create mode 100644 app/views/analisis_statistik_jawaban/parameter/table.php create mode 100644 app/views/analisis_statistik_jawaban/parameter/table_print.php create mode 100644 app/views/analisis_statistik_jawaban/table.php create mode 100644 app/views/analisis_statistik_jawaban/table_excel.php create mode 100644 app/views/analisis_statistik_jawaban/table_print.php create mode 100644 app/views/area/ajax_add_sub_polygon_form.php create mode 100644 app/views/area/ajax_wil_dusun.php create mode 100644 app/views/area/form.php create mode 100644 app/views/area/maps.php create mode 100644 app/views/area/sub_line_table.php create mode 100644 app/views/area/table.php create mode 100644 app/views/data_persil/create.php create mode 100644 app/views/data_persil/create_ext.php create mode 100644 app/views/data_persil/detail.php create mode 100644 app/views/data_persil/edit.php create mode 100644 app/views/data_persil/import.php create mode 100644 app/views/data_persil/menu_kiri.php create mode 100644 app/views/data_persil/panduan.php create mode 100644 app/views/data_persil/persil.php create mode 100644 app/views/data_persil/persil_jenis.php create mode 100644 app/views/data_persil/persil_peruntukan.php create mode 100644 app/views/database/backup.php create mode 100644 app/views/database/export.php create mode 100644 app/views/dokumen/form.php create mode 100644 app/views/dokumen/table.php create mode 100644 app/views/errors/cli/error_404.php create mode 100644 app/views/errors/cli/error_db.php create mode 100644 app/views/errors/cli/error_exception.php create mode 100644 app/views/errors/cli/error_general.php create mode 100644 app/views/errors/cli/error_php.php create mode 100644 app/views/errors/cli/index.html create mode 100644 app/views/errors/html/error_404.php create mode 100644 app/views/errors/html/error_db.php create mode 100644 app/views/errors/html/error_exception.php create mode 100644 app/views/errors/html/error_general.php create mode 100644 app/views/errors/html/error_php.php create mode 100644 app/views/errors/html/index.html create mode 100644 app/views/errors/index.html create mode 100644 app/views/export/exp.php create mode 100644 app/views/export/penduduk_csv.php create mode 100644 app/views/export/penduduk_excel.php create mode 100644 app/views/feed.php create mode 100644 app/views/footer.php create mode 100644 app/views/gallery/form.php create mode 100644 app/views/gallery/form_sub_gallery.php create mode 100644 app/views/gallery/sub_gallery_table.php create mode 100644 app/views/gallery/table.php create mode 100644 app/views/garis/ajax_add_sub_line_form.php create mode 100644 app/views/garis/form.php create mode 100644 app/views/garis/maps.php create mode 100644 app/views/garis/sub_line_table.php create mode 100644 app/views/garis/table.php create mode 100644 app/views/garis/table2.php create mode 100644 app/views/gis/ajax_adv_search_form.php create mode 100644 app/views/gis/header.php create mode 100644 app/views/gis/maps.php create mode 100644 app/views/gis/menu.php create mode 100644 app/views/header-gis.php create mode 100644 app/views/header-min.php create mode 100644 app/views/header.php create mode 100644 app/views/home/about.php create mode 100644 app/views/home/ajax_kantor_desa_maps.php create mode 100644 app/views/home/ajax_wilayah_desa_maps.php create mode 100644 app/views/home/desa.php create mode 100644 app/views/home/konfigurasi_form.php create mode 100644 app/views/home/nav.php create mode 100644 app/views/home/pengurus.php create mode 100644 app/views/home/pengurus_form.php create mode 100644 app/views/import/imp.php create mode 100644 app/views/import/ppls.php create mode 100644 app/views/import/siak.php create mode 100644 app/views/index.html create mode 100644 app/views/init.php create mode 100644 app/views/install.php create mode 100644 app/views/kategori/ajax_add_sub_kategori_form.php create mode 100644 app/views/kategori/form.php create mode 100644 app/views/kategori/sub_kategori_table.php create mode 100644 app/views/kategori/table.php create mode 100644 app/views/kelompok/anggota/cetak.php create mode 100644 app/views/kelompok/anggota/excel.php create mode 100644 app/views/kelompok/anggota/form.php create mode 100644 app/views/kelompok/anggota/table.php create mode 100644 app/views/kelompok/cetak.php create mode 100644 app/views/kelompok/excel.php create mode 100644 app/views/kelompok/form.php create mode 100644 app/views/kelompok/table.php create mode 100644 app/views/kelompok_master/form.php create mode 100644 app/views/kelompok_master/table.php create mode 100644 app/views/komentar/form.php create mode 100644 app/views/komentar/table.php create mode 100644 app/views/lapor/form.php create mode 100644 app/views/lapor/nav.php create mode 100644 app/views/lapor/table.php create mode 100644 app/views/laporan/bulanan.php create mode 100644 app/views/laporan/bulanan_excel.php create mode 100644 app/views/laporan/bulanan_print.php create mode 100644 app/views/laporan/kelompok.php create mode 100644 app/views/laporan/kelompok_excel.php create mode 100644 app/views/laporan/kelompok_print.php create mode 100644 app/views/laporan/keluarga.php create mode 100644 app/views/laporan/pendidikan.php create mode 100644 app/views/laporan/penduduk.php create mode 100644 app/views/laporan/penduduk_tetap.php create mode 100644 app/views/laporan/perubahan.php create mode 100644 app/views/laporan/perubahan_print.php create mode 100644 app/views/layouts/analisis.tpl.php create mode 100644 app/views/layouts/arsip.tpl.php create mode 100644 app/views/layouts/artikel.tpl.php create mode 100644 app/views/layouts/gallery.tpl.php create mode 100644 app/views/layouts/header.php create mode 100644 app/views/layouts/main.tpl.php create mode 100644 app/views/layouts/mandiri.php create mode 100644 app/views/layouts/slide.php create mode 100644 app/views/layouts/stat.tpl.php create mode 100644 app/views/layouts/sub_gallery.tpl.php create mode 100644 app/views/layouts/teks_berjalan.php create mode 100644 app/views/line/ajax_add_sub_line_form.php create mode 100644 app/views/line/form.php create mode 100644 app/views/line/sub_line_table.php create mode 100644 app/views/line/table.php create mode 100644 app/views/lokasi/ajax_add_sub_point_form.php create mode 100644 app/views/lokasi/form.php create mode 100644 app/views/lokasi/maps.php create mode 100644 app/views/lokasi/sub_point_table.php create mode 100644 app/views/lokasi/table.php create mode 100644 app/views/man_user/manajemen_user_form.php create mode 100644 app/views/man_user/manajemen_user_table.php create mode 100644 app/views/man_user/nav.php create mode 100644 app/views/mandiri/ajax_pin.php create mode 100644 app/views/mandiri/mandiri.php create mode 100644 app/views/menu/ajax_add_sub_menu_form.php create mode 100644 app/views/menu/form.php create mode 100644 app/views/menu/sub_menu_table.php create mode 100644 app/views/menu/table.php create mode 100644 app/views/nav.php create mode 100644 app/views/partials/admin.tpl.php create mode 100644 app/views/partials/analisis.php create mode 100644 app/views/partials/arsip.php create mode 100644 app/views/partials/artikel-x.php create mode 100644 app/views/partials/artikel.php create mode 100644 app/views/partials/bottom.php create mode 100644 app/views/partials/bottom_admin.tpl.php create mode 100644 app/views/partials/bottom_menu.tpl.php create mode 100644 app/views/partials/breadcrumb.tpl.php create mode 100644 app/views/partials/cek.php create mode 100644 app/views/partials/chart.php create mode 100644 app/views/partials/content.php create mode 100644 app/views/partials/copywright.tpl.php create mode 100644 app/views/partials/gallery.php create mode 100644 app/views/partials/high.php create mode 100644 app/views/partials/lapor.php create mode 100644 app/views/partials/layanan.php create mode 100644 app/views/partials/mandiri.php create mode 100644 app/views/partials/menu.left.php create mode 100644 app/views/partials/menu.tpl.php create mode 100644 app/views/partials/print_kk.php create mode 100644 app/views/partials/scroller.php create mode 100644 app/views/partials/side.left.php create mode 100644 app/views/partials/side.right.php create mode 100644 app/views/partials/side.right.stat.php create mode 100644 app/views/partials/statistik.php create mode 100644 app/views/partials/statistik_blt.php create mode 100644 app/views/partials/statistik_jam.php create mode 100644 app/views/partials/statistik_ras.php create mode 100644 app/views/partials/statistik_sos.php create mode 100644 app/views/partials/sub_gallery.php create mode 100644 app/views/partials/wilayah.php create mode 100644 app/views/plan/menu.php create mode 100644 app/views/plan/nav.php create mode 100644 app/views/point/ajax_add_sub_point_form.php create mode 100644 app/views/point/form.php create mode 100644 app/views/point/sub_point_table.php create mode 100644 app/views/point/table.php create mode 100644 app/views/point/table2.php create mode 100644 app/views/polygon/ajax_add_sub_polygon_form.php create mode 100644 app/views/polygon/form.php create mode 100644 app/views/polygon/sub_polygon_table.php create mode 100644 app/views/polygon/table.php create mode 100644 app/views/print/headjs.php create mode 100644 app/views/program_bantuan/create.php create mode 100644 app/views/program_bantuan/detail.php create mode 100644 app/views/program_bantuan/edit.php create mode 100644 app/views/program_bantuan/form.php create mode 100644 app/views/program_bantuan/formsuccess.php create mode 100644 app/views/program_bantuan/menu_kiri.php create mode 100644 app/views/program_bantuan/panduan.php create mode 100644 app/views/program_bantuan/peserta.php create mode 100644 app/views/program_bantuan/program.php create mode 100644 app/views/program_bantuan/unduh-sheet.php create mode 100644 app/views/setting.php create mode 100644 app/views/setting/modul/form.php create mode 100644 app/views/setting/modul/table.php create mode 100644 app/views/setting/nav.php create mode 100644 app/views/sid/kependudukan/ajax_add_anggota_form.php create mode 100644 app/views/sid/kependudukan/ajax_add_anggota_rtm_form.php create mode 100644 app/views/sid/kependudukan/ajax_add_keluarga.php create mode 100644 app/views/sid/kependudukan/ajax_add_rtm.php create mode 100644 app/views/sid/kependudukan/ajax_add_rtm_kk.php create mode 100644 app/views/sid/kependudukan/ajax_adv_search_form.php create mode 100644 app/views/sid/kependudukan/ajax_delete.php create mode 100644 app/views/sid/kependudukan/ajax_edit_anggota_form.php create mode 100644 app/views/sid/kependudukan/ajax_edit_anggota_rtm.php create mode 100644 app/views/sid/kependudukan/ajax_edit_no_rtm.php create mode 100644 app/views/sid/kependudukan/ajax_edit_nokk.php create mode 100644 app/views/sid/kependudukan/ajax_edit_status_dasar.php create mode 100644 app/views/sid/kependudukan/ajax_pindah_form.php create mode 100644 app/views/sid/kependudukan/ajax_query.php create mode 100644 app/views/sid/kependudukan/cetak_biodata.php create mode 100644 app/views/sid/kependudukan/cetak_kk.php create mode 100644 app/views/sid/kependudukan/cetak_rtm.php create mode 100644 app/views/sid/kependudukan/dokumen_ajax.php create mode 100644 app/views/sid/kependudukan/dokumen_form.php create mode 100644 app/views/sid/kependudukan/kartu_keluarga.php create mode 100644 app/views/sid/kependudukan/kartu_rtm.php create mode 100644 app/views/sid/kependudukan/keluarga.php create mode 100644 app/views/sid/kependudukan/keluarga_anggota.php create mode 100644 app/views/sid/kependudukan/keluarga_excel.php create mode 100644 app/views/sid/kependudukan/keluarga_form.php create mode 100644 app/views/sid/kependudukan/keluarga_form_a.php create mode 100644 app/views/sid/kependudukan/keluarga_jamkesmas.php create mode 100644 app/views/sid/kependudukan/keluarga_print.php create mode 100644 app/views/sid/kependudukan/keluarga_raskin.php create mode 100644 app/views/sid/kependudukan/keluarga_sosial.php create mode 100644 app/views/sid/kependudukan/keluarga_statistik.php create mode 100644 app/views/sid/kependudukan/maps.php create mode 100644 app/views/sid/kependudukan/penduduk.php create mode 100644 app/views/sid/kependudukan/penduduk_detail.php create mode 100644 app/views/sid/kependudukan/penduduk_dokumen.php create mode 100644 app/views/sid/kependudukan/penduduk_excel.php create mode 100644 app/views/sid/kependudukan/penduduk_form.php create mode 100644 app/views/sid/kependudukan/penduduk_log.php create mode 100644 app/views/sid/kependudukan/penduduk_print.php create mode 100644 app/views/sid/kependudukan/rtm.php create mode 100644 app/views/sid/kependudukan/rtm_anggota.php create mode 100644 app/views/sid/kependudukan/rtm_excel.php create mode 100644 app/views/sid/kependudukan/rtm_excel_pbdt.php create mode 100644 app/views/sid/kependudukan/rtm_print.php create mode 100644 app/views/sid/nav.php create mode 100644 app/views/sid/wilayah/ajax_wil_dusun.php create mode 100644 app/views/sid/wilayah/ajax_wil_rw.php create mode 100644 app/views/sid/wilayah/list_dusun_rt.php create mode 100644 app/views/sid/wilayah/wilayah.php create mode 100644 app/views/sid/wilayah/wilayah_cetak.php create mode 100644 app/views/sid/wilayah/wilayah_excel.php create mode 100644 app/views/sid/wilayah/wilayah_form.php create mode 100644 app/views/sid/wilayah/wilayah_form_rt.php create mode 100644 app/views/sid/wilayah/wilayah_form_rw.php create mode 100644 app/views/sid/wilayah/wilayah_print.php create mode 100644 app/views/sid/wilayah/wilayah_rt.php create mode 100644 app/views/sid/wilayah/wilayah_rt_excel.php create mode 100644 app/views/sid/wilayah/wilayah_rt_print.php create mode 100644 app/views/sid/wilayah/wilayah_rw.php create mode 100644 app/views/sid/wilayah/wilayah_rw_excel.php create mode 100644 app/views/sid/wilayah/wilayah_rw_print.php create mode 100644 app/views/siteman.php create mode 100644 app/views/sms/ajax_anggota_form.php create mode 100644 app/views/sms/ajax_broadcast_form.php create mode 100644 app/views/sms/ajax_grup_form.php create mode 100644 app/views/sms/ajax_kontak_form.php create mode 100644 app/views/sms/ajax_kontak_form_edit.php create mode 100644 app/views/sms/ajax_penduduk_pindah_form.php create mode 100644 app/views/sms/ajax_penduduk_pindah_form_rt.php create mode 100644 app/views/sms/ajax_penduduk_pindah_form_rw.php create mode 100644 app/views/sms/ajax_polling_form.php create mode 100644 app/views/sms/ajax_sms_form.php create mode 100644 app/views/sms/ajax_sms_form_kirim.php create mode 100644 app/views/sms/berita_terkirim.php create mode 100644 app/views/sms/create_sms.php create mode 100644 app/views/sms/group.php create mode 100644 app/views/sms/group_detail.php create mode 100644 app/views/sms/kontak.php create mode 100644 app/views/sms/manajemen_sms_form.php create mode 100644 app/views/sms/manajemen_sms_table.php create mode 100644 app/views/sms/nav.php create mode 100644 app/views/sms/pertanyaan.php create mode 100644 app/views/sms/pesan_tertunda.php create mode 100644 app/views/sms/polling.php create mode 100644 app/views/sms/setting.php create mode 100644 app/views/sosmed/facebook.php create mode 100644 app/views/sosmed/google.php create mode 100644 app/views/sosmed/instagram.php create mode 100644 app/views/sosmed/twitter.php create mode 100644 app/views/sosmed/youtube.php create mode 100644 app/views/statistik/ajax_rentang_form.php create mode 100644 app/views/statistik/laporan/bulanan.php create mode 100644 app/views/statistik/laporan/bulanan_excel.php create mode 100644 app/views/statistik/laporan/bulanan_print.php create mode 100644 app/views/statistik/laporan/kelompok.php create mode 100644 app/views/statistik/laporan/kelompok_excel.php create mode 100644 app/views/statistik/laporan/kelompok_print.php create mode 100644 app/views/statistik/laporan/keluarga.php create mode 100644 app/views/statistik/laporan/pendidikan.php create mode 100644 app/views/statistik/laporan/penduduk.php create mode 100644 app/views/statistik/laporan/penduduk_tetap.php create mode 100644 app/views/statistik/laporan/perubahan.php create mode 100644 app/views/statistik/laporan/perubahan_print.php create mode 100644 app/views/statistik/menu.php create mode 100644 app/views/statistik/nav.php create mode 100644 app/views/statistik/penduduk.php create mode 100644 app/views/statistik/penduduk_excel.php create mode 100644 app/views/statistik/penduduk_graph.php create mode 100644 app/views/statistik/penduduk_pie.php create mode 100644 app/views/statistik/penduduk_print.php create mode 100644 app/views/statistik/rentang_umur.php create mode 100644 app/views/surat/form/surat_bio_penduduk.php create mode 100644 app/views/surat/form/surat_izin_keramaian.php create mode 100644 app/views/surat/form/surat_izin_orangtua.php create mode 100644 app/views/surat/form/surat_jalan.php create mode 100644 app/views/surat/form/surat_kehendak_nikah.php create mode 100644 app/views/surat/form/surat_ket_asalusul.php create mode 100644 app/views/surat/form/surat_ket_beda_nama.php create mode 100644 app/views/surat/form/surat_ket_catatan_kriminal.php create mode 100644 app/views/surat/form/surat_ket_domisili_usaha.php create mode 100644 app/views/surat/form/surat_ket_jual_beli.php create mode 100644 app/views/surat/form/surat_ket_kehilangan.php create mode 100644 app/views/surat/form/surat_ket_kelahiran.php create mode 100644 app/views/surat/form/surat_ket_kematian.php create mode 100644 app/views/surat/form/surat_ket_kematian_suami_istri.php create mode 100644 app/views/surat/form/surat_ket_ktp_dlm_proses.php create mode 100644 app/views/surat/form/surat_ket_kurang_mampu.php create mode 100644 app/views/surat/form/surat_ket_lahir_mati.php create mode 100644 app/views/surat/form/surat_ket_nikah.php create mode 100644 app/views/surat/form/surat_ket_orangtua.php create mode 100644 app/views/surat/form/surat_ket_penduduk.php create mode 100644 app/views/surat/form/surat_ket_pengantar.php create mode 100644 app/views/surat/form/surat_ket_pindah_penduduk.php create mode 100644 app/views/surat/form/surat_ket_usaha.php create mode 100644 app/views/surat/form/surat_keterangan_rahasia.php create mode 100644 app/views/surat/form/surat_lap_kehilangan.php create mode 100644 app/views/surat/form/surat_permohonan_akta.php create mode 100644 app/views/surat/form/surat_permohonan_duplikat_kelahiran.php create mode 100644 app/views/surat/form/surat_pernyataan_akta.php create mode 100644 app/views/surat/form/surat_persetujuan_mempelai.php create mode 100644 app/views/surat/form/surat_pindah_antar_kab_prov.php create mode 100644 app/views/surat/format_surat.php create mode 100644 app/views/surat/nav.php create mode 100644 app/views/surat/panduan.php create mode 100644 app/views/surat/print/print_surat_bio_penduduk.php create mode 100644 app/views/surat/print/print_surat_izin_keramaian.php create mode 100644 app/views/surat/print/print_surat_izin_orangtua.php create mode 100644 app/views/surat/print/print_surat_jalan.php create mode 100644 app/views/surat/print/print_surat_kehendak_nikah.php create mode 100644 app/views/surat/print/print_surat_ket_asalusul.php create mode 100644 app/views/surat/print/print_surat_ket_beda_nama.php create mode 100644 app/views/surat/print/print_surat_ket_catatan_kriminal.php create mode 100644 app/views/surat/print/print_surat_ket_domisili_usaha.php create mode 100644 app/views/surat/print/print_surat_ket_jual_beli.php create mode 100644 app/views/surat/print/print_surat_ket_kehilangan.php create mode 100644 app/views/surat/print/print_surat_ket_kelahiran.php create mode 100644 app/views/surat/print/print_surat_ket_kematian.php create mode 100644 app/views/surat/print/print_surat_ket_kematian_suami_istri.php create mode 100644 app/views/surat/print/print_surat_ket_ktp_dlm_proses.php create mode 100644 app/views/surat/print/print_surat_ket_kurang_mampu.php create mode 100644 app/views/surat/print/print_surat_ket_lahir_mati.php create mode 100644 app/views/surat/print/print_surat_ket_nikah.php create mode 100644 app/views/surat/print/print_surat_ket_orangtua.php create mode 100644 app/views/surat/print/print_surat_ket_penduduk.php create mode 100644 app/views/surat/print/print_surat_ket_pengantar.php create mode 100644 app/views/surat/print/print_surat_ket_pindah_penduduk.php create mode 100644 app/views/surat/print/print_surat_ket_usaha.php create mode 100644 app/views/surat/print/print_surat_keterangan_rahasia.php create mode 100644 app/views/surat/print/print_surat_lap_kehilangan.php create mode 100644 app/views/surat/print/print_surat_permohonan_akta.php create mode 100644 app/views/surat/print/print_surat_permohonan_duplikat_kelahiran.php create mode 100644 app/views/surat/print/print_surat_pernyataan_akta.php create mode 100644 app/views/surat/print/print_surat_persetujaun_mempelai.php create mode 100644 app/views/surat/print/print_surat_pindah_antar_kab_prov.php create mode 100644 app/views/surat/signature.php create mode 100644 app/views/surat/surat_keluar.php create mode 100644 app/views/surat/surat_keluar_graph.php create mode 100644 app/views/surat/surat_keluar_perorangan.php create mode 100644 app/views/surat_master/ajax-upload.php create mode 100644 app/views/surat_master/atribut/ajax_form.php create mode 100644 app/views/surat_master/atribut/form.php create mode 100644 app/views/surat_master/atribut/table.php create mode 100644 app/views/surat_master/form.php create mode 100644 app/views/surat_master/manajemen_kuisioner_form.php create mode 100644 app/views/surat_master/table.php create mode 100644 app/views/web/artikel/ajax_add_kategori_form.php create mode 100644 app/views/web/artikel/form.php create mode 100644 app/views/web/artikel/table.php create mode 100644 app/views/web/artikel/widget-form.php create mode 100644 app/views/web/nav.php create mode 100644 app/views/web/spacer.php create mode 100644 app/views/welcome_message.php diff --git a/app/.htaccess b/app/.htaccess new file mode 100644 index 000000000..6c63ed4c4 --- /dev/null +++ b/app/.htaccess @@ -0,0 +1,6 @@ + + Require all denied + + + Deny from all + \ No newline at end of file diff --git a/app/cache/index.html b/app/cache/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/cache/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/config/autoload.php b/app/config/autoload.php new file mode 100644 index 000000000..7a79f0bc5 --- /dev/null +++ b/app/config/autoload.php @@ -0,0 +1,135 @@ + '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','donjolib','date','pict'); + +/* +| ------------------------------------------------------------------- +| Auto-load Config files +| ------------------------------------------------------------------- +| Prototype: +| +| $autoload['config'] = array('config1', 'config2'); +| +| NOTE: This item is intended for use ONLY if you have created custom +| config files. Otherwise, leave it blank. +| +*/ +$autoload['config'] = array(); + +/* +| ------------------------------------------------------------------- +| Auto-load Language files +| ------------------------------------------------------------------- +| Prototype: +| +| $autoload['language'] = array('lang1', 'lang2'); +| +| NOTE: Do not include the "_lang" part of your file. For example +| "codeigniter_lang.php" would be referenced as array('codeigniter'); +| +*/ +$autoload['language'] = array(); + +/* +| ------------------------------------------------------------------- +| Auto-load Models +| ------------------------------------------------------------------- +| Prototype: +| +| $autoload['model'] = array('first_model', 'second_model'); +| +| You can also supply an alternative model name to be assigned +| in the controller: +| +| $autoload['model'] = array('first_model' => 'first'); +*/ +$autoload['model'] = array(); diff --git a/app/config/config.php b/app/config/config.php new file mode 100644 index 000000000..a121a7ac1 --- /dev/null +++ b/app/config/config.php @@ -0,0 +1,534 @@ +]+$/i +| +| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! +| +*/ +$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; + +/* +|-------------------------------------------------------------------------- +| Enable Query Strings +|-------------------------------------------------------------------------- +| +| By default CodeIgniter uses search-engine friendly segment based URLs: +| example.com/who/what/where/ +| +| You can optionally enable standard query string based URLs: +| example.com?who=me&what=something&where=here +| +| Options are: TRUE or FALSE (boolean) +| +| The other items let you set the query string 'words' that will +| invoke your controllers and its functions: +| example.com/index.php?c=controller&m=function +| +| Please note that some of the helpers won't work as expected when +| this feature is enabled, since CodeIgniter is designed primarily to +| use segment based URLs. +| +*/ +$config['enable_query_strings'] = FALSE; +$config['controller_trigger'] = 'c'; +$config['function_trigger'] = 'm'; +$config['directory_trigger'] = 'd'; + +/* +|-------------------------------------------------------------------------- +| Allow $_GET array +|-------------------------------------------------------------------------- +| +| By default CodeIgniter enables access to the $_GET array. If for some +| reason you would like to disable it, set 'allow_get_array' to FALSE. +| +| WARNING: This feature is DEPRECATED and currently available only +| for backwards compatibility purposes! +| +*/ +$config['allow_get_array'] = TRUE; + +/* +|-------------------------------------------------------------------------- +| Error Logging Threshold +|-------------------------------------------------------------------------- +| +| You can enable error logging by setting a threshold over zero. The +| threshold determines what gets logged. Threshold options are: +| +| 0 = Disables logging, Error logging TURNED OFF +| 1 = Error Messages (including PHP errors) +| 2 = Debug Messages +| 3 = Informational Messages +| 4 = All Messages +| +| You can also pass an array with threshold levels to show individual error types +| +| array(2) = Debug Messages, without Error Messages +| +| For a live site you'll usually only enable Errors (1) to be logged otherwise +| your log files will fill up very fast. +| +*/ +$config['log_threshold'] = 0; + +/* +|-------------------------------------------------------------------------- +| Error Logging Directory Path +|-------------------------------------------------------------------------- +| +| Leave this BLANK unless you would like to set something other than the default +| application/logs/ directory. Use a full server path with trailing slash. +| +*/ +$config['log_path'] = ''; + +/* +|-------------------------------------------------------------------------- +| Log File Extension +|-------------------------------------------------------------------------- +| +| The default filename extension for log files. The default 'php' allows for +| protecting the log files via basic scripting, when they are to be stored +| under a publicly accessible directory. +| +| Note: Leaving it blank will default to 'php'. +| +*/ +$config['log_file_extension'] = ''; + +/* +|-------------------------------------------------------------------------- +| Log File Permissions +|-------------------------------------------------------------------------- +| +| The file system permissions to be applied on newly created log files. +| +| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal +| integer notation (i.e. 0700, 0644, etc.) +*/ +$config['log_file_permissions'] = 0644; + +/* +|-------------------------------------------------------------------------- +| Date Format for Logs +|-------------------------------------------------------------------------- +| +| Each item that is logged has an associated date. You can use PHP date +| codes to set your own date formatting +| +*/ +$config['log_date_format'] = 'Y-m-d H:i:s'; + +/* +|-------------------------------------------------------------------------- +| Error Views Directory Path +|-------------------------------------------------------------------------- +| +| Leave this BLANK unless you would like to set something other than the default +| application/views/errors/ directory. Use a full server path with trailing slash. +| +*/ +$config['error_views_path'] = ''; + +/* +|-------------------------------------------------------------------------- +| Cache Directory Path +|-------------------------------------------------------------------------- +| +| Leave this BLANK unless you would like to set something other than the default +| application/cache/ directory. Use a full server path with trailing slash. +| +*/ +$config['cache_path'] = ''; + +/* +|-------------------------------------------------------------------------- +| Cache Include Query String +|-------------------------------------------------------------------------- +| +| Whether to take the URL query string into consideration when generating +| output cache files. Valid options are: +| +| FALSE = Disabled +| TRUE = Enabled, take all query parameters into account. +| Please be aware that this may result in numerous cache +| files generated for the same page over and over again. +| array('q') = Enabled, but only take into account the specified list +| of query parameters. +| +*/ +$config['cache_query_string'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Encryption Key +|-------------------------------------------------------------------------- +| +| If you use the Encryption class, you must set an encryption key. +| See the user guide for more info. +| +| https://codeigniter.com/userguide3/libraries/encryption.html +| +*/ +$config['encryption_key'] = ''; + +/* +|-------------------------------------------------------------------------- +| Session Variables +|-------------------------------------------------------------------------- +| +| 'sess_driver' +| +| The storage driver to use: files, database, redis, memcached +| +| 'sess_cookie_name' +| +| The session cookie name, must contain only [0-9a-z_-] characters +| +| 'sess_samesite' +| +| Session cookie SameSite attribute: Lax (default), Strict or None +| +| 'sess_expiration' +| +| The number of SECONDS you want the session to last. +| Setting to 0 (zero) means expire when the browser is closed. +| +| 'sess_save_path' +| +| The location to save sessions to, driver dependent. +| +| For the 'files' driver, it's a path to a writable directory. +| WARNING: Only absolute paths are supported! +| +| For the 'database' driver, it's a table name. +| Please read up the manual for the format with other session drivers. +| +| IMPORTANT: You are REQUIRED to set a valid save path! +| +| 'sess_match_ip' +| +| Whether to match the user's IP address when reading the session data. +| +| WARNING: If you're using the database driver, don't forget to update +| your session table's PRIMARY KEY when changing this setting. +| +| 'sess_time_to_update' +| +| How many seconds between CI regenerating the session ID. +| +| 'sess_regenerate_destroy' +| +| Whether to destroy session data associated with the old session ID +| when auto-regenerating the session ID. When set to FALSE, the data +| will be later deleted by the garbage collector. +| +| Other session cookie settings are shared with the rest of the application, +| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here. +| +*/ +$config['sess_driver'] = 'files'; +$config['sess_cookie_name'] = 'ci_session'; +$config['sess_samesite'] = 'Lax'; +$config['sess_expiration'] = 7200; +$config['sess_save_path'] = NULL; +$config['sess_match_ip'] = FALSE; +$config['sess_time_to_update'] = 300; +$config['sess_regenerate_destroy'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Cookie Related Variables +|-------------------------------------------------------------------------- +| +| 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions +| 'cookie_domain' = Set to .your-domain.com for site-wide cookies +| 'cookie_path' = Typically will be a forward slash +| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists. +| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript) +| 'cookie_samesite' = Cookie's samesite attribute (Lax, Strict or None) +| +| Note: These settings (with the exception of 'cookie_prefix' and +| 'cookie_httponly') will also affect sessions. +| +*/ +$config['cookie_prefix'] = ''; +$config['cookie_domain'] = ''; +$config['cookie_path'] = '/'; +$config['cookie_secure'] = FALSE; +$config['cookie_httponly'] = FALSE; +$config['cookie_samesite'] = 'Lax'; + +/* +|-------------------------------------------------------------------------- +| Standardize newlines +|-------------------------------------------------------------------------- +| +| Determines whether to standardize newline characters in input data, +| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value. +| +| WARNING: This feature is DEPRECATED and currently available only +| for backwards compatibility purposes! +| +*/ +$config['standardize_newlines'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Global XSS Filtering +|-------------------------------------------------------------------------- +| +| Determines whether the XSS filter is always active when GET, POST or +| COOKIE data is encountered +| +| WARNING: This feature is DEPRECATED and currently available only +| for backwards compatibility purposes! +| +*/ +$config['global_xss_filtering'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Cross Site Request Forgery +|-------------------------------------------------------------------------- +| Enables a CSRF cookie token to be set. When set to TRUE, token will be +| checked on a submitted form. If you are accepting user data, it is strongly +| recommended CSRF protection be enabled. +| +| 'csrf_token_name' = The token name +| 'csrf_cookie_name' = The cookie name +| 'csrf_expire' = The number in seconds the token should expire. +| 'csrf_regenerate' = Regenerate token on every submission +| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks +*/ +$config['csrf_protection'] = FALSE; +$config['csrf_token_name'] = 'csrf_test_name'; +$config['csrf_cookie_name'] = 'csrf_cookie_name'; +$config['csrf_expire'] = 7200; +$config['csrf_regenerate'] = TRUE; +$config['csrf_exclude_uris'] = array(); + +/* +|-------------------------------------------------------------------------- +| Output Compression +|-------------------------------------------------------------------------- +| +| Enables Gzip output compression for faster page loads. When enabled, +| the output class will test whether your server supports Gzip. +| Even if it does, however, not all browsers support compression +| so enable only if you are reasonably sure your visitors can handle it. +| +| Only used if zlib.output_compression is turned off in your php.ini. +| Please do not use it together with httpd-level output compression. +| +| VERY IMPORTANT: If you are getting a blank page when compression is enabled it +| means you are prematurely outputting something to your browser. It could +| even be a line of whitespace at the end of one of your scripts. For +| compression to work, nothing can be sent before the output buffer is called +| by the output class. Do not 'echo' any values with compression enabled. +| +*/ +$config['compress_output'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Master Time Reference +|-------------------------------------------------------------------------- +| +| Options are 'local' or any PHP supported timezone. This preference tells +| the system whether to use your server's local time as the master 'now' +| reference, or convert it to the configured one timezone. See the 'date +| helper' page of the user guide for information regarding date handling. +| +*/ +$config['time_reference'] = 'local'; + +/* +|-------------------------------------------------------------------------- +| Rewrite PHP Short Tags +|-------------------------------------------------------------------------- +| +| If your PHP installation does not have short tag support enabled CI +| can rewrite the tags on-the-fly, enabling you to utilize that syntax +| in your view files. Options are TRUE or FALSE (boolean) +| +| Note: You need to have eval() enabled for this to work. +| +*/ +$config['rewrite_short_tags'] = FALSE; + +/* +|-------------------------------------------------------------------------- +| Reverse Proxy IPs +|-------------------------------------------------------------------------- +| +| If your server is behind a reverse proxy, you must whitelist the proxy +| IP addresses from which CodeIgniter should trust headers such as +| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify +| the visitor's IP address. +| +| You can use both an array or a comma-separated list of proxy addresses, +| as well as specifying whole subnets. Here are a few examples: +| +| Comma-separated: '10.0.1.200,192.168.5.0/24' +| Array: array('10.0.1.200', '192.168.5.0/24') +*/ +$config['proxy_ips'] = ''; diff --git a/app/config/constants.php b/app/config/constants.php new file mode 100644 index 000000000..35c5c68da --- /dev/null +++ b/app/config/constants.php @@ -0,0 +1,87 @@ +db->last_query() and profiling of DB queries. +| When you run a query, with this setting set to TRUE (default), +| CodeIgniter will store the SQL statement for debugging purposes. +| However, this may cause high memory usage, especially if you run +| a lot of SQL queries ... disable this to avoid that problem. +| +| The $active_group variable lets you choose which connection group to +| make active. By default there is only one group (the 'default' group). +| +| The $query_builder variables lets you determine whether or not to load +| the query builder class. +*/ +$active_group = 'default'; +$query_builder = TRUE; + +$db['default'] = array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => '', + 'password' => '', + 'database' => '', + '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 +); diff --git a/app/config/doctypes.php b/app/config/doctypes.php new file mode 100644 index 000000000..59a7991e3 --- /dev/null +++ b/app/config/doctypes.php @@ -0,0 +1,24 @@ + '', + 'xhtml1-strict' => '', + 'xhtml1-trans' => '', + 'xhtml1-frame' => '', + 'xhtml-basic11' => '', + 'html5' => '', + 'html4-strict' => '', + 'html4-trans' => '', + 'html4-frame' => '', + 'mathml1' => '', + 'mathml2' => '', + 'svg10' => '', + 'svg11' => '', + 'svg11-basic' => '', + 'svg11-tiny' => '', + 'xhtml-math-svg-xh' => '', + 'xhtml-math-svg-sh' => '', + 'xhtml-rdfa-1' => '', + 'xhtml-rdfa-2' => '' +); diff --git a/app/config/foreign_chars.php b/app/config/foreign_chars.php new file mode 100644 index 000000000..0231f3592 --- /dev/null +++ b/app/config/foreign_chars.php @@ -0,0 +1,114 @@ + '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' +); diff --git a/app/config/hooks.php b/app/config/hooks.php new file mode 100644 index 000000000..79c5c162f --- /dev/null +++ b/app/config/hooks.php @@ -0,0 +1,13 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/config/memcached.php b/app/config/memcached.php new file mode 100644 index 000000000..65a149617 --- /dev/null +++ b/app/config/memcached.php @@ -0,0 +1,19 @@ + array( + 'hostname' => '127.0.0.1', + 'port' => '11211', + 'weight' => '1', + ), +); diff --git a/app/config/migration.php b/app/config/migration.php new file mode 100644 index 000000000..4b585a65c --- /dev/null +++ b/app/config/migration.php @@ -0,0 +1,84 @@ +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/'; diff --git a/app/config/mimes.php b/app/config/mimes.php new file mode 100644 index 000000000..b2e989fea --- /dev/null +++ b/app/config/mimes.php @@ -0,0 +1,186 @@ + array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'), + 'cpt' => 'application/mac-compactpro', + 'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'), + 'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'), + 'dms' => 'application/octet-stream', + 'lha' => 'application/octet-stream', + 'lzh' => 'application/octet-stream', + 'exe' => array('application/octet-stream', 'application/x-msdownload'), + 'class' => 'application/octet-stream', + 'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'), + 'so' => 'application/octet-stream', + 'sea' => 'application/octet-stream', + 'dll' => 'application/octet-stream', + 'oda' => 'application/oda', + 'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'), + 'ai' => array('application/pdf', 'application/postscript'), + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'mif' => 'application/vnd.mif', + 'xls' => array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'), + 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'), + 'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'), + 'wbxml' => 'application/wbxml', + 'wmlc' => 'application/wmlc', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'gtar' => 'application/x-gtar', + 'gz' => 'application/x-gzip', + 'gzip' => 'application/x-gzip', + 'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'), + 'php4' => 'application/x-httpd-php', + 'php3' => 'application/x-httpd-php', + 'phtml' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'js' => array('application/x-javascript', 'text/plain'), + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'tar' => 'application/x-tar', + 'tgz' => array('application/x-tar', 'application/x-gzip-compressed'), + 'z' => 'application/x-compress', + 'xhtml' => 'application/xhtml+xml', + 'xht' => 'application/xhtml+xml', + 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'), + 'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'), + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mpga' => 'audio/mpeg', + 'mp2' => 'audio/mpeg', + 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'), + 'aif' => array('audio/x-aiff', 'audio/aiff'), + 'aiff' => array('audio/x-aiff', 'audio/aiff'), + 'aifc' => 'audio/x-aiff', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'rv' => 'video/vnd.rn-realvideo', + 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'), + 'bmp' => array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'), + 'gif' => 'image/gif', + 'jpeg' => array('image/jpeg', 'image/pjpeg'), + 'jpg' => array('image/jpeg', 'image/pjpeg'), + 'jpe' => array('image/jpeg', 'image/pjpeg'), + 'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'), + 'png' => array('image/png', 'image/x-png'), + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'heic' => 'image/heic', + 'heif' => 'image/heif', + 'css' => array('text/css', 'text/plain'), + 'html' => array('text/html', 'text/plain'), + 'htm' => array('text/html', 'text/plain'), + 'shtml' => array('text/html', 'text/plain'), + 'txt' => 'text/plain', + 'text' => 'text/plain', + 'log' => array('text/plain', 'text/x-log'), + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'xml' => array('application/xml', 'text/xml', 'text/plain'), + 'xsl' => array('application/xml', 'text/xsl', 'text/xml'), + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'qt' => 'video/quicktime', + 'mov' => 'video/quicktime', + 'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'), + 'movie' => 'video/x-sgi-movie', + 'doc' => array('application/msword', 'application/vnd.ms-office'), + 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'), + 'dot' => array('application/msword', 'application/vnd.ms-office'), + 'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'), + 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'), + 'word' => array('application/msword', 'application/octet-stream'), + 'xl' => 'application/excel', + 'eml' => 'message/rfc822', + 'json' => array('application/json', 'text/json'), + 'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'), + 'p10' => array('application/x-pkcs10', 'application/pkcs10'), + 'p12' => 'application/x-pkcs12', + 'p7a' => 'application/x-pkcs7-signature', + 'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'), + 'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'), + 'p7r' => 'application/x-pkcs7-certreqresp', + 'p7s' => 'application/pkcs7-signature', + 'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'), + 'crl' => array('application/pkix-crl', 'application/pkcs-crl'), + 'der' => 'application/x-x509-ca-cert', + 'kdb' => 'application/octet-stream', + 'pgp' => 'application/pgp', + 'gpg' => 'application/gpg-keys', + 'sst' => 'application/octet-stream', + 'csr' => 'application/octet-stream', + 'rsa' => 'application/x-pkcs7', + 'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'), + '3g2' => 'video/3gpp2', + '3gp' => array('video/3gp', 'video/3gpp'), + 'mp4' => 'video/mp4', + 'm4a' => 'audio/x-m4a', + 'f4v' => array('video/mp4', 'video/x-f4v'), + 'flv' => 'video/x-flv', + 'webm' => 'video/webm', + 'aac' => array('audio/x-aac', 'audio/aac'), + 'm4u' => 'application/vnd.mpegurl', + 'm3u' => 'text/plain', + 'xspf' => 'application/xspf+xml', + 'vlc' => 'application/videolan', + 'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'), + 'au' => 'audio/x-au', + 'ac3' => 'audio/ac3', + 'flac' => 'audio/x-flac', + 'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'), + 'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'), + 'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'), + 'ics' => 'text/calendar', + 'ical' => 'text/calendar', + 'zsh' => 'text/x-scriptzsh', + '7z' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'), + '7zip' => array('application/x-7z-compressed', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'), + 'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'), + 'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'), + 'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'), + 'svg' => array('image/svg+xml', 'image/svg', 'application/xml', 'text/xml'), + 'vcf' => 'text/x-vcard', + 'srt' => array('text/srt', 'text/plain'), + 'vtt' => array('text/vtt', 'text/plain'), + 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon'), + 'odc' => 'application/vnd.oasis.opendocument.chart', + 'otc' => 'application/vnd.oasis.opendocument.chart-template', + 'odf' => 'application/vnd.oasis.opendocument.formula', + 'otf' => 'application/vnd.oasis.opendocument.formula-template', + 'odg' => 'application/vnd.oasis.opendocument.graphics', + 'otg' => 'application/vnd.oasis.opendocument.graphics-template', + 'odi' => 'application/vnd.oasis.opendocument.image', + 'oti' => 'application/vnd.oasis.opendocument.image-template', + 'odp' => 'application/vnd.oasis.opendocument.presentation', + 'otp' => 'application/vnd.oasis.opendocument.presentation-template', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', + 'odt' => 'application/vnd.oasis.opendocument.text', + 'odm' => 'application/vnd.oasis.opendocument.text-master', + 'ott' => 'application/vnd.oasis.opendocument.text-template', + 'oth' => 'application/vnd.oasis.opendocument.text-web' +); diff --git a/app/config/profiler.php b/app/config/profiler.php new file mode 100644 index 000000000..3436e931e --- /dev/null +++ b/app/config/profiler.php @@ -0,0 +1,14 @@ + my_controller/index +| my-controller/my-method -> my_controller/my_method +*/ +$route['default_controller'] = 'main'; +$route['404_override'] = ''; +$route['translate_uri_dashes'] = FALSE; diff --git a/app/config/smileys.php b/app/config/smileys.php new file mode 100644 index 000000000..a9b9191cc --- /dev/null +++ b/app/config/smileys.php @@ -0,0 +1,64 @@ + 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') + +); diff --git a/app/config/user_agents.php b/app/config/user_agents.php new file mode 100644 index 000000000..5e1f6afba --- /dev/null +++ b/app/config/user_agents.php @@ -0,0 +1,222 @@ + '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/ to the user agent string + 'Opera.*?Version' => 'Opera', + 'Opera' => 'Opera', + 'MSIE' => 'Internet Explorer', + 'Internet Explorer' => 'Internet Explorer', + 'Trident.* rv' => 'Internet Explorer', + 'Shiira' => 'Shiira', + 'Firefox' => 'Firefox', + 'Chimera' => 'Chimera', + 'Phoenix' => 'Phoenix', + 'Firebird' => 'Firebird', + 'Camino' => 'Camino', + 'Netscape' => 'Netscape', + 'OmniWeb' => 'OmniWeb', + 'Safari' => 'Safari', + 'Mozilla' => 'Mozilla', + 'Konqueror' => 'Konqueror', + 'icab' => 'iCab', + 'Lynx' => 'Lynx', + 'Links' => 'Links', + 'hotjava' => 'HotJava', + 'amaya' => 'Amaya', + 'IBrowse' => 'IBrowse', + 'Maxthon' => 'Maxthon', + 'Ubuntu' => 'Ubuntu Web Browser' +); + +$mobiles = array( + // legacy array, old values commented out + 'mobileexplorer' => 'Mobile Explorer', +// 'openwave' => 'Open Wave', +// 'opera mini' => 'Opera Mini', +// 'operamini' => 'Opera Mini', +// 'elaine' => 'Palm', + 'palmsource' => 'Palm', +// 'digital paths' => 'Palm', +// 'avantgo' => 'Avantgo', +// 'xiino' => 'Xiino', + 'palmscape' => 'Palmscape', +// 'nokia' => 'Nokia', +// 'ericsson' => 'Ericsson', +// 'blackberry' => 'BlackBerry', +// 'motorola' => 'Motorola' + + // Phones and Manufacturers + 'motorola' => 'Motorola', + 'nokia' => 'Nokia', + 'nexus' => 'Nexus', + 'palm' => 'Palm', + 'iphone' => 'Apple iPhone', + 'ipad' => 'iPad', + 'ipod' => 'Apple iPod Touch', + 'sony' => 'Sony Ericsson', + 'ericsson' => 'Sony Ericsson', + 'blackberry' => 'BlackBerry', + 'cocoon' => 'O2 Cocoon', + 'blazer' => 'Treo', + 'lg' => 'LG', + 'amoi' => 'Amoi', + 'xda' => 'XDA', + 'mda' => 'MDA', + 'vario' => 'Vario', + 'htc' => 'HTC', + 'samsung' => 'Samsung', + 'sharp' => 'Sharp', + 'sie-' => 'Siemens', + 'alcatel' => 'Alcatel', + 'benq' => 'BenQ', + 'ipaq' => 'HP iPaq', + 'mot-' => 'Motorola', + 'playstation portable' => 'PlayStation Portable', + 'playstation 3' => 'PlayStation 3', + 'playstation vita' => 'PlayStation Vita', + 'hiptop' => 'Danger Hiptop', + 'nec-' => 'NEC', + 'panasonic' => 'Panasonic', + 'philips' => 'Philips', + 'sagem' => 'Sagem', + 'sanyo' => 'Sanyo', + 'spv' => 'SPV', + 'zte' => 'ZTE', + 'sendo' => 'Sendo', + 'nintendo dsi' => 'Nintendo DSi', + 'nintendo ds' => 'Nintendo DS', + 'nintendo 3ds' => 'Nintendo 3DS', + 'wii' => 'Nintendo Wii', + 'open web' => 'Open Web', + 'openweb' => 'OpenWeb', + 'meizu' => 'Meizu', + 'huawei' => 'Huawei', + 'xiaomi' => 'Xiaomi', + 'oppo' => 'Oppo', + 'vivo' => 'Vivo', + 'infinix' => 'Infinix', + + // Operating Systems + 'android' => 'Android', + 'symbian' => 'Symbian', + 'SymbianOS' => 'SymbianOS', + 'elaine' => 'Palm', + 'series60' => 'Symbian S60', + 'windows ce' => 'Windows CE', + + // Browsers + 'obigo' => 'Obigo', + 'netfront' => 'Netfront Browser', + 'openwave' => 'Openwave Browser', + 'mobilexplorer' => 'Mobile Explorer', + 'operamini' => 'Opera Mini', + 'opera mini' => 'Opera Mini', + 'opera mobi' => 'Opera Mobile', + 'fennec' => 'Firefox Mobile', + + // Other + 'digital paths' => 'Digital Paths', + 'avantgo' => 'AvantGo', + 'xiino' => 'Xiino', + 'novarra' => 'Novarra Transcoder', + 'vodafone' => 'Vodafone', + 'docomo' => 'NTT DoCoMo', + 'o2' => 'O2', + + // Fallback + 'mobile' => 'Generic Mobile', + 'wireless' => 'Generic Mobile', + 'j2me' => 'Generic Mobile', + 'midp' => 'Generic Mobile', + 'cldc' => 'Generic Mobile', + 'up.link' => 'Generic Mobile', + 'up.browser' => 'Generic Mobile', + 'smartphone' => 'Generic Mobile', + 'cellphone' => 'Generic Mobile' +); + +// There are hundreds of bots but these are the most common. +$robots = array( + 'googlebot' => 'Googlebot', + 'msnbot' => 'MSNBot', + 'baiduspider' => 'Baiduspider', + 'bingbot' => 'Bing', + 'slurp' => 'Inktomi Slurp', + 'yahoo' => 'Yahoo', + 'ask jeeves' => 'Ask Jeeves', + 'fastcrawler' => 'FastCrawler', + 'infoseek' => 'InfoSeek Robot 1.0', + 'lycos' => 'Lycos', + 'yandex' => 'YandexBot', + 'mediapartners-google' => 'MediaPartners Google', + 'CRAZYWEBCRAWLER' => 'Crazy Webcrawler', + 'adsbot-google' => 'AdsBot Google', + 'feedfetcher-google' => 'Feedfetcher Google', + 'curious george' => 'Curious George', + 'ia_archiver' => 'Alexa Crawler', + 'MJ12bot' => 'Majestic-12', + 'Uptimebot' => 'Uptimebot', + 'UptimeRobot' => 'UptimeRobot' +); diff --git a/app/controllers/Analisis_grafik.php b/app/controllers/Analisis_grafik.php new file mode 100644 index 000000000..6db3f5121 --- /dev/null +++ b/app/controllers/Analisis_grafik.php @@ -0,0 +1,124 @@ +load->model('analisis_grafik_model'); + $this->load->model('analisis_laporan_keluarga_model'); + $this->load->model('user_model'); + $this->load->model('header_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + } + function clear($id=0){ + $_SESSION['analisis_master']=$id; + unset($_SESSION['cari']); + redirect('analisis_grafik'); + } + function leave(){ + $id=$_SESSION['analisis_master']; + unset($_SESSION['analisis_master']); + redirect("analisis_master/menu/$id"); + } + function index($p=1,$o=0){ + unset($_SESSION['cari2']); + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->analisis_laporan_keluarga_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->analisis_laporan_keluarga_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['list_dusun'] = $this->analisis_laporan_keluarga_model->list_dusun(); + $data['paging'] = $this->analisis_grafik_model->paging($p,$o); + $data['main'] = $this->analisis_grafik_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->analisis_grafik_model->autocomplete(); + $data['analisis_master'] = $this->analisis_grafik_model->get_analisis_master(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_grafik/table',$data); + $this->load->view('footer'); + } + function time($p=1,$o=0){ + unset($_SESSION['cari2']); + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->analisis_grafik_model->paging($p,$o); + $data['main'] = $this->analisis_grafik_model->list_data2($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->analisis_grafik_model->autocomplete(); + $data['analisis_master'] = $this->analisis_grafik_model->get_analisis_master(); + $data['periode'] = $this->analisis_grafik_model->list_periode(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_grafik/time',$data); + $this->load->view('footer'); + } + function dusun(){ + unset($_SESSION['rw']); + unset($_SESSION['rt']); + $dusun = $this->input->post('dusun'); + if($dusun!="") + $_SESSION['dusun']=$dusun; + else unset($_SESSION['dusun']); + redirect('analisis_grafik'); + } + function rw(){ + unset($_SESSION['rt']); + $rw = $this->input->post('rw'); + if($rw!="") + $_SESSION['rw']=$rw; + else unset($_SESSION['rw']); + redirect('analisis_grafik'); + } + function rt(){ + $rt = $this->input->post('rt'); + if($rt!="") + $_SESSION['rt']=$rt; + else unset($_SESSION['rt']); + redirect('analisis_grafik'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('analisis_grafik'); + } +} \ No newline at end of file diff --git a/app/controllers/Analisis_indikator.php b/app/controllers/Analisis_indikator.php new file mode 100644 index 000000000..0f60ea10b --- /dev/null +++ b/app/controllers/Analisis_indikator.php @@ -0,0 +1,189 @@ +load->model('analisis_indikator_model'); + $this->load->model('user_model'); + $this->load->model('header_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + $_SESSION['submenu'] = "Data Indikator"; + $_SESSION['asubmenu'] = "analisis_indikator"; + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['tipe']); + unset($_SESSION['kategori']); + redirect('analisis_indikator'); + } + function leave(){ + $id=$_SESSION['analisis_master']; + unset($_SESSION['analisis_master']); + redirect("analisis_master/menu/$id"); + } + function index($p=1,$o=0){ + unset($_SESSION['cari2']); + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['tipe'])) + $data['tipe'] = $_SESSION['tipe']; + else $data['tipe'] = ''; + if(isset($_SESSION['kategori'])) + $data['kategori'] = $_SESSION['kategori']; + else $data['kategori'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->analisis_indikator_model->paging($p,$o); + $data['main'] = $this->analisis_indikator_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->analisis_indikator_model->autocomplete(); + $data['analisis_master'] = $this->analisis_indikator_model->get_analisis_master(); + $data['list_tipe'] = $this->analisis_indikator_model->list_tipe(); + $data['list_kategori'] = $this->analisis_indikator_model->list_kategori(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_indikator/table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['analisis_indikator'] = $this->analisis_indikator_model->get_analisis_indikator($id); + $data['form_action'] = site_url("analisis_indikator/update/$p/$o/$id"); + } + + else{ + $data['analisis_indikator'] = null; + $data['form_action'] = site_url("analisis_indikator/insert"); + } + + $data['list_kategori'] = $this->analisis_indikator_model->list_kategori(); + $header = $this->header_model->get_data(); + $data['analisis_master'] = $this->analisis_indikator_model->get_analisis_master(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_indikator/form',$data); + $this->load->view('footer'); + } + function parameter($id=''){ + $ai = $this->analisis_indikator_model->get_analisis_indikator($id); + if($ai['id_tipe']==3 OR $ai['id_tipe']==4) + redirect('analisis_indikator'); + + $data['analisis_indikator'] = $this->analisis_indikator_model->get_analisis_indikator($id); + $data['analisis_master'] = $this->analisis_indikator_model->get_analisis_master(); + $data['main'] = $this->analisis_indikator_model->list_indikator($id); + + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_indikator/parameter/table',$data); + $this->load->view('footer'); + } + function form_parameter($in='',$id=''){ + if($id){ + $data['analisis_parameter'] = $this->analisis_indikator_model->get_analisis_parameter($id); + $data['form_action'] = site_url("analisis_indikator/p_update/$in/$id"); + } + + else{ + $data['analisis_parameter'] = null; + $data['form_action'] = site_url("analisis_indikator/p_insert/$in"); + } + + $data['analisis_master'] = $this->analisis_indikator_model->get_analisis_master(); + $data['analisis_indikator'] = $this->analisis_indikator_model->get_analisis_indikator($in); + + // $this->load->view('header', $header); + // $this->load->view('analisis_master/nav'); + $this->load->view('analisis_indikator/parameter/ajax_form',$data); + // $this->load->view('footer'); + } + function menu($id=''){ + $data['analisis_indikator'] = $this->analisis_indikator_model->get_analisis_indikator($id); + + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_indikator/menu',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('analisis_indikator'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('analisis_indikator'); + } + function tipe(){ + $filter = $this->input->post('tipe'); + if($filter!=0) + $_SESSION['tipe']=$filter; + else unset($_SESSION['tipe']); + redirect('analisis_indikator'); + } + function kategori(){ + $filter = $this->input->post('kategori'); + if($filter!=0) + $_SESSION['kategori']=$filter; + else unset($_SESSION['kategori']); + redirect('analisis_indikator'); + } + function insert(){ + $this->analisis_indikator_model->insert(); + redirect('analisis_indikator'); + } + function update($p=1,$o=0,$id=''){ + $this->analisis_indikator_model->update($id); + redirect("analisis_indikator/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->analisis_indikator_model->delete($id); + redirect("analisis_indikator/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->analisis_indikator_model->delete_all(); + redirect("analisis_indikator/index/$p/$o"); + } + function p_insert($in=''){ + $this->analisis_indikator_model->p_insert($in); + redirect("analisis_indikator/parameter/$in"); + } + function p_update($in='',$id=''){ + $this->analisis_indikator_model->p_update($id); + redirect("analisis_indikator/parameter/$in"); + } + function p_delete($in='',$id=''){ + $this->analisis_indikator_model->p_delete($id); + redirect("analisis_indikator/parameter/$in"); + } + function p_delete_all(){ + $this->analisis_indikator_model->p_delete_all(); + redirect("analisis_indikator/parameter/$in"); + } +} \ No newline at end of file diff --git a/app/controllers/Analisis_kategori.php b/app/controllers/Analisis_kategori.php new file mode 100644 index 000000000..c1425686b --- /dev/null +++ b/app/controllers/Analisis_kategori.php @@ -0,0 +1,92 @@ +load->model('analisis_kategori_model'); + $this->load->model('user_model'); + $this->load->model('header_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + $_SESSION['submenu'] = "Data Kategori"; + $_SESSION['asubmenu'] = "analisis_kategori"; + } + function clear(){ + unset($_SESSION['cari']); + redirect('analisis_kategori'); + } + function leave(){ + $id=$_SESSION['analisis_master']; + unset($_SESSION['analisis_master']); + redirect("analisis_master/menu/$id"); + } + function index($p=1,$o=0){ + unset($_SESSION['cari2']); + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->analisis_kategori_model->paging($p,$o); + $data['main'] = $this->analisis_kategori_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->analisis_kategori_model->autocomplete(); + $data['analisis_master'] = $this->analisis_kategori_model->get_analisis_master(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_kategori/table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['analisis_kategori'] = $this->analisis_kategori_model->get_analisis_kategori($id); + $data['form_action'] = site_url("analisis_kategori/update/$p/$o/$id"); + } + + else{ + $data['analisis_kategori'] = null; + $data['form_action'] = site_url("analisis_kategori/insert"); + } + + + + + //$this->load->view('header', $header); + //$this->load->view('analisis_master/nav'); + $this->load->view('analisis_kategori/ajax_form',$data); + //$this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('analisis_kategori'); + } + function insert(){ + $this->analisis_kategori_model->insert(); + redirect('analisis_kategori'); + } + function update($p=1,$o=0,$id=''){ + $this->analisis_kategori_model->update($id); + redirect("analisis_kategori/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->analisis_kategori_model->delete($id); + redirect("analisis_kategori/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->analisis_kategori_model->delete_all(); + redirect("analisis_kategori/index/$p/$o"); + } +} \ No newline at end of file diff --git a/app/controllers/Analisis_klasifikasi.php b/app/controllers/Analisis_klasifikasi.php new file mode 100644 index 000000000..e27b0fe3b --- /dev/null +++ b/app/controllers/Analisis_klasifikasi.php @@ -0,0 +1,87 @@ +load->model('analisis_klasifikasi_model'); + $this->load->model('user_model'); + $this->load->model('header_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + $_SESSION['submenu'] = "Data Klasifikasi"; + $_SESSION['asubmenu'] = "analisis_klasifikasi"; + } + function clear(){ + unset($_SESSION['cari']); + redirect('analisis_klasifikasi'); + } + function leave(){ + $id=$_SESSION['analisis_master']; + unset($_SESSION['analisis_master']); + redirect("analisis_master/menu/$id"); + } + function index($p=1,$o=0){ + unset($_SESSION['cari2']); + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->analisis_klasifikasi_model->paging($p,$o); + $data['main'] = $this->analisis_klasifikasi_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->analisis_klasifikasi_model->autocomplete(); + $data['analisis_master'] = $this->analisis_klasifikasi_model->get_analisis_master(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_klasifikasi/table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['analisis_klasifikasi'] = $this->analisis_klasifikasi_model->get_analisis_klasifikasi($id); + $data['form_action'] = site_url("analisis_klasifikasi/update/$p/$o/$id"); + } + + else{ + $data['analisis_klasifikasi'] = null; + $data['form_action'] = site_url("analisis_klasifikasi/insert"); + } + + $data['analisis_master'] = $this->analisis_klasifikasi_model->get_analisis_master(); + $this->load->view('analisis_klasifikasi/ajax_form',$data); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('analisis_klasifikasi'); + } + function insert(){ + $this->analisis_klasifikasi_model->insert(); + redirect('analisis_klasifikasi'); + } + function update($p=1,$o=0,$id=''){ + $this->analisis_klasifikasi_model->update($id); + redirect("analisis_klasifikasi/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->analisis_klasifikasi_model->delete($id); + redirect("analisis_klasifikasi/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->analisis_klasifikasi_model->delete_all(); + redirect("analisis_klasifikasi/index/$p/$o"); + } +} \ No newline at end of file diff --git a/app/controllers/Analisis_laporan.php b/app/controllers/Analisis_laporan.php new file mode 100644 index 000000000..76915c7c6 --- /dev/null +++ b/app/controllers/Analisis_laporan.php @@ -0,0 +1,184 @@ +load->model('analisis_laporan_model'); + $this->load->model('user_model'); + $this->load->model('header_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + $_SESSION['submenu'] = "Laporan Analisis"; + $_SESSION['asubmenu'] = "analisis_laporan"; + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['klasifikasi']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['jawab']); + $_SESSION['per_page'] = 50; + redirect('analisis_laporan'); + } + function leave(){ + $id=$_SESSION['analisis_master']; + unset($_SESSION['analisis_master']); + redirect("analisis_master/menu/$id"); + } + function index($p=1,$o=0){ + unset($_SESSION['cari2']); + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['klasifikasi'])) + $data['klasifikasi'] = $_SESSION['klasifikasi']; + else $data['klasifikasi'] = ''; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->analisis_laporan_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->analisis_laporan_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['list_dusun'] = $this->analisis_laporan_model->list_dusun(); + $data['list_klasifikasi'] = $this->analisis_laporan_model->list_klasifikasi(); + $data['paging'] = $this->analisis_laporan_model->paging($p,$o); + $data['main'] = $this->analisis_laporan_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->analisis_laporan_model->autocomplete(); + $data['analisis_master'] = $this->analisis_laporan_model->get_analisis_master(); + $data['analisis_periode'] = $this->analisis_laporan_model->get_periode(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_laporan/table',$data); + $this->load->view('footer'); + } + function kuisioner($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + $data['analisis_master'] = $this->analisis_laporan_model->get_analisis_master(); + $data['subjek'] = $this->analisis_laporan_model->get_subjek($id); + $data['total'] = $this->analisis_laporan_model->get_total($id); + + $this->load->model('analisis_respon_model'); + $data['list_bukti'] = $this->analisis_respon_model->list_bukti($id); + $data['list_anggota'] = $this->analisis_respon_model->list_anggota($id); + $data['list_jawab'] = $this->analisis_laporan_model->list_indikator($id); + $data['form_action'] = site_url("analisis_laporan/update_kuisioner/$p/$o/$id"); + + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_laporan/form',$data); + $this->load->view('footer'); + } + function cetak($o=0){ + $data['main'] = $this->analisis_laporan_model->list_data($o,0, 10000); + $this->load->view('analisis_laporan/table_print',$data); + } + function excel($o=0){ + $data['main'] = $this->analisis_laporan_model->list_data($o,0, 10000); + $this->load->view('analisis_laporan/table_excel',$data); + } + function multi_jawab(){ + //echo phpinfo(); + $data['form_action'] = site_url("analisis_laporan/multi_exec"); + $data['main'] = $this->analisis_laporan_model->multi_jawab(1,1); + $this->load->view('analisis_laporan/ajax_multi',$data); + } + function multi_exec(){ + $idcb = $_POST['id_cb']; + print_r($idcb); + //redirect('analisis_laporan'); + } + function ajax_multi_jawab(){ + if(isset($_SESSION['jawab'])) + $data['jawab'] = $_SESSION['jawab']; + else $data['jawab'] = ''; + $data['main'] = $this->analisis_laporan_model->multi_jawab(1,1); + $data['form_action'] = site_url("analisis_laporan/multi_jawab_proses"); + $this->load->view("analisis_laporan/ajax_multi", $data); + } + function multi_jawab_proses(){ + if(isset($_POST['id_cb'])){ + unset($_SESSION['jawab']); + unset($_SESSION['jmkf']); + $id_cb = $_POST['id_cb']; + $cb = ""; + if(count($id_cb)){ + foreach($id_cb as $id){ + $cb .= $id.","; + } + } + $_SESSION['jawab'] = $cb."7777777"; + + $jmkf = $this->analisis_laporan_model->group_parameter(); + $_SESSION['jmkf'] = count($jmkf); + } + redirect('analisis_laporan'); + } + function dusun(){ + unset($_SESSION['rw']); + unset($_SESSION['rt']); + $dusun = $this->input->post('dusun'); + if($dusun!="") + $_SESSION['dusun']=$dusun; + else unset($_SESSION['dusun']); + redirect('analisis_laporan'); + } + function rw(){ + unset($_SESSION['rt']); + $rw = $this->input->post('rw'); + if($rw!="") + $_SESSION['rw']=$rw; + else unset($_SESSION['rw']); + redirect('analisis_laporan'); + } + function rt(){ + $rt = $this->input->post('rt'); + if($rt!="") + $_SESSION['rt']=$rt; + else unset($_SESSION['rt']); + redirect('analisis_laporan'); + } + function klasifikasi(){ + $klasifikasi = $this->input->post('klasifikasi'); + if($klasifikasi!="") + $_SESSION['klasifikasi']=$klasifikasi; + else unset($_SESSION['klasifikasi']); + redirect('analisis_laporan'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('analisis_laporan'); + } + +} \ No newline at end of file diff --git a/app/controllers/Analisis_master.php b/app/controllers/Analisis_master.php new file mode 100644 index 000000000..5cbcf15dc --- /dev/null +++ b/app/controllers/Analisis_master.php @@ -0,0 +1,167 @@ +load->model('analisis_master_model'); + $this->load->model('analisis_import_model'); + $this->load->model('user_model'); + $this->load->model('header_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + unset($_SESSION['submenu']); + unset($_SESSION['asubmenu']); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['state']); + redirect('analisis_master'); + } + function index($p=1,$o=0){ + unset($_SESSION['analisis_master']); + unset($_SESSION['analisis_nama']); + $data['p'] = $p; + $data['o'] = $o; + $nav['act']= 1; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + + if(isset($_SESSION['state'])) + $data['state'] = $_SESSION['state']; + else $data['state'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->analisis_master_model->paging($p,$o); + $data['main'] = $this->analisis_master_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->analisis_master_model->autocomplete(); + $data['list_subjek'] = $this->analisis_master_model->list_subjek(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav',$nav); + $this->load->view('analisis_master/table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + $nav['act']= 1; + + if($id){ + $data['analisis_master'] = $this->analisis_master_model->get_analisis_master($id); + $data['form_action'] = site_url("analisis_master/update/$p/$o/$id"); + } + + else{ + $data['analisis_master'] = null; + $data['form_action'] = site_url("analisis_master/insert"); + } + + $data['list_kelompok'] = $this->analisis_master_model->list_kelompok(); + $data['list_analisis'] = $this->analisis_master_model->list_analisis_child(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav',$nav); + $this->load->view('analisis_master/form',$data); + $this->load->view('footer'); + } + function panduan(){ + $nav['act']= 1; + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav',$nav); + $this->load->view('analisis_master/panduan'); + $this->load->view('footer'); + } + function import_analisis(){ + $header = $this->header_model->get_data(); + + $nav['act']= 1; + $data['form_action'] = site_url("analisis_master/import"); + $this->load->view('analisis_master/import', $data); + } + function menu($id='',$p=0){ + $_SESSION['analisis_master']=$id; + $data['analisis_master'] = $this->analisis_master_model->get_analisis_master($id); + $_SESSION['analisis_nama']=$data['analisis_master']['nama']; + $da = $data['analisis_master']; + $subjek = $da['subjek_tipe']; + $_SESSION['subjek_tipe']=$subjek; + + switch($subjek){ + case 1: $data['menu_respon'] = "analisis_respon_penduduk"; $data['menu_laporan'] = "analisis_laporan_penduduk"; break; + case 2: $data['menu_respon'] = "analisis_respon_keluarga"; $data['menu_laporan'] = "analisis_laporan_keluarga";break; + case 3: $data['menu_respon'] = "analisis_respon_rtm"; $data['menu_laporan'] = "analisis_laporan_rtm";break; + case 4: $data['menu_respon'] = "analisis_respon_kelompok"; $data['menu_laporan'] = "analisis_laporan_kelompok";break; + default:redirect('analisis_master'); + } + $data['menu_respon'] = "analisis_respon"; + $data['menu_laporan'] = "analisis_laporan"; + $header = $this->header_model->get_data(); + + //PATCH + //if($p==1){ + $this->load->model('analisis_respon_model'); + $this->analisis_respon_model->pre_update(); + //} + //---- + + $nav['act']= 1; + $this->load->view('header', $header); + $this->load->view('analisis_master/nav',$nav); + $this->load->view('analisis_master/menu',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('analisis_master'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('analisis_master'); + } + function state(){ + $filter = $this->input->post('state'); + if($filter!=0) + $_SESSION['state']=$filter; + else unset($_SESSION['state']); + redirect('analisis_master'); + } + function insert(){ + $this->analisis_master_model->insert(); + redirect('analisis_master'); + } + function import(){ + $this->analisis_import_model->import_excel(); + redirect('analisis_master'); + } + function update($p=1,$o=0,$id=''){ + $this->analisis_master_model->update($id); + redirect("analisis_master/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->analisis_master_model->delete($id); + redirect("analisis_master/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->analisis_master_model->delete_all(); + redirect("analisis_master/index/$p/$o"); + } +} \ No newline at end of file diff --git a/app/controllers/Analisis_periode.php b/app/controllers/Analisis_periode.php new file mode 100644 index 000000000..b0d571a6e --- /dev/null +++ b/app/controllers/Analisis_periode.php @@ -0,0 +1,109 @@ +load->model('analisis_periode_model'); + $this->load->model('user_model'); + $this->load->model('header_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + $_SESSION['submenu'] = "Data Periode"; + $_SESSION['asubmenu'] = "analisis_periode"; + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['state']); + redirect('analisis_periode'); + } + function leave(){ + $id=$_SESSION['analisis_master']; + unset($_SESSION['analisis_master']); + redirect("analisis_master/menu/$id"); + } + function index($p=1,$o=0){ + unset($_SESSION['cari2']); + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['state'])) + $data['state'] = $_SESSION['state']; + else $data['state'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->analisis_periode_model->paging($p,$o); + $data['main'] = $this->analisis_periode_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->analisis_periode_model->autocomplete(); + $data['analisis_master'] = $this->analisis_periode_model->get_analisis_master(); + $data['list_state'] = $this->analisis_periode_model->list_state(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_periode/table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['analisis_periode'] = $this->analisis_periode_model->get_analisis_periode($id); + $data['form_action'] = site_url("analisis_periode/update/$p/$o/$id"); + } + + else{ + $data['analisis_periode'] = null; + $data['form_action'] = site_url("analisis_periode/insert"); + } + + $header = $this->header_model->get_data(); + $data['analisis_master'] = $this->analisis_periode_model->get_analisis_master(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_periode/form',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('analisis_periode'); + } + function state(){ + $filter = $this->input->post('state'); + if($filter!=0) + $_SESSION['state']=$filter; + else unset($_SESSION['state']); + redirect('analisis_periode'); + } + function insert(){ + $this->analisis_periode_model->insert(); + redirect('analisis_periode'); + } + function update($p=1,$o=0,$id=''){ + $this->analisis_periode_model->update($id); + redirect("analisis_periode/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->analisis_periode_model->delete($id); + redirect("analisis_periode/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->analisis_periode_model->delete_all(); + redirect("analisis_periode/index/$p/$o"); + } + function list_state(){ + $sql = "SELECT * FROM analisis_ref_state"; + $query = $this->db->query($sql); + return $query->result_array(); + } +} \ No newline at end of file diff --git a/app/controllers/Analisis_respon.php b/app/controllers/Analisis_respon.php new file mode 100644 index 000000000..02e254574 --- /dev/null +++ b/app/controllers/Analisis_respon.php @@ -0,0 +1,208 @@ +load->model('analisis_respon_model'); + $this->load->model('user_model'); + $this->load->model('header_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + $_SESSION['submenu'] = "Input Data"; + $_SESSION['asubmenu'] = "analisis_respon"; + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['isi']); + $_SESSION['per_page'] = 50; + redirect('analisis_respon'); + } + function leave(){ + $id=$_SESSION['analisis_master']; + unset($_SESSION['analisis_master']); + redirect("analisis_master/menu/$id"); + } + function index($p=1,$o=0){ + unset($_SESSION['cari2']); + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['isi'])) + $data['isi'] = $_SESSION['isi']; + else $data['isi'] = ''; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->analisis_respon_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->analisis_respon_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['list_dusun'] = $this->analisis_respon_model->list_dusun(); + $data['paging'] = $this->analisis_respon_model->paging($p,$o); + $data['main'] = $this->analisis_respon_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->analisis_respon_model->autocomplete(); + $data['analisis_master'] = $this->analisis_respon_model->get_analisis_master(); + $data['analisis_periode'] = $this->analisis_respon_model->get_periode(); + + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_respon/table',$data); + $this->load->view('footer'); + } + function kuisioner($p=1,$o=0,$id='',$fs=0){ + if($fs==1) + $_SESSION['fullscreen'] = 1; + + if($fs==2) + unset($_SESSION['fullscreen']); + + if($fs != 0) + redirect("analisis_respon/kuisioner/$p/$o/$id"); + + $data['p'] = $p; + $data['o'] = $o; + $data['id'] = $id; + + $data['analisis_master'] = $this->analisis_respon_model->get_analisis_master(); + $data['subjek'] = $this->analisis_respon_model->get_subjek($id); + $data['list_jawab'] = $this->analisis_respon_model->list_indikator($id); + $data['list_bukti'] = $this->analisis_respon_model->list_bukti($id); + $data['list_anggota'] = $this->analisis_respon_model->list_anggota($id); + $data['form_action'] = site_url("analisis_respon/update_kuisioner/$p/$o/$id"); + + $header = $this->header_model->get_data(); + if(isset($_SESSION['fullscreen'])) + $this->load->view('header-min', $header); + else{ + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + } + + $this->load->view('analisis_respon/form',$data); + + $this->load->view('footer'); + } + function update_kuisioner($p=1,$o=0,$id=''){ + $this->analisis_respon_model->update_kuisioner($id); + redirect("analisis_respon/kuisioner/$p/$o/$id"); + } + + //CHILD-------------------- + function kuisioner_child($p=1,$o=0,$id='',$idc=''){ + + $data['p'] = $p; + $data['o'] = $o; + + $data['list_jawab'] = $this->analisis_respon_model->list_indikator_child($idc); + $data['form_action'] = site_url("analisis_respon/update_kuisioner_child/$p/$o/$id/$idc"); + + $this->load->view('analisis_respon/form_ajax',$data); + } + function update_kuisioner_child($p=1,$o=0,$id='',$idc=''){ + $per = $this->analisis_respon_model->get_periode_child(); + $this->analisis_respon_model->update_kuisioner($idc,$per); + redirect("analisis_respon/kuisioner/$p/$o/$id"); + } + + function aturan_ajax(){ + $this->load->view('analisis_respon/import/aturan_ajax'); + } + function aturan_unduh(){ + $data['main'] = $this->analisis_respon_model->aturan_unduh(); + $this->load->view('analisis_respon/import/aturan_unduh',$data); + } + function data_ajax(){ + $this->load->view('analisis_respon/import/data_ajax'); + } + function data_unduh($p=0,$o=0){ + $data['main'] = $this->analisis_respon_model->data_unduh($p,$o); + $data['periode'] = $this->analisis_respon_model->get_aktif_periode(); + $data['indikator'] = $this->analisis_respon_model->indikator_unduh($p,$o); + $this->load->view('analisis_respon/import/data_unduh',$data); + } + function import($op=0){ + $data['form_action'] = site_url("analisis_respon/import_proses/$op"); + $this->load->view('analisis_respon/import/import',$data); + } + + function satu_jiwa($op=0){ + $this->analisis_respon_model->satu_jiwa($op); + redirect('analisis_respon'); + } + + function dua_dunia($op=0){ + $this->analisis_respon_model->dua_dunia($op); + redirect('analisis_respon'); + } + + function import_proses($op=0){ + $this->analisis_respon_model->import_respon($op); + redirect('analisis_respon'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('analisis_respon'); + } + function isi(){ + $isi = $this->input->post('isi'); + if($isi!="") + $_SESSION['isi']=$isi; + else unset($_SESSION['isi']); + redirect('analisis_respon'); + } + function dusun(){ + unset($_SESSION['rw']); + unset($_SESSION['rt']); + $dusun = $this->input->post('dusun'); + if($dusun!="") + $_SESSION['dusun']=$dusun; + else unset($_SESSION['dusun']); + redirect('analisis_respon'); + } + function rw(){ + unset($_SESSION['rt']); + $rw = $this->input->post('rw'); + if($rw!="") + $_SESSION['rw']=$rw; + else unset($_SESSION['rw']); + redirect('analisis_respon'); + } + function rt(){ + $rt = $this->input->post('rt'); + if($rt!="") + $_SESSION['rt']=$rt; + else unset($_SESSION['rt']); + redirect('analisis_respon'); + } +} \ No newline at end of file diff --git a/app/controllers/Analisis_statistik_jawaban.php b/app/controllers/Analisis_statistik_jawaban.php new file mode 100644 index 000000000..10e181dee --- /dev/null +++ b/app/controllers/Analisis_statistik_jawaban.php @@ -0,0 +1,353 @@ +load->model('analisis_statistik_jawaban_model'); + $this->load->model('user_model'); + $this->load->model('header_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + $_SESSION['submenu'] = "Statistik Jawaban"; + $_SESSION['asubmenu'] = "analisis_statistik_jawaban"; + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['tipe']); + unset($_SESSION['kategori']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + redirect('analisis_statistik_jawaban'); + } + function leave(){ + $id=$_SESSION['analisis_master']; + unset($_SESSION['analisis_master']); + redirect("analisis_master/menu/$id"); + } + function index($p=1,$o=0){ + unset($_SESSION['cari2']); + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['tipe'])) + $data['tipe'] = $_SESSION['tipe']; + else $data['tipe'] = ''; + if(isset($_SESSION['kategori'])) + $data['kategori'] = $_SESSION['kategori']; + else $data['kategori'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->analisis_statistik_jawaban_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->analisis_statistik_jawaban_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + + $data['paging'] = $this->analisis_statistik_jawaban_model->paging($p,$o); + $data['main'] = $this->analisis_statistik_jawaban_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->analisis_statistik_jawaban_model->autocomplete(); + $data['analisis_master'] = $this->analisis_statistik_jawaban_model->get_analisis_master(); + $data['list_tipe'] = $this->analisis_statistik_jawaban_model->list_tipe(); + $data['list_kategori'] = $this->analisis_statistik_jawaban_model->list_kategori(); + $data['list_dusun'] = $this->analisis_statistik_jawaban_model->list_dusun(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_statistik_jawaban/table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['analisis_statistik_jawaban'] = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); + $data['form_action'] = site_url("analisis_statistik_jawaban/update/$p/$o/$id"); + } + + else{ + $data['analisis_statistik_jawaban'] = null; + $data['form_action'] = site_url("analisis_statistik_jawaban/insert"); + } + + $data['list_kategori'] = $this->analisis_statistik_jawaban_model->list_kategori(); + $header = $this->header_model->get_data(); + $data['analisis_master'] = $this->analisis_statistik_jawaban_model->get_analisis_master(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_statistik_jawaban/form',$data); + $this->load->view('footer'); + } + function parameter($id=''){ + $ai = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); + if($ai['id_tipe']==3 OR $ai['id_tipe']==4) + redirect('analisis_statistik_jawaban'); + + $data['analisis_statistik_jawaban'] = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); + $data['analisis_master'] = $this->analisis_statistik_jawaban_model->get_analisis_master(); + $data['main'] = $this->analisis_statistik_jawaban_model->list_indikator($id); + + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_statistik_jawaban/parameter/table',$data); + $this->load->view('footer'); + } + function grafik_parameter($id=''){ + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->analisis_statistik_jawaban_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->analisis_statistik_jawaban_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + $data['list_dusun'] = $this->analisis_statistik_jawaban_model->list_dusun(); + + $ai = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); + + //redirect('analisis_statistik_jawaban'); + + $data['analisis_statistik_jawaban'] = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); + $data['analisis_master'] = $this->analisis_statistik_jawaban_model->get_analisis_master(); + $data['main'] = $this->analisis_statistik_jawaban_model->list_indikator($id); + + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_statistik_jawaban/parameter/grafik_table',$data); + $this->load->view('footer'); + } + function subjek_parameter($id='',$par=''){ + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->analisis_statistik_jawaban_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->analisis_statistik_jawaban_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + $data['list_dusun'] = $this->analisis_statistik_jawaban_model->list_dusun(); + + $ai = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); + //if($ai['id_tipe']==3 OR $ai['id_tipe']==4) + // redirect('analisis_statistik_jawaban'); + + $data['analisis_statistik_pertanyaan'] = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); + $data['analisis_statistik_jawaban'] = $this->analisis_statistik_jawaban_model->get_analisis_parameter($par); + $data['analisis_master'] = $this->analisis_statistik_jawaban_model->get_analisis_master(); + $data['main'] = $this->analisis_statistik_jawaban_model->list_subjek($par); + + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('analisis_master/nav'); + $this->load->view('analisis_statistik_jawaban/parameter/subjek_table',$data); + $this->load->view('footer'); + } + function cetak($o=0){ + $data['main'] = $this->analisis_statistik_jawaban_model->list_data($o,0, 10000); + $this->load->view('analisis_statistik_jawaban/table_print',$data); + } + function excel($o=0){ + $data['main'] = $this->analisis_statistik_jawaban_model->list_data($o,0, 10000); + $this->load->view('analisis_statistik_jawaban/table_excel',$data); + } + + function cetak2($id='',$par=''){ + $data['analisis_statistik_pertanyaan'] = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); + $data['analisis_statistik_jawaban'] = $this->analisis_statistik_jawaban_model->get_analisis_parameter($par); + $data['main'] = $this->analisis_statistik_jawaban_model->list_subjek($par); + $this->load->view('analisis_statistik_jawaban/parameter/table_print',$data); + } + function excel2($id='',$par=''){ + $data['analisis_statistik_pertanyaan'] = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); + $data['analisis_statistik_jawaban'] = $this->analisis_statistik_jawaban_model->get_analisis_parameter($par); + $data['main'] = $this->analisis_statistik_jawaban_model->list_subjek($par); + $this->load->view('analisis_statistik_jawaban/parameter/subjek_excel',$data); + } + + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('analisis_statistik_jawaban'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('analisis_statistik_jawaban'); + } + function tipe(){ + $filter = $this->input->post('tipe'); + if($filter!=0) + $_SESSION['tipe']=$filter; + else unset($_SESSION['tipe']); + redirect('analisis_statistik_jawaban'); + } + function kategori(){ + $filter = $this->input->post('kategori'); + if($filter!=0) + $_SESSION['kategori']=$filter; + else unset($_SESSION['kategori']); + redirect('analisis_statistik_jawaban'); + } + function dusun(){ + unset($_SESSION['rw']); + unset($_SESSION['rt']); + $dusun = $this->input->post('dusun'); + if($dusun!="") + $_SESSION['dusun']=$dusun; + else unset($_SESSION['dusun']); + redirect('analisis_statistik_jawaban'); + } + function rw(){ + unset($_SESSION['rt']); + $rw = $this->input->post('rw'); + if($rw!="") + $_SESSION['rw']=$rw; + else unset($_SESSION['rw']); + redirect('analisis_statistik_jawaban'); + } + function rt(){ + $rt = $this->input->post('rt'); + if($rt!="") + $_SESSION['rt']=$rt; + else unset($_SESSION['rt']); + redirect('analisis_statistik_jawaban'); + } + function dusun2($id='',$par=''){ + unset($_SESSION['rw']); + unset($_SESSION['rt']); + $dusun = $this->input->post('dusun'); + if($dusun!="") + $_SESSION['dusun']=$dusun; + else unset($_SESSION['dusun']); + redirect("analisis_statistik_jawaban/subjek_parameter/$id/$par"); + } + function rw2($id='',$par=''){ + unset($_SESSION['rt']); + $rw = $this->input->post('rw'); + if($rw!="") + $_SESSION['rw']=$rw; + else unset($_SESSION['rw']); + redirect("analisis_statistik_jawaban/subjek_parameter/$id/$par"); + } + function rt2($id='',$par=''){ + $rt = $this->input->post('rt'); + if($rt!="") + $_SESSION['rt']=$rt; + else unset($_SESSION['rt']); + redirect("analisis_statistik_jawaban/subjek_parameter/$id/$par"); + } + function dusun3($id=''){ + unset($_SESSION['rw']); + unset($_SESSION['rt']); + $dusun = $this->input->post('dusun'); + if($dusun!="") + $_SESSION['dusun']=$dusun; + else unset($_SESSION['dusun']); + redirect("analisis_statistik_jawaban/grafik_parameter/$id"); + } + function rw3($id=''){ + unset($_SESSION['rt']); + $rw = $this->input->post('rw'); + if($rw!="") + $_SESSION['rw']=$rw; + else unset($_SESSION['rw']); + redirect("analisis_statistik_jawaban/grafik_parameter/$id"); + } + function rt3($id=''){ + $rt = $this->input->post('rt'); + if($rt!="") + $_SESSION['rt']=$rt; + else unset($_SESSION['rt']); + redirect("analisis_statistik_jawaban/grafik_parameter/$id"); + } + function insert(){ + $this->analisis_statistik_jawaban_model->insert(); + redirect('analisis_statistik_jawaban'); + } + function update($p=1,$o=0,$id=''){ + $this->analisis_statistik_jawaban_model->update($id); + redirect("analisis_statistik_jawaban/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->analisis_statistik_jawaban_model->delete($id); + redirect("analisis_statistik_jawaban/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->analisis_statistik_jawaban_model->delete_all(); + redirect("analisis_statistik_jawaban/index/$p/$o"); + } + function p_insert($in=''){ + $this->analisis_statistik_jawaban_model->p_insert($in); + redirect("analisis_statistik_jawaban/parameter/$in"); + } + function p_update($in='',$id=''){ + $this->analisis_statistik_jawaban_model->p_update($id); + redirect("analisis_statistik_jawaban/parameter/$in"); + } + function p_delete($in='',$id=''){ + $this->analisis_statistik_jawaban_model->p_delete($id); + redirect("analisis_statistik_jawaban/parameter/$in"); + } + function p_delete_all(){ + $this->analisis_statistik_jawaban_model->p_delete_all(); + redirect("analisis_statistik_jawaban/parameter/$in"); + } +} \ No newline at end of file diff --git a/app/controllers/Area.php b/app/controllers/Area.php new file mode 100644 index 000000000..a0320484c --- /dev/null +++ b/app/controllers/Area.php @@ -0,0 +1,153 @@ +load->model('user_model'); + + $this->load->model('header_model'); + $this->load->model('plan_area_model'); + + + $this->load->database(); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['polygon']); + unset($_SESSION['subpolygon']); + redirect('area'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['polygon'])) + $data['polygon'] = $_SESSION['polygon']; + else $data['polygon'] = ''; + if(isset($_SESSION['subpolygon'])) + $data['subpolygon'] = $_SESSION['subpolygon']; + else $data['subpolygon'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->plan_area_model->paging($p,$o); + $data['main'] = $this->plan_area_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->plan_area_model->autocomplete(); + $data['list_polygon'] = $this->plan_area_model->list_polygon(); + $data['list_subpolygon'] = $this->plan_area_model->list_subpolygon(); + $header= $this->header_model->get_data(); + $nav['act']=4; + + $this->load->view('header-gis', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('area/table',$data); + $this->load->view('footer'); + + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + $data['desa'] = $this->plan_area_model->get_desa(); + $data['list_polygon'] = $this->plan_area_model->list_polygon(); + $data['dusun'] = $this->plan_area_model->list_dusun(); + + if($id){ + $data['area'] = $this->plan_area_model->get_area($id); + $data['form_action'] = site_url("area/update/$id/$p/$o"); + } + else{ + $data['area'] = null; + $data['form_action'] = site_url("area/insert"); + } + $header= $this->header_model->get_data(); + + $nav['act']=4; + $this->load->view('header-gis', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('area/form',$data); + $this->load->view('footer'); + + } + function ajax_area_maps($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + if($id) + $data['area'] = $this->plan_area_model->get_area($id); + else + $data['area'] = null; + + $data['desa'] = $this->plan_area_model->get_desa(); + $data['form_action'] = site_url("area/update_maps/$p/$o/$id"); + $this->load->view("area/maps", $data); + } + + function update_maps($p=1,$o=0,$id=''){ + $this->plan_area_model->update_position($id); + redirect("area/index/$p/$o"); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('area'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('area'); + } + function polygon(){ + $polygon = $this->input->post('polygon'); + if($polygon!=0) + $_SESSION['polygon']=$polygon; + else unset($_SESSION['polygon']); + redirect('area'); + } + function subpolygon(){ + unset($_SESSION['polygon']); + $subpolygon = $this->input->post('subpolygon'); + if($subpolygon!=0) + $_SESSION['subpolygon']=$subpolygon; + else unset($_SESSION['subpolygon']); + redirect('area'); + } + function insert($tip=1){ + $this->plan_area_model->insert($tip); + redirect("area/index/$tip"); + } + function update($id='',$p=1,$o=0){ + $this->plan_area_model->update($id); + redirect("area/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->plan_area_model->delete($id); + redirect("area/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->plan_area_model->delete_all(); + redirect("area/index/$p/$o"); + } + function area_lock($id=''){ + $this->plan_area_model->area_lock($id,1); + redirect("area/index/$p/$o"); + } + function area_unlock($id=''){ + $this->plan_area_model->area_lock($id,2); + redirect("area/index/$p/$o"); + } +} \ No newline at end of file diff --git a/app/controllers/Data_persil.php b/app/controllers/Data_persil.php new file mode 100644 index 000000000..fa73f5c06 --- /dev/null +++ b/app/controllers/Data_persil.php @@ -0,0 +1,207 @@ +load->model('user_model'); + + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('config_model'); + $this->load->model('data_persil_model'); + $this->load->model('penduduk_model'); + } + function clear(){ + unset($_SESSION['cari']); + redirect('data_persil'); + } + function index($page=1){ + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + $data["desa"] = $this->config_model->get_data(); + $data["persil"] = $this->data_persil_model->list_persil('',0,$page); + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); + $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); + $data['keyword'] = $this->data_persil_model->autocomplete(); + $this->load->view('data_persil/persil',$data); + $this->load->view('footer'); + } + function import(){ + $data['form_action'] = site_url("data_persil/import_proses"); + $this->load->view('data_persil/import',$data); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('data_persil'); + } + function detail($id=0){ + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $data["persil_detail"] = $this->data_persil_model->get_persil($id); + if($id > 0){ + $data['pemilik'] = $this->data_persil_model->get_penduduk($data["persil_detail"]["nik"]); + }else{ + $data['pemilik']=false; + } + $data["persil_lokasi"] = $this->data_persil_model->list_dusunrwrt(); + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); + $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); + + $this->load->view('data_persil/detail',$data); + $this->load->view('footer'); + } + function create($id=0){ + $this->load->helper('form'); + $this->load->library('form_validation'); + + $this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required'); + + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $data["penduduk"] = $this->data_persil_model->list_penduduk(); + $data["persil_detail"] = $this->data_persil_model->get_persil($id); + if($id > 0){ + $data['pemilik'] = $this->data_persil_model->get_penduduk($data["persil_detail"]["nik"]); + }else{ + $data['pemilik']=false; + } + if(isset($_POST['nik'])){ + $data['pemilik']=$this->data_persil_model->get_penduduk($_POST['nik']); + } + + $data["persil_lokasi"] = $this->data_persil_model->list_dusunrwrt(); + + + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); + $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); + $this->load->view('data_persil/create',$data); + $this->load->view('footer'); + } + function create_ext($id=0){ + $this->load->helper('form'); + $this->load->library('form_validation'); + + $this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required'); + + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $data["penduduk"] = $this->data_persil_model->list_penduduk(); + $data["persil_detail"] = $this->data_persil_model->get_persil($id); + + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); + $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); + $this->load->view('data_persil/create_ext',$data); + $this->load->view('footer'); + } + function simpan_persil($page=1){ + $this->load->helper('form'); + $this->load->library('form_validation'); + + $this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required'); + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $data["hasil"] = $this->data_persil_model->simpan_persil(); + $data["persil"] = $this->data_persil_model->list_persil(0,$page); + + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); + $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); + redirect("data_persil/clear"); + $this->load->view('data_persil/persil',$data); + $this->load->view('footer'); + } + function jenis($apa=0,$page=1){ + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); + $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); + $data["persil"] = $this->data_persil_model->list_persil('jenis',$apa,$page);; + $this->load->view('data_persil/persil',$data); + $this->load->view('footer'); + } + function peruntukan($apa='',$page=1){ + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); + $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); + $data["persil"] = $this->data_persil_model->list_persil('peruntukan',$apa,$page);; + + $this->load->view('data_persil/persil',$data); + $this->load->view('footer'); + } + function persil_jenis($id=0){ + + $this->load->helper('form'); + $this->load->library('form_validation'); + + $this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required'); + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $data["id"]=$id; + if ($this->form_validation->run() === FALSE){ + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); + $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); + $data["persil_jenis_detail"] = $this->data_persil_model->get_persil_jenis($id); + $data["hasil"] = false; + $this->load->view('data_persil/persil_jenis',$data); + }else{ + $data["hasil"] = $this->data_persil_model->update_persil_jenis($id); + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); + $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); + $data["persil_jenis_detail"] = $this->data_persil_model->get_persil_jenis($id); + $this->load->view('data_persil/persil_jenis',$data); + } + $this->load->view('footer'); + } + public function hapus_persil_jenis($id){ + $this->data_persil_model->hapus_jenis($id); + redirect("data_persil/persil_jenis"); + } + function persil_peruntukan($id=0){ + + $this->load->helper('form'); + $this->load->library('form_validation'); + + $this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required'); + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $data["id"]=$id; + if ($this->form_validation->run() === FALSE){ + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); + $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); + $data["persil_peruntukan_detail"] = $this->data_persil_model->get_persil_peruntukan($id); + $data["hasil"] = false; + $this->load->view('data_persil/persil_peruntukan',$data); + }else{ + $data["hasil"] = $this->data_persil_model->update_persil_peruntukan($id); + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); + $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); + $data["persil_peruntukan_detail"] = $this->data_persil_model->get_persil_peruntukan($id); + $this->load->view('data_persil/persil_peruntukan',$data); + } + $this->load->view('footer'); + } + public function hapus_persil_peruntukan($id){ + $this->data_persil_model->hapus_peruntukan($id); + redirect("data_persil/persil_peruntukan"); + } + public function hapus($id){ + $this->data_persil_model->hapus_persil($id); + redirect("data_persil"); + } + function import_proses(){ + $this->load->model('import_model'); + $this->import_model->persil(); + redirect("data_persil"); + } +} +?> \ No newline at end of file diff --git a/app/controllers/Database.php b/app/controllers/Database.php new file mode 100644 index 000000000..7ee9178ff --- /dev/null +++ b/app/controllers/Database.php @@ -0,0 +1,163 @@ +load->model('user_model'); + $this->load->dbforge(); + //$this->load->model('wilayah_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('import_model'); + $this->load->model('export_model'); + + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('export'); + } + function index(){ + $nav['act']= 1; + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $this->load->view('nav',$nav); + $this->load->view('export/exp'); + $this->load->view('footer'); + } + function import(){ + $nav['act']= 2; + $data['form_action'] = site_url("database/import_dasar"); + $data['form_action3'] = site_url("database/ppls_individu"); + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $this->load->view('nav',$nav); + $this->load->view('import/imp',$data); + $this->load->view('footer'); + } + function siak(){ + $nav['act']= 6; + $data['form_action'] = site_url("database/import_siak"); + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $this->load->view('nav',$nav); + $this->load->view('import/siak',$data); + $this->load->view('footer'); + } + function import_ppls(){ + $nav['act']= 4; + $data['form_action3'] = site_url("database/ppls_individu"); + $data['form_action2'] = site_url("database/ppls_rumahtangga"); + //$data['form_action'] = site_url("database/ppls_kuisioner"); + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $this->load->view('nav',$nav); + $this->load->view('import/ppls',$data); + $this->load->view('footer'); + } + function backup(){ + $nav['act']= 3; + $data['form_action'] = site_url("database/restore"); + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $this->load->view('nav',$nav); + $this->load->view('database/backup',$data); + $this->load->view('footer'); + } + function export_dasar(){ + $this->export_model->export_dasar(); + } + function export_akp(){ + $this->export_model->export_akp(); + } + function import2(){ + $nav['act']= 2; + $data['form_action'] = site_url("database/import_dasar"); + $data['form_action2'] = site_url("database/import_akp"); + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('export/nav',$nav); + $this->load->view('export/imp',$data); + $this->load->view('footer'); + + } + function pre_migrate(){ + $nav['act']= 3; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('export/nav',$nav); + $this->load->view('export/mig'); + $this->load->view('footer'); + } + function migrate(){ + $this->dbforge->drop_table('tweb_dusun_x'); + $this->dbforge->drop_table('tweb_rw_x'); + $this->dbforge->drop_table('tweb_rt_x'); + $this->dbforge->drop_table('tweb_keluarga_x'); + $this->dbforge->drop_table('tweb_keluarga_x_pindah'); + $this->dbforge->drop_table('tweb_penduduk_x'); + $this->dbforge->drop_table('tweb_penduduk_x_pindah'); + } + function import_dasar(){ + $this->import_model->import_excel(); + redirect('database/import/1'); + + } + function ppls_kuisioner(){ + $this->import_model->ppls_kuisioner(); + redirect('database/import_ppls/1'); + + } + function ppls_individu(){ + $this->import_model->pbdt_individu(); + //redirect('database/import_ppls'); + + } + function ppls_rumahtangga(){ + $this->import_model->pbdt_rumahtangga(); + redirect('database/import_ppls/1'); + + } + function import_siak(){ + $data["siak"] = $this->import_model->import_siak(); + $_SESSION["SIAK"] = $data["siak"]; + redirect('database/import/3'); + } + function import_akp(){ + $this->import_model->import_akp(); + redirect('database/import'); + } + function jos(){ + $this->export_model->analisis(); + redirect('database/import'); + } + function jos2(){ + $this->export_model->analisis2(); + redirect('database/import'); + } + function exec_backup(){; + $this->load->view('database/export'); + // redirect('database/backup'); + } + function restore(){ + $this->export_model->restore(); + // redirect('database/backup'); + } + function ces(){ + $this->export_model->lombok(); + redirect('database/import'); + } + function surat(){ + $this->export_model->gawe_surat(); + //redirect('database/import'); + } + function export_excel(){ + $data['main'] = $this->export_model->export_excel(); + $this->load->view('export/penduduk_excel',$data); + } + function export_csv(){ + $data['main'] = $this->export_model->export_excel(); + $this->load->view('export/penduduk_csv',$data); + } +} \ No newline at end of file diff --git a/app/controllers/Dokumen.php b/app/controllers/Dokumen.php new file mode 100644 index 000000000..f22845a8d --- /dev/null +++ b/app/controllers/Dokumen.php @@ -0,0 +1,102 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3 AND $grup!=4) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('web_dokumen_model'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('dokumen'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->web_dokumen_model->paging($p,$o); + $data['main'] = $this->web_dokumen_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->web_dokumen_model->autocomplete(); + $header = $this->header_model->get_data(); + $nav['act']=4; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('dokumen/table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['dokumen'] = $this->web_dokumen_model->get_dokumen($id); + $data['form_action'] = site_url("dokumen/update/$id/$p/$o"); + } + else{ + $data['dokumen'] = null; + $data['form_action'] = site_url("dokumen/insert"); + } + + $header = $this->header_model->get_data(); + + $nav['act']=4; + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('dokumen/form',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('dokumen'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('dokumen'); + } + function insert(){ + $this->web_dokumen_model->insert(); + redirect('dokumen'); + } + function update($id='',$p=1,$o=0){ + $this->web_dokumen_model->update($id); + redirect("dokumen/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->web_dokumen_model->delete($id); + redirect("dokumen/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->web_dokumen_model->delete_all(); + redirect("dokumen/index/$p/$o"); + } + function dokumen_lock($id=''){ + $this->web_dokumen_model->dokumen_lock($id,1); + redirect("dokumen/index/$p/$o"); + } + function dokumen_unlock($id=''){ + $this->web_dokumen_model->dokumen_lock($id,2); + redirect("dokumen/index/$p/$o"); + } +} \ No newline at end of file diff --git a/app/controllers/Feed.php b/app/controllers/Feed.php new file mode 100644 index 000000000..9f3236cec --- /dev/null +++ b/app/controllers/Feed.php @@ -0,0 +1,16 @@ +load->model('header_model'); + $this->load->model('feed_model'); + $this->load->model('config_model'); + } + public function index(){ + $header = $this->header_model->get_data(); + $data["data_config"] = $this->config_model->get_data(); + $data["feeds"] = $this->feed_model->list_feeds(); + $this->load->view("feed",$data); + } +} \ No newline at end of file diff --git a/app/controllers/First.php b/app/controllers/First.php new file mode 100644 index 000000000..632099932 --- /dev/null +++ b/app/controllers/First.php @@ -0,0 +1,393 @@ +load->model('header_model'); + $this->load->model('config_model'); + $this->load->model('first_keluarga_m'); + $this->load->model('first_m'); + $this->load->model('first_artikel_m'); + $this->load->model('first_gallery_m'); + $this->load->model('first_menu_m'); + $this->load->model('first_penduduk_m'); + $this->load->model('penduduk_model'); + $this->load->model('surat_model'); + $this->load->model('surat_keluar_model'); + + } + + function auth(){ + if($_SESSION['mandiri_wait']!=1){ + $this->first_m->siteman(); + } + if($_SESSION['mandiri']==1) + redirect('first/mandiri/1/1'); + else + redirect('first'); + } + + function mobile($user="",$pass=""){ + $token = $this->first_m->m_siteman(); + return $token; + } + + function logout(){ + $this->first_m->logout(); + redirect('first'); + } + + function ganti(){ + $this->first_m->ganti(); + redirect('first'); + } + + function index($p=1){ + $data['p'] = $p; + $data['desa'] = $this->first_m->get_data(); + $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); + $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); + $data['headline'] = $this->first_artikel_m->get_headline(); + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); + + $data['paging'] = $this->first_artikel_m->paging($p); + $data['artikel'] = $this->first_artikel_m->artikel_show(0,$data['paging']->offset,$data['paging']->per_page); + + $data['arsip'] = $this->first_artikel_m->arsip_show(); + $data['komen'] = $this->first_artikel_m->komentar_show(); + $data['agenda'] = $this->first_artikel_m->agenda_show(); + $data['slide'] = $this->first_artikel_m->slide_show(); + + $data['stat'] = $this->first_penduduk_m->list_data(4); + $data['sosmed'] = $this->first_artikel_m->list_sosmed(); + $data['w_gal'] = $this->first_gallery_m->gallery_widget(); + $data['w_cos'] = $this->first_artikel_m->cos_widget(); + $data['data_config'] = $this->config_model->get_data(); +; + $this->load->view('layouts/main.tpl.php',$data); + } + + function cetak_biodata($id=''){ + + $data['desa'] = $this->header_model->get_data(); + $data['penduduk'] = $this->penduduk_model->get_penduduk($id); + $this->load->view('sid/kependudukan/cetak_biodata',$data); + } + + function mandiri($p=1,$m=0){ + if($_SESSION['mandiri']!=1){ + redirect('first'); + }else{ + $data['p'] = $p; + $data['desa'] = $this->first_m->get_data(); + $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); + $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); + $data['headline'] = $this->first_artikel_m->get_headline(); + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); + + //$data['paging'] = $this->first_artikel_m->paging($p); + //$data['artikel'] = $this->first_artikel_m->artikel_show(0,$data['paging']->offset,$data['paging']->per_page); + + $data['penduduk'] = $this->penduduk_model->get_penduduk($_SESSION['id']); + $data['arsip'] = $this->first_artikel_m->arsip_show(); + $data['komen'] = $this->first_artikel_m->komentar_show(); + $data['agenda'] = $this->first_artikel_m->agenda_show(); + $data['slide'] = $this->first_artikel_m->slide_show(); + + $data['stat'] = $this->first_penduduk_m->list_data(4); + $data['sosmed'] = $this->first_artikel_m->list_sosmed(); + $data['w_gal'] = $this->first_gallery_m->gallery_widget(); + $data['w_cos'] = $this->first_artikel_m->cos_widget(); + $data['data_config'] = $this->config_model->get_data(); + + $data['list_dokumen'] = $this->penduduk_model->list_dokumen($_SESSION['id']); + $data['list_kelompok'] = $this->penduduk_model->list_kelompok($_SESSION['id']); + + //if($m == 2) + $data['surat_keluar'] = $this->surat_keluar_model->list_data_surat($_SESSION['id']); + + //$data['menu_surat2'] = $this->surat_model->list_surat2(); + $data['m'] = $m; + $this->load->view('layouts/mandiri.php',$data); + } + } + + function artikel($id="",$p=1) { + $id = explode("-",$id); + $id = $id[0]; + $data['p'] = $p; + $data['desa'] = $this->first_m->get_data(); + + $data['paging'] = $this->first_artikel_m->paging($p); + $data['artikel'] = $this->first_artikel_m->list_artikel(0,$data['paging']->offset,$data['paging']->per_page); + + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); + $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); + $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); + $data['komentar'] = $this->first_artikel_m->list_komentar($id); + $data['sosmed'] = $this->first_artikel_m->list_sosmed(); + $data['single_artikel'] = $this->first_artikel_m->get_artikel($id); + $data['arsip'] = $this->first_artikel_m->arsip_show(); + $data['komen'] = $this->first_artikel_m->komentar_show(); + $data['agenda'] = $this->first_artikel_m->agenda_show(); + $data['slide'] = $this->first_artikel_m->slide_show(); + $data['stat'] = $this->first_penduduk_m->list_data(5); + $data['w_gal'] = $this->first_gallery_m->gallery_widget(); + $data['w_cos'] = $this->first_artikel_m->cos_widget(); + + $data['data_config'] = $this->config_model->get_data(); + $this->load->view('layouts/artikel.tpl.php',$data); + } + + function arsip($p=1) { + $data['p'] = $p; + $data['paging'] = $this->first_artikel_m->paging_arsip($p); + + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); + $data['desa'] = $this->first_m->get_data(); + $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); + $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); + $data['sosmed'] = $this->first_artikel_m->list_sosmed(); + $data['farsip'] = $this->first_artikel_m->full_arsip($data['paging']->offset,$data['paging']->per_page); + $data['arsip'] = $this->first_artikel_m->arsip_show(); + $data['komen'] = $this->first_artikel_m->komentar_show(); + $data['agenda'] = $this->first_artikel_m->agenda_show(); + $data['slide'] = $this->first_artikel_m->slide_show(); + $data['stat'] = $this->first_penduduk_m->list_data(5); + $data['w_gal'] = $this->first_gallery_m->gallery_widget(); + $data['w_cos'] = $this->first_artikel_m->cos_widget(); + $data['data_config'] = $this->config_model->get_data(); + + + $this->load->view('layouts/arsip.tpl.php',$data); + } + + function gallery($p=1){ + $data['p'] = $p; + + $data['desa'] = $this->first_m->get_data(); + + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); + $data['paging'] = $this->first_artikel_m->paging($p); + $data['artikel'] = $this->first_artikel_m->artikel_show(0,$data['paging']->offset,$data['paging']->per_page); + + $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); + $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); + $data['arsip'] = $this->first_artikel_m->arsip_show(); + $data['komen'] = $this->first_artikel_m->komentar_show(); + $data['agenda'] = $this->first_artikel_m->agenda_show(); + $data['slide'] = $this->first_artikel_m->slide_show(); + $data['sosmed'] = $this->first_artikel_m->list_sosmed(); + + $data['paging'] = $this->first_gallery_m->paging($p); + $data['gallery'] = $this->first_gallery_m->gallery_show($data['paging']->offset,$data['paging']->per_page); + + $data['stat'] = $this->first_penduduk_m->list_data(6); + $data['w_gal'] = $this->first_gallery_m->gallery_widget(); + $data['w_cos'] = $this->first_artikel_m->cos_widget(); + $data['data_config'] = $this->config_model->get_data(); + $this->load->view('layouts/gallery.tpl.php',$data); + } + + function sub_gallery($gal=0,$p=1){ + $data['p'] = $p; + $data['gal'] = $gal; + $data['desa'] = $this->first_m->get_data(); + + $data['paging'] = $this->first_gallery_m->paging($p); + $data['gallery'] = $this->first_gallery_m->gallery_show($data['paging']->offset,$data['paging']->per_page); + + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); + $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); + $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); + + $data['paging'] = $this->first_gallery_m->paging2($gal,$p); + $data['gallery'] = $this->first_gallery_m->sub_gallery_show($gal,$data['paging']->offset,$data['paging']->per_page); + + $data['parrent'] = $this->first_gallery_m->get_parrent($gal); + $data['arsip'] = $this->first_artikel_m->arsip_show(); + $data['komen'] = $this->first_artikel_m->komentar_show(); + $data['agenda'] = $this->first_artikel_m->agenda_show(); + $data['slide'] = $this->first_artikel_m->slide_show(); + $data['sosmed'] = $this->first_artikel_m->list_sosmed(); + + $data['stat'] = $this->first_penduduk_m->list_data(4); + $data['w_gal'] = $this->first_gallery_m->gallery_widget(); + $data['w_cos'] = $this->first_artikel_m->cos_widget(); + $data['data_config'] = $this->config_model->get_data(); + $data['mode']= 1; + $this->load->view('layouts/sub_gallery.tpl.php',$data); + } + + function statistik($stat="",$tipe=0){ + + switch($stat){ + case "pendidikan-dalam-kk":$data['heading']="Pendidikan";break; + case "pekerjaan":$data['heading']="Pekerjaan";break; + case "status-perkawinan":$data['heading']="Status Perkawinan";break; + case "agama":$data['heading']="Agama";break; + case "jenis-kelamin":$data['heading']="Jenis Kelamin";break; + case "golongan-darah":$data['heading']="Golongan Darah";break; + case "kelompok-umur":$data['heading']="Kelompok Umur";break; + case "warga-negara":$data['heading']="Warga Negara";break; + case "wilayah":redirect("first/wilayah");break; + case "pendidikan-ditempuh":$data['heading']="Pendidikan Sedang Ditempuh";break; + + default:$data['heading']="";redirect("first");break; + } + + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); + $data['slide'] = $this->first_artikel_m->slide_show(); + $data['desa'] = $this->first_m->get_data(); + $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); + $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); + $data['stat'] = $this->first_penduduk_m->list_data($stat); + $data['tipe'] = $tipe; + + $data['sosmed'] = $this->first_artikel_m->list_sosmed(); + $data['arsip'] = $this->first_artikel_m->arsip_show(); + $data['w_cos'] = $this->first_artikel_m->cos_widget(); + + $data['data_config'] = $this->config_model->get_data(); + $data['st'] = $stat; + + $this->load->view('layouts/stat.tpl.php',$data); + } + + function data_analisis($stat="",$sb=0,$per=0){ + + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); + $data['slide'] = $this->first_artikel_m->slide_show(); + $data['desa'] = $this->first_m->get_data(); + $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); + $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); + + if($stat == ""){ + $data['list_indikator'] = $this->first_penduduk_m->list_indikator(); + $data['list_jawab'] = null; + $data['indikator'] = null; + }else{ + $data['list_indikator'] = ""; + $data['list_jawab'] = $this->first_penduduk_m->list_jawab($stat,$sb,$per); + $data['indikator'] = $this->first_penduduk_m->get_indikator($stat); + + } + $data['sosmed'] = $this->first_artikel_m->list_sosmed(); + $data['arsip'] = $this->first_artikel_m->arsip_show(); + $data['w_cos'] = $this->first_artikel_m->cos_widget(); + + $data['data_config'] = $this->config_model->get_data(); + + $this->load->view('layouts/analisis.tpl.php',$data); + } + + + function wilayah(){ + + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); + $data['main'] = $this->first_penduduk_m->wilayah(); + $data['heading']="Populasi Per Wilayah"; + $data['desa'] = $this->first_m->get_data(); + $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); + $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); + + $data['slide'] = $this->first_artikel_m->slide_show(); + $data['sosmed'] = $this->first_artikel_m->list_sosmed(); + $data['arsip'] = $this->first_artikel_m->arsip_show(); + $data['w_cos'] = $this->first_artikel_m->cos_widget(); + + $data['tipe'] = 3; + + $data['total'] = $this->first_penduduk_m->total(); + $data['st'] = 1; + $data['data_config'] = $this->config_model->get_data(); + $this->load->view('layouts/stat.tpl.php',$data); + } + + + function statistik_k($tipex=0) { + + $data['tipe'] = 2; + $data['tipex'] = $tipex; + + $data['desa'] = $this->first_m->get_data(); + + + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); + $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); + $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); + + $data['slide'] = $this->first_artikel_m->slide_show(); + $data['sosmed'] = $this->first_artikel_m->list_sosmed(); + $data['arsip'] = $this->first_artikel_m->arsip_show(); + $data['w_cos'] = $this->first_artikel_m->cos_widget(); + $data['stat'] = $this->first_penduduk_m->list_data(4); + + $data['main'] = $this->first_keluarga_m->list_raskin($tipex); + $data['data_config'] = $this->config_model->get_data(); + $this->load->view('layouts/stat.tpl.php',$data); + } + + function agenda($stat=0) { + $data['desa'] = $this->first_m->get_data(); + $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); + $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); + $data['artikel'] = $this->first_artikel_m->agenda_show(); + $data['arsip'] = $this->first_artikel_m->arsip_show(); + $data['komen'] = $this->first_artikel_m->komentar_show(); + $data['agenda'] = $this->first_artikel_m->agenda_show(); + $data['sosmed'] = $this->first_artikel_m->list_sosmed(); + $data['stat'] = $this->first_penduduk_m->list_data(4); + $data['data_config'] = $this->config_model->get_data(); + + $this->load->view('layouts/main.tpl.php',$data); + } + + function kategori($kat=0,$p=0){ + + $data['p'] = $p; + $data['desa'] = $this->first_m->get_data(); + $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); + $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); + $data['headline'] = null; + + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); + $data['paging'] = $this->first_artikel_m->paging_kat($p,$kat); + $data['artikel'] = $this->first_artikel_m->list_artikel($data['paging']->offset,$data['paging']->per_page,$kat); + + $data['arsip'] = $this->first_artikel_m->arsip_show(); + $data['komen'] = $this->first_artikel_m->komentar_show(); + $data['agenda'] = $this->first_artikel_m->agenda_show(); + $data['slide'] = $this->first_artikel_m->slide_show(); + $data['stat'] = $this->first_penduduk_m->list_data(4); + $data['sosmed'] = $this->first_artikel_m->list_sosmed(); + $data['w_gal'] = $this->first_gallery_m->gallery_widget(); + $data['w_cos'] = $this->first_artikel_m->cos_widget(); + + $data["judul_kategori"] = $this->first_artikel_m->get_kategori($kat); + + $data['data_config'] = $this->config_model->get_data(); + $this->load->view('layouts/main.tpl.php',$data); + } + + function add_comment($id=0) { + $this->first_artikel_m->insert_comment($id); + $data['data_config'] = $this->config_model->get_data(); + if($id!=775) + redirect("first/artikel/$id"); + else{ + $_SESSION['sukses']=1; + redirect("first/mandiri/1/3"); + } + } + + function randomap($id=0) { + $this->penduduk_model->randomap(); + } + +} diff --git a/app/controllers/Gallery.php b/app/controllers/Gallery.php new file mode 100644 index 000000000..9a1604d5c --- /dev/null +++ b/app/controllers/Gallery.php @@ -0,0 +1,174 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3 AND $grup!=4) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('web_gallery_model'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('gallery'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->web_gallery_model->paging($p,$o); + $data['main'] = $this->web_gallery_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->web_gallery_model->autocomplete(); + $header = $this->header_model->get_data(); + $nav['act']=3; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('gallery/table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['gallery'] = $this->web_gallery_model->get_gallery($id); + $data['form_action'] = site_url("gallery/update/$id/$p/$o"); + } + else{ + $data['gallery'] = null; + $data['form_action'] = site_url("gallery/insert"); + } + + $header = $this->header_model->get_data(); + + $nav['act']=3; + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('gallery/form',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('gallery'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('gallery'); + } + function insert(){ + $this->web_gallery_model->insert(); + redirect('gallery'); + } + function update($id='',$p=1,$o=0){ + $this->web_gallery_model->update($id); + redirect("gallery/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->web_gallery_model->delete($id); + redirect("gallery/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->web_gallery_model->delete_all(); + redirect("gallery/index/$p/$o"); + } + function gallery_lock($id=''){ + $this->web_gallery_model->gallery_lock($id,1); + redirect("gallery/index/$p/$o"); + } + function gallery_unlock($id=''){ + $this->web_gallery_model->gallery_lock($id,2); + redirect("gallery/index/$p/$o"); + } + function sub_gallery($gal=0,$p=1){ + $data['p'] = 1; + $data['o'] = 0; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->web_gallery_model->paging2($gal,$p); + + $data['sub_gallery'] = $this->web_gallery_model->list_sub_gallery($gal,$data['paging']->offset, $data['paging']->per_page); + $data['gallery'] = $gal; + $data['sub'] = $this->web_gallery_model->get_gallery($gal); + $header = $this->header_model->get_data(); + $nav['act']=3; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('gallery/sub_gallery_table',$data); + $this->load->view('footer'); + } + function form_sub_gallery($gallery=0,$id=0){ + if($id){ + $data['gallery'] = $this->web_gallery_model->get_gallery($id); + $data['form_action'] = site_url("gallery/update_sub_gallery/$gallery/$id"); + } + else{ + $data['gallery'] = null; + $data['form_action'] = site_url("gallery/insert_sub_gallery/$gallery"); + } + $data['album']=$gallery; + + + $header = $this->header_model->get_data(); + + $nav['act']=3; + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('gallery/form_sub_gallery',$data); + $this->load->view('footer'); + } + function insert_sub_gallery($gallery=''){ + $this->web_gallery_model->insert_sub_gallery($gallery); + redirect("gallery/sub_gallery/$gallery"); + } + function update_sub_gallery($gallery='',$id=''){ + $this->web_gallery_model->update_sub_gallery($id); + redirect("gallery/sub_gallery/$gallery"); + } + function delete_sub_gallery($gallery='',$id=''){ + $this->web_gallery_model->delete($id); + redirect("gallery/sub_gallery/$gallery"); + } + function delete_all_sub_gallery($gallery=''){ + $this->web_gallery_model->delete_all_sub_gallery(); + redirect("gallery/sub_gallery/$gallery"); + } + function gallery_lock_sub_gallery($gallery='',$id=''){ + $this->web_gallery_model->gallery_lock($id,1); + redirect("gallery/sub_gallery/$gallery"); + } + function gallery_unlock_sub_gallery($gallery='',$id=''){ + $this->web_gallery_model->gallery_lock($id,2); + redirect("gallery/sub_gallery/$gallery"); + } +} \ No newline at end of file diff --git a/app/controllers/Garis.php b/app/controllers/Garis.php new file mode 100644 index 000000000..6e6a46edf --- /dev/null +++ b/app/controllers/Garis.php @@ -0,0 +1,150 @@ +load->model('user_model'); + + $this->load->model('header_model'); + $this->load->model('plan_garis_model'); + + + $this->load->database(); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['line']); + unset($_SESSION['subline']); + redirect('garis'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['line'])) + $data['line'] = $_SESSION['line']; + else $data['line'] = ''; + if(isset($_SESSION['subline'])) + $data['subline'] = $_SESSION['subline']; + else $data['subline'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->plan_garis_model->paging($p,$o); + $data['main'] = $this->plan_garis_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->plan_garis_model->autocomplete(); + $data['list_line'] = $this->plan_garis_model->list_line(); + $data['list_subline'] = $this->plan_garis_model->list_subline(); + $header= $this->header_model->get_data(); + $nav['act']=1; + + $this->load->view('header-gis', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('garis/table',$data); + $this->load->view('footer'); + + } + function form($p=1,$o=0,$id=''){ + $data['desa'] = $this->plan_garis_model->get_desa(); + $data['list_line'] = $this->plan_garis_model->list_line(); + $data['dusun'] = $this->plan_garis_model->list_dusun(); + + if($id){ + $data['garis'] = $this->plan_garis_model->get_garis($id); + $data['form_action'] = site_url("garis/update/$id/$p/$o"); + } + else{ + $data['garis'] = null; + $data['form_action'] = site_url("garis/insert"); + } + $header= $this->header_model->get_data(); + + $nav['act']=1; + $this->load->view('header-gis', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('garis/form',$data); + $this->load->view('footer'); + + } + function ajax_garis_maps($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + if($id) + $data['garis'] = $this->plan_garis_model->get_garis($id); + else + $data['garis'] = null; + + $data['desa'] = $this->plan_garis_model->get_desa(); + $data['form_action'] = site_url("garis/update_maps/$p/$o/$id"); + $this->load->view("garis/maps", $data); + } + + function update_maps($p=1,$o=0,$id=''){ + $this->plan_garis_model->update_position($id); + redirect("garis/index/$p/$o"); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('garis'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('garis'); + } + function line(){ + $line = $this->input->post('line'); + if($line!=0) + $_SESSION['line']=$line; + else unset($_SESSION['line']); + redirect('garis'); + } + function subline(){ + unset($_SESSION['line']); + $subline = $this->input->post('subline'); + if($subline!=0) + $_SESSION['subline']=$subline; + else unset($_SESSION['subline']); + redirect('garis'); + } + function insert($tip=1){ + $this->plan_garis_model->insert($tip); + redirect("garis/index/$tip"); + } + function update($id='',$p=1,$o=0){ + $this->plan_garis_model->update($id); + redirect("garis/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->plan_garis_model->delete($id); + redirect("garis/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->plan_garis_model->delete_all(); + redirect("garis/index/$p/$o"); + } + function garis_lock($id=''){ + $this->plan_garis_model->garis_lock($id,1); + redirect("garis/index/$p/$o"); + } + function garis_unlock($id=''){ + $this->plan_garis_model->garis_lock($id,2); + redirect("garis/index/$p/$o"); + } +} \ No newline at end of file diff --git a/app/controllers/Gis.php b/app/controllers/Gis.php new file mode 100644 index 000000000..1e5f07171 --- /dev/null +++ b/app/controllers/Gis.php @@ -0,0 +1,258 @@ +load->model('user_model'); + + + $this->load->model('penduduk_model'); + $this->load->model('plan_lokasi_model'); + $this->load->model('plan_area_model'); + $this->load->model('plan_garis_model'); + $this->load->model('header_model'); + + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + + + $this->load->database(); + } + function clear(){ + unset($_SESSION['log']); + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['sex']); + unset($_SESSION['warganegara']); + unset($_SESSION['fisik']); + unset($_SESSION['mental']); + unset($_SESSION['menahun']); + unset($_SESSION['golongan_darah']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['agama']); + unset($_SESSION['umur_min']); + unset($_SESSION['umur_max']); + unset($_SESSION['pekerjaan_id']); + unset($_SESSION['status']); + unset($_SESSION['pendidikan_id']); + unset($_SESSION['status_penduduk']); + unset($_SESSION['layer_penduduk']); + unset($_SESSION['layer_keluarga']); + unset($_SESSION['layer_desa']); + unset($_SESSION['layer_wilayah']); + unset($_SESSION['layer_area']); + unset($_SESSION['layer_line']); + unset($_SESSION['layer_point']); + $_SESSION['layer_keluarga'] == 0; + redirect('gis'); + } +function index(){ + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['sex'])) + $data['sex'] = $_SESSION['sex']; + else $data['sex'] = ''; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + if(isset($_SESSION['agama'])) + $data['agama'] = $_SESSION['agama']; + else $data['agama'] = ''; + + if(isset($_SESSION['layer_penduduk'])) + $data['layer_penduduk']=$_SESSION['layer_penduduk']; + else $data['layer_penduduk']= 0; + + if(isset($_SESSION['layer_keluarga'])) + $data['layer_keluarga']=$_SESSION['layer_keluarga']; + else $data['layer_keluarga']= 0; + + if(isset($_SESSION['layer_desa'])) + $data['layer_desa']=$_SESSION['layer_desa']; + else $data['layer_desa']=0; + + if(isset($_SESSION['layer_wilayah'])) + $data['layer_wilayah']=$_SESSION['layer_wilayah']; + else $data['layer_wilayah']=0; + + if(isset($_SESSION['layer_area'])) + $data['layer_area']=$_SESSION['layer_area']; + else $data['layer_area']= 0; + + if(isset($_SESSION['layer_line'])) + $data['layer_line']=$_SESSION['layer_line']; + else $data['layer_line']=0; + + $data['layer_point']=@$_SESSION['layer_point']; + + $data['list_dusun'] = $this->penduduk_model->list_dusun(); + $data['wilayah'] = $this->penduduk_model->list_wil(); + $data['list_agama'] = $this->penduduk_model->list_agama(); + $data['list_pendidikan'] = $this->penduduk_model->list_pendidikan(); + $data['desa'] = $this->penduduk_model->get_desa(); + $data['lokasi'] = $this->plan_lokasi_model->list_data(); + $data['garis'] = $this->plan_garis_model->list_data(); + $data['area'] = $this->plan_area_model->list_data(); + $data['penduduk'] = $this->penduduk_model->list_data_map(); + $data['keyword'] = $this->penduduk_model->autocomplete(); + $header = $this->header_model->get_data(); + + $this->load->view('gis/header', $header); + $this->load->view('gis/maps',$data); + $this->load->view('footer'); + + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('gis'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!="") + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('gis'); + } + function layer_penduduk(){ + $layer_penduduk = $this->input->post('layer_penduduk'); + if($layer_penduduk=="") + $_SESSION['layer_penduduk']=0; + else{ + $_SESSION['layer_penduduk']=1; + $_SESSION['layer_keluarga']=0; + } + redirect('gis'); + } + function layer_wilayah(){ + $layer_wilayah = $this->input->post('layer_wilayah'); + if($layer_wilayah=="") + $_SESSION['layer_wilayah']=0; + else $_SESSION['layer_wilayah']=1; + redirect('gis'); + } + function layer_area(){ + $layer_area = $this->input->post('layer_area'); + if($layer_area=="") + $_SESSION['layer_area']=0; + else $_SESSION['layer_area']=1; + redirect('gis'); + } + function layer_line(){ + $layer_line = $this->input->post('layer_line'); + if($layer_line=="") + $_SESSION['layer_line']=0; + else $_SESSION['layer_line']=1; + redirect('gis'); + } + function layer_point(){ + $layer_point = $this->input->post('layer_point'); + if($layer_point=="") + $_SESSION['layer_point']=0; + else $_SESSION['layer_point']=1; + redirect('gis'); + } + function layer_keluarga(){ + $layer_keluarga = $this->input->post('layer_keluarga'); + if($layer_keluarga==""){ + $_SESSION['layer_keluarga']=0; + }else{ + $_SESSION['layer_keluarga']=1; + $_SESSION['layer_penduduk']=0; + } + redirect('gis'); + } + function layer_desa(){ + $layer_desa = $this->input->post('layer_desa'); + if($layer_desa=="") + $_SESSION['layer_desa']=0; + else $_SESSION['layer_desa']=1; + redirect('gis'); + } + function sex(){ + $sex = $this->input->post('sex'); + if($sex!="") + $_SESSION['sex']=$sex; + else unset($_SESSION['sex']); + redirect('gis'); + } + function dusun(){ + $dusun = $this->input->post('dusun'); + if($dusun!="") + $_SESSION['dusun']=$dusun; + else unset($_SESSION['dusun']); + redirect('gis'); + } + function rw(){ + $rw = $this->input->post('rw'); + if($rw!="") + $_SESSION['rw']=$rw; + else unset($_SESSION['rw']); + redirect('gis'); + } + function rt(){ + $rt = $this->input->post('rt'); + if($rt!="") + $_SESSION['rt']=$rt; + else unset($_SESSION['rt']); + redirect('gis'); + } + function agama(){ + $agama = $this->input->post('agama'); + if($agama!="") + $_SESSION['agama']=$agama; + else unset($_SESSION['agama']); + redirect('gis'); + } + function ajax_adv_search(){ + $data['dusun'] = $this->penduduk_model->list_dusun(); + $data['agama'] = $this->penduduk_model->list_agama(); + $data['pendidikan'] = $this->penduduk_model->list_pendidikan(); + $data['pekerjaan'] = $this->penduduk_model->list_pekerjaan(); + $data['form_action'] = site_url("gis/adv_search_proses"); + $this->load->view("gis/ajax_adv_search_form", $data); + } + function adv_search_proses(){ + $adv_search = $_POST; + $i=0; + while($i++ < count($adv_search)){ + $col[$i] = key($adv_search); + next($adv_search); + } + $i=0; + while($i++ < count($col)){ + if($adv_search[$col[$i]]=="") + UNSET($adv_search[$col[$i]]); + else + $_SESSION[$col[$i]]=$adv_search[$col[$i]]; + } + + redirect('gis'); + } +} \ No newline at end of file diff --git a/app/controllers/Hom_desa.php b/app/controllers/Hom_desa.php new file mode 100644 index 000000000..70f27f5ee --- /dev/null +++ b/app/controllers/Hom_desa.php @@ -0,0 +1,80 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('config_model'); + } + + function index(){ + $_SESSION['delik'] = 0; + $nav['act']= 0; + $header = $this->header_model->get_data(); + $data['main'] = $this->config_model->get_data(); + $this->load->view('header',$header); + $this->load->view('home/nav',$nav); + $this->load->view('home/konfigurasi_form',$data); + $this->load->view('footer'); + } + + function about(){ + $nav['act']= 2; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('home/nav',$nav); + $this->load->view('home/desa'); + $this->load->view('footer'); + } + + function insert(){ + $this->config_model->insert(); + redirect('hom_desa'); + } + + function update($id=''){ + $this->config_model->update($id); + redirect("hom_desa"); + } + + function ajax_kantor_maps(){ + $data['desa'] = $this->config_model->get_data(); + $data['form_action'] = site_url("hom_desa/update_kantor_maps/"); + $this->load->view("home/ajax_kantor_desa_maps", $data); + } + + function ajax_wilayah_maps(){ + $data['desa'] = $this->config_model->get_data(); + $data['form_action'] = site_url("hom_desa/update_wilayah_maps/"); + $this->load->view("home/ajax_wilayah_desa_maps", $data); + } + + function update_kantor_maps(){ + $this->config_model->update_kantor(); + redirect("hom_desa"); + } + + function update_wilayah_maps(){ + $this->config_model->update_wilayah(); + redirect("hom_desa"); + } + + function kosong_pend(){ + $this->config_model->kosong_pend(); + redirect("hom_desa"); + } + + function undelik(){ + if(isset($_SESSION['delik'])){ + unset($_SESSION['delik']); + } + redirect("analisis_master/clear"); + } + +} diff --git a/app/controllers/Kategori.php b/app/controllers/Kategori.php new file mode 100644 index 000000000..d4770c47d --- /dev/null +++ b/app/controllers/Kategori.php @@ -0,0 +1,151 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('web_kategori_model'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('kategori'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + $data['tip'] = 2; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->web_kategori_model->paging($p,$o); + $data['main'] = $this->web_kategori_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->web_kategori_model->autocomplete(); + $header = $this->header_model->get_data(); + $nav['act']=7; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('kategori/table',$data); + $this->load->view('footer'); + } + function form($id=''){ + $data['tip'] = 2; + if($id){ + $data['kategori'] = $this->web_kategori_model->get_kategori($id); + $data['form_action'] = site_url("kategori/update/$id"); + } + else{ + $data['kategori'] = null; + $data['form_action'] = site_url("kategori/insert"); + } + $header = $this->header_model->get_data(); + + $nav['act']=7; + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('kategori/form',$data); + $this->load->view('footer'); + } + function sub_kategori($kategori=1){ + $data['tip'] = 2; + $data['subkategori'] = $this->web_kategori_model->list_sub_kategori($kategori); + $data['kategori'] = $kategori; + $header = $this->header_model->get_data(); + $nav['act']=7; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('kategori/sub_kategori_table',$data); + $this->load->view('footer'); + } + function ajax_add_sub_kategori($kategori='',$id=''){ + $data['kategori'] = $kategori; + + $data['link'] = $this->web_kategori_model->list_link(); + + if($id){ + $data['subkategori'] = $this->web_kategori_model->get_kategori($id); + $data['form_action'] = site_url("kategori/update_sub_kategori/$kategori/$id"); + } + else{ + $data['subkategori'] = null; + $data['form_action'] = site_url("kategori/insert_sub_kategori/$kategori"); + } + $this->load->view('kategori/ajax_add_sub_kategori_form',$data); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect("kategori/index"); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('kategori'); + } + function insert(){ + $this->web_kategori_model->insert($tip); + redirect("kategori/index"); + } + function update($id=''){ + $this->web_kategori_model->update($id); + redirect("kategori/index"); + } + function delete($id=''){ + $this->web_kategori_model->delete($id); + redirect("kategori/index"); + } + function delete_all($p=1,$o=0){ + $this->web_kategori_model->delete_all(); + redirect("kategori/index/$p/$o"); + } + function kategori_lock($id=''){ + $this->web_kategori_model->kategori_lock($id,1); + redirect("kategori/index/$p/$o"); + } + function kategori_unlock($id=''){ + $this->web_kategori_model->kategori_lock($id,2); + redirect("kategori/index/$p/$o"); + } + function insert_sub_kategori($kategori=''){ + $this->web_kategori_model->insert_sub_kategori($kategori); + redirect("kategori/sub_kategori/$kategori"); + } + function update_sub_kategori($kategori='',$id=''){ + $this->web_kategori_model->update_sub_kategori($id); + redirect("kategori/sub_kategori/$kategori"); + } + function delete_sub_kategori($kategori='',$id=0){ + $this->web_kategori_model->delete($id); + redirect("kategori/sub_kategori/$kategori"); + } + function delete_all_sub_kategori($kategori=''){ + $this->web_kategori_model->delete_all(); + redirect("kategori/sub_kategori/$kategori"); + } + function kategori_lock_sub_kategori($kategori='',$id=''){ + $this->web_kategori_model->kategori_lock($id,1); + redirect("kategori/sub_kategori/$kategori"); + } + function kategori_unlock_sub_kategori($kategori='',$id=''){ + $this->web_kategori_model->kategori_lock($id,2); + redirect("kategori/sub_kategori/$kategori"); + } +} \ No newline at end of file diff --git a/app/controllers/Kelompok.php b/app/controllers/Kelompok.php new file mode 100644 index 000000000..34c31335e --- /dev/null +++ b/app/controllers/Kelompok.php @@ -0,0 +1,227 @@ +load->model('kelompok_model'); + $this->load->model('user_model'); + $this->load->model('header_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['state']); + redirect('kelompok'); + } + function index($p=1,$o=0){ + unset($_SESSION['kelompok']); + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['state'])) + $data['state'] = $_SESSION['state']; + else $data['state'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->kelompok_model->paging($p,$o); + $data['main'] = $this->kelompok_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->kelompok_model->autocomplete(); + $data['list_master'] = $this->kelompok_model->list_master(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $nav['act']= 4; + + $this->load->view('sid/nav',$nav); + $this->load->view('kelompok/table',$data); + $this->load->view('footer'); + } + function anggota($id=0){ + $data['kel'] = $id; + $data['kelompok'] = $this->kelompok_model->get_kelompok($id); + $data['main'] = $this->kelompok_model->list_anggota($id); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $nav['act']= 4; + + $this->load->view('sid/nav',$nav); + $this->load->view('kelompok/anggota/table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['kelompok'] = $this->kelompok_model->get_kelompok($id); + $data['form_action'] = site_url("kelompok/update/$p/$o/$id"); + } + + else{ + $data['kelompok'] = null; + $data['form_action'] = site_url("kelompok/insert"); + } + + $data['list_master'] = $this->kelompok_model->list_master(); + $data['list_penduduk'] = $this->kelompok_model->list_penduduk(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $nav['act']= 4; + + $this->load->view('sid/nav',$nav); + $this->load->view('kelompok/form',$data); + $this->load->view('footer'); + } + function form_anggota($id=0,$id_a=0){ + if($id_a == 0){ + $data['kelompok'] = null; + $data['pend'] = null; + $data['form_action'] = site_url("kelompok/insert_a/$id"); + }else{ + + $data['kelompok'] = $id; + $data['pend'] = $this->kelompok_model->get_anggota($id,$id_a); + $data['form_action'] = site_url("kelompok/update_a/$id/$id_a"); + //echo $id.$id_a; + } + $data['list_penduduk'] = $this->kelompok_model->list_penduduk(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $nav['act']= 4; + + $this->load->view('sid/nav',$nav); + $this->load->view('kelompok/anggota/form',$data); + $this->load->view('footer'); + } + function panduan(){ + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('kelompok/nav2'); + $this->load->view('kelompok/panduan'); + $this->load->view('footer'); + } + + function cetak(){ + $data['header'] = $this->header_model->get_data(); + $data['main'] = $this->kelompok_model->list_data(); + + $this->load->view('kelompok/cetak',$data); + } + + function excel(){ + $data['header'] = $this->header_model->get_data(); + $data['main'] = $this->kelompok_model->list_data(); + + $this->load->view('kelompok/excel',$data); + } + + function cetak_a($id=0){ + $data['header'] = $this->header_model->get_data(); + $data['main'] = $this->kelompok_model->list_anggota($id); + $data['kelompok'] = $this->kelompok_model->get_kelompok($id); + + $this->load->view('kelompok/anggota/cetak',$data); + } + + function excel_a($id=0){ + $data['header'] = $this->header_model->get_data(); + $data['main'] = $this->kelompok_model->list_anggota($id); + $data['kelompok'] = $this->kelompok_model->get_kelompok($id); + + $this->load->view('kelompok/anggota/excel',$data); + } + + function menu($id=''){ + $_SESSION['kelompok']=$id; + $data['kelompok'] = $this->kelompok_model->get_kelompok($id); + $da = $data['kelompok']; + $master = $da['master_tipe']; + + switch($master){ + case 1: $data['menu_respon'] = "kelompok_respon_penduduk"; break; + case 2: $data['menu_respon'] = "kelompok_respon_keluarga"; break; + case 3: $data['menu_respon'] = "kelompok_respon_rtm"; break; + case 4: $data['menu_respon'] = "kelompok_respon_kelompok"; break; + default:redirect('kelompok'); + } + + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('kelompok/nav'); + $this->load->view('kelompok/menu',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('kelompok'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('kelompok'); + } + function state(){ + $filter = $this->input->post('state'); + if($filter!=0) + $_SESSION['state']=$filter; + else unset($_SESSION['state']); + redirect('kelompok'); + } + function insert(){ + $this->kelompok_model->insert(); + redirect('kelompok'); + } + function update($p=1,$o=0,$id=''){ + $this->kelompok_model->update($id); + redirect("kelompok/index/$p/$o"); + } + function update_a($id='',$id_a=0){ + $this->kelompok_model->update_a($id,$id_a); + redirect("kelompok/anggota/$id"); + } + function delete($p=1,$o=0,$id=''){ + $this->kelompok_model->delete($id); + redirect("kelompok/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->kelompok_model->delete_all(); + redirect("kelompok/index/$p/$o"); + } + function insert_a($id=0){ + $this->kelompok_model->insert_a($id); + redirect("kelompok/anggota/$id"); + } + function delete_a($id='',$a=0){ + $this->kelompok_model->delete_a($a); + redirect("kelompok/anggota/$id"); + } + + function to_master($id=0){ + $filter = $id; + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('kelompok'); + } +} \ No newline at end of file diff --git a/app/controllers/Kelompok_master.php b/app/controllers/Kelompok_master.php new file mode 100644 index 000000000..2afdd042a --- /dev/null +++ b/app/controllers/Kelompok_master.php @@ -0,0 +1,110 @@ +load->model('kelompok_master_model'); + $this->load->model('user_model'); + $this->load->model('header_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['state']); + redirect('kelompok_master'); + } + function index($p=1,$o=0){ + unset($_SESSION['kelompok_master']); + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['state'])) + $data['state'] = $_SESSION['state']; + else $data['state'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->kelompok_master_model->paging($p,$o); + $data['main'] = $this->kelompok_master_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->kelompok_master_model->autocomplete(); + + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $nav['act']= 4; + + $this->load->view('sid/nav',$nav); + $this->load->view('kelompok_master/table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['kelompok_master'] = $this->kelompok_master_model->get_kelompok_master($id); + $data['form_action'] = site_url("kelompok_master/update/$p/$o/$id"); + } + + else{ + $data['kelompok_master'] = null; + $data['form_action'] = site_url("kelompok_master/insert"); + } + + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $nav['act']= 4; + + $this->load->view('sid/nav',$nav); + $this->load->view('kelompok_master/form',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('kelompok_master'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('kelompok_master'); + } + function state(){ + $filter = $this->input->post('state'); + if($filter!=0) + $_SESSION['state']=$filter; + else unset($_SESSION['state']); + redirect('kelompok_master'); + } + function insert(){ + $this->kelompok_master_model->insert(); + redirect('kelompok_master'); + } + function update($p=1,$o=0,$id=''){ + $this->kelompok_master_model->update($id); + redirect("kelompok_master/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->kelompok_master_model->delete($id); + redirect("kelompok_master/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->kelompok_master_model->delete_all(); + redirect("kelompok_master/index/$p/$o"); + } +} \ No newline at end of file diff --git a/app/controllers/Keluar.php b/app/controllers/Keluar.php new file mode 100644 index 000000000..aaa8cc2c8 --- /dev/null +++ b/app/controllers/Keluar.php @@ -0,0 +1,102 @@ +load->model('user_model'); + $this->load->model('surat_keluar_model'); + $this->load->model('surat_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); + $this->load->model('header_model'); + + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('keluar'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + $data['paging'] = $this->surat_keluar_model->paging($p,$o); + $data['main'] = $this->surat_keluar_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->surat_keluar_model->autocomplete(); + $header = $this->header_model->get_data(); + $nav['act']= 2; + $this->load->view('header', $header); + + $this->load->view('surat/nav',$nav); + $this->load->view('surat/surat_keluar',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('keluar'); + } + function perorangan($nik=0,$p=1,$o=0){ + if(isset($_POST['nik'])){ + + $nik=$_POST['nik']; + } + if($nik<>0){ + $data['individu']=$this->surat_model->get_penduduk($nik); + }else{ + $data['individu']=null; + } + $data['p'] = $p; + $data['o'] = $o; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + $data['paging'] = $this->surat_keluar_model->paging_perorangan($nik,$p,$o); + $data['main'] = $this->surat_keluar_model->list_data_surat($nik,$o, $data['paging']->offset, $data['paging']->per_page); + $data['penduduk'] = $this->surat_model->list_penduduk(); + $data['form_action'] = site_url("sid_surat_keluar/perorangan/$nik"); + $data['nik']['no']=$nik; + $nav['act']= 2; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + + $this->load->view('surat/nav',$nav); + $this->load->view('surat/surat_keluar_perorangan',$data); + $this->load->view('footer'); + } + function graph(){ + $data['form_action'] = site_url("sid_cetak_surat/print_surat_ket_pengantar"); + $nav['act']= 2; + $header = $this->header_model->get_data(); + $data['stat'] = $this->surat_keluar_model->grafik(); + $this->load->view('header',$header); + + $this->load->view('surat/nav',$nav); + $this->load->view('surat/surat_keluar_graph',$data); + $this->load->view('footer'); + } + function filter(){ + $filter = $this->input->post('nik'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('keluar/perorangan'); + } + function nik(){ + $nik = $this->input->post('nik'); + if($nik!=0) + $_SESSION['nik']=$_POST['nik']; + else unset($_SESSION['nik']); + redirect('keluar/perorangan'); + } +} \ No newline at end of file diff --git a/app/controllers/Keluarga.php b/app/controllers/Keluarga.php new file mode 100644 index 000000000..8facd4023 --- /dev/null +++ b/app/controllers/Keluarga.php @@ -0,0 +1,793 @@ +load->model('user_model'); + $this->load->model('keluarga_model'); + $this->load->model('penduduk_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2) redirect('siteman'); + $this->load->model('header_model'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['sex']); + unset($_SESSION['raskin']); + unset($_SESSION['id_blt']); + unset($_SESSION['id_bos']); + unset($_SESSION['id_pkh']); + unset($_SESSION['id_jampersal']); + unset($_SESSION['id_bedah_rumah']); + $_SESSION['per_page']=100; + redirect('keluarga'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['sex'])) + $data['sex'] = $_SESSION['sex']; + else $data['sex'] = ''; + if(isset($_SESSION['raskin'])) + $data['raskin'] = $_SESSION['raskin']; + else $data['raskin'] = ''; + if(isset($_SESSION['id_blt'])) + $data['id_blt'] = $_SESSION['id_blt']; + else $data['id_blt'] = ''; + + if(isset($_SESSION['id_bos'])) + $data['id_bos'] = $_SESSION['id_bos']; + else $data['id_bos'] = ''; + + if(isset($_SESSION['id_pkh'])) + $data['id_pkh'] = $_SESSION['id_pkh']; + else $data['id_pkh'] = ''; + + if(isset($_SESSION['id_jampersal'])) + $data['id_jampersal'] = $_SESSION['id_jampersal']; + else $data['id_jampersal'] = ''; + if(isset($_SESSION['id_bedah_rumah'])) + $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; + else $data['id_bedah_rumah'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + $data['grup'] = $this->user_model->sesi_grup($_SESSION['sesi']); + $data['paging'] = $this->keluarga_model->paging($p,$o); + $data['main'] = $this->keluarga_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->keluarga_model->autocomplete(); + $data['list_dusun'] = $this->penduduk_model->list_dusun(); + + $nav['act']= 1; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/keluarga',$data); + $this->load->view('footer'); + } + function sosial($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['raskin'])) + $data['raskin'] = $_SESSION['raskin']; + else $data['raskin'] = ''; + + if(isset($_SESSION['id_blt'])) + $data['id_blt'] = $_SESSION['id_blt']; + else $data['id_blt'] = ''; + if(isset($_SESSION['id_pkh'])) + $data['id_pkh'] = $_SESSION['id_pkh']; + else $data['id_pkh'] = ''; + if(isset($_SESSION['id_bos'])) + $data['id_bos'] = $_SESSION['id_bos']; + else $data['id_bos'] = ''; + + if(isset($_SESSION['id_jampersal'])) + $data['id_jampersal'] = $_SESSION['id_jampersal']; + else $data['id_jampersal'] = ''; + if(isset($_SESSION['id_bedah_rumah'])) + $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; + else $data['id_bedah_rumah'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + + $data['paging'] = $this->keluarga_model->paging($p,$o); + $data['main'] = $this->keluarga_model->list_raskin(); + $data['keyword'] = $this->keluarga_model->autocomplete(); + $data['list_dusun'] = $this->penduduk_model->list_dusun(); + $nav['act']= 1; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/keluarga_sosial',$data); + $this->load->view('footer'); + } + function raskin_graph($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['raskin'])) + $data['raskin'] = $_SESSION['raskin']; + else $data['raskin'] = ''; + if(isset($_SESSION['id_blt'])) + $data['id_blt'] = $_SESSION['id_blt']; + else $data['id_blt'] = ''; + if(isset($_SESSION['id_bos'])) + $data['id_bos'] = $_SESSION['id_bos']; + else $data['id_bos'] = ''; + if(isset($_SESSION['id_pkh'])) + $data['id_pkh'] = $_SESSION['id_pkh']; + else $data['id_pkh'] = ''; + if(isset($_SESSION['id_jampersal'])) + $data['id_jampersal'] = $_SESSION['id_jampersal']; + else $data['id_jampersal'] = ''; + if(isset($_SESSION['id_bedah_rumah'])) + $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; + else $data['id_bedah_rumah'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + + $data['paging'] = $this->keluarga_model->paging($p,$o); + $data['main'] = $this->keluarga_model->list_raskin(); + $data['keyword'] = $this->keluarga_model->autocomplete(); + $data['list_dusun'] = $this->penduduk_model->list_dusun(); + $nav['act']= 1; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/keluarga_raskin',$data); + $this->load->view('footer'); + } + + function jamkesmas_graph($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['raskin'])) + $data['raskin'] = $_SESSION['raskin']; + else $data['raskin'] = ''; + if(isset($_SESSION['id_blt'])) + $data['id_blt'] = $_SESSION['id_blt']; + else $data['id_blt'] = ''; + if(isset($_SESSION['id_bos'])) + $data['id_bos'] = $_SESSION['id_bos']; + else $data['id_bos'] = ''; + if(isset($_SESSION['id_pkh'])) + $data['id_pkh'] = $_SESSION['id_pkh']; + else $data['id_pkh'] = ''; + if(isset($_SESSION['id_jampersal'])) + $data['id_jampersal'] = $_SESSION['id_jampersal']; + else $data['id_jampersal'] = ''; + if(isset($_SESSION['id_bedah_rumah'])) + $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; + else $data['id_bedah_rumah'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + + $data['paging'] = $this->keluarga_model->paging($p,$o); + $data['main'] = $this->keluarga_model->list_raskin(); + $data['keyword'] = $this->keluarga_model->autocomplete(); + $data['list_dusun'] = $this->penduduk_model->list_dusun(); + $nav['act']= 1; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/keluarga_jamkesmas',$data); + $this->load->view('footer'); + } + function pentagon(){ + $data['main'] = $this->keluarga_model->list_raskin(); + $this->load->view('sid/kependudukan/pentagon/pentagon',$data); + } + function cetak($o=0){ + $data['main'] = $this->keluarga_model->list_data($o, 0, 10000); + $this->load->view('sid/kependudukan/keluarga_print',$data); + } + function excel($o=0){ + $data['main'] = $this->keluarga_model->list_data($o, 0, 10000); + $this->load->view('sid/kependudukan/keluarga_excel',$data); + } + + function form($p=1,$o=0,$id=0,$new=1){ + + if($new==1){ + + if(isset($_POST['dusun'])){ + $data['dus_sel'] = $_POST['dusun']; + }else + $data['dus_sel'] = ''; + + if(isset($_POST['rw'])){ + $data['rw_sel'] = $_POST['rw']; + + }else + $data['rw_sel'] = ''; + + if(isset($_POST['rt'])) + $data['rt_sel'] = $_POST['rt']; + else + $data['rt_sel'] = ''; + + $data['new'] = $new; + }else{ + $data['new'] = 0; + $data['dus_sel'] = ''; + $data['rw_sel'] = ''; + $data['rt_sel'] = ''; + } + + if($id > 0){ + $data['kk'] = $this->keluarga_model->get_keluarga($id); + $data['form_action'] = site_url("keluarga/update/$id"); + }elseif($new>0){ + $data['kk'] = null; + $data['form_action'] = site_url("keluarga/insert_new"); + + }else{ + $data['kk'] = null; + $data['form_action'] = site_url("keluarga/insert"); + } + + $data['penduduk'] = $this->keluarga_model->list_penduduk_lepas(); + + $nav['act']= 1; + + $data['list_no_kk'] = $this->keluarga_model->duplikasi(); + $data['dusun'] = $this->penduduk_model->list_dusun(); + $data['rw'] = $this->penduduk_model->list_rw($data['dus_sel']); + $data['rt'] = $this->penduduk_model->list_rt($data['dus_sel'],$data['rw_sel']); + $data['agama'] = $this->penduduk_model->list_agama(); + $data['pendidikan'] = $this->penduduk_model->list_pendidikan(); + $data['pendidikan_kk'] = $this->penduduk_model->list_pendidikan_kk(); + $data['pekerjaan'] = $this->penduduk_model->list_pekerjaan(); + $data['warganegara'] = $this->penduduk_model->list_warganegara(); + $data['hubungan'] = $this->penduduk_model->list_hubungan(); + $data['kawin'] = $this->penduduk_model->list_status_kawin(); + $data['golongan_darah'] = $this->penduduk_model->list_golongan_darah(); + $data['cacat'] = $this->penduduk_model->list_cacat(); + + + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/keluarga_form',$data); + $this->load->view('footer'); + } + + function form_a($p=1,$o=0, $id=0){ + + $data['id_kk'] = $id; + $data['kk'] = $this->keluarga_model->get_kepala_a($id); + $data['form_action'] = site_url("keluarga/insert_a"); + + $nav['act']= 2; + + $data['agama'] = $this->penduduk_model->list_agama(); + $data['pendidikan_kk'] = $this->penduduk_model->list_pendidikan_kk(); + $data['pendidikan'] = $this->penduduk_model->list_pendidikan(); + $data['pekerjaan'] = $this->penduduk_model->list_pekerjaan(); + $data['warganegara'] = $this->penduduk_model->list_warganegara(); + $data['hubungan'] = $this->penduduk_model->list_hubungan(); + $data['kawin'] = $this->penduduk_model->list_status_kawin(); + $data['golongan_darah'] = $this->penduduk_model->list_golongan_darah(); + $data['cacat'] = $this->penduduk_model->list_cacat(); + + + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/keluarga_form_a',$data); + $this->load->view('footer'); + } + function edit_nokk($p=1,$o=0,$id=0){ + $data['kk'] = $this->keluarga_model->get_keluarga($id); + $data['form_action'] = site_url("keluarga/update_nokk/$id"); + $this->load->view('sid/kependudukan/ajax_edit_nokk',$data); + + } + function form_old($p=1,$o=0,$id=0){ + $data['penduduk'] = $this->keluarga_model->list_penduduk_lepas(); + $data['form_action'] = site_url("keluarga/insert/$id"); + $this->load->view('sid/kependudukan/ajax_add_keluarga',$data); + + } + function dusun($s=0){ + $dusun = $this->input->post('dusun'); + if($dusun!="") + $_SESSION['dusun']=$dusun; + else{ + UNSET($_SESSION['dusun']); + UNSET($_SESSION['rw']); + UNSET($_SESSION['rt']); + } + redirect('keluarga'); + } + + function rw($s=0){ + $rw = $this->input->post('rw'); + if($rw!="") + $_SESSION['rw']=$rw; + else unset($_SESSION['rw']); + if($s==1) + redirect('keluarga/sosial'); + elseif($s==2) + redirect('keluarga/raskin_graph'); + else + redirect('keluarga'); + } + function rt($s=0){ + $rt = $this->input->post('rt'); + if($rt!="") + $_SESSION['rt']=$rt; + else unset($_SESSION['rt']); + if($s==1) + redirect('keluarga/sosial'); + elseif($s==2) + redirect('keluarga/raskin_graph'); + else + redirect('keluarga'); + } + function raskin(){ + $raskin = $this->input->post('raskin'); + if($raskin!="") + $_SESSION['raskin']=$raskin; + else unset($_SESSION['raskin']); + redirect('keluarga'); + } + function sex(){ + $sex = $this->input->post('sex'); + if($sex!="") + $_SESSION['sex']=$sex; + else unset($_SESSION['sex']); + redirect('keluarga'); + } + function blt(){ + $id_blt = $this->input->post('id_blt'); + if($id_blt!="") + $_SESSION['id_blt']=$id_blt; + else unset($_SESSION['id_blt']); + redirect('keluarga'); + } + function bos(){ + $id_bos = $this->input->post('id_bos'); + if($id_bos!="") + $_SESSION['id_bos']=$id_bos; + else unset($_SESSION['id_bos']); + redirect('keluarga'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('keluarga'); + } + function insert(){ + $this->keluarga_model->insert(); + redirect('keluarga'); + } + function insert_a(){ + $data = $this->keluarga_model->dn(); + + $i=0; + $dp=0; + $link = site_url()."keluarga"; + while($iTERJADI KESALAHAN

    Data Tidak Tersimpan
    + Sudah terdapat Penduduk dengan nomor NIK $nk, Silahkan periksa kembali dan ulangi proses memasukkan data.
    + Klik disini untuk Kembali"; + }else{ + $this->keluarga_model->insert_a(); + redirect('keluarga'); + } + } + function insert_new(){ + + $data = $this->keluarga_model->dp(); + + $i=0; + $dp=0; + $link = site_url()."keluarga/form/0/1"; + while($iTERJADI KESALAHAN


    Data Tidak Tersimpan
    + Sudah terdapat keluarga dengan nomor KK $nk, Silahkan periksa kembali dan ulangi proses memasukkan data.
    + Klik disini untuk Kembali"; + }else{ + $this->keluarga_model->insert_new(); + redirect('keluarga'); + } + } + function update($id=''){ + $this->keluarga_model->update($id); + redirect('keluarga'); + } + function update_nokk($id=''){ + $this->keluarga_model->update_nokk($id); + redirect('keluarga'); + } + function delete($p=1,$o=0,$id=''){ + $this->keluarga_model->delete($id); + redirect('keluarga'); + } + function delete_all($p=1,$o=0){ + $this->keluarga_model->delete_all(); + redirect('keluarga'); + } + function anggota($p=1,$o=0,$id=0){ + $data['p'] = $p; + $data['o'] = $o; + $data['kk'] = $id; + + $data['main'] = $this->keluarga_model->list_anggota($id); + $data['kepala_kk']= $this->keluarga_model->get_kepala_kk($id); + $nav['act']= 1; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/keluarga_anggota',$data); + $this->load->view('footer'); + } + + function ajax_add_anggota($p=1,$o=0,$id=0){ + $data['p'] = $p; + $data['o'] = $o; + $data['hubungan'] = $this->keluarga_model->list_hubungan(); + $data['main'] = $this->keluarga_model->list_anggota($id); + $kk = $this->keluarga_model->get_kepala_kk($id); + if($kk) + $data['kepala_kk'] = $kk; + else + $data['kepala_kk'] = NULL; + $data['penduduk'] = $this->keluarga_model->list_penduduk_lepas(); + + $data['form_action'] = site_url("keluarga/add_anggota/$p/$o/$id"); + + $this->load->view("sid/kependudukan/ajax_add_anggota_form", $data); + } + + function edit_anggota($p=1,$o=0,$id_kk=0,$id=0){ + $data['p'] = $p; + $data['o'] = $o; + $data['hubungan'] = $this->keluarga_model->list_hubungan(); + $data['main'] = $this->keluarga_model->get_anggota($id); + + $kk = $this->keluarga_model->get_kepala_kk($id); + if($kk) + $data['kepala_kk'] = $kk; + else + $data['kepala_kk'] = NULL; + + $data['form_action'] = site_url("keluarga/update_anggota/$p/$o/$id_kk/$id"); + + $this->load->view("sid/kependudukan/ajax_edit_anggota_form", $data); + } + function kartu_keluarga($p=1,$o=0,$id=0){ + $data['p'] = $p; + $data['o'] = $o; + $data['id_kk'] = $id; + $data['hubungan'] = $this->keluarga_model->list_hubungan(); + $data['main'] = $this->keluarga_model->list_anggota($id); + $kk = $this->keluarga_model->get_kepala_kk($id); + $data['desa'] = $this->keluarga_model->get_desa(); + + if($kk) + $data['kepala_kk'] = $kk; + + else + $data['kepala_kk'] = NULL; + + $data['penduduk'] = $this->keluarga_model->list_penduduk_lepas(); + $nav['act']= 1; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $data['form_action'] = site_url("keluarga/print"); + + $this->load->view("sid/kependudukan/kartu_keluarga", $data); + $this->load->view('footer'); + + } + + function cetak_kk($id=0){ + $data['id_kk'] = $id; + $data['main'] = $this->keluarga_model->list_anggota($id); + $kk = $this->keluarga_model->get_kepala_kk($id); + $data['desa'] = $this->keluarga_model->get_desa(); + $data['kepala_kk'] = $kk; + $nav['act']= 1; + $header = $this->header_model->get_data(); + $this->load->view("sid/kependudukan/cetak_kk", $data); + + } + + function doc_kk($id=0){ + $data['desa'] = $this->keluarga_model->get_desa(); + + $data['id_kk'] = $id; + $data['main'] = $this->keluarga_model->list_anggota($id); + $data['kepala_kk']= $this->keluarga_model->get_kepala_kk($id); + + $this->keluarga_model->coba($data); + } + + function coba2($id=0){ + + + + + + + $this->keluarga_model->coba2(); + } + + function add_anggota($p=1,$o=0,$id=0){ + $this->keluarga_model->add_anggota($id); + redirect("keluarga/anggota/$p/$o/$id"); + } + function update_anggota($p=1,$o=0,$id_kk=0,$id=0){ + $this->keluarga_model->update_anggota($id); + redirect("keluarga/anggota/$p/$o/$id_kk"); + } + function delete_anggota($p=1,$o=0,$kk=0,$id=''){ + $this->keluarga_model->rem_anggota($kk,$id); + redirect("keluarga/anggota/$p/$o/$kk"); + } + function delete_all_anggota($p=1,$o=0,$kk=0){ + $this->keluarga_model->rem_all_anggota($kk); + redirect("keluarga/anggota/$p/$o/$kk"); + } + function pindah_proses($id=0){ + $id_cluster = $_POST['id_cluster']; + $this->keluarga_model->pindah_proses($id,$id_cluster); + redirect("keluarga"); + } + function ajax_penduduk_pindah($id=0){ + $data['dusun'] = $this->penduduk_model->list_dusun(); + + $data['form_action'] = site_url("keluarga/pindah_proses/$id"); + $this->load->view('sid/kependudukan/ajax_pindah_form',$data); + } + function ajax_penduduk_pindah_rw($dusun=''){ + $rw = $this->penduduk_model->list_rw($dusun); + + echo"RW + + "; + } + function ajax_penduduk_pindah_rt($dusun='',$rw=''){ + $rt = $this->penduduk_model->list_rt($dusun,$rw); + + echo "RT + + "; + } + function statistik($tipe=0,$nomor=0,$p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + $data['tipe'] = $tipe; + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['raskin'])) + $data['raskin'] = $_SESSION['raskin']; + else $data['raskin'] = ''; + if(isset($_SESSION['id_blt'])) + $data['id_blt'] = $_SESSION['id_blt']; + else $data['id_blt'] = ''; + + if(isset($_SESSION['id_bos'])) + $data['id_bos'] = $_SESSION['id_bos']; + else $data['id_bos'] = ''; + + if(isset($_SESSION['id_pkh'])) + $data['id_pkh'] = $_SESSION['id_pkh']; + else $data['id_pkh'] = ''; + + if(isset($_SESSION['id_jampersal'])) + $data['id_jampersal'] = $_SESSION['id_jampersal']; + else $data['id_jampersal'] = ''; + if(isset($_SESSION['id_bedah_rumah'])) + $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; + else $data['id_bedah_rumah'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + switch($tipe){ + + case 21: $_SESSION['kelas'] = $nomor; $pre="KELAS SOSIAL : ";break; + case 22: $_SESSION['raskin'] = $nomor; $pre="RASKIN : ";break; + case 23: $_SESSION['id_blt'] = $nomor; $pre="BLT : ";break; + case 24: $_SESSION['id_bos'] = $nomor; $pre="BOS : ";break; + case 25: $_SESSION['id_pkh'] = $nomor; $pre="PKH : ";break; + case 26: $_SESSION['id_jampersal'] = $nomor; $pre="JAMPERSAL : ";break; + case 27: $_SESSION['id_bedah_rumah'] = $nomor;$pre="BEDAH RUMAH : "; break; + } + $data['grup'] = $this->user_model->sesi_grup($_SESSION['sesi']); + $data['paging'] = $this->keluarga_model->paging_statistik($p,$o); + $data['main'] = $this->keluarga_model->list_data_statistik($tipe,$o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->keluarga_model->autocomplete(); + $data['list_dusun'] = $this->penduduk_model->list_dusun(); + $judul= $this->keluarga_model->get_judul_statistik($tipe,$nomor); + if($judul['nama']){ + $_SESSION['judul_statistik']=$pre.$judul['nama']; + }else{ + unset($_SESSION['judul_statistik']); + } + $nav['act']= 1; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/keluarga_statistik',$data); + $this->load->view('footer'); + //redirect('keluarga'); + } + function cetak_statistik($tipe=0){ + $data['main'] = $this->keluarga_model->list_data_statistik($tipe); + $this->load->view('sid/kependudukan/keluarga_print',$data); + } +} \ No newline at end of file diff --git a/app/controllers/Komentar.php b/app/controllers/Komentar.php new file mode 100644 index 000000000..e96f196cb --- /dev/null +++ b/app/controllers/Komentar.php @@ -0,0 +1,105 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('web_komentar_model'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('komentar'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->web_komentar_model->paging($p,$o); + $data['main'] = $this->web_komentar_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->web_komentar_model->autocomplete(); + $header = $this->header_model->get_data(); + $nav['act']=2; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('komentar/table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['komentar'] = $this->web_komentar_model->get_komentar($id); + $data['form_action'] = site_url("komentar/update/$id/$p/$o"); + } + else{ + $data['komentar'] = null; + $data['form_action'] = site_url("komentar/insert"); + } + + $data['list_kategori'] = $this->web_komentar_model->list_kategori(1); + + $header = $this->header_model->get_data(); + + $nav['act']=2; + $this->load->view('header', $header); + $this->load->view('web/spacer'); + $this->load->view('web/nav',$nav); + $this->load->view('komentar/form',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('komentar'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('komentar'); + } + function insert(){ + $this->web_komentar_model->insert(); + redirect('komentar'); + } + function update($id='',$p=1,$o=0){ + $this->web_komentar_model->update($id); + redirect("komentar/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->web_komentar_model->delete($id); + redirect("komentar/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->web_komentar_model->delete_all(); + redirect("komentar/index/$p/$o"); + } + function komentar_lock($id=''){ + $this->web_komentar_model->komentar_lock($id,1); + redirect("komentar/index/$p/$o"); + } + function komentar_unlock($id=''){ + $this->web_komentar_model->komentar_lock($id,2); + redirect("komentar/index/$p/$o"); + } +} \ No newline at end of file diff --git a/app/controllers/Lapor.php b/app/controllers/Lapor.php new file mode 100644 index 000000000..9cf9991a2 --- /dev/null +++ b/app/controllers/Lapor.php @@ -0,0 +1,105 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('web_komentar_model'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('lapor'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->web_komentar_model->paging($p,$o); + $data['main'] = $this->web_komentar_model->list_data($o, $data['paging']->offset, $data['paging']->per_page,2); + $data['keyword'] = $this->web_komentar_model->autocomplete(); + $header = $this->header_model->get_data(); + $nav['act']=0; + + $this->load->view('header', $header); + $this->load->view('lapor/nav',$nav); + $this->load->view('lapor/table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['komentar'] = $this->web_komentar_model->get_komentar($id); + $data['form_action'] = site_url("komentar/update/$id/$p/$o"); + } + else{ + $data['komentar'] = null; + $data['form_action'] = site_url("komentar/insert"); + } + + $data['list_kategori'] = $this->web_komentar_model->list_kategori(1); + + $header = $this->header_model->get_data(); + + $nav['act']=2; + $this->load->view('header', $header); + $this->load->view('web/spacer'); + $this->load->view('web/nav',$nav); + $this->load->view('lapor/form',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('lapor'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('lapor'); + } + function insert(){ + $this->web_komentar_model->insert(); + redirect('lapor'); + } + function update($id='',$p=1,$o=0){ + $this->web_komentar_model->update($id); + redirect("lapor/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->web_komentar_model->delete($id); + redirect("lapor/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->web_komentar_model->delete_all(); + redirect("lapor/index/$p/$o"); + } + function komentar_lock($id=''){ + $this->web_komentar_model->komentar_lock($id,1); + redirect("lapor/index/$p/$o"); + } + function komentar_unlock($id=''){ + $this->web_komentar_model->komentar_lock($id,2); + redirect("lapor/index/$p/$o"); + } +} \ No newline at end of file diff --git a/app/controllers/Laporan.php b/app/controllers/Laporan.php new file mode 100644 index 000000000..bf826e57c --- /dev/null +++ b/app/controllers/Laporan.php @@ -0,0 +1,114 @@ +load->model('user_model'); + $this->load->model('laporan_bulanan_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); + $this->load->model('header_model'); + + $_SESSION['success'] = 0; + $_SESSION['cari'] = ''; + + $this->load->model('header_model'); + } + + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['sex']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['agama']); + unset($_SESSION['umur_min']); + unset($_SESSION['umur_max']); + unset($_SESSION['pekerjaan_id']); + unset($_SESSION['status']); + unset($_SESSION['pendidikan_id']); + unset($_SESSION['status_penduduk']); + $_SESSION['bulanku']=date("n"); + $_SESSION['tahunku']=date("Y"); + $_SESSION['per_page'] = 200; + redirect('laporan'); + } + function index($lap=0,$p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + if(isset($_SESSION['bulanku'])) + $data['bulanku'] = $_SESSION['bulanku']; + else $data['bulanku'] = date("n"); + + if(isset($_SESSION['tahunku'])) + $data['tahunku'] = $_SESSION['tahunku']; + else $data['tahunku'] = date("Y"); + + $data['bulan']=$data['bulanku']; + $data['tahun']=$data['tahunku']; + $data['config'] = $this->laporan_bulanan_model->configku(); + $data['penduduk_awal'] = $this->laporan_bulanan_model->penduduk_awal(); + $data['penduduk_akhir'] = $this->laporan_bulanan_model->penduduk_akhir(); + $data['kelahiran'] = $this->laporan_bulanan_model->kelahiran(); + $data['kematian'] = $this->laporan_bulanan_model->kematian(); + $data['pendatang'] = $this->laporan_bulanan_model->pendatang(); + $data['pindah'] = $this->laporan_bulanan_model->pindah(); + $data['hilang'] = $this->laporan_bulanan_model->hilang(); + $data['lap']=$lap; + $nav['act']= 3; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('statistik/nav',$nav); + $this->load->view('laporan/bulanan',$data); + $this->load->view('footer'); + + + } + function cetak($lap=0){ + $data['config'] = $this->laporan_bulanan_model->configku(); + $data['bulan']=$_SESSION['bulanku']; + $data['tahun']=$_SESSION['tahunku']; + $data['bln'] = $this->laporan_bulanan_model->bulan($data['bulan']); + $data['penduduk_awal'] = $this->laporan_bulanan_model->penduduk_awal(); + $data['penduduk_akhir'] = $this->laporan_bulanan_model->penduduk_akhir(); + $data['kelahiran'] = $this->laporan_bulanan_model->kelahiran(); + $data['kematian'] = $this->laporan_bulanan_model->kematian(); + $data['pendatang'] = $this->laporan_bulanan_model->pendatang(); + $data['pindah'] = $this->laporan_bulanan_model->pindah(); + $data['hilang'] = $this->laporan_bulanan_model->hilang(); + $data['lap']=$lap; + $this->load->view('laporan/bulanan_print',$data); + } + function excel($lap=0){ + $data['config'] = $this->laporan_bulanan_model->configku(); + $data['bulan']=$_SESSION['bulanku']; + $data['tahun']=$_SESSION['tahunku']; + $data['bln'] = $this->laporan_bulanan_model->bulan($data['bulan']); + $data['penduduk_awal'] = $this->laporan_bulanan_model->penduduk_awal(); + $data['penduduk_akhir'] = $this->laporan_bulanan_model->penduduk_akhir(); + $data['kelahiran'] = $this->laporan_bulanan_model->kelahiran(); + $data['kematian'] = $this->laporan_bulanan_model->kematian(); + $data['pendatang'] = $this->laporan_bulanan_model->pendatang(); + $data['pindah'] = $this->laporan_bulanan_model->pindah(); + $data['hilang'] = $this->laporan_bulanan_model->hilang(); + $data['lap']=$lap; + $this->load->view('statistik/laporan/bulanan_excel',$data); + } + function bulan(){ + $bulanku= $this->input->post('bulan'); + if($bulanku!="") + $_SESSION['bulanku']=$bulanku; + else unset($_SESSION['bulanku']); + + $tahunku= $this->input->post('tahun'); + if($tahunku!="") + $_SESSION['tahunku']=$tahunku; + else unset($_SESSION['tahunku']); + redirect('laporan'); + } +} \ No newline at end of file diff --git a/app/controllers/Laporan_rentan.php b/app/controllers/Laporan_rentan.php new file mode 100644 index 000000000..86092a57e --- /dev/null +++ b/app/controllers/Laporan_rentan.php @@ -0,0 +1,64 @@ +load->model('user_model'); + $this->load->model('laporan_bulanan_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); + $this->load->model('header_model'); + + + $_SESSION['success'] = 0; + $_SESSION['per_page'] = 20; + $_SESSION['cari'] = ''; + + + $this->load->model('header_model'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + redirect('laporan_rentan'); + } + function index(){ + if(isset($_SESSION['dusun'])) + $data['dusun'] = $_SESSION['dusun']; + else $data['dusun'] = ''; + + $data['list_dusun'] = $this->laporan_bulanan_model->list_dusun(); + $data['config'] = $this->laporan_bulanan_model->configku(); + + $data['main'] = $this->laporan_bulanan_model->list_data(); + + $nav['act']= 2; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('statistik/nav',$nav); + $this->load->view('laporan/kelompok',$data); + $this->load->view('footer'); + } + + function cetak(){ + $data['config'] = $this->laporan_bulanan_model->configku(); + $data['main'] = $this->laporan_bulanan_model->list_data(); + $this->load->view('laporan/kelompok_print',$data); + } + function excel(){ + $data['config'] = $this->laporan_bulanan_model->configku(); + $data['main'] = $this->laporan_bulanan_model->list_data(); + $this->load->view('laporan/kelompok_excel',$data); + } + + function dusun(){ + $dusun = $this->input->post('dusun'); + if($dusun!="") + $_SESSION['dusun']=$dusun; + else unset($_SESSION['dusun']); + redirect('laporan_rentan'); + } +} \ No newline at end of file diff --git a/app/controllers/Line.php b/app/controllers/Line.php new file mode 100644 index 000000000..22bb4aab8 --- /dev/null +++ b/app/controllers/Line.php @@ -0,0 +1,162 @@ +load->model('user_model'); + + $this->load->model('header_model'); + $this->load->model('plan_line_model'); + + + $this->load->database(); + + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('line'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->plan_line_model->paging($p,$o); + $data['main'] = $this->plan_line_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->plan_line_model->autocomplete(); + $header = $this->header_model->get_data(); + $nav['act']=2; + + $this->load->view('header-gis', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('line/table',$data); + $this->load->view('footer'); + + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + + + if($id){ + $data['line'] = $this->plan_line_model->get_line($id); + $data['form_action'] = site_url("line/update/$id/$p/$o"); + } + else{ + $data['line'] = null; + $data['form_action'] = site_url("line/insert"); + } + $header= $this->header_model->get_data(); + + $nav['act']=2; + $this->load->view('header-gis', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('line/form',$data); + $this->load->view('footer'); + + } + function sub_line($line=1){ + $data['subline'] = $this->plan_line_model->list_sub_line($line); + $data['line'] = $line; + $header= $this->header_model->get_data(); + $nav['act']=2; + + $this->load->view('header-gis', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('line/sub_line_table',$data); + $this->load->view('footer'); + + } + function ajax_add_sub_line($line=0,$id=0){ + + + + + if($id){ + $data['line'] = $this->plan_line_model->get_line($id); + $data['form_action'] = site_url("line/update_sub_line/$line/$id"); + } + else{ + $data['line'] = null; + $data['form_action'] = site_url("line/insert_sub_line/$line"); + } + $this->load->view("line/ajax_add_sub_line_form",$data); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('line'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('line'); + } + function insert($tip=1){ + $this->plan_line_model->insert($tip); + redirect("line/index/$tip"); + } + function update($id='',$p=1,$o=0){ + $this->plan_line_model->update($id); + redirect("line/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->plan_line_model->delete($id); + redirect("line/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->plan_line_model->delete_all(); + redirect("line/index/$p/$o"); + } + function line_lock($id=''){ + $this->plan_line_model->line_lock($id,1); + redirect("line/index/$p/$o"); + } + function line_unlock($id=''){ + $this->plan_line_model->line_lock($id,2); + redirect("line/index/$p/$o"); + } + function insert_sub_line($line=''){ + $this->plan_line_model->insert_sub_line($line); + redirect("line/sub_line/$line"); + } + function update_sub_line($line='',$id=''){ + $this->plan_line_model->update_sub_line($id); + redirect("line/sub_line/$line"); + } + function delete_sub_line($line='',$id=''){ + $this->plan_line_model->delete_sub_line($id); + redirect("line/sub_line/$line"); + } + function delete_all_sub_line($line=''){ + $this->plan_line_model->delete_all_sub_line(); + redirect("line/sub_line/$line"); + } + function line_lock_sub_line($line='',$id=''){ + $this->plan_line_model->line_lock($id,1); + redirect("line/sub_line/$line"); + } + function line_unlock_sub_line($line='',$id=''){ + $this->plan_line_model->line_lock($id,2); + redirect("line/sub_line/$line"); + } +} \ No newline at end of file diff --git a/app/controllers/Main.php b/app/controllers/Main.php new file mode 100644 index 000000000..9939e152c --- /dev/null +++ b/app/controllers/Main.php @@ -0,0 +1,53 @@ +load->model('header_model'); + $this->load->model('user_model'); + $this->load->model('config_model'); + } + function index(){ + $out = $this->config_model->install(); + if($out == 1){ + if(isset($_SESSION['siteman'])){ + $this->load->model('user_model'); + if(isset($_SESSION['sesi'])){ + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + switch($grup){ + case 1: redirect('hom_desa'); break; + case 2: redirect('hom_desa'); break; + case 3: redirect('web'); break; + case 4: redirect('web'); break; + default:if(isset($_SESSION['siteman'])){redirect('siteman');}else{redirect('first');} + } + } + }else{ + redirect('first'); + } + }else{ + redirect('main/initial'); + } + } + function initial(){ + $this->load->view('install'); + } + function install(){ + $out = $this->config_model->initial(); + $this->load->view('init',$out); + } + function init($out=null){ + $this->load->view('init',$out); + } + function auth(){ + $this->user_model->login(); + $header = $this->header_model->get_config(); + $this->load->view('siteman',$header); + } + function logout(){ + $this->config_model->opt(); + $this->user_model->logout(); + $header = $this->header_model->get_config(); + $this->load->view('siteman',$header); + } +} \ No newline at end of file diff --git a/app/controllers/Man_user.php b/app/controllers/Man_user.php new file mode 100644 index 000000000..58b9bdb12 --- /dev/null +++ b/app/controllers/Man_user.php @@ -0,0 +1,102 @@ +load->model('user_model'); + $this->load->model('header_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('man_user'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->user_model->paging($p,$o); + $data['main'] = $this->user_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->user_model->autocomplete(); + $header = $this->header_model->get_data(); + $menu['act']='man_user'; + + $this->load->view('header', $header); + $this->load->view('man_user/nav'); + $this->load->view('man_user/manajemen_user_table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['user'] = $this->user_model->get_user($id); + $data['form_action'] = site_url("man_user/update/$p/$o/$id"); + } + + else{ + $data['user'] = null; + $data['form_action'] = site_url("man_user/insert"); + } + + $data['grup'] = $this->user_model->list_grup(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('man_user/nav'); + $this->load->view('man_user/manajemen_user_form',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('man_user'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('man_user'); + } + function insert(){ + $this->user_model->insert(); + redirect('man_user'); + } + function update($p=1,$o=0,$id=''){ + $this->user_model->update($id); + redirect("man_user/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->user_model->delete($id); + redirect("man_user/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->user_model->delete_all(); + redirect("man_user/index/$p/$o"); + } + function user_lock($id=''){ + $this->user_model->user_lock($id,0); + redirect("man_user/index/$p/$o"); + } + function user_unlock($id=''){ + $this->user_model->user_lock($id,1); + redirect("man_user/index/$p/$o"); + } +} \ No newline at end of file diff --git a/app/controllers/Mandiri.php b/app/controllers/Mandiri.php new file mode 100644 index 000000000..656b0e75c --- /dev/null +++ b/app/controllers/Mandiri.php @@ -0,0 +1,78 @@ +load->model('user_model'); + $this->load->model('mandiri_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2) redirect('siteman'); + $this->load->model('header_model'); + + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('mandiri'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + $data['paging'] = $this->mandiri_model->paging($p,$o); + $data['main'] = $this->mandiri_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->mandiri_model->autocomplete(); + + + $header = $this->header_model->get_data(); + $nav['act']= 1; + $this->load->view('header', $header); + + $this->load->view('lapor/nav',$nav); + $this->load->view('mandiri/mandiri',$data); + $this->load->view('footer'); + } + function ajax_pin($p=1,$o=0,$id=0){ + $data['penduduk'] = $this->mandiri_model->list_penduduk(); + $data['form_action'] = site_url("mandiri/insert/$id"); + $this->load->view('mandiri/ajax_pin',$data); + + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('mandiri'); + } + function filter(){ + $filter = $this->input->post('nik'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('mandiri/perorangan'); + } + function nik(){ + $nik = $this->input->post('nik'); + if($nik!=0) + $_SESSION['nik']=$_POST['nik']; + else unset($_SESSION['nik']); + redirect('mandiri/perorangan'); + } + function insert(){ + $pin = $this->mandiri_model->insert(); + $_SESSION['pin'] = $pin; + redirect('mandiri'); + } + function ajax_pin_show($pin=""){ + redirect('mandiri'); + } +} \ No newline at end of file diff --git a/app/controllers/Menu.php b/app/controllers/Menu.php new file mode 100644 index 000000000..f9e1c413f --- /dev/null +++ b/app/controllers/Menu.php @@ -0,0 +1,157 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('web_menu_model'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('menu'); + } + function index($tip=1,$p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + $data['tip'] = $tip; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->web_menu_model->paging($tip,$p,$o); + $data['main'] = $this->web_menu_model->list_data($tip,$o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->web_menu_model->autocomplete(); + $header = $this->header_model->get_data(); + $nav['act']=1; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('menu/table',$data); + $this->load->view('footer'); + } + function form($tip=1,$id=''){ + if($tip==1){ + $data['link'] = $this->web_menu_model->list_link(); + }else{ + $data['link'] = $this->web_menu_model->list_kategori(); + } + if($id){ + $data['menu'] = $this->web_menu_model->get_menu($id); + $data['form_action'] = site_url("menu/update/$tip/$id"); + } + else{ + $data['menu'] = null; + $data['form_action'] = site_url("menu/insert/$tip"); + } + $header = $this->header_model->get_data(); + $data['tip'] = $tip; + + $nav['act']=1; + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('menu/form',$data); + $this->load->view('footer'); + } + function sub_menu($tip=1,$menu=1){ + $data['submenu'] = $this->web_menu_model->list_sub_menu($menu); + $data['tip'] = $tip; + $data['menu'] = $menu; + $header = $this->header_model->get_data(); + $nav['act']=1; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('menu/sub_menu_table',$data); + $this->load->view('footer'); + } + function ajax_add_sub_menu($tip=1,$menu='',$id=''){ + $data['menu'] = $menu; + $data['tip'] = $tip; + + $data['link'] = $this->web_menu_model->list_link(); + + if($id){ + $data['submenu'] = $this->web_menu_model->get_menu($id); + $data['form_action'] = site_url("menu/update_sub_menu/$tip/$menu/$id"); + } + else{ + $data['submenu'] = null; + $data['form_action'] = site_url("menu/insert_sub_menu/$tip/$menu"); + } + $this->load->view('menu/ajax_add_sub_menu_form',$data); + } + function search($tip=1){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect("menu/index/$tip"); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('menu'); + } + function insert($tip=1){ + $this->web_menu_model->insert($tip); + redirect("menu/index/$tip"); + } + function update($tip=1,$id=''){ + $this->web_menu_model->update($id); + redirect("menu/index/$tip"); + } + function delete($tip=1,$id=''){ + $this->web_menu_model->delete($id); + redirect("menu/index/$tip"); + } + function delete_all($tip=1,$p=1,$o=0){ + $this->web_menu_model->delete_all(); + redirect("menu/index/$tip/$p/$o"); + } + function menu_lock($tip=1,$id=''){ + $this->web_menu_model->menu_lock($id,1); + redirect("menu/index/$tip/$p/$o"); + } + function menu_unlock($tip=1,$id=''){ + $this->web_menu_model->menu_lock($id,2); + redirect("menu/index/$tip/$p/$o"); + } + function insert_sub_menu($tip=1,$menu=''){ + $this->web_menu_model->insert_sub_menu($menu); + redirect("menu/sub_menu/$tip/$menu"); + } + function update_sub_menu($tip=1,$menu='',$id=''){ + $this->web_menu_model->update_sub_menu($id); + redirect("menu/sub_menu/$tip/$menu"); + } + function delete_sub_menu($tip='',$menu='',$id=0){ + $this->web_menu_model->delete($id); + redirect("menu/sub_menu/$tip/$menu"); + } + function delete_all_sub_menu($tip=1,$menu=''){ + $this->web_menu_model->delete_all(); + redirect("menu/sub_menu/$tip/$menu"); + } + function menu_lock_sub_menu($tip=1,$menu='',$id=''){ + $this->web_menu_model->menu_lock($id,1); + redirect("menu/sub_menu/$tip/$menu"); + } + function menu_unlock_sub_menu($tip=1,$menu='',$id=''){ + $this->web_menu_model->menu_lock($id,2); + redirect("menu/sub_menu/$tip/$menu"); + } +} \ No newline at end of file diff --git a/app/controllers/Modul.php b/app/controllers/Modul.php new file mode 100644 index 000000000..33bd8a8ac --- /dev/null +++ b/app/controllers/Modul.php @@ -0,0 +1,89 @@ +load->model('user_model'); + $this->load->model('modul_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + $this->load->model('header_model'); + } + + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('modul'); + } + function index(){ + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + $data['main'] = $this->modul_model->list_data(); + $data['keyword'] = $this->modul_model->autocomplete(); + $nav['act']= 1; + $header = $this->header_model->get_data(); + + $this->load->view('header',$header); + + $this->load->view('setting/nav',$nav); + $this->load->view('setting/modul/table',$data); + $this->load->view('footer'); + } + + function form($id=''){ + + if($id){ + $data['modul'] = $this->modul_model->get_data($id); + $data['form_action'] = site_url("modul/update/$id"); + } + else{ + $data['modul'] = null; + $data['form_action'] = site_url("modul/insert"); + } + + $header = $this->header_model->get_data(); + + $this->load->view('header',$header); + + $nav['act']= 1; + $this->load->view('setting/nav',$nav); + $this->load->view('setting/modul/form',$data); + $this->load->view('footer'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!="") + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('modul'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('modul'); + } + function insert(){ + $this->modul_model->insert(); + redirect('modul'); + } + function update($id=''){ + $this->modul_model->update($id); + redirect('modul'); + } + function delete($id=''){ + $this->modul_model->delete($id); + redirect('modul'); + } + function delete_all(){ + $this->modul_model->delete_all(); + redirect('modul'); + } +} \ No newline at end of file diff --git a/app/controllers/Penduduk.php b/app/controllers/Penduduk.php new file mode 100644 index 000000000..6a00a01e4 --- /dev/null +++ b/app/controllers/Penduduk.php @@ -0,0 +1,706 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2) redirect('siteman'); + + $this->load->model('penduduk_model'); + $this->load->model('header_model'); + } + function clear(){ + unset($_SESSION['log']); + $_SESSION['status_dasar']=1; + unset($_SESSION['judul_statistik']); + unset($_SESSION['judul_statistik_cetak']); + unset($_SESSION['cari']); + unset($_SESSION['duplikat']); + + unset($_SESSION['filter']); + unset($_SESSION['sex']); + unset($_SESSION['warganegara']); + unset($_SESSION['cacat']); + unset($_SESSION['menahun']); + unset($_SESSION['golongan_darah']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['hubungan']); + unset($_SESSION['agama']); + unset($_SESSION['umur_min']); + unset($_SESSION['umur_max']); + unset($_SESSION['pekerjaan_id']); + unset($_SESSION['pendidikan_sedang_id']); + unset($_SESSION['pendidikan_kk_id']); + unset($_SESSION['status_penduduk']); + unset($_SESSION['hamil']); + + + unset($_SESSION['status']); + unset($_SESSION['umurx']); + unset($_SESSION['cacatx']); + unset($_SESSION['menahunx']); + + $_SESSION['per_page'] = 50; + redirect('penduduk'); + } + function index($p=1,$o=0){ + + unset($_SESSION['log']); + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['judul_statistik'])) + $data['judul_statistik'] = $_SESSION['judul_statistik']; + else $data['judul_statistik'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['status_dasar'])) + $data['status_dasar'] = $_SESSION['status_dasar']; + else $data['status_dasar'] = '1'; + if(isset($_SESSION['sex'])) + $data['sex'] = $_SESSION['sex']; + else $data['sex'] = ''; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['grup'] = $this->user_model->sesi_grup($_SESSION['sesi']); + $data['paging'] = $this->penduduk_model->paging($p,$o); + $data['main'] = $this->penduduk_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->penduduk_model->autocomplete(); + $data['list_agama'] = $this->penduduk_model->list_agama(); + $data['list_dusun'] = $this->penduduk_model->list_dusun(); + + $header = $this->header_model->get_data(); + $nav['act']= 2; + + $data['info'] = $this->penduduk_model->get_filter(); + + $this->load->view('header', $header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/penduduk',$data); + $this->load->view('footer'); + + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_POST['dusun'])) + $data['dus_sel'] = $_POST['dusun']; + else + $data['dus_sel'] = ''; + + if(isset($_POST['rw'])) + $data['rw_sel'] = $_POST['rw']; + else + $data['rw_sel'] = ''; + + if(isset($_POST['rt'])) + $data['rt_sel'] = $_POST['rt']; + else + $data['rt_sel'] = ''; + + if($id){ + $data['penduduk'] = $this->penduduk_model->get_penduduk($id); + $data['form_action'] = site_url("penduduk/update/$p/$o/$id"); + $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); + } + else{ + $data['penduduk'] = null; + $data['form_action'] = site_url("penduduk/insert"); + $data['list_dokumen'] = null; + } + + $header = $this->header_model->get_data(); + $data['dusun'] = $this->penduduk_model->list_dusun(); + $data['rw'] = $this->penduduk_model->list_rw($data['dus_sel']); + $data['rt'] = $this->penduduk_model->list_rt($data['dus_sel'],$data['rw_sel']); + $data['agama'] = $this->penduduk_model->list_agama(); + $data['pendidikan_sedang'] = $this->penduduk_model->list_pendidikan_sedang(); + $data['pendidikan_kk'] = $this->penduduk_model->list_pendidikan_kk(); + $data['pekerjaan'] = $this->penduduk_model->list_pekerjaan(); + $data['warganegara'] = $this->penduduk_model->list_warganegara(); + $data['hubungan'] = $this->penduduk_model->list_hubungan(); + $data['kawin'] = $this->penduduk_model->list_status_kawin(); + $data['golongan_darah'] = $this->penduduk_model->list_golongan_darah(); + $data['cacat'] = $this->penduduk_model->list_cacat(); + $data['sakit_menahun'] = $this->penduduk_model->list_sakit_menahun(); + + $this->load->view('header', $header); + $nav['act']= 2; + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/penduduk_form',$data); + $this->load->view('footer'); + } + function detail($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); + $data['list_kelompok'] = $this->penduduk_model->list_kelompok($id); + $data['penduduk'] = $this->penduduk_model->get_penduduk($id); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $nav['act']= 2; + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/penduduk_detail',$data); + $this->load->view('footer'); + } + function dokumen($id=''){ + $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); + $data['penduduk'] = $this->penduduk_model->get_penduduk($id); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $nav['act']= 2; + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/penduduk_dokumen',$data); + $this->load->view('footer'); + } + function dokumen_form($id=0){ + $data['penduduk'] = $this->penduduk_model->get_penduduk($id); + $data['form_action'] = site_url("penduduk/dokumen_insert"); + $this->load->view('sid/kependudukan/dokumen_form',$data); + } + function dokumen_list($id=0){ + $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); + $data['penduduk'] = $this->penduduk_model->get_penduduk($id); + $this->load->view('sid/kependudukan/dokumen_ajax',$data); + } + function dokumen_insert(){ + $this->penduduk_model->dokumen_insert(); + $id = $_POST['id_pend']; + redirect("penduduk/dokumen/$id"); + } + function delete_dokumen($id_pend=0,$id=''){ + $this->penduduk_model->delete_dokumen($id); + redirect("penduduk/dokumen/$id_pend"); + } + function delete_all_dokumen($id_pend=0){ + $this->penduduk_model->delete_all_dokumen(); + redirect("penduduk/dokumen/$id_pend"); + } + function cetak_biodata($id=''){ + + $data['desa'] = $this->header_model->get_data(); + $data['penduduk'] = $this->penduduk_model->get_penduduk($id); + $this->load->view('sid/kependudukan/cetak_biodata',$data); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('penduduk'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!="") + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('penduduk'); + } + function duplikat(){ + $_SESSION['duplikat']=1; + redirect('penduduk'); + } + function status_dasar(){ + $status_dasar = $this->input->post('status_dasar'); + if($status_dasar!="") + $_SESSION['status_dasar']=$status_dasar; + else unset($_SESSION['status_dasar']); + redirect('penduduk'); + } + function sex(){ + $sex = $this->input->post('sex'); + if($sex!="") + $_SESSION['sex']=$sex; + else unset($_SESSION['sex']); + redirect('penduduk'); + } + function agama(){ + $agama = $this->input->post('agama'); + if($agama!="") + $_SESSION['agama']=$agama; + else unset($_SESSION['agama']); + redirect('penduduk'); + } + function warganegara(){ + $warganegara = $this->input->post('warganegara'); + if($warganegara!="") + $_SESSION['warganegara']=$warganegara; + else unset($_SESSION['warganegara']); + redirect('penduduk'); + } + function dusun(){ + unset($_SESSION['rw']); + unset($_SESSION['rt']); + $dusun = $this->input->post('dusun'); + if($dusun!="") + $_SESSION['dusun']=$dusun; + else unset($_SESSION['dusun']); + redirect('penduduk'); + } + function rw(){ + unset($_SESSION['rt']); + $rw = $this->input->post('rw'); + if($rw!="") + $_SESSION['rw']=$rw; + else unset($_SESSION['rw']); + redirect('penduduk'); + } + function rt(){ + $rt = $this->input->post('rt'); + if($rt!="") + $_SESSION['rt']=$rt; + else unset($_SESSION['rt']); + redirect('penduduk'); + } + function insert(){ + + + $data = $this->penduduk_model->dn(); + + $i=0; + $dp=0; + $link = site_url()."penduduk/form"; + while($iTERJADI KESALAHAN


    Data Tidak Tersimpan
    + Sudah terdapat Penduduk dengan nomor NIK $nk, Silahkan periksa kembali dan ulangi proses memasukkan data.
    + Klik disini untuk Kembali"; + }else{ + + $this->penduduk_model->insert(); + redirect('penduduk'); + } + } + function update($p=1,$o=0,$id=''){ + $this->penduduk_model->update($id); + redirect("penduduk/index/$p/$o"); + } + + function delete_confirm($p=1,$o=0,$id=''){ + $data['form_action'] = site_url("penduduk/index/$p/$o/$id"); + $this->load->view("sid/kependudukan/ajax_delete", $data); + } + function delete($p=1,$o=0,$id=''){ + $this->penduduk_model->delete($id); + redirect("penduduk/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->penduduk_model->delete_all(); + redirect("penduduk/index/$p/$o"); + } + function ajax_adv_search(){ + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['judul_statistik'])) + $data['judul_statistik'] = $_SESSION['judul_statistik']; + else $data['judul_statistik'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['sex'])) + $data['sex'] = $_SESSION['sex']; + else $data['sex'] = ''; + + if(isset($_SESSION['hubungan'])) + $data['hubungan'] = $_SESSION['hubungan']; + else $data['hubungan'] = ''; + + if(isset($_SESSION['umur_min'])) + $data['umur_min'] = $_SESSION['umur_min']; + else $data['umur_min'] = ''; + + if(isset($_SESSION['umur_max'])) + $data['umur_max'] = $_SESSION['umur_max']; + else $data['umur_max'] = ''; + + if(isset($_SESSION['agama'])) + $data['agama'] = $_SESSION['agama']; + else $data['agama'] = ''; + + if(isset($_SESSION['tahun'])) + $data['tahun'] = $_SESSION['tahun']; + else $data['tahun'] = date("Y"); + + if(isset($_SESSION['cacat'])) + $data['cacat'] = $_SESSION['cacat']; + else $data['cacat'] = ''; + + if(isset($_SESSION['golongan_darah'])) + $data['golongan_darah'] = $_SESSION['golongan_darah']; + else $data['golongan_darah'] = ''; + + if(isset($_SESSION['pekerjaan_id'])) + $data['pekerjaan_id'] = $_SESSION['pekerjaan_id']; + else $data['pekerjaan_id'] = ''; + + if(isset($_SESSION['status'])) + $data['status'] = $_SESSION['status']; + else $data['status'] = ''; + + if(isset($_SESSION['pendidikan_sedang_id'])) + $data['pendidikan_sedang_id'] = $_SESSION['pendidikan_sedang_id']; + else $data['pendidikan_sedang_id'] = ''; + + if(isset($_SESSION['pendidikan_kk_id'])) + $data['pendidikan_kk_id'] = $_SESSION['pendidikan_kk_id']; + else $data['pendidikan_kk_id'] = ''; + + if(isset($_SESSION['status_penduduk'])) + $data['status_penduduk'] = $_SESSION['status_penduduk']; + else $data['status_penduduk'] = ''; + + $data['list_agama'] = $this->penduduk_model->list_agama(); + $data['list_cacat'] = $this->penduduk_model->list_cacat(); + $data['list_golongan_darah'] = $this->penduduk_model->list_golongan_darah(); + $data['list_hubungan'] = $this->penduduk_model->list_hubungan(); + $data['pendidikan'] = $this->penduduk_model->list_pendidikan(); + $data['pendidikan_kk'] = $this->penduduk_model->list_pendidikan_kk(); + $data['pekerjaan'] = $this->penduduk_model->list_pekerjaan(); + $data['form_action'] = site_url("penduduk/adv_search_proses"); + $this->load->view("sid/kependudukan/ajax_adv_search_form", $data); + } + function adv_search_proses(){ + $adv_search = $_POST; + $i=0; + while($i++ < count($adv_search)){ + $col[$i] = key($adv_search); + next($adv_search); + } + $i=0; + while($i++ < count($col)){ + if($adv_search[$col[$i]]==""){ + UNSET($adv_search[$col[$i]]); + UNSET($_SESSION[$col[$i]]); + }else{ + $_SESSION[$col[$i]]=$adv_search[$col[$i]]; + } + } + //print_r($adv_search); + redirect('penduduk'); + } + function ajax_penduduk_pindah($id=0){ + $data['dusun'] = $this->penduduk_model->list_dusun(); + + $data['form_action'] = site_url("penduduk/pindah_proses/$id"); + $this->load->view('sid/kependudukan/ajax_pindah_form',$data); + } + function ajax_penduduk_pindah_rw($dusun=''){ + $dusun = str_replace("_"," ",$dusun); + $rw = $this->penduduk_model->list_rw($dusun); + + $dusun = str_replace(" ","_",$dusun); + echo"RW + + "; + } + function ajax_penduduk_pindah_rt($dusun='',$rw=''){ + $dusun = str_replace("_"," ",$dusun); + $rt = $this->penduduk_model->list_rt($dusun,$rw); + $dusun = str_replace(" ","_",$dusun); + echo "RT + + "; + } + function ajax_penduduk_cari_rw($dusun=''){ + $rw = $this->penduduk_model->list_rw($dusun); + + echo"RW + + "; + } + function ajax_penduduk_cari_rt($dusun='',$rw=''){ + $rt = $this->penduduk_model->list_rt($dusun,$rw); + echo "RT + + "; + } + function pindah_proses($id=0){ + $id_cluster = $_POST['id_cluster']; + $this->penduduk_model->pindah_proses($id,$id_cluster); + redirect("penduduk"); + } + function ajax_penduduk_maps($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + $data['penduduk'] = $this->penduduk_model->get_penduduk_map($id); + $data['desa'] = $this->penduduk_model->get_desa(); + + $data['form_action'] = site_url("penduduk/update_maps/$p/$o/$id"); + + $this->load->view("sid/kependudukan/maps", $data); + } + + function update_maps($p=1,$o=0,$id=''){ + $this->penduduk_model->update_position($id); + redirect("penduduk/form/$p/$o/$id"); + } + function wilayah_sel($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + $data['form_action'] = site_url("penduduk"); + + $this->load->view("sid/kependudukan/maps", $data); + } + function edit_status_dasar($p=1,$o=0,$id=0){ + $data['nik'] = $this->penduduk_model->get_penduduk($id); + $data['form_action'] = site_url("penduduk/update_status_dasar/$p/$o/$id"); + $this->load->view('sid/kependudukan/ajax_edit_status_dasar',$data); + } + + function update_status_dasar($p=1,$o=0,$id=''){ + $this->penduduk_model->update_status_dasar($id); + redirect("penduduk/index/$p/$o"); + } + + function cetak($o=0){ + + $data['info'] = $this->penduduk_model->get_filter(); + $data['main'] = $this->penduduk_model->list_data($o,0, 10000); + $this->load->view('sid/kependudukan/penduduk_print',$data); + } + function excel($o=0){ + + $data['info'] = $this->penduduk_model->get_filter(); + $data['main'] = $this->penduduk_model->list_data($o,0, 10000); + $this->load->view('sid/kependudukan/penduduk_excel',$data); + } + + function statistik($tipe="",$nomor="",$sex=""){ + $_SESSION['per_page'] = 50; + unset($_SESSION['log']); + unset($_SESSION['cari']); + + unset($_SESSION['warganegara']); + unset($_SESSION['cacat']); + unset($_SESSION['menahun']); + unset($_SESSION['golongan_darah']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['agama']); + unset($_SESSION['umur_min']); + unset($_SESSION['umur_max']); + unset($_SESSION['pekerjaan_id']); + unset($_SESSION['status']); + unset($_SESSION['pendidikan_sedang_id']); + unset($_SESSION['pendidikan_kk_id']); + unset($_SESSION['status_penduduk']); + unset($_SESSION['umurx']); + + if($sex==0) + unset($_SESSION['sex']); + else + $_SESSION['sex']=$sex; + + + if($nomor != 0){ + switch($tipe){ + case 0: $_SESSION['pendidikan_kk_id'] = $nomor; $pre="PENDIDIKAN DALAM KK : "; break; + case 1: $_SESSION['pekerjaan_id'] = $nomor; $pre="PEKERJAAN : "; break; + case 2: $_SESSION['status'] = $nomor; $pre="STATUS PERKAWINAN : "; break; + case 3: $_SESSION['agama'] = $nomor; $pre="AGAMA : "; break; + case 4: $_SESSION['sex'] = $nomor; $pre="JENIS KELAMIN : "; break; + case 5: $_SESSION['warganegara'] = $nomor; $pre="WARGANEGARA : "; break; + case 6: $_SESSION['status_penduduk'] = $nomor; $pre="STATUS PENDUDUK : "; break; + case 7: $_SESSION['golongan_darah'] = $nomor; $pre="GOLONGAN DARAH : "; break; + case 9: $_SESSION['cacat'] = $nomor; $pre="CACAT : "; break; + case 10: $_SESSION['menahun'] = $nomor; $pre="SAKIT MENAHUN : "; break; + case 11: $_SESSION['jamkesmas'] = $nomor; $pre="JAMKESMAS : "; break; + case 13: $_SESSION['umurx'] = $nomor; $pre="UMUR "; break; + case 14: $_SESSION['pendidikan_sedang_id'] = $nomor; $pre="PENDIDIKAN SEDANG DITEMPUH : "; break; + } + $judul= $this->penduduk_model->get_judul_statistik($tipe,$nomor); + if($judul['nama']){ + $_SESSION['judul_statistik']="TABEL DATA KEPENDUDUKAN MENURUT ".$pre.$judul['nama']; + $_SESSION['judul_statistik_cetak']="TABEL DATA KEPENDUDUKAN MENURUT ".$pre.$judul['nama']; + }else{ + unset($_SESSION['judul_statistik']); + } + + redirect('penduduk'); + }else{ + + redirect('penduduk'); + } + } + function lap_statistik($id_cluster=0,$tipe=0,$nomor=0){ + unset($_SESSION['sex']); + unset($_SESSION['cacatx']); + unset($_SESSION['menahun']); + unset($_SESSION['menahunx']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['umur_min']); + unset($_SESSION['umur_max']); + unset($_SESSION['hamil']); + unset($_SESSION['status']); + $cluster= $this->penduduk_model->get_cluster($id_cluster); + switch($tipe){ + case 1: + $_SESSION['sex'] = '1'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="JENIS KELAMIN LAKI-LAKI "; + break; + case 2: + $_SESSION['sex'] = '2'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="JENIS KELAMIN PEREMPUAN "; + break; + case 3: + $_SESSION['umur_min'] = '0'; + $_SESSION['umur_max'] = '0'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="BERUMUR <1 "; + break; + case 4: + $_SESSION['umur_min'] = '1'; + $_SESSION['umur_max'] = '5'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="BERUMUR 1-5 "; + break; + case 5: + $_SESSION['umur_min'] = '6'; + $_SESSION['umur_max'] = '12'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="BERUMUR 6-12 "; + break; + case 6: + $_SESSION['umur_min'] = '13'; + $_SESSION['umur_max'] = '15'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="BERUMUR 13-16 "; + break; + case 7: + $_SESSION['umur_min'] = '16'; + $_SESSION['umur_max'] = '18'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="BERUMUR 16-18 "; + break; + case 8: + $_SESSION['umur_min'] = '61'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="BERUMUR >60"; + break; + case 9: + $_SESSION['cacatx'] = '7'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="CACAT "; + break; + case 10: + $_SESSION['menahunx'] = '14'; + $_SESSION['sex']='1' ; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="SAKIT MENAHUN LAKI-LAKI "; + break; + case 11: + $_SESSION['menahunx'] = '14'; + $_SESSION['sex']='2'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="SAKIT MENAHUN PEREMPUAN "; + break; + case 12: + $_SESSION['hamil'] = '1'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="HAMIL "; + break; + } + + if($pre){ + $_SESSION['judul_statistik']=$pre; + }else{ + unset($_SESSION['judul_statistik']); + } + redirect("penduduk"); + } + function coba2($id=0){ + $this->penduduk_model->coba2(); + } +} \ No newline at end of file diff --git a/app/controllers/Penduduk_log.php b/app/controllers/Penduduk_log.php new file mode 100644 index 000000000..2d617bea2 --- /dev/null +++ b/app/controllers/Penduduk_log.php @@ -0,0 +1,169 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); + + $this->load->model('penduduk_model'); + $this->load->model('header_model'); + + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['sex']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['agama']); + unset($_SESSION['umur_min']); + unset($_SESSION['umur_max']); + unset($_SESSION['pekerjaan_id']); + unset($_SESSION['status']); + unset($_SESSION['pendidikan_id']); + unset($_SESSION['status_penduduk']); + $_SESSION['per_page'] = 200; + $_SESSION['log'] = 1; + redirect('penduduk_log'); + } + function index($p=1,$o=0){ + $_SESSION['log'] = 1; + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['sex'])) + $data['sex'] = $_SESSION['sex']; + else $data['sex'] = ''; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + if(isset($_SESSION['agama'])) + $data['agama'] = $_SESSION['agama']; + else $data['agama'] = ''; + if(isset($_SESSION['pekerjaan_id'])) + $data['pekerjaan_id'] = $_SESSION['pekerjaan_id']; + else $data['pekerjaan_id'] = ''; + if(isset($_SESSION['status'])) + $data['status'] = $_SESSION['status']; + else $data['status'] = ''; + if(isset($_SESSION['pendidikan_id'])) + $data['pendidikan_id'] = $_SESSION['pendidikan_id']; + else $data['pendidikan_id'] = ''; + if(isset($_SESSION['status_penduduk'])) + $data['status_penduduk'] = $_SESSION['status_penduduk']; + else $data['status_penduduk'] = ''; + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->penduduk_model->paging($p,$o,1); + $data['main'] = $this->penduduk_model->list_data($o, $data['paging']->offset, $data['paging']->per_page,1); + $data['keyword'] = $this->penduduk_model->autocomplete(); + $data['list_agama'] = $this->penduduk_model->list_agama(); + $data['list_dusun'] = $this->penduduk_model->list_dusun(); + + $header = $this->header_model->get_data(); + $nav['act']= 2; + + $this->load->view('header', $header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/penduduk_log',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('penduduk_log'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!="") + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('penduduk_log'); + } + function sex(){ + $sex = $this->input->post('sex'); + if($sex!="") + $_SESSION['sex']=$sex; + else unset($_SESSION['sex']); + redirect('penduduk_log'); + } + function agama(){ + $agama = $this->input->post('agama'); + if($agama!="") + $_SESSION['agama']=$agama; + else unset($_SESSION['agama']); + redirect('penduduk_log'); + } + function dusun(){ + $dusun = $this->input->post('dusun'); + if($dusun!="") + $_SESSION['dusun']=$dusun; + else unset($_SESSION['dusun']); + redirect('penduduk_log'); + } + function rw(){ + $rw = $this->input->post('rw'); + if($rw!="") + $_SESSION['rw']=$rw; + else unset($_SESSION['rw']); + redirect('penduduk_log'); + } + function rt(){ + $rt = $this->input->post('rt'); + if($rt!="") + $_SESSION['rt']=$rt; + else unset($_SESSION['rt']); + redirect('penduduk_log'); + } + function edit_status_dasar($p=1,$o=0,$id=0){ + $data['nik'] = $this->penduduk_model->get_penduduk($id); + $data['form_action'] = site_url("penduduk_log/update_status_dasar/$p/$o/$id"); + $this->load->view('sid/kependudukan/ajax_edit_status_dasar',$data); + } + + function update_status_dasar($p=1,$o=0,$id=''){ + $this->penduduk_model->update_status_dasar($id); + redirect("penduduk_log/index/$p/$o"); + } + + function cetak($o=0){ + $data['main'] = $this->penduduk_model->list_data($o,0, 10000); + $this->load->view('sid/kependudukan/penduduk_print',$data); + } + function delete_all($p=1,$o=0){ + $this->penduduk_model->delete_all(); + redirect("penduduk_log/index/$p/$o"); + } +} \ No newline at end of file diff --git a/app/controllers/Pengurus.php b/app/controllers/Pengurus.php new file mode 100644 index 000000000..4acecd20f --- /dev/null +++ b/app/controllers/Pengurus.php @@ -0,0 +1,89 @@ +load->model('user_model'); + $this->load->model('pamong_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2) redirect('siteman'); + $this->load->model('header_model'); + } + + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('pengurus'); + } + function index(){ + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + $data['main'] = $this->pamong_model->list_data(); + $data['keyword'] = $this->pamong_model->autocomplete(); + $nav['act']= 1; + $header = $this->header_model->get_data(); + + $this->load->view('header',$header); + + $this->load->view('home/nav',$nav); + $this->load->view('home/pengurus',$data); + $this->load->view('footer'); + } + + function form($id=''){ + + if($id){ + $data['pamong'] = $this->pamong_model->get_data($id); + $data['form_action'] = site_url("pengurus/update/$id"); + } + else{ + $data['pamong'] = null; + $data['form_action'] = site_url("pengurus/insert"); + } + + $header = $this->header_model->get_data(); + + $this->load->view('header',$header); + + $nav['act']= 1; + $this->load->view('home/nav',$nav); + $this->load->view('home/pengurus_form',$data); + $this->load->view('footer'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!="") + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('pengurus'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('pengurus'); + } + function insert(){ + $this->pamong_model->insert(); + redirect('pengurus'); + } + function update($id=''){ + $this->pamong_model->update($id); + redirect('pengurus'); + } + function delete($id=''){ + $this->pamong_model->delete($id); + redirect('pengurus'); + } + function delete_all(){ + $this->pamong_model->delete_all(); + redirect('pengurus'); + } +} \ No newline at end of file diff --git a/app/controllers/Plan.php b/app/controllers/Plan.php new file mode 100644 index 000000000..806b70973 --- /dev/null +++ b/app/controllers/Plan.php @@ -0,0 +1,160 @@ +load->model('user_model'); + + $this->load->model('header_model'); + $this->load->model('plan_lokasi_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + + + //$this->load->library('ion_auth'); + + //$this->config->item('ion_auth') ; + $this->load->database(); + + + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['point']); + unset($_SESSION['subpoint']); + redirect('plan'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['point'])) + $data['point'] = $_SESSION['point']; + else $data['point'] = ''; + if(isset($_SESSION['subpoint'])) + $data['subpoint'] = $_SESSION['subpoint']; + else $data['subpoint'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->plan_lokasi_model->paging($p,$o); + $data['main'] = $this->plan_lokasi_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->plan_lokasi_model->autocomplete(); + $data['list_point'] = $this->plan_lokasi_model->list_point(); + $data['list_subpoint'] = $this->plan_lokasi_model->list_subpoint(); + + $header = $this->header_model->get_data(); + $nav['act']=3; + + $this->load->view('header-gis', $header); + $this->load->view('plan/nav',$nav); + $this->load->view('lokasi/table',$data); + $this->load->view('footer'); + + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + $data['desa'] = $this->plan_lokasi_model->get_desa(); + $data['list_point'] = $this->plan_lokasi_model->list_point(); + $data['dusun'] = $this->plan_lokasi_model->list_dusun(); + + if($id){ + $data['lokasi'] = $this->plan_lokasi_model->get_lokasi($id); + $data['form_action'] = site_url("plan/update/$id/$p/$o"); + } + else{ + $data['lokasi'] = null; + $data['form_action'] = site_url("plan/insert"); + } + $header= $this->header_model->get_data(); + + $nav['act']=3; + $this->load->view('header-gis', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('lokasi/form',$data); + $this->load->view('footer'); + + } + function ajax_lokasi_maps($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + if($id) + $data['lokasi'] = $this->plan_lokasi_model->get_lokasi($id); + else + $data['lokasi'] = null; + + $data['desa'] = $this->plan_lokasi_model->get_desa(); + $data['form_action'] = site_url("plan/update_maps/$p/$o/$id"); + $this->load->view("lokasi/maps", $data); + } + + function update_maps($p=1,$o=0,$id=''){ + $this->plan_lokasi_model->update_position($id); + redirect("plan/index/$p/$o"); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('plan'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('plan'); + } + function point(){ + $point = $this->input->post('point'); + if($point!=0) + $_SESSION['point']=$point; + else unset($_SESSION['point']); + redirect('plan'); + } + function subpoint(){ + unset($_SESSION['point']); + $subpoint = $this->input->post('subpoint'); + if($subpoint!=0) + $_SESSION['subpoint']=$subpoint; + else unset($_SESSION['subpoint']); + redirect('plan'); + } + function insert($tip=1){ + $this->plan_lokasi_model->insert($tip); + redirect("plan/index/$tip"); + } + function update($id='',$p=1,$o=0){ + $this->plan_lokasi_model->update($id); + redirect("plan/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->plan_lokasi_model->delete($id); + redirect("plan/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->plan_lokasi_model->delete_all(); + redirect("plan/index/$p/$o"); + } + function lokasi_lock($id=''){ + $this->plan_lokasi_model->lokasi_lock($id,1); + redirect("plan/index/$p/$o"); + } + function lokasi_unlock($id=''){ + $this->plan_lokasi_model->lokasi_lock($id,2); + redirect("plan/index/$p/$o"); + } +} \ No newline at end of file diff --git a/app/controllers/Point.php b/app/controllers/Point.php new file mode 100644 index 000000000..716421c23 --- /dev/null +++ b/app/controllers/Point.php @@ -0,0 +1,163 @@ +load->model('user_model'); + + $this->load->model('header_model'); + $this->load->model('plan_point_model'); + $this->load->database(); + + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('point'); + } + function index($p=1,$o=0){ + + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->plan_point_model->paging($p,$o); + $data['main'] = $this->plan_point_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->plan_point_model->autocomplete(); + $header= $this->header_model->get_data(); + $nav['act']=0; + + $this->load->view('header', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('point/table',$data); + $this->load->view('footer'); + + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + + + if($id){ + $data['point'] = $this->plan_point_model->get_point($id); + $data['form_action'] = site_url("point/update/$id/$p/$o"); + } + else{ + $data['point'] = null; + $data['form_action'] = site_url("point/insert"); + } + $data['simbol'] = $this->plan_point_model->list_simbol(); + $header = $this->header_model->get_data(); + + $nav['act']=0; + $this->load->view('header', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('point/form',$data); + $this->load->view('footer'); + + } + function sub_point($point=1){ + $data['subpoint'] = $this->plan_point_model->list_sub_point($point); + $data['point'] = $point; + $header = $this->header_model->get_data(); + $nav['act']=0; + + $this->load->view('header', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('point/sub_point_table',$data); + $this->load->view('footer'); + + } + function ajax_add_sub_point($point=0,$id=0){ + + + + + if($id){ + $data['point'] = $this->plan_point_model->get_point($id); + $data['form_action'] = site_url("point/update_sub_point/$point/$id"); + } + else{ + $data['point'] = null; + $data['form_action'] = site_url("point/insert_sub_point/$point"); + } + $data['simbol'] = $this->plan_point_model->list_simbol(); + $this->load->view("point/ajax_add_sub_point_form",$data); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('point'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('point'); + } + function insert($tip=1){ + $this->plan_point_model->insert($tip); + redirect("point/index/$tip"); + } + function update($id='',$p=1,$o=0){ + $this->plan_point_model->update($id); + redirect("point/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->plan_point_model->delete($id); + redirect("point/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->plan_point_model->delete_all(); + redirect("point/index/$p/$o"); + } + function point_lock($id=''){ + $this->plan_point_model->point_lock($id,1); + redirect("point/index/$p/$o"); + } + function point_unlock($id=''){ + $this->plan_point_model->point_lock($id,2); + redirect("point/index/$p/$o"); + } + function insert_sub_point($point=''){ + $this->plan_point_model->insert_sub_point($point); + redirect("point/sub_point/$point"); + } + function update_sub_point($point='',$id=''){ + $this->plan_point_model->update_sub_point($id); + redirect("point/sub_point/$point"); + } + function delete_sub_point($point='',$id=''){ + $this->plan_point_model->delete_sub_point($id); + redirect("point/sub_point/$point"); + } + function delete_all_sub_point($point=''){ + $this->plan_point_model->delete_all_sub_point(); + redirect("point/sub_point/$point"); + } + function point_lock_sub_point($point='',$id=''){ + $this->plan_point_model->point_lock($id,1); + redirect("point/sub_point/$point"); + } + function point_unlock_sub_point($point='',$id=''){ + $this->plan_point_model->point_lock($id,2); + redirect("point/sub_point/$point"); + } +} \ No newline at end of file diff --git a/app/controllers/Polygon.php b/app/controllers/Polygon.php new file mode 100644 index 000000000..b49006cdd --- /dev/null +++ b/app/controllers/Polygon.php @@ -0,0 +1,166 @@ +load->model('user_model'); + + $this->load->model('header_model'); + $this->load->model('plan_polygon_model'); + + + $this->load->database(); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('polygon'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->plan_polygon_model->paging($p,$o); + $data['main'] = $this->plan_polygon_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->plan_polygon_model->autocomplete(); + $header= $this->header_model->get_data(); + $nav['act']=5; + + $this->load->view('header-gis', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('polygon/table',$data); + $this->load->view('footer'); + + } + function form($p=1,$o=0,$id=''){ + + $data['p'] = $p; + $data['o'] = $o; + + + + if($id){ + $data['polygon'] = $this->plan_polygon_model->get_polygon($id); + $data['form_action'] = site_url("polygon/update/$id/$p/$o"); + } + else{ + $data['polygon'] = null; + $data['form_action'] = site_url("polygon/insert"); + } + $header= $this->header_model->get_data(); + + $nav['act']=5; + $this->load->view('header-gis', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('polygon/form',$data); + $this->load->view('footer'); + + } + function sub_polygon($polygon=1){ + + $data['subpolygon'] = $this->plan_polygon_model->list_sub_polygon($polygon); + $data['polygon'] = $polygon; + $header= $this->header_model->get_data(); + $nav['act']=5; + + $this->load->view('header-gis', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view('polygon/sub_polygon_table',$data); + $this->load->view('footer'); + + } + function ajax_add_sub_polygon($polygon=0,$id=0){ + if($id){ + $data['polygon'] = $this->plan_polygon_model->get_polygon($id); + $data['form_action'] = site_url("polygon/update_sub_polygon/$polygon/$id"); + } + else{ + $data['polygon'] = null; + $data['form_action'] = site_url("polygon/insert_sub_polygon/$polygon"); + } + $header= $this->header_model->get_data(); + + $nav['act']=5; + $this->load->view('header-gis', $header); + + $this->load->view('plan/nav',$nav); + $this->load->view("polygon/ajax_add_sub_polygon_form",$data); + + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('polygon'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('polygon'); + } + function insert($tip=1){ + $this->plan_polygon_model->insert($tip); + redirect("polygon/index/$tip"); + } + function update($id='',$p=1,$o=0){ + $this->plan_polygon_model->update($id); + redirect("polygon/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->plan_polygon_model->delete($id); + redirect("polygon/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->plan_polygon_model->delete_all(); + redirect("polygon/index/$p/$o"); + } + function polygon_lock($id=''){ + $this->plan_polygon_model->polygon_lock($id,1); + redirect("polygon/index/$p/$o"); + } + function polygon_unlock($id=''){ + $this->plan_polygon_model->polygon_lock($id,2); + redirect("polygon/index/$p/$o"); + } + function insert_sub_polygon($polygon=''){ + $this->plan_polygon_model->insert_sub_polygon($polygon); + redirect("polygon/sub_polygon/$polygon"); + } + function update_sub_polygon($polygon='',$id=''){ + $this->plan_polygon_model->update_sub_polygon($id); + redirect("polygon/sub_polygon/$polygon"); + } + function delete_sub_polygon($polygon='',$id=''){ + $this->plan_polygon_model->delete_sub_polygon($id); + redirect("polygon/sub_polygon/$polygon"); + } + function delete_all_sub_polygon($polygon=''){ + $this->plan_polygon_model->delete_all_sub_polygon(); + redirect("polygon/sub_polygon/$polygon"); + } + function polygon_lock_sub_polygon($polygon='',$id=''){ + $this->plan_polygon_model->polygon_lock($id,1); + redirect("polygon/sub_polygon/$polygon"); + } + function polygon_unlock_sub_polygon($polygon='',$id=''){ + $this->plan_polygon_model->polygon_lock($id,2); + redirect("polygon/sub_polygon/$polygon"); + } +} \ No newline at end of file diff --git a/app/controllers/Program_bantuan.php b/app/controllers/Program_bantuan.php new file mode 100644 index 000000000..70101e4f5 --- /dev/null +++ b/app/controllers/Program_bantuan.php @@ -0,0 +1,107 @@ +load->model('user_model'); + + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('program_bantuan_model'); + } + public function index(){ + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $data['tampil'] = 0; + $data['program'] = $this->program_bantuan_model->get_program(false); + $this->load->view('program_bantuan/program',$data); + $this->load->view('footer'); + } + public function sasaran($sasaran=0){ + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + + $data['tampil'] = $sasaran; + $data['program'] = $this->program_bantuan_model->list_program($sasaran); + $this->load->view('program_bantuan/program',$data); + $this->load->view('footer'); + } + public function detail($id){ + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + if(isset($_POST['nik'])) + $data['individu']=$this->program_bantuan_model->add_peserta($_POST['nik'],$id); + else + $data['individu']=NULL; + $data['program'] = $this->program_bantuan_model->get_program($id); + + $this->load->view('program_bantuan/detail',$data); + $this->load->view('footer'); + } + public function peserta($cat=0,$id=0){ + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $data['program'] = $this->program_bantuan_model->get_peserta_program($cat,$id); + + $this->load->view('program_bantuan/peserta',$data); + $this->load->view('footer'); + } + public function create(){ + + $this->load->helper('form'); + $this->load->library('form_validation'); + + $this->form_validation->set_rules('cid', 'Sasaran', 'required'); + $this->form_validation->set_rules('nama', 'Nama Program', 'required'); + $this->form_validation->set_rules('sdate', 'Tanggal awal', 'required'); + $this->form_validation->set_rules('edate', 'Tanggal akhir', 'required'); + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + if ($this->form_validation->run() === FALSE){ + $this->load->view('program_bantuan/create'); + }else{ + $this->program_bantuan_model->set_program(); + redirect("program_bantuan/"); + } + $this->load->view('footer'); + } + public function edit($id){ + $this->load->helper('form'); + $this->load->library('form_validation'); + + $this->form_validation->set_rules('cid', 'Sasaran', 'required'); + $this->form_validation->set_rules('nama', 'Nama Program', 'required'); + $this->form_validation->set_rules('sdate', 'Tanggal awal', 'required'); + $this->form_validation->set_rules('edate', 'Tanggal akhir', 'required'); + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $data['program'] = $this->program_bantuan_model->get_program($id); + if ($this->form_validation->run() === FALSE){ + $this->load->view('program_bantuan/edit',$data); + }else{ + $this->program_bantuan_model->update_program($id); + redirect("program_bantuan/"); + } + + $this->load->view('footer'); + } + public function update($id){ + $this->program_bantuan_model->update_program($id); + redirect("program_bantuan/detail/".$id); + } + public function hapus($id){ + $this->program_bantuan_model->hapus_program($id); + //$this->load->view('program_bantuan/formsuccess'); + redirect("program_bantuan/"); + } + public function unduhsheet($id=0){ + if($id > 0){ + + $data['desa'] = $this->header_model->get_data(); + $data['peserta'] = $this->program_bantuan_model->get_program($id); + $this->load->view('program_bantuan/unduh-sheet',$data); + + } + } +} \ No newline at end of file diff --git a/app/controllers/Rtm.php b/app/controllers/Rtm.php new file mode 100644 index 000000000..f2235a90f --- /dev/null +++ b/app/controllers/Rtm.php @@ -0,0 +1,314 @@ +load->model('user_model'); + $this->load->model('rtm_model'); + $this->load->model('penduduk_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2) redirect('siteman'); + $this->load->model('header_model'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['raskin']); + unset($_SESSION['id_blt']); + unset($_SESSION['id_bos']); + unset($_SESSION['id_pkh']); + unset($_SESSION['id_jampersal']); + unset($_SESSION['id_bedah_rumah']); + $_SESSION['per_page']=100; + redirect('rtm'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['raskin'])) + $data['raskin'] = $_SESSION['raskin']; + else $data['raskin'] = ''; + if(isset($_SESSION['id_blt'])) + $data['id_blt'] = $_SESSION['id_blt']; + else $data['id_blt'] = ''; + + if(isset($_SESSION['id_bos'])) + $data['id_bos'] = $_SESSION['id_bos']; + else $data['id_bos'] = ''; + + if(isset($_SESSION['id_pkh'])) + $data['id_pkh'] = $_SESSION['id_pkh']; + else $data['id_pkh'] = ''; + + if(isset($_SESSION['id_jampersal'])) + $data['id_jampersal'] = $_SESSION['id_jampersal']; + else $data['id_jampersal'] = ''; + if(isset($_SESSION['id_bedah_rumah'])) + $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; + else $data['id_bedah_rumah'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + $data['grup'] = $this->user_model->sesi_grup($_SESSION['sesi']); + $data['paging'] = $this->rtm_model->paging($p,$o); + $data['main'] = $this->rtm_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->rtm_model->autocomplete(); + $data['list_dusun'] = $this->penduduk_model->list_dusun(); + $nav['act']= 3; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/rtm',$data); + $this->load->view('footer'); + } + function cetak($o=0){ + $data['main'] = $this->rtm_model->list_data($o, 0, 10000); + $this->load->view('sid/kependudukan/rtm_print',$data); + } + function excel($o=0){ + $data['main'] = $this->rtm_model->list_data($o, 0, 10000); + $this->load->view('sid/kependudukan/rtm_excel',$data); + } + function excel_pbdt($o=0){ + $this->load->model('config_model'); + $data['config'] = $this->config_model->get_data(); + $data['main'] = $this->rtm_model->list_data_pbdt($o, 0, 10000); + $this->load->view('sid/kependudukan/rtm_excel_pbdt',$data); + } + function edit_nokk($p=1,$o=0,$id=0){ + $data['kk'] = $this->rtm_model->get_rtm($id); + $data['form_action'] = site_url("rtm/update_nokk/$id"); + $this->load->view('sid/kependudukan/ajax_edit_no_rtm',$data); + } + function form_old($p=1,$o=0,$id=0){ + $data['penduduk'] = $this->rtm_model->list_penduduk_lepas(); + $data['form_action'] = site_url("rtm/insert/$id"); + $this->load->view('sid/kependudukan/ajax_add_rtm',$data); + } + function dusun($s=0){ + $dusun = $this->input->post('dusun'); + if($dusun!="") + $_SESSION['dusun']=$dusun; + else unset($_SESSION['dusun']); + if($s==1) + redirect('rtm/sosial'); + elseif($s==2) + redirect('rtm/raskin_graph'); + else + redirect('rtm'); + } + + function rw($s=0){ + $rw = $this->input->post('rw'); + if($rw!="") + $_SESSION['rw']=$rw; + else unset($_SESSION['rw']); + if($s==1) + redirect('rtm/sosial'); + elseif($s==2) + redirect('rtm/raskin_graph'); + else + redirect('rtm'); + } + function rt($s=0){ + $rt = $this->input->post('rt'); + if($rt!="") + $_SESSION['rt']=$rt; + else unset($_SESSION['rt']); + if($s==1) + redirect('rtm/sosial'); + elseif($s==2) + redirect('rtm/raskin_graph'); + else + redirect('rtm'); + } + function raskin(){ + $raskin = $this->input->post('raskin'); + if($raskin!="") + $_SESSION['raskin']=$raskin; + else unset($_SESSION['raskin']); + redirect('rtm'); + } + function blt(){ + $id_blt = $this->input->post('id_blt'); + if($id_blt!="") + $_SESSION['id_blt']=$id_blt; + else unset($_SESSION['id_blt']); + redirect('rtm'); + } + function bos(){ + $id_bos = $this->input->post('id_bos'); + if($id_bos!="") + $_SESSION['id_bos']=$id_bos; + else unset($_SESSION['id_bos']); + redirect('rtm'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('rtm'); + } + function insert(){ + $this->rtm_model->insert(); + redirect('rtm'); + } + function insert_by_kk(){ + $this->rtm_model->insert_by_kk(); + redirect('rtm'); + } + function insert_a(){ + $this->rtm_model->insert_a(); + redirect('rtm'); + } + function insert_new(){ + $this->rtm_model->insert_new(); + redirect('rtm'); + } + function update($id=''){ + $this->rtm_model->update($id); + redirect('rtm'); + } + function update_nokk($id=''){ + $this->rtm_model->update_nokk($id); + redirect('rtm'); + } + function delete($p=1,$o=0,$id=''){ + $this->rtm_model->delete($id); + redirect('rtm'); + } + function delete_all($p=1,$o=0){ + $this->rtm_model->delete_all(); + redirect('rtm'); + } + function anggota($p=1,$o=0,$id=0){ + $data['p'] = $p; + $data['o'] = $o; + $data['kk'] = $id; + + $data['main'] = $this->rtm_model->list_anggota($id); + $data['kepala_kk']= $this->rtm_model->get_kepala_kk($id); + $nav['act']= 3; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/rtm_anggota',$data); + $this->load->view('footer'); + } + + function ajax_add_anggota($p=1,$o=0,$id=0){ + $data['p'] = $p; + $data['o'] = $o; + $data['main'] = $this->rtm_model->list_anggota($id); + $kk = $this->rtm_model->get_kepala_kk($id); + if($kk) + $data['kepala_kk'] = $kk; + else + $data['kepala_kk'] = NULL; + $data['penduduk'] = $this->rtm_model->list_penduduk_lepas(); + + $data['form_action'] = site_url("rtm/add_anggota/$p/$o/$id"); + + $this->load->view("sid/kependudukan/ajax_add_anggota_rtm_form", $data); + } + + function edit_anggota($p=1,$o=0,$id_kk=0,$id=0){ + $data['p'] = $p; + $data['o'] = $o; + $data['hubungan'] = $this->rtm_model->list_hubungan(); + $data['main'] = $this->rtm_model->get_anggota($id); + $data['form_action'] = site_url("rtm/update_anggota/$p/$o/$id_kk/$id"); + $this->load->view("sid/kependudukan/ajax_edit_anggota_rtm", $data); + } + function kartu_rtm($p=1,$o=0,$id=0){ + $data['p'] = $p; + $data['o'] = $o; + $data['id_kk'] = $id; + $data['hubungan'] = $this->rtm_model->list_hubungan(); + $data['main'] = $this->rtm_model->list_anggota($id); + $kk = $this->rtm_model->get_kepala_kk($id); + $data['desa'] = $this->rtm_model->get_desa(); + + if($kk) + $data['kepala_kk'] = $kk; + + else + $data['kepala_kk'] = NULL; + + $data['penduduk'] = $this->rtm_model->list_penduduk_lepas(); + $nav['act']= 3; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $data['form_action'] = site_url("rtm/print"); + + $this->load->view("sid/kependudukan/kartu_rtm", $data); + $this->load->view('footer'); + + } + + function cetak_kk($id=0){ + $data['id_kk'] = $id; + $data['main'] = $this->rtm_model->list_anggota($id); + $kk = $this->rtm_model->get_kepala_kk($id); + $data['desa'] = $this->rtm_model->get_desa(); + $data['kepala_kk'] = $kk; + $nav['act']= 3; + $header = $this->header_model->get_data(); + $this->load->view("sid/kependudukan/cetak_rtm", $data); + + } + + function add_anggota($p=1,$o=0,$id=0){ + $this->rtm_model->add_anggota($id); + redirect("rtm/anggota/$p/$o/$id"); + } + function update_anggota($p=1,$o=0,$id_kk=0,$id=0){ + $this->rtm_model->update_anggota($id); + redirect("rtm/anggota/$p/$o/$id_kk"); + } + function delete_anggota($p=1,$o=0,$kk=0,$id=''){ + $this->rtm_model->rem_anggota($kk,$id); + redirect("rtm/anggota/$p/$o/$kk"); + } + function delete_all_anggota($p=1,$o=0,$kk=0){ + $this->rtm_model->rem_all_anggota($kk); + redirect("rtm/anggota/$p/$o/$kk"); + } + function cetak_statistik($tipe=0){ + $data['main'] = $this->rtm_model->list_data_statistik($tipe); + $this->load->view('sid/kependudukan/rtm_print',$data); + } +} \ No newline at end of file diff --git a/app/controllers/Sid_core.php b/app/controllers/Sid_core.php new file mode 100644 index 000000000..5641da34a --- /dev/null +++ b/app/controllers/Sid_core.php @@ -0,0 +1,445 @@ +load->model('user_model'); + $this->load->model('wilayah_model'); + $this->load->model('config_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2) redirect('siteman'); + $this->load->model('header_model'); + } + + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('sid_core'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + $data['grup'] = $this->user_model->sesi_grup($_SESSION['sesi']); + $data['paging'] = $this->wilayah_model->paging($p,$o); + $data['main'] = $this->wilayah_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->wilayah_model->autocomplete(); + $data['total'] = $this->wilayah_model->total(); + $nav['act']= 0; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/wilayah/wilayah',$data); + $this->load->view('footer'); + } + function cetak(){ + $data['desa'] = $this->header_model->get_data(); + $data['main'] = $this->wilayah_model->list_data(0,0,1000); + $data['total'] = $this->wilayah_model->total(); + $this->load->view('sid/wilayah/wilayah_print',$data); + } + function excel(){ + $data['desa'] = $this->header_model->get_data(); + $data['main'] = $this->wilayah_model->list_data(0,0,1000); + $data['total'] = $this->wilayah_model->total(); + $this->load->view('sid/wilayah/wilayah_excel',$data); + } + + function form($id=''){ + + $data['penduduk'] = $this->wilayah_model->list_penduduk(); + + if($id){ + $temp = $this->wilayah_model->cluster_by_id($id); + $data['dusun'] = $temp['dusun']; + $data['individu'] = $this->wilayah_model->get_penduduk($temp['id_kepala']); + if(empty($data['individu'])) + $data['individu'] = NULL; + else{ + $ex = $data['individu']; + $data['penduduk'] = $this->wilayah_model->list_penduduk_ex($ex['id']); + } + $data['form_action'] = site_url("sid_core/update/$id"); + } + else{ + $data['dusun'] = null; + $data['form_action'] = site_url("sid_core/insert"); + } + + $nav['act']= 0; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/wilayah/wilayah_form',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('sid_core'); + } + function insert($dusun=''){ + $this->wilayah_model->insert(); + redirect('sid_core'); + } + function update($id=''){ + $this->wilayah_model->update($id); + redirect('sid_core'); + } + function delete($id=''){ + $this->wilayah_model->delete($id); + redirect('sid_core'); + } + function delete_all(){ + $this->wilayah_model->delete_all(); + redirect('sid_core'); + } + function sub_rw($id_dusun=''){ + $dusun = $this->wilayah_model->cluster_by_id($id_dusun); + $nama_dusun = $dusun['dusun']; + $data['dusun'] = $dusun['dusun']; + $data['id_dusun'] = $id_dusun; + $data['main'] = $this->wilayah_model->list_data_rw($id_dusun ); + $data['total'] = $this->wilayah_model->total_rw($nama_dusun ); + $nav['act']= 0; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/wilayah/wilayah_rw',$data); + $this->load->view('footer'); + } + + function cetak_rw($id_dusun=''){ + $dusun = $this->wilayah_model->cluster_by_id($id_dusun); + $nama_dusun = $dusun['dusun']; + $data['dusun'] = $dusun['dusun']; + $data['id_dusun'] = $id_dusun; + $data['main'] = $this->wilayah_model->list_data_rw($id_dusun ); + $data['total'] = $this->wilayah_model->total_rw($nama_dusun ); + $this->load->view('sid/wilayah/wilayah_rw_print',$data); + } + function excel_rw($id_dusun=''){ + $dusun = $this->wilayah_model->cluster_by_id($id_dusun); + $nama_dusun = $dusun['dusun']; + $data['dusun'] = $dusun['dusun']; + $data['id_dusun'] = $id_dusun; + $data['main'] = $this->wilayah_model->list_data_rw($id_dusun ); + $data['total'] = $this->wilayah_model->total_rw($nama_dusun ); + $this->load->view('sid/wilayah/wilayah_rw_excel',$data); + } + + function form_rw($id_dusun='',$rw=''){ + + $temp = $this->wilayah_model->cluster_by_id($id_dusun); + $dusun = $temp['dusun']; + $data['dusun'] = $temp['dusun']; + $data['id_dusun'] = $id_dusun; + + $data['penduduk'] = $this->wilayah_model->list_penduduk(); + + if($rw){ + $data['rw'] = $rw; + $temp = $this->wilayah_model->get_rw($dusun,$rw); + $data['individu'] = $this->wilayah_model->get_penduduk($temp['id_kepala']); + if(empty($data['individu'])) + $data['individu'] = NULL; + else{ + $ex = $data['individu']; + $data['penduduk'] = $this->wilayah_model->list_penduduk_ex($ex['id']); + } + $data['form_action'] = site_url("sid_core/update_rw/$id_dusun/$rw"); + } + else{ + $data['rw'] = null; + $data['form_action'] = site_url("sid_core/insert_rw/$id_dusun"); + } + + $nav['act']= 0; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/wilayah/wilayah_form_rw',$data); + $this->load->view('footer'); + } + + function insert_rw($dusun=''){ + $this->wilayah_model->insert_rw($dusun); + redirect("sid_core/sub_rw/$dusun"); + } + + function update_rw($dusun='',$rw=''){ + $this->wilayah_model->update_rw($dusun,$rw); + redirect("sid_core/sub_rw/$dusun"); + } + + function delete_rw($id_dusun='',$id=''){ + $this->wilayah_model->delete_rw($id); + redirect("sid_core/sub_rw/$id_dusun"); + } + function delete_all_rw($dusun=''){ + $this->wilayah_model->delete_all_rw(); + redirect("sid_core/sub_rw/$dusun"); + } + + function sub_rt($id_dusun='',$rw=''){ + $temp = $this->wilayah_model->cluster_by_id($id_dusun); + $dusun = $temp['dusun']; + $data['dusun'] = $temp['dusun']; + $data['id_dusun'] = $id_dusun; + + $data['rw'] = $rw; + $data['main'] = $this->wilayah_model->list_data_rt($dusun,$rw); + $data['total'] = $this->wilayah_model->total_rt($dusun,$rw); + $nav['act']= 0; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/wilayah/wilayah_rt',$data); + $this->load->view('footer'); + } + + function cetak_rt($id_dusun='',$rw=''){ + $temp = $this->wilayah_model->cluster_by_id($id_dusun); + $dusun = $temp['dusun']; + $data['dusun'] = $temp['dusun']; + $data['id_dusun'] = $id_dusun; + + $data['rw'] = $rw; + $data['main'] = $this->wilayah_model->list_data_rt($dusun,$rw); + $data['total'] = $this->wilayah_model->total_rt($dusun,$rw); + $this->load->view('sid/wilayah/wilayah_rt_print',$data); + } + function excel_rt($id_dusun='',$rw=''){ + $temp = $this->wilayah_model->cluster_by_id($id_dusun); + $dusun = $temp['dusun']; + $data['dusun'] = $temp['dusun']; + $data['id_dusun'] = $id_dusun; + + $data['rw'] = $rw; + $data['main'] = $this->wilayah_model->list_data_rt($dusun,$rw); + $data['total'] = $this->wilayah_model->total_rt($dusun,$rw); + $this->load->view('sid/wilayah/wilayah_rt_excel',$data); + } + function list_dusun_rt($dusun='',$rw=''){ + $data['dusun'] = $dusun; + $data['rw'] = $rw; + $data['main'] = $this->wilayah_model->list_data_rt($dusun,$rw); + $nav['act']= 0; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/wilayah/list_dusun_rt',$data); + $this->load->view('footer'); + } + + function form_rt($id_dusun='',$rw='',$rt=''){ + + $temp = $this->wilayah_model->cluster_by_id($id_dusun); + $dusun = $temp['dusun']; + $data['dusun'] = $temp['dusun']; + $data['id_dusun'] = $id_dusun; + + $data['rw'] = $rw; + $data['penduduk'] = $this->wilayah_model->list_penduduk(); + + if($rt){ + $temp2 = $this->wilayah_model->cluster_by_id($rt); + $id_cluster=$temp2['id']; + $data['rt'] =$temp2['rt']; + $data['individu'] = $this->wilayah_model->get_penduduk($temp2['id_kepala']); + if(empty($data['individu'])) + $data['individu'] = NULL; + else{ + $ex = $data['individu']; + $data['penduduk'] = $this->wilayah_model->list_penduduk_ex($ex['id']); + } + $data['form_action'] = site_url("sid_core/update_rt/$id_dusun/$rw/$id_cluster"); + } + else{ + $data['rt'] = null; + $data['form_action'] = site_url("sid_core/insert_rt/$id_dusun/$rw"); + } + + $nav['act']= 0; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/wilayah/wilayah_form_rt',$data); + $this->load->view('footer'); + } + + function insert_rt($dusun='',$rw=''){ + $this->wilayah_model->insert_rt($dusun,$rw); + redirect("sid_core/sub_rt/$dusun/$rw"); + } + + function update_rt($dusun='',$rw='',$id_cluster=0){ + $this->wilayah_model->update_rt($id_cluster); + redirect("sid_core/sub_rt/$dusun/$rw"); + } + + function delete_rt($id_cluster=''){ + $temp = $this->wilayah_model->cluster_by_id($id_cluster); + $id_dusun=$temp['id']; + $dusun=$temp['dusun']; + $rw=$temp['rw']; + $this->wilayah_model->delete_rt($id_cluster); + echo ""; + } + function delete_all_rt(){ + $temp = $this->wilayah_model->cluster_by_id($id_cluster); + $id_dusun=$temp['id']; + $dusun=$temp['dusun']; + $rw=$temp['rw']; + $this->wilayah_model->delete_all_rt(); + redirect("sid_core"); + } + function cetakx(){ + $data['input'] = $_POST; + $data['tanggal_sekarang'] = tgl_indo(date("Y m d")); + $data['total'] = $this->wilayah_model->total(); + $this->surat_keluar_model->log_surat($f,$id,$g,$u); + $this->load->view('surat/print_surat_ket_pengantar',$data); + } + + function ajax_wil_maps($id=0){ + $data['dusun'] = $this->wilayah_model->get_dusun_maps($id); + $data['desa'] = $this->config_model->get_data(); + $data['form_action'] = site_url("sid_core/update_dusun_map/$id"); + + $this->load->view("sid/wilayah/ajax_wil_dusun", $data); + } + + function update_dusun_map($id=0){ + $this->wilayah_model->update_dusun_map($id); + redirect("sid_core"); + } + function ajax_rw_maps($dus=0,$id=0){ + $data['dusun'] = $this->wilayah_model->get_rw($dus,$id); + $data['desa'] = $this->config_model->get_data(); + $data['form_action'] = site_url("sid_core/update_rw_map/$dus/$id"); + + $this->load->view("sid/wilayah/ajax_wil_dusun", $data); + } + + function update_rw_map($dus=0,$id=0){ + $this->wilayah_model->update_rw_map($dus,$id); + redirect("sid_core/sub_rw/$dus"); + } + + function ajax_rt_maps($dus=0,$rw=0,$id=0){ + $data['dusun'] = $this->wilayah_model->get_rt($dus,$rw,$id); + $data['desa'] = $this->config_model->get_data(); + $data['form_action'] = site_url("sid_core/update_rt_map/$dus/$rw/$id"); + + $this->load->view("sid/wilayah/ajax_wil_dusun", $data); + } + + function update_rt_map($dus=0,$rw=0,$id=0){ + $this->wilayah_model->update_rt_map($dus,$rw,$id); + redirect("sid_core/sub_rt/$dus/$rw"); + } + + function warga($id=''){ + $temp = $this->wilayah_model->cluster_by_id($id); + $id_dusun=$temp['id']; + $dusun=$temp['dusun']; + + $_SESSION['per_page'] = 100; + $_SESSION['dusun'] = $dusun; + redirect("penduduk/index/1/0"); + } + function warga_kk($id=''){ + $temp = $this->wilayah_model->cluster_by_id($id); + $id_dusun=$temp['id']; + $dusun=$temp['dusun']; + $_SESSION['per_page'] = 50; + $_SESSION['dusun'] = $dusun; + redirect("keluarga/index/1/0"); + } + function warga_l($id=''){ + $temp = $this->wilayah_model->cluster_by_id($id); + $id_dusun=$temp['id']; + $dusun=$temp['dusun']; + + $_SESSION['per_page'] = 100; + $_SESSION['dusun'] = $dusun; + $_SESSION['sex'] = 1; + redirect("penduduk/index/1/0"); + } + function warga_p($id=''){ + $temp = $this->wilayah_model->cluster_by_id($id); + $id_dusun=$temp['id']; + $dusun=$temp['dusun']; + + $_SESSION['per_page'] = 100; + $_SESSION['dusun'] = $dusun; + $_SESSION['sex'] = 2; + redirect("penduduk/index/1/0"); + } + + function migrate(){ + $this->wilayah_model->migrate(); + + $this->dbforge->drop_table('tweb_dusun_x'); + $this->dbforge->drop_table('tweb_rw_x'); + $this->dbforge->drop_table('tweb_rt_x'); + $this->dbforge->drop_table('tweb_keluarga_x'); + $this->dbforge->drop_table('tweb_keluarga_x_pindah'); + $this->dbforge->drop_table('tweb_penduduk_x'); + $this->dbforge->drop_table('tweb_penduduk_x_pindah'); + + redirect("penduduk/clear"); + } + function pre_migrate(){ + $nav['act']= 3; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/wilayah/mig'); + $this->load->view('footer'); + } + +} \ No newline at end of file diff --git a/app/controllers/Siteman.php b/app/controllers/Siteman.php new file mode 100644 index 000000000..b8e7d1148 --- /dev/null +++ b/app/controllers/Siteman.php @@ -0,0 +1,36 @@ +load->model('header_model'); + $this->load->model('user_model'); + $this->load->model('config_model'); + } + function index(){ + $this->user_model->logout(); + $header = $this->header_model->get_config(); + + + if(!isset($_SESSION['siteman'])) + $_SESSION['siteman']=0; + $_SESSION['success'] = 0; + $_SESSION['per_page'] = 10; + $_SESSION['cari'] = ''; + $_SESSION['pengumuman'] = 0; + $_SESSION['sesi'] = "kosong"; + $_SESSION['timeout'] = 0; + + $this->load->view('siteman',$header); + $_SESSION['siteman']=0; + } + function auth(){ + $this->config_model->do_reg(); + $this->user_model->siteman(); + redirect('main'); + } + function login(){ + $this->user_model->logout(); + redirect('siteman'); + } +} \ No newline at end of file diff --git a/app/controllers/Sms.php b/app/controllers/Sms.php new file mode 100644 index 000000000..9ab5a5fab --- /dev/null +++ b/app/controllers/Sms.php @@ -0,0 +1,624 @@ +load->model('user_model'); + $this->load->model('sms_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('penduduk_model'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['cari1']); + unset($_SESSION['sex1']); + unset($_SESSION['dusun1']); + unset($_SESSION['rw1']); + unset($_SESSION['rt1']); + unset($_SESSION['agama1']); + unset($_SESSION['pekerjaan1']); + unset($_SESSION['status1']); + unset($_SESSION['pendidikan1']); + unset($_SESSION['status_penduduk1']); + unset($_SESSION['TextDecoded1']); + unset($_SESSION['grup1']); + redirect('sms'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->sms_model->paging($p,$o); + $data['main'] = $this->sms_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->sms_model->autocomplete(); + $header = $this->header_model->get_data(); + $menu['act']='0'; + + $this->load->view('header', $header); + $this->load->view('sms/nav',$menu); + $this->load->view('sms/manajemen_sms_table',$data); + $this->load->view('footer'); + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['cari1']); + unset($_SESSION['sex1']); + unset($_SESSION['dusun1']); + unset($_SESSION['rw1']); + unset($_SESSION['rt1']); + unset($_SESSION['agama1']); + unset($_SESSION['pekerjaan1']); + unset($_SESSION['status1']); + unset($_SESSION['pendidikan1']); + unset($_SESSION['status_penduduk1']); + unset($_SESSION['TextDecoded1']); + unset($_SESSION['grup1']); + } + function setting($p=1,$o=0){ + $data['main'] = $this->sms_model->get_autoreply(); + $data['form_action'] = site_url("sms/insert_autoreply"); + $header = $this->header_model->get_data(); + $menu['act']='1'; + + $this->load->view('header', $header); + $this->load->view('sms/nav',$menu); + $this->load->view('sms/setting',$data); + $this->load->view('footer'); + } + function insert_autoreply(){ + $this->sms_model->insert_autoreply(); + redirect('sms/setting'); + } + function polling($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari_polling'])) + $data['cari_polling'] = $_SESSION['cari_polling']; + else $data['cari_polling'] = ''; + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->sms_model->paging_polling($p,$o); + $data['main'] = $this->sms_model->list_data_polling($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->sms_model->autocomplete(); + $header = $this->header_model->get_data(); + $menu['act']='3'; + + $this->load->view('header', $header); + $this->load->view('sms/nav',$menu); + $this->load->view('sms/polling',$data); + $this->load->view('footer'); + } + function outbox($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->sms_model->paging_terkirim($p,$o); + $data['main'] = $this->sms_model->list_data_terkirim($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->sms_model->autocomplete(); + $header = $this->header_model->get_data(); + $menu['act']='0'; + + $this->load->view('header', $header); + $this->load->view('sms/nav',$menu); + $this->load->view('sms/create_sms',$data); + $this->load->view('footer'); + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['cari1']); + unset($_SESSION['sex1']); + unset($_SESSION['dusun1']); + unset($_SESSION['rw1']); + unset($_SESSION['rt1']); + unset($_SESSION['agama1']); + unset($_SESSION['pekerjaan1']); + unset($_SESSION['status1']); + unset($_SESSION['pendidikan1']); + unset($_SESSION['status_penduduk1']); + unset($_SESSION['TextDecoded1']); + unset($_SESSION['grup1']); + } + function sentitem($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->sms_model->paging_terkirim($p,$o); + $data['main'] = $this->sms_model->list_data_terkirim($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->sms_model->autocomplete(); + $header = $this->header_model->get_data(); + $menu['act']='0'; + + $this->load->view('header', $header); + $this->load->view('sms/nav',$menu); + $this->load->view('sms/berita_terkirim',$data); + $this->load->view('footer'); + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['cari1']); + unset($_SESSION['sex1']); + unset($_SESSION['dusun1']); + unset($_SESSION['rw1']); + unset($_SESSION['rt1']); + unset($_SESSION['agama1']); + unset($_SESSION['pekerjaan1']); + unset($_SESSION['status1']); + unset($_SESSION['pendidikan1']); + unset($_SESSION['status_penduduk1']); + unset($_SESSION['TextDecoded1']); + unset($_SESSION['grup1']); + } + function pending($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->sms_model->paging_tertunda($p,$o); + $data['main'] = $this->sms_model->list_data_tertunda($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->sms_model->autocomplete(); + $header = $this->header_model->get_data(); + $menu['act']='0'; + + $this->load->view('header', $header); + $this->load->view('sms/nav',$menu); + $this->load->view('sms/pesan_tertunda',$data); + $this->load->view('footer'); + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['cari1']); + unset($_SESSION['sex1']); + unset($_SESSION['dusun1']); + unset($_SESSION['rw1']); + unset($_SESSION['rt1']); + unset($_SESSION['agama1']); + unset($_SESSION['pekerjaan1']); + unset($_SESSION['status1']); + unset($_SESSION['pendidikan1']); + unset($_SESSION['status_penduduk1']); + unset($_SESSION['TextDecoded1']); + unset($_SESSION['grup1']); + } + function form($p=1,$o=0,$tipe=0,$id=0){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['sms'] = $this->sms_model->get_sms($tipe,$id); + $data['form_action'] = site_url("sms/insert/$tipe"); + $data['tipe']['tipe']=$tipe; + $data['grup'] = $this->sms_model->list_grup(); + $data['kontak'] = $this->sms_model->list_kontak(); + $this->load->view('sms/ajax_sms_form',$data); + } + else{ + $data['sms'] = null; + $data['form_action'] = site_url("sms/insert/$tipe"); + $data['tipe']['tipe']=$tipe; + $data['grup'] = $this->sms_model->list_grup(); + $data['kontak'] = $this->sms_model->list_kontak(); + $this->load->view('sms/ajax_sms_form_kirim',$data); + } + } + function carikontak($tipe=0){ + if(isset($_POST['TextDecoded'])) + $data['text']['TextDecoded']=$_POST['TextDecoded']; + $data['text']['TextDecoded'] = null; + + $data['form_action'] = site_url("sms/formaftercari/0/0/$tipe"); + + $data['kontak'] = $this->sms_model->list_kontak(); + $this->load->view('sms/ajax_sms_form_cari',$data); + } + function formaftercari($tipe=0){ + $data['sms']['DestinationNumber'] = $_POST['kontak']; + $data['sms']['TextDecoded'] = $_POST['text']; + $data['form_action'] = site_url("sms/insert/$tipe"); + $data['tipe']['tipe']=$tipe; + $data['grup'] = $this->sms_model->list_grup(); + $this->load->view('sms/ajax_sms_form',$data); + } + function send_broadcast(){ + $data['input'] = $_POST; + if(isset($_SESSION['cari1'])) + $data['cari1'] = $_SESSION['cari1']; + else $data['cari1'] = ''; + if(isset($_SESSION['sex1'])) + $data['sex1'] = $_SESSION['sex1']; + else $data['sex1'] = ''; + + if(isset($_SESSION['dusun1'])){ + $data['dusun1'] = $_SESSION['dusun1']; + $data['list_rw1'] = $this->penduduk_model->list_rw($data['dusun1']); + + if(isset($_SESSION['rw1'])){ + $data['rw1'] = $_SESSION['rw1']; + $data['list_rt1'] = $this->penduduk_model->list_rt($data['dusun1'],$data['rw11']); + + if(isset($_SESSION['rt1'])) + $data['rt1'] = $_SESSION['rt1']; + else $data['rt1'] = ''; + + }else $data['rw1'] = ''; + + }else $data['dusun1'] = ''; + + if(isset($_SESSION['agama1'])) + $data['agama1'] = $_SESSION['agama1']; + else $data['agama1'] = ''; + if(isset($_SESSION['pekerjaan1'])) + $data['pekerjaan1'] = $_SESSION['pekerjaan1']; + else $data['pekerjaan1'] = ''; + if(isset($_SESSION['status1'])) + $data['status1'] = $_SESSION['status1']; + else $data['status1'] = ''; + if(isset($_SESSION['pendidikan1'])) + $data['pendidikan1'] = $_SESSION['pendidikan1']; + else $data['pendidikan1'] = ''; + if(isset($_SESSION['status_penduduk1'])) + $data['status_penduduk1'] = $_SESSION['status_penduduk1']; + else $data['status_penduduk1'] = ''; + + if(isset($_SESSION['TextDecoded1'])) + $data['TextDecoded1'] = $_SESSION['TextDecoded1']; + else $data['TextDecoded1'] = ''; + if(isset($_SESSION['grup1'])) + $data['grup'] = $_SESSION['grup1']; + else $data['grup1'] = ''; + $data['insert'] = $this->sms_model->send_broadcast($data); + redirect('sms/outbox'); + } + function broadcast_proses(){ + $adv_search = $_POST; + $i=0; + while($i++ < count($adv_search)){ + $col[$i] = key($adv_search); + next($adv_search); + } + $i=0; + while($i++ < count($col)){ + if($adv_search[$col[$i]]=="") + UNSET($adv_search[$col[$i]]); + else + $_SESSION[$col[$i]]=$adv_search[$col[$i]]; + } + + redirect('sms/send_broadcast'); + } + function broadcast(){ + $data['dusun'] = $this->penduduk_model->list_dusun(); + $data['agama'] = $this->penduduk_model->list_agama(); + $data['pendidikan'] = $this->penduduk_model->list_pendidikan(); + $data['pekerjaan'] = $this->penduduk_model->list_pekerjaan(); + $data['grup'] = $this->sms_model->list_grup_kontak(); + $data['form_action'] = site_url("sms/broadcast_proses"); + $this->load->view('sms/ajax_broadcast_form',$data); + } + function ajax_penduduk_rw($dusun=''){ + $rw = $this->penduduk_model->list_rw($dusun); + echo"RW + + "; + } + function ajax_penduduk_rt($dusun='',$rw=''){ + $rt = $this->penduduk_model->list_rt($dusun,$rw); + echo "RT + + "; + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('sms'); + } + function search_kontak(){ + $cari = $this->input->post('cari_kontak'); + if($cari!='') + $_SESSION['cari_kontak']=$cari; + else unset($_SESSION['cari_kontak']); + redirect('sms/kontak'); + + } + function search_grup(){ + $cari = $this->input->post('cari_grup'); + if($cari!='') + $_SESSION['cari_grup']=$cari; + else unset($_SESSION['cari_grup']); + redirect('sms/group'); + } + function search_anggota($id=0){ + $cari = $this->input->post('cari_anggota'); + if($cari!='') + $_SESSION['cari_anggota']=$cari; + else unset($_SESSION['cari_anggota']); + redirect("sms/anggota/$id"); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('sms'); + } + function insert($tipe=0){ + $this->sms_model->insert(); + if($tipe==1){redirect('sms');} + elseif($tipe==2){redirect('sms/sentitem');} + elseif($tipe==3){redirect('sms/pending');} + else{redirect('sms/outbox');} + } + function update($id='',$p=1,$o=0){ + $this->sms_model->update($id); + redirect("sms/index/$p/$o"); + } + function delete($p=1,$o=0,$tipe=0,$id=''){ + $this->sms_model->delete($tipe,$id); + if($tipe==1){redirect('sms');} + elseif($tipe==2){redirect('sms/sentitem');} + elseif($tipe==3){redirect('sms/pending');} + else{redirect('sms/outbox');} + } + function delete_all($p=1,$o=0,$tipe=0){ + $this->sms_model->delete_all($tipe); + if($tipe==1){redirect('sms');} + elseif($tipe==2){redirect('sms/sentitem');} + elseif($tipe==3){redirect('sms/pending');} + else{redirect('sms/outbox');} + } + function sms_lock($id=''){ + $this->sms_model->sms_lock($id,0); + redirect("sms/index/$p/$o"); + } + function sms_unlock($id=''){ + $this->sms_model->sms_lock($id,1); + redirect("sms/index/$p/$o"); + } + function kontak($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari_kontak'])) + $data['cari_kontak'] = $_SESSION['cari_kontak']; + else $data['cari_kontak'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->sms_model->paging_kontak($p,$o); + $data['main'] = $this->sms_model->list_data_kontak($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->sms_model->autocomplete(); + $header = $this->header_model->get_data(); + $menu['act']='2'; + + $this->load->view('header', $header); + $this->load->view('sms/nav',$menu); + $this->load->view('sms/kontak',$data); + $this->load->view('footer'); + unset($_SESSION['cari_kontak']); + } + function form_kontak($id=0){ + $data['nama'] = $this->sms_model->list_nama(); + $data['form_action'] = site_url("sms/kontak_insert"); + $data['kontak'] = $this->sms_model->get_kontak($id); + if($id==0){ + $this->load->view('sms/ajax_kontak_form',$data); + } + else{ + $this->load->view('sms/ajax_kontak_form_edit',$data); + } + } + function kontak_insert(){ + $data['input'] = $_POST; + $data['insert'] = $this->sms_model->insert_kontak($data); + redirect('sms/kontak'); + } + function kontak_delete($id=0){ + $data['hapus'] = $this->sms_model->delete_kontak($id); + redirect('sms/kontak'); + } + function delete_all_kontak(){ + $this->sms_model->delete_all_kontak(); + redirect('sms/kontak'); + } + function group($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari_grup'])) + $data['cari_grup'] = $_SESSION['cari_grup']; + else $data['cari_grup'] = ''; + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->sms_model->paging_grup($p,$o); + $data['main'] = $this->sms_model->list_data_grup($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->sms_model->autocomplete(); + $header = $this->header_model->get_data(); + $menu['act']='2'; + + $this->load->view('header', $header); + $this->load->view('sms/nav',$menu); + $this->load->view('sms/group',$data); + $this->load->view('footer'); + unset($_SESSION['cari_grup']); + } + function form_grup($id=0){ + if($id=="0"){ + $data['form_action'] = site_url("sms/grup_insert"); + $data['grup']['nama_grup'] = ""; + }else{ + $data['form_action'] = site_url("sms/grup_update"); + $data['grup'] = $this->sms_model->get_grup($id); + } + $this->load->view('sms/ajax_grup_form',$data); + } + function grup_insert(){ + $data['input'] = $_POST; + $data['insert'] = $this->sms_model->insert_grup($data); + redirect('sms/group'); + } + function grup_update(){ + $data['input'] = $_POST; + $data['update'] = $this->sms_model->update_grup($data); + redirect('sms/group'); + } + function grup_delete($id=0){ + $data['hapus'] = $this->sms_model->delete_grup($id); + redirect('sms/group'); + } + function delete_all_grup(){ + $this->sms_model->delete_all_grup(); + redirect('sms/group'); + } + function anggota($id=0,$p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari_anggota'])) + $data['cari_anggota'] = $_SESSION['cari_anggota']; + else $data['cari_anggota'] = ''; + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->sms_model->paging_anggota($id,$p,$o); + $data['main'] = $this->sms_model->list_data_anggota($id,$o, $data['paging']->offset, $data['paging']->per_page); + $data['grup']['nama_grup']=$id; + $data['keyword'] = $this->sms_model->autocomplete(); + $header = $this->header_model->get_data(); + $menu['act']='2'; + + $this->load->view('header', $header); + $this->load->view('sms/nav',$menu); + $this->load->view('sms/group_detail',$data); + $this->load->view('footer'); + unset($_SESSION['cari_anggota']); + } + function form_anggota($id=0){ + $data['form_action'] = site_url("sms/anggota_insert/$id"); + $data['main'] = $this->sms_model->list_data_nama($id); + $this->load->view('sms/ajax_anggota_form',$data); + } + function anggota_insert($id=0){ + $data['insert'] = $this->sms_model->insert_anggota($id); + redirect("sms/anggota/$id"); + } + function anggota_delete($grup=0,$id=0){ + $data['hapus'] = $this->sms_model->delete_anggota($grup,$id); + redirect("sms/anggota/$grup"); + } + function delete_all_anggota($grup=0){ + $this->sms_model->delete_all_anggota($grup); + redirect("sms/anggota/$grup"); + } + function form_polling($id=0){ + + $data['main'] = $this->sms_model->get_data_polling($id); + + $data['form_action'] = site_url("sms/insert_polling/$id"); + $this->load->view('sms/ajax_polling_form',$data); + } + function insert_polling($id=0){ + $data['insert'] = $this->sms_model->insert_polling($id); + redirect("sms/polling"); + } + function polling_delete($id=0){ + $data['hapus'] = $this->sms_model->delete_polling($id); + redirect("sms/polling"); + } + function delete_all_polling(){ + $this->sms_model->delete_all_polling(); + redirect("sms/polling"); + } + function pertanyaan($id=0,$p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->sms_model->paging_pertanyaan($id,$p,$o); + $data['main'] = $this->sms_model->list_data_pertanyaan($id,$o, $data['paging']->offset, $data['paging']->per_page); + $data['polling']['id_polling']=$id; + $data['keyword'] = $this->sms_model->autocomplete(); + $header = $this->header_model->get_data(); + $menu['act']='2'; + + $this->load->view('header', $header); + $this->load->view('sms/nav',$menu); + $this->load->view('sms/pertanyaan',$data); + $this->load->view('footer'); + } + function form_pertanyaan($id=0){ + $data['form_action'] = site_url("sms/pertanyaan_insert/$id"); + $this->load->view('sms/ajax_pertanyaan_form',$data); + } + function pertanyaan_insert($id=0){ + $data['insert'] = $this->sms_model->insert_pertanyaan($id); + redirect("sms/pertanyaan/$id"); + } +} \ No newline at end of file diff --git a/app/controllers/Sosmed.php b/app/controllers/Sosmed.php new file mode 100644 index 000000000..6bee62486 --- /dev/null +++ b/app/controllers/Sosmed.php @@ -0,0 +1,83 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('web_sosmed_model'); + } + function index(){ + $data['main'] = $this->web_sosmed_model->get_sosmed(1); + $id=$data['main']['id']; + $data['form_action'] = site_url("sosmed/update/1"); + $header = $this->header_model->get_data(); + $nav['act']=6; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('sosmed/facebook',$data); + $this->load->view('footer'); + } + function twitter(){ + $data['main'] = $this->web_sosmed_model->get_sosmed(2); + $id=$data['main']['id']; + $data['form_action'] = site_url("sosmed/update/2/$id"); + $header = $this->header_model->get_data(); + $nav['act']=6; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('sosmed/twitter',$data); + $this->load->view('footer'); + } + function instagram(){ + $data['main'] = $this->web_sosmed_model->get_sosmed(5); + $data['form_action'] = site_url("sosmed/update/5"); + $header = $this->header_model->get_data(); + $nav['act']=6; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('sosmed/google',$data); + $this->load->view('footer'); + } + function google(){ + $data['main'] = $this->web_sosmed_model->get_sosmed(3); + $data['form_action'] = site_url("sosmed/update/3"); + $header = $this->header_model->get_data(); + $nav['act']=6; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('sosmed/instagram',$data); + $this->load->view('footer'); + } + function youtube(){ + $data['main'] = $this->web_sosmed_model->get_sosmed(4); + $data['form_action'] = site_url("sosmed/update/4"); + $header = $this->header_model->get_data(); + $nav['act']=6; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('sosmed/youtube',$data); + $this->load->view('footer'); + } + function update($id=''){ + $this->web_sosmed_model->update($id); + if($id=='1'){ + redirect("sosmed"); + }elseif($id=='2'){ + redirect("sosmed/twitter"); + }elseif($id=='3'){ + redirect("sosmed/google"); + }elseif($id=='4'){ + redirect("sosmed/youtube"); + }else{ + redirect("sosmed/instagram"); + } + } +} \ No newline at end of file diff --git a/app/controllers/Statistik.php b/app/controllers/Statistik.php new file mode 100644 index 000000000..25cdc2e2c --- /dev/null +++ b/app/controllers/Statistik.php @@ -0,0 +1,317 @@ +load->model('user_model'); + $this->load->model('laporan_penduduk_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); + $this->load->model('header_model'); + $_SESSION['per_page']= 500; + } + function index($lap=0,$o=0){ + $data['main'] = $this->laporan_penduduk_model->list_data($lap,$o); + $data['lap']=$lap; + $data['o']=$o; + + switch($lap){ + case 0: $data['stat'] = "Pendidikan dalam KK"; break; + case 1: $data['stat'] = "Pekerjaan"; break; + case 2: $data['stat'] = "Status Perkawinan"; break; + case 3: $data['stat'] = "Agama"; break; + case 4: $data['stat'] = "Jenis Kelamin"; break; + case 5: $data['stat'] = "Warga Negara"; break; + case 6: $data['stat'] = "Status"; break; + case 7: $data['stat'] = "Golongan Darah"; break; + case 9: $data['stat'] = "Cacat"; break; + case 10: $data['stat'] = "Sakit Menahun"; break; + case 11: $data['stat'] = "Jamkesmas"; break; + case 13: $data['stat'] = "Umur (Detail)"; break; + case 15: $data['stat'] = "Umur"; break; + case 14: $data['stat'] = "Pendidikan Sedang Ditempuh"; break; + case 21: $data['stat'] = "Klasifikasi Sosial"; break; + case 22: $data['stat'] = "Penerima Raskin"; break; + case 23: $data['stat'] = "Penerima BLT"; break; + case 24: $data['stat'] = "Penerima BOS"; break; + case 25: $data['stat'] = "Penerima PKH"; break; + case 26: $data['stat'] = "Penerima Jampersal"; break; + case 27: $data['stat'] = "Penerima Bedah Rumah"; break; + default:$data['stat'] = "Pendidikan"; + } + + $nav['act']= 0; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('statistik/nav',$nav); + $this->load->view('statistik/penduduk',$data); + $this->load->view('footer'); + } + + function clear(){ + unset($_SESSION['log']); + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['sex']); + unset($_SESSION['warganegara']); + unset($_SESSION['cacat']); + unset($_SESSION['menahun']); + unset($_SESSION['golongan_darah']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['agama']); + unset($_SESSION['umur_min']); + unset($_SESSION['umur_max']); + unset($_SESSION['pekerjaan_id']); + unset($_SESSION['status']); + unset($_SESSION['pendidikan_id']); + unset($_SESSION['status_penduduk']); + redirect('statistik'); + } + function graph($lap=0){ + $data['main'] = $this->laporan_penduduk_model->list_data($lap); + $data['lap']=$lap; + + + switch($lap){ + case 1: $data['stat'] = "Pekerjaan"; break; + case 2: $data['stat'] = "Status Perkawinan"; break; + case 3: $data['stat'] = "Agama"; break; + case 4: $data['stat'] = "Jenis Kelamin"; break; + case 5: $data['stat'] = "Warga Negara"; break; + case 6: $data['stat'] = "Status Kependudukan"; break; + case 7: $data['stat'] = "Golongan Darah"; break; + case 9: $data['stat'] = "Difabilitas (Cacat)"; break; + case 10: $data['stat'] = "Sakit Menahun"; break; + case 11: $data['stat'] = "Jamkesmas"; break; + case 0: $data['stat'] = "Pendidikan dalam KK"; break; + case 13: $data['stat'] = "Umur (Detail)"; break; + case 15: $data['stat'] = "Umur"; break; + case 14: $data['stat'] = "Pendidikan Sedang Ditempuh"; break; + case 21: $data['stat'] = "Klasifikasi Sosial"; break; + case 22: $data['stat'] = "Penerima Raskin"; break; + case 23: $data['stat'] = "Penerima BLT"; break; + case 24: $data['stat'] = "Penerima BOS"; break; + case 25: $data['stat'] = "Penerima PKH"; break; + case 26: $data['stat'] = "Penerima Jampersal"; break; + case 27: $data['stat'] = "Penerima Bedah Rumah"; break; + default:$data['stat'] = "Pendidikan"; + } + + $nav['act']= 0; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('statistik/nav',$nav); + $this->load->view('statistik/penduduk_graph',$data); + $this->load->view('footer'); + } + + function pie($lap=0){ + $data['main'] = $this->laporan_penduduk_model->list_data($lap); + $data['lap']=$lap; + + + switch($lap){ + case 0: $data['stat'] = "Pendidikan Telah Ditempuh"; break; + case 1: $data['stat'] = "Pekerjaan"; break; + case 2: $data['stat'] = "Status Perkawinan"; break; + case 3: $data['stat'] = "Agama"; break; + case 4: $data['stat'] = "Jenis Kelamin"; break; + case 5: $data['stat'] = "Warga Negara"; break; + case 6: $data['stat'] = "Status"; break; + case 7: $data['stat'] = "Golongan Darah"; break; + case 9: $data['stat'] = "Cacat"; break; + case 10: $data['stat'] = "Sakit Menahun"; break; + case 11: $data['stat'] = "Jamkesmas"; break; + case 12: $data['stat'] = "Pendidikan dalam KK"; break; + case 13: $data['stat'] = "Umur (Detail)"; break; + case 15: $data['stat'] = "Umur"; break; + case 14: $data['stat'] = "Pendidikan Sedang Ditempuh"; break; + case 21: $data['stat'] = "Klasifikasi Sosial"; break; + case 22: $data['stat'] = "Penerima Raskin"; break; + case 23: $data['stat'] = "Penerima BLT"; break; + case 24: $data['stat'] = "Penerima BOS"; break; + case 25: $data['stat'] = "Penerima PKH"; break; + case 26: $data['stat'] = "Penerima Jampersal"; break; + case 27: $data['stat'] = "Penerima Bedah Rumah"; break; + default:$data['stat'] = "Pendidikan"; + } + + $nav['act']= 0; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('statistik/nav',$nav); + $this->load->view('statistik/penduduk_pie',$data); + $this->load->view('footer'); + } + + function cetak($lap=0){ + $data['lap']=$lap; + switch($lap){ + case 0: $data['stat'] = "Pendidikan Telah Ditempuh"; break; + case 1: $data['stat'] = "Pekerjaan"; break; + case 2: $data['stat'] = "Status Perkawinan"; break; + case 3: $data['stat'] = "Agama"; break; + case 4: $data['stat'] = "Jenis Kelamin"; break; + case 5: $data['stat'] = "Warga Negara"; break; + case 6: $data['stat'] = "Status"; break; + case 7: $data['stat'] = "Golongan Darah"; break; + case 9: $data['stat'] = "Cacat"; break; + case 10: $data['stat'] = "Sakit Menahun"; break; + case 11: $data['stat'] = "Jamkesmas"; break; + case 12: $data['stat'] = "Pendidikan dalam KK"; break; + case 13: $data['stat'] = "Umur"; break; + case 14: $data['stat'] = "Pendidikan Sedang Ditempuh"; break; + case 21: $data['stat'] = "Klasifikasi Sosial"; break; + case 22: $data['stat'] = "Penerima Raskin"; break; + case 23: $data['stat'] = "Penerima BLT"; break; + case 24: $data['stat'] = "Penerima BOS"; break; + case 25: $data['stat'] = "Penerima PKH"; break; + case 26: $data['stat'] = "Penerima Jampersal"; break; + case 27: $data['stat'] = "Penerima Bedah Rumah"; break; + default:$data['stat'] = "Pendidikan"; + } + + $data['config'] = $this->laporan_penduduk_model->get_config(); + $data['main'] = $this->laporan_penduduk_model->list_data($lap); + $this->load->view('statistik/penduduk_print',$data); + } + function excel($lap=0){ + $data['lap']=$lap; + switch($lap){ + case 0: $data['stat'] = "Pendidikan Telah Ditempuh"; break; + case 1: $data['stat'] = "Pekerjaan"; break; + case 2: $data['stat'] = "Status Perkawinan"; break; + case 3: $data['stat'] = "Agama"; break; + case 4: $data['stat'] = "Jenis Kelamin"; break; + case 5: $data['stat'] = "Warga Negara"; break; + case 6: $data['stat'] = "Status"; break; + case 7: $data['stat'] = "Golongan Darah"; break; + case 9: $data['stat'] = "Cacat"; break; + case 10: $data['stat'] = "Sakit Menahun"; break; + case 11: $data['stat'] = "Jamkesmas"; break; + case 12: $data['stat'] = "Pendidikan dalam KK"; break; + case 13: $data['stat'] = "Umur"; break; + case 14: $data['stat'] = "Pendidikan Sedang Ditempuh"; break; + case 21: $data['stat'] = "Klasifikasi Sosial"; break; + case 22: $data['stat'] = "Penerima Raskin"; break; + case 23: $data['stat'] = "Penerima BLT"; break; + case 24: $data['stat'] = "Penerima BOS"; break; + case 25: $data['stat'] = "Penerima PKH"; break; + case 26: $data['stat'] = "Penerima Jampersal"; break; + case 27: $data['stat'] = "Penerima Bedah Rumah"; break; + default:$data['stat'] = "Pendidikan"; + } + + $data['config'] = $this->laporan_penduduk_model->get_config(); + $data['main'] = $this->laporan_penduduk_model->list_data($lap); + $this->load->view('statistik/penduduk_excel',$data); + } + function warga($lap='',$data=''){ + $data['lap']=$lap; + switch($lap){ + case 0: $data['stat'] = "Pendidikan Telah Ditempuh"; break; + case 1: $data['stat'] = "Pekerjaan"; break; + case 2: $data['stat'] = "Status Perkawinan"; break; + case 3: $data['stat'] = "Agama"; break; + case 4: $data['stat'] = "Jenis Kelamin"; break; + case 5: $data['stat'] = "Warga Negara"; break; + case 6: $data['stat'] = "Status"; break; + case 7: $data['stat'] = "Golongan Darah"; break; + case 9: $data['stat'] = "Cacat"; break; + case 10: $data['stat'] = "Sakit Menahun"; break; + case 11: $data['stat'] = "Jamkesmas"; break; + case 12: $data['stat'] = "Pendidikan dalam KK"; break; + case 13: $data['stat'] = "Umur"; break; + case 14: $data['stat'] = "Pendidikan Sedang Ditempuh"; break; + case 21: $data['stat'] = "Klasifikasi Sosial"; break; + case 22: $data['stat'] = "Penerima Raskin"; break; + case 23: $data['stat'] = "Penerima BLT"; break; + case 24: $data['stat'] = "Penerima BOS"; break; + case 25: $data['stat'] = "Penerima PKH"; break; + case 26: $data['stat'] = "Penerima Jampersal"; break; + case 27: $data['stat'] = "Penerima Bedah Rumah"; break; + default:$data['stat'] = "Pendidikan"; + } + + $data['config'] = $this->laporan_penduduk_model->get_config(); + $data['main'] = $this->laporan_penduduk_model->list_data($lap); + + $_SESSION['per_page'] = 100; + $_SESSION['data'] = $data; + redirect("sid_penduduk/index/"); + } + function rentang_umur(){ + $data['lap']=13; + $data['main'] = $this->laporan_penduduk_model->list_data_rentang(); + $header = $this->header_model->get_data(); + $menu['act']='2'; + + $this->load->view('header', $header); + //$this->load->view('statistik/menu'); + $this->load->view('statistik/nav',$menu); + $this->load->view('statistik/rentang_umur',$data); + $this->load->view('footer'); + } + function form_rentang($id=0){ + if($id==0){ + $data['form_action'] = site_url("statistik/rentang_insert"); + $data['rentang']= $this->laporan_penduduk_model->get_rentang_terakhir(); + $data['rentang']['nama']=""; + $data['rentang']['sampai']=""; + } + else{ + $data['form_action'] = site_url("statistik/rentang_update/$id"); + $data['rentang'] = $this->laporan_penduduk_model->get_rentang($id); + } + $this->load->view('statistik/ajax_rentang_form',$data); + + } + function rentang_insert(){ + $data['insert'] = $this->laporan_penduduk_model->insert_rentang(); + redirect('statistik/rentang_umur'); + } + function rentang_update($id=0){ + $this->laporan_penduduk_model->update_rentang($id); + redirect('statistik/rentang_umur'); + } + function rentang_delete($id=0){ + $this->laporan_penduduk_model->delete_rentang($id); + redirect('statistik/rentang_umur'); + } + function delete_all_rentang(){ + $this->laporan_penduduk_model->delete_all_rentang(); + redirect('statistik/rentang_umur'); + } +} \ No newline at end of file diff --git a/app/controllers/Surat.php b/app/controllers/Surat.php new file mode 100644 index 000000000..14218124c --- /dev/null +++ b/app/controllers/Surat.php @@ -0,0 +1,122 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('penduduk_model'); + $this->load->model('surat_model'); + $this->load->model('surat_keluar_model'); + } + function index(){ + unset($_SESSION['nik']); + unset($_SESSION['nik_ayah']); + unset($_SESSION['nik_ibu']); + $header = $this->header_model->get_data(); + $data['menu_surat'] = $this->surat_model->list_surat(); + $data['menu_surat2'] = $this->surat_model->list_surat2(); + $data['surat_favorit'] = $this->surat_model->list_surat_fav(); + + $this->load->view('header', $header); + $nav['act']= 1; + + $this->load->view('surat/nav',$nav); + $this->load->view('surat/format_surat',$data); + $this->load->view('footer'); + } + function panduan(){ + $header = $this->header_model->get_data(); + $this->load->view('header', $header); + $nav['act']= 4; + + $this->load->view('surat/nav',$nav); + $this->load->view('surat/panduan'); + $this->load->view('footer'); + } + function form($url=''){ + $data['url']=$url; + if(isset($_POST['nik'])) + $_SESSION['nik'] = $_POST['nik']; + + if(isset($_POST['nik_ayah'])) + $_SESSION['nik_ayah'] = $_POST['nik_ayah']; + + if(isset($_POST['nik_ibu'])) + $_SESSION['nik_ibu'] = $_POST['nik_ibu']; + + if(isset($_SESSION['nik'])){ + $data['individu']=$this->surat_model->get_penduduk($_SESSION['nik']); + $data['ayah']=$this->surat_model->get_penduduk($_SESSION['nik_ayah']); + $data['ibu']=$this->surat_model->get_penduduk($_SESSION['nik_ibu']); + $data['anggota']=$this->surat_model->list_anggota($data['individu']['id_kk'],$data['individu']['nik']); + $data['list_dokumen'] = $this->penduduk_model->list_dokumen($_SESSION['nik']); + }else{ + $data['individu']=NULL; + $data['ayah']=NULL; + $data['ibu']=NULL; + $data['anggota']=NULL; + $data['list_dokumen'] = null; + } + $data['penduduk'] = $this->surat_model->list_penduduk(); + $data['pamong'] = $this->surat_model->list_pamong(); + + $data['form_action'] = site_url("surat/cetak/$url"); + $data['form_action2'] = site_url("surat/doc/$url"); + $nav['act']= 1; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + + $this->load->view('surat/nav',$nav); + $this->load->view("surat/form/$url",$data); + $this->load->view('footer'); + } + + function cetak($url=''){ + + $f=$url; + $g=$_POST['pamong']; + $u=$_SESSION['user']; + $z=$_POST['nomor']; + + + $id = $_POST['nik']; + $data['input'] = $_POST; + $data['tanggal_sekarang'] = tgl_indo(date("Y m d")); + + $data['data'] = $this->surat_model->get_data_surat($id); + $data['ayah'] = $this->surat_model->get_data_suami($id); + + $data['pribadi'] = $this->surat_model->get_data_pribadi($id); + $data['kk'] = $this->surat_model->get_data_kk($id); + + $data['desa'] = $this->surat_model->get_data_desa(); + $data['pamong'] = $this->surat_model->get_pamong($_POST['pamong']); + + $data['pengikut']=$this->surat_model->pengikut(); + $this->surat_keluar_model->log_surat($f,$id,$g,$u,$z); + $this->load->view("surat/print/print_".$url."",$data); + } + function doc($url=''){ + + $format = $this->surat_model->get_surat($url); + $f = $format['id']; + $g=$_POST['pamong']; + $u=$_SESSION['user']; + $z=$_POST['nomor']; + + $id = $_POST['nik']; + $this->surat_keluar_model->log_surat($f,$id,$g,$u,$z); + + $this->surat_model->coba($url); + } + function search(){ + $cari = $this->input->post('nik'); + if($cari!='') + redirect("surat/form/$cari"); + else + redirect('surat'); + } +} \ No newline at end of file diff --git a/app/controllers/Surat_master.php b/app/controllers/Surat_master.php new file mode 100644 index 000000000..e504b1a84 --- /dev/null +++ b/app/controllers/Surat_master.php @@ -0,0 +1,184 @@ +load->model('surat_master_model'); + $this->load->model('user_model'); + $this->load->model('header_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1) redirect('siteman'); + } + function clear($id=0){ + $_SESSION['per_page']=20; + $_SESSION['surat']=$id; + unset($_SESSION['cari']); + unset($_SESSION['filter']); + unset($_SESSION['tipe']); + unset($_SESSION['kategori']); + redirect('surat_master'); + } + function index($p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->surat_master_model->paging($p,$o); + $data['main'] = $this->surat_master_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->surat_master_model->autocomplete(); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $nav['act']=3; + $this->load->view('surat/nav',$nav); + $this->load->view('surat_master/table',$data); + $this->load->view('footer'); + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if($id){ + $data['surat_master'] = $this->surat_master_model->get_surat_format($id); + $data['form_action'] = site_url("surat_master/update/$p/$o/$id"); + } + + else{ + $data['surat_master'] = null; + $data['form_action'] = site_url("surat_master/insert"); + } + + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $nav['act']=3; + $this->load->view('surat/nav',$nav); + $this->load->view('surat_master/form',$data); + $this->load->view('footer'); + } + function form_upload($p=1,$o=0,$url=''){ + $data['form_action'] = site_url("surat_master/upload/$p/$o/$url"); + $this->load->view('surat_master/ajax-upload',$data); + } + function atribut($id=''){ + $data['surat_master'] = $this->surat_master_model->get_surat_format($id); + $data['surat'] = $this->surat_master_model->get_surat_format(); + $data['main'] = $this->surat_master_model->list_atribut($id); + + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $nav['act']=3; + $this->load->view('surat/nav',$nav); + $this->load->view('surat_master/atribut/table',$data); + $this->load->view('footer'); + } + function form_parameter($in='',$id=''){ + if($id){ + $data['analisis_parameter'] = $this->surat_master_model->get_analisis_parameter($id); + $data['form_action'] = site_url("surat_master/p_update/$in/$id"); + } + + else{ + $data['analisis_parameter'] = null; + $data['form_action'] = site_url("surat_master/p_insert/$in"); + } + + $data['surat'] = $this->surat_master_model->get_surat(); + $data['surat_master'] = $this->surat_master_model->get_surat_master($in); + + // $this->load->view('header', $header); + // $this->load->view('surat/nav'); + $this->load->view('surat_master/atribut/ajax_form',$data); + // $this->load->view('footer'); + } + function menu($id=''){ + $data['surat_master'] = $this->surat_master_model->get_surat_master($id); + + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $this->load->view('surat/nav'); + $this->load->view('surat_master/menu',$data); + $this->load->view('footer'); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('surat_master'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('surat_master'); + } + function tipe(){ + $filter = $this->input->post('tipe'); + if($filter!=0) + $_SESSION['tipe']=$filter; + else unset($_SESSION['tipe']); + redirect('surat_master'); + } + function kategori(){ + $filter = $this->input->post('kategori'); + if($filter!=0) + $_SESSION['kategori']=$filter; + else unset($_SESSION['kategori']); + redirect('surat_master'); + } + function insert(){ + $this->surat_master_model->insert(); + redirect('surat_master'); + } + function update($p=1,$o=0,$id=''){ + $this->surat_master_model->update($id); + redirect("surat_master/index/$p/$o"); + } + function upload($p=1,$o=0,$url=''){ + $this->surat_master_model->upload($url); + redirect("surat_master/index/$p/$o"); + } + function delete($p=1,$o=0,$id=''){ + $this->surat_master_model->delete($id); + redirect("surat_master/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->surat_master_model->delete_all(); + redirect("surat_master/index/$p/$o"); + } + function p_insert($in=''){ + $this->surat_master_model->p_insert($in); + redirect("surat_master/atribut/$in"); + } + function p_update($in='',$id=''){ + $this->surat_master_model->p_update($id); + redirect("surat_master/atribut/$in"); + } + function p_delete($in='',$id=''){ + $this->surat_master_model->p_delete($id); + redirect("surat_master/atribut/$in"); + } + function p_delete_all(){ + $this->surat_master_model->p_delete_all(); + redirect("surat_master/atribut/$in"); + } + function lock($id=0,$k=0){ + $this->surat_master_model->lock($id,$k); + redirect("surat_master"); + } + function favorit($id=0,$k=0){ + $this->surat_master_model->favorit($id,$k); + redirect("surat_master"); + } +} \ No newline at end of file diff --git a/app/controllers/User_setting.php b/app/controllers/User_setting.php new file mode 100644 index 000000000..f4ef066ef --- /dev/null +++ b/app/controllers/User_setting.php @@ -0,0 +1,27 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=(1 OR 2 OR 3 OR 4 OR 5)) redirect('login'); + $this->load->model('header_model'); + } + function index(){ + $id = $_SESSION['user']; + $header = $this->header_model->get_data(); + //$this->load->view('header', $header); + + $header = $this->header_model->get_data(); + $data['main'] = $this->user_model->get_user($id); + + $this->load->view('setting', $data); + //$this->load->view('footer'); + + } + function update($id=''){ + $this->user_model->update_setting($id); + redirect("main"); + } +} \ No newline at end of file diff --git a/app/controllers/Web.php b/app/controllers/Web.php new file mode 100644 index 000000000..3706ca0ce --- /dev/null +++ b/app/controllers/Web.php @@ -0,0 +1,140 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3 AND $grup!=4) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('web_artikel_model'); + } + function clear(){ + unset($_SESSION['cari']); + unset($_SESSION['filter']); + redirect('web'); + } + function pager($cat=1){ + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + redirect("web/index/$cat"); + } + function index($cat=1,$p=1,$o=0){ + $data['p'] = $p; + $data['o'] = $o; + $data['cat'] = $cat; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['paging'] = $this->web_artikel_model->paging($cat,$p,$o); + $data['main'] = $this->web_artikel_model->list_data($cat,$o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->web_artikel_model->autocomplete(); + $data['list_kategori'] = $this->web_artikel_model->list_kategori(); + $data['kategori'] = $this->web_artikel_model->get_kategori($cat); + $data['cat'] = $cat; + $header = $this->header_model->get_data(); + $nav['act']=0; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('web/artikel/table',$data); + $this->load->view('footer'); + } + function form($cat=1,$p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + $data['cat'] = $cat; + + if($id){ + $data['artikel'] = $this->web_artikel_model->get_artikel($id); + $data['form_action'] = site_url("web/update/$cat/$id/$p/$o"); + } + else{ + $data['artikel'] = null; + $data['form_action'] = site_url("web/insert/$cat"); + } + + $data['kategori'] = $this->web_artikel_model->get_kategori($cat); + + $header = $this->header_model->get_data(); + + $nav['act']=0; + $this->load->view('header', $header); + //$this->load->view('web/spacer'); + $this->load->view('web/nav',$nav); + if($cat != 1003) + $this->load->view('web/artikel/form',$data); + else + $this->load->view('web/artikel/widget-form',$data); + + $this->load->view('footer'); + } + function search($cat=1){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect("web/index/$cat"); + } + function filter($cat=1){ + $filter = $this->input->post('filter'); + if($filter!=0) + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect("web/index/$cat"); + } + function insert($cat=1){ + $this->web_artikel_model->insert($cat); + redirect("web/index/$cat"); + } + function update($cat=0,$id='',$p=1,$o=0){ + $this->web_artikel_model->update($id); + redirect("web/index/$cat/$p/$o"); + } + function delete($cat=1,$p=1,$o=0,$id=''){ + $this->web_artikel_model->delete($id); + redirect("web/index/$cat/$p/$o"); + } + + function hapus($cat=1,$p=1,$o=0){ + $this->web_artikel_model->hapus($cat); + redirect("web/index/1/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->web_artikel_model->delete_all(); + redirect("web/index/$p/$o"); + } + function artikel_lock($cat=1,$id=0){ + $this->web_artikel_model->artikel_lock($id,1); + redirect("web/index/$cat"); + } + function artikel_unlock($cat=1,$id=0){ + $this->web_artikel_model->artikel_lock($id,2); + redirect("web/index/$cat"); + } + function ajax_add_kategori($cat=1,$p=1,$o=0){ + $data['form_action'] = site_url("web/insert_kategori/$cat/$p/$o"); + $this->load->view('web/artikel/ajax_add_kategori_form',$data); + } + function insert_kategori($cat=1,$p=1,$o=0){ + $this->web_artikel_model->insert_kategori(); + redirect("web/index/$cat/$p/$o"); + } + function headline($cat=1,$p=1,$o=0,$id=0){ + $this->web_artikel_model->headline($id); + redirect("web/index/$cat/$p/$o"); + } + function slide($cat=1,$p=1,$o=0,$id=0){ + $this->web_artikel_model->slide($id); + redirect("web/index/$cat/$p/$o"); + } +} \ No newline at end of file diff --git a/app/controllers/Welcome.php b/app/controllers/Welcome.php new file mode 100644 index 000000000..5f82771b6 --- /dev/null +++ b/app/controllers/Welcome.php @@ -0,0 +1,25 @@ + + * @see https://codeigniter.com/userguide3/general/urls.html + */ + public function index() + { + $this->load->view('welcome_message'); + } +} diff --git a/app/controllers/Widget.php b/app/controllers/Widget.php new file mode 100644 index 000000000..7b496bef4 --- /dev/null +++ b/app/controllers/Widget.php @@ -0,0 +1,44 @@ +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('web_widget_model'); + } + function index(){ + $data['main'] = $this->web_widget_model->get_widget(); + $id=$data['main']['id']; + $data['form_action'] = site_url("web/widget/update/1/$id"); + $header = $this->header_model->get_data(); + $nav['act']=5; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('web/widget/facebook',$data); + $this->load->view('footer'); + } + function twitter(){ + $data['main'] = $this->web_widget_model->get_widget(); + $id=$data['main']['id']; + $data['form_action'] = site_url("web/widget/update/2/$id"); + $header = $this->header_model->get_data(); + $nav['act']=5; + + $this->load->view('header', $header); + $this->load->view('web/nav',$nav); + $this->load->view('web/widget/twitter',$data); + $this->load->view('footer'); + } + function update($tipe='',$id=''){ + $this->web_widget_model->update($id); + if($tipe=='1'){ + redirect("web/widget"); + }else{ + redirect("web/widget/twitter"); + } + } +} \ No newline at end of file diff --git a/app/controllers/index.html b/app/controllers/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/controllers/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/core/index.html b/app/core/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/core/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/helpers/Donjolib_helper.php b/app/helpers/Donjolib_helper.php new file mode 100644 index 000000000..d46e0e1d0 --- /dev/null +++ b/app/helpers/Donjolib_helper.php @@ -0,0 +1,563 @@ += 13){ + $isi = 0; + while($i < $len-12){ + if($str[$i] == 1 AND $len - $i == 14 AND $str[$i+1] != 0){ + $outp = $outp.$belas[$str[$i+1]]; + $i++; + $isi = 1; + } + elseif($str[$i] == 1 AND ($i+1 != $len) AND ($len - $i != 13)){ + $outp = $outp." se".$lipatan[$len-($i+12)]; + $isi = 1; + }elseif($str[$i] > 0){ + $outp = $outp.$satuan[$str[$i]]." ".$lipatan[$len-($i+12)]; + $isi = 1; + } + $i++; + } + if($isi == 1)$outp = $outp." triliyun"; + } + + if($len - $i >= 10){ + $isi = 0; + while($i < $len-9){ + if($str[$i] == 1 AND $len - $i == 11 AND $str[$i+1] != 0){ + $outp = $outp.$belas[$str[$i+1]]; + $isi = 1; + $i++; + } + elseif($str[$i] == 1 AND ($i+1 != $len) AND ($len - $i != 10)){ + $outp = $outp." se".$lipatan[$len-($i+9)]; + $isi = 1; + }elseif($str[$i] > 0){ + $outp = $outp.$satuan[$str[$i]]." ".$lipatan[$len-($i+9)]; + $isi = 1; + } + $i++; + } + if($isi == 1)$outp = $outp." miliyar"; + } + + if($len - $i >= 7){ + $isi = 0; + while($i < $len-6){ + if($str[$i] == 1 AND $len - $i == 8 AND $str[$i+1] != 0){ + $outp = $outp.$belas[$str[$i+1]]; + $i++; + $isi = 1; + } + elseif($str[$i] == 1 AND ($i+1 != $len) AND ($len - $i != 7)){ + $outp = $outp." se".$lipatan[$len-($i+6)]; + $isi = 1; + }elseif($str[$i] > 0){ + $outp = $outp.$satuan[$str[$i]]." ".$lipatan[$len-($i+6)]; + $isi = 1; + } + $i++; + } + if($isi == 1)$outp = $outp." juta"; + } + + if($len - $i >= 4){ + $isi = 0; + while($i < $len-3){ + if($str[$i] == 1 AND $len - $i == 5 AND $str[$i+1] != 0){ + $outp = $outp.$belas[$str[$i+1]]; + $i++; + $isi = 1; + } + elseif($str[$i] == 1 AND ($i+1 != $len)){ + $outp = $outp." se".$lipatan[$len-($i+3)]; + $isi = 1; + }elseif($str[$i] > 0){ + $outp = $outp.$satuan[$str[$i]]." ".$lipatan[$len-($i+3)]; + $isi = 1; + } + $i++; + } + if($isi == 1)$outp = $outp." ribu"; + } + while($i < $len){ + if($str[$i] == 1 AND $len - $i == 2 AND $str[$i+1] != 0){ + $outp = $outp.$belas[$str[$i+1]]." "; + $i++; + } + elseif($str[$i] == 1 AND ($i+1 != $len)){ + $outp = $outp." se".$lipatan[$len-$i]." "; + }else{ + if($str[$i] > 0)$outp = $outp.$satuan[$str[$i]]." ".$lipatan[$len-$i]; + } + $i++; + } + $i++; + $outp2=""; + $len = $len+3; + while($i < ($len)){ + if($str[$i] == 1 AND $len - $i == 2 AND $str[$i+1] != 0){ + $outp2 = $outp2.$belas[$str[$i+1]]." "; + $i++; + } + elseif($str[$i] == 1 AND ($i+1 != $len)){ + $outp2 = $outp2." se".$lipatan[$len-$i]." "; + }else{ + if($str[$i] > 0)$outp2 = $outp2.$satuan[$str[$i]]." ".$lipatan[$len-$i]; + } + $i++; + } + + if($outp2 != "") + $outp = $outp." komah ".$outp2; + $outp = $outp." rupiah"; + $len = strlen($outp); + $outp = substr($outp,1,$len-1); + $outp = "$outp"; + return $outp; +} + + function currents_url() + { + $CI =& get_instance(); + + $url = $CI->config->site_url($CI->uri->uri_string()); + return $_SERVER['QUERY_STRING'] ? $url.'?'.$_SERVER['QUERY_STRING'] : $url; + } + function Parse_Data($data,$p1,$p2){ + $data=" ".$data; + $hasil=""; + $awal=strpos($data,$p1); + if($awal!=""){ + $akhir=strpos(strstr($data,$p1),$p2); + if($akhir!=""){ + $hasil=substr($data,$awal+strlen($p1),$akhir-strlen($p1)); + } + } + return $hasil; + } + function Rupiah($nil=0){ + $nil = $nil + 0; + if(($nil*100)%100 == 0){ + $nil = $nil.".00"; + }elseif(($nil*100)%10 == 0){ + $nil = $nil."0"; + } + $nil = str_replace('.', ',', $nil); + $str1 = $nil; + $str2= ""; + $dot = ""; + $str = strrev($str1); + $arr = str_split($str, 3); + $i=0; + foreach($arr as $str){ + $str2 = $str2.$dot.$str; + if(strlen($str)==3 AND $i>0)$dot = '.'; + $i++; + } + $rp = strrev($str2); + if($rp != "" AND $rp > 0){return "Rp. $rp";}else{return "Rp. 0,00";} + } + function Rupiah2($nil=0){ + $nil = $nil + 0; + if(($nil*100)%100 == 0){ + $nil = $nil.".00"; + }elseif(($nil*100)%10 == 0){ + $nil = $nil."0"; + } + $nil = str_replace('.', ',', $nil); + $str1 = $nil; + $str2= ""; + $dot = ""; + $str = strrev($str1); + $arr = str_split($str, 3); + $i=0; + foreach($arr as $str){ + $str2 = $str2.$dot.$str; + if(strlen($str)==3 AND $i>0)$dot = '.'; + $i++; + } + $rp = strrev($str2); + if($rp != "" AND $rp > 0){return "Rp.$rp";}else{return "-";} + } + function Rupiah3($nil=0){ + $nil = $nil + 0; + if(($nil*100)%100 == 0){ + $nil = $nil.".00"; + }elseif(($nil*100)%10 == 0){ + $nil = $nil."0"; + } + $nil = str_replace('.',',', $nil); + $str1 = $nil; + $str2= ""; + $dot = ""; + $str = strrev($str1); + $arr = str_split($str, 3); + $i=0; + foreach($arr as $str){ + $str2 = $str2.$dot.$str; + if(strlen($str)==3 AND $i>0)$dot = '.'; + $i++; + } + $rp = strrev($str2); + if($rp != 0){return "$rp";}else{return "-";} + } + function jecho($a,$b,$str){ + if($a==$b){ + echo $str; + } + } + function selected($a,$b,$opt=0){ + if($a==$b){ + if($opt) + echo "checked='checked'"; + else echo "selected='selected'"; + } + } + function rev_tgl($tgl){ + $ar=explode('-',$tgl); + $o=$ar[2].'-'.$ar[1].'-'.$ar[0]; + return $o; + } + function penetration($str){ + $str = str_replace("'","-", $str); + return $str; + } + function penetration1($str){ + $str = str_replace("'"," ", $str); + return $str; + } + function unpenetration($str){ + $str = str_replace("-","'", $str); + return $str; + } + function spaceunpenetration($str){ + $str = str_replace("-"," ", $str); + return $str; + } + function underscore($str){ + $str = str_replace(" ","_", $str); + return $str; + } + function ununderscore($str){ + $str = str_replace("_"," ", $str); + return $str; + } + function bulan($bln){ + $nm = ''; + switch($bln){ + case '1': + $nm = 'Januari'; + break; + case '2': + $nm = 'Februari'; + break; + case '3': + $nm = 'Maret'; + break; + case '4': + $nm = 'April'; + break; + case '5': + $nm = 'Mei'; + break; + case '6': + $nm = 'Juni'; + break; + case '7': + $nm = 'Juli'; + break; + case '8': + $nm = 'Agustus'; + break; + case '9': + $nm = 'September'; + break; + case '10': + $nm = 'Oktober'; + break; + case '11': + $nm = 'November'; + break; + case '12': + $nm = 'Desember'; + break; + default: + $nm = ''; + break; + } + return $nm; + } + function nama_bulan($tgl){ + $ar=explode('-',$tgl); + + $nm = ''; + switch($ar[1]){ + case '01': + $nm = 'Januari'; + break; + case '02': + $nm = 'Februari'; + break; + case '03': + $nm = 'Maret'; + break; + case '04': + $nm = 'April'; + break; + case '05': + $nm = 'Mei'; + break; + case '06': + $nm = 'Juni'; + break; + case '07': + $nm = 'Juli'; + break; + case '08': + $nm = 'Agustus'; + break; + case '09': + $nm = 'September'; + break; + case '10': + $nm = 'Oktober'; + break; + case '11': + $nm = 'November'; + break; + case '12': + $nm = 'Desember'; + break; + } + + $o = $ar[0] .' '. $nm .' '. $ar[2]; + return $o; + } + function dua_digit($i){ + if($i<10) $o='0'.$i; + else $o=$i; + return $o; + } + function tiga_digit($i){ + if($i<10) $o='00'.$i; + else if($i<100) $o='0'.$i; + else $o=$i; + return $o; + } + function to_rupiah($inp=''){ + $outp = str_replace('.', '', $inp); + $outp = str_replace(',', '.', $outp); + return $outp; + } + function rp($inp=0){ + return number_format($inp, 2, ',', '.'); + } + function pertumbuhan($a=1,$b=1,$c=1,$d=1){ + $x=0; + $y=0; + $z=0; + if($a>1) $x = (($b-$a)/$a); + if($b>1) $y = (($c-$b)/$b); + if($c>1) $z = (($d-$c)/$c); + $outp = (($x+$y+$z)/3)*100; + $outp = round($outp,2); + $outp = str_replace('.',',',$outp) . ' %';; + return $outp; + } + function koma ($a=1) { + if(substr_count($a, '.')) + $a = str_replace(".", ",",$a); + else $a = number_format($a,0, ',', '.'); + return $a; + } + function tgl_indo2($tgl){ + $tanggal = substr($tgl,8,2); + $jam = substr($tgl,11,8); + $bulan = getBulan(substr($tgl,5,2)); + $tahun = substr($tgl,0,4); + return $tanggal.' '.$bulan.' '.$tahun.' '.$jam.' WIB'; + } + function tgl_indo($tgl){ + $tanggal = substr($tgl,8,2); + $bulan = getBulan(substr($tgl,5,2)); + $tahun = substr($tgl,0,4); + return $tanggal.' '.$bulan.' '.$tahun; + } + function tgl_indo_out($tgl){ + $tanggal = substr($tgl,8,2); + $bulan = substr($tgl,5,2); + $tahun = substr($tgl,0,4); + return $tanggal.'-'.$bulan.'-'.$tahun; + } + function tgl_indo_in($tgl){ + $tanggal = substr($tgl,0,2); + $bulan = substr($tgl,3,2); + $tahun = substr($tgl,6,4); + return $tahun.'-'.$bulan.'-'.$tanggal; + } + + function waktu_ind($time){ + $str =""; + if(($time/360)>1){ + $jam = ($time/360); + $jam = explode('.',$jam); + $str .= $jam." Jam "; + } + if(($time/60)>1){ + $menit = ($time/60); + $menit = explode('.',$menit); + $str .= $menit[0]." Menit "; + } + $detik = $time%60; + $str .= $detik; + + return $str.' Detik'; + } + + function getBulan($bln){ + switch ($bln){ + case 1: + return "Januari"; + break; + case 2: + return "Februari"; + break; + case 3: + return "Maret"; + break; + case 4: + return "April"; + break; + case 5: + return "Mei"; + break; + case 6: + return "Juni"; + break; + case 7: + return "Juli"; + break; + case 8: + return "Agustus"; + break; + case 9: + return "September"; + break; + case 10: + return "Oktober"; + break; + case 11: + return "November"; + break; + case 12: + return "Desember"; + break; + } + } + +function timer(){ + $time=2000; + $_SESSION['timeout']=time()+$time; +} +function generator($length = 7) { + return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length); +} +function hash_password($password=""){ + $password = strrev($password); + $password .= "!#@$#%"; + $password = md5($password); + $password = substr($password,3,19); + return md5($password); +} +function cek_login(){ + $timeout=$_SESSION['timeout']; + if(time()<$timeout){ + timer(); + return true; + }else{ + unset($_SESSION['timeout']); + return false; + } +} +function mandiri_timer(){ + $time=90; + $_SESSION['mandiri_try'] = 4; + $_SESSION['mandiri_wait']=0; + $_SESSION['mandiri_timeout']=time()+$time; +} +function mandiri_timeout(){ + if(!isset($_SESSION['mandiri_timeout'])) + $_SESSION['mandiri_timeout'] = time()-1; + + $timeout=$_SESSION['mandiri_timeout']; + if(time()>$timeout){ + mandiri_timer(); + } +} +function get_identitas(){ + $ci =& get_instance(); + $ci->load->database(); + $sql="SELECT * FROM config"; + $q = $ci->db->query($sql); + $hsl = $q->row_array(); + //$string = "Desa : ".$hsl['nama_desa']." Kec : ".$hsl['nama_kecamatan']." Kab : ".$hsl['nama_kabupaten']; + $string = "

    PEMERINTAH KABUPATEN ".strtoupper($hsl['nama_kabupaten'])."
    KECAMATAN ".strtoupper($hsl['nama_kecamatan'])."
    DESA ".strtoupper($hsl['nama_desa'])."


    "; + return $string; +} +function fixSQL($str, $encode_ent = false) { + $str = @trim($str); if($encode_ent) { $str = htmlentities($str); } + if(version_compare(phpversion(),'4.3.0') >= 0) {if(get_magic_quotes_gpc()) {$str = stripslashes($str);} + if(@mysql_ping()) { $str = mysql_real_escape_string($str);} else {$str = addslashes($str);} + }else {if(!get_magic_quotes_gpc()) {$str = addslashes($str);}} + return $str; +} +function fixTag($varString){ + $isIn = true; $strD=""; + for($i=0;$i<=strlen($varString);$i++){ + $mch = substr($varString,$i,1); + if((ord($mch)==9)||(ord($mch)==10)||(ord($mch)==13)){$mch=" ";} + if($mch=="<"){$isIn=true;} + if($mch==">"){$isIn=false;}else{if($isIn==false){$strD.= $mch;}} + } + return trim($strD); +} +function fTampilTgl($sdate,$edate){ + if($sdate==$edate){ + $tgl = date("j M Y",strtotime($sdate)); + }elseif($edate>$sdate){ + if(date("Y",strtotime($sdate))==date("Y",strtotime($edate))){ + if(date("M Y",strtotime($sdate))==date("M Y",strtotime($edate))){ + if(date("j M Y",strtotime($sdate))==date("j M Y",strtotime($edate))){ + if(date("j M Y H",strtotime($sdate))==date("j M Y H",strtotime($edate))){ + $tgl = date("j M Y H:i",strtotime($sdate)); + }else{ + $tgl = date("j M Y H:i",strtotime($sdate)) ." - ".date("H:i",strtotime($edate)); + } + }else{ + $tgl = date("j",strtotime($sdate))." - ".date("j M Y",strtotime($edate)); + } + }else{ + $tgl = date("j M",strtotime($sdate))." - ".date("j M Y",strtotime($edate)); + } + }else{ + $tgl = date("j M Y",strtotime($sdate))." - ".date("j M Y",strtotime($edate)); + } + } + return $tgl; +} + function hash_pin($pin=""){ + $pin = strrev($pin); + $pin = $pin*77; + $pin .= "!#@$#%"; + $pin = md5($pin); + return $pin; + } \ No newline at end of file diff --git a/app/helpers/Excel_helper.php b/app/helpers/Excel_helper.php new file mode 100644 index 000000000..35ed448c6 --- /dev/null +++ b/app/helpers/Excel_helper.php @@ -0,0 +1,1508 @@ +=4294967294) { + $value=-2; + } + return $value; +} +function gmgetdate($ts = null){ + $k = array('seconds','minutes','hours','mday','wday','mon','year','yday','weekday','month',0); + return(array_comb($k,split(":",gmdate('s:i:G:j:w:n:Y:z:l:F:U',is_null($ts)?time():$ts)))); + } +function array_comb($array1, $array2) { + $out = array(); + foreach ($array1 as $key => $value) { + $out[$value] = $array2[$key]; + } + return $out; +} +function v($data,$pos) { + return ord($data[$pos]) | ord($data[$pos+1])<<8; +} +class OLERead { + var $data = ''; + function OLERead(){ } + function read($sFileName){ + + if(!is_readable($sFileName)) { + $this->error = 1; + return false; + } + $this->data = @file_get_contents($sFileName); + if (!$this->data) { + $this->error = 1; + return false; + } + if (substr($this->data, 0, 8) != IDENTIFIER_OLE) { + $this->error = 1; + return false; + } + $this->numBigBlockDepotBlocks = GetInt4d($this->data, NUM_BIG_BLOCK_DEPOT_BLOCKS_POS); + $this->sbdStartBlock = GetInt4d($this->data, SMALL_BLOCK_DEPOT_BLOCK_POS); + $this->rootStartBlock = GetInt4d($this->data, ROOT_START_BLOCK_POS); + $this->extensionBlock = GetInt4d($this->data, EXTENSION_BLOCK_POS); + $this->numExtensionBlocks = GetInt4d($this->data, NUM_EXTENSION_BLOCK_POS); + $bigBlockDepotBlocks = array(); + $pos = BIG_BLOCK_DEPOT_BLOCKS_POS; + $bbdBlocks = $this->numBigBlockDepotBlocks; + if ($this->numExtensionBlocks != 0) { + $bbdBlocks = (BIG_BLOCK_SIZE - BIG_BLOCK_DEPOT_BLOCKS_POS)/4; + } + for ($i = 0; $i < $bbdBlocks; $i++) { + $bigBlockDepotBlocks[$i] = GetInt4d($this->data, $pos); + $pos += 4; + } + for ($j = 0; $j < $this->numExtensionBlocks; $j++) { + $pos = ($this->extensionBlock + 1) * BIG_BLOCK_SIZE; + $blocksToRead = min($this->numBigBlockDepotBlocks - $bbdBlocks, BIG_BLOCK_SIZE / 4 - 1); + for ($i = $bbdBlocks; $i < $bbdBlocks + $blocksToRead; $i++) { + $bigBlockDepotBlocks[$i] = GetInt4d($this->data, $pos); + $pos += 4; + } + $bbdBlocks += $blocksToRead; + if ($bbdBlocks < $this->numBigBlockDepotBlocks) { + $this->extensionBlock = GetInt4d($this->data, $pos); + } + } + + $pos = 0; + $index = 0; + $this->bigBlockChain = array(); + for ($i = 0; $i < $this->numBigBlockDepotBlocks; $i++) { + $pos = ($bigBlockDepotBlocks[$i] + 1) * BIG_BLOCK_SIZE; + + for ($j = 0 ; $j < BIG_BLOCK_SIZE / 4; $j++) { + $this->bigBlockChain[$index] = GetInt4d($this->data, $pos); + $pos += 4 ; + $index++; + } + } + + $pos = 0; + $index = 0; + $sbdBlock = $this->sbdStartBlock; + $this->smallBlockChain = array(); + while ($sbdBlock != -2) { + $pos = ($sbdBlock + 1) * BIG_BLOCK_SIZE; + for ($j = 0; $j < BIG_BLOCK_SIZE / 4; $j++) { + $this->smallBlockChain[$index] = GetInt4d($this->data, $pos); + $pos += 4; + $index++; + } + $sbdBlock = $this->bigBlockChain[$sbdBlock]; + } + + $block = $this->rootStartBlock; + $pos = 0; + $this->entry = $this->__readData($block); + $this->__readPropertySets(); + } + function __readData($bl) { + $block = $bl; + $pos = 0; + $data = ''; + while ($block != -2) { + $pos = ($block + 1) * BIG_BLOCK_SIZE; + $data = $data.substr($this->data, $pos, BIG_BLOCK_SIZE); + $block = $this->bigBlockChain[$block]; + } + return $data; + } + function __readPropertySets(){ + $offset = 0; + while ($offset < strlen($this->entry)) { + $d = substr($this->entry, $offset, PROPERTY_STORAGE_BLOCK_SIZE); + $nameSize = ord($d[SIZE_OF_NAME_POS]) | (ord($d[SIZE_OF_NAME_POS+1]) << 8); + $type = ord($d[TYPE_POS]); + $startBlock = GetInt4d($d, START_BLOCK_POS); + $size = GetInt4d($d, SIZE_POS); + $name = ''; + for ($i = 0; $i < $nameSize ; $i++) { + $name .= $d[$i]; + } + $name = str_replace("\x00", "", $name); + $this->props[] = array ( + 'name' => $name, + 'type' => $type, + 'startBlock' => $startBlock, + 'size' => $size); + if ((strtolower($name) == "workbook") || ( strtolower($name) == "book")) { + $this->wrkbook = count($this->props) - 1; + } + if ($name == "Root Entry") { + $this->rootentry = count($this->props) - 1; + } + $offset += PROPERTY_STORAGE_BLOCK_SIZE; + } + } + function getWorkBook(){ + if ($this->props[$this->wrkbook]['size'] < SMALL_BLOCK_THRESHOLD){ + $rootdata = $this->__readData($this->props[$this->rootentry]['startBlock']); + $streamData = ''; + $block = $this->props[$this->wrkbook]['startBlock']; + $pos = 0; + while ($block != -2) { + $pos = $block * SMALL_BLOCK_SIZE; + $streamData .= substr($rootdata, $pos, SMALL_BLOCK_SIZE); + $block = $this->smallBlockChain[$block]; + } + return $streamData; + }else{ + $numBlocks = $this->props[$this->wrkbook]['size'] / BIG_BLOCK_SIZE; + if ($this->props[$this->wrkbook]['size'] % BIG_BLOCK_SIZE != 0) { + $numBlocks++; + } + if ($numBlocks == 0) return ''; + $streamData = ''; + $block = $this->props[$this->wrkbook]['startBlock']; + $pos = 0; + while ($block != -2) { + $pos = ($block + 1) * BIG_BLOCK_SIZE; + $streamData .= substr($this->data, $pos, BIG_BLOCK_SIZE); + $block = $this->bigBlockChain[$block]; + } + return $streamData; + } + } +} +define('SPREADSHEET_EXCEL_READER_BIFF8', 0x600); +define('SPREADSHEET_EXCEL_READER_BIFF7', 0x500); +define('SPREADSHEET_EXCEL_READER_WORKBOOKGLOBALS', 0x5); +define('SPREADSHEET_EXCEL_READER_WORKSHEET', 0x10); +define('SPREADSHEET_EXCEL_READER_TYPE_BOF', 0x809); +define('SPREADSHEET_EXCEL_READER_TYPE_EOF', 0x0a); +define('SPREADSHEET_EXCEL_READER_TYPE_BOUNDSHEET', 0x85); +define('SPREADSHEET_EXCEL_READER_TYPE_DIMENSION', 0x200); +define('SPREADSHEET_EXCEL_READER_TYPE_ROW', 0x208); +define('SPREADSHEET_EXCEL_READER_TYPE_DBCELL', 0xd7); +define('SPREADSHEET_EXCEL_READER_TYPE_FILEPASS', 0x2f); +define('SPREADSHEET_EXCEL_READER_TYPE_NOTE', 0x1c); +define('SPREADSHEET_EXCEL_READER_TYPE_TXO', 0x1b6); +define('SPREADSHEET_EXCEL_READER_TYPE_RK', 0x7e); +define('SPREADSHEET_EXCEL_READER_TYPE_RK2', 0x27e); +define('SPREADSHEET_EXCEL_READER_TYPE_MULRK', 0xbd); +define('SPREADSHEET_EXCEL_READER_TYPE_MULBLANK', 0xbe); +define('SPREADSHEET_EXCEL_READER_TYPE_INDEX', 0x20b); +define('SPREADSHEET_EXCEL_READER_TYPE_SST', 0xfc); +define('SPREADSHEET_EXCEL_READER_TYPE_EXTSST', 0xff); +define('SPREADSHEET_EXCEL_READER_TYPE_CONTINUE', 0x3c); +define('SPREADSHEET_EXCEL_READER_TYPE_LABEL', 0x204); +define('SPREADSHEET_EXCEL_READER_TYPE_LABELSST', 0xfd); +define('SPREADSHEET_EXCEL_READER_TYPE_NUMBER', 0x203); +define('SPREADSHEET_EXCEL_READER_TYPE_NAME', 0x18); +define('SPREADSHEET_EXCEL_READER_TYPE_ARRAY', 0x221); +define('SPREADSHEET_EXCEL_READER_TYPE_STRING', 0x207); +define('SPREADSHEET_EXCEL_READER_TYPE_FORMULA', 0x406); +define('SPREADSHEET_EXCEL_READER_TYPE_FORMULA2', 0x6); +define('SPREADSHEET_EXCEL_READER_TYPE_FORMAT', 0x41e); +define('SPREADSHEET_EXCEL_READER_TYPE_XF', 0xe0); +define('SPREADSHEET_EXCEL_READER_TYPE_BOOLERR', 0x205); +define('SPREADSHEET_EXCEL_READER_TYPE_FONT', 0x0031); +define('SPREADSHEET_EXCEL_READER_TYPE_PALETTE', 0x0092); +define('SPREADSHEET_EXCEL_READER_TYPE_UNKNOWN', 0xffff); +define('SPREADSHEET_EXCEL_READER_TYPE_NINETEENFOUR', 0x22); +define('SPREADSHEET_EXCEL_READER_TYPE_MERGEDCELLS', 0xE5); +define('SPREADSHEET_EXCEL_READER_UTCOFFSETDAYS' , 25569); +define('SPREADSHEET_EXCEL_READER_UTCOFFSETDAYS1904', 24107); +define('SPREADSHEET_EXCEL_READER_MSINADAY', 86400); +define('SPREADSHEET_EXCEL_READER_TYPE_HYPER', 0x01b8); +define('SPREADSHEET_EXCEL_READER_TYPE_COLINFO', 0x7d); +define('SPREADSHEET_EXCEL_READER_TYPE_DEFCOLWIDTH', 0x55); +define('SPREADSHEET_EXCEL_READER_TYPE_STANDARDWIDTH', 0x99); +define('SPREADSHEET_EXCEL_READER_DEF_NUM_FORMAT', "%s"); +class Spreadsheet_Excel_Reader { + var $colnames = array(); + var $colindexes = array(); + var $standardColWidth = 0; + var $defaultColWidth = 0; + function myHex($d) { + if ($d < 16) return "0" . dechex($d); + return dechex($d); + } + function dumpHexData($data, $pos, $length) { + $info = ""; + for ($i = 0; $i <= $length; $i++) { + $info .= ($i==0?"":" ") . $this->myHex(ord($data[$pos + $i])) . (ord($data[$pos + $i])>31? "[" . $data[$pos + $i] . "]":''); + } + return $info; + } + function getCol($col) { + if (is_string($col)) { + $col = strtolower($col); + if (array_key_exists($col,$this->colnames)) { + $col = $this->colnames[$col]; + } + } + return $col; + } + function val($row,$col,$sheet=0) { + $col = $this->getCol($col); + if (array_key_exists($row,$this->sheets[$sheet]['cells']) && array_key_exists($col,$this->sheets[$sheet]['cells'][$row])) { + return $this->sheets[$sheet]['cells'][$row][$col]; + } + return ""; + } + function value($row,$col,$sheet=0) { + return $this->val($row,$col,$sheet); + } + function info($row,$col,$type='',$sheet=0) { + $col = $this->getCol($col); + if (array_key_exists('cellsInfo',$this->sheets[$sheet]) + && array_key_exists($row,$this->sheets[$sheet]['cellsInfo']) + && array_key_exists($col,$this->sheets[$sheet]['cellsInfo'][$row]) + && array_key_exists($type,$this->sheets[$sheet]['cellsInfo'][$row][$col])) { + return $this->sheets[$sheet]['cellsInfo'][$row][$col][$type]; + } + return ""; + } + function type($row,$col,$sheet=0) { + return $this->info($row,$col,'type',$sheet); + } + function raw($row,$col,$sheet=0) { + return $this->info($row,$col,'raw',$sheet); + } + function rowspan($row,$col,$sheet=0) { + $val = $this->info($row,$col,'rowspan',$sheet); + if ($val=="") { return 1; } + return $val; + } + function colspan($row,$col,$sheet=0) { + $val = $this->info($row,$col,'colspan',$sheet); + if ($val=="") { return 1; } + return $val; + } + function hyperlink($row,$col,$sheet=0) { + $link = $this->sheets[$sheet]['cellsInfo'][$row][$col]['hyperlink']; + if ($link) { + return $link['link']; + } + return ''; + } + function rowcount($sheet=0) { + return $this->sheets[$sheet]['numRows']; + } + function colcount($sheet=0) { + return $this->sheets[$sheet]['numCols']; + } + function colwidth($col,$sheet=0) { + + return $this->colInfo[$sheet][$col]['width']/9142*200; + } + function colhidden($col,$sheet=0) { + return !!$this->colInfo[$sheet][$col]['hidden']; + } + function rowheight($row,$sheet=0) { + return $this->rowInfo[$sheet][$row]['height']; + } + function rowhidden($row,$sheet=0) { + return !!$this->rowInfo[$sheet][$row]['hidden']; + } + function style($row,$col,$sheet=0,$properties='') { + $css = ""; + $font=$this->font($row,$col,$sheet); + if ($font!="") { + $css .= "font-family:$font;"; + } + $align=$this->align($row,$col,$sheet); + if ($align!="") { + $css .= "text-align:$align;"; + } + $height=$this->height($row,$col,$sheet); + if ($height!="") { + $css .= "font-size:$height"."px;"; + } + $bgcolor=$this->bgColor($row,$col,$sheet); + if ($bgcolor!="") { + $bgcolor = $this->colors[$bgcolor]; + $css .= "background-color:$bgcolor;"; + } + $color=$this->color($row,$col,$sheet); + if ($color!="") { + $css .= "color:$color;"; + } + $bold=$this->bold($row,$col,$sheet); + if ($bold) { + $css .= "font-weight:bold;"; + } + $italic=$this->italic($row,$col,$sheet); + if ($italic) { + $css .= "font-style:italic;"; + } + $underline=$this->underline($row,$col,$sheet); + if ($underline) { + $css .= "text-decoration:underline;"; + } + + $bLeft = $this->borderLeft($row,$col,$sheet); + $bRight = $this->borderRight($row,$col,$sheet); + $bTop = $this->borderTop($row,$col,$sheet); + $bBottom = $this->borderBottom($row,$col,$sheet); + $bLeftCol = $this->borderLeftColor($row,$col,$sheet); + $bRightCol = $this->borderRightColor($row,$col,$sheet); + $bTopCol = $this->borderTopColor($row,$col,$sheet); + $bBottomCol = $this->borderBottomColor($row,$col,$sheet); + + if ($bLeft!="" && $bLeft==$bRight && $bRight==$bTop && $bTop==$bBottom) { + $css .= "border:" . $this->lineStylesCss[$bLeft] .";"; + } + else { + if ($bLeft!="") { $css .= "border-left:" . $this->lineStylesCss[$bLeft] .";"; } + if ($bRight!="") { $css .= "border-right:" . $this->lineStylesCss[$bRight] .";"; } + if ($bTop!="") { $css .= "border-top:" . $this->lineStylesCss[$bTop] .";"; } + if ($bBottom!="") { $css .= "border-bottom:" . $this->lineStylesCss[$bBottom] .";"; } + } + + if ($bLeft!="" && $bLeftCol!="") { $css .= "border-left-color:" . $bLeftCol .";"; } + if ($bRight!="" && $bRightCol!="") { $css .= "border-right-color:" . $bRightCol .";"; } + if ($bTop!="" && $bTopCol!="") { $css .= "border-top-color:" . $bTopCol . ";"; } + if ($bBottom!="" && $bBottomCol!="") { $css .= "border-bottom-color:" . $bBottomCol .";"; } + + return $css; + } + function format($row,$col,$sheet=0) { + return $this->info($row,$col,'format',$sheet); + } + function formatIndex($row,$col,$sheet=0) { + return $this->info($row,$col,'formatIndex',$sheet); + } + function formatColor($row,$col,$sheet=0) { + return $this->info($row,$col,'formatColor',$sheet); + } + function xfRecord($row,$col,$sheet=0) { + $xfIndex = $this->info($row,$col,'xfIndex',$sheet); + if ($xfIndex!="") { + return $this->xfRecords[$xfIndex]; + } + return null; + } + function xfProperty($row,$col,$sheet,$prop) { + $xfRecord = $this->xfRecord($row,$col,$sheet); + if ($xfRecord!=null) { + return $xfRecord[$prop]; + } + return ""; + } + function align($row,$col,$sheet=0) { + return $this->xfProperty($row,$col,$sheet,'align'); + } + function bgColor($row,$col,$sheet=0) { + return $this->xfProperty($row,$col,$sheet,'bgColor'); + } + function borderLeft($row,$col,$sheet=0) { + return $this->xfProperty($row,$col,$sheet,'borderLeft'); + } + function borderRight($row,$col,$sheet=0) { + return $this->xfProperty($row,$col,$sheet,'borderRight'); + } + function borderTop($row,$col,$sheet=0) { + return $this->xfProperty($row,$col,$sheet,'borderTop'); + } + function borderBottom($row,$col,$sheet=0) { + return $this->xfProperty($row,$col,$sheet,'borderBottom'); + } + function borderLeftColor($row,$col,$sheet=0) { + return $this->colors[$this->xfProperty($row,$col,$sheet,'borderLeftColor')]; + } + function borderRightColor($row,$col,$sheet=0) { + return $this->colors[$this->xfProperty($row,$col,$sheet,'borderRightColor')]; + } + function borderTopColor($row,$col,$sheet=0) { + return $this->colors[$this->xfProperty($row,$col,$sheet,'borderTopColor')]; + } + function borderBottomColor($row,$col,$sheet=0) { + return $this->colors[$this->xfProperty($row,$col,$sheet,'borderBottomColor')]; + } + function fontRecord($row,$col,$sheet=0) { + $xfRecord = $this->xfRecord($row,$col,$sheet); + if ($xfRecord!=null) { + $font = $xfRecord['fontIndex']; + if ($font!=null) { + return $this->fontRecords[$font]; + } + } + return null; + } + function fontProperty($row,$col,$sheet=0,$prop) { + $font = $this->fontRecord($row,$col,$sheet); + if ($font!=null) { + return $font[$prop]; + } + return false; + } + function fontIndex($row,$col,$sheet=0) { + return $this->xfProperty($row,$col,$sheet,'fontIndex'); + } + function color($row,$col,$sheet=0) { + $formatColor = $this->formatColor($row,$col,$sheet); + if ($formatColor!="") { + return $formatColor; + } + $ci = $this->fontProperty($row,$col,$sheet,'color'); + return $this->rawColor($ci); + } + function rawColor($ci) { + if (($ci <> 0x7FFF) && ($ci <> '')) { + return $this->colors[$ci]; + } + return ""; + } + function bold($row,$col,$sheet=0) { + return $this->fontProperty($row,$col,$sheet,'bold'); + } + function italic($row,$col,$sheet=0) { + return $this->fontProperty($row,$col,$sheet,'italic'); + } + function underline($row,$col,$sheet=0) { + return $this->fontProperty($row,$col,$sheet,'under'); + } + function height($row,$col,$sheet=0) { + return $this->fontProperty($row,$col,$sheet,'height'); + } + function font($row,$col,$sheet=0) { + return $this->fontProperty($row,$col,$sheet,'font'); + } + function dump($row_numbers=false,$col_letters=false,$sheet=0,$table_class='excel') { + $out = ""; + if ($col_letters) { + $out .= "\n\t"; + if ($row_numbers) { + $out .= "\n\t\t"; + } + for($i=1;$i<=$this->colcount($sheet);$i++) { + $style = "width:" . ($this->colwidth($i,$sheet)*1) . "px;"; + if ($this->colhidden($i,$sheet)) { + $style .= "display:none;"; + } + $out .= "\n\t\t"; + } + $out .= "\n"; + } + + $out .= "\n"; + for($row=1;$row<=$this->rowcount($sheet);$row++) { + $rowheight = $this->rowheight($row,$sheet); + $style = "height:" . ($rowheight*(4/3)) . "px;"; + if ($this->rowhidden($row,$sheet)) { + $style .= "display:none;"; + } + $out .= "\n\t"; + if ($row_numbers) { + $out .= "\n\t\t"; + } + for($col=1;$col<=$this->colcount($sheet);$col++) { + + $rowspan = $this->rowspan($row,$col,$sheet); + $colspan = $this->colspan($row,$col,$sheet); + for($i=0;$i<$rowspan;$i++) { + for($j=0;$j<$colspan;$j++) { + if ($i>0 || $j>0) { + $this->sheets[$sheet]['cellsInfo'][$row+$i][$col+$j]['dontprint']=1; + } + } + } + if(!$this->sheets[$sheet]['cellsInfo'][$row][$col]['dontprint']) { + $style = $this->style($row,$col,$sheet); + if ($this->colhidden($col,$sheet)) { + $style .= "display:none;"; + } + $out .= "\n\t\t"; + } + } + $out .= "\n"; + } + $out .= "
     " . strtoupper($this->colindexes[$i]) . "
    $row 1?" colspan=$colspan":"") . ($rowspan > 1?" rowspan=$rowspan":"") . ">"; + $val = $this->val($row,$col,$sheet); + if ($val=='') { $val=" "; } + else { + $val = htmlentities($val); + $link = $this->hyperlink($row,$col,$sheet); + if ($link!='') { + $val = "$val"; + } + } + $out .= "".nl2br($val).""; + $out .= "
    "; + return $out; + } + var $boundsheets = array(); + var $formatRecords = array(); + var $fontRecords = array(); + var $xfRecords = array(); + var $colInfo = array(); + var $rowInfo = array(); + var $sst = array(); + var $sheets = array(); + var $data; + var $_ole; + var $_defaultEncoding = "UTF-8"; + var $_defaultFormat = SPREADSHEET_EXCEL_READER_DEF_NUM_FORMAT; + var $_columnsFormat = array(); + var $_rowoffset = 1; + var $_coloffset = 1; + var $dateFormats = array ( + 0xe => "m/d/Y", + 0xf => "M-d-Y", + 0x10 => "d-M", + 0x11 => "M-Y", + 0x12 => "h:i a", + 0x13 => "h:i:s a", + 0x14 => "H:i", + 0x15 => "H:i:s", + 0x16 => "d/m/Y H:i", + 0x2d => "i:s", + 0x2e => "H:i:s", + 0x2f => "i:s.S" + ); + var $numberFormats = array( + 0x1 => "0", + 0x2 => "0.00", + 0x3 => "#,##0", + 0x4 => "#,##0.00", + 0x5 => "\$#,##0;(\$#,##0)", + 0x6 => "\$#,##0;[Red](\$#,##0)", + 0x7 => "\$#,##0.00;(\$#,##0.00)", + 0x8 => "\$#,##0.00;[Red](\$#,##0.00)", + 0x9 => "0%", + 0xa => "0.00%", + 0xb => "0.00E+00", + 0x25 => "#,##0;(#,##0)", + 0x26 => "#,##0;[Red](#,##0)", + 0x27 => "#,##0.00;(#,##0.00)", + 0x28 => "#,##0.00;[Red](#,##0.00)", + 0x29 => "#,##0;(#,##0)", + 0x2a => "\$#,##0;(\$#,##0)", + 0x2b => "#,##0.00;(#,##0.00)", + 0x2c => "\$#,##0.00;(\$#,##0.00)", + 0x30 => "##0.0E+0" + ); + var $colors = Array( + 0x00 => "#000000", + 0x01 => "#FFFFFF", + 0x02 => "#FF0000", + 0x03 => "#00FF00", + 0x04 => "#0000FF", + 0x05 => "#FFFF00", + 0x06 => "#FF00FF", + 0x07 => "#00FFFF", + 0x08 => "#000000", + 0x09 => "#FFFFFF", + 0x0A => "#FF0000", + 0x0B => "#00FF00", + 0x0C => "#0000FF", + 0x0D => "#FFFF00", + 0x0E => "#FF00FF", + 0x0F => "#00FFFF", + 0x10 => "#800000", + 0x11 => "#008000", + 0x12 => "#000080", + 0x13 => "#808000", + 0x14 => "#800080", + 0x15 => "#008080", + 0x16 => "#C0C0C0", + 0x17 => "#808080", + 0x18 => "#9999FF", + 0x19 => "#993366", + 0x1A => "#FFFFCC", + 0x1B => "#CCFFFF", + 0x1C => "#660066", + 0x1D => "#FF8080", + 0x1E => "#0066CC", + 0x1F => "#CCCCFF", + 0x20 => "#000080", + 0x21 => "#FF00FF", + 0x22 => "#FFFF00", + 0x23 => "#00FFFF", + 0x24 => "#800080", + 0x25 => "#800000", + 0x26 => "#008080", + 0x27 => "#0000FF", + 0x28 => "#00CCFF", + 0x29 => "#CCFFFF", + 0x2A => "#CCFFCC", + 0x2B => "#FFFF99", + 0x2C => "#99CCFF", + 0x2D => "#FF99CC", + 0x2E => "#CC99FF", + 0x2F => "#FFCC99", + 0x30 => "#3366FF", + 0x31 => "#33CCCC", + 0x32 => "#99CC00", + 0x33 => "#FFCC00", + 0x34 => "#FF9900", + 0x35 => "#FF6600", + 0x36 => "#666699", + 0x37 => "#969696", + 0x38 => "#003366", + 0x39 => "#339966", + 0x3A => "#003300", + 0x3B => "#333300", + 0x3C => "#993300", + 0x3D => "#993366", + 0x3E => "#333399", + 0x3F => "#333333", + 0x40 => "#000000", + 0x41 => "#FFFFFF", + 0x43 => "#000000", + 0x4D => "#000000", + 0x4E => "#FFFFFF", + 0x4F => "#000000", + 0x50 => "#FFFFFF", + 0x51 => "#000000", + 0x7FFF => "#000000" + ); + var $lineStyles = array( + 0x00 => "", + 0x01 => "Thin", + 0x02 => "Medium", + 0x03 => "Dashed", + 0x04 => "Dotted", + 0x05 => "Thick", + 0x06 => "Double", + 0x07 => "Hair", + 0x08 => "Medium dashed", + 0x09 => "Thin dash-dotted", + 0x0A => "Medium dash-dotted", + 0x0B => "Thin dash-dot-dotted", + 0x0C => "Medium dash-dot-dotted", + 0x0D => "Slanted medium dash-dotted" + ); + var $lineStylesCss = array( + "Thin" => "1px solid", + "Medium" => "2px solid", + "Dashed" => "1px dashed", + "Dotted" => "1px dotted", + "Thick" => "3px solid", + "Double" => "double", + "Hair" => "1px solid", + "Medium dashed" => "2px dashed", + "Thin dash-dotted" => "1px dashed", + "Medium dash-dotted" => "2px dashed", + "Thin dash-dot-dotted" => "1px dashed", + "Medium dash-dot-dotted" => "2px dashed", + "Slanted medium dash-dotte" => "2px dashed" + ); + function read16bitstring($data, $start) { + $len = 0; + while (ord($data[$start + $len]) + ord($data[$start + $len + 1]) > 0) $len++; + return substr($data, $start, $len); + } + function _format_value($format,$num,$f) { + + // http://code.google.com/p/php-excel-reader/issues/detail?id=7 + if ( (!$f && $format=="%s") || ($f==49) || ($format=="GENERAL") ) { + return array('string'=>$num, 'formatColor'=>null); + } + + + $parts = split(";",$format); + $pattern = $parts[0]; + + if (count($parts)>2 && $num==0) { + $pattern = $parts[2]; + } + + if (count($parts)>1 && $num<0) { + $pattern = $parts[1]; + $num = abs($num); + } + $color = ""; + $matches = array(); + $color_regex = "/^\[(BLACK|BLUE|CYAN|GREEN|MAGENTA|RED|WHITE|YELLOW)\]/i"; + if (preg_match($color_regex,$pattern,$matches)) { + $color = strtolower($matches[1]); + $pattern = preg_replace($color_regex,"",$pattern); + } + + + $pattern = preg_replace("/_./","",$pattern); + + + $pattern = preg_replace("/\\\/","",$pattern); + + + $pattern = preg_replace("/\"/","",$pattern); + + $pattern = preg_replace("/\#/","0",$pattern); + + $has_commas = preg_match("/,/",$pattern); + if ($has_commas) { + $pattern = preg_replace("/,/","",$pattern); + } + + if (preg_match("/\d(\%)([^\%]|$)/",$pattern,$matches)) { + $num = $num * 100; + $pattern = preg_replace("/(\d)(\%)([^\%]|$)/","$1%$3",$pattern); + } + + $number_regex = "/(\d+)(\.?)(\d*)/"; + if (preg_match($number_regex,$pattern,$matches)) { + $left = $matches[1]; + $dec = $matches[2]; + $right = $matches[3]; + if ($has_commas) { + $formatted = number_format($num,strlen($right)); + } + else { + $sprintf_pattern = "%1.".strlen($right)."f"; + $formatted = sprintf($sprintf_pattern, $num); + } + $pattern = preg_replace($number_regex, $formatted, $pattern); + } + return array( + 'string'=>$pattern, + 'formatColor'=>$color + ); + } + function Spreadsheet_Excel_Reader($file='',$store_extended_info=true,$outputEncoding='') { + $this->_ole = new OLERead(); + $this->setUTFEncoder('iconv'); + if ($outputEncoding != '') { + $this->setOutputEncoding($outputEncoding); + } + for ($i=1; $i<245; $i++) { + $name = strtolower(( (($i-1)/26>=1)?chr(($i-1)/26+64):'') . chr(($i-1)%26+65)); + $this->colnames[$name] = $i; + $this->colindexes[$i] = $name; + } + $this->store_extended_info = $store_extended_info; + if ($file!="") { + $this->read($file); + } + } + function setOutputEncoding($encoding) { + $this->_defaultEncoding = $encoding; + } + function setUTFEncoder($encoder = 'iconv') { + $this->_encoderFunction = ''; + if ($encoder == 'iconv') { + $this->_encoderFunction = function_exists('iconv') ? 'iconv' : ''; + } elseif ($encoder == 'mb') { + $this->_encoderFunction = function_exists('mb_convert_encoding') ? 'mb_convert_encoding' : ''; + } + } + function setRowColOffset($iOffset) { + $this->_rowoffset = $iOffset; + $this->_coloffset = $iOffset; + } + function setDefaultFormat($sFormat) { + $this->_defaultFormat = $sFormat; + } + function setColumnFormat($column, $sFormat) { + $this->_columnsFormat[$column] = $sFormat; + } + function read($sFileName) { + $res = $this->_ole->read($sFileName); + + if($res === false) { + + if($this->_ole->error == 1) { + + die('The filename ' . $sFileName . ' is not readable'); + } + + } + $this->data = $this->_ole->getWorkBook(); + $this->_parse(); + } + function _parse() { + $pos = 0; + $data = $this->data; + $code = v($data,$pos); + $length = v($data,$pos+2); + $version = v($data,$pos+4); + $substreamType = v($data,$pos+6); + $this->version = $version; + if (($version != SPREADSHEET_EXCEL_READER_BIFF8) && + ($version != SPREADSHEET_EXCEL_READER_BIFF7)) { + return false; + } + if ($substreamType != SPREADSHEET_EXCEL_READER_WORKBOOKGLOBALS){ + return false; + } + $pos += $length + 4; + $code = v($data,$pos); + $length = v($data,$pos+2); + while ($code != SPREADSHEET_EXCEL_READER_TYPE_EOF) { + switch ($code) { + case SPREADSHEET_EXCEL_READER_TYPE_SST: + $spos = $pos + 4; + $limitpos = $spos + $length; + $uniqueStrings = $this->_GetInt4d($data, $spos+4); + $spos += 8; + for ($i = 0; $i < $uniqueStrings; $i++) { + + if ($spos == $limitpos) { + $opcode = v($data,$spos); + $conlength = v($data,$spos+2); + if ($opcode != 0x3c) { + return -1; + } + $spos += 4; + $limitpos = $spos + $conlength; + } + $numChars = ord($data[$spos]) | (ord($data[$spos+1]) << 8); + $spos += 2; + $optionFlags = ord($data[$spos]); + $spos++; + $asciiEncoding = (($optionFlags & 0x01) == 0) ; + $extendedString = ( ($optionFlags & 0x04) != 0); + + $richString = ( ($optionFlags & 0x08) != 0); + if ($richString) { + + $formattingRuns = v($data,$spos); + $spos += 2; + } + if ($extendedString) { + + $extendedRunLength = $this->_GetInt4d($data, $spos); + $spos += 4; + } + $len = ($asciiEncoding)? $numChars : $numChars*2; + if ($spos + $len < $limitpos) { + $retstr = substr($data, $spos, $len); + $spos += $len; + } + else{ + + $retstr = substr($data, $spos, $limitpos - $spos); + $bytesRead = $limitpos - $spos; + $charsLeft = $numChars - (($asciiEncoding) ? $bytesRead : ($bytesRead / 2)); + $spos = $limitpos; + while ($charsLeft > 0){ + $opcode = v($data,$spos); + $conlength = v($data,$spos+2); + if ($opcode != 0x3c) { + return -1; + } + $spos += 4; + $limitpos = $spos + $conlength; + $option = ord($data[$spos]); + $spos += 1; + if ($asciiEncoding && ($option == 0)) { + $len = min($charsLeft, $limitpos - $spos); + $retstr .= substr($data, $spos, $len); + $charsLeft -= $len; + $asciiEncoding = true; + } + elseif (!$asciiEncoding && ($option != 0)) { + $len = min($charsLeft * 2, $limitpos - $spos); + $retstr .= substr($data, $spos, $len); + $charsLeft -= $len/2; + $asciiEncoding = false; + } + elseif (!$asciiEncoding && ($option == 0)) { + + + $len = min($charsLeft, $limitpos - $spos); + for ($j = 0; $j < $len; $j++) { + $retstr .= $data[$spos + $j].chr(0); + } + $charsLeft -= $len; + $asciiEncoding = false; + } + else{ + $newstr = ''; + for ($j = 0; $j < strlen($retstr); $j++) { + $newstr = $retstr[$j].chr(0); + } + $retstr = $newstr; + $len = min($charsLeft * 2, $limitpos - $spos); + $retstr .= substr($data, $spos, $len); + $charsLeft -= $len/2; + $asciiEncoding = false; + } + $spos += $len; + } + } + $retstr = ($asciiEncoding) ? $retstr : $this->_encodeUTF16($retstr); + if ($richString){ + $spos += 4 * $formattingRuns; + } + + if ($extendedString) { + $spos += $extendedRunLength; + } + $this->sst[]=$retstr; + } + break; + case SPREADSHEET_EXCEL_READER_TYPE_FILEPASS: + return false; + break; + case SPREADSHEET_EXCEL_READER_TYPE_NAME: + break; + case SPREADSHEET_EXCEL_READER_TYPE_FORMAT: + $indexCode = v($data,$pos+4); + if ($version == SPREADSHEET_EXCEL_READER_BIFF8) { + $numchars = v($data,$pos+6); + if (ord($data[$pos+8]) == 0){ + $formatString = substr($data, $pos+9, $numchars); + } else { + $formatString = substr($data, $pos+9, $numchars*2); + } + } else { + $numchars = ord($data[$pos+6]); + $formatString = substr($data, $pos+7, $numchars*2); + } + $this->formatRecords[$indexCode] = $formatString; + break; + case SPREADSHEET_EXCEL_READER_TYPE_FONT: + $height = v($data,$pos+4); + $option = v($data,$pos+6); + $color = v($data,$pos+8); + $weight = v($data,$pos+10); + $under = ord($data[$pos+14]); + $font = ""; + + $numchars = ord($data[$pos+18]); + if ((ord($data[$pos+19]) & 1) == 0){ + $font = substr($data, $pos+20, $numchars); + } else { + $font = substr($data, $pos+20, $numchars*2); + $font = $this->_encodeUTF16($font); + } + $this->fontRecords[] = array( + 'height' => $height / 20, + 'italic' => !!($option & 2), + 'color' => $color, + 'under' => !($under==0), + 'bold' => ($weight==700), + 'font' => $font, + 'raw' => $this->dumpHexData($data, $pos+3, $length) + ); + break; + case SPREADSHEET_EXCEL_READER_TYPE_PALETTE: + $colors = ord($data[$pos+4]) | ord($data[$pos+5]) << 8; + for ($coli = 0; $coli < $colors; $coli++) { + $colOff = $pos + 2 + ($coli * 4); + $colr = ord($data[$colOff]); + $colg = ord($data[$colOff+1]); + $colb = ord($data[$colOff+2]); + $this->colors[0x07 + $coli] = '#' . $this->myhex($colr) . $this->myhex($colg) . $this->myhex($colb); + } + break; + case SPREADSHEET_EXCEL_READER_TYPE_XF: + $fontIndexCode = (ord($data[$pos+4]) | ord($data[$pos+5]) << 8) - 1; + $fontIndexCode = max(0,$fontIndexCode); + $indexCode = ord($data[$pos+6]) | ord($data[$pos+7]) << 8; + $alignbit = ord($data[$pos+10]) & 3; + $bgi = (ord($data[$pos+22]) | ord($data[$pos+23]) << 8) & 0x3FFF; + $bgcolor = ($bgi & 0x7F); + $align = ""; + if ($alignbit==3) { $align="right"; } + if ($alignbit==2) { $align="center"; } + $fillPattern = (ord($data[$pos+21]) & 0xFC) >> 2; + if ($fillPattern == 0) { + $bgcolor = ""; + } + $xf = array(); + $xf['formatIndex'] = $indexCode; + $xf['align'] = $align; + $xf['fontIndex'] = $fontIndexCode; + $xf['bgColor'] = $bgcolor; + $xf['fillPattern'] = $fillPattern; + $border = ord($data[$pos+14]) | (ord($data[$pos+15]) << 8) | (ord($data[$pos+16]) << 16) | (ord($data[$pos+17]) << 24); + $xf['borderLeft'] = $this->lineStyles[($border & 0xF)]; + $xf['borderRight'] = $this->lineStyles[($border & 0xF0) >> 4]; + $xf['borderTop'] = $this->lineStyles[($border & 0xF00) >> 8]; + $xf['borderBottom'] = $this->lineStyles[($border & 0xF000) >> 12]; + + $xf['borderLeftColor'] = ($border & 0x7F0000) >> 16; + $xf['borderRightColor'] = ($border & 0x3F800000) >> 23; + $border = (ord($data[$pos+18]) | ord($data[$pos+19]) << 8); + $xf['borderTopColor'] = ($border & 0x7F); + $xf['borderBottomColor'] = ($border & 0x3F80) >> 7; + + if (array_key_exists($indexCode, $this->dateFormats)) { + $xf['type'] = 'date'; + $xf['format'] = $this->dateFormats[$indexCode]; + if ($align=='') { $xf['align'] = 'right'; } + }elseif (array_key_exists($indexCode, $this->numberFormats)) { + $xf['type'] = 'number'; + $xf['format'] = $this->numberFormats[$indexCode]; + if ($align=='') { $xf['align'] = 'right'; } + }else{ + $isdate = FALSE; + $formatstr = ''; + if ($indexCode > 0){ + if (isset($this->formatRecords[$indexCode])) + $formatstr = $this->formatRecords[$indexCode]; + if ($formatstr!="") { + $tmp = preg_replace("/^\[[^\]]*\]/","",$formatstr); + if (preg_match("/[^hmsday\/\-:\s\\\,AMP]/i", $tmp) == 0) { + $isdate = TRUE; + $formatstr = $tmp; + $formatstr = str_replace(array('AM/PM','mmmm','mmm'), array('a','F','M'), $formatstr); + + + + $formatstr = preg_replace("/(h:?)mm?/","$1i", $formatstr); + $formatstr = preg_replace("/mm?(:?s)/","i$1", $formatstr); + + $formatstr = preg_replace("/(^|[^m])m([^m]|$)/", '$1n$2', $formatstr); + $formatstr = preg_replace("/(^|[^m])m([^m]|$)/", '$1n$2', $formatstr); + + $formatstr = str_replace('mm', 'm', $formatstr); + + $formatstr = preg_replace("/(^|[^d])d([^d]|$)/", '$1j$2', $formatstr); + $formatstr = str_replace(array('dddd','ddd','dd','yyyy','yy','hh','h'), array('l','D','d','Y','y','H','g'), $formatstr); + $formatstr = preg_replace("/ss?/", 's', $formatstr); + } + } + } + if ($isdate){ + $xf['type'] = 'date'; + $xf['format'] = $formatstr; + if ($align=='') { $xf['align'] = 'right'; } + }else{ + + if (preg_match("/[0#]/", $formatstr)) { + $xf['type'] = 'number'; + if ($align=='') { $xf['align']='right'; } + } + else { + $xf['type'] = 'other'; + } + $xf['format'] = $formatstr; + $xf['code'] = $indexCode; + } + } + $this->xfRecords[] = $xf; + break; + case SPREADSHEET_EXCEL_READER_TYPE_NINETEENFOUR: + $this->nineteenFour = (ord($data[$pos+4]) == 1); + break; + case SPREADSHEET_EXCEL_READER_TYPE_BOUNDSHEET: + $rec_offset = $this->_GetInt4d($data, $pos+4); + $rec_typeFlag = ord($data[$pos+8]); + $rec_visibilityFlag = ord($data[$pos+9]); + $rec_length = ord($data[$pos+10]); + if ($version == SPREADSHEET_EXCEL_READER_BIFF8){ + $chartype = ord($data[$pos+11]); + if ($chartype == 0){ + $rec_name = substr($data, $pos+12, $rec_length); + } else { + $rec_name = $this->_encodeUTF16(substr($data, $pos+12, $rec_length*2)); + } + }elseif ($version == SPREADSHEET_EXCEL_READER_BIFF7){ + $rec_name = substr($data, $pos+11, $rec_length); + } + $this->boundsheets[] = array('name'=>$rec_name,'offset'=>$rec_offset); + break; + } + $pos += $length + 4; + $code = ord($data[$pos]) | ord($data[$pos+1])<<8; + $length = ord($data[$pos+2]) | ord($data[$pos+3])<<8; + } + foreach ($this->boundsheets as $key=>$val){ + $this->sn = $key; + $this->_parsesheet($val['offset']); + } + return true; + } + function _parsesheet($spos) { + $cont = true; + $data = $this->data; + + $code = ord($data[$spos]) | ord($data[$spos+1])<<8; + $length = ord($data[$spos+2]) | ord($data[$spos+3])<<8; + $version = ord($data[$spos + 4]) | ord($data[$spos + 5])<<8; + $substreamType = ord($data[$spos + 6]) | ord($data[$spos + 7])<<8; + if (($version != SPREADSHEET_EXCEL_READER_BIFF8) && ($version != SPREADSHEET_EXCEL_READER_BIFF7)) { + return -1; + } + if ($substreamType != SPREADSHEET_EXCEL_READER_WORKSHEET){ + return -2; + } + $spos += $length + 4; + while($cont) { + $lowcode = ord($data[$spos]); + if ($lowcode == SPREADSHEET_EXCEL_READER_TYPE_EOF) break; + $code = $lowcode | ord($data[$spos+1])<<8; + $length = ord($data[$spos+2]) | ord($data[$spos+3])<<8; + $spos += 4; + $this->sheets[$this->sn]['maxrow'] = $this->_rowoffset - 1; + $this->sheets[$this->sn]['maxcol'] = $this->_coloffset - 1; + unset($this->rectype); + switch ($code) { + case SPREADSHEET_EXCEL_READER_TYPE_DIMENSION: + if (!isset($this->numRows)) { + if (($length == 10) || ($version == SPREADSHEET_EXCEL_READER_BIFF7)){ + $this->sheets[$this->sn]['numRows'] = ord($data[$spos+2]) | ord($data[$spos+3]) << 8; + $this->sheets[$this->sn]['numCols'] = ord($data[$spos+6]) | ord($data[$spos+7]) << 8; + } else { + $this->sheets[$this->sn]['numRows'] = ord($data[$spos+4]) | ord($data[$spos+5]) << 8; + $this->sheets[$this->sn]['numCols'] = ord($data[$spos+10]) | ord($data[$spos+11]) << 8; + } + } + break; + case SPREADSHEET_EXCEL_READER_TYPE_MERGEDCELLS: + $cellRanges = ord($data[$spos]) | ord($data[$spos+1])<<8; + for ($i = 0; $i < $cellRanges; $i++) { + $fr = ord($data[$spos + 8*$i + 2]) | ord($data[$spos + 8*$i + 3])<<8; + $lr = ord($data[$spos + 8*$i + 4]) | ord($data[$spos + 8*$i + 5])<<8; + $fc = ord($data[$spos + 8*$i + 6]) | ord($data[$spos + 8*$i + 7])<<8; + $lc = ord($data[$spos + 8*$i + 8]) | ord($data[$spos + 8*$i + 9])<<8; + if ($lr - $fr > 0) { + $this->sheets[$this->sn]['cellsInfo'][$fr+1][$fc+1]['rowspan'] = $lr - $fr + 1; + } + if ($lc - $fc > 0) { + $this->sheets[$this->sn]['cellsInfo'][$fr+1][$fc+1]['colspan'] = $lc - $fc + 1; + } + } + break; + case SPREADSHEET_EXCEL_READER_TYPE_RK: + case SPREADSHEET_EXCEL_READER_TYPE_RK2: + $row = ord($data[$spos]) | ord($data[$spos+1])<<8; + $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; + $rknum = $this->_GetInt4d($data, $spos + 6); + $numValue = $this->_GetIEEE754($rknum); + $info = $this->_getCellDetails($spos,$numValue,$column); + $this->addcell($row, $column, $info['string'],$info); + break; + case SPREADSHEET_EXCEL_READER_TYPE_LABELSST: + $row = ord($data[$spos]) | ord($data[$spos+1])<<8; + $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; + $xfindex = ord($data[$spos+4]) | ord($data[$spos+5])<<8; + $index = $this->_GetInt4d($data, $spos + 6); + $this->addcell($row, $column, $this->sst[$index], array('xfIndex'=>$xfindex) ); + break; + case SPREADSHEET_EXCEL_READER_TYPE_MULRK: + $row = ord($data[$spos]) | ord($data[$spos+1])<<8; + $colFirst = ord($data[$spos+2]) | ord($data[$spos+3])<<8; + $colLast = ord($data[$spos + $length - 2]) | ord($data[$spos + $length - 1])<<8; + $columns = $colLast - $colFirst + 1; + $tmppos = $spos+4; + for ($i = 0; $i < $columns; $i++) { + $numValue = $this->_GetIEEE754($this->_GetInt4d($data, $tmppos + 2)); + $info = $this->_getCellDetails($tmppos-4,$numValue,$colFirst + $i + 1); + $tmppos += 6; + $this->addcell($row, $colFirst + $i, $info['string'], $info); + } + break; + case SPREADSHEET_EXCEL_READER_TYPE_NUMBER: + $row = ord($data[$spos]) | ord($data[$spos+1])<<8; + $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; + $tmp = unpack("ddouble", substr($data, $spos + 6, 8)); + if ($this->isDate($spos)) { + $numValue = $tmp['double']; + } + else { + $numValue = $this->createNumber($spos); + } + $info = $this->_getCellDetails($spos,$numValue,$column); + $this->addcell($row, $column, $info['string'], $info); + break; + case SPREADSHEET_EXCEL_READER_TYPE_FORMULA: + case SPREADSHEET_EXCEL_READER_TYPE_FORMULA2: + $row = ord($data[$spos]) | ord($data[$spos+1])<<8; + $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; + if ((ord($data[$spos+6])==0) && (ord($data[$spos+12])==255) && (ord($data[$spos+13])==255)) { + + + // http://code.google.com/p/php-excel-reader/issues/detail?id=4 + $previousRow = $row; + $previousCol = $column; + } elseif ((ord($data[$spos+6])==1) && (ord($data[$spos+12])==255) && (ord($data[$spos+13])==255)) { + + // http://code.google.com/p/php-excel-reader/issues/detail?id=4 + if (ord($this->data[$spos+8])==1) { + $this->addcell($row, $column, "TRUE"); + } else { + $this->addcell($row, $column, "FALSE"); + } + } elseif ((ord($data[$spos+6])==2) && (ord($data[$spos+12])==255) && (ord($data[$spos+13])==255)) { + + } elseif ((ord($data[$spos+6])==3) && (ord($data[$spos+12])==255) && (ord($data[$spos+13])==255)) { + + $this->addcell($row, $column, ''); + } else { + + $tmp = unpack("ddouble", substr($data, $spos + 6, 8)); + if ($this->isDate($spos)) { + $numValue = $tmp['double']; + } + else { + $numValue = $this->createNumber($spos); + } + $info = $this->_getCellDetails($spos,$numValue,$column); + $this->addcell($row, $column, $info['string'], $info); + } + break; + case SPREADSHEET_EXCEL_READER_TYPE_BOOLERR: + $row = ord($data[$spos]) | ord($data[$spos+1])<<8; + $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; + $string = ord($data[$spos+6]); + $this->addcell($row, $column, $string); + break; + case SPREADSHEET_EXCEL_READER_TYPE_STRING: + // http://code.google.com/p/php-excel-reader/issues/detail?id=4 + if ($version == SPREADSHEET_EXCEL_READER_BIFF8){ + + $xpos = $spos; + $numChars =ord($data[$xpos]) | (ord($data[$xpos+1]) << 8); + $xpos += 2; + $optionFlags =ord($data[$xpos]); + $xpos++; + $asciiEncoding = (($optionFlags &0x01) == 0) ; + $extendedString = (($optionFlags & 0x04) != 0); + + $richString = (($optionFlags & 0x08) != 0); + if ($richString) { + + $formattingRuns =ord($data[$xpos]) | (ord($data[$xpos+1]) << 8); + $xpos += 2; + } + if ($extendedString) { + + $extendedRunLength =$this->_GetInt4d($this->data, $xpos); + $xpos += 4; + } + $len = ($asciiEncoding)?$numChars : $numChars*2; + $retstr =substr($data, $xpos, $len); + $xpos += $len; + $retstr = ($asciiEncoding)? $retstr : $this->_encodeUTF16($retstr); + } + elseif ($version == SPREADSHEET_EXCEL_READER_BIFF7){ + + $xpos = $spos; + $numChars =ord($data[$xpos]) | (ord($data[$xpos+1]) << 8); + $xpos += 2; + $retstr =substr($data, $xpos, $numChars); + } + $this->addcell($previousRow, $previousCol, $retstr); + break; + case SPREADSHEET_EXCEL_READER_TYPE_ROW: + $row = ord($data[$spos]) | ord($data[$spos+1])<<8; + $rowInfo = ord($data[$spos + 6]) | ((ord($data[$spos+7]) << 8) & 0x7FFF); + if (($rowInfo & 0x8000) > 0) { + $rowHeight = -1; + } else { + $rowHeight = $rowInfo & 0x7FFF; + } + $rowHidden = (ord($data[$spos + 12]) & 0x20) >> 5; + $this->rowInfo[$this->sn][$row+1] = Array('height' => $rowHeight / 20, 'hidden'=>$rowHidden ); + break; + case SPREADSHEET_EXCEL_READER_TYPE_DBCELL: + break; + case SPREADSHEET_EXCEL_READER_TYPE_MULBLANK: + $row = ord($data[$spos]) | ord($data[$spos+1])<<8; + $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; + $cols = ($length / 2) - 3; + for ($c = 0; $c < $cols; $c++) { + $xfindex = ord($data[$spos + 4 + ($c * 2)]) | ord($data[$spos + 5 + ($c * 2)])<<8; + $this->addcell($row, $column + $c, "", array('xfIndex'=>$xfindex)); + } + break; + case SPREADSHEET_EXCEL_READER_TYPE_LABEL: + $row = ord($data[$spos]) | ord($data[$spos+1])<<8; + $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; + $this->addcell($row, $column, substr($data, $spos + 8, ord($data[$spos + 6]) | ord($data[$spos + 7])<<8)); + break; + case SPREADSHEET_EXCEL_READER_TYPE_EOF: + $cont = false; + break; + case SPREADSHEET_EXCEL_READER_TYPE_HYPER: + + $row = ord($this->data[$spos]) | ord($this->data[$spos+1])<<8; + $row2 = ord($this->data[$spos+2]) | ord($this->data[$spos+3])<<8; + $column = ord($this->data[$spos+4]) | ord($this->data[$spos+5])<<8; + $column2 = ord($this->data[$spos+6]) | ord($this->data[$spos+7])<<8; + $linkdata = Array(); + $flags = ord($this->data[$spos + 28]); + $udesc = ""; + $ulink = ""; + $uloc = 32; + $linkdata['flags'] = $flags; + if (($flags & 1) > 0 ) { + + if (($flags & 0x14) == 0x14 ) { + $uloc += 4; + $descLen = ord($this->data[$spos + 32]) | ord($this->data[$spos + 33]) << 8; + $udesc = substr($this->data, $spos + $uloc, $descLen * 2); + $uloc += 2 * $descLen; + } + $ulink = $this->read16bitstring($this->data, $spos + $uloc + 20); + if ($udesc == "") { + $udesc = $ulink; + } + } + $linkdata['desc'] = $udesc; + $linkdata['link'] = $this->_encodeUTF16($ulink); + for ($r=$row; $r<=$row2; $r++) { + for ($c=$column; $c<=$column2; $c++) { + $this->sheets[$this->sn]['cellsInfo'][$r+1][$c+1]['hyperlink'] = $linkdata; + } + } + break; + case SPREADSHEET_EXCEL_READER_TYPE_DEFCOLWIDTH: + $this->defaultColWidth = ord($data[$spos+4]) | ord($data[$spos+5]) << 8; + break; + case SPREADSHEET_EXCEL_READER_TYPE_STANDARDWIDTH: + $this->standardColWidth = ord($data[$spos+4]) | ord($data[$spos+5]) << 8; + break; + case SPREADSHEET_EXCEL_READER_TYPE_COLINFO: + $colfrom = ord($data[$spos+0]) | ord($data[$spos+1]) << 8; + $colto = ord($data[$spos+2]) | ord($data[$spos+3]) << 8; + $cw = ord($data[$spos+4]) | ord($data[$spos+5]) << 8; + $cxf = ord($data[$spos+6]) | ord($data[$spos+7]) << 8; + $co = ord($data[$spos+8]); + for ($coli = $colfrom; $coli <= $colto; $coli++) { + $this->colInfo[$this->sn][$coli+1] = Array('width' => $cw, 'xf' => $cxf, 'hidden' => ($co & 0x01), 'collapsed' => ($co & 0x1000) >> 12); + } + break; + default: + break; + } + $spos += $length; + } + if (!isset($this->sheets[$this->sn]['numRows'])) + $this->sheets[$this->sn]['numRows'] = $this->sheets[$this->sn]['maxrow']; + if (!isset($this->sheets[$this->sn]['numCols'])) + $this->sheets[$this->sn]['numCols'] = $this->sheets[$this->sn]['maxcol']; + } + function isDate($spos) { + $xfindex = ord($this->data[$spos+4]) | ord($this->data[$spos+5]) << 8; + return ($this->xfRecords[$xfindex]['type'] == 'date'); + } + + function _getCellDetails($spos,$numValue,$column) { + $xfindex = ord($this->data[$spos+4]) | ord($this->data[$spos+5]) << 8; + $xfrecord = $this->xfRecords[$xfindex]; + $type = $xfrecord['type']; + $format = $xfrecord['format']; + $formatIndex = $xfrecord['formatIndex']; + $fontIndex = $xfrecord['fontIndex']; + $formatColor = ""; + $rectype = ''; + $string = ''; + $raw = ''; + if (isset($this->_columnsFormat[$column + 1])){ + $format = $this->_columnsFormat[$column + 1]; + } + if ($type == 'date') { + // See http://groups.google.com/group/php-excel-reader-discuss/browse_frm/thread/9c3f9790d12d8e10/f2045c2369ac79de + $rectype = 'date'; + + $utcDays = floor($numValue - ($this->nineteenFour ? SPREADSHEET_EXCEL_READER_UTCOFFSETDAYS1904 : SPREADSHEET_EXCEL_READER_UTCOFFSETDAYS)); + $utcValue = ($utcDays) * SPREADSHEET_EXCEL_READER_MSINADAY; + $dateinfo = gmgetdate($utcValue); + $raw = $numValue; + $fractionalDay = $numValue - floor($numValue) + .0000001; + $totalseconds = floor(SPREADSHEET_EXCEL_READER_MSINADAY * $fractionalDay); + $secs = $totalseconds % 60; + $totalseconds -= $secs; + $hours = floor($totalseconds / (60 * 60)); + $mins = floor($totalseconds / 60) % 60; + $string = date ($format, mktime($hours, $mins, $secs, $dateinfo["mon"], $dateinfo["mday"], $dateinfo["year"])); + } else if ($type == 'number') { + $rectype = 'number'; + $formatted = $this->_format_value($format, $numValue, $formatIndex); + $string = $formatted['string']; + $formatColor = $formatted['formatColor']; + $raw = $numValue; + } else{ + if ($format=="") { + $format = $this->_defaultFormat; + } + $rectype = 'unknown'; + $formatted = $this->_format_value($format, $numValue, $formatIndex); + $string = $formatted['string']; + $formatColor = $formatted['formatColor']; + $raw = $numValue; + } + return array( + 'string'=>$string, + 'raw'=>$raw, + 'rectype'=>$rectype, + 'format'=>$format, + 'formatIndex'=>$formatIndex, + 'fontIndex'=>$fontIndex, + 'formatColor'=>$formatColor, + 'xfIndex'=>$xfindex + ); + } + function createNumber($spos) { + $rknumhigh = $this->_GetInt4d($this->data, $spos + 10); + $rknumlow = $this->_GetInt4d($this->data, $spos + 6); + $sign = ($rknumhigh & 0x80000000) >> 31; + $exp = ($rknumhigh & 0x7ff00000) >> 20; + $mantissa = (0x100000 | ($rknumhigh & 0x000fffff)); + $mantissalow1 = ($rknumlow & 0x80000000) >> 31; + $mantissalow2 = ($rknumlow & 0x7fffffff); + $value = $mantissa / pow( 2 , (20- ($exp - 1023))); + if ($mantissalow1 != 0) $value += 1 / pow (2 , (21 - ($exp - 1023))); + $value += $mantissalow2 / pow (2 , (52 - ($exp - 1023))); + if ($sign) {$value = -1 * $value;} + return $value; + } + function addcell($row, $col, $string, $info=null) { + $this->sheets[$this->sn]['maxrow'] = max($this->sheets[$this->sn]['maxrow'], $row + $this->_rowoffset); + $this->sheets[$this->sn]['maxcol'] = max($this->sheets[$this->sn]['maxcol'], $col + $this->_coloffset); + $this->sheets[$this->sn]['cells'][$row + $this->_rowoffset][$col + $this->_coloffset] = $string; + if ($this->store_extended_info && $info) { + foreach ($info as $key=>$val) { + $this->sheets[$this->sn]['cellsInfo'][$row + $this->_rowoffset][$col + $this->_coloffset][$key] = $val; + } + } + } + function _GetIEEE754($rknum) { + if (($rknum & 0x02) != 0) { + $value = $rknum >> 2; + } else { + + + // http://research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html + + + + $sign = ($rknum & 0x80000000) >> 31; + $exp = ($rknum & 0x7ff00000) >> 20; + $mantissa = (0x100000 | ($rknum & 0x000ffffc)); + $value = $mantissa / pow( 2 , (20- ($exp - 1023))); + if ($sign) { + $value = -1 * $value; + } + + } + if (($rknum & 0x01) != 0) { + $value /= 100; + } + return $value; + } + function _encodeUTF16($string) { + $result = $string; + if ($this->_defaultEncoding){ + switch ($this->_encoderFunction){ + case 'iconv' : $result = iconv('UTF-16LE', $this->_defaultEncoding, $string); + break; + case 'mb_convert_encoding' : $result = mb_convert_encoding($string, $this->_defaultEncoding, 'UTF-16LE' ); + break; + } + } + return $result; + } + function _GetInt4d($data, $pos) { + $value = ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) << 16) | (ord($data[$pos+3]) << 24); + if ($value>=4294967294) { + $value=-2; + } + return $value; + } +} \ No newline at end of file diff --git a/app/helpers/Pict_helper.php b/app/helpers/Pict_helper.php new file mode 100644 index 000000000..304a01ac8 --- /dev/null +++ b/app/helpers/Pict_helper.php @@ -0,0 +1,478 @@ + $src_height){ + $dst_width = 440; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 300; + + $im = imagecreatetruecolor(440,$dst_height ); + imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 440; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 440; + + $im = imagecreatetruecolor($dst_width,440); + imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload ."kecil_".$fupload_name); + +$src_width = imageSX($im_src); +$src_height = imageSY($im_src); +if($src_width > $src_height){ + $dst_width = 1366; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 600; + + $im = imagecreatetruecolor(1366,$dst_height); + imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 1366; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 1366; + + $im = imagecreatetruecolor($dst_width,1366); + imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload ."sedang_".$fupload_name); + +imagedestroy($im_src); +imagedestroy($im); + +unlink($vfile_upload); +return true; +} +function UploadSimbolx($fupload_name,$old_gambar){ +$vdir_upload = "assets/gis/simbol"; +if($old_gambar!=""){ + unlink($vdir_upload."kecil_".$old_gambar); + unlink($vdir_upload.$old_gambar); +} +$vfile_upload = $vdir_upload . $fupload_name; +move_uploaded_file($_FILES["gambar"]["tmp_name"], $vfile_upload); + +$im_src = imagecreatefromjpeg($vfile_upload); +$src_width = imageSX($im_src); +$src_height = imageSY($im_src); +if(($src_width * 20) < ($src_height * 44)){ + $dst_width = 440; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 300; + + $im = imagecreatetruecolor(440,300); + imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 300; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 440; + + $im = imagecreatetruecolor(440,300); + imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload ."kecil_".$fupload_name); + +imagedestroy($im_src); +imagedestroy($im); + + +return true; +} +function UploadArtikel($fupload_name,$gambar,$fp){ +$vdir_upload = "assets/files/artikel/"; + + +$vfile_upload = $vdir_upload . $fupload_name; +move_uploaded_file($_FILES["$gambar"]["tmp_name"], $vfile_upload); + +$im_src = imagecreatefromjpeg($vfile_upload); +$src_width = imageSX($im_src); +$src_height = imageSY($im_src); +if($src_width > $src_height){ + $dst_width = 440; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 300; + + $im = imagecreatetruecolor(440,$dst_height); + imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 440; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 440; + + $im = imagecreatetruecolor($dst_width,440); + imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload ."kecil_".$fp.$fupload_name); + +imagedestroy($im_src); +imagedestroy($im); + + +$im_src = imagecreatefromjpeg($vfile_upload); +$src_width = imageSX($im_src); +$src_height = imageSY($im_src); +if($src_width > $src_height){ + $dst_width = 1366; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 600; + + $im = imagecreatetruecolor(1366,$dst_height); + imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 1366; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 1366; + + $im = imagecreatetruecolor($dst_width,1366); + imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload ."sedang_".$fp.$fupload_name); + +imagedestroy($im_src); +imagedestroy($im); + + +unlink($vfile_upload); +return true; +} +function HapusArtikel($gambar){ +$vdir_upload = "assets/files/artikel/"; +$vfile_upload = $vdir_upload . "sedang_" . $gambar; +unlink($vfile_upload); +$vfile_upload = $vdir_upload . "kecil_" . $gambar; +unlink($vfile_upload); +return true; +} +function UploadLokasi($fupload_name){ +$vdir_upload = "assets/files/gis/lokasi/"; +$vfile_upload = $vdir_upload . $fupload_name; +move_uploaded_file($_FILES["foto"]["tmp_name"], $vfile_upload); + +$im_src = imagecreatefromjpeg($vfile_upload); +$src_width = imageSX($im_src); +$src_height = imageSY($im_src); +if(($src_width / $src_height) < (12 / 10)){ + $dst_width = 120; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 100; + + $im = imagecreatetruecolor(120,100); + imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 100; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 120; + + $im = imagecreatetruecolor(120,100); + imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload ."kecil_".$fupload_name); + +imagedestroy($im_src); +imagedestroy($im); + + +$im_src = imagecreatefromjpeg($vfile_upload); +$src_width = imageSX($im_src); +$src_height = imageSY($im_src); +if(($src_width / $src_height) < (44 / 30)){ + $dst_width = 1366; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 600; + + $im = imagecreatetruecolor(1366,600); + imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 600; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 1366; + + $im = imagecreatetruecolor(1366,600); + imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload ."sedang_".$fupload_name); + +imagedestroy($im_src); +imagedestroy($im); +unlink($vdir_upload.$fupload_name); + + +return true; +} +function UploadGaris($fupload_name){ +$vdir_upload = "assets/files/gis/garis/"; +$vfile_upload = $vdir_upload . $fupload_name; +move_uploaded_file($_FILES["foto"]["tmp_name"], $vfile_upload); + +$im_src = imagecreatefromjpeg($vfile_upload); +$src_width = imageSX($im_src); +$src_height = imageSY($im_src); +if(($src_width / $src_height) < (12 / 10)){ + $dst_width = 120; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 100; + + $im = imagecreatetruecolor(120,100); + imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 100; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 120; + + $im = imagecreatetruecolor(120,100); + imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload ."kecil_".$fupload_name); + +imagedestroy($im_src); +imagedestroy($im); + + +$im_src = imagecreatefromjpeg($vfile_upload); +$src_width = imageSX($im_src); +$src_height = imageSY($im_src); +if(($src_width / $src_height) < (44 / 30)){ + $dst_width = 1366; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 600; + + $im = imagecreatetruecolor(1366,600); + imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 600; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 1366; + + $im = imagecreatetruecolor(1366,600); + imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload ."sedang_".$fupload_name); + +imagedestroy($im_src); +imagedestroy($im); +unlink($vdir_upload.$fupload_name); + + +return true; +} +function UploadArea($fupload_name){ +$vdir_upload = "assets/files/gis/area/"; +$vfile_upload = $vdir_upload . $fupload_name; +move_uploaded_file($_FILES["foto"]["tmp_name"], $vfile_upload); + +$im_src = imagecreatefromjpeg($vfile_upload); +$src_width = imageSX($im_src); +$src_height = imageSY($im_src); +if(($src_width / $src_height) < (12 / 10)){ + $dst_width = 120; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 100; + + $im = imagecreatetruecolor(120,100); + imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 100; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 120; + + $im = imagecreatetruecolor(120,100); + imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload ."kecil_".$fupload_name); + +imagedestroy($im_src); +imagedestroy($im); + + +$im_src = imagecreatefromjpeg($vfile_upload); +$src_width = imageSX($im_src); +$src_height = imageSY($im_src); +if(($src_width / $src_height) < (44 / 30)){ + $dst_width = 1366; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 600; + + $im = imagecreatetruecolor(1366,600); + imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 600; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 1366; + + $im = imagecreatetruecolor(1366,600); + imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload ."sedang_".$fupload_name); + +imagedestroy($im_src); +imagedestroy($im); +unlink($vdir_upload.$fupload_name); + + +return true; +} +function UploadLogo($fupload_name,$old_foto,$tipe_file){ +$vdir_upload = "assets/files/logo/"; +unlink($vdir_upload.$old_foto); +$vfile_upload = $vdir_upload . $fupload_name; +if($tipe_file == "image/jpeg" OR $tipe_file == "image/pjpeg"){ + +move_uploaded_file($_FILES["logo"]["tmp_name"], $vfile_upload); +$im_src = imagecreatefromjpeg($vfile_upload); +$src_width = imageSX($im_src); +$src_height = imageSY($im_src); +if($src_width < $src_height){ + $dst_width = 100; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 100; + + $im = imagecreatetruecolor(100,100); + imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 100; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 100; + + $im = imagecreatetruecolor(100,100); + imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload .$fupload_name); + +imagedestroy($im_src); +imagedestroy($im); + +return true; +}else{ + move_uploaded_file($_FILES["logo"]["tmp_name"], $vfile_upload); +} +} +function UploadLogox($fupload_name){ +$vdir_upload = "assets/images/background/"; +$vfile_upload = $vdir_upload . $fupload_name; +move_uploaded_file($_FILES["logo"]["tmp_name"], $vfile_upload); +} +function UploadSimbol($fupload_name){ +$vdir_upload = "assets/images/gis/point/"; +$vfile_upload = $vdir_upload . $fupload_name; +move_uploaded_file($_FILES["simbol"]["tmp_name"], $vfile_upload); +} +function UploadDocument($fupload_name){ +$vdir_upload = "assets/files/dokumen/"; +$vfile_upload = $vdir_upload . $fupload_name; +move_uploaded_file($_FILES["satuan"]["tmp_name"], $vfile_upload); +return true; +} +function UploadDocument2($fupload_name){ +$vdir_upload = "assets/files/dokumen/"; + +$vfile_upload = $vdir_upload . $fupload_name; +move_uploaded_file($_FILES["dokumen"]["tmp_name"], $vfile_upload); +return true; +} +function UploadPengesahan($fupload_name){ +$vdir_upload = "assets/files/pengesahan/"; +$vfile_upload = $vdir_upload . $fupload_name; +move_uploaded_file($_FILES["pengesahan"]["tmp_name"], $vfile_upload); + +$im_src = imagecreatefromjpeg($vfile_upload); +$src_width = imageSX($im_src); +$src_height = imageSY($im_src); +if(($src_width / $src_height) < (12 / 10)){ + $dst_width = 120; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 100; + + $im = imagecreatetruecolor(120,100); + imagecopyresampled($im, $im_src, 0, 0, 0, $cut_height, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 100; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 120; + + $im = imagecreatetruecolor(120,100); + imagecopyresampled($im, $im_src, 0, 0, $cut_width, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload ."kecil_".$fupload_name); + +imagedestroy($im_src); +imagedestroy($im); + + +$im_src = imagecreatefromjpeg($vfile_upload); +$src_width = imageSX($im_src); +$src_height = imageSY($im_src); +if($src_width > $src_height){ + $dst_width = 1366; + $dst_height = ($dst_width/$src_width)*$src_height; + $cut_height = $dst_height - 800; + + $im = imagecreatetruecolor(1366,$dst_height); + imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); + +}else{ + $dst_height = 1366; + $dst_width = ($dst_height/$src_height)*$src_width; + $cut_width = $dst_width - 1366; + + $im = imagecreatetruecolor($dst_width,1366); + imagecopyresampled($im, $im_src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height); +} +imagejpeg($im,$vdir_upload.$fupload_name); + +imagedestroy($im_src); +imagedestroy($im); + +return true; + +} \ No newline at end of file diff --git a/app/helpers/index.html b/app/helpers/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/helpers/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/hooks/index.html b/app/hooks/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/hooks/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/index.html b/app/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/language/english/index.html b/app/language/english/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/language/english/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/language/index.html b/app/language/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/language/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/libraries/Paging.php b/app/libraries/Paging.php new file mode 100644 index 000000000..6fbb35fc9 --- /dev/null +++ b/app/libraries/Paging.php @@ -0,0 +1,60 @@ + 0) + $this->init($props); + } + function init($input=array()){ + + if(isset($input['page'])) $this->page = $input['page']; + if(isset($input['per_page'])) $this->per_page = $input['per_page']; + if(isset($input['num_rows'])) $this->num_rows = $input['num_rows']; + + + if((int)$this->page<1) $this->page=1; + if((int)$this->per_page<1) $this->per_page=50; + if((int)$this->num_rows<1) $my_num_rows=1; + else $my_num_rows = (int)$this->num_rows; + + $o=($my_num_rows-1)/$this->per_page; + $this->num_page=(int)$o+1; + + $o=($this->page-1)*$this->per_page; + $this->offset=(int)$o; + + $this->prev=$this->page-1; + $this->next=$this->page+1; + if($this->next>$this->num_page) $this->next=0; + + + if($this->page < 20){ + $start=1; + if($this->num_page > 30) + $end=20; + else $end=$this->num_page; + } + else if($this->page > $this->num_page-20){ + $start=$this->num_page-20; + $end=$this->num_page; + } + else{ + $start=$this->page-9; + $end=$this->page+10; + } + $this->start=1; + $this->end=$this->num_page; + $this->start_link=$start; + $this->end_link=$end; + } +} \ No newline at end of file diff --git a/app/libraries/index.html b/app/libraries/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/libraries/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/logs/index.html b/app/logs/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/logs/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/models/Analisis_grafik_model.php b/app/models/Analisis_grafik_model.php new file mode 100644 index 000000000..38c41f3bc --- /dev/null +++ b/app/models/Analisis_grafik_model.php @@ -0,0 +1,232 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.pertanyaan LIKE '$kw' OR u.pertanyaan LIKE '$kw')"; + return $search_sql; + } + } + function master_sql(){ + if(isset($_SESSION['analisis_master'])){ + $kf = $_SESSION['analisis_master']; + $filter_sql= " AND u.id_master = $kf"; + return $filter_sql; + } + } + function dusun_sql(){ + if(isset($_SESSION['dusun'])){ + $kf = $_SESSION['dusun']; + $dusun_sql= " AND c.dusun = '$kf'"; + return $dusun_sql; + } + } + function rw_sql(){ + if(isset($_SESSION['rw'])){ + $kf = $_SESSION['rw']; + $rw_sql= " AND c.rw = '$kf'"; + return $rw_sql; + } + } + function rt_sql(){ + if(isset($_SESSION['rt'])){ + $kf = $_SESSION['rt']; + $rt_sql= " AND c.rt = '$kf'"; + return $rt_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM analisis_klasifikasi u WHERE 1"; + $sql .= $this->search_sql(); + $sql .= $this->master_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + $per = $this->get_aktif_periode(); + $pembagi = $this->get_analisis_master(); + $pembagi = $pembagi['pembagi']+0; + + switch($o){ + case 1: $order_sql = ' ORDER BY u.minval'; break; + case 2: $order_sql = ' ORDER BY u.minval DESC'; break; + case 3: $order_sql = ' ORDER BY u.minval'; break; + case 4: $order_sql = ' ORDER BY u.minval DESC'; break; + case 5: $order_sql = ' ORDER BY g.minval'; break; + case 6: $order_sql = ' ORDER BY g.minval DESC'; break; + default:$order_sql = ' ORDER BY u.minval'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT u.*,(SELECT COUNT(id) FROM analisis_respon_hasil WHERE akumulasi/$pembagi >= u.minval AND akumulasi/$pembagi < u.maxval AND id_periode=?) as jumlah FROM analisis_klasifikasi u WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->master_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql,$per); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($iget_aktif_periode(); + $pembagi = $this->get_analisis_master(); + $pembagi = $pembagi['pembagi']+0; + + switch($o){ + case 1: $order_sql = ' ORDER BY u.minval'; break; + case 2: $order_sql = ' ORDER BY u.minval DESC'; break; + case 3: $order_sql = ' ORDER BY u.minval'; break; + case 4: $order_sql = ' ORDER BY u.minval DESC'; break; + case 5: $order_sql = ' ORDER BY g.minval'; break; + case 6: $order_sql = ' ORDER BY g.minval DESC'; break; + default:$order_sql = ' ORDER BY u.minval'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT u.* FROM analisis_klasifikasi u WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->master_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($idb->query($sql,array($data[$i]['minval'],$data[$i]['maxval'])); + $data[$i]['jumlah'] = $query->result_array(); + + $i++; + $j++; + } + return $data; + } + function insert(){ + $data = $_POST; + $data['id_master']=$_SESSION['analisis_master']; + $outp = $this->db->insert('analisis_klasifikasi',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $data['id_master']=$_SESSION['analisis_master']; + $this->db->where('id',$id); + $outp = $this->db->update('analisis_klasifikasi',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM analisis_klasifikasi WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM analisis_klasifikasi WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function get_analisis_klasifikasi($id=0){ + $sql = "SELECT * FROM analisis_klasifikasi WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_analisis_master(){ + $sql = "SELECT * FROM analisis_master WHERE id=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + return $query->row_array(); + } + function get_subjek($id=0){ + $sql = "SELECT u.*,p.nama FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id WHERE u.id=?"; + $query = $this->db->query($sql,$id); + return $query->row_array(); + } + function get_aktif_periode(){ + $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $data = $query->row_array(); + + return $data['id']; + } + + function get_periode(){ + $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $data = $query->row_array(); + return $data['nama']; + } + function list_periode(){ + $sql = "SELECT * FROM analisis_periode WHERE id_master=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $data = $query->result_array(); + return $data; + } +} +?> \ No newline at end of file diff --git a/app/models/Analisis_import_model.php b/app/models/Analisis_import_model.php new file mode 100644 index 000000000..306dcdf38 --- /dev/null +++ b/app/models/Analisis_import_model.php @@ -0,0 +1,103 @@ +load->helper('excel'); + } + function import_excel(){ + + $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']); + $sheet=0; + + $master['nama'] = $data->val(1,2,$sheet); + $master['subjek_tipe'] = $data->val(2,2,$sheet); + $master['lock'] = $data->val(3,2,$sheet); + $master['pembagi'] = $data->val(4,2,$sheet); + $master['deskripsi'] = $data->val(5,2,$sheet); + + $outp = $this->db->insert('analisis_master',$master); + $id_master = $this->db->insert_id(); + + $periode['id_master'] = $id_master; + $periode['nama'] = $data->val(6,2,$sheet); + $periode['tahun_pelaksanaan'] = $data->val(7,2,$sheet); + $periode['keterangan'] = $data->val(5,2,$sheet); + $periode['aktif'] = 1; + $this->db->insert('analisis_periode',$periode); + + $sheet=1; + $baris = $data->rowcount($sheet_index=$sheet); + $kolom = $data->colcount($sheet_index=$sheet); + + for ($i=2; $i<=$baris; $i++){ + + $sql = "SELECT * FROM analisis_kategori_indikator WHERE kategori=? AND id_master=?"; + $query = $this->db->query($sql,array($data->val($i,3,$sheet),$id_master)); + $cek = $query->row_array(); + + if(!$cek){ + $kategori['id_master'] = $id_master; + $kategori['kategori'] = $data->val($i,3,$sheet); + $this->db->insert('analisis_kategori_indikator',$kategori); + } + } + + for ($i=2; $i<=$baris; $i++){ + + $indikator['id_master'] = $id_master; + $indikator['nomor'] = $data->val($i,1,$sheet); + $indikator['pertanyaan'] = $data->val($i,2,$sheet); + + $sql = "SELECT * FROM analisis_kategori_indikator WHERE kategori=? AND id_master=?"; + $query = $this->db->query($sql,array($data->val($i,3,$sheet),$id_master)); + $kategori = $query->row_array(); + + $indikator['id_kategori'] = $kategori['id']; + $indikator['id_tipe'] = $data->val($i,4,$sheet); + $indikator['bobot'] = $data->val($i,5,$sheet); + $indikator['act_analisis'] = $data->val($i,6,$sheet); + + $this->db->insert('analisis_indikator',$indikator); + } + + $sheet=2; + $baris = $data->rowcount($sheet_index=$sheet); + $kolom = $data->colcount($sheet_index=$sheet); + + for ($i=2; $i<=$baris; $i++){ + $kode = explode(".",$data->val($i,3,$sheet)); + + $parameter['kode_jawaban'] = $data->val($i,2,$sheet); + $parameter['jawaban'] = $data->val($i,3,$sheet); + + $sql = "SELECT id FROM analisis_indikator WHERE nomor=? AND id_master=?"; + $query = $this->db->query($sql,array($data->val($i,1,$sheet),$id_master)); + $indikator = $query->row_array(); + + $parameter['id_indikator'] = $indikator['id']; + $parameter['nilai'] = $data->val($i,4,$sheet); + $parameter['asign'] = 1; + + $this->db->insert('analisis_parameter',$parameter); + } + + + $sheet=3; + $baris = $data->rowcount($sheet_index=$sheet); + $kolom = $data->colcount($sheet_index=$sheet); + + + for ($i=2; $i<=$baris; $i++){ + + $klasifikasi['id_master'] = $id_master; + $klasifikasi['nama'] = $data->val($i,1,$sheet); + $klasifikasi['minval'] = $data->val($i,2,$sheet); + $klasifikasi['maxval'] = $data->val($i,3,$sheet); + + $this->db->insert('analisis_klasifikasi',$klasifikasi); + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } +} \ No newline at end of file diff --git a/app/models/Analisis_indikator_model.php b/app/models/Analisis_indikator_model.php new file mode 100644 index 000000000..753c2a261 --- /dev/null +++ b/app/models/Analisis_indikator_model.php @@ -0,0 +1,252 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.pertanyaan LIKE '$kw' OR u.pertanyaan LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND u.act_analisis = $kf"; + return $filter_sql; + } + } + function master_sql(){ + if(isset($_SESSION['analisis_master'])){ + $kf = $_SESSION['analisis_master']; + $filter_sql= " AND u.id_master = $kf"; + return $filter_sql; + } + } + function tipe_sql(){ + if(isset($_SESSION['tipe'])){ + $kf = $_SESSION['tipe']; + $filter_sql= " AND u.id_tipe = $kf"; + return $filter_sql; + } + } + function kategori_sql(){ + if(isset($_SESSION['kategori'])){ + $kf = $_SESSION['kategori']; + $filter_sql= " AND u.id_kategori = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM analisis_indikator u WHERE 1"; + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->master_sql(); + $sql .= $this->tipe_sql(); + $sql .= $this->kategori_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.nomor'; break; + case 2: $order_sql = ' ORDER BY u.nomor DESC'; break; + case 3: $order_sql = ' ORDER BY u.pertanyaan'; break; + case 4: $order_sql = ' ORDER BY u.pertanyaan DESC'; break; + case 5: $order_sql = ' ORDER BY u.id_kategori'; break; + case 6: $order_sql = ' ORDER BY u.id_kategori DESC'; break; + default:$order_sql = ' ORDER BY u.nomor'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT u.*,t.tipe AS tipe_indikator,k.kategori AS kategori FROM analisis_indikator u LEFT JOIN analisis_tipe_indikator t ON u.id_tipe = t.id LEFT JOIN analisis_kategori_indikator k ON u.id_kategori = k.id WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->master_sql(); + $sql .= $this->tipe_sql(); + $sql .= $this->kategori_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($idb->insert('analisis_indikator',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + if($data['id_tipe']!=1){ + $data['act_analisis']=2; + $data['bobot']=0; + } + + if($data['id_tipe']==3 OR $data['id_tipe']==4){ + $sql = "DELETE FROM analisis_parameter WHERE id_indikator=?"; + $this->db->query($sql,$id); + + } + + $data['id_master']=$_SESSION['analisis_master']; + $this->db->where('id',$id); + $outp = $this->db->update('analisis_indikator',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM analisis_indikator WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM analisis_indikator WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function p_insert($in=''){ + $data = $_POST; + $data['id_indikator']=$in; + $outp = $this->db->insert('analisis_parameter',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function p_update($id=0){ + $data = $_POST; + $this->db->where('id',$id); + $outp = $this->db->update('analisis_parameter',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function p_delete($id=''){ + $sql = "DELETE FROM analisis_parameter WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function p_delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM analisis_parameter WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_indikator($id=0){ + $sql = "SELECT * FROM analisis_parameter WHERE id_indikator = ?"; + $query = $this->db->query($sql,$id); + $data= $query->result_array(); + + + $i=0; + while($idb->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_analisis_master(){ + $sql = "SELECT * FROM analisis_master WHERE id=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + return $query->row_array(); + } + function get_analisis_parameter($id=''){ + $sql = "SELECT * FROM analisis_parameter WHERE id=?"; + $query = $this->db->query($sql,$id); + return $query->row_array(); + } + function list_tipe(){ + $sql = "SELECT * FROM analisis_tipe_indikator"; + $query = $this->db->query($sql); + return $query->result_array(); + } + function list_kategori(){ + $sql = "SELECT u.* FROM analisis_kategori_indikator u WHERE 1"; + $sql .= $this->master_sql(); + $query = $this->db->query($sql); + return $query->result_array(); + } +} +?> \ No newline at end of file diff --git a/app/models/Analisis_kategori_model.php b/app/models/Analisis_kategori_model.php new file mode 100644 index 000000000..4c4325cd5 --- /dev/null +++ b/app/models/Analisis_kategori_model.php @@ -0,0 +1,137 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.pertanyaan LIKE '$kw' OR u.pertanyaan LIKE '$kw')"; + return $search_sql; + } + } + function master_sql(){ + if(isset($_SESSION['analisis_master'])){ + $kf = $_SESSION['analisis_master']; + $filter_sql= " AND u.id_master = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM analisis_kategori_indikator u WHERE 1"; + $sql .= $this->search_sql(); + $sql .= $this->master_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.id'; break; + case 2: $order_sql = ' ORDER BY u.id DESC'; break; + case 3: $order_sql = ' ORDER BY u.id'; break; + case 4: $order_sql = ' ORDER BY u.id DESC'; break; + case 5: $order_sql = ' ORDER BY g.id'; break; + case 6: $order_sql = ' ORDER BY g.id DESC'; break; + default:$order_sql = ' ORDER BY u.id'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT u.* FROM analisis_kategori_indikator u WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->master_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($idb->insert('analisis_kategori_indikator',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $data['id_master']=$_SESSION['analisis_master']; + $this->db->where('id',$id); + $outp = $this->db->update('analisis_kategori_indikator',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM analisis_kategori_indikator WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM analisis_kategori_indikator WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function get_analisis_kategori($id=0){ + $sql = "SELECT * FROM analisis_kategori_indikator WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_analisis_master(){ + $sql = "SELECT * FROM analisis_master WHERE id=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + return $query->row_array(); + } +} +?> \ No newline at end of file diff --git a/app/models/Analisis_klasifikasi_model.php b/app/models/Analisis_klasifikasi_model.php new file mode 100644 index 000000000..35103bf65 --- /dev/null +++ b/app/models/Analisis_klasifikasi_model.php @@ -0,0 +1,137 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.pertanyaan LIKE '$kw' OR u.pertanyaan LIKE '$kw')"; + return $search_sql; + } + } + function master_sql(){ + if(isset($_SESSION['analisis_master'])){ + $kf = $_SESSION['analisis_master']; + $filter_sql= " AND u.id_master = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM analisis_klasifikasi u WHERE 1"; + $sql .= $this->search_sql(); + $sql .= $this->master_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.minval'; break; + case 2: $order_sql = ' ORDER BY u.minval DESC'; break; + case 3: $order_sql = ' ORDER BY u.minval'; break; + case 4: $order_sql = ' ORDER BY u.minval DESC'; break; + case 5: $order_sql = ' ORDER BY g.minval'; break; + case 6: $order_sql = ' ORDER BY g.minval DESC'; break; + default:$order_sql = ' ORDER BY u.minval'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT u.* FROM analisis_klasifikasi u WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->master_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($idb->insert('analisis_klasifikasi',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $data['id_master']=$_SESSION['analisis_master']; + $this->db->where('id',$id); + $outp = $this->db->update('analisis_klasifikasi',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM analisis_klasifikasi WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM analisis_klasifikasi WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function get_analisis_klasifikasi($id=0){ + $sql = "SELECT * FROM analisis_klasifikasi WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_analisis_master(){ + $sql = "SELECT * FROM analisis_master WHERE id=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + return $query->row_array(); + } +} +?> \ No newline at end of file diff --git a/app/models/Analisis_laporan_model.php b/app/models/Analisis_laporan_model.php new file mode 100644 index 000000000..b5fd03037 --- /dev/null +++ b/app/models/Analisis_laporan_model.php @@ -0,0 +1,374 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$cari. '%'; + + $subjek = $_SESSION['subjek_tipe']; + switch($subjek){ + case 1: $search_sql= " AND (u.nik LIKE '$kw' OR u.nama LIKE '$kw')"; break; + case 2: $search_sql= " AND (u.no_kk LIKE '$kw' OR p.nama LIKE '$kw')"; break; + case 3: $search_sql= " AND ((u.no_kk LIKE '$kw' OR p.nama LIKE '$kw') OR ((SELECT COUNT(id) FROM tweb_penduduk WHERE nik LIKE '$kw' AND id_rtm = u.id) > 1) OR ((SELECT COUNT(id) FROM tweb_penduduk WHERE nama LIKE '$kw' AND id_rtm = u.id) > 1))"; break; + case 4: $search_sql= " AND (u.nama LIKE '$kw' OR p.nama LIKE '$kw')"; break; + default: return null; + } + return $search_sql; + } + } + function master_sql(){ + if(isset($_SESSION['analisis_master'])){ + $kf = $_SESSION['analisis_master']; + $filter_sql= " AND u.id_master = $kf"; + return $filter_sql; + } + } + + function dusun_sql(){ + if(isset($_SESSION['dusun'])){ + $kf = $_SESSION['dusun']; + $dusun_sql= " AND c.dusun = '$kf'"; + return $dusun_sql; + } + } + function rw_sql(){ + if(isset($_SESSION['rw'])){ + $kf = $_SESSION['rw']; + $rw_sql= " AND c.rw = '$kf'"; + return $rw_sql; + } + } + function rt_sql(){ + if(isset($_SESSION['rt'])){ + $kf = $_SESSION['rt']; + $rt_sql= " AND c.rt = '$kf'"; + return $rt_sql; + } + } + function klasifikasi_sql(){ + if(isset($_SESSION['klasifikasi'])){ + $kf = $_SESSION['klasifikasi']; + $klasifikasi_sql= " AND k.id = '$kf' "; + return $klasifikasi_sql; + } + } + function jawab_sql(){ + if(isset($_SESSION['jawab'])){ + $per = $this->get_aktif_periode(); + $kf = $_SESSION['jawab']; + $jmkf = $_SESSION['jmkf']; + $jawab_sql= "AND x.id_parameter IN ($kf) AND ((SELECT COUNT(id_parameter) FROM analisis_respon WHERE id_subjek = u.id AND id_periode = $per AND id_parameter IN ($kf)) = $jmkf) "; + return $jawab_sql; + } + } + function paging($p=1,$o=0){ + $subjek = $_SESSION['subjek_tipe']; + $master = $this->get_analisis_master(); + $id_kelompok = $master['id_kelompok']; + + $per = $this->get_aktif_periode(); + $pembagi = $this->get_analisis_master(); + $pembagi = $pembagi['pembagi']+0; + + switch($subjek){ + case 1: $sql = "SELECT COUNT(DISTINCT u.id) AS id FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id"; break; + case 2: $sql = "SELECT COUNT(DISTINCT u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id"; break; + case 3: $sql = "SELECT COUNT(DISTINCT u.id) AS id FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id"; break; + case 4: $sql = "SELECT COUNT(DISTINCT u.id) AS id FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id"; break; + + default: return null; + + } + + if(isset($_SESSION['jawab'])){ + + $sql .= " LEFT JOIN analisis_respon x ON u.id = x.id_subjek"; + $sql .= " LEFT JOIN analisis_respon_hasil h ON u.id = h.id_subjek LEFT JOIN analisis_klasifikasi k ON h.akumulasi/$pembagi >= k.minval AND h.akumulasi/$pembagi <= k.maxval WHERE h.id_periode = ? AND x.id_periode = ? AND k.id_master = ? "; + $sql .= $this->search_sql(); + $sql .= $this->klasifikasi_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $this->jawab_sql(); + $query = $this->db->query($sql,array($per,$per,$_SESSION['analisis_master'])); + }else{ + $sql .= " LEFT JOIN analisis_respon_hasil h ON u.id = h.id_subjek LEFT JOIN analisis_klasifikasi k ON h.akumulasi/$pembagi >= k.minval AND h.akumulasi/$pembagi <= k.maxval WHERE h.id_periode = ? AND k.id_master =?"; + $sql .= $this->search_sql(); + $sql .= $this->klasifikasi_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $this->jawab_sql(); + $query = $this->db->query($sql,array($per,$_SESSION['analisis_master'])); + } + + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + $per = $this->get_aktif_periode(); + $pembagi = $this->get_analisis_master(); + $pembagi = $pembagi['pembagi']+0; + + switch($o){ + case 1: $order_sql = ' ORDER BY u.id'; break; + case 2: $order_sql = ' ORDER BY u.id DESC'; break; + case 3: $order_sql = ' ORDER BY u.id'; break; + case 4: $order_sql = ' ORDER BY u.id DESC'; break; + case 5: $order_sql = ' ORDER BY cek'; break; + case 6: $order_sql = ' ORDER BY cek DESC'; break; + default:$order_sql = ''; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $subjek = $_SESSION['subjek_tipe']; + switch($subjek){ + case 1: $sql = "SELECT u.id,u.nik AS uid,u.nama,c.dusun,c.rw,c.rt,u.sex,h.akumulasi/$pembagi AS cek,k.nama AS klasifikasi FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id "; break; + + case 2: $sql = "SELECT u.id,u.no_kk AS uid,p.nama,c.dusun,c.rw,c.rt,p.sex,h.akumulasi/$pembagi AS cek,k.nama AS klasifikasi FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id " ; break; + + case 3: $sql = "SELECT u.id,u.no_kk AS uid,p.nama,c.dusun,c.rw,c.rt,p.sex,h.akumulasi/$pembagi AS cek,k.nama AS klasifikasi FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id "; break; + + case 4: $sql = "SELECT u.id,u.kode AS nid,u.nama,p.sex,c.dusun,c.rw,c.rt,h.akumulasi/$pembagi AS cek,k.nama AS klasifikasi FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id "; break; + + default: return null; + + } + + if(isset($_SESSION['jawab'])){ + $sql .= "LEFT JOIN analisis_respon x ON u.id = x.id_subjek "; + $sql .= "LEFT JOIN analisis_respon_hasil h ON u.id = h.id_subjek LEFT JOIN analisis_klasifikasi k ON h.akumulasi/$pembagi > k.minval AND h.akumulasi/$pembagi <= k.maxval "; + $sql .= "WHERE h.id_periode = ? AND x.id_periode = ? AND k.id_master = ? "; + $sql .= $this->search_sql(); + $sql .= $this->klasifikasi_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $this->jawab_sql(); + $sql .= " GROUP BY u.id "; + $sql .= $order_sql; + $sql .= $paging_sql; + $query = $this->db->query($sql,array($per,$per,$_SESSION['analisis_master'])); + }else{ + $sql .= "LEFT JOIN analisis_respon_hasil h ON u.id = h.id_subjek LEFT JOIN analisis_klasifikasi k ON h.akumulasi/$pembagi > k.minval AND h.akumulasi/$pembagi <= k.maxval "; + $sql .= "WHERE h.id_periode = ? AND k.id_master = ?"; + $sql .= $this->search_sql(); + $sql .= $this->klasifikasi_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + $query = $this->db->query($sql,array($per,$_SESSION['analisis_master'])); + } + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($i"; + + }else{ + $data[$i]['nilai'] = "-"; + $data[$i]['set'] = ""; + + $data[$i]['klasifikasi'] = '-'; + } + + $data[$i]['jk'] = "-"; + if($data[$i]['sex'] == 1) + $data[$i]['jk'] = "L"; + else + $data[$i]['jk'] = "P"; + + $i++; + $j++; + } + return $data; + } + function list_jawab2($id=0,$in=0){ + $per = $this->get_aktif_periode(); + $sql = "SELECT s.id as id_parameter,s.jawaban as jawaban,s.nilai FROM analisis_respon r LEFT JOIN analisis_parameter s ON r.id_parameter = s.id WHERE r.id_subjek = ? AND r.id_periode = ? AND r.id_indikator=?"; + $query = $this->db->query($sql,array($id,$per,$in)); + $data = $query->row_array(); + + if(empty($data['jawaban'])){ + $data['jawaban'] = "-"; + $data['nilai'] = "0"; + } + return $data; + } + function list_indikator($id=0){ + $jmkf = $this->group_parameter(); + $cb=""; + if(count($jmkf)){ + foreach($jmkf as $jm){ + $cb .= $jm['id_jmkf'].","; + } + } + $cb = $cb."7777777"; + + $sql = "SELECT u.*,(SELECT COUNT(id) FROM analisis_indikator WHERE id = u.id AND id IN($cb)) AS cek FROM analisis_indikator u WHERE 1 "; + $sql .= $this->master_sql(); + $sql .= " ORDER BY u.nomor ASC"; + $query = $this->db->query($sql,$id); + $data = $query->result_array(); + $i=0; + while($ilist_jawab2($id,$data[$i]['id']); + $data[$i]['jawaban'] = $ret['jawaban']; + $data[$i]['nilai'] = $ret['nilai']; + $data[$i]['poin'] = $data[$i]['bobot']*$ret['nilai']; + $i++; + } + return $data; + } + function get_total($id=0){ + $per = $this->get_aktif_periode(); + $sql = "SELECT akumulasi FROM analisis_respon_hasil u WHERE id_subjek = ? AND id_periode = ? "; + $query = $this->db->query($sql,array($id,$per)); + $data = $query->row_array(); + return $data['akumulasi']; + } + function get_analisis_master(){ + $sql = "SELECT * FROM analisis_master WHERE id=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + return $query->row_array(); + } + function get_subjek($id=0){ + + $subjek = $_SESSION['subjek_tipe']; + switch($subjek){ + case 1: $sql = "SELECT u.id,u.nik AS nid,u.nama,u.sex,c.dusun,c.rw,c.rt FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE u.id = ? "; break; + + case 2: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE u.id = ? " ; break; + + case 3: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE u.id = ? "; break; + + case 4: $sql = "SELECT u.id,u.kode AS nid,u.nama,p.sex,c.dusun,c.rw,c.rt FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE u.id = ? "; break; + + default: return null; + + } + $query = $this->db->query($sql,$id); + return $query->row_array(); + } + + function multi_jawab($p=0,$o=0){ + $master = $this->get_analisis_master(); + + if(isset($_SESSION['jawab'])) + $kf = $_SESSION['jawab']; + else + $kf = "7777777"; + + switch($o){ + case 1: $order_sql = ' ORDER BY u.id'; break; + case 2: $order_sql = ' ORDER BY u.id DESC'; break; + case 3: $order_sql = ' ORDER BY u.id'; break; + case 4: $order_sql = ' ORDER BY u.id DESC'; break; + default: + } + $asign_sql = ' AND i.asign = 1'; + $order_sql = ' ORDER BY u.nomor,i.kode_jawaban ASC'; + + $sql = "SELECT u.pertanyaan,u.nomor,i.jawaban,i.id AS id_jawaban,i.kode_jawaban,(SELECT count(id) FROM analisis_parameter WHERE id IN ($kf) AND id = i.id) AS cek FROM analisis_indikator u LEFT JOIN analisis_parameter i ON u.id = i.id_indikator WHERE u.id_master = ? "; + $sql .= $asign_sql; + $sql .= $order_sql; + $query = $this->db->query($sql,$master); + $data = $query->result_array(); + + $i=0; + while($idb->query($sql); + $data = $query->result_array(); + return $data; + }else{ + return null; + } + } + function get_aktif_periode(){ + $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $data = $query->row_array(); + return $data['id']; + } + + function get_periode(){ + $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $data = $query->row_array(); + return $data['nama']; + } + function list_dusun(){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function list_rw($dusun=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND dusun = ? AND rw <> '0'"; + $query = $this->db->query($sql,$dusun); + $data=$query->result_array(); + return $data; + } + + function list_rt($dusun='',$rw=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rw = ? AND dusun = ? AND rt <> '0'"; + $query = $this->db->query($sql,array($rw,$dusun)); + $data=$query->result_array(); + return $data; + } + function list_klasifikasi(){ + $sql = "SELECT * FROM analisis_klasifikasi WHERE id_master=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $data = $query->result_array(); + return $data; + } + +} \ No newline at end of file diff --git a/app/models/Analisis_master_model.php b/app/models/Analisis_master_model.php new file mode 100644 index 000000000..8f105b882 --- /dev/null +++ b/app/models/Analisis_master_model.php @@ -0,0 +1,187 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.nama LIKE '$kw' OR u.nama LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND u.subjek_tipe = $kf"; + return $filter_sql; + } + } + function state_sql(){ + if(isset($_SESSION['state'])){ + $kf = $_SESSION['state']; + $filter_sql= " AND u.lock = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM analisis_master u WHERE 1"; + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->state_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.nama'; break; + case 2: $order_sql = ' ORDER BY u.nama DESC'; break; + case 3: $order_sql = ' ORDER BY u.nama'; break; + case 4: $order_sql = ' ORDER BY u.nama DESC'; break; + case 5: $order_sql = ' ORDER BY g.nama'; break; + case 6: $order_sql = ' ORDER BY g.nama DESC'; break; + default:$order_sql = ' ORDER BY u.id'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT u.*,s.subjek FROM analisis_master u LEFT JOIN analisis_ref_subjek s ON u.subjek_tipe = s.id WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->state_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($i"; + else + $data[$i]['lock'] = ""; + + $i++; + $j++; + } + return $data; + } + function insert(){ + $data = $_POST; + $outp = $this->db->insert('analisis_master',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $this->db->where('id',$id); + $outp = $this->db->update('analisis_master',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + + $this->sub_delete($id); + + $sql = "DELETE FROM analisis_master WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $this->delete($id); + } + $outp = true; + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function sub_delete($id=''){ + + $sql = "DELETE FROM analisis_parameter WHERE id_indikator IN(SELECT id FROM analisis_indikator WHERE id_master = ?)"; + $this->db->query($sql,$id); + + $sql = "DELETE FROM analisis_respon WHERE id_periode IN(SELECT id FROM analisis_periode WHERE id_master=?)"; + $this->db->query($sql,$id); + + + $sql = "DELETE FROM analisis_kategori_indikator WHERE id_master=?"; + $this->db->query($sql,$id); + + $sql = "DELETE FROM analisis_klasifikasi WHERE id_master=?"; + $this->db->query($sql,$id); + + + $sql = "DELETE FROM analisis_respon_hasil WHERE id_master=?"; + $this->db->query($sql,$id); + + $sql = "DELETE FROM analisis_partisipasi WHERE id_master=?"; + $this->db->query($sql,$id); + + $sql = "DELETE FROM analisis_periode WHERE id_master=?"; + $this->db->query($sql,$id); + + $sql = "DELETE FROM analisis_indikator WHERE id_master=?"; + $this->db->query($sql,$id); + } + function get_analisis_master($id=0){ + $sql = "SELECT * FROM analisis_master WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function list_subjek(){ + $sql = "SELECT * FROM analisis_ref_subjek"; + $query = $this->db->query($sql); + return $query->result_array(); + } + function list_kelompok(){ + $sql = "SELECT * FROM kelompok_master"; + $query = $this->db->query($sql); + return $query->result_array(); + } + function list_analisis_child(){ + $sql = "SELECT * FROM analisis_master WHERE subjek_tipe = 1"; + $query = $this->db->query($sql); + return $query->result_array(); + } +} \ No newline at end of file diff --git a/app/models/Analisis_periode_model.php b/app/models/Analisis_periode_model.php new file mode 100644 index 000000000..bf85d6034 --- /dev/null +++ b/app/models/Analisis_periode_model.php @@ -0,0 +1,204 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.pertanyaan LIKE '$kw' OR u.pertanyaan LIKE '$kw')"; + return $search_sql; + } + } + function master_sql(){ + if(isset($_SESSION['analisis_master'])){ + $kf = $_SESSION['analisis_master']; + $filter_sql= " AND u.id_master = $kf"; + return $filter_sql; + } + } + function state_sql(){ + if(isset($_SESSION['state'])){ + $kf = $_SESSION['state']; + $filter_sql= " AND u.id_state = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM analisis_periode u WHERE 1"; + $sql .= $this->search_sql(); + $sql .= $this->master_sql(); + $sql .= $this->state_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.id'; break; + case 2: $order_sql = ' ORDER BY u.id DESC'; break; + case 3: $order_sql = ' ORDER BY u.id'; break; + case 4: $order_sql = ' ORDER BY u.id DESC'; break; + case 5: $order_sql = ' ORDER BY g.id'; break; + case 6: $order_sql = ' ORDER BY g.id DESC'; break; + default:$order_sql = ' ORDER BY u.id'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT u.*,s.nama AS status FROM analisis_periode u LEFT JOIN analisis_ref_state s ON u.id_state = s.id WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->master_sql(); + $sql .= $this->state_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($i"; + else + $data[$i]['aktif'] = ""; + + $i++; + $j++; + } + return $data; + } + function insert(){ + $data = $_POST; + $dp = $data['duplikasi']; + unset($data['duplikasi']); + + if($dp == 1){ + $sqld = "SELECT id FROM analisis_periode WHERE id_master=? ORDER BY id DESC LIMIT 1"; + $queryd = $this->db->query($sqld,$_SESSION['analisis_master']); + $dpd = $queryd->row_array(); + $sblm = $dpd['id']; + + } + + + + $akt =array(); + $data['id_master']=$_SESSION['analisis_master']; + if($data['aktif']==1){ + $akt['aktif']=2; + $this->db->where('id_master',$_SESSION['analisis_master']); + $this->db->update('analisis_periode',$akt); + } + $outp = $this->db->insert('analisis_periode',$data); + + if($dp == 1){ + $sqld = "SELECT id FROM analisis_periode WHERE id_master=? ORDER BY id DESC LIMIT 1"; + $queryd = $this->db->query($sqld,$_SESSION['analisis_master']); + $dpd = $queryd->row_array(); + $skrg = $dpd['id']; + + + $sql = "SELECT id_subjek,id_indikator,id_parameter FROM analisis_respon WHERE id_periode = ? "; + $query = $this->db->query($sql,$sblm); + $data = $query->result_array(); + + $i=0; + while($idb->insert_batch('analisis_respon',$data); + $this->load->model('analisis_respon_model'); + $this->analisis_respon_model->pre_update($skrg); + } + + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $akt =array(); + + $data['id_master']=$_SESSION['analisis_master']; + if($data['aktif']==1){ + $akt['aktif']=2; + $this->db->where('id_master',$_SESSION['analisis_master']); + $this->db->update('analisis_periode',$akt); + } + $data['id_master']=$_SESSION['analisis_master']; + $this->db->where('id',$id); + $outp = $this->db->update('analisis_periode',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM analisis_periode WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM analisis_periode WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function get_analisis_periode($id=0){ + $sql = "SELECT * FROM analisis_periode WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_analisis_master(){ + $sql = "SELECT * FROM analisis_master WHERE id=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + return $query->row_array(); + } + function list_state(){ + $sql = "SELECT * FROM analisis_ref_state"; + $query = $this->db->query($sql); + return $query->result_array(); + } +} \ No newline at end of file diff --git a/app/models/Analisis_respon_model.php b/app/models/Analisis_respon_model.php new file mode 100644 index 000000000..583ac377c --- /dev/null +++ b/app/models/Analisis_respon_model.php @@ -0,0 +1,1266 @@ +load->helper('excel'); + } + function autocomplete(){ + //$sql = "SELECT no_kk FROM tweb_keluarga + //UNION SELECT t.nama FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id //WHERE 1 "; + $subjek = $_SESSION['subjek_tipe']; + switch($subjek){ + case 1: $sql = "SELECT nik AS no_kk FROM tweb_penduduk UNION SELECT u.nama FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE status_dasar=1 "; break; + case 2: $sql = "SELECT no_kk FROM tweb_keluarga UNION SELECT p.nama FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; + case 3: $sql = "SELECT no_kk FROM tweb_rtm UNION SELECT p.nama FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; + case 4: $sql = "SELECT u.nama AS no_kk FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; + default: return null; + + } + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $query = $this->db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.no_kk LIKE '$kw' OR p.nama LIKE '$kw')"; + $subjek = $_SESSION['subjek_tipe']; + switch($subjek){ + case 1: $search_sql= " AND (u.nik LIKE '$kw' OR u.nama LIKE '$kw')"; break; + case 2: $search_sql= " AND (u.no_kk LIKE '$kw' OR p.nama LIKE '$kw')"; break; + case 3: $search_sql= " AND ((u.no_kk LIKE '$kw' OR p.nama LIKE '$kw') OR ((SELECT COUNT(id) FROM tweb_penduduk WHERE nik LIKE '$kw' AND id_rtm = u.id) > 1) OR ((SELECT COUNT(id) FROM tweb_penduduk WHERE nama LIKE '$kw' AND id_rtm = u.id) > 1))"; break; + case 4: $search_sql= " AND (u.nama LIKE '$kw' OR p.nama LIKE '$kw')"; break; + default: return null; + } + return $search_sql; + } + } + function dusun_sql(){ + if(isset($_SESSION['dusun'])){ + $kf = $_SESSION['dusun']; + $dusun_sql= " AND c.dusun = '$kf'"; + return $dusun_sql; + } + } + function rw_sql(){ + if(isset($_SESSION['rw'])){ + $kf = $_SESSION['rw']; + $rw_sql= " AND c.rw = '$kf'"; + return $rw_sql; + } + } + function rt_sql(){ + if(isset($_SESSION['rt'])){ + $kf = $_SESSION['rt']; + $rt_sql= " AND c.rt = '$kf'"; + return $rt_sql; + } + } + function isi_sql(){ + if(isset($_SESSION['isi'])){ + $per = $this->get_aktif_periode(); + $kf = $_SESSION['isi']; + if($kf==1) + $isi_sql= " AND (SELECT COUNT(id_subjek) FROM analisis_respon_hasil WHERE id_subjek = u.id AND id_periode=$per ) = 1 "; + else + $isi_sql= " AND (SELECT COUNT(id_subjek) FROM analisis_respon_hasil WHERE id_subjek = u.id AND id_periode=$per ) = 0 "; + + return $isi_sql; + } + } + function kelompok_sql($kf=0){ + $kelompok_sql= " AND id_master = $kf "; + return $kelompok_sql; + } + function paging($p=1,$o=0){ + $master = $this->get_analisis_master(); + $id_kelompok = $master['id_kelompok']; + $subjek = $_SESSION['subjek_tipe']; + switch($subjek){ + case 1: $sql = "SELECT COUNT(u.id) AS id FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE status_dasar=1 "; break; + case 2: $sql = "SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; + case 3: $sql = "SELECT COUNT(u.id) AS id FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; + case 4: $sql = "SELECT COUNT(u.id) AS id FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; + default: return null; + + } + //$sql = "SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; + if($id_kelompok != 0) + $sql .= $this->kelompok_sql($id_kelompok); + + $sql .= $this->search_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $this->isi_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + $per = $this->get_aktif_periode(); + $master = $this->get_analisis_master(); + $id_kelompok = $master['id_kelompok']; + + switch($o){ + case 1: $order_sql = ' ORDER BY u.id'; break; + case 2: $order_sql = ' ORDER BY u.id DESC'; break; + case 3: $order_sql = ' ORDER BY u.id'; break; + case 4: $order_sql = ' ORDER BY u.id DESC'; break; + default:$order_sql = ' ORDER BY u.id'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $subjek = $_SESSION['subjek_tipe']; + switch($subjek){ + case 1: $sql = "SELECT u.id,u.nik AS nid,u.nama,u.sex,c.dusun,c.rw,c.rt,(SELECT id_subjek FROM analisis_respon WHERE id_subjek = u.id AND id_periode=? LIMIT 1) as cek FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE u.status_dasar = 1 "; break; + + case 2: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt,(SELECT id_subjek FROM analisis_respon WHERE id_subjek = u.id AND id_periode=? LIMIT 1) as cek FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1" ; break; + + case 3: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt,(SELECT id_subjek FROM analisis_respon WHERE id_subjek = u.id AND id_periode=? LIMIT 1) as cek FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1"; break; + + case 4: $sql = "SELECT u.id,u.kode AS nid,u.nama,p.sex,c.dusun,c.rw,c.rt,(SELECT id_subjek FROM analisis_respon WHERE id_subjek = u.id AND id_periode=? LIMIT 1) as cek FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1 "; break; + + default: return null; + + } + //$sql = "SELECT u.*,p.nama,c.dusun,c.rw,c.rt,(SELECT id FROM analisis_respon WHERE id_subjek = u.id AND id_periode=? LIMIT 1) as cek FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1 "; + if($id_kelompok != 0) + $sql .= $this->kelompok_sql($id_kelompok); + + $sql .= $this->search_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $this->isi_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql,$per); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($iupdate_hasil($data[$i]['id']); + + if($data[$i]['cek']) + $data[$i]['set'] = ""; + else + $data[$i]['set'] = ""; + + $data[$i]['jk'] = "-"; + if($data[$i]['sex'] == 1) + $data[$i]['jk'] = "L"; + else + $data[$i]['jk'] = "P"; + + $data[$i]['alamat'] = $data[$i]['dusun']." RW-".$data[$i]['rw']." RT-".$data[$i]['rt']; + $i++; + $j++; + } + return $data; + } + function update_kuisioner($id=0,$per=0){ + $outp=false; + if($per == 0){ + $per = $this->get_aktif_periode(); + $id_master = $_SESSION['analisis_master']; + }else{ + $sql = "SELECT id_master FROM analisis_periode WHERE id = ?"; + $query = $this->db->query($sql,$per); + $id_master = $query->row_array(); + $id_master = $id_master['id_master']; + } + $ia=0;$it=0;$ir=0;$ic=0; + + + if(isset($_POST['rb'])){ + $id_rbx = $_POST['rb']; + foreach($id_rbx as $id_px){ + if($id_px != ""){ + $ir=1; + } + } + } + if(isset($_POST['cb'])){ + $id_rby = $_POST['cb']; + foreach($id_rby as $id_py){ + if($id_py != ""){ + $ic=1; + } + } + } + if(isset($_POST['ia'])){ + $id_iax = $_POST['ia']; + foreach($id_iax as $id_px){ + if($id_px != ""){$ia=1;} + } + } + if(isset($_POST['it'])){ + $id_iay = $_POST['it']; + foreach($id_iay as $id_py){ + if($id_py != ""){$it=1;} + } + } + + //CEK ada input + if($ir!=0 OR $ic!=0 OR $ia!=0 OR $it!=0){ + + $sql = "DELETE FROM analisis_respon WHERE id_subjek = ? AND id_periode=?"; + $this->db->query($sql,array($id,$per)); + + if(isset($_POST['rb'])){ + $id_rb = $_POST['rb']; + foreach($id_rb as $id_p){ + $p = preg_split("/\./", $id_p); + + $data['id_subjek'] = $id; + $data['id_periode'] = $per; + $data['id_indikator'] = $p[0]; + $data['id_parameter'] = $p[1]; + $outp = $this->db->insert('analisis_respon',$data); + } + } + if(isset($_POST['cb'])){ + $id_cb = $_POST['cb']; + if($id_cb){ + foreach($id_cb as $id_p){ + $p = preg_split("/\./", $id_p); + + $data['id_subjek'] = $id; + $data['id_periode'] = $per; + $data['id_indikator'] = $p[0]; + $data['id_parameter'] = $p[1]; + $outp = $this->db->insert('analisis_respon',$data); + } + } + } + + if(isset($_POST['ia'])){ + $id_ia = $_POST['ia']; + foreach($id_ia as $id_p){ + if($id_p != ""){ + unset($data); + $indikator = key($id_ia); + + $sql = "SELECT * FROM analisis_parameter u WHERE jawaban = ? AND id_indikator = ?"; + $query = $this->db->query($sql,array($id_p,$indikator)); + $dx = $query->row_array(); + if(!$dx){ + + $data['id_indikator'] = $indikator; + $data['jawaban'] = $id_p; + $this->db->insert('analisis_parameter',$data); + unset($data); + + $sql = "SELECT * FROM analisis_parameter u WHERE jawaban = ? AND id_indikator = ?"; + $query = $this->db->query($sql,array($id_p,$indikator)); + $dx = $query->row_array(); + + $data['id_parameter'] = $dx['id']; + $data['id_indikator'] = $indikator; + $data['id_subjek'] = $id; + $data['id_periode'] = $per; + $outp = $this->db->insert('analisis_respon',$data); + + }else{ + + unset($data); + $data['id_indikator'] = $indikator; + $data['id_parameter'] = $dx['id']; + $data['id_subjek'] = $id; + $data['id_periode'] = $per; + $outp = $this->db->insert('analisis_respon',$data); + } + } + next($id_ia); + } + } + if(isset($_POST['it'])){ + $id_it = $_POST['it']; + foreach($id_it as $id_p){ + if($id_p != ""){ + unset($data); + $indikator = key($id_it); + + $sql = "SELECT * FROM analisis_parameter u WHERE jawaban = ? AND id_indikator = ?"; + $query = $this->db->query($sql,array($id_p,$indikator)); + $dx = $query->row_array(); + if(!$dx){ + + $data['id_indikator'] = $indikator; + $data['jawaban'] = $id_p; + $this->db->insert('analisis_parameter',$data); + unset($data); + + $sql = "SELECT * FROM analisis_parameter u WHERE jawaban = ? AND id_indikator = ?"; + $query = $this->db->query($sql,array($id_p,$indikator)); + $dx = $query->row_array(); + + $data2['id_parameter'] = $dx['id']; + $data2['id_indikator'] = $indikator; + $data2['id_subjek'] = $id; + $data2['id_periode'] = $per; + $outp = $this->db->insert('analisis_respon',$data2); + + }else{ + + unset($data); + $data['id_indikator'] = $indikator; + $data['id_parameter'] = $dx['id']; + + $data['id_subjek'] = $id; + $data['id_periode'] = $per; + $outp = $this->db->insert('analisis_respon',$data); + } + } + next($id_it); + } + } + + $sql = "SELECT SUM(i.bobot * nilai) as jml FROM analisis_respon r LEFT JOIN analisis_indikator i ON r.id_indikator = i.id LEFT JOIN analisis_parameter z ON r.id_parameter = z.id WHERE r.id_subjek = ? AND i.act_analisis=1 AND r.id_periode=?"; + $query = $this->db->query($sql,array($id,$per)); + $dx = $query->row_array(); + + $upx['id_master'] = $id_master; + $upx['akumulasi'] = 0+$dx['jml']; + $upx['id_subjek'] = $id; + $upx['id_periode'] = $per; + + $sql = "DELETE FROM analisis_respon_hasil WHERE id_subjek = ? AND id_periode=?"; + $this->db->query($sql,array($id,$per)); + $outp = $this->db->insert('analisis_respon_hasil',$upx); + + + } + if(isset($_FILES['pengesahan'])){ + $lokasi_file = $_FILES['pengesahan']['tmp_name']; + $tipe_file = $_FILES['pengesahan']['type']; + if (!empty($lokasi_file)){ + if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg"){ + $_SESSION['sukses']=-1; + } else { + $nama_file = $_SESSION['analisis_master']."_".$per."_".$id."_".rand(10000,99999).".jpg"; + UploadPengesahan($nama_file); + $bukti['pengesahan'] = $nama_file; + $bukti['id_master'] = $id_master; + $bukti['id_subjek'] = $id; + $bukti['id_periode'] = $per; + + $outp = $this->db->insert('analisis_respon_bukti',$bukti); + } + } + } + if($outp) $_SESSION['sukses']=1; + else $_SESSION['sukses']=-1; + } + + function list_jawab2($id=0,$in=0,$per=0){ + + if(isset($_SESSION['delik'])){ + $sql = "SELECT s.id as id_parameter,s.jawaban,s.kode_jawaban FROM analisis_parameter s WHERE id_indikator = ? ORDER BY s.kode_jawaban ASC "; + $query = $this->db->query($sql,$in); + }else{ + $sql = "SELECT s.id as id_parameter,s.jawaban,s.kode_jawaban,(SELECT count(id_subjek) FROM analisis_respon WHERE id_parameter = s.id AND id_subjek = ? AND id_periode=?) as cek FROM analisis_parameter s WHERE id_indikator = ? ORDER BY s.kode_jawaban ASC "; + $query = $this->db->query($sql,array($id,$per,$in)); + } + + $data = $query->result_array(); + + $i=0; + while($idb->query($sql,array($in,$id,$per)); + $data = $query->row_array(); + + return $data; + } + function list_indikator($id=0){ + + $per = $this->get_aktif_periode(); + + $sql = "SELECT u.id,u.id_kategori,u.nomor,u.id_tipe,u.pertanyaan,k.kategori FROM analisis_indikator u LEFT JOIN analisis_kategori_indikator k ON u.id_kategori = k.id WHERE u.id_master = ? ORDER BY u.id_kategori,u.nomor ASC"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $data = $query->result_array(); + + $i=0; + while($ilist_jawab2($id,$data[$i]['id'],$per); + }else{ + + if(isset($_SESSION['delik'])){ + $data[$i]['parameter_respon'] = ""; + }else{ + $data[$i]['parameter_respon'] = $this->list_jawab3($id,$data[$i]['id'],$per); + } + } + $i++; + } + return $data; + } + + + //CHILD----------------------- + + function list_jawab4($id=0,$in=0,$per=0){ + + if(isset($_SESSION['delik'])){ + $sql = "SELECT s.id as id_parameter,s.jawaban,s.kode_jawaban FROM analisis_parameter s WHERE id_indikator = ? "; + $query = $this->db->query($sql,$in); + }else{ + $sql = "SELECT s.id as id_parameter,s.jawaban,s.kode_jawaban,(SELECT count(id_subjek) FROM analisis_respon WHERE id_parameter = s.id AND id_subjek = ? AND id_periode=?) as cek FROM analisis_parameter s WHERE id_indikator = ? "; + $query = $this->db->query($sql,array($id,$per,$in)); + } + + $data = $query->result_array(); + + $i=0; + while($idb->query($sql,array($in,$id,$per)); + $data = $query->row_array(); + + return $data; + } + function list_indikator_child($id=0){ + + $sql = "SELECT id_child FROM analisis_master WHERE id = ? "; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $id_child = $query->row_array(); + $id_child = $id_child['id_child']; + + $sql = "SELECT id FROM analisis_periode WHERE id_master = ? AND aktif = 1"; + $query = $this->db->query($sql,$id_child); + $per = $query->row_array(); + $per = $per['id']; + + $sql = "SELECT * FROM analisis_indikator u WHERE id_master = ? "; + $sql .= " ORDER BY nomor"; + $query = $this->db->query($sql,$id_child); + $data = $query->result_array(); + + + $i=0; + while($ilist_jawab4($id,$data[$i]['id'],$per); + }else{ + + if(isset($_SESSION['delik'])){ + $data[$i]['parameter_respon'] = ""; + }else{ + $data[$i]['parameter_respon'] = $this->list_jawab5($id,$data[$i]['id'],$per); + } + } + $i++; + } + return $data; + } + function get_periode_child(){ + + $sql = "SELECT id_child FROM analisis_master WHERE id = ? "; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $id_child = $query->row_array(); + $id_child = $id_child['id_child']; + + $sql = "SELECT id FROM analisis_periode WHERE id_master = ? AND aktif = 1"; + $query = $this->db->query($sql,$id_child); + $per = $query->row_array(); + $per = $per['id']; + return $per; + } + //--------------------------- + + function list_bukti($id=0){ + $per = $this->get_aktif_periode(); + $sql = "SELECT pengesahan FROM analisis_respon_bukti WHERE id_subjek = ? AND id_master = ? AND id_periode = ? "; + $sql .= " ORDER BY tgl_update DESC"; + $query = $this->db->query($sql,array($id,$_SESSION['analisis_master'],$per)); + $data = $query->result_array(); + + return $data; + } + function get_subjek($id=0){ + + $subjek = $_SESSION['subjek_tipe']; + switch($subjek){ + case 1: $sql = "SELECT u.id,u.nik AS nid,u.nama,u.sex,c.dusun,c.rw,c.rt FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE u.id = ? "; break; + + case 2: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE u.id = ? " ; break; + + case 3: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE u.id = ? "; break; + + case 4: $sql = "SELECT u.id,u.kode AS nid,u.nama,p.sex,c.dusun,c.rw,c.rt FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE u.id = ? "; break; + + default: return null; + + } + //$sql = "SELECT u.*,p.nama FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id WHERE u.id=?"; + $query = $this->db->query($sql,$id); + return $query->row_array(); + } + function list_anggota($id=0){ + + $subjek = $_SESSION['subjek_tipe']; + if($subjek == 2 OR $subjek == 3){ + switch($subjek){ + case 2: $sql = "SELECT u.* FROM tweb_penduduk u WHERE u.id_kk = ? ORDER BY kk_level" ;break; + case 3: $sql = "SELECT u.* FROM tweb_penduduk u WHERE u.id_rtm = ? ORDER BY rtm_level" ;break; + default: return null; + } + //$sql = "SELECT u.*,p.nama FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id WHERE u.id=?"; + $query = $this->db->query($sql,$id); + return $query->result_array(); + }else{ + return null; + } + } + function aturan_unduh(){ + + $subjek = $_SESSION['subjek_tipe']; + $order_sql = " ORDER BY u.nomor ASC"; + $sql = "SELECT u.*,t.tipe AS tipe_indikator,k.kategori AS kategori FROM analisis_indikator u LEFT JOIN analisis_tipe_indikator t ON u.id_tipe = t.id LEFT JOIN analisis_kategori_indikator k ON u.id_kategori = k.id WHERE u.id_master = ? "; + $sql .= $order_sql; + + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $data=$query->result_array(); + + $per = $this->get_aktif_periode(); + $i=0; + while($idb->query($sql2,$data[$i]['id']); + $respon2 = $query2->result_array(); + $data[$i]['par']=$respon2; + }else{ + $data[$i]['par']=null; + } + if($data[$i]['act_analisis']==1) + $data[$i]['act_analisis']="Ya"; + else + $data[$i]['act_analisis']="Tidak"; + + $i++; + } + return $data; + } + function data_unduh($p=0,$o=0){ + $per = $this->get_aktif_periode(); + $master = $this->get_analisis_master(); + $id_kelompok = $master['id_kelompok']; + + switch($o){ + case 1: $order_sql = ' ORDER BY u.id'; break; + case 2: $order_sql = ' ORDER BY u.id DESC'; break; + case 3: $order_sql = ' ORDER BY u.id'; break; + case 4: $order_sql = ' ORDER BY u.id DESC'; break; + default:$order_sql = ' ORDER BY u.id'; + } + + + $sql = "SELECT * FROM analisis_indikator WHERE id_master = ? ORDER BY nomor"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $indikator = $query->result_array(); + + $subjek = $_SESSION['subjek_tipe']; + switch($subjek){ + case 1: $sql = "SELECT u.id,u.nik AS nid,u.nama,u.sex,c.dusun,c.rw,c.rt FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE 1 "; break; + case 2: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt FROM tweb_keluarga u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1 "; break; + case 3: $sql = "SELECT u.id,u.no_kk AS nid,p.nama,p.sex,c.dusun,c.rw,c.rt FROM tweb_rtm u LEFT JOIN tweb_penduduk p ON u.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1" ; break; + case 4: $sql = "SELECT u.id,u.kode AS nid,u.nama,p.sex,c.dusun,c.rw,c.rt FROM kelompok u LEFT JOIN tweb_penduduk p ON u.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa c ON p.id_cluster = c.id WHERE 1 "; break; + + default: return null; break; + + } + if($id_kelompok != 0) + $sql .= $this->kelompok_sql($id_kelompok); + + $sql .= $this->search_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $this->isi_sql(); + $sql .= $order_sql; + + $query = $this->db->query($sql,$per); + $data=$query->result_array(); + + $i=0; + while($idb->query($sql2,array($per,$data[$i]['id'])); + $par = $query2->result_array(); + $data[$i]['par'] = $par; + + // $j++; + //} + }else{ + $data[$i]['par'] = null; + } + + + $data[$i]['jk'] = "-"; + if($data[$i]['sex'] == 1) + $data[$i]['jk'] = "L"; + else + $data[$i]['jk'] = "P"; + + $i++; + } + return $data; + } + function indikator_data_unduh(){ + $master = $this->get_analisis_master(); + + $order_sql = ' ORDER BY u.nomor'; + + $sql = "SELECT u.* FROM analisis_indikator u WHERE u.id_master = ? "; + $sql .= $order_sql; + $query = $this->db->query($sql,$master); + $data = $query->result_array(); + + $i=0; + while($idb->query($sql2,$data[$i]['id']); + $par = $query2->result_array(); + $data[$i]['par'] = $par; + + $i++; + } + return $data; + } + function indikator_unduh($p=0){ + $master = $this->get_analisis_master(); + + $order_sql = ' ORDER BY u.nomor'; + + $sql = "SELECT u.* FROM analisis_indikator u WHERE u.id_master = ? "; + $sql .= $order_sql; + $query = $this->db->query($sql,$master); + $data = $query->result_array(); + + $i=0; + while($idb->query($sql2,$data[$i]['id']); + $par = $query2->result_array(); + $data[$i]['par'] = $par; + } + + $i++; + } + return $data; + } + function pre_update($pr=0){ + + if($pr==0) + $per = $this->get_aktif_periode(); + else + $per = $pr; + + $sql = "SELECT DISTINCT(id_subjek) AS id FROM analisis_respon WHERE id_periode = ? "; + $query = $this->db->query($sql,$per); + $data = $query->result_array(); + + $sql = "DELETE FROM analisis_respon_hasil WHERE id_subjek = 0"; + $this->db->query($sql); + + $sql = "DELETE FROM analisis_respon WHERE id_subjek = 0"; + $this->db->query($sql); + + $sql = "DELETE FROM analisis_respon_hasil WHERE id_periode = ?"; + $this->db->query($sql,$per); + + $i=0; + while($iupdate_hasil($data[$i]['id']); + + $sql = "SELECT SUM(i.bobot * nilai) as jml FROM analisis_respon r LEFT JOIN analisis_indikator i ON r.id_indikator = i.id LEFT JOIN analisis_parameter z ON r.id_parameter = z.id WHERE r.id_subjek = ? AND i.act_analisis=1 AND r.id_periode=?"; + $query = $this->db->query($sql,array($data[$i]['id'],$per)); + $dx = $query->row_array(); + + $upx[$i]['id_master'] = $_SESSION['analisis_master']; + $upx[$i]['akumulasi'] = 0+$dx['jml']; + $upx[$i]['id_subjek'] = $data[$i]['id']; + $upx[$i]['id_periode'] = $per; + + $i++; + } + if(@$upx) + $this->db->insert_batch('analisis_respon_hasil',$upx); + } + function update_hasil($id=0){ + + $per = $this->get_aktif_periode(); + + $sql = "SELECT SUM(i.bobot * nilai) as jml FROM analisis_respon r LEFT JOIN analisis_indikator i ON r.id_indikator = i.id LEFT JOIN analisis_parameter z ON r.id_parameter = z.id WHERE r.id_subjek = ? AND i.act_analisis=1 AND r.id_periode=?"; + $query = $this->db->query($sql,array($id,$per)); + $dx = $query->row_array(); + + $upx['id_master'] = $_SESSION['analisis_master']; + $upx['akumulasi'] = 0+$dx['jml']; + $upx['id_subjek'] = $id; + $upx['id_periode'] = $per; + + $sql = "DELETE FROM analisis_respon_hasil WHERE id_subjek = ? AND id_periode=?"; + $this->db->query($sql,array($id,$per)); + + $this->db->insert('analisis_respon_hasil',$upx); + } + + function import_respon($op=0){ + + $per = $this->get_aktif_periode(); + + $subjek = $_SESSION['subjek_tipe']; + $mas = $_SESSION['analisis_master']; + $key = ($per+3)*($mas+7)*($subjek*3); + $key = "AN".$key; + + $sql = "SELECT * FROM analisis_indikator WHERE id_master=? ORDER BY id ASC"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $indikator = $query->result_array(); + $jml = count($indikator); + + $data = new Spreadsheet_Excel_Reader($_FILES['respon']['tmp_name']); + $s=0; + $baris = $data->rowcount($s); + $kolom = $data->colcount($s); + + $ketemu = 0; + + for ($b=1;$b<=$baris;$b++){ + //echo ""; + for ($k=1;$k<=$kolom;$k++){ + $isi = $data->val($b,$k,$s); + //echo "$b : $k ($isi)"; + + // ketemu njuk stop + if($isi == $key){ + $br = $b+1; + $kl = $k+1; + + $b = $baris+1; + $k = $kolom+1; + $ketemu = 1; + //echo "<- KETEMU"; + } + } + } + + if($ketemu==1){ + + $dels = ""; + $true = 0; + for ($i=$br;$i<=$baris;$i++){ + $id_subjek = $data->val($i,$kl-1,$s); + + $j = $kl; + foreach($indikator AS $indi){ + $isi = $data->val($i,$j,$s); + if($isi != ""){ + $true = 1; + } + + $j++; + } + if($true == 1){ + $dels .= $id_subjek.","; + $true = 0; + } + } + + $dels .= "9999999"; + //cek ada row + + //echo $dels; + $sql = "DELETE FROM analisis_respon WHERE id_subjek IN(?) AND id_periode=?"; + $this->db->query($sql,array($dels,$per)); + $dels = ""; + + $n = 0; + for ($i=$br;$i<=$baris;$i++){ + + $id_subjek = $data->val($i,$kl-1,$s); + if(strlen($id_subjek) > 14 AND $subjek == 1){ + $sqls = "SELECT id FROM tweb_penduduk WHERE nik = ?;"; + $querys = $this->db->query($sqls,array($id_subjek)); + $isbj = $querys->row_array(); + $id_subjek = $isbj['id']; + } + + $j = $kl+$op; + $all = ""; + foreach($indikator AS $indi){ + $isi = $data->val($i,$j,$s); + if($isi != ""){ + if($indi['id_tipe']==1){ + $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND kode_jawaban = ?;"; + $query = $this->db->query($sql,array($indi['id'],$isi)); + $param = $query->row_array(); + + if($param){ + $in_param = $param['id']; + }else{ + if($isi == "") + $in_param = 0; + else + $in_param = -1; + + } + + $respon[$n]['id_parameter'] = $in_param; + $respon[$n]['id_indikator'] = $indi['id']; + $respon[$n]['id_subjek'] = $id_subjek; + $respon[$n]['id_periode'] = $per; + $n++; + + }elseif($indi['id_tipe']==2){ + $id_isi = explode(",",$isi); + + //if(count($id_isi) > 1){ + //foreach($id_isi AS $ids){ + //echo "
    ".count($id_isi)." -> "; + for($q=0;$q<(count($id_isi));$q++){ + //echo $id_isi[$q]." "; + $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND kode_jawaban = ? ;"; + $query = $this->db->query($sql,array($indi['id'],$id_isi[$q])); + $param = $query->row_array(); + + if($param['id'] != ""){ + $in_param = $param['id']; + $respon[$n]['id_parameter'] = $in_param; + $respon[$n]['id_indikator'] = $indi['id']; + $respon[$n]['id_subjek'] = $id_subjek; + $respon[$n]['id_periode'] = $per; + $n++; + } + } + //} + + }else{ + + $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;"; + $query = $this->db->query($sql,array($indi['id'],$isi)); + $param = $query->row_array(); + + // apakah sdh ada jawaban yg sama + if($param){ + $in_param = $param['id']; + }else{ + $parameter['jawaban'] = $isi; + $parameter['id_indikator'] = $indi['id']; + $parameter['asign'] = 0; + + $this->db->insert('analisis_parameter',$parameter); + + $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;"; + $query = $this->db->query($sql,array($indi['id'],$isi)); + $param = $query->row_array(); + //if($param){ + $in_param = $param['id']; + //}else{ + //$in_param = $id_param; + // } + } + + $respon[$n]['id_parameter'] = $in_param; + $respon[$n]['id_indikator'] = $indi['id']; + $respon[$n]['id_subjek'] = $id_subjek; + $respon[$n]['id_periode'] = $per; + $n++; + } + } + + $j++; + } + } + if($n>0) + $outp = $this->db->insert_batch('analisis_respon',$respon); + else + $outp = false; + } + + $this->pre_update(); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } +//------------------ + + function satu_jiwa($op=0){ + $_SESSION['subjek_tipe'] = 1; + $_SESSION['analisis_master'] = 2; + ini_set('max_execution_time', 1600); + ini_set('memory_limit', '2048M'); + + $per = $this->get_aktif_periode(); + + $subjek = $_SESSION['subjek_tipe']; + $mas = $_SESSION['analisis_master']; + $sql = "SELECT * FROM analisis_indikator WHERE id_master=? ORDER BY id ASC"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $indikator = $query->result_array(); + + $sql = "SELECT * FROM a_jiwa WHERE 1"; + $query = $this->db->query($sql); + $data = $query->result_array(); + + + $sql = "DELETE FROM analisis_respon WHERE id_periode=?"; + $this->db->query($sql,array($per)); + + $n = 0; + //foreach($tdata AS $data){ + $di =0; + while($di 14 AND $subjek == 1){ + $sqls = "SELECT id FROM tweb_penduduk WHERE nik = ?;"; + $querys = $this->db->query($sqls,array($id_subjek)); + $isbj = $querys->row_array(); + $id_subjek = $isbj['id']; + } + + $j = 1; + $all = ""; + foreach($indikator AS $indi){ + $k = 'j'.$j; + $isi = $data[$di][$k]; + //echo $isi."
    "; + if($isi != ""){ + if($indi['id_tipe']==1){ + $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND kode_jawaban = ?;"; + $query = $this->db->query($sql,array($indi['id'],$isi)); + $param = $query->row_array(); + + if($param){ + $in_param = $param['id']; + }else{ + if($isi == "") + $in_param = 0; + else + $in_param = -1; + + } + + $respon[$n]['id_parameter'] = $in_param; + $respon[$n]['id_indikator'] = $indi['id']; + $respon[$n]['id_subjek'] = $id_subjek; + $respon[$n]['id_periode'] = $per; + $n++; + + }elseif($indi['id_tipe']==2){ + $id_isi = explode(",",$isi); + + //if(count($id_isi) > 1){ + //foreach($id_isi AS $ids){ + //echo "
    ".count($id_isi)." -> "; + for($q=0;$q<(count($id_isi));$q++){ + //echo $id_isi[$q]." "; + $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND kode_jawaban = ? ;"; + $query = $this->db->query($sql,array($indi['id'],$id_isi[$q])); + $param = $query->row_array(); + + if($param['id'] != ""){ + $in_param = $param['id']; + $respon[$n]['id_parameter'] = $in_param; + $respon[$n]['id_indikator'] = $indi['id']; + $respon[$n]['id_subjek'] = $id_subjek; + $respon[$n]['id_periode'] = $per; + $n++; + } + } + //} + + }else{ + + $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;"; + $query = $this->db->query($sql,array($indi['id'],$isi)); + $param = $query->row_array(); + + // apakah sdh ada jawaban yg sama + if($param){ + $in_param = $param['id']; + }else{ + $parameter['jawaban'] = $isi; + $parameter['id_indikator'] = $indi['id']; + $parameter['asign'] = 0; + + $this->db->insert('analisis_parameter',$parameter); + + $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;"; + $query = $this->db->query($sql,array($indi['id'],$isi)); + $param = $query->row_array(); + //if($param){ + $in_param = $param['id']; + //}else{ + //$in_param = $id_param; + // } + } + + $respon[$n]['id_parameter'] = $in_param; + $respon[$n]['id_indikator'] = $indi['id']; + $respon[$n]['id_subjek'] = $id_subjek; + $respon[$n]['id_periode'] = $per; + $n++; + } + } + + $j++; + } + $di++; + } + if($n>0) + $outp = $this->db->insert_batch('analisis_respon',$respon); + else + $outp = false; + + $this->pre_update(); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function dua_dunia($op=0){ + + $_SESSION['analisis_master'] = 1; + $_SESSION['subjek_tipe'] = 3; + ini_set('max_execution_time', 1600); + ini_set('memory_limit', '2048M'); + + $per = $this->get_aktif_periode(); + + $subjek = $_SESSION['subjek_tipe']; + $mas = $_SESSION['analisis_master']; + $sql = "SELECT * FROM analisis_indikator WHERE id_master=? ORDER BY id ASC"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $indikator = $query->result_array(); + + $sql = "SELECT * FROM a_rts WHERE 1"; + $query = $this->db->query($sql); + $data = $query->result_array(); + + + $sql = "DELETE FROM analisis_respon WHERE id_periode=?"; + $this->db->query($sql,array($per)); + + $n = 0; + //foreach($tdata AS $data){ + $di =0; + while($di"; + if($isi != ""){ + if($indi['id_tipe']==1){ + $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND kode_jawaban = ?;"; + $query = $this->db->query($sql,array($indi['id'],$isi)); + $param = $query->row_array(); + + if($param){ + $in_param = $param['id']; + }else{ + if($isi == "") + $in_param = 0; + else + $in_param = -1; + + } + + $respon[$n]['id_parameter'] = $in_param; + $respon[$n]['id_indikator'] = $indi['id']; + $respon[$n]['id_subjek'] = $id_subjek; + $respon[$n]['id_periode'] = $per; + $n++; + + }elseif($indi['id_tipe']==2){ + $id_isi = explode(",",$isi); + + //if(count($id_isi) > 1){ + //foreach($id_isi AS $ids){ + //echo "
    ".count($id_isi)." -> "; + for($q=0;$q<(count($id_isi));$q++){ + //echo $id_isi[$q]." "; + $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND kode_jawaban = ? ;"; + $query = $this->db->query($sql,array($indi['id'],$id_isi[$q])); + $param = $query->row_array(); + + if($param['id'] != ""){ + $in_param = $param['id']; + $respon[$n]['id_parameter'] = $in_param; + $respon[$n]['id_indikator'] = $indi['id']; + $respon[$n]['id_subjek'] = $id_subjek; + $respon[$n]['id_periode'] = $per; + $n++; + } + } + //} + + }else{ + + $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;"; + $query = $this->db->query($sql,array($indi['id'],$isi)); + $param = $query->row_array(); + + // apakah sdh ada jawaban yg sama + if($param){ + $in_param = $param['id']; + }else{ + $parameter['jawaban'] = $isi; + $parameter['id_indikator'] = $indi['id']; + $parameter['asign'] = 0; + + $this->db->insert('analisis_parameter',$parameter); + + $sql = "SELECT id FROM analisis_parameter WHERE id_indikator = ? AND jawaban = ?;"; + $query = $this->db->query($sql,array($indi['id'],$isi)); + $param = $query->row_array(); + //if($param){ + $in_param = $param['id']; + //}else{ + //$in_param = $id_param; + // } + } + + $respon[$n]['id_parameter'] = $in_param; + $respon[$n]['id_indikator'] = $indi['id']; + $respon[$n]['id_subjek'] = $id_subjek; + $respon[$n]['id_periode'] = $per; + $n++; + } + } + + $j++; + } + $di++; + } + if($n>0) + $outp = $this->db->insert_batch('analisis_respon',$respon); + else + $outp = false; + + $this->pre_update(); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + +//----------------- + function get_aktif_periode(){ + $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $data = $query->row_array(); + return $data['id']; + } + function get_analisis_master(){ + $sql = "SELECT * FROM analisis_master WHERE id=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + return $query->row_array(); + } + function get_periode(){ + $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $data = $query->row_array(); + return $data['nama']; + } + function list_dusun(){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function list_rw($dusun=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND dusun = ? AND rw <> '0'"; + $query = $this->db->query($sql,$dusun); + $data=$query->result_array(); + return $data; + } + + function list_rt($dusun='',$rw=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rw = ? AND dusun = ? AND rt <> '0'"; + $query = $this->db->query($sql,array($rw,$dusun)); + $data=$query->result_array(); + return $data; + } + +} \ No newline at end of file diff --git a/app/models/Analisis_statistik_jawaban_model.php b/app/models/Analisis_statistik_jawaban_model.php new file mode 100644 index 000000000..ec07ffd2b --- /dev/null +++ b/app/models/Analisis_statistik_jawaban_model.php @@ -0,0 +1,311 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.pertanyaan LIKE '$kw' OR u.pertanyaan LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND u.act_analisis = $kf"; + return $filter_sql; + } + } + function master_sql(){ + if(isset($_SESSION['analisis_master'])){ + $kf = $_SESSION['analisis_master']; + $filter_sql= " AND u.id_master = $kf"; + return $filter_sql; + } + } + function tipe_sql(){ + if(isset($_SESSION['tipe'])){ + $kf = $_SESSION['tipe']; + $filter_sql= " AND u.id_tipe = $kf"; + return $filter_sql; + } + } + function kategori_sql(){ + if(isset($_SESSION['kategori'])){ + $kf = $_SESSION['kategori']; + $filter_sql= " AND u.id_kategori = $kf"; + return $filter_sql; + } + } + function dusun_sql(){ + if(isset($_SESSION['dusun'])){ + $kf = $_SESSION['dusun']; + $dusun_sql= " AND a.dusun = '$kf'"; + return $dusun_sql; + } + } + function rw_sql(){ + if(isset($_SESSION['rw'])){ + $kf = $_SESSION['rw']; + $rw_sql= " AND a.rw = '$kf'"; + return $rw_sql; + } + } + function rt_sql(){ + if(isset($_SESSION['rt'])){ + $kf = $_SESSION['rt']; + $rt_sql= " AND a.rt = '$kf'"; + return $rt_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM analisis_indikator u WHERE 1"; + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->master_sql(); + $sql .= $this->tipe_sql(); + $sql .= $this->kategori_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + + //$_subjek = $this->get_subjek(); + + $subjek = $_SESSION['subjek_tipe']; + switch($subjek){ + case 1: $sbj = "LEFT JOIN tweb_penduduk p ON r.id_subjek = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; + case 2: $sbj = "LEFT JOIN tweb_keluarga v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id " ; break; + case 3: $sbj = "LEFT JOIN tweb_rtm v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; + case 4: $sbj = "LEFT JOIN kelompok v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; + } + + switch($o){ + case 1: $order_sql = ' ORDER BY u.nomor'; break; + case 2: $order_sql = ' ORDER BY u.nomor DESC'; break; + case 3: $order_sql = ' ORDER BY u.pertanyaan'; break; + case 4: $order_sql = ' ORDER BY u.pertanyaan DESC'; break; + case 5: $order_sql = ' ORDER BY u.id_kategori'; break; + case 6: $order_sql = ' ORDER BY u.id_kategori DESC'; break; + default:$order_sql = ' ORDER BY u.nomor'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT u.*,t.tipe AS tipe_indikator,k.kategori AS kategori FROM analisis_indikator u LEFT JOIN analisis_tipe_indikator t ON u.id_tipe = t.id LEFT JOIN analisis_kategori_indikator k ON u.id_kategori = k.id WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->master_sql(); + $sql .= $this->tipe_sql(); + $sql .= $this->kategori_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $per = $this->get_aktif_periode(); + $i=0; + $j=$offset; + while($idusun_sql(); + $sql1 .= $this->rw_sql(); + $sql1 .= $this->rt_sql(); + //$sql1 .= " GROUP BY r.id_indikator "; + $query1 = $this->db->query($sql1,$data[$i]['id']); + $respon= $query1->row_array(); + $data[$i]['bobot']=$respon['jml']; + + $dus = $this->dusun_sql(); + $rw = $this->rw_sql(); + $rt = $this->rt_sql(); + + $sql2 = "SELECT i.id,i.kode_jawaban,i.jawaban,(SELECT COUNT(r.id_subjek) FROM analisis_respon r $sbj WHERE r.id_parameter = i.id AND r.id_periode = $per $dus $rw $rt ) AS jml_p FROM analisis_parameter i WHERE i.id_indikator = ? ORDER BY i.kode_jawaban "; + + + $query2 = $this->db->query($sql2,$data[$i]['id']); + $respon2= $query2->result_array(); + $data[$i]['par']=$respon2; + + if($data[$i]['act_analisis']==1) + $data[$i]['act_analisis']="Ya"; + else + $data[$i]['act_analisis']="Tidak"; + + if($data[$i]['id_tipe']==3){ + $data[$i]['jumlah'] = 0; + foreach($respon2 as $par){ + $data[$i]['jumlah'] += $par['jawaban']*$par['jml_p']; + } + } + $i++; + $j++; + } + return $data; + } + function list_indikator($id=0){ + //$_subjek = $this->get_subjek(); + + $subjek = $_SESSION['subjek_tipe']; + switch($subjek){ + case 1: $sbj = "LEFT JOIN tweb_penduduk p ON r.id_subjek = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; + case 2: $sbj = "LEFT JOIN tweb_keluarga v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id " ; break; + case 3: $sbj = "LEFT JOIN tweb_rtm v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; + case 4: $sbj = "LEFT JOIN kelompok v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; + } + + $sql = "SELECT * FROM analisis_parameter WHERE id_indikator = ? ORDER BY kode_jawaban ASC "; + $query = $this->db->query($sql,$id); + $data= $query->result_array(); + $per = $this->get_aktif_periode(); + + $i=0; + while($idusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $query = $this->db->query($sql,$data[$i]['id']); + $respon= $query->row_array(); + + $data[$i]['nilai']=$respon['jml']; + + $i++; + } + return $data; + } + + function list_subjek($id=0){ + $per = $this->get_aktif_periode(); + //$sbj = $this->get_subjek2(); + + $subjek = $_SESSION['subjek_tipe']; + switch($subjek){ + case 1: $sbj = "LEFT JOIN tweb_penduduk p ON r.id_subjek = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; + case 2: $sbj = "LEFT JOIN tweb_keluarga v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id " ; break; + case 3: $sbj = "LEFT JOIN tweb_rtm v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; + case 4: $sbj = "LEFT JOIN kelompok v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; + } + + $sql = "SELECT p.id AS id_pend,r.id_subjek,p.nama,p.nik,(SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = p.id) AS umur,p.sex,a.dusun,a.rw,a.rt FROM analisis_respon r $sbj WHERE r.id_parameter = ? AND r.id_periode = $per" ; + + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $query = $this->db->query($sql,$id); + $data= $query->result_array(); + + $i=0; + while($idb->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_analisis_master(){ + $sql = "SELECT * FROM analisis_master WHERE id=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + return $query->row_array(); + } + function get_analisis_parameter($id=''){ + $sql = "SELECT * FROM analisis_parameter WHERE id=?"; + $query = $this->db->query($sql,$id); + return $query->row_array(); + } + function list_tipe(){ + $sql = "SELECT * FROM analisis_tipe_indikator"; + $query = $this->db->query($sql); + return $query->result_array(); + } + function list_kategori(){ + $sql = "SELECT u.* FROM analisis_kategori_indikator u WHERE 1"; + $sql .= $this->master_sql(); + $query = $this->db->query($sql); + return $query->result_array(); + } + function get_aktif_periode(){ + $sql = "SELECT * FROM analisis_periode WHERE aktif=1 AND id_master=?"; + $query = $this->db->query($sql,$_SESSION['analisis_master']); + $data = $query->row_array(); + return $data['id']; + } + function list_dusun(){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function list_rw($dusun=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND dusun = ? AND rw <> '0'"; + $query = $this->db->query($sql,$dusun); + $data=$query->result_array(); + return $data; + } + + function list_rt($dusun='',$rw=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rw = ? AND dusun = ? AND rt <> '0'"; + $query = $this->db->query($sql,array($rw,$dusun)); + $data=$query->result_array(); + return $data; + } +} \ No newline at end of file diff --git a/app/models/Apis.php b/app/models/Apis.php new file mode 100644 index 000000000..c98cf9975 --- /dev/null +++ b/app/models/Apis.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/app/models/Config_model.php b/app/models/Config_model.php new file mode 100644 index 000000000..58f615016 --- /dev/null +++ b/app/models/Config_model.php @@ -0,0 +1,403 @@ +load->database(); + $db =$CI->db->database;; + + $sql = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA=? AND TABLE_NAME <> 'impor'"; + $query = $this->db->query($sql,$db); + $data=$query->result_array(); + if(count($data) != 77){ + return 0; + }else{ + return 1; + } + } + function initial(){ + + $CI = get_instance(); + $CI->load->database(); + $db =$CI->db->database;; + + $sql = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA=? AND TABLE_NAME <> 'impor'"; + $query = $this->db->query($sql,$db); + $data=$query->result_array(); + if(count($data) != 77){ + $myhome = $_SERVER['MYSQL_HOME']; + $filename = 'sid.install'; + $templine = ''; + $lines = file($filename); + foreach ($lines as $line){ + if (substr($line, 0, 2) == '--' || $line == '') + continue; + $templine .= $line; + if (substr(trim($line), -1, 1) == ';'){ + $this->db->query($templine); + $templine = ''; + } + } + $passwd = generator(); + $out['pass'] = $passwd; + $idsid = hash_password($passwd); + + $skrg = date("Y-m-d H:i:s"); + $macid = $this->sysinfo(); + $ids="user:admin\r\npass:".$passwd."\r\nidr:".$idsid."\r\nids:".$macid; + $handle = fopen('../install.sid','w+'); + fwrite($handle,$ids); + fclose($handle); + + $reg['regid'] = $idsid; + $reg['macid'] = $macid; + $this->db->where('id','1'); + $this->db->update('config',$reg); + + $sql = "INSERT INTO user VALUES (1,'admin','$idsid',1,'admin@localhost','$skrg',1,'Administrator','ADMIN','0123456789','','$idsid');"; + $this->db->query($sql); + + $this->initsurat(); + $this->gawe_surat(); + return $out; + }else{ + return NULL; + } + } + + function do_reg(){ + $url = 'http://register.sid.web.id/doreg/index.php'; + + $sql = "SELECT * FROM config WHERE id=1"; + $query = $this->db->query($sql); + $data=$query->row_array(); + + $fields = array( + + 'desa' => urlencode($data['nama_desa']), + 'kecamatan' => urlencode($data['nama_kecamatan']), + 'kabupaten' => urlencode($data['nama_kabupaten']), + 'propinsi' => urlencode($data['nama_propinsi']), + 'geo' => urlencode($data['lat'].','.$data['lng']), + 'kode_wilayah' => urlencode($data['kode_propinsi'].'-'.$data['kode_kabupaten'].'-'.$data['kode_kecamatan'].'-'.$data['kode_desa']), + 'regid' => urlencode($data['regid']), + 'macid' => urlencode($data['macid']), + 'email' => urlencode($data['email_desa']) + ); + $fields_string =""; + foreach($fields as $key=>$value) {$fields_string .= $key.'='.$value.'&'; } + rtrim($fields_string, '&'); + $ch = curl_init(); + curl_setopt($ch,CURLOPT_URL, $url); + curl_setopt($ch,CURLOPT_POST, count($fields)); + curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); + curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1); + //curl_setopt($ch,CURLOPT_MUTE, true); + curl_setopt($ch,CURLOPT_CONNECTTIMEOUT, 5); + curl_setopt($ch,CURLOPT_FOLLOWLOCATION, false); + curl_exec($ch); + curl_close($ch); + } + + function gawe_surat(){ + + $sql = "SELECT kunci,favorit FROM tweb_surat_format WHERE 1;"; + $query = $this->db->query($sql); + + //if(!$query){ + $sql = "SELECT * FROM tweb_surat_format WHERE 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + + foreach($data AS $dat){ + + $string=$dat['url_surat']; + $mypath="surat\\".$dat['url_surat']."\\"; + $path = "".str_replace("\\","/",$mypath)."/"; + + if (!file_exists($mypath)) { + mkdir($mypath, 0777, true); + } + + if (!file_exists($path)) { + mkdir($path); + } + $raw="surat\\raw\\"; + $raw_path = "".str_replace("\\","/",$raw); + $file = $raw_path."template.rtf"; + $handle = fopen($file,'r'); + + $buffer = stream_get_contents($handle); + + $handle = fopen($path.$dat['url_surat'].'.rtf','w+'); + fwrite($handle,$buffer); + fclose($handle); + } + //} + + } + function initsurat(){ + $sql = "SELECT kunci,favorit FROM tweb_surat_format WHERE 1;"; + $query = $this->db->query($sql); + if(!$query){ + $sql = "ALTER TABLE tweb_surat_format ADD kunci TINYINT(1) NOT NULL DEFAULT '0', ADD favorit TINYINT( 1 ) NOT NULL DEFAULT '0'"; + $this->db->query($sql); + } + $sql = "SELECT id_pend FROM dokumen WHERE 1;"; + $query = $this->db->query($sql); + if(!$query){ + $sql = "ALTER TABLE dokumen ADD id_pend INT NOT NULL DEFAULT '0' AFTER id"; + $this->db->query($sql); + } + } + + function get_data(){ + $sql = "SELECT * FROM config WHERE 1"; + $query = $this->db->query($sql); + return $query->row_array(); + } + function insert(){ + $outp = $this->db->insert('config',$_POST); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $lokasi_file = $_FILES['logo']['tmp_name']; + $tipe_file = $_FILES['logo']['type']; + $nama_file = $_FILES['logo']['name']; + $old_logo = $data['old_logo']; + if (!empty($lokasi_file)){ + if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ + unset($data['logo']); + } else { + UploadLogo($nama_file,$old_logo,$tipe_file); + $data['logo'] = $nama_file; + } + }else{ + unset($data['logo']); + } + unset($data['file_logo']); + unset($data['old_logo']); + $this->db->where('id',$id); + $outp = $this->db->update('config',penetration($data)); + $pamong['pamong_nama'] = $data['nama_kepala_desa']; + $pamong['pamong_nip'] = $data['nip_kepala_desa']; + $this->db->where('pamong_id','707'); + $outp = $this->db->update('tweb_desa_pamong',$pamong); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function update_kantor(){ + $data = $_POST; + $id = "1"; + $this->db->where('id',$id); + $outp = $this->db->update('config',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update_wilayah(){ + $data = $_POST; + $id = "1"; + $this->db->where('id',$id); + $outp = $this->db->update('config',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function kosong_pend(){ + $a="TRUNCATE tweb_wil_clusterdesa"; + $this->db->query($a); + $a="TRUNCATE tweb_keluarga"; + $this->db->query($a); + $a="TRUNCATE tweb_rtm"; + $this->db->query($a); + + $a="TRUNCATE tweb_penduduk"; + $this->db->query($a); + + $a="TRUNCATE log_penduduk"; + $this->db->query($a); + + $a="TRUNCATE log_surat"; + $this->db->query($a); + + $a="TRUNCATE log_perubahan_penduduk"; + $this->db->query($a); + + $a="TRUNCATE log_bulanan"; + $this->db->query($a); + + $a="TRUNCATE garis"; + $this->db->query($a); + + $a="TRUNCATE lokasi"; + $this->db->query($a); + + $a="TRUNCATE area"; + $this->db->query($a); + + $a="TRUNCATE point"; + $this->db->query($a); + + $a="TRUNCATE line"; + $this->db->query($a); + + $a="TRUNCATE polygon"; + $this->db->query($a); + + $a="TRUNCATE analisis_master"; + $this->db->query($a); + + $a="TRUNCATE analisis_indikator"; + $this->db->query($a); + + $a="TRUNCATE analisis_parameter"; + $this->db->query($a); + + $a="TRUNCATE analisis_periode"; + $this->db->query($a); + + $a="TRUNCATE analisis_respon"; + $this->db->query($a); + + $a="TRUNCATE analisis_respon_hasil"; + $this->db->query($a); + + $a="TRUNCATE analisis_klasifikasi"; + $this->db->query($a); + + $a="TRUNCATE analisis_kategori_indikator"; + $this->db->query($a); + + $a="TRUNCATE analisis_respon_bukti"; + $this->db->query($a); + + $a="TRUNCATE tweb_penduduk_mandiri"; + $this->db->query($a); + $a="TRUNCATE kelompok"; + $this->db->query($a); + + $a="TRUNCATE kelompok_anggota"; + $this->db->query($a); + $a="TRUNCATE data_persil"; + $this->db->query($a); + $a="TRUNCATE tweb_penduduk_map"; + $this->db->query($a); + $a="TRUNCATE sys_traffic"; + $this->db->query($a); + } + function kosong_web(){ + $a="TRUNCATE tweb_wil_clusterdesa"; + $this->db->query($a); + $a="TRUNCATE tweb_keluarga"; + $this->db->query($a); + $a="TRUNCATE tweb_penduduk"; + $this->db->query($a); + } + function upgrade(){ + $a="DROP TABLE tweb_rtm"; + $this->db->query($a); + $a="DROP TABLE hasil_analisis_keluarga"; + $this->db->query($a); + $a="DROP TABLE analisis_keluarga"; + $this->db->query($a); + + $a="DROP TABLE klasifikasi_analisis_keluarga"; + $this->db->query($a); + + $a="DROP TABLE master_analisis_keluarga"; + $this->db->query($a); + + $a="DROP TABLE sub_analisis_keluarga"; + $this->db->query($a); + + $a="DROP TABLE tipe_analisis"; + $this->db->query($a); + + $a="DROP TABLE tweb_rtm_hubungan"; + $this->db->query($a); + + $a="UPDATE tweb_penduduk SET id_rtm = 0, rtm_level = 0 WHERE 1"; + $this->db->query($a); + + $a="TRUNCATE tweb_rtm"; + $this->db->query($a); + $a="TRUNCATE hasil_analisis_keluarga"; + $this->db->query($a); + $a="TRUNCATE analisis_keluarga"; + $this->db->query($a); + + + if($b) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function sysinfo(){ + exec('systeminfo',$ret); + for($i=0;$i<(count($ret));$i++){ + $d = str_replace(" ","",$ret[$i]); + $d.="*"; + $pd=Parse_Data($d,'ProductID:','*'); + if($pd != "") + $pd1 = $pd; + $pd=Parse_Data($d,'SystemModel:','*'); + if($pd != "") + $pd2 = $pd; + $pd=Parse_Data($d,'BIOSVersion:','*'); + if($pd != "") + $pd3 = $pd; + } + return $pd1; + } + function patch(){ + $a = "UPDATE analisis_indikator SET act_analisis=0 WHERE id_tipe IN(2,3,4)"; + $this->db->query($a); + $this->cls(); + + $b = "SELECT id FROM tweb_wil_clusterdesa WHERE rt <> '-' AND rt <> 0 AND rw <> 0 AND rw <> '-'"; + //$query = $this->db->query($sql); + //$data = $query->result_array(); + + } + function opt(){ + $a="OPTIMIZE TABLE analisis_indikator, analisis_kategori_indikator, analisis_klasifikasi, analisis_master, analisis_parameter, analisis_partisipasi, analisis_periode, analisis_ref_state, analisis_ref_subjek, analisis_respon, analisis_respon_hasil, analisis_tipe_indikator, area, artikel, config, data_persil, data_persil_jenis, data_persil_log, data_persil_peruntukan, detail_log_penduduk, dokumen, gambar_gallery, garis, gis_simbol, inbox, kategori, kelompok, kelompok_anggota, kelompok_master, komentar, kontak, kontak_grup, line, log_bulanan, log_penduduk, log_perubahan_penduduk, log_surat, lokasi, media_sosial, menu, outbox, point, polygon, program, program_peserta, recent_status, ref_bedah_rumah, ref_blt, ref_jamkesmas, ref_kelas_sosial, ref_pkh, ref_raskin, sentitems, setting_modul, setting_sms, sys_traffic, tweb_alamat_sekarang, tweb_desa_pamong, tweb_keluarga, tweb_penduduk, tweb_penduduk_mandiri, tweb_penduduk_map, tweb_penduduk_umur, tweb_rtm, tweb_surat_atribut, tweb_surat_format, tweb_wil_clusterdesa, user;"; + $this->db->query($a); + } + function cls(){ + + $sql = "SELECT * FROM analisis_parameter WHERE asign = 1 ORDER BY id_indikator"; + $query = $this->db->query($sql); + $data = $query->result_array(); + + $i=0; + $m=0; + while($idb->query($sql1,$data[$i]['id_indikator']); + $m = $query1->row_array(); + $n = ($m['nil']+1) - $data[$i]['kode_jawaban']; + + + $up ['nilai'] = $n; + $this->db->where('id',$id); + $outp = $this->db->update('analisis_parameter',$up); + $j = explode(". ",$jwb); + if(count($j) > 1){ + $upd ['jawaban'] = $j[1]; + $this->db->where('id',$id); + $outp = $this->db->update('analisis_parameter',$upd); + } + $i++; + } + } +} \ No newline at end of file diff --git a/app/models/Data_persil_model.php b/app/models/Data_persil_model.php new file mode 100644 index 000000000..f35797586 --- /dev/null +++ b/app/models/Data_persil_model.php @@ -0,0 +1,296 @@ +load->database(); + } + function autocomplete(){ + $sql = "SELECT nik FROM data_persil + UNION SELECT p.nama AS nik FROM data_persil u LEFT JOIN tweb_penduduk p ON u.nik = p.nik"; + $query = $this->db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.nama LIKE '$kw' OR p.nik LIKE '$kw')"; + return $search_sql; + } + } + function list_persil($apa='',$mana=0,$page=1){ + $data = false; + $limit = 20; + $offset = ($page - 1) * $limit; + $strSQL = "SELECT p.`id` as id, p.`nik` as nik, p.`nama` as nopersil, p.`persil_jenis_id`, p.`id_clusterdesa`, p.`luas`, p.`kelas`, + p.`no_sppt_pbb`, p.`persil_peruntukan_id`, u.nama as namapemilik, w.rt, w.rw, w.dusun + FROM `data_persil` p + LEFT JOIN tweb_penduduk u ON u.nik = p.nik + LEFT JOIN tweb_wil_clusterdesa w ON w.id=p.id_clusterdesa + WHERE ((1) "; + if($apa =="jenis"){ + if($mana > 0){ + $strSQL .= " AND (p.persil_jenis_id=".$mana.") "; + } + }elseif($apa =="peruntukan"){ + if($mana > 0){ + $strSQL .= " AND (p.persil_peruntukan_id=".$mana.") "; + } + } + + $strSQL .= $this->search_sql(); + $strSQL .= ") LIMIT ".$offset.",".$limit; + $query = $this->db->query($strSQL); + if($query->num_rows()>0){ + $data = $query->result_array(); + }else{ + $_SESSION["pesan"]= $strSQL; + } + + $i=0; + + while($i''){ + $data[$i]['namapemilik'] = $data[$i]['nik']; + $data[$i]['nik'] = "-"; + } + $i++; + + } + return $data; + } + function get_persil($id){ + $data = false; + $strSQL = "SELECT p.`id` as id, p.`nik` as nik, p.`nama` as nopersil, + p.`persil_jenis_id`, p.`id_clusterdesa`, p.`luas`, p.`kelas`, + p.`no_sppt_pbb`, p.`persil_peruntukan_id`, u.nama as namapemilik, w.rt, w.rw, w.dusun,alamat_ext + FROM `data_persil` p + LEFT JOIN tweb_penduduk u ON u.nik = p.nik + LEFT JOIN tweb_wil_clusterdesa w ON w.id=p.id_clusterdesa + WHERE p.id=".$id; + $query = $this->db->query($strSQL); + if($query->num_rows()>0){ + $data = $query->row_array(); + } + + if(!is_numeric($data['nik'])){ + $data['namapemilik'] = $data['nik']; + $data['nik'] = "-"; + } + return $data; + } + function simpan_persil(){ + $hasil = false; + if(@$_POST["nik"]){ + if($_POST["id"]>0){ + $strSQL = "UPDATE data_persil SET + `nik`='".fixSQL($_POST["nik"])."', + `nama`='".fixSQL($_POST["nama"])."', + `persil_jenis_id`='".fixSQL($_POST["cid"])."', + `id_clusterdesa`='".fixSQL($_POST["pid"])."', + `persil_peruntukan_id`='".fixSQL($_POST["sid"])."', + `luas`='".fixSQL($_POST["luas"])."', + `kelas`='".fixSQL($_POST["kelas"])."', + `no_sppt_pbb`='".fixSQL($_POST["sppt"])."', + `userID`='".$_SESSION['user']."' + WHERE id=".fixSQL($_POST["id"]); + }else{ + if(is_numeric($_POST["nik"])){ + $strSQL = "INSERT INTO data_persil(`nik`,`nama`, `persil_jenis_id`, `id_clusterdesa`, `persil_peruntukan_id`, + `kelas`,`luas`, `no_sppt_pbb`, `userID`) VALUES('".fixSQL($_POST["nik"])."','".fixSQL($_POST["nama"])."','".fixSQL($_POST["cid"])."', + '".fixSQL($_POST["pid"])."','".fixSQL($_POST["sid"])."','".fixSQL($_POST["kelas"])."','".fixSQL($_POST["luas"])."', + '".fixSQL($_POST["sppt"])."','".fixSQL($_SESSION['user'])."')"; + }else{ + $strSQL = "INSERT INTO data_persil(`nik`,`nama`,`alamat_ext`, `persil_jenis_id`, `id_clusterdesa`, `persil_peruntukan_id`, + `kelas`,`luas`, `no_sppt_pbb`, `userID`) VALUES('".fixSQL($_POST["nik"])."','".fixSQL($_POST["nama"])."','".fixSQL($_POST["alamat_ext"])."','".fixSQL($_POST["cid"])."', + '".fixSQL($_POST["pid"])."','".fixSQL($_POST["sid"])."','".fixSQL($_POST["kelas"])."','".fixSQL($_POST["luas"])."', + '".fixSQL($_POST["sppt"])."','".fixSQL($_SESSION['user'])."')"; + } + } + if($this->db->query($strSQL)){ + $_SESSION["success"] = 1; + $_SESSION["pesan"] = "Data Persil telah DISIMPAN"; + $hasil = true; + } + }else{ + $_SESSION["success"] = -1; + $_SESSION["pesan"] = "Formulir belum/tidak terisi dengan benar"; + } + return $hasil; + } + public function hapus_persil($id){ + $strSQL = "DELETE FROM `data_persil` WHERE id=".$id; + $hasil = $this->db->query($strSQL); + if($hasil){ + $_SESSION["success"] = 1; + $_SESSION["pesan"] = "Data Persil telah dihapus"; + }else{ + $_SESSION["success"] = -1; + $_SESSION["pesan"] = "Gagal menghapus data persil"; + } + } + function list_dusunrwrt(){ + $strSQL = "SELECT `id`,`rt`,`rw`,`dusun` FROM `tweb_wil_clusterdesa` WHERE (`rt`>0) ORDER BY `dusun`"; + $query = $this->db->query($strSQL); + return $query->result_array(); + } + function get_penduduk($id){ + $strSQL = "SELECT p.nik,p.nama,k.no_kk,w.rt,w.rw,w.dusun FROM tweb_penduduk p + LEFT JOIN tweb_keluarga k ON k.id=p.id_kk + LEFT JOIN tweb_wil_clusterdesa w ON w.id=p.id_cluster + WHERE p.nik='".fixSQL($id)."'"; + $query = $this->db->query($strSQL); + $data = ""; + $data=$query->row_array(); + return $data; + } + + function list_penduduk(){ + $strSQL = "SELECT p.nik,p.nama,k.no_kk,w.rt,w.rw,w.dusun FROM tweb_penduduk p + LEFT JOIN tweb_keluarga k ON k.id=p.id_kk + LEFT JOIN tweb_wil_clusterdesa w ON w.id=p.id_cluster + WHERE 1 ORDER BY nama"; + $query = $this->db->query($strSQL); + $data = ""; + $data=$query->result_array(); + if($query->num_rows() > 0){ + $i=0;$j=0; + while($idb->query($strSQL); + if($query->num_rows()>0){ + $data = array(); + foreach ($query->result() as $row){ + $data[$row->id] = array($row->nama,$row->ndesc); + } + } + return $data; + } + function get_persil_peruntukan($id=0){ + $data =false; + $strSQL = "SELECT id,nama,ndesc FROM data_persil_peruntukan WHERE id=".$id; + $query = $this->db->query($strSQL); + if($query->num_rows()>0){ + $data = array(); + $data[$id] = $query->row_array(); + } + return $data; + } + public function update_persil_peruntukan(){ + if($this->input->post('id') == 0){ + $strSQL = "INSERT INTO `data_persil_peruntukan`(`nama`,`ndesc`) VALUES('".fixSQL($this->input->post('nama'))."','".fixSQL($this->input->post('ndesc'))."')"; + }else{ + $strSQL = "UPDATE `data_persil_peruntukan` SET + `nama`='".fixSQL($this->input->post('nama'))."', + `ndesc`='".fixSQL($this->input->post('ndesc'))."' + WHERE id=".$this->input->post('id'); + } + + $data["db"] = $strSQL; + $hasil = $this->db->query($strSQL); + if($hasil){ + $data["transaksi"] = true; + $data["pesan"] = "Data Peruntukan Persil ".fixSQL($this->input->post('nama'))." telah disimpan/diperbarui"; + $_SESSION["success"] = 1; + $_SESSION["pesan"] = "Data Peruntukan Persil ".fixSQL($this->input->post('nama'))." telah disimpan/diperbarui"; + }else{ + $data["transaksi"] = false; + $data["pesan"] = "ERROR ".$strSQL; + } + return $data; + } + public function hapus_peruntukan($id){ + $strSQL = "DELETE FROM `data_persil_peruntukan` WHERE id=".$id; + $hasil = $this->db->query($strSQL); + if($hasil){ + $_SESSION["success"] = 1; + $_SESSION["pesan"] = "Data Peruntukan Persil telah dihapus"; + }else{ + $_SESSION["success"] = -1; + } + } + function list_persil_jenis(){ + $data =false; + $strSQL = "SELECT id,nama,ndesc FROM data_persil_jenis WHERE 1"; + $query = $this->db->query($strSQL); + if($query->num_rows()>0){ + $data = array(); + foreach ($query->result() as $row){ + $data[$row->id] = array($row->nama,$row->ndesc); + } + } + return $data; + } + function get_persil_jenis($id=0){ + $data =false; + $strSQL = "SELECT id,nama,ndesc FROM data_persil_jenis WHERE id=".$id; + $query = $this->db->query($strSQL); + if($query->num_rows()>0){ + $data = array(); + $data[$id] = $query->row_array(); + } + return $data; + } + public function update_persil_jenis(){ + if($this->input->post('id') == 0){ + $strSQL = "INSERT INTO `data_persil_jenis`(`nama`,`ndesc`) VALUES('".fixSQL($this->input->post('nama'))."','".fixSQL($this->input->post('ndesc'))."')"; + }else{ + $strSQL = "UPDATE `data_persil_jenis` SET + `nama`='".fixSQL($this->input->post('nama'))."', + `ndesc`='".fixSQL($this->input->post('ndesc'))."' + WHERE id=".$this->input->post('id'); + } + + $data["db"] = $strSQL; + $hasil = $this->db->query($strSQL); + if($hasil){ + $data["transaksi"] = true; + $data["pesan"] = "Data Jenis Persil ".fixSQL($this->input->post('nama'))." telah disimpan/diperbarui"; + $_SESSION["success"] = 1; + $_SESSION["pesan"] = "Data Jenis Persil ".fixSQL($this->input->post('nama'))." telah disimpan/diperbarui"; + }else{ + $data["transaksi"] = false; + $data["pesan"] = "ERROR ".$strSQL; + } + return $data; + } + public function hapus_jenis($id){ + $strSQL = "DELETE FROM `data_persil_jenis` WHERE id=".$id; + $hasil = $this->db->query($strSQL); + if($hasil){ + $_SESSION["success"] = 1; + $_SESSION["pesan"] = "Data Jenis Persil telah dihapus"; + }else{ + $_SESSION["success"] = -1; + } + } +} +?> \ No newline at end of file diff --git a/app/models/Export_model.php b/app/models/Export_model.php new file mode 100644 index 000000000..821ece840 --- /dev/null +++ b/app/models/Export_model.php @@ -0,0 +1,292 @@ +\r\n"; + for($i = 0; $i < $num_fields; $i++){ + while($row = mysql_fetch_row($result)){ + + for($j=0; $j<$num_fields; $j++){ + + if (isset($row[$j])) { $return.= $row[$j] ; } else { $return.= ''; } + if ($j<($num_fields-1)) { $return.= '+'; } + } + $return.= "\r\n"; + } + } + $return.="\r\n"; + + $result = mysql_query('SELECT * FROM tweb_keluarga WHERE 1'); + $num_fields = mysql_num_fields($result); + $return.= "\r\n"; + for($i = 0; $i < $num_fields; $i++){ + while($row = mysql_fetch_row($result)){ + + for($j=0; $j<$num_fields; $j++){ + if (isset($row[$j])) { $return.= $row[$j] ; } else { $return.= ''; } + if ($j<($num_fields-1)) { $return.= '+'; } + } + $return.= "\r\n"; + } + } + $return.="\r\n"; + + $result = mysql_query('SELECT * FROM tweb_wil_clusterdesa WHERE 1'); + $num_fields = mysql_num_fields($result); + $return.= "\r\n"; + for($i = 0; $i < $num_fields; $i++){ + while($row = mysql_fetch_row($result)){ + + for($j=0; $j<$num_fields; $j++){ + if (isset($row[$j])) { $return.= $row[$j] ; } else { $return.= ''; } + if ($j<($num_fields-1)) { $return.= '+'; } + } + $return.= "\r\n"; + } + } + $return.=""; + + $result = mysql_query('SELECT * FROM tweb_wil_clusterdesa WHERE 1'); + $num_fields = mysql_num_fields($result); + Header('Content-type: application/octet-stream'); + Header('Content-Disposition: attachment; filename=data_dasar('.date("d-m-Y").').sid'); + echo $return; + } + function export_akp(){ + $return = ""; + $result = mysql_query('SELECT * FROM analisis_keluarga WHERE 1'); + $num_fields = mysql_num_fields($result); + $return.= "\r\n"; + for($i = 0; $i < $num_fields; $i++){ + while($row = mysql_fetch_row($result)){ + + for($j=0; $j<$num_fields; $j++){ + + if (isset($row[$j])) { $return.= $row[$j] ; } else { $return.= ''; } + if ($j<($num_fields-1)) { $return.= '+'; } + } + $return.= "\r\n"; + } + } + $return.="\r\n"; + Header('Content-type: application/octet-stream'); + Header('Content-Disposition: attachment; filename=data_akp('.date("d-m-Y").').sid'); + echo $return; + } + function analisis(){ + + $sql = "DELETE FROM analisis_respon_hasil WHERE id_periode=1"; + $this->db->query($sql); + + $sql = "DELETE FROM analisis_respon WHERE id_periode=1"; + $this->db->query($sql); + + $sql = "SELECT u.id FROM tweb_penduduk u WHERE (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) >= '2' AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) <= '17' ORDER BY id LIMIT 87"; + $query = $this->db->query($sql); + $data=$query->result_array(); + $i=0; + while($idb->query($sql2); + $res=$query2->result_array(); + $j=0; + while($jdb->query($sqlx,$res[$j]['id']); + $jaw=$queryx->result_array(); + + $numbers=rand($jaw[0]['id'],$jaw[$jm]['id']); + + $updx['id_parameter'] = $numbers; + $updx['id_periode'] = 1; + $outp = $this->db->insert('analisis_respon',$updx); + $j++; + } + + + + + + + $upx['id_master'] =1; + + $upx['id_subjek'] = $data[$i]['id']; + $upx['id_periode'] = 1; + $outp = $this->db->insert('analisis_respon_hasil',$upx); + $i++; + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + + } + function analisis2(){ + + $sql = "DELETE FROM analisis_respon_hasil WHERE id_periode=2"; + $this->db->query($sql); + + $sql = "DELETE FROM analisis_respon WHERE id_periode=2"; + $this->db->query($sql); + + $sql = "SELECT u.id FROM tweb_penduduk u WHERE (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) >= '21' ORDER BY id limit 75"; + $query = $this->db->query($sql); + $data=$query->result_array(); + $i=0; + while($idb->query($sql2); + $res=$query2->result_array(); + $j=0; + while($jdb->query($sqlx,$res[$j]['id']); + $jaw=$queryx->result_array(); + + $numbers=rand($jaw[0]['id'],$jaw[$jm]['id']); + + $updx['id_parameter'] = $numbers; + $updx['id_periode'] = 2; + $outp = $this->db->insert('analisis_respon',$updx); + $j++; + } + + + + + + + $upx['id_master'] =2; + + $upx['id_subjek'] = $data[$i]['id']; + $upx['id_periode'] = 2; + $outp = $this->db->insert('analisis_respon_hasil',$upx); + $i++; + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + + } + function lombok(){ + $sql = "SELECT * FROM sheet1 WHERE 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + $i=0; + while($idb->insert('analisis_indikator',$upx); + + $sql2 = "SELECT id FROM analisis_indikator ORDER BY id DESC LIMIT 1"; + $query2 = $this->db->query($sql2); + $res=$query2->row_array(); + + $updx['id_indikator'] = $res['id']; + + $updx['nilai'] = 1; + $updx['jawaban'] = $data[$i]['C']; + $outp = $this->db->insert('analisis_parameter',$updx); + $updx['nilai'] = 2; + $updx['jawaban'] = $data[$i]['D']; + $outp = $this->db->insert('analisis_parameter',$updx); + $updx['nilai'] = 3; + $updx['jawaban'] = $data[$i]['E']; + $outp = $this->db->insert('analisis_parameter',$updx); + $updx['nilai'] = 4; + $updx['jawaban'] = $data[$i]['F']; + $outp = $this->db->insert('analisis_parameter',$updx); + $updx['nilai'] = 5; + $updx['jawaban'] = $data[$i]['G']; + $outp = $this->db->insert('analisis_parameter',$updx); + + + $i++; + } + + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + + } + function backup(){ + $this->load->dbutil(); + $prefs = array( + 'format' => 'sql', + ); + $backup =& $this->dbutil->backup($prefs); + $db_name = 'backup-on-'. date("Y-m-d-H-i-s") .'.sql'; + $save = base_url().$db_name; + $this->load->helper('file'); + write_file($save, $backup); + $backup .= "i'); #END;"; + $b1=Parse_Data($backup,"# TABLE STRUCTURE FOR: analisis_indikator","# TABLE STRUCTURE FOR: data_surat"); + + $b2=Parse_Data($backup,"# TABLE STRUCTURE FOR: detail_log_penduduk","#END;"); + $backup = $b1.$b2; + $this->load->helper('download'); + force_download($db_name, $backup); + if($backup) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function restore(){ + $sql = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA='sid'"; + $query = $this->db->query($sql); + $data=$query->result_array(); + + foreach($data AS $dat){ + $tbl = $dat["TABLE_NAME"]; + + } + + $data = ""; + $in = ""; + $outp = ""; + $filename = $_FILES['userfile']['tmp_name']; + if ($filename!=''){ + $lines = file($filename); + $query = ""; + foreach($lines as $sql_line){ + if(trim($sql_line) != "" && strpos($sql_line, "--") === false){ + $query = $sql_line; + if (substr(rtrim($query), -1) == ';'){ + + $result = $this->db->query($query); + + } + } + } + + + + } + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function export_excel(){ + $sql = "SELECT u.*,a.dusun,a.rw,a.rt,d.no_kk AS no_kk FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa a ON u.id_cluster = a.id LEFT JOIN tweb_keluarga d ON u.id_kk = d.id WHERE 1 "; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + return $data; + } +} \ No newline at end of file diff --git a/app/models/Feed_model.php b/app/models/Feed_model.php new file mode 100644 index 000000000..08bfa2cd0 --- /dev/null +++ b/app/models/Feed_model.php @@ -0,0 +1,41 @@ +load->database(); + } + public function list_feeds() + { + $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori + FROM artikel a LEFT JOIN user u ON a.id_user = u.id + LEFT JOIN kategori k ON a.id_kategori = k.id + WHERE (a.enabled=1) AND (a.judul <> '') ORDER BY a.id DESC LIMIT 0,20"; + $query = $this->db->query($sql); + $data = $query->result_array(); + $hasil = array(); + $i=0; + if($query->num_rows()>0) + { + while($i 300) + { + $hasil[$i]['isi'] = substr($str_isi,0,strpos($str_isi," ",260))."..."; + }else{ + $hasil[$i]['isi'] = $str_isi; + } + + $hasil[$i]['author'] = $data[$i]['owner']; + $hasil[$i]['kategori'] = $data[$i]['kategori']; + $i++; + } + }else{ + $hasil = false; + } + return $hasil; + } +} \ No newline at end of file diff --git a/app/models/First_artikel_m.php b/app/models/First_artikel_m.php new file mode 100644 index 000000000..a27e0dcd1 --- /dev/null +++ b/app/models/First_artikel_m.php @@ -0,0 +1,286 @@ +db->query($sql); + $data = $query->row_array(); + if(empty($data)) + $data = null; + else{ + $id = $data['id']; + } + return $data; + } + function get_teks_berjalan(){ + $sql = "SELECT a.isi FROM artikel a LEFT JOIN kategori k ON a.id_kategori = k.id WHERE k.kategori = 'teks_berjalan' AND k.enabled = 1"; + $query = $this->db->query($sql); + $data = $query->result_array(); + return $data; + } + function get_widget(){ + $sql = "SELECT * FROM widget LIMIT 1 "; + $query = $this->db->query($sql); + $data = $query->result_array(); + return $data; + } + function paging($p=1){ + $sql = "SELECT COUNT(a.id) AS id FROM artikel a + LEFT JOIN kategori k ON a.id_kategori = k.id + WHERE ((a.enabled=1) AND (headline <> 1) AND (k.tipe = 1)) AND k.kategori <> 'teks_berjalan' + ORDER BY a.tgl_upload DESC"; + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = 5; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function paging_kat($p=1,$id=0){ + $sql = "SELECT COUNT(a.id) AS id FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE 1 "; + if($id!=0) + $sql .= "AND ((id_kategori = ".$id.") OR (parrent = ".$id."))"; + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = 8; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function artikel_show($id='0',$offset,$limit){ + if($id > 0){ + $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a + LEFT JOIN user u ON a.id_user = u.id + LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=1 AND headline <> 1 AND k.tipe = 1 AND k.kategori <> 'teks_berjalan' AND a.id=".$id; + }else{ + $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a + LEFT JOIN user u ON a.id_user = u.id + LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=1 AND headline <> 1 AND k.tipe = 1 AND k.kategori <> 'teks_berjalan' + ORDER BY a.tgl_upload DESC LIMIT ".$offset.", ".$limit; + } + + $query = $this->db->query($sql); + if($query->num_rows()>0){ + $data = $query->result_array(); + + $i=0; + while($i120)? substr($teks,0,120):$teks; + $data[$i]['isi_short'] = $pendek; + $panjang = (strlen($teks)>300)? substr($teks,0,300):$teks; + $data[$i]['isi'] = ""; + $i++; + } + }else{ + $data = false; + } + return $data; + } + function arsip_show(){ + $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=? ORDER BY a.tgl_upload DESC LIMIT 7 "; + $query = $this->db->query($sql,1); + $data = $query->result_array(); + + $i=0; + while($ibaca selengkapnya"; + $i++; + } + return $data; + } + function paging_arsip($p=1){ + $sql = "SELECT COUNT(a.id) AS id FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=1"; + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = 20; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function full_arsip($offset=0,$limit=50){ + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=? ORDER BY a.tgl_upload DESC"; + + $sql .= $paging_sql; + + $query = $this->db->query($sql,1); + $data = $query->result_array(); + if($query->num_rows()>0){ + $i=0; + while($i".$data[$i]['judul'].", ".$data[$i]['owner']; + $i++; + } + }else{ + $data = false; + } + + return $data; + } + function slide_show(){ + $sql = "SELECT gambar FROM artikel WHERE enabled=1 + UNION SELECT gambar1 FROM artikel WHERE enabled=1 + UNION SELECT gambar2 FROM artikel WHERE enabled=1 + UNION SELECT gambar3 FROM artikel WHERE enabled=1 + ORDER BY RAND() LIMIT 10 "; + $query = $this->db->query($sql); + if($query->num_rows()>0){ + $data = $query->result_array(); + }else{ + $data = false; + } + return $data; + } + function cos_widget(){ + $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE id_kategori='1003' ORDER BY a.tgl_upload DESC"; + $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori + FROM artikel a + LEFT JOIN user u ON a.id_user = u.id + LEFT JOIN kategori k ON a.id_kategori = k.id + WHERE a.id_kategori='1003' AND a.enabled=1 + ORDER BY a.tgl_upload DESC"; + $query = $this->db->query($sql); + if($query->num_rows()>0){ + $data = $query->result_array(); + }else{ + $data = false; + } + return $data; + } + function agenda_show(){ + $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE id_kategori='4' ORDER BY a.tgl_upload DESC"; + $query = $this->db->query($sql); + $data = $query->result_array(); + return $data; + } + function komentar_show(){ + $sql = "SELECT * FROM komentar WHERE enabled=? AND id_artikel <> 775 order by tgl_upload desc limit 10"; + $query = $this->db->query($sql,1); + $data = $query->result_array(); + + $i=0; + while($ibaca selengkapnya"; + $i++; + } + return $data; + } + function get_kategori($id=0){ + $sql = "SELECT a.kategori FROM kategori a WHERE a.id=?"; + $query = $this->db->query($sql,$id); + if($query->num_rows()>0){ + $data = $query->row_array(); + }else{ + $data = false; + } + return $data; + } + function get_artikel($id=0){ + $sql = "SELECT a.*,u.nama AS owner FROM artikel a LEFT JOIN user u ON a.id_user = u.id WHERE a.id=?"; + $query = $this->db->query($sql,$id); + if($query->num_rows()>0){ + $data = $query->row_array(); + }else{ + $data = false; + } + return $data; + } + function list_artikel($offset=0,$limit=50,$id=0){ + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=1 "; + if($id!=0) + $sql .= "AND id_kategori = $id OR parrent = $id"; + $sql .= " ORDER BY a.tgl_upload DESC "; + $sql .= $paging_sql; + $query = $this->db->query($sql); + if($query->num_rows()>0){ + $data = $query->result_array(); + }else{ + $data = false; + } + return $data; + } + function insert_comment($id=0){ + $data['komentar'] = strip_tags($_POST["komentar"]); + $data['owner'] = strip_tags($_POST["owner"]); + $data['email'] = strip_tags($_POST["email"]); + + $data['enabled'] = 2; + $data['id_artikel'] = $id; + $outp = $this->db->insert('komentar',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_komentar($id=0){ + $sql = "SELECT * FROM komentar WHERE id_artikel = ? ORDER BY tgl_upload DESC"; + $query = $this->db->query($sql,$id); + if($query->num_rows()>0){ + $data = $query->result_array(); + + $i=0; + while($idb->query($sql); + if($query->num_rows()>0){ + $data = $query->result_array(); + }else{ + $data = false; + } + return $data; + } +} \ No newline at end of file diff --git a/app/models/First_gallery_m.php b/app/models/First_gallery_m.php new file mode 100644 index 000000000..6c50a5aab --- /dev/null +++ b/app/models/First_gallery_m.php @@ -0,0 +1,67 @@ +db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = 8; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function gallery_show($offset=0,$limit=50){ + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT * FROM gambar_gallery WHERE enabled=1 AND tipe='0' "; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data = $query->result_array(); + return $data; + } + function paging2($gal=0,$p=1){ + $sql = "SELECT COUNT(id) AS id FROM gambar_gallery WHERE enabled=1 AND parrent=?"; + $query = $this->db->query($sql,$gal); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = 8; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function sub_gallery_show($gal=0,$offset=0,$limit=50){ + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT * FROM gambar_gallery WHERE ((enabled='1') AND ((parrent='".$gal."') OR (id='".$gal."'))) "; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data = $query->result_array(); + return $data; + } + function get_parrent($parrent){ + $sql = "SELECT * FROM gambar_gallery WHERE id='$parrent'"; + $query = $this->db->query($sql); + $data = $query->row_array(); + return $data; + } + function gallery_widget(){ + + $sql = "SELECT * FROM gambar_gallery WHERE enabled='1' ORDER BY RAND() LIMIT 4"; + $query = $this->db->query($sql); + $data = $query->result_array(); + return $data; + } +} \ No newline at end of file diff --git a/app/models/First_keluarga_m.php b/app/models/First_keluarga_m.php new file mode 100644 index 000000000..89a22b390 --- /dev/null +++ b/app/models/First_keluarga_m.php @@ -0,0 +1,43 @@ +db->query($sql); + if($query->num_rows()>0){ + $hasil = $sql; + $hasil = $query->result_array(); + }else{ + $hasil = false; + } + return $hasil; + } +} \ No newline at end of file diff --git a/app/models/First_m.php b/app/models/First_m.php new file mode 100644 index 000000000..fd1b92249 --- /dev/null +++ b/app/models/First_m.php @@ -0,0 +1,86 @@ +db->query($sql); + return $query->row_array(); + } + function siteman(){ + $_SESSION['mandiri']=-1; + $nik = $this->input->post('nik'); + $pin = $this->input->post('pin'); + $hash_pin = hash_pin($pin); + + $sql = "SELECT pin,last_login FROM tweb_penduduk_mandiri WHERE nik=?"; + $query=$this->db->query($sql,array($nik)); + $row=$query->row(); + $lg = $row->last_login; + + if($hash_pin==$row->pin){ + $_SESSION['mandiri'] = 1; + + $sql = "SELECT nama,nik,id FROM tweb_penduduk WHERE nik=?"; + $query=$this->db->query($sql,array($nik)); + $row=$query->row(); + + if($lg == "0000-00-00 00:00:00") + $_SESSION['lg'] = 1; + + $_SESSION['nama'] = $row->nama; + $_SESSION['nik'] = $row->nik; + $_SESSION['id'] = $row->id; + } + + if($_SESSION['mandiri_try'] > 2){ + $_SESSION['mandiri_try'] = $_SESSION['mandiri_try']-1; + }else{ + $_SESSION['mandiri_wait']=1; + } + } + function m_siteman($nik="",$pin=""){ + $hash_pin = hash_pin($pin); + + $sql = "SELECT pin,last_login FROM tweb_penduduk_mandiri WHERE nik=?"; + $query=$this->db->query($sql,array($nik)); + $row=$query->row(); + $lg = $row->last_login; + + if($hash_pin==$row->pin){ + + $sql = "UPDATE tweb_penduduk_mandiri SET last_login=NOW() WHERE nik=?"; + $this->db->query($sql, $nik); + + return $token; + } + + } + function logout(){ + + + if(isset($_SESSION['nik'])){ + $id = $_SESSION['nik']; + $sql = "UPDATE tweb_penduduk_mandiri SET last_login=NOW() WHERE nik=?"; + $this->db->query($sql, $id); + } + + + unset($_SESSION['mandiri']); + unset($_SESSION['id']); + unset($_SESSION['nik']); + unset($_SESSION['nama']); + } + function ganti(){ + if($_POST['pin1'] == $_POST['pin2']){ + + $hash_pin = hash_pin($_POST['pin1']); + + $data['pin'] = $hash_pin; + $this->db->where('nik',$_SESSION['nik']); + $outp = $this->db->update('tweb_penduduk_mandiri',$data); + } + $_SESSION['lg'] = 2; + } +} \ No newline at end of file diff --git a/app/models/First_menu_m.php b/app/models/First_menu_m.php new file mode 100644 index 000000000..3177d5ee2 --- /dev/null +++ b/app/models/First_menu_m.php @@ -0,0 +1,77 @@ +db->query($sql); + $data=$query->result_array(); + $url = site_url()."first/"; + $i=0; + while($i".$data[$i]['nama'].""; + + + + $sql2 = "SELECT s.* FROM menu s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; + $query = $this->db->query($sql2,$data[$i]['id']); + $data2=$query->result_array(); + + if($data2){ + $data[$i]['menu'] = $data[$i]['menu'].""; + } + $data[$i]['menu'] = $data[$i]['menu'].""; + $i++; + } + return $data; + } + function list_menu_kiri(){ + $sql = "SELECT m.*,m.kategori AS nama FROM kategori m WHERE m.parrent =0 AND m.enabled = 1 AND m.kategori <> 'teks_berjalan' ORDER BY id"; + + $query = $this->db->query($sql); + $data=$query->result_array(); + $url = site_url()."first/kategori/"; + $i=0; + + while($i".$data[$i]['nama'].""; + + $sql2 = "SELECT s.*,s.kategori AS nama FROM kategori s WHERE s.parrent = ? AND s.enabled = 1"; + $query = $this->db->query($sql2,$data[$i]['id']); + $data2=$query->result_array(); + + if($data2){ + $data[$i]['menu'] = $data[$i]['menu'].""; + } + $data[$i]['menu'] = $data[$i]['menu'].""; + $i++; + } + return $data; + } +} \ No newline at end of file diff --git a/app/models/First_penduduk_m.php b/app/models/First_penduduk_m.php new file mode 100644 index 000000000..d1bbc0002 --- /dev/null +++ b/app/models/First_penduduk_m.php @@ -0,0 +1,222 @@ += u.dari AND DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 <= u.sampai) AS jumlah, + (SELECT COUNT(id) FROM tweb_penduduk WHERE DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 >= u.dari AND DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 <= u.sampai AND sex=1) AS laki, + (SELECT COUNT(id) FROM tweb_penduduk WHERE DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 >= u.dari AND DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 <= u.sampai AND sex=2) AS perempuan + FROM tweb_penduduk_umur u WHERE status = 1 ORDER BY u.id "; break; + + case 13: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE warganegara_id = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE warganegara_id = u.id AND sex = 1) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE warganegara_id = u.id AND sex = 2) AS perempuan FROM tweb_penduduk_warganegara u WHERE 1 ORDER BY jumlah DESC"; break; + + case 14: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_kawin = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_kawin = u.id AND sex = 1) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_kawin = u.id AND sex = 2) AS perempuan FROM tweb_penduduk_kawin u WHERE 1 ORDER BY jumlah DESC"; break; + + + case 21: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE kelas_sosial = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_kelas_sosial u WHERE 1 ORDER BY jumlah DESC"; break; + + case 22: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE raskin = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_raskin u WHERE 1 ORDER BY jumlah DESC"; break; + + default:$sql = "SELECT u.* FROM tweb_penduduk_pendidikan u WHERE 1 "; + } + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + if($lap<=20){ + $sql3 = "SELECT (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.status_dasar=1) AS jumlah, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.sex = 1 and status_dasar=1) AS laki, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.sex = 2 and status_dasar=1) AS perempuan"; + }else{ + $sql3 = "SELECT (SELECT COUNT(p.id) FROM tweb_keluarga p WHERE 1) AS jumlah, + (SELECT COUNT(p.id) FROM tweb_keluarga p WHERE 1) AS laki, + (SELECT COUNT(p.id) FROM tweb_keluarga p WHERE 1) AS perempuan"; + } + + $query3 = $this->db->query($sql3); + $bel = $query3->row_array(); + + $total['jumlah']=0; + $bel['no']=""; + $bel['id']=""; + $bel['nama']="TOTAL"; + $total['laki']=0; + $total['perempuan']=0; + $i=0; + while($i 0){ + while($idb->query($sql); + $data=$query->result_array(); + + + $i=0; + while($idb->query($sql); + return $query->row_array(); + } + + function list_indikator(){ + $sql = "SELECT u.id,u.pertanyaan AS indikator,s.subjek,p.nama AS periode,p.tahun_pelaksanaan AS tahun,m.nama AS master,m.subjek_tipe,p.id AS id_periode FROM analisis_indikator u LEFT JOIN analisis_master m ON u.id_master = m.id LEFT JOIN analisis_ref_subjek s ON m.subjek_tipe = s.id LEFT JOIN analisis_periode p ON p.id_master = m.id AND p.aktif = 1 WHERE u.is_publik = 1 ORDER BY u.nomor ASC"; + $query = $this->db->query($sql); + $data= $query->result_array(); + + $i=0; + while($idb->query($sql,$id); + $data= $query->row_array(); + return $data['pertanyaan']; + } + function list_jawab($id=0,$sb=0,$per=0){ + switch($sb){ + case 1: $sbj = "LEFT JOIN tweb_penduduk p ON r.id_subjek = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; + case 2: $sbj = "LEFT JOIN tweb_keluarga v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id " ; break; + case 3: $sbj = "LEFT JOIN tweb_rtm v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.nik_kepala = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; + case 4: $sbj = "LEFT JOIN kelompok v ON r.id_subjek = v.id LEFT JOIN tweb_penduduk p ON v.id_ketua = p.id LEFT JOIN tweb_wil_clusterdesa a ON p.id_cluster = a.id "; break; + } + + $sql = "SELECT * FROM analisis_parameter WHERE id_indikator = ? ORDER BY kode_jawaban ASC "; + $query = $this->db->query($sql,$id); + $data= $query->result_array(); + + $i=0; + while($idb->query($sql,$data[$i]['id']); + $respon= $query->row_array(); + + $data[$i]['nilai']=$respon['jml']; + + $i++; + } + return $data; + } + +} \ No newline at end of file diff --git a/app/models/First_slide_m.php b/app/models/First_slide_m.php new file mode 100644 index 000000000..d1b916779 --- /dev/null +++ b/app/models/First_slide_m.php @@ -0,0 +1,12 @@ +db->query($sql,1); + $data = $query->result_array(); + return $data; + } +} \ No newline at end of file diff --git a/app/models/Header_model.php b/app/models/Header_model.php new file mode 100644 index 000000000..c0f24e5ef --- /dev/null +++ b/app/models/Header_model.php @@ -0,0 +1,82 @@ +db->query($sql,$user); + $data = $query->row_array(); + return $data['id']; + } + function get_data(){ + /* + * global variabel + * */ + $outp["sasaran"] = array("1"=>"Penduduk","2"=>"Keluarga / KK","3"=>"Rumah Tangga","4"=>"Kelompok/Organisasi Kemasyarakatan"); + + /* + * Pembenahan per 13 Juli 15, sebelumnya ada notifikasi Error, saat $_SESSOIN['user'] nya kosong! + * */ + $id = @$_SESSION['user']; + $sql = "SELECT nama,foto FROM user WHERE id=?"; + $query = $this->db->query($sql, $id); + if($query){ + if($query->num_rows()>0){ + $data = $query->row_array(); + $outp['nama'] = $data['nama']; + $outp['foto'] = $data['foto']; + } + } + + $sql = "SELECT * FROM config WHERE 1"; + $query = $this->db->query($sql); + $outp['desa'] = $query->row_array(); + + + $sql = "SELECT COUNT(id) AS jml FROM komentar WHERE id_artikel=775 AND enabled = 2;"; + $query = $this->db->query($sql); + $lap = $query->row_array(); + $outp['lapor'] = $lap['jml']; + + $sql = "SELECT * FROM setting_modul WHERE aktif = 1 AND level >= ?;"; + $query = $this->db->query($sql,$_SESSION['grup']); + $modul = $query->result_array(); + $outp['modul'] = $modul; + + return $outp; + } + + function get_config(){ + $sql = "SELECT * FROM config WHERE 1"; + $query = $this->db->query($sql); + $outp['desa'] = $query->row_array(); + return $outp; + } + + function init_penduduk(){ + $i=1; + + $sql = "SELECT COUNT(id) AS jml FROM tweb_penduduk WHERE 1"; + $query = $this->db->query($sql); + $data = $query->row_array(); + $i = $i*$data['jml']; + + $sql = "SELECT COUNT(id) AS jml FROM tweb_keluarga WHERE 1"; + $query = $this->db->query($sql); + $data = $query->row_array(); + //$i = $i*$data['jml']; + + $sql = "SELECT COUNT(id) AS jml FROM tweb_wil_clusterdesa WHERE 1"; + $query = $this->db->query($sql); + $data = $query->row_array(); + //$i = $i*$data['jml']; + + if($i > 0) + return 1; + else + return 0; + } +} diff --git a/app/models/Import_model.php b/app/models/Import_model.php new file mode 100644 index 000000000..c324791e7 --- /dev/null +++ b/app/models/Import_model.php @@ -0,0 +1,745 @@ +load->helper('excel'); + } + function import_siak(){ + + $_SESSION['success']=-1; + $vdir_upload = "surat/arsip/"; + $vfile_upload_dk = $vdir_upload.$_FILES["file_dk"]["name"]; + move_uploaded_file($_FILES["file_dk"]["tmp_name"], $vfile_upload_dk); + + $vfile_upload_bw = $vdir_upload.$_FILES["file_bw"]["name"]; + move_uploaded_file($_FILES["file_bw"]["tmp_name"], $vfile_upload_bw); + + if(is_file($vfile_upload_dk)){ + + if(is_file($vfile_upload_dk)){ + $data = file_get_contents($vfile_upload_dk); + $convert = explode("\n", $data); + $strSQL = "TRUNCATE tweb_keluarga"; + $this->db->query($strSQL); + $strSQL = "TRUNCATE tweb_penduduk"; + $this->db->query($strSQL); + $strSQL = "TRUNCATE tweb_wil_clusterdesa"; + $this->db->query($strSQL); + + $kk = array(); + $j=0; + $x=""; + + $dusun = 0; + $rw = 0; + $rt = 0; + $nKK = 0; + + $strSQLKK = ""; + + for ($i=0;$i0){ + if(strlen($convert[$i])>10){ + $strDusun = str_replace(" "," ",trim($item[5])); + //$strDusun = str_replace(" ","_",$strDusun); + + $strRT = trim($item[3]); + + $strSQL = "SELECT id FROM tweb_wil_clusterdesa WHERE dusun='".fixSQL($strDusun)."' AND rw='0' AND rt='0' "; + $result = $this->db->query($strSQL); + if($result->num_rows() > 0){ + + }else{ + + $strSQL="INSERT INTO tweb_wil_clusterdesa(rt,rw,dusun) VALUES('0','0','".fixSQL($strDusun)."')"; + if($this->db->query($strSQL)){ + $dusun++; + } + } + + $strSQL = "SELECT id FROM tweb_wil_clusterdesa WHERE dusun='".fixSQL($strDusun)."' AND rw='-' AND rt='0'"; + $result = $this->db->query($strSQL); + if($result->num_rows() > 0){ + }else{ + $strSQL="INSERT INTO tweb_wil_clusterdesa(rt,rw,dusun) VALUES('0','-','".fixSQL($strDusun)."')"; + if($this->db->query($strSQL)){ + $rw++; + } + } + + $strSQL = "SELECT id FROM tweb_wil_clusterdesa WHERE dusun='".fixSQL($strDusun)."' AND rw='-' AND rt='".fixSQL($strRT)."' LIMIT 1"; + $result = $this->db->query($strSQL); + if($result->num_rows() > 0){ + $rs =$result->row(0); + $id_wil = $rs->id; + }else{ + + $strSQL = "INSERT INTO tweb_wil_clusterdesa(rt,rw,dusun) VALUES('".fixSQL($strRT)."','-','".fixSQL($strDusun)."')"; + $result = $this->db->query($strSQL); + if($result){ + $strSQL = "SELECT id FROM tweb_wil_clusterdesa WHERE dusun='".fixSQL($strDusun)."' AND rw='-' AND rt='".fixSQL($strRT)."' LIMIT 1"; + $result = $this->db->query($strSQL); + if($result->num_rows() > 0){ + $rs =$result->row(0); + $id_wil = $rs->id; + } + } + $rt++; + } + + if($id_wil > 0){ + $post_data = array('tgl_daftar'=>"".date("Y-m-d")."",'no_kk'=>"".fixSQL($item[0])."",'nik_kepala'=>"".fixSQL($item[23]).""); + $this->db->trans_start(); + if($this->db->insert('tweb_keluarga',$post_data)){ + $this->db->trans_complete(); + $nKK++; + $strSQL = "SELECT id FROM tweb_keluarga WHERE ((no_kk='".fixSQL($item[0])."') AND (nik_kepala='".fixSQL($item[23])."')) LIMIT 1"; + $result = $this->db->query($strSQL); + if($result->num_rows() > 0){ + $rs =$result->row(0); + $id_kk = $rs->id; + } + } + $kk[$item[0]] = array($id_kk,"".$id_wil."","".$item[2].""); + } + + } + } + if(trim(strtolower($convert[$i]))=="begindata"){ + $j++; + } + if($j>0){ + $j++; + } + + } + + $strInfo = " +
    +
    +
    Dusun
    ".$dusun."
    +
    RW
    ".$rw."
    +
    RT
    ".$rt."
    +
    Data KK
    ".$nKK."
    +
    +
    + "; + + } + } + + if(is_file($vfile_upload_bw)){ + + if(is_file($vfile_upload_bw)){ + $data = file_get_contents($vfile_upload_bw); + $convert1 = explode("\n", $data); + + $j=0; + $strSQL = "INSERT INTO tweb_penduduk (`nama`, `nik`, `id_kk`, `kk_level`, `id_rtm`, `rtm_level`, "; + $strSQL .= "`sex`, `tempatlahir`, `tanggallahir`, "; + $strSQL .= "`agama_id`, `pendidikan_kk_id`, `pendidikan_id`, "; + $strSQL .= "`pendidikan_sedang_id`, `pekerjaan_id`, `status_kawin`, "; + $strSQL .= "`warganegara_id`, `dokumen_pasport`, `dokumen_kitas`, "; + $strSQL .= "`ayah_nik`, `ibu_nik`, `nama_ayah`, `nama_ibu`, "; + $strSQL .= "`foto`, `golongan_darah_id`, `id_cluster`, `status`, "; + $strSQL .= "`alamat_sebelumnya`, `alamat_sekarang`, `status_dasar`,"; + $strSQL .= "`hamil`, `cacat_id`, `sakit_menahun_id`, `jamkesmas`, "; + $strSQL .= "`akta_lahir`, `akta_perkawinan`, `tanggalperkawinan`, "; + $strSQL .= "`akta_perceraian`, `tanggalperceraian`) VALUES\n"; + for ($i=0;$i0){ + if(strlen($convert1[$i])>25){ + $item = explode(";",trim(str_replace("\"","",$convert1[$i]))); + + + if($j>0){ + if($item[20]==1){ + if(array_key_exists($item[36],$kk)){ + $strSQLX = "UPDATE tweb_keluarga SET nik_kepala='".fixSQL($item[0])."' WHERE no_kk='".$item[36]."'"; + $this->db->query($strSQLX); + } + } + if(array_key_exists($item[36],$kk)){ + $id_kk = $kk[$item[36]][0]; + $id_cluster = $kk[$item[36]][1]; + $alamat = $kk[$item[36]][2]; + }else{ + $id_kk = 0; + $id_cluster = 0; + $alamat = ""; + } + $strSQL .= "('".fixSQL($item[5])."','".fixSQL($item[0])."','".fixSQL($id_kk)."','".fixSQL($item[20])."',"; + $strSQL .= "'-','-',"; + $strSQL .= "'".fixSQL($item[6])."','".fixSQL($item[7])."','".fixSQL(date("Y-m-d",strtotime($item[8])))."',"; + $strSQL .= "'".fixSQL($item[12])."','".fixSQL($item[23])."','".fixSQL($item[23])."',"; + $strSQL .= "'".fixSQL($item[23])."','".fixSQL($item[24])."','".fixSQL($item[13])."',"; + $strSQL .= "'1','".fixSQL($item[3])."','-',"; + $strSQL .= "'-','-','".fixSQL($item[28])."','".fixSQL($item[26])."',"; + $strSQL .= "'','".fixSQL($item[11])."','".fixSQL($id_cluster)."',1,"; + $strSQL .= "'','".fixSQL($alamat)."',1, + '0','".fixSQL($item[21])."','".fixSQL($item[22])."','', + '".fixSQL($item[9])."','".fixSQL($item[14])."','".fixSQL($item[16])."', + '".fixSQL($item[17])."','".fixSQL($item[19])."'),"; + } + } + } + + if(trim(strtolower($convert1[$i]))=="begindata"){ + $j++; + } + if($j>0){ + $j++; + } + } + $strSQL = rtrim($strSQL,","); + if($this->db->query($strSQL)){ + $strSQL = "UPDATE `tweb_keluarga` k SET k.nik_kepala = ( SELECT p.id FROM tweb_penduduk p WHERE p.id_kk = k.id AND p.kk_level =1 ) WHERE k.id >0"; + if($this->db->query($strSQL)){ + $_SESSION['success']=1; + } + } + } + } + } + + function import_excel(){ + + //if($_FILES['userfile']['type'] == "application/vnd.ms-excel"){ + $gagal=0; + $baris2=""; + $a="DROP TABLE IF EXISTS impor"; + $this->db->query($a); + $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']); + + $baris = $data->rowcount($sheet_index=0); + + $a="CREATE TABLE IF NOT EXISTS impor ( + dusun varchar(50) NOT NULL DEFAULT 0, + rw varchar(10) NOT NULL DEFAULT 0, + rt varchar(10) NOT NULL DEFAULT 0, + nama varchar(50) NOT NULL, + nik varchar(16) NOT NULL, + sex tinyint(1) unsigned DEFAULT NULL, + tempatlahir varchar(50) NOT NULL, + tanggallahir date NOT NULL, + agama_id int(1) unsigned NOT NULL, + pendidikan_kk_id int(1) unsigned NOT NULL, + pendidikan_id int(1) unsigned NOT NULL, + pendidikan_sedang_id int(1) unsigned NOT NULL, + pekerjaan_id int(1) unsigned NOT NULL, + status_kawin tinyint(1) unsigned NOT NULL, + kk_level tinyint(1) NOT NULL DEFAULT 0, + warganegara_id int(1) unsigned NOT NULL, + nama_ayah varchar(50) NOT NULL, + nama_ibu varchar(50) NOT NULL, + golongan_darah_id int(1) NOT NULL, + jamkesmas int(1) NOT NULL DEFAULT 2, + id_kk varchar(16) NOT NULL DEFAULT '0') ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;"; + $this->db->query($a); + $a="TRUNCATE tweb_wil_clusterdesa"; + $this->db->query($a); + $a="TRUNCATE tweb_keluarga"; + $this->db->query($a); + $a="TRUNCATE tweb_penduduk"; + $this->db->query($a); + + $baris2 =""; + $j=0; + for ($i=2; $i<=$baris; $i++){ + $dusun = $data->val($i, 1); + $rw = $data->val($i, 2); + $rt = $data->val($i, 3); + + $nama = $data->val($i, 4); + if($nama!=""){ + $nama = '"'.$nama.'"'; + } + + $id_kk= $data->val($i, 5); + $nik = $data->val($i, 6); + $sex = $data->val($i, 7); + $tempatlahir= $data->val($i, 8); + if($tempatlahir!=""){ + $tempatlahir = '"'.$tempatlahir.'"'; + }else{ + $tempatlahir = '"-"'; + } + $tanggallahir= $data->val($i, 9); + + if(strlen($tanggallahir)>0){ + $tanggallahir = date("Y-m-d",strtotime($tanggallahir)); + }else{ + $tanggallahir = date("Y-m-d"); + } + + if($tanggallahir[2] == "/" OR $tanggallahir[4] == "/"){ + $tanggallahir = str_replace('/','-', $tanggallahir); + } + + $dusun = str_replace('_',' ', $dusun); + $dusun = strtoupper($dusun); + $dusun = str_replace('DUSUN ','', $dusun); + $dusun = str_replace('dusun ','', $dusun); + $dusun = str_replace('Dusun ','', $dusun); + $dusun = str_replace('DUSUN','', $dusun); + $dusun = str_replace('dusun','', $dusun); + $dusun = str_replace('Dusun','', $dusun); + if($tanggallahir[2] == "-"){ + $tanggallahir = rev_tgl($tanggallahir); + } + + $agama_id= $data->val($i, 10); + $pendidikan_kk_id= $data->val($i, 11); + $pendidikan_sedang_id= $data->val($i, 12); + if($pendidikan_sedang_id=="") + $pendidikan_sedang_id=18; + + $pekerjaan_id= $data->val($i, 13); + $status_kawin= $data->val($i, 14); + $kk_level= $data->val($i, 15); + $warganegara_id= 1; + + $nama_ayah= $data->val($i,17); + if($nama_ayah!=""){ + $nama_ayah = '"'.$nama_ayah.'"'; + }else{ + $nama_ayah = '"-"'; + } + $nama_ibu= $data->val($i,18); + if($nama_ibu!=""){ + $nama_ibu = '"'.$nama_ibu.'"'; + }else{ + $nama_ibu = '"-"'; + } + + $golongan_darah_id= $data->val($i, 19); + + + $nik = preg_replace("/[^0-9]+/", "", $nik); + $id_kk = preg_replace("/[^0-9]+/", "", $id_kk); + + + $sql="INSERT INTO impor(dusun,rw,rt,nama,nik,sex,tempatlahir,tanggallahir,agama_id,pendidikan_kk_id, pendidikan_sedang_id,pekerjaan_id,status_kawin,kk_level,warganegara_id,nama_ayah,nama_ibu,golongan_darah_id,id_kk) VALUES ('$dusun','$rw','$rt',$nama,'$nik',$sex,$tempatlahir,'$tanggallahir','$agama_id','$pendidikan_kk_id','$pendidikan_sedang_id','$pekerjaan_id','$status_kawin','$kk_level','$warganegara_id',$nama_ayah,$nama_ibu,'$golongan_darah_id','$id_kk');"; + + + if($nama!="" AND $nik!="" AND $id_kk!="" AND $dusun!=""){ + $h = $this->db->query($sql); + }else{ + $gagal++; + $baris2 .=$i.","; + } + $h = null; + $sukses = $baris - $gagal - 1; + } + if($gagal==0) + $baris2 ="tidak ada data yang gagal di import."; + + + $query="INSERT INTO tweb_wil_clusterdesa(rt,rw,dusun) select * from ( + SELECT rt, rw, dusun from impor GROUP BY rw,rt,dusun + union SELECT '0' as rt, '0' as rw, dusun from impor GROUP BY dusun + union SELECT '0' as rt, '-' as rw, dusun from impor GROUP BY dusun + union SELECT '-' as rt, '-' as rw, dusun from impor GROUP BY dusun + union SELECT '-' as rt, rw as rw, dusun from impor GROUP BY rw,dusun + union SELECT '0' as rt, rw as rw, dusun from impor GROUP BY rw,dusun + ORDER BY rw,rt,dusun ASC) as temp"; + $hasil = $this->db->query($query); + + $query="INSERT INTO tweb_keluarga(no_kk) SELECT DISTINCT(id_kk) AS no_kk FROM impor"; + $hasil = $this->db->query($query); + + $query="INSERT INTO tweb_penduduk(nama,nik,id_kk,kk_level,sex,tempatlahir,tanggallahir,agama_id,pendidikan_kk_id,pendidikan_sedang_id,pekerjaan_id,status_kawin,warganegara_id,nama_ayah,nama_ibu,golongan_darah_id,id_cluster,status) SELECT nama,nik,(SELECT id FROM tweb_keluarga WHERE no_kk=a.id_kk) as id_kk,kk_level,sex,tempatlahir,tanggallahir,agama_id,pendidikan_kk_id,pendidikan_sedang_id,pekerjaan_id,status_kawin,warganegara_id,nama_ayah,nama_ibu,golongan_darah_id,(SELECT id FROM tweb_wil_clusterdesa where dusun=a.dusun AND rw=a.rw AND rt=a.rt) as id_cluster,'1' as status from impor a;"; + $hasil = $this->db->query($query); + + $sql="SELECT id FROM tweb_keluarga"; + if ($a=$this->db->query($sql)){ + $hsl = $a->result_array(); + foreach($hsl AS $hsl2){ + $idnya=($hsl2['id']); + $kirim = "UPDATE tweb_keluarga SET nik_kepala=(SELECT id FROM tweb_penduduk where kk_level='1' AND id_kk=$idnya LIMIT 1) WHERE id=$idnya"; + $query=$this->db->query($kirim); + } + } + $a="DROP TABLE impor"; + $this->db->query($a); + $a="DELETE FROM tweb_wil_clusterdesa WHERE dusun = '' OR rt = '' OR rw='';"; + $this->db->query($a); + $a="DELETE FROM tweb_keluarga WHERE nik_kepala = '' OR nik_kepala is null;"; + $this->db->query($a); + $a="DELETE FROM tweb_penduduk WHERE nama = '' AND nik = '';"; + $this->db->query($a); + $a="ALTER TABLE tweb_penduduk ENGINE = InnoDB ROW_FORMAT = DYNAMIC;"; + + $a="ALTER TABLE tweb_keluarga ENGINE = InnoDB ROW_FORMAT = DYNAMIC;"; + + + $_SESSION['gagal']=$gagal; + $_SESSION['sukses']=$sukses; + $_SESSION['baris']=$baris2; + + if($gagal==0) $_SESSION['success']=1; + else $_SESSION['success']=-1; + + + //}else{$_SESSION['success']=-1;} + } + function import_dasar(){ + $data = ""; + $in = ""; + $outp = ""; + $filename = $_FILES['userfile']['tmp_name']; + if ($filename!=''){ + $lines = file($filename); + foreach ($lines as $line){$data .= $line;} + $penduduk=Parse_Data($data,"",""); + $keluarga=Parse_Data($data,"",""); + $cluster=Parse_Data($data,"",""); + + $penduduk=explode("\r\n",$penduduk); + $keluarga=explode("\r\n",$keluarga); + $cluster=explode("\r\n",$cluster); + + $inset = "INSERT INTO tweb_penduduk VALUES "; + for($a=1;$a<(count($penduduk)-1);$a++){ + $p = preg_split("/\+/", $penduduk[$a]); + $in .= "("; + for($j=0;$j<(count($p));$j++){ + $in .= ',"'.$p[$j].'"'; + } + $in .= "),"; + } + $x = strlen($in); + $in[$x-1] =";"; + $outp = $this->db->query($inset.$in); + + + $in = ""; + $inset = "INSERT INTO tweb_wil_clusterdesa VALUES "; + for($a=1;$a<(count($cluster)-1);$a++){ + $p = preg_split("/\+/", $cluster[$a]); + $in .= "("; + for($j=0;$j<(count($p));$j++){ + $in .= ',"'.$p[$j].'"'; + } + $in .= "),"; + } + $x = strlen($in); + $in[$x-1] =";"; + $outp = $this->db->query($inset.$in); + + $in = ""; + $inset = "INSERT INTO tweb_keluarga VALUES "; + for($a=1;$a<(count($keluarga)-1);$a++){ + $p = preg_split("/\+/", $keluarga[$a]); + $in .= "("; + for($j=0;$j<(count($p));$j++){ + $in .= ',"'.$p[$j].'"'; + } + $in .= "),"; + } + $x = strlen($in); + $in[$x-1] =";"; + $outp = $this->db->query($inset.$in); + } + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function import_akp(){ + $id_desa = $_SESSION['user']; + $data = ""; + $in = ""; + $outp = ""; + $filename = $_FILES['userfile']['tmp_name']; + if ($filename!=''){ + $lines = file($filename); + foreach ($lines as $line){$data .= $line;} + $penduduk=Parse_Data($data,"",""); + + $penduduk=explode("\r\n",$penduduk); + + $inset = "INSERT INTO analisis_keluarga VALUES "; + for($a=1;$a<(count($penduduk)-1);$a++){ + $p = preg_split("/\+/", $penduduk[$a]); + $in .= "(".$id_desa; + for($j=0;$j<(count($p));$j++){ + $in .= ',"'.$p[$j].'"'; + } + $in .= "),"; + } + $x = strlen($in); + $in[$x-1] =";"; + $outp = $this->db->query($inset.$in); + + } + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + + function ppls_individu(){ + $a="DELETE FROM tweb_penduduk WHERE status = 2;"; + $this->db->query($a); + + $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']); + + $sheet=0; + $baris = $data->rowcount($sheet_index=$sheet); + $kolom = $data->colcount($sheet_index=$sheet); + + for ($i=2; $i<=$baris; $i++){ + + for ($j=1; $j<=$kolom;$j++){ + $rt = ""; + $dusun = ""; + $dusun2 = ""; + $temp = $data->val($i,$j,$sheet); + if($j==11){ + $p = strlen($temp); + if(is_numeric($temp[$p-1])){ + + $rt = $temp[$p-3].$temp[$p-2].$temp[$p-1]; + $dusun = explode(" ",$temp); + $dusun2 = $dusun[0];if($dusun[1]!="RT"){$dusun2 = $dusun2." ".$dusun[1];} + + }else{ + + $rt = $temp[3].$temp[4].$temp[5]; + $dusun = explode(" ",$temp); + $dusun2 = $dusun[2];if(isset($dusun[3])){$dusun2 = $dusun2." ".$dusun[3];} + } + $rt2 = $rt*1; + + }elseif($j==17){ + + $tlahir = $data->val($i,16,$sheet)."-".$data->val($i,17,$sheet)."-1"; + + }else{ + + } + + if($j==1) + $j+=9; + } + $sql = "SELECT id FROM tweb_wil_clusterdesa WHERE rt = ? OR rt = ?"; + $query = $this->db->query($sql,array($rt,$rt2)); + $cluster = $query->row_array(); + if($cluster) + $id_cluster = $cluster['id']; + else + $id_cluster = 0; + $penduduk = ""; + $penduduk['id_cluster'] = $id_cluster; + $penduduk['status'] = 2; + $penduduk['nama'] = $data->val($i,13,$sheet); + $penduduk['nik'] = $data->val($i,12,$sheet); + $penduduk['id_rtm'] = $data->val($i,1,$sheet); + $penduduk['tanggallahir'] = $tlahir; + $penduduk['rtm_level'] = 2; + $penduduk['nik'] = $data->val($i,25,$sheet); + $penduduk['kk_level'] = $data->val($i,14,$sheet); + $penduduk['sex'] = $data->val($i,15,$sheet); + $penduduk['pendidikan_id'] = $data->val($i,22,$sheet); + $penduduk['pendidikan_kk_id'] = $data->val($i,22,$sheet); + + $outp = $this->db->insert('tweb_penduduk',$penduduk); + } + + $a="TRUNCATE tweb_rtm; "; + $this->db->query($a); + + $a="INSERT INTO tweb_rtm (no_kk) SELECT distinct(id_rtm) AS no_kk FROM tweb_penduduk WHERE tweb_penduduk.status=2 AND tweb_penduduk.id_rtm <> 0; "; + $this->db->query($a); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function pbdt_individu(){ + $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']); + + $sheet=0; + $baris = $data->rowcount($sheet_index=$sheet); + $kolom = $data->colcount($sheet_index=$sheet); + + $gg=0; + for ($i=2; $i<=$baris; $i++){ + + //ID RuTa + $id_rtm = $data->val($i,2,$sheet); + + //Level + $rtm_level = $data->val($i,3,$sheet); + if($rtm_level > 1)$rtm_level=2; + + //NIK + $nik = $data->val($i,1,$sheet); + + $sql = "SELECT nama FROM tweb_penduduk WHERE nik = ?"; + $query = $this->db->query($sql,$nik); + $pdd = $query->row_array(); + + $nama = "--> GAGAL"; + if($pdd){ + + $upd['id_rtm'] = $id_rtm; + $upd['rtm_level'] = $rtm_level; + + $this->db->where('nik',$nik); + $outp = $this->db->update('tweb_penduduk',$upd); + $nama = $pdd['nama']; + + echo "".$id_rtm." ".$rtm_level." ".$nik." ".$nama."
    "; + }else{ + + $penduduk = ""; + $penduduk['id_cluster'] = 0; + $penduduk['status'] = 2; + $penduduk['nama'] = $data->val($i,8,$sheet); + $penduduk['nik'] = $nik; + $penduduk['id_rtm'] = $id_rtm; + $penduduk['rtm_level'] = $rtm_level; + + $outp = $this->db->insert('tweb_penduduk',$penduduk); + + echo "".$id_rtm." ".$rtm_level." ".$nik." ".$nama."
    "; + + $gg++; + } + + + } + + $a="TRUNCATE tweb_rtm; "; + $this->db->query($a); + + $a="INSERT INTO tweb_rtm (id,no_kk,nik_kepala) SELECT distinct(id_rtm) AS no_kk,id_rtm,id FROM tweb_penduduk WHERE tweb_penduduk.id_rtm > 0 AND rtm_level = 1; "; + $outp = $this->db->query($a); + + $_SESSION['ggl'] = $gg; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + + echo "
    JUMLAH GAGAL : $gg
    "; + echo "LANJUT"; + } + + function ppls_rumahtangga(){ + + $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']); + + $sheet=0; + $baris = $data->rowcount($sheet_index=$sheet); + $kolom = $data->colcount($sheet_index=$sheet); + + + for ($i=2; $i<=$baris; $i++){ + + + $penduduk = ""; + + + $penduduk['nama'] = $data->val($i,12,$sheet); + $penduduk['id_rtm'] = $data->val($i,1,$sheet); + + + //$outp = $this->db->insert('tweb_penduduk',$penduduk); + $upd['rtm_level'] = 1; + + $this->db->where('id_rtm',$penduduk['id_rtm'] ); + $this->db->where('nama',$penduduk['nama'] ); + $outp = $this->db->update('tweb_penduduk',$upd); + + } + + $sql = "SELECT id,no_kk FROM tweb_rtm WHERE 1 "; + + $query = $this->db->query($sql); + $rtm=$query->result_array(); + + + $i=0; + while($idb->query($a); + $i++; + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function pbdt_rumahtangga(){ + + $data = new Spreadsheet_Excel_Reader($_FILES['userfile']['tmp_name']); + + $sheet=0; + $baris = $data->rowcount($sheet_index=$sheet); + $kolom = $data->colcount($sheet_index=$sheet); + + + for ($i=2; $i<=$baris; $i++){ + + $penduduk = ""; + $penduduk['nama'] = $data->val($i,12,$sheet); + $penduduk['id_rtm'] = $data->val($i,1,$sheet); + + //$outp = $this->db->insert('tweb_penduduk',$penduduk); + $upd['rtm_level'] = 1; + + $this->db->where('id_rtm',$penduduk['id_rtm'] ); + $this->db->where('nama',$penduduk['nama'] ); + $outp = $this->db->update('tweb_penduduk',$upd); + + } + + $sql = "SELECT id,no_kk FROM tweb_rtm WHERE 1 "; + + $query = $this->db->query($sql); + $rtm=$query->result_array(); + + + $i=0; + while($idb->query($a); + $i++; + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function persil(){ + $data = new Spreadsheet_Excel_Reader($_FILES['persil']['tmp_name']); + + $sheet=0; + $baris = $data->rowcount($sheet_index=$sheet); + $kolom = $data->colcount($sheet_index=$sheet); + + for ($i=2; $i<=$baris; $i++){ + $upd['nik'] = $data->val($i,2,$sheet); + $upd['nama'] = $data->val($i,3,$sheet); + $upd['persil_jenis_id'] = $data->val($i,4,$sheet); + $upd['id_clusterdesa'] = $data->val($i,5,$sheet); + $upd['luas'] = $data->val($i,6,$sheet); + $upd['kelas'] = $data->val($i,7,$sheet); + $upd['no_sppt_pbb'] = $data->val($i,8,$sheet); + $upd['persil_peruntukan_id'] = $data->val($i,9,$sheet); + + $outp = $this->db->insert('data_persil',$upd); + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } +} \ No newline at end of file diff --git a/app/models/Kelompok_master_model.php b/app/models/Kelompok_master_model.php new file mode 100644 index 000000000..e118fcd59 --- /dev/null +++ b/app/models/Kelompok_master_model.php @@ -0,0 +1,144 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.kelompok LIKE '$kw' OR u.kelompok LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND u.id = $kf"; + return $filter_sql; + } + } + function state_sql(){ + if(isset($_SESSION['state'])){ + $kf = $_SESSION['state']; + $filter_sql= " AND u.lock = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM kelompok_master u WHERE 1"; + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->state_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.kelompok'; break; + case 2: $order_sql = ' ORDER BY u.kelompok DESC'; break; + case 3: $order_sql = ' ORDER BY u.kelompok'; break; + case 4: $order_sql = ' ORDER BY u.kelompok DESC'; break; + case 5: $order_sql = ' ORDER BY g.kelompok'; break; + case 6: $order_sql = ' ORDER BY g.kelompok DESC'; break; + default:$order_sql = ' ORDER BY u.kelompok'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT u.* FROM kelompok_master u WHERE 1 "; + + $sql .= $this->search_sql(); + + + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($idb->insert('kelompok_master',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $this->db->where('id',$id); + $outp = $this->db->update('kelompok_master',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM kelompok_master WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM kelompok_master WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function get_kelompok_master($id=0){ + $sql = "SELECT * FROM kelompok_master WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function list_subjek(){ + $sql = "SELECT * FROM kelompok_ref_subjek"; + $query = $this->db->query($sql); + return $query->result_array(); + } +} +?> \ No newline at end of file diff --git a/app/models/Kelompok_model.php b/app/models/Kelompok_model.php new file mode 100644 index 000000000..c3dfbf68e --- /dev/null +++ b/app/models/Kelompok_model.php @@ -0,0 +1,214 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.nama LIKE '$kw' OR u.nama LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND u.id_master = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM kelompok u WHERE 1"; + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.nama'; break; + case 2: $order_sql = ' ORDER BY u.nama DESC'; break; + case 3: $order_sql = ' ORDER BY u.nama'; break; + case 4: $order_sql = ' ORDER BY u.nama DESC'; break; + case 5: $order_sql = ' ORDER BY g.nama'; break; + case 6: $order_sql = ' ORDER BY g.nama DESC'; break; + default:$order_sql = ' ORDER BY u.nama'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT u.*,s.kelompok AS master,c.nama AS ketua,(SELECT COUNT(id) FROM kelompok_anggota WHERE id_kelompok = u.id) AS jml_anggota FROM kelompok u LEFT JOIN kelompok_master s ON u.id_master = s.id LEFT JOIN tweb_penduduk c ON u.id_ketua = c.id WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($idb->insert('kelompok',$data); + $insert_id = $this->db->insert_id(); + + $datax['id_kelompok']=$insert_id; + $datax['id_penduduk']=$data['id_ketua']; + $outpb = $this->db->insert('kelompok_anggota',$datax); + + if($outpa && $outpb) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function insert_a($id=0){ + $data = $_POST; + $data['id_kelompok']=$id; + + $sql = "SELECT id FROM kelompok_anggota WHERE id_kelompok = ? AND id_penduduk = ?"; + $query = $this->db->query($sql,array($data['id_kelompok'],$data['id_penduduk'])); + $kel = $query->row_array(); + + if(!$kel){ + $outp = $this->db->insert('kelompok_anggota',$data); + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + if($data['id_ketua']=="") + unset($data['id_ketua']); + + $this->db->where('id',$id); + $outp = $this->db->update('kelompok',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function update_a($id=0,$id_a=0){ + $data = $_POST; + + $this->db->where('id_kelompok',$id); + $this->db->where('id_penduduk',$id_a); + $outp = $this->db->update('kelompok_anggota',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function delete($id=''){ + $sql = "DELETE FROM kelompok WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_a($id=''){ + $sql = "DELETE FROM kelompok_anggota WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM kelompok WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function get_kelompok($id=0){ + $sql = "SELECT * FROM kelompok WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_anggota($id=0,$id_a=0){ + $sql = "SELECT * FROM kelompok_anggota WHERE id_kelompok=? AND id_penduduk = ?"; + $query = $this->db->query($sql,array($id,$id_a)); + $data = $query->row_array(); + return $data; + } + function list_master(){ + $sql = "SELECT * FROM kelompok_master"; + $query = $this->db->query($sql); + return $query->result_array(); + } + function list_penduduk(){ + $sql = "SELECT id,nik,nama FROM tweb_penduduk WHERE status_dasar = 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + while($idb->query($sql,$id); + $data=$query->result_array(); + + + $i=0; + while($i \ No newline at end of file diff --git a/app/models/Keluarga_model.php b/app/models/Keluarga_model.php new file mode 100644 index 000000000..33aaa0bcb --- /dev/null +++ b/app/models/Keluarga_model.php @@ -0,0 +1,870 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->query($sql); + $data = $query->result_array(); + + return $data; + } + function dn(){ + $sql = "SELECT nik FROM tweb_penduduk WHERE 1 "; + $query = $this->db->query($sql); + $data = $query->result_array(); + + return $data; + } + function sex_sql(){ + if(isset($_SESSION['sex'])){ + $kf = $_SESSION['sex']; + $sex_sql= " AND t.sex = '$kf'"; + return $sex_sql; + } + } + function dusun_sql(){ + if(isset($_SESSION['dusun'])){ + $kf = $_SESSION['dusun']; + $dusun_sql= " AND c.dusun = '$kf'"; + return $dusun_sql; + } + } + function rw_sql(){ + if(isset($_SESSION['rw'])){ + $kf = $_SESSION['rw']; + $rw_sql= " AND c.rw = '$kf'"; + return $rw_sql; + } + } + function rt_sql(){ + if(isset($_SESSION['rt'])){ + $kf = $_SESSION['rt']; + $rt_sql= " AND c.rt = '$kf'"; + return $rt_sql; + } + } + function search_sql(){ + if(isset($_SESSION['cari'])){ + $cari = $_SESSION['cari']; + $kw = penetration($this->db->escape_like_str($cari)); + $kw = '%' .$kw. '%'; + $search_sql= " AND (t.nama LIKE '$kw' OR u.no_kk LIKE '$kw' OR t.nik LIKE '$kw') "; + return $search_sql; + } + } + + function jenis_sql(){ + if(isset($_SESSION['jenis'])){ + $kh = $_SESSION['jenis']; + $jenis_sql= " AND jenis = $kh"; + return $jenis_sql; + } + } + function kelas_sql(){ + if(isset($_SESSION['kelas'])){ + $kh = $_SESSION['kelas']; + $kelas_sql= " AND kelas_sosial= $kh"; + return $kelas_sql; + } + } + function raskin_sql(){ + if(isset($_SESSION['raskin'])){ + $kh = $_SESSION['raskin']; + $raskin_sql= " AND raskin= $kh"; + return $raskin_sql; + } + } + function blt_sql(){ + if(isset($_SESSION['id_blt'])){ + $kh = $_SESSION['id_blt']; + $blt_sql= " AND id_blt= $kh"; + return $blt_sql; + } + } + function bos_sql(){ + if(isset($_SESSION['id_bos'])){ + $kh = $_SESSION['id_bos']; + $bos_sql= " AND id_bos= $kh"; + return $bos_sql; + } + } + function pkh_sql(){ + if(isset($_SESSION['id_pkh'])){ + $kh = $_SESSION['id_pkh']; + $pkh_sql= " AND id_pkh= $kh"; + return $pkh_sql; + } + } + function jampersal_sql(){ + if(isset($_SESSION['id_jampersal'])){ + $kh = $_SESSION['id_jampersal']; + $jampersal_sql= " AND id_jampersal= $kh"; + return $jampersal_sql; + } + } + function bedah_rumah_sql(){ + if(isset($_SESSION['id_bedah_rumah'])){ + $kh = $_SESSION['id_bedah_rumah']; + $bedah_rumah_sql= " AND id_bedah_rumah= $kh"; + return $bedah_rumah_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE 1 "; + $sql .= $this->search_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $this->sex_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.no_kk'; break; + case 2: $order_sql = ' ORDER BY u.no_kk DESC'; break; + case 3: $order_sql = ' ORDER BY kepala_kk'; break; + case 4: $order_sql = ' ORDER BY kepala_kk DESC'; break; + case 5: $order_sql = ' ORDER BY g.nama'; break; + case 6: $order_sql = ' ORDER BY g.nama DESC'; break; + default:$order_sql = ' ORDER BY u.tgl_daftar DESC'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT u.*,t.nama AS kepala_kk,t.nik,t.sex,(SELECT COUNT(id) FROM tweb_penduduk WHERE id_kk = u.id ) AS jumlah_anggota,c.dusun,c.rw,c.rt FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE 1 "; + + $sql .= $this->search_sql(); + + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $this->sex_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($isearch_sql(); + }else{ + $sql = "SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE 1 "; + $sql .= $this->search_sql(); + + + + $sql .= $this->raskin_sql(); + $sql .= $this->kelas_sql(); + $sql .= $this->blt_sql(); + $sql .= $this->bos_sql(); + $sql .= $this->pkh_sql(); + $sql .= $this->jampersal_sql(); + $sql .= $this->bedah_rumah_sql(); + } + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data_statistik($tipe=21,$o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.no_kk'; break; + case 2: $order_sql = ' ORDER BY u.no_kk DESC'; break; + case 3: $order_sql = ' ORDER BY kepala_kk'; break; + case 4: $order_sql = ' ORDER BY kepala_kk DESC'; break; + case 5: $order_sql = ' ORDER BY g.nama'; break; + case 6: $order_sql = ' ORDER BY g.nama DESC'; break; + default:$order_sql = ' ORDER BY u.tgl_daftar DESC'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + if($tipe==21){ + $sql="SELECT u.*,t.nama AS kepala_kk,(SELECT COUNT(id) FROM tweb_penduduk WHERE id_kk = u.id ) AS jumlah_anggota,c.dusun,c.rw,c.rt FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE kelas_sosial=$_SESSION[kelas] "; + $sql .= $this->search_sql(); + }else{ + $sql = "SELECT u.*,t.nama AS kepala_kk,(SELECT COUNT(id) FROM tweb_penduduk WHERE id_kk = u.id ) AS jumlah_anggota,c.dusun,c.rw,c.rt FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->raskin_sql(); + + $sql .= $this->blt_sql(); + $sql .= $this->bos_sql(); + $sql .= $this->pkh_sql(); + $sql .= $this->jampersal_sql(); + $sql .= $this->bedah_rumah_sql(); + + + $sql .= $paging_sql; + } + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($idb->insert('tweb_keluarga',penetration($data)); + + $sql = "SELECT id FROM tweb_keluarga WHERE nik_kepala=?"; + $query = $this->db->query($sql,$temp); + $kk = $query->row_array(); + + $default['id_kk'] = $kk['id']; + $default['kk_level'] = 1; + + $this->db->where('id',$temp); + $this->db->update('tweb_penduduk',$default); + + $satuan=$_POST['tanggallahir']; + $blnlahir = substr($satuan,3,2); + $thnlahir= substr($satuan,6,4); + $blnskrg = (date("m")); + $thnskrg = (date("Y")); + if(($blnlahir==$blnskrg)and($thnlahir==$thnskrg)){ + $x['id_detail']='1'; + }else{ + $x['id_detail']='5'; + } + + $x['id_pend']=$temp; + $x['bulan']=$blnskrg; + $x['tahun']=$thnskrg; + $outp = $this->db->insert('log_penduduk',$x); + $log['id_pend'] = 1; + $log['id_cluster'] = 1; + $log['tanggal'] = date("m-d-y"); + $outp = $this->db->insert('log_perubahan_penduduk',$log); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function insert_new(){ + $data = $_POST; + $lokasi_file = $_FILES['foto']['tmp_name']; + $tipe_file = $_FILES['foto']['type']; + $nama_file = $_FILES['foto']['name']; + $old_foto = ''; + if (!empty($lokasi_file)){ + if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ + unset($data['foto']); + } else { + UploadFoto($nama_file,$old_foto); + $data['foto'] = $nama_file; + } + }else{ + unset($data['foto']); + } + + unset($data['file_foto']); + + $data['id_cluster'] = $data['rt']; + UNSET($data['dusun']); + UNSET($data['rw']); + UNSET($data['rt']); + UNSET($data['no_kk']); + UNSET($data['new']); + + $data['tanggallahir'] = tgl_indo_in($data['tanggallahir']); + + $outp = $this->db->insert('tweb_penduduk',penetration($data)); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + + $sql = "SELECT id FROM tweb_penduduk WHERE nik=?"; + $query = $this->db->query($sql,$data['nik']); + $temp2 = $query->row_array(); + + $data2['nik_kepala'] = $temp2['id']; + $data2['no_kk'] = $_POST['no_kk']; + $temp = $data2['nik_kepala']; + $outp = $this->db->insert('tweb_keluarga',$data2); + + $sql = "SELECT id FROM tweb_keluarga WHERE nik_kepala=?"; + $query = $this->db->query($sql,$temp); + $kk = $query->row_array(); + + $default['id_kk'] = $kk['id']; + $default['kk_level'] = 1; + + $this->db->where('id',$temp); + $this->db->update('tweb_penduduk',$default); + + $satuan=$_POST['tanggallahir']; + $blnlahir = substr($satuan,3,2); + $thnlahir= substr($satuan,6,4); + $blnskrg = (date("m")); + $thnskrg = (date("Y")); + if(($blnlahir==$blnskrg)and($thnlahir==$thnskrg)){ + $x['id_detail']='1'; + }else{ + $x['id_detail']='5'; + } + + $x['id_pend']=$temp; + $x['bulan']=$blnskrg; + $x['tahun']=$thnskrg; + $outp = $this->db->insert('log_penduduk',$x); + $log['id_pend'] = 1; + $log['id_cluster'] = 1; + $log['tanggal'] = date("m-d-y"); + $outp = $this->db->insert('log_perubahan_penduduk',$log); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "SELECT nik_kepala FROM tweb_keluarga WHERE id=?"; + $query = $this->db->query($sql,$id); + $temp = $query->row_array(); + + $default['id_kk'] = ""; + $default['kk_level'] = ""; + + $this->db->where('id_kk',$id); + $this->db->update('tweb_penduduk',$default); + + $sql = "DELETE FROM tweb_keluarga WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM tweb_keluarga WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function add_anggota($id=0){ + $data = $_POST; + $temp['id_kk'] = $id; + $temp['kk_level'] = $data['kk_level']; + $this->db->where('id',$data['nik']); + $outp = $this->db->update('tweb_penduduk',$temp); + + if($temp['kk_level']=="1"){ + $temp2['nik_kepala'] = $data['nik']; + $this->db->where('id',$temp['id_kk']); + $outp = $this->db->update('tweb_keluarga',$temp2); + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function update_anggota($id=0){ + $data = $_POST; + + $sql = "SELECT id_kk FROM tweb_penduduk WHERE id=?"; + $query = $this->db->query($sql,$id); + $pend = $query->row_array(); + + if($data['kk_level']==1){ + + $lvl['kk_level'] = 11; + $this->db->where('id_kk',$pend['id_kk']); + $this->db->where('kk_level',1); + $this->db->update('tweb_penduduk',$lvl); + + $nik['nik_kepala'] = $id; + $this->db->where('id',$pend['id_kk']); + $this->db->update('tweb_keluarga',$nik); + + } + + $this->db->where('id',$id); + $outp = $this->db->update('tweb_penduduk',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function rem_anggota($kk=0,$id=0){ + $temp['id_kk'] = 0; + $temp['kk_level'] = 0; + + $pend = $this->keluarga_model->get_anggota($id); + $this->db->where('id',$id); + $outp = $this->db->update('tweb_penduduk',$temp); + if($pend['kk_level']=='1'){ + $temp2['nik_kepala']=0; + $this->db->where('id',$pend['id_kk']); + $outp = $this->db->update('tweb_keluarga',$temp2); + } + + $log['id_pend'] = $id; + $log['id_detail'] = "7"; + $log['bulan'] = date("m"); + $log['tahun'] = date("Y"); + $outp = $this->db->insert('log_penduduk',$log); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function rem_all_anggota($kk){ + $id_cb = $_POST['id_cb']; + $temp['id_kk'] = 0; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $this->db->where('id',$id); + $outp = $this->db->update('tweb_penduduk',$temp); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_dusun($id=0){ + $sql = "SELECT * FROM tweb_keluarga WHERE dusun_id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + + function get_keluarga($id=0){ + $sql = "SELECT * FROM tweb_keluarga WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_anggota($id=0){ + $sql = "SELECT * FROM tweb_penduduk WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function list_penduduk_lepas(){ + $sql = "SELECT id,nik,nama FROM tweb_penduduk WHERE id_kk = 0"; + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + while($idb->query($sql,array($id)); + $data=$query->result_array(); + + + $i=0; + while($idb->query($sql,array($id,$id)); + return $query->row_array(); + + } + function get_kepala_a($id){ + + $sql = "SELECT u.*,c.*, (SELECT no_kk FROM tweb_keluarga WHERE id = ?) AS no_kk FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa c ON u.id_cluster = c.id WHERE u.id = (SELECT nik_kepala FROM tweb_keluarga WHERE id = ?) "; + $query = $this->db->query($sql,array($id,$id)); + return $query->row_array(); + + } + + function get_desa(){ + $sql = "SELECT * FROM config WHERE 1"; + $query = $this->db->query($sql); + return $query->row_array(); + } + function list_hubungan(){ + $sql = "SELECT *,nama as hubungan FROM tweb_penduduk_hubungan WHERE 1"; + $query = $this->db->query($sql); + return $query->result_array(); + } + function insert_a(){ + $data = $_POST; + $lokasi_file = $_FILES['foto']['tmp_name']; + $tipe_file = $_FILES['foto']['type']; + $nama_file = $_FILES['foto']['name']; + if (!empty($lokasi_file)){ + if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ + unset($data['foto']); + } else { + UploadFoto($nama_file); + $data['foto'] = $nama_file; + } + }else{ + unset($data['foto']); + } + + unset($data['file_foto']); + unset($data['old_foto']); + + $satuan=$_POST['tanggallahir']; + $blnlahir = substr($satuan,3,2); + $thnlahir= substr($satuan,6,4); + $blnskrg = (date("m")); + $thnskrg = (date("Y")); + if(($blnlahir==$blnskrg)and($thnlahir==$thnskrg)){ + $x['id_detail']='1'; + }else{ + $x['id_detail']='5'; + } + $data['nama'] = penetration($data['nama']); + $data['nama_ayah'] = penetration($data['nama_ayah']); + $data['nama_ibu'] = penetration($data['nama_ibu']); + $data['tanggallahir'] = tgl_indo_in($data['tanggallahir']); + $outp = $this->db->insert('tweb_penduduk',$data); + + $sql="select max(id) as id_pend from tweb_penduduk"; + $query = $this->db->query($sql); + $id_pend = $query->row_array(); + $x['id_pend']=$id_pend['id_pend']; + $x['bulan']=$blnskrg; + $x['tahun']=$thnskrg; + $outp = $this->db->insert('log_penduduk',$x); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update_nokk($id=0){ + $data = $_POST; + + $this->db->where("id",$id); + $outp=$this->db->update("tweb_keluarga",$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + + } + function list_sosial(){ + + $dus = ""; + $rw = ""; + $rt = ""; + + if(isset($_SESSION['dusun'])) + $dus = " AND c.dusun = '$_SESSION[dusun]'"; + if(isset($_SESSION['rw'])) + $rw = " AND c.rw = '$_SESSION[rw]'"; + if(isset($_SESSION['rt'])) + $rt = " AND c.rt = '$_SESSION[rt]'"; + $sql = "SELECT s.*,(SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE u.kelas_sosial = s.id $dus $rw $rt) as jumlah FROM ref_kelas_sosial s WHERE 1"; + + + $query = $this->db->query($sql); + return $query->result_array(); + } + function list_raskin(){ + + $dus = ""; + $rw = ""; + $rt = ""; + + if(isset($_SESSION['dusun'])) + $dus = " AND c.dusun = '$_SESSION[dusun]'"; + if(isset($_SESSION['rw'])) + $rw = " AND c.rw = '$_SESSION[rw]'"; + if(isset($_SESSION['rt'])) + $rt = " AND c.rt = '$_SESSION[rt]'"; + $sql = "SELECT s.*, + (SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE u.kelas_sosial = s.id $dus $rw $rt) as jumlah, + (SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE u.kelas_sosial = s.id $dus $rw $rt AND u.raskin = 1) as raskin, + (SELECT COUNT(u.id) AS id FROM tweb_keluarga u LEFT JOIN tweb_penduduk t ON u.nik_kepala = t.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE u.kelas_sosial = s.id $dus $rw $rt AND t.jamkesmas = 1) as jamkesmas FROM ref_kelas_sosial s WHERE 1"; + + + $query = $this->db->query($sql); + return $query->result_array(); + } + function pindah_proses($id=0,$id_cluster=''){ + $this->db->where('id_kk',$id); + $data['id_cluster'] = $id_cluster; + $outp = $this->db->update('tweb_penduduk',$data); + + $sql = "SELECT id FROM tweb_penduduk WHERE id_kk=$id"; + + $query = $this->db->query($sql); + $data2= $query->result_array(); + + foreach($data2 as $datanya){ + $log['id_pend'] = $datanya['id']; + $log['id_detail'] = "6"; + $log['bulan'] = date("m"); + $log['tahun'] = date("Y"); + $outp = $this->db->insert('log_penduduk',$log); + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function get_judul_statistik($tipe=0,$nomor=1){ + switch($tipe){ + case 21: $sql = "SELECT * FROM klasifikasi_analisis_keluarga WHERE id=? and jenis='1' ";break; + case 22: $sql = "SELECT * FROM ref_raskin WHERE id=?";break; + case 23: $sql = "SELECT * FROM ref_blt WHERE id=?";break; + case 24: $sql = "SELECT * FROM ref_bos WHERE id=?";break; + case 25: $sql = "SELECT * FROM ref_pkh WHERE id=?";break; + case 26: $sql = "SELECT * FROM ref_jampersal WHERE id=?";break; + case 27: $sql = "SELECT * FROM ref_bedah_rumah WHERE id=?";break; + } + $query = $this->db->query($sql,$nomor); + return $query->row_array(); + } + function coba($data=''){ + $mypath="surat\\kk\\"; + $mypath_arsip="surat\\arsip\\"; + + $path = "".str_replace("\\","/",$mypath); + $path_arsip = "".str_replace("\\","/",$mypath_arsip); + + $file = $path."kk.rtf"; + if(is_file($file)){ + $nama =""; + + $handle = fopen($file,'r'); + $buffer = stream_get_contents($handle); + $i=0; + foreach($data['main'] AS $ranggota){ + $i++; + $nama .= $ranggota['nama']."\line "; + $no .= $i."\line "; + $hubungan .= $ranggota['hubungan']."\line "; + $nik .= $ranggota['nik']."\line "; + $sex .= $ranggota['sex']."\line "; + $tempatlahir .= $ranggota['tempatlahir']."\line "; + $tanggallahir .= $ranggota['tanggallahir']."\line "; + $agama .= $ranggota['agama']."\line "; + $pendidikan .= $ranggota['pendidikan']."\line "; + $pekerjaan .= $ranggota['pekerjaan']."\line "; + $status_kawin .= $ranggota['status_kawin']."\line "; + $warganegara .= $ranggota['warganegara']."\line "; + $dokumen_pasport.= $ranggota['dokumen_pasport']."\line "; + $dokumen_kitas .= $ranggota['dokumen_kitas']."\line "; + $nama_ayah .= $ranggota['nama_ayah']."\line "; + $nama_ibu .= $ranggota['nama_ibu']."\line "; + + if($ranggota['golongan_darah']!="TIDAK TAHU") + $golongan_darah .= $ranggota['golongan_darah']."\line "; + else + $golongan_darah .= "- \line "; + } + + $buffer=str_replace("[no]","$no",$buffer); + $buffer=str_replace("[nama]","\caps $nama",$buffer); + $buffer=str_replace("[hubungan]","$hubungan",$buffer); + $buffer=str_replace("[nik]","$nik",$buffer); + $buffer=str_replace("[sex]","$sex",$buffer); + $buffer=str_replace("[agama]","$agama",$buffer); + $buffer=str_replace("[pendidikan]","$pendidikan",$buffer); + $buffer=str_replace("[pekerjaan]","$pekerjaan",$buffer); + $buffer=str_replace("[tempatlahir]","\caps $tempatlahir",$buffer); + $buffer=str_replace("[tanggallahir]","\caps $tanggallahir",$buffer); + $buffer=str_replace("[kawin]","$status_kawin",$buffer); + $buffer=str_replace("[warganegara]","$warganegara",$buffer); + $buffer=str_replace("[pasport]","$dokumen_pasport",$buffer); + $buffer=str_replace("[kitas]","$dokumen_kitas",$buffer); + $buffer=str_replace("[ayah]","\caps $nama_ayah",$buffer); + $buffer=str_replace("[ibu]","\caps $nama_ibu",$buffer); + $buffer=str_replace("[darah]","$golongan_darah",$buffer); + + $h = $data['desa']; + $k = $data['kepala_kk']; + $tertanda = tgl_indo(date("Y m d")); + $tertanda = $h['nama_desa'].", ".$tertanda; + $buffer=str_replace("desa","\caps $h[nama_desa]",$buffer); + $buffer=str_replace("dusun","\caps $k[dusun]",$buffer); + $buffer=str_replace("prop","\caps $h[nama_propinsi]",$buffer); + $buffer=str_replace("kab","\caps $h[nama_kabupaten]",$buffer); + $buffer=str_replace("kec","\caps $h[nama_kecamatan]",$buffer); + $buffer=str_replace("*camat","\caps $h[nama_kepala_camat]",$buffer); + $buffer=str_replace("*kades","\caps $h[nama_kepala_desa]",$buffer); + $buffer=str_replace("*rt","$k[rt]",$buffer); + $buffer=str_replace("*rw","$k[rw]",$buffer); + $buffer=str_replace("*kk","\caps $k[nama]",$buffer); + $buffer=str_replace("no_kk","$k[no_kk]",$buffer); + $buffer=str_replace("pos","$h[kode_pos]",$buffer); + $buffer=str_replace("*tertanda","\caps $tertanda",$buffer); + + $berkas_arsip = $path_arsip."kk_$k[no_kk].rtf"; + $handle = fopen($berkas_arsip,'w+'); + fwrite($handle,$buffer); + fclose($handle); + $_SESSION['success']=8; + header("location:".base_url($berkas_arsip)); + } + + } + function coba2(){ + ini_set('memory_limit', '2048M'); + $mypath="surat\\undangan\\"; + $mypath_arsip="surat\\arsip\\"; + + $path = "".str_replace("\\","/",$mypath); + $path_arsip = "".str_replace("\\","/",$mypath_arsip); + + $file = $path."apik.rtf"; + if(is_file($file)){ + $buffer2 =""; + + $handle = fopen($file,'r'); + $b = stream_get_contents($handle); + + $c = Parse_Data($b,'\widowctrl','{\*\themedata'); + $c = "\widowctrl".$c; + $awal = Parse_Data($b,'{','\widowctrl'); + $awal = "{".$awal; + $akhir = strstr($b,'{\*\themedata'); + + $data = $this->list_data(); + $i=1; + $h = substr_count($c, 'fxnama'); + $h =4; + $j=count($data); + $k =1; + $buffer=$c; + foreach($data AS $d){ + if($d['sex']=="PEREMPUAN") + $sex = "IBU"; + else + $sex = "BAPAK"; + + $alamat = $d['dusun'].", RT ".$d['rt']."/RW ".$d['rw']; + $buffer=str_replace("fxnama$k","\caps $d[kepala_kk]",$buffer); + $buffer=str_replace("fxalamat$k","\caps $alamat",$buffer); + $buffer=str_replace("fxpre$k","\caps $sex",$buffer); + + if($k==$h){ + $k=0; + + if($i>=$j) + $buffer2 .= $buffer; + else + $buffer2 .= $buffer." \page "; + + $buffer=$c; + } + + $k++; + $i++; + } + $buffer2 .= $buffer; + + $buffers = $awal.$buffer2.$akhir; + + $berkas_arsip = $path_arsip."undangan.rtf"; + $handle = fopen($berkas_arsip,'w+'); + fwrite($handle,$buffers); + fclose($handle); + $_SESSION['success']=8; + header("location:".base_url($berkas_arsip)); + } + + } +} \ No newline at end of file diff --git a/app/models/Laporan_bulanan_model.php b/app/models/Laporan_bulanan_model.php new file mode 100644 index 000000000..4b1d54ca9 --- /dev/null +++ b/app/models/Laporan_bulanan_model.php @@ -0,0 +1,316 @@ +db->query($sql); + $data=$query->row_array(); + + $bln=date("m"); + $thn=date("Y"); + + $sql = "SELECT * FROM log_bulanan WHERE month(tgl) = $bln AND year(tgl) = $thn"; + $query = $this->db->query($sql); + $ada = $query->result_array(); + + if(!$ada){ + $this->db->insert('log_bulanan',$data); + }else{ + + $sql = "UPDATE log_bulanan SET pend=$data[pend], lk = $data[lk],pr=$data[pr],kk = $data[kk] WHERE month(tgl) = $bln AND year(tgl) = $thn"; + $this->db->query($sql); + } + + } + function autocomplete(){ + $sql = "SELECT dusun_nama FROM tweb_wil_dusun"; + $query = $this->db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND u.nama LIKE '$kw'"; + return $search_sql; + } + } + function dusun_sql(){ + if(isset($_SESSION['dusun'])){ + $kf = $_SESSION['dusun']; + if($kf==""){ + $dusun_sql= "";} else { + $dusun_sql= " AND c.dusun = '".$kf."'";} + return $dusun_sql; + } + } + function bulan_sql(){ + if(isset($_SESSION['bulanku'])){ + $kf = $_SESSION['bulanku']; + if($kf==""){ + $bulan_sql= "";} else { + $bulan_sql= " where bulan = $kf";} + return $bulan_sql; + } + } + function tahun_sql(){ + if(isset($_SESSION['tahunku'])){ + $kf = $_SESSION['tahunku']; + if($kf==""){ + $bulan_sql= "";} else { + $bulan_sql= " and tahun = $kf";} + return $bulan_sql; + } + } + function bulan($bulan) + { + Switch ($bulan){ + case 1 : $bulan="Januari"; + Break; + case 2 : $bulan="Februari"; + Break; + case 3 : $bulan="Maret"; + Break; + case 4 : $bulan="April"; + Break; + case 5 : $bulan="Mei"; + Break; + case 6 : $bulan="Juni"; + Break; + case 7 : $bulan="Juli"; + Break; + case 8 : $bulan="Agustus"; + Break; + case 9 : $bulan="September"; + Break; + case 10 : $bulan="Oktober"; + Break; + case 11 : $bulan="November"; + Break; + case 12 : $bulan="Desember"; + Break; + } + return $bulan; + } + function paging($lap=0,$p=1,$o=0){ + + switch($lap){ + case 0: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; + case 1: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pekerjaan u WHERE 1 "; break; + case 2: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; + case 3: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; + case 4: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; + case 5: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; + case 6: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; + case 7: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; + case 8: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; + default:$sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; + } + + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data(){ + $sql="select c.id as id_cluster,c.rt,c.rw,c.dusun as dusunnya, +(select count(id) from tweb_penduduk where sex='1' and id_cluster=c.id) as L, +(select count(id) from tweb_penduduk where sex='2' and id_cluster=c.id) as P, + +(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<1 and id_cluster=c.id ) as bayi, +(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=1 and (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<6 and id_cluster=c.id ) as balita, +(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=6 and (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<13 and id_cluster=c.id ) as sd, +(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=13 and (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<16 and id_cluster=c.id ) as smp, +(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=16 and (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<19 and id_cluster=c.id ) as sma, +(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=19 and (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<60 and id_cluster=c.id ) as dewasa, +(select count(id) from tweb_penduduk where (DATE_FORMAT( FROM_DAYS( TO_DAYS(NOW()) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>60 and id_cluster=c.id ) as lansia, + +(select count(id) from tweb_penduduk where sex = 1 AND cacat_id is not null and cacat_id <>'0' and id_cluster=c.id) as cacat, +(select count(id) from tweb_penduduk where sex = 2 AND cacat_id is not null and cacat_id <>'0' and id_cluster=c.id) as cacat2, +(select count(id) from tweb_penduduk where sakit_menahun_id is not null and sakit_menahun_id <>'0' and id_cluster=c.id and sex='1') as sakit_L, +(select count(id) from tweb_penduduk where sakit_menahun_id is not null and sakit_menahun_id <>'0' and id_cluster=c.id and sex='2') as sakit_P, +(select count(id) from tweb_penduduk where hamil='1' and id_cluster=c.id) as hamil1, +(select count(id) from tweb_penduduk where hamil='2' and id_cluster=c.id) as hamil2, +(select count(id) from tweb_penduduk where hamil='3' and id_cluster=c.id) as susu +from tweb_wil_clusterdesa c WHERE rw<>'0' AND rt<>'0' AND (select count(id) from tweb_penduduk where id_cluster=c.id)>0 "; + + $sql .= $this->dusun_sql(); + + $sql .= " ORDER BY c.dusun,c.rw,c.rt "; + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + while($idb->query($sql); + $data=$query->result_array(); + return $data; + } + function configku(){ + $sql = "SELECT * FROM config limit 1 "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function penduduk_awal(){ + $bln=$_SESSION['bulanku']; + $thn=$_SESSION['tahunku']; + + $sql = "SELECT lk as WNI_L,pr AS WNI_P FROM log_bulanan WHERE month(tgl) = $bln-1 AND year(tgl) = $thn;"; + $query = $this->db->query($sql); + if($query){ + if($query->num_rows() > 0){ + $hasil=$query->row(); + $data= array( + "WNI_L"=>$hasil->WNI_L, + "WNI_P"=>$hasil->WNI_P, + "WNA_L"=>0, + "WNA_P"=>0, + "bulan"=>$bln, + "tahun"=>$thn); + }else{ + $data= array( + "WNI_L"=>0, + "WNI_P"=>0, + "WNA_L"=>0, + "WNA_P"=>0, + "bulan"=>$bln, + "tahun"=>$thn); + } + }else{ + $data = $this->db->error_reporting(); + } + return $data; + } + function penduduk_akhir(){ + $bln=$_SESSION['bulanku']; + $thn=$_SESSION['tahunku']; + + $sql = "SELECT lk as WNI_L,pr AS WNI_P FROM log_bulanan WHERE month(tgl) = $bln AND year(tgl) = $thn;"; + $query = $this->db->query($sql); + $hasil=$query->row_array(); + $data= array( + "WNI_L"=>$hasil["WNI_L"], + "WNI_P"=>$hasil["WNI_P"], + "WNA_L"=>0, + "WNA_P"=>0, + "bulan"=>$bln, + "tahun"=>$thn); + return $data; + } + function penduduk_akhirx(){ + $paging_sql = ' LIMIT 1'; + $sql = "SELECT (select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id where warganegara_id='1' and sex='1' and id_detail in ('5','1','8') and day(tanggal)>15 and day(tanggal)<=30 and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNI_L, +(select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id where warganegara_id='1' and sex='2' and id_detail in ('5','1','8') and day(tanggal)>15 and day(tanggal)<=30 and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNI_P, +(select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id where warganegara_id='2' and sex='1' and id_detail in ('5','1','8') and day(tanggal)>15 and day(tanggal)<=30 and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNA_L, +(select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id where warganegara_id='2' and sex='2' and id_detail in ('5','1','8') and day(tanggal)>15 and day(tanggal)<=30 and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNA_P, bulan, tahun +FROM log_penduduk "; + $sql .= $this->bulan_sql(); + $sql .= $this->tahun_sql(); + $sql .= $paging_sql; + $query = $this->db->query($sql); + $data=$query->row_array(); + return $data; + } + function kelahiran(){ + $sql = "SELECT (SELECT COUNT(id) FROM tweb_penduduk WHERE month(tanggallahir) = ? AND year(tanggallahir) =? AND sex = 1) AS WNI_L,(SELECT COUNT(id) FROM tweb_penduduk WHERE month(tanggallahir) = ? AND year(tanggallahir) =? AND sex = 1) AS WNI_P"; + $query = $this->db->query($sql,array($_SESSION['bulanku'],$_SESSION['tahunku'],$_SESSION['bulanku'],$_SESSION['tahunku'])); + $data=$query->row_array(); + $data['WNA_L']=0; + $data['WNA_P']=0; + return $data; + } + function kematian(){ + $sql = "SELECT (SELECT COUNT(u.id) FROM log_penduduk u LEFT JOIN tweb_penduduk p ON u.id_pend = p.id WHERE month(tgl_peristiwa) = ? AND year(tgl_peristiwa) =? AND sex =1 AND id_detail =2) AS WNI_L,(SELECT COUNT(u.id) FROM log_penduduk u LEFT JOIN tweb_penduduk p ON u.id_pend = p.id WHERE month(tgl_peristiwa) = ? AND year(tgl_peristiwa) =? AND sex = 2 AND id_detail = 2) AS WNI_P"; + $query = $this->db->query($sql,array($_SESSION['bulanku'],$_SESSION['tahunku'],$_SESSION['bulanku'],$_SESSION['tahunku'])); + $data=$query->row_array(); + $data['WNA_L']=0; + $data['WNA_P']=0; + return $data; + } + function pindah(){ + $sql = "SELECT (SELECT COUNT(u.id) FROM log_penduduk u LEFT JOIN tweb_penduduk p ON u.id_pend = p.id WHERE month(tgl_peristiwa) = ? AND year(tgl_peristiwa) =? AND sex =1 AND id_detail =3) AS WNI_L,(SELECT COUNT(u.id) FROM log_penduduk u LEFT JOIN tweb_penduduk p ON u.id_pend = p.id WHERE month(tgl_peristiwa) = ? AND year(tgl_peristiwa) =? AND sex = 2 AND id_detail = 3) AS WNI_P"; + $query = $this->db->query($sql,array($_SESSION['bulanku'],$_SESSION['tahunku'],$_SESSION['bulanku'],$_SESSION['tahunku'])); + $data=$query->row_array(); + $data['WNA_L']=0; + $data['WNA_P']=0; + return $data; + } + function pendatang(){ + $bln=$_SESSION['bulanku']; + $thn=$_SESSION['tahunku']; + + $paging_sql = ' LIMIT 1'; + $sql = "SELECT (select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='1' and sex='1' and id_detail in ('8','5') and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNI_L, + (select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='1' and sex='2' and id_detail in ('8','5') and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNI_P, + (select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='2' and sex='1' and id_detail in ('8','5') and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNA_L, + (select count(s.id) from log_penduduk s INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='2' and sex='2' and id_detail in ('8','5') and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNA_P , bulan, tahun + FROM log_penduduk "; + $sql .= $this->bulan_sql(); + $sql .= $this->tahun_sql(); + $sql .= $paging_sql; + $query = $this->db->query($sql); + if($query->num_rows()>0){ + $data=$query->row_array(); + }else{ + $data= array( + "WNI_L"=>0, + "WNI_P"=>0, + "WNA_L"=>0, + "WNA_P"=>0, + "bulan"=>$bln, + "tahun"=>$thn); + } + return $data; + } + function pindahx(){ + $paging_sql = ' LIMIT 1'; + $sql = "SELECT (select count(s.id) from log_penduduk s INNER join detail_log_penduduk t on s.id_detail=t.id INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='1' and sex='1' and id_detail='3' and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNI_L, +(select count(s.id) from log_penduduk s INNER join detail_log_penduduk t on s.id_detail=t.id INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='1' and sex='2' and id_detail='3' and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNI_P, +(select count(s.id) from log_penduduk s INNER join detail_log_penduduk t on s.id_detail=t.id INNER join tweb_penduduk p on +s.id_pend=p.id and warganegara_id='2' and sex='1' and id_detail='3' and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNA_L, +(select count(s.id) from log_penduduk s INNER join detail_log_penduduk t on s.id_detail=t.id INNER join tweb_penduduk p on s.id_pend=p.id and warganegara_id='2' and sex='2' and id_detail='3' and month(tanggal)=month(curdate()) and year(tanggal)=year(curdate()) ) as WNA_P , bulan, tahun +FROM log_penduduk "; + $sql .= $this->bulan_sql(); + $sql .= $this->tahun_sql(); + $sql .= $paging_sql; + $query = $this->db->query($sql); + $data=$query->row_array(); + return $data; + } + function hilang(){ + $sql = "SELECT (SELECT COUNT(u.id) FROM log_penduduk u LEFT JOIN tweb_penduduk p ON u.id_pend = p.id WHERE month(tgl_peristiwa) = ? AND year(tgl_peristiwa) =? AND sex =1 AND id_detail =4) AS WNI_L,(SELECT COUNT(u.id) FROM log_penduduk u LEFT JOIN tweb_penduduk p ON u.id_pend = p.id WHERE month(tgl_peristiwa) = ? AND year(tgl_peristiwa) =? AND sex = 2 AND id_detail = 4) AS WNI_P"; + $query = $this->db->query($sql,array($_SESSION['bulanku'],$_SESSION['tahunku'],$_SESSION['bulanku'],$_SESSION['tahunku'])); + $data=$query->row_array(); + $data['WNA_L']=0; + $data['WNA_P']=0; + return $data; + } +} +?> \ No newline at end of file diff --git a/app/models/Laporan_penduduk_model.php b/app/models/Laporan_penduduk_model.php new file mode 100644 index 000000000..7756ad76b --- /dev/null +++ b/app/models/Laporan_penduduk_model.php @@ -0,0 +1,264 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND u.nama LIKE '$kw'"; + return $search_sql; + } + } + function paging($lap=0,$o=0){ + + switch($lap){ + case 0: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; break; + case 1: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pekerjaan u WHERE 1 "; break; + case 2: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_kawin u WHERE 1 "; break; + case 3: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_agama u WHERE 1 "; break; + case 4: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_sex u WHERE 1 "; break; + case 5: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_warganegara u WHERE 1 "; break; + case 6: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_status u WHERE 1 "; break; + case 7: $sql = "SELECT COUNT(id) AS id FROM tweb_golongan_darah u WHERE 1 "; break; + case 9: $sql = "SELECT COUNT(id) AS id FROM tweb_cacat u WHERE 1 "; break; + case 10: $sql = "SELECT COUNT(id) AS id FROM tweb_sakit_menahun u WHERE 1 "; break; + case 11: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_sex u WHERE 1 "; break; + case 12: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan_kk u WHERE 1 "; break; + case 13: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_umur u WHERE status = 1 "; break; + case 15: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_umur u WHERE status is null "; break; + case 14: $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE left(nama,5)<> 'TAMAT' "; break; + + case 21: $sql = "SELECT COUNT(id) AS id FROM klasifikasi_analisis_keluarga u WHERE jenis='1' "; break; + case 22: $sql = "SELECT COUNT(id) AS id FROM ref_raskin u WHERE 1 "; break; + case 23: $sql = "SELECT COUNT(id) AS id FROM ref_blt u WHERE 1 "; break; + case 24: $sql = "SELECT COUNT(id) AS id FROM ref_bos u WHERE 1 "; break; + case 25: $sql = "SELECT COUNT(id) AS id FROM ref_pkh u WHERE 1 "; break; + case 26: $sql = "SELECT COUNT(id) AS id FROM ref_jampersal u WHERE 1 "; break; + case 27: $sql = "SELECT COUNT(id) AS id FROM ref_bedah_rumah u WHERE 1 "; break; + + default:$sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_pendidikan u WHERE 1 "; + } + + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($lap=0,$o=0){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.id'; break; + case 2: $order_sql = ' ORDER BY u.id DESC'; break; + case 3: $order_sql = ' ORDER BY laki'; break; + case 4: $order_sql = ' ORDER BY laki DESC'; break; + case 5: $order_sql = ' ORDER BY jumlah'; break; + case 6: $order_sql = ' ORDER BY jumlah DESC'; break; + case 7: $order_sql = ' ORDER BY perempuan'; break; + case 8: $order_sql = ' ORDER BY perempuan DESC'; break; + default:$order_sql = ''; + } + switch($lap){ + case 0: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_kk_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_kk_id = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_kk_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_pendidikan_kk u WHERE 1"; break; + + case 1: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE pekerjaan_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE pekerjaan_id = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE pekerjaan_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_pekerjaan u WHERE 1 "; break; + + case 2: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_kawin = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_kawin = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_kawin = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_kawin u WHERE 1"; break; + + case 3: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE agama_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE agama_id = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE agama_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_agama u WHERE 1"; break; + + case 4: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE sex = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE sex = u.id AND sex=1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE sex = 2 AND sex=u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_sex u WHERE 1"; break; + + case 5: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE warganegara_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE warganegara_id = u.id AND sex=1 AND status_dasar=1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE warganegara_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_warganegara u WHERE 1"; break; + + case 6: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE status = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE status = u.id AND sex=1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE status = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_status u WHERE u.id <> 77 "; break; + + case 7: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE golongan_darah_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE golongan_darah_id = u.id AND sex=1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE golongan_darah_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_golongan_darah u WHERE 1"; break; + + case 9: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE cacat_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE cacat_id = u.id AND sex=1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE cacat_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_cacat u WHERE 1"; break; + + case 10: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE sakit_menahun_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE sakit_menahun_id = u.id AND sex=1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE sakit_menahun_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_sakit_menahun u WHERE 1"; break; + + case 11: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE jamkesmas = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE jamkesmas = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE jamkesmas = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM ref_jamkesmas u WHERE 1"; break; + + case 12: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_id = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_pendidikan u WHERE 1 "; + break; + + case 13: $sql = "SELECT u.*, concat( dari, ' - ', sampai) as nama, (SELECT COUNT(id) FROM tweb_penduduk WHERE (DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=u.dari AND (DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<=u.sampai AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah, (SELECT COUNT(id) FROM tweb_penduduk WHERE (DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=u.dari AND (DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<=u.sampai AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki, (SELECT COUNT(id) FROM tweb_penduduk WHERE (DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)>=u.dari AND (DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( tanggallahir ) ) , '%Y' ) +0)<=u.sampai AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_umur u WHERE status=1 "; break; + + case 14: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_sedang_id = u.id AND status_dasar = 1 AND (status = 1 OR status = 2)) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_sedang_id = u.id AND sex = 1 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE pendidikan_sedang_id = u.id AND sex = 2 AND status_dasar = 1 AND (status = 1 OR status = 2)) AS perempuan FROM tweb_penduduk_pendidikan u WHERE left(nama,5)<> 'TAMAT'"; break; + + case 15: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_penduduk WHERE DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 >= u.dari AND DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 <= u.sampai) AS jumlah,(SELECT COUNT(id) FROM tweb_penduduk WHERE DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 >= u.dari AND DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 <= u.sampai AND sex=1) AS laki,(SELECT COUNT(id) FROM tweb_penduduk WHERE DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 >= u.dari AND DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 <= u.sampai AND sex=2) AS perempuan FROM tweb_penduduk_umur u WHERE status is NULL "; break; + + + case 21: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE kelas_sosial = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM klasifikasi_analisis_keluarga u WHERE jenis='1'"; break; + case 22: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE raskin = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_raskin u WHERE 1 "; break; + case 23: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE id_blt = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_blt u WHERE 1 "; break; + case 24: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE id_bos = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_bos u WHERE 1 "; break; + case 25: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE id_pkh = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_pkh u WHERE 1 "; break; + case 26: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE id_jampersal = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_jampersal u WHERE 1 "; break; + case 27: $sql = "SELECT u.*,(SELECT COUNT(id) FROM tweb_keluarga WHERE id_bedah_rumah = u.id) AS jumlah,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS laki,(SELECT COUNT(id) FROM tweb_keluarga WHERE 0) AS perempuan FROM ref_bedah_rumah u WHERE 1 "; break; + + default:$sql = "SELECT u.* FROM tweb_penduduk_pendidikan u WHERE 1 "; + } + + $sql .= $order_sql; + $query = $this->db->query($sql); + $data=$query->result_array(); + + + if($lap<=20){ + $sql3 = "SELECT (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.status_dasar=1 AND (status = 1 OR status = 2)) AS jumlah, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.sex = 1 and status_dasar=1 AND (status = 1 OR status = 2)) AS laki, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.sex = 2 and status_dasar=1 AND (status = 1 OR status = 2)) AS perempuan"; + }else{ + $sql3 = "SELECT (SELECT COUNT(p.id) FROM tweb_keluarga p WHERE 1) AS jumlah, + (SELECT COUNT(p.id) FROM tweb_keluarga p WHERE 1) AS laki, + (SELECT COUNT(p.id) FROM tweb_keluarga p WHERE 1) AS perempuan"; + } + + $query3 = $this->db->query($sql3); + $bel = $query3->row_array(); + + $total['jumlah']=0; + $bel['no']=""; + $bel['id']="0"; + $bel['nama']="TOTAL"; + $total['laki']=0; + $total['perempuan']=0; + $i=0; + while($idb->query($sql); + $data = $query->row_array(); + return $data; + } + function list_data_rentang(){ + $sql = "SELECT * FROM tweb_penduduk_umur WHERE status=1 order by dari "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function get_rentang($id=0){ + $sql = "SELECT * FROM tweb_penduduk_umur WHERE id= $id "; + $query = $this->db->query($sql); + $data = $query->row_array(); + return $data; + } + function get_rentang_terakhir(){ + $sql = "SELECT (case when max(sampai) is null then '0' else (max(sampai)+1) end) as dari FROM tweb_penduduk_umur WHERE status=1 "; + $query = $this->db->query($sql); + $data = $query->row_array(); + return $data; + } + function insert_rentang(){ + $data = $_POST; + $data['status']=1; + $outp = $this->db->insert('tweb_penduduk_umur',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function update_rentang($id=0){ + $data = $_POST; + $sql = "UPDATE tweb_penduduk_umur SET nama='$data[nama]', dari='$data[dari]', sampai='$data[sampai]' WHERE id='$id' "; + $outp=$this->db->query($sql); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_rentang($id=0){ + $sql = "DELETE FROM tweb_penduduk_umur WHERE id='$id' "; + $outp=$this->db->query($sql); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all_rentang(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM tweb_penduduk_umur WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } +} +?> \ No newline at end of file diff --git a/app/models/Laporan_perubahan_model.php b/app/models/Laporan_perubahan_model.php new file mode 100644 index 000000000..9a19dce34 --- /dev/null +++ b/app/models/Laporan_perubahan_model.php @@ -0,0 +1,76 @@ +db->query($sql); + $data=$query->result_array(); + return $data; + } + function list_data(){ + $sql = "SELECT x.dusun, +(SELECT COUNT(id_pend) FROM log_perubahan_penduduk c LEFT JOIN tweb_penduduk b ON c.id_pend=b.id WHERE b.sex ='1') AS lalu_L, +(SELECT COUNT(id_pend) FROM log_perubahan_penduduk c LEFT JOIN tweb_penduduk b ON c.id_pend=b.id WHERE b.sex ='1') AS lalu_P, +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='7') AS pecah_L , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='7') AS pecah_P , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='5') AS datang_L , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='5') AS datang_P , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='3') AS pergi_L , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='3') AS pergi_P , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='2') AS mati_L , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='2') AS mati_P +FROM tweb_wil_clusterdesa x WHERE rw='0' AND rt='0' "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function total_data(){ + $sql = "SELECT SUM(lalu_L) as tlaluL,SUM(lalu_P) as tlaluP,SUM(pecah_L) as tpecahL,SUM(pecah_P) as tpecahP,SUM(datang_L) as tdatangL,SUM(datang_p) as tdatangP,SUM(pergi_L) as tpergiL,SUM(pergi_P) as tpergiP,SUM(mati_L) as tmatiL,SUM(mati_P) as tmatiP FROM(SELECT x.dusun, +(SELECT COUNT(id_pend) FROM log_perubahan_penduduk c LEFT JOIN tweb_penduduk d ON c.id_pend=d.id WHERE d.sex ='1' ) AS lalu_L, +(SELECT COUNT(id_pend) FROM log_perubahan_penduduk c LEFT JOIN tweb_penduduk d ON c.id_pend=d.id WHERE d.sex ='1' ) AS lalu_P, +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='7') AS pecah_L , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='7') AS pecah_P , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='5') AS datang_L , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='5') AS datang_P , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='3') AS pergi_L , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='3') AS pergi_P , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='1' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='2') AS mati_L , +(SELECT COUNT(id_pend) FROM log_penduduk a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id LEFT JOIN tweb_wil_clusterdesa c ON b.id_cluster=c.id WHERE b.sex='2' AND month(a.tanggal)=month(curdate()) AND year(a.tanggal)=year(curdate()) AND c.dusun=x.dusun AND a.id_detail='2') AS mati_P +FROM tweb_wil_clusterdesa x WHERE rw='0' AND rt='0') as z "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } +} +?> \ No newline at end of file diff --git a/app/models/Mandiri_model.php b/app/models/Mandiri_model.php new file mode 100644 index 000000000..f42a28ae0 --- /dev/null +++ b/app/models/Mandiri_model.php @@ -0,0 +1,186 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.nik LIKE '$kw' OR n.nama LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['nik'])){ + $kf = $_SESSION['nik']; + if($kf=="0"){ + $filter_sql= "";} else { + $filter_sql= " AND n.id = '".$kf."'";} + return $filter_sql; + } + } + function filterku_sql($nik=0){ + $kf = $nik; + if($kf==0){ + $filterku_sql= "";} else { + $filterku_sql= " AND u.id_pend = '".$kf."'";} + return $filterku_sql; + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM tweb_penduduk_mandiri u + LEFT JOIN tweb_penduduk n ON u.nik = n.nik + WHERE 1"; + $sql .= $this->search_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.last_login'; break; + case 2: $order_sql = ' ORDER BY u.last_login DESC'; break; + + default:$order_sql = ' ORDER BY u.tanggal_buat'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + + $sql = "SELECT u.*,n.nama AS nama, n.nik AS nik + FROM tweb_penduduk_mandiri u + LEFT JOIN tweb_penduduk n ON u.nik = n.nik + WHERE 1 "; + + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($idb->query($sql,array($_POST['nik'])); + + $rpin = $this->generate_pin($_POST['pin']); + $hash_pin = hash_pin($rpin); + $data['pin'] = $hash_pin; + $data['nik'] = $_POST['nik']; + + $outp = $this->db->insert('tweb_penduduk_mandiri',$data); + + if($_POST['pin']!="") + return $_POST['pin']; + else + return $rpin; + } + function delete($id=''){ + $sql = "DELETE FROM tweb_penduduk_mandiri WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM tweb_penduduk_mandiri WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_penduduk(){ + $sql = "SELECT nik AS id,nik,nama FROM tweb_penduduk WHERE status = 1 AND nik<>'' "; + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + while($iinput->post('pass_lama')); + $pass_baru = $this->input->post('pass_baru'); + $pass_baru1 = $this->input->post('pass_baru1'); + $nama = $this->input->post('nama'); + + $sql = "SELECT password,id_grup,session FROM user WHERE id=?"; + $query=$this->db->query($sql,array($id)); + $row=$query->row(); + + if($password==$row->password){ + if($pass_baru == $pass_baru1){ + $pass_baru = md5($pass_baru); + $sql = "UPDATE user SET password=?,nama=? WHERE id=?"; + $outp = $this->db->query($sql,array($pass_baru,$nama,$id)); + } + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_grup(){ + $sql = "SELECT * FROM user_grup"; + $query = $this->db->query($sql); + return $query->result_array(); + } +} \ No newline at end of file diff --git a/app/models/Modul_model.php b/app/models/Modul_model.php new file mode 100644 index 000000000..44acccdc5 --- /dev/null +++ b/app/models/Modul_model.php @@ -0,0 +1,89 @@ +search_sql(); + $sql .= $this->filter_sql(); + + $query = $this->db->query($sql); + $data = $query->result_array(); + + $i=0; + while($idb->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.modul LIKE '$kw' OR u.url LIKE '$kw')"; + return $search_sql; + } + } + + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND u.aktif = $kf"; + return $filter_sql; + } + } + function get_data($id=0){ + $sql = "SELECT * FROM setting_modul WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function update($id=0){ + $data = $_POST; + $this->db->where('id',$id); + $outp = $this->db->update('setting_modul',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM setting_modul WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM setting_modul WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } +} \ No newline at end of file diff --git a/app/models/Pamong_model.php b/app/models/Pamong_model.php new file mode 100644 index 000000000..82e510880 --- /dev/null +++ b/app/models/Pamong_model.php @@ -0,0 +1,110 @@ +search_sql(); + $sql .= $this->filter_sql(); + + $query = $this->db->query($sql); + $data = $query->result_array(); + + $i=0; + while($idb->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.pamong_nama LIKE '$kw' OR u.pamong_nip LIKE '$kw' OR u.pamong_nik LIKE '$kw')"; + return $search_sql; + } + } + + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND u.pamong_status = $kf"; + return $filter_sql; + } + } + function get_data($id=0){ + $sql = "SELECT * FROM tweb_desa_pamong WHERE pamong_id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function insert(){ + $nip = penetration($this->input->post('pamong_nip')); + $nama = penetration($this->input->post('pamong_nama')); + $nik = penetration($this->input->post('pamong_nik')); + $jabatan = penetration($this->input->post('jabatan')); + $status = penetration($this->input->post('pamong_status')); + + $sql = "INSERT INTO tweb_desa_pamong (pamong_nama,pamong_nip,pamong_nik,jabatan,pamong_status,pamong_tgl_terdaftar) + VALUES (?,?,?,?,?,NOW())"; + + $outp = $this->db->query($sql, array($nama,$nip,$nik,$jabatan,$status)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $nip = $this->input->post('pamong_nip'); + $nama = penetration($this->input->post('pamong_nama')); + $nik = $this->input->post('pamong_nik'); + $jabatan = penetration($this->input->post('jabatan')); + $status = $this->input->post('pamong_status'); + + $sql = "UPDATE tweb_desa_pamong SET pamong_nama=?,pamong_nip=?,pamong_nik=?,jabatan=?,pamong_status=? WHERE pamong_id=?"; + $outp = $this->db->query($sql, array($nama,$nip,$nik,$jabatan,$status,$id)); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM tweb_desa_pamong WHERE pamong_id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM tweb_desa_pamong WHERE pamong_id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } +} +?> \ No newline at end of file diff --git a/app/models/Penduduk_model.php b/app/models/Penduduk_model.php new file mode 100644 index 000000000..bfba2a44d --- /dev/null +++ b/app/models/Penduduk_model.php @@ -0,0 +1,1093 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->query($sql); + $data = $query->result_array(); + + return $data; + } + function dn(){ + $sql = "SELECT nik FROM tweb_penduduk WHERE 1 "; + $query = $this->db->query($sql); + $data = $query->result_array(); + + return $data; + } + function search_sql(){ + if(isset($_SESSION['cari'])){ + $cari = $_SESSION['cari']; + $kw = penetration($this->db->escape_like_str($cari)); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.nama LIKE '$kw' OR u.nik LIKE '$kw' OR d.no_kk LIKE '$kw')"; + return $search_sql; + } + } + function sex_sql(){ + if(isset($_SESSION['sex'])){ + $kf = $_SESSION['sex']; + $sex_sql= " AND u.sex = $kf"; + return $sex_sql; + } + } + function dusun_sql(){ + if(isset($_SESSION['dusun'])){ + $kf = $_SESSION['dusun']; + $dusun_sql= " AND a.dusun = '$kf'"; + return $dusun_sql; + } + } + function rw_sql(){ + if(isset($_SESSION['rw'])){ + $kf = $_SESSION['rw']; + $rw_sql= " AND a.rw = '$kf'"; + return $rw_sql; + } + } + function rt_sql(){ + if(isset($_SESSION['rt'])){ + $kf = $_SESSION['rt']; + $rt_sql= " AND a.rt = '$kf'"; + return $rt_sql; + } + } + function agama_sql(){ + if(isset($_SESSION['agama'])){ + $kf = $_SESSION['agama']; + $agama_sql= " AND u.agama_id = $kf"; + return $agama_sql; + } + } + function warganegara_sql(){ + if(isset($_SESSION['warganegara'])){ + $kf = $_SESSION['warganegara']; + $warganegara_sql= " AND u.warganegara_id = $kf"; + return $warganegara_sql; + } + } + function golongan_darah_sql(){ + if(isset($_SESSION['golongan_darah'])){ + $kf = $_SESSION['golongan_darah']; + $golongan_darah_sql= " AND u.golongan_darah_id = $kf"; + return $golongan_darah_sql; + } + } + function pekerjaan_sql(){ + if(isset($_SESSION['pekerjaan_id'])){ + $kf = $_SESSION['pekerjaan_id']; + $pekerjaan_sql= " AND u.pekerjaan_id = $kf"; + return $pekerjaan_sql; + } + } + function cacat_sql(){ + if(isset($_SESSION['cacat'])){ + $kf = $_SESSION['cacat']; + $cacat_sql= " AND u.cacat_id = $kf"; + return $cacat_sql; + } + } + function hubungan_sql(){ + if(isset($_SESSION['hubungan'])){ + $kf = $_SESSION['hubungan']; + $cacat_sql= " AND u.kk_level = $kf"; + return $cacat_sql; + } + } + function cacatx_sql(){ + if(isset($_SESSION['cacatx'])){ + $kf = $_SESSION['cacatx']; + $cacatx_sql= " AND u.cacat_id <> $kf AND u.cacat_id is not null and u.cacat_id<>''"; + return $cacatx_sql; + } + } + function menahun_sql(){ + if(isset($_SESSION['menahun'])){ + $kf = $_SESSION['menahun']; + $menahun_sql= " AND u.sakit_menahun_id = $kf"; + return $menahun_sql; + } + } + function menahunx_sql(){ + if(isset($_SESSION['menahunx'])){ + $kf = $_SESSION['menahunx']; + $menahunx_sql= " AND u.sakit_menahun_id <> $kf and u.sakit_menahun_id is not null and u.sakit_menahun_id<>'0' "; + return $menahunx_sql; + } + } + function statuskawin_sql(){ + if(isset($_SESSION['status'])){ + $kf = $_SESSION['status']; + $statuskawin_sql= " AND u.status_kawin = $kf"; + return $statuskawin_sql; + } + } + function pendidikan_kk_sql(){ + if(isset($_SESSION['pendidikan_kk_id'])){ + $kf = $_SESSION['pendidikan_kk_id']; + $pendidikan_kk_sql= " AND u.pendidikan_kk_id = $kf"; + return $pendidikan_kk_sql; + } + } + function hamil_sql(){ + if(isset($_SESSION['hamil'])){ + $kf = $_SESSION['hamil']; + $hamil_sql= " AND u.hamil = $kf"; + return $hamil_sql; + } + } + function pendidikan_sedang_sql(){ + if(isset($_SESSION['pendidikan_sedang_id'])){ + $kf = $_SESSION['pendidikan_sedang_id']; + $pendidikan_sedang_sql= " AND u.pendidikan_sedang_id = $kf"; + return $pendidikan_sedang_sql; + } + } + function status_penduduk_sql(){ + if(isset($_SESSION['status_penduduk'])){ + $kf = $_SESSION['status_penduduk']; + $status_penduduk_sql= " AND u.status = $kf"; + return $status_penduduk_sql; + } + } + function umur_max_sql(){ + if(isset($_SESSION['umur_max'])){ + $kf = $_SESSION['umur_max']; + $umur_max_sql= " AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) <= $kf "; + return $umur_max_sql; + } + } + function umur_min_sql(){ + if(isset($_SESSION['umur_min'])){ + $kf = $_SESSION['umur_min']; + $umur_min_sql= " AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) >= $kf "; + return $umur_min_sql; + } + } + function umur_sql(){ + if(isset($_SESSION['umurx'])){ + $kf = $_SESSION['umurx']; + $umur_sql= " AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) >= (SELECT dari FROM tweb_penduduk_umur WHERE id=$kf ) AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) <= (SELECT sampai FROM tweb_penduduk_umur WHERE id=$kf ) "; + return $umur_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + if($kf == '77'){ + $filter_sql= " AND (u.status = 1 OR u.status = 2) "; + }else + $filter_sql= " AND u.status = $kf"; + return $filter_sql; + } + } + function duplikat_sql(){ + if(isset($_SESSION['duplikat'])){ + $duplikat_sql= " AND u.id NOT IN (SELECT id FROM tweb_penduduk GROUP BY nik, nama HAVING COUNT(*) = 1) "; + return $duplikat_sql; + } + } + function status_dasar_sql(){ + if(isset($_SESSION['status_dasar'])){ + $kf = $_SESSION['status_dasar']; + $status_dasar= " AND u.status_dasar = $kf"; + return $status_dasar; + } + } + function log_sql(){ + if(isset($_SESSION['log'])){ + $log_sql= " AND u.id > 1 AND u.id IN (SELECT id_pend FROM log_penduduk)"; + return $log_sql; + }else{ + $log_sql = ""; + //$log_sql= " AND u.status_dasar = 1 "; + return $log_sql; + } + } + function paging($p=1,$o=0,$log=0){ + $sql = "SELECT COUNT(u.id) AS id FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa a ON u.id_cluster = a.id LEFT JOIN tweb_keluarga d ON u.id_kk = d.id LEFT JOIN tweb_penduduk_pendidikan_kk n ON u.pendidikan_kk_id = n.id LEFT JOIN tweb_penduduk_pekerjaan p ON u.pekerjaan_id = p.id LEFT JOIN tweb_penduduk_kawin k ON u.status_kawin = k.id LEFT JOIN tweb_penduduk_sex x ON u.pendidikan_id = x.id LEFT JOIN tweb_penduduk_agama g ON u.agama_id = g.id LEFT JOIN tweb_penduduk_warganegara v ON u.warganegara_id = v.id LEFT JOIN tweb_golongan_darah m ON u.golongan_darah_id = m.id LEFT JOIN tweb_cacat f ON u.cacat_id = f.id LEFT JOIN tweb_sakit_menahun j ON u.sakit_menahun_id = j.id WHERe 1 "; + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->duplikat_sql(); + $sql .= $this->status_dasar_sql(); + $sql .= $this->sex_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $this->hubungan_sql(); + $sql .= $this->agama_sql(); + $sql .= $this->cacat_sql(); + $sql .= $this->cacatx_sql(); + $sql .= $this->menahun_sql(); + $sql .= $this->menahunx_sql(); + $sql .= $this->golongan_darah_sql(); + $sql .= $this->warganegara_sql(); + $sql .= $this->umur_min_sql(); + $sql .= $this->umur_max_sql(); + $sql .= $this->pekerjaan_sql(); + $sql .= $this->statuskawin_sql(); + $sql .= $this->pendidikan_kk_sql(); + $sql .= $this->pendidikan_sedang_sql(); + $sql .= $this->status_penduduk_sql(); + $sql .= $this->hamil_sql(); + $sql .= $this->umur_sql(); + $sql .= $this->log_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500,$log=0){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.nik'; break; + case 2: $order_sql = ' ORDER BY u.nik DESC'; break; + case 3: $order_sql = ' ORDER BY u.nama'; break; + case 4: $order_sql = ' ORDER BY u.nama DESC'; break; + case 5: $order_sql = ' ORDER BY d.no_kk'; break; + case 6: $order_sql = ' ORDER BY d.no_kk DESC'; break; + case 7: $order_sql = ' ORDER BY umur'; break; + case 8: $order_sql = ' ORDER BY umur DESC'; break; + default:$order_sql = ''; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + if($log==1) + $sql = "SELECT u.id,u.nik,u.tanggallahir,u.tempatlahir,u.status,u.status_dasar,u.id_kk,u.nama,u.nama_ayah,u.nama_ibu,a.dusun,a.rw,a.rt,d.no_kk AS no_kk,(SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) AS umur,x.nama AS sex,sd.nama AS pendidikan_sedang,n.nama AS pendidikan,p.nama AS pekerjaan,k.nama AS kawin,g.nama AS agama,m.nama AS gol_darah,hub.nama AS hubungan,log.tgl_peristiwa,log.id_detail AS status_dasar_log FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa a ON u.id_cluster = a.id LEFT JOIN tweb_keluarga d ON u.id_kk = d.id LEFT JOIN tweb_penduduk_pendidikan_kk n ON u.pendidikan_kk_id = n.id LEFT JOIN tweb_penduduk_pendidikan sd ON u.pendidikan_sedang_id = sd.id LEFT JOIN tweb_penduduk_pekerjaan p ON u.pekerjaan_id = p.id LEFT JOIN tweb_penduduk_kawin k ON u.status_kawin = k.id LEFT JOIN tweb_penduduk_sex x ON u.sex = x.id LEFT JOIN tweb_penduduk_agama g ON u.agama_id = g.id LEFT JOIN tweb_penduduk_warganegara v ON u.warganegara_id = v.id LEFT JOIN tweb_golongan_darah m ON u.golongan_darah_id = m.id LEFT JOIN tweb_cacat f ON u.cacat_id = f.id LEFT JOIN tweb_penduduk_hubungan hub ON u.kk_level = hub.id LEFT JOIN tweb_sakit_menahun j ON u.sakit_menahun_id = j.id LEFT JOIN log_penduduk log ON u.id = log.id_pend WHERE 1 "; + else + $sql = "SELECT u.id,u.nik,u.tanggallahir,u.tempatlahir,u.status,u.status_dasar,u.id_kk,u.nama,u.nama_ayah,u.nama_ibu,a.dusun,a.rw,a.rt,d.no_kk AS no_kk,(SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) AS umur,x.nama AS sex,sd.nama AS pendidikan_sedang,n.nama AS pendidikan,p.nama AS pekerjaan,k.nama AS kawin,g.nama AS agama,m.nama AS gol_darah,hub.nama AS hubungan,b.no_kk AS no_rtm,b.id AS id_rtm + FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa a ON u.id_cluster = a.id LEFT JOIN tweb_keluarga d ON u.id_kk = d.id LEFT JOIN tweb_rtm b ON u.id_rtm = b.id LEFT JOIN tweb_penduduk_pendidikan_kk n ON u.pendidikan_kk_id = n.id LEFT JOIN tweb_penduduk_pendidikan sd ON u.pendidikan_sedang_id = sd.id LEFT JOIN tweb_penduduk_pekerjaan p ON u.pekerjaan_id = p.id LEFT JOIN tweb_penduduk_kawin k ON u.status_kawin = k.id LEFT JOIN tweb_penduduk_sex x ON u.sex = x.id LEFT JOIN tweb_penduduk_agama g ON u.agama_id = g.id LEFT JOIN tweb_penduduk_warganegara v ON u.warganegara_id = v.id LEFT JOIN tweb_golongan_darah m ON u.golongan_darah_id = m.id LEFT JOIN tweb_cacat f ON u.cacat_id = f.id LEFT JOIN tweb_penduduk_hubungan hub ON u.kk_level = hub.id LEFT JOIN tweb_sakit_menahun j ON u.sakit_menahun_id = j.id WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->duplikat_sql(); + $sql .= $this->status_dasar_sql(); + $sql .= $this->sex_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $this->hubungan_sql(); + $sql .= $this->agama_sql(); + $sql .= $this->cacat_sql(); + $sql .= $this->cacatx_sql(); + $sql .= $this->menahun_sql(); + $sql .= $this->menahunx_sql(); + $sql .= $this->warganegara_sql(); + $sql .= $this->golongan_darah_sql(); + $sql .= $this->umur_min_sql(); + $sql .= $this->umur_max_sql(); + $sql .= $this->pekerjaan_sql(); + $sql .= $this->statuskawin_sql(); + $sql .= $this->pendidikan_sedang_sql(); + $sql .= $this->pendidikan_kk_sql(); + $sql .= $this->umur_sql(); + $sql .= $this->status_penduduk_sql(); + $sql .= $this->log_sql(); + $sql .= $this->hamil_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($isearch_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->sex_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $this->agama_sql(); + $sql .= $this->cacat_sql(); + $sql .= $this->cacatx_sql(); + $sql .= $this->menahun_sql(); + $sql .= $this->menahunx_sql(); + $sql .= $this->warganegara_sql(); + $sql .= $this->golongan_darah_sql(); + $sql .= $this->umur_min_sql(); + $sql .= $this->umur_max_sql(); + $sql .= $this->pekerjaan_sql(); + $sql .= $this->statuskawin_sql(); + $sql .= $this->pendidikan_sedang_sql(); + $sql .= $this->pendidikan_kk_sql(); + $sql .= $this->umur_sql(); + $sql .= $this->status_penduduk_sql(); + $sql .= $this->hamil_sql(); + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + while($idb->insert('tweb_penduduk',$data); + + $sql="SELECT MAX(id) as id FROM tweb_penduduk"; + $query = $this->db->query($sql); + $data = $query->row_array(); + $idku = $data['id']; + + $satuan=$_POST['tanggallahir']; + $blnlahir = substr($satuan,3,2); + $thnlahir= substr($satuan,6,4); + $blnskrg = (date("m")); + $thnskrg = (date("Y")); + if($_POST['status']=='3'){ + $log['id_detail']="8"; + }else{ + if(($blnlahir==$blnskrg)and($thnlahir==$thnskrg)){ + $log['id_detail']='1'; + }else{ + $log['id_detail']='5'; + } + } + $log['id_pend'] = $idku; + + $log['bulan'] = date("m"); + $log['tahun'] = date("Y"); + $log['tgl_peristiwa'] = date("d-m-Y"); + $outp = $this->db->insert('log_penduduk',$log); + + $log1['id_pend'] = $idku; + $log1['id_cluster'] = 1; + $log1['tanggal'] = date("m-d-y"); + $outp = $this->db->insert('log_perubahan_penduduk',$log1); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + + $sql = "SELECT id_kk FROM tweb_penduduk WHERE id=?"; + $query = $this->db->query($sql,$id); + $pend = $query->row_array(); + + if($data['kk_level']==1){ + $lvl['kk_level'] = 11; + $this->db->where('id_kk',$pend['id_kk']); + $this->db->where('kk_level',1); + $this->db->update('tweb_penduduk',$lvl); + + $nik['nik_kepala'] = $id; + $this->db->where('id',$pend['id_kk']); + $outp = $this->db->update('tweb_keluarga',$nik); + } + + $lokasi_file = $_FILES['foto']['tmp_name']; + $tipe_file = $_FILES['foto']['type']; + $nama_file = $_FILES['foto']['name']; + $old_foto = $data['old_foto']; + if (!empty($lokasi_file)){ + if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ + unset($data['foto']); + } else { + UploadFoto($nama_file,$old_foto); + $data['foto'] = $nama_file; + } + }else{ + unset($data['foto']); + } + + unset($data['file_foto']); + unset($data['old_foto']); + + $data['nama'] = $data['nama']; + $data['nama_ayah'] = $data['nama_ayah']; + $data['nama_ibu'] = $data['nama_ibu']; + + $data['tanggallahir'] = tgl_indo_in($data['tanggallahir']); + $data['tanggalperkawinan'] = tgl_indo_in($data['tanggalperkawinan']); + $data['tanggalperceraian'] = tgl_indo_in($data['tanggalperceraian']); + + $this->db->where('id',$id); + $outp = $this->db->update('tweb_penduduk',$data); + + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update_position($id=0){ + $sql = "SELECT id FROM tweb_penduduk_map WHERE id=?"; + $query = $this->db->query($sql,$id); + $cek = $query->row_array(); + + $data = $_POST; + unset($data['zoom']); + unset($data['map_tipe']); + if($cek['id']==$id){ + if($data['lat']){ + $this->db->where('id',$id); + $outp = $this->db->update('tweb_penduduk_map',$data); + } + }else{ + if($data['lat']){ + $data['id'] = $id; + $outp = $this->db->insert('tweb_penduduk_map',$data); + } + } + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function get_penduduk_map($id=0){ + $sql = "SELECT m.*,p.nama FROM tweb_penduduk_map m LEFT JOIN tweb_penduduk p ON m.id = p.id WHERE m.id = ? "; + $query = $this->db->query($sql,$id); + return $query->row_array(); + } + function update_status_dasar($id=0){ + $data['status_dasar'] = $_POST['status_dasar']; + $this->db->where('id',$id); + $this->db->update('tweb_penduduk',$data); + + //pindah luar desa + if($data['status_dasar'] == 3){ + $out['id_kk'] = ''; + $out['kk_level'] = ''; + $this->db->where('id',$id); + $this->db->update('tweb_penduduk',$out); + } + + $log['id_pend'] = $id; + $log['tgl_peristiwa'] = rev_tgl($_POST['tgl_peristiwa']); + $log['id_detail'] = $data['status_dasar']; + $log['bulan'] = date("m"); + $log['tahun'] = date("Y"); + $outp = $this->db->insert('log_penduduk',$log); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM tweb_penduduk WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM tweb_penduduk WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function adv_search_proses(){ + UNSET($_POST['umur1']); + UNSET($_POST['umur2']); + + UNSET($_POST['dusun']); + UNSET($_POST['rt']); + UNSET($_POST['rw']); + $i=0; + while($i++ < count($_POST)){ + $col[$i] = key($_POST); + next($_POST); + } + $i=0; + while($i++ < count($col)){ + if($_POST[$col[$i]]=="") + UNSET($_POST[$col[$i]]); + } + + $data=$_POST; + print_r($data); + $this->db->where($data); + return $this->db->get('tweb_penduduk'); + } + + function get_penduduk($id=0){ + $sql = "SELECT u.sex as id_sex,u.*,a.dusun,a.rw,a.rt,t.nama AS status,o.nama AS pendidikan_sedang, + b.nama AS pendidikan_kk,d.no_kk AS no_kk, + ( + SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id + ) + AS umur,x.nama AS sex,w.nama AS warganegara,n.nama AS pendidikan,p.nama AS pekerjaan,k.nama AS kawin,g.nama AS agama,ct.nama AS cacat + FROM tweb_penduduk u + LEFT JOIN tweb_wil_clusterdesa a ON u.id_cluster = a.id + LEFT JOIN tweb_keluarga d ON u.id_kk = d.id + LEFT JOIN tweb_penduduk_pendidikan n ON u.pendidikan_id = n.id + LEFT JOIN tweb_penduduk_pendidikan o ON u.pendidikan_sedang_id = o.id + LEFT JOIN tweb_penduduk_pendidikan_kk b ON u.pendidikan_kk_id = b.id + LEFT JOIN tweb_penduduk_warganegara w ON u.warganegara_id = w.id + LEFT JOIN tweb_penduduk_status t ON u.status = t.id + LEFT JOIN tweb_penduduk_pekerjaan p ON u.pekerjaan_id = p.id + LEFT JOIN tweb_penduduk_kawin k ON u.status_kawin = k.id + LEFT JOIN tweb_penduduk_sex x ON u.sex = x.id + LEFT JOIN tweb_cacat ct ON u.cacat_id = ct.id + LEFT JOIN tweb_penduduk_agama g ON u.agama_id = g.id WHERE u.id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + $data['tanggallahir'] = tgl_indo_out($data['tanggallahir']); + $data['tanggalperkawinan'] = tgl_indo_out($data['tanggalperkawinan']); + $data['tanggalperceraian'] = tgl_indo_out($data['tanggalperceraian']); + return $data; + } + + function list_wil(){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE zoom > '0'"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function list_dusun(){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function list_rw($dusun=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND dusun = ? AND rw <> '0'"; + $query = $this->db->query($sql,$dusun); + $data=$query->result_array(); + return $data; + } + + function list_rt($dusun='',$rw=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rw = ? AND dusun = ? AND rt <> '0'"; + $query = $this->db->query($sql,array($rw,$dusun)); + $data=$query->result_array(); + return $data; + } + + function list_rw_all(){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw <> '0'"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function list_rt_all(){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt <> '0' AND rw <> '-'"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function list_agama(){ + $sql = "SELECT * FROM tweb_penduduk_agama WHERE 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function list_hubungan(){ + $sql = "SELECT * FROM tweb_penduduk_hubungan WHERE 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function list_pendidikan(){ + $sql = "SELECT * FROM tweb_penduduk_pendidikan WHERE 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function list_pendidikan_telah(){ + $sql = "SELECT * FROM tweb_penduduk_pendidikan WHERE left(nama,6)<> 'SEDANG' "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function list_pendidikan_sedang(){ + $sql = "SELECT * FROM tweb_penduduk_pendidikan WHERE left(nama,5)<> 'TAMAT' "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function list_pendidikan_kk(){ + $sql = "SELECT * FROM tweb_penduduk_pendidikan_kk WHERE 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function list_pekerjaan(){ + $sql = "SELECT * FROM tweb_penduduk_pekerjaan WHERE 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function list_warganegara(){ + $sql = "SELECT * FROM tweb_penduduk_warganegara WHERE 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function list_status_kawin(){ + $sql = "SELECT * FROM tweb_penduduk_kawin WHERE 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function list_golongan_darah(){ + $sql = "SELECT * FROM tweb_golongan_darah WHERE 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function list_cacat(){ + $sql = "SELECT * FROM tweb_cacat WHERE 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function list_sakit_menahun(){ + $sql = "SELECT * FROM tweb_sakit_menahun WHERE 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function get_desa(){ + $sql = "SELECT * FROM config WHERE 1"; + $query = $this->db->query($sql); + return $query->row_array(); + } + function pindah_proses($id=0,$id_cluster=''){ + $this->db->where('id',$id); + $data['id_cluster'] = $id_cluster; + $outp = $this->db->update('tweb_penduduk',$data); + + $log['id_pend'] = $id; + $log['id_detail'] = "6"; + $log['bulan'] = date("m"); + $log['tahun'] = date("Y"); + $outp = $this->db->insert('log_penduduk',$log); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + /* + + unset($_SESSION['filter']); + unset($_SESSION['sex']); + unset($_SESSION['warganegara']); + unset($_SESSION['cacat']); + unset($_SESSION['menahun']); + unset($_SESSION['golongan_darah']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['hubungan']); + unset($_SESSION['agama']); + unset($_SESSION['umur_min']); + unset($_SESSION['umur_max']); + unset($_SESSION['pekerjaan_id']); + unset($_SESSION['pendidikan_sedang_id']); + unset($_SESSION['pendidikan_kk_id']); + unset($_SESSION['status_penduduk']); + unset($_SESSION['hamil']); + */ + + function list_filter($id=0){ + if($id != 0){ + $kf = ""; + $head = ""; + switch($id){ + case 1: $table = 'tweb_penduduk_hubungan'; if(isset($_SESSION['hubungan'])){$head = "STATUS HUBUNGAN DALAM KELUARGA";$kf = $_SESSION['hubungan'];} break; + case 2: $table = 'tweb_penduduk_agama'; if(isset($_SESSION['agama'])){$head = "AGAMA";$kf = $_SESSION['agama'];} break; + case 3: $table = 'tweb_penduduk_pendidikan_kk'; if(isset($_SESSION['pendidikan_kk_id'])){$head = "PENDIDIKAN DALAM KK";$kf = $_SESSION['pendidikan_kk_id'];} break; + case 4: $table = 'tweb_penduduk_pendidikan'; if(isset($_SESSION['pendidikan_sedang_id'])){$head = "PENDIDIKAN SEDANG DITEMPUH";$kf = $_SESSION['pendidikan_sedang_id'];} break; + case 5: $table = 'tweb_penduduk_pekerjaan'; if(isset($_SESSION['pekerjaan_id'])){$head = "PEKERJAAN";$kf = $_SESSION['pekerjaan_id'];} break; + case 6: $table = 'tweb_penduduk_kawin'; if(isset($_SESSION['status'])){$head = "STATUS PERKAWINAN";$kf = $_SESSION['status'];} break; + case 7: $table = 'tweb_penduduk_warganegara'; if(isset($_SESSION['warganegara'])){$head = "KEWARGANEGARAAN";$kf = $_SESSION['warganegara'];} break; + case 8: $table = 'tweb_golongan_darah'; if(isset($_SESSION['golongan_darah'])){$head = "GOLONGAN DARAH";$kf = $_SESSION['golongan_darah'];} break; + case 9: $table = 'tweb_penduduk_sex'; if(isset($_SESSION['sex'])){$head = "JENIS KELAMIN";$kf = $_SESSION['sex'];} break; + case 10: $table = 'tweb_penduduk_status'; if(isset($_SESSION['filter'])){$head = "STATUS PENDUDUK";$kf = $_SESSION['filter'];} break; + case 11: /*$table = 'tweb_status_dasar'; if(isset($_SESSION['status_dasar'])){$head = "STATUS DASAR";$kf = $_SESSION['status_dasar'];}*/ break; + case 12: $table = 'tweb_cacat'; if(isset($_SESSION['cacat'])){$head = "DIFABLE";$kf = $_SESSION['cacat'];} break; + default: $table = ""; + } + + if($kf != ""){ + $sql = "SELECT nama FROM $table WHERE id IN ($kf)"; + $query = $this->db->query($sql); + $data = $query->result_array(); + if(count($data) > 0){ + + $br = " "; + $rn = "\r\n"; + //$out = "| ".$head.":"; + $out = " _ "; + + $i=0; + while($ilist_filter($i); + $i++; + } + if($data!=""){ + $data[0] = ""; + $data[1] = ""; + } + return $data; + } + + function get_judul_statistik($tipe=0,$nomor=1){ + switch($tipe){ + case 0: $sql = "SELECT * FROM tweb_penduduk_pendidikan WHERE id=?";break; + case 1: $sql = "SELECT * FROM tweb_penduduk_pekerjaan WHERE id=?";break; + case 2: $sql = "SELECT * FROM tweb_penduduk_kawin WHERE id=?";break; + case 3: $sql = "SELECT * FROM tweb_penduduk_agama WHERE id=?";break; + case 4: $sql = "SELECT * FROM tweb_penduduk_sex WHERE id=?";break; + case 5: $sql = "SELECT * FROM tweb_penduduk_warganegara WHERE id=?";break; + case 6: $sql = "SELECT * FROM tweb_penduduk_status WHERE id=?";break; + case 7: $sql = "SELECT * FROM tweb_golongan_darah WHERE id=?";break; + case 9: $sql = "SELECT * FROM tweb_cacat WHERE id=?";break; + case 10: $sql = "SELECT * FROM tweb_sakit_menahun WHERE id=?";break; + case 11: $sql = "SELECT * FROM ref_jamkesmas WHERE id=?";break; + case 12: $sql = "SELECT * FROM tweb_penduduk_pendidikan_kk WHERE id=?";break; + case 13: $sql = "SELECT * FROM tweb_penduduk_umur WHERE id=?";break; + case 14: $sql = "SELECT * FROM tweb_penduduk_pendidikan WHERE id=?";break; + } + $query = $this->db->query($sql,$nomor); + return $query->row_array(); + } + function get_cluster($id_cluster=0){ + + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE id=$id_cluster "; + $query = $this->db->query($sql); + return $query->row_array(); + } + function randomap(){ + $sql = "SELECT u.id,id_cluster,map.lat,map.lng FROM tweb_penduduk u LEFT JOIN tweb_penduduk_map map ON u.id = map.id WHERE 1 "; + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + while($igenerateRandomString2(1); + $lng .= $this->generateRandomString2(1); + + $lat .= $this->generateRandomString(17); + $lng .= $this->generateRandomString(17); + + $data2['lat'] = $lat; + $data2['lng'] = $lng; + $data2['id'] = $id; + $this->db->insert('tweb_penduduk_map',$data2); + + $i++; + } + } + function generateRandomString($length = 5) { + $characters = '0123456789'; + $charactersLength = strlen($characters); + $randomString = ''; + for ($i = 0; $i < $length; $i++) { + $randomString .= $characters[rand(0, $charactersLength - 1)]; + } + return $randomString; + } + function generateRandomString2($length = 1) { + $characters = '5678'; + $charactersLength = strlen($characters); + $randomString = ''; + for ($i = 0; $i < $length; $i++) { + $randomString .= $characters[rand(0, $charactersLength - 1)]; + } + return $randomString; + } + function coba2(){ + $mypath="surat\\undangan\\"; + $mypath_arsip="surat\\arsip\\"; + + $path = "".str_replace("\\","/",$mypath); + $path_arsip = "".str_replace("\\","/",$mypath_arsip); + + $file = $path."pemuda.rtf"; + if(is_file($file)){ + $buffer2 =""; + + $handle = fopen($file,'r'); + $b = stream_get_contents($handle); + + $c = Parse_Data($b,'\expshrtn','{\*\themedata'); + $c = "\expshrtn".$c; + $awal = Parse_Data($b,'{','\expshrtn'); + $awal = "{".$awal; + $akhir = strstr($b,'{\*\themedata'); + + $data = $this->list_data(); + $i=1; + $h = substr_count($c,"fxnama"); + $h = 4; + $j=count($data); + $k =1; + $buffer=$c; + foreach($data AS $d){ + if($d['sex']=="PEREMPUAN") + $sex = "Sdri."; + else + $sex = "Sdr."; + + $alamat = $d['dusun'].", RT ".$d['rt']."/RW ".$d['rw']; + $buffer=str_replace("fxnama$k","\caps $d[nama]",$buffer); + $buffer=str_replace("fxalamat$k","\caps $alamat",$buffer); + $buffer=str_replace("fxpre$k","\caps $sex",$buffer); + + if($k==$h){ + $k=0; + + if($i>=$j) + $buffer2 .= $buffer; + else + $buffer2 .= $buffer." \page "; + + $buffer=$c; + } + + $k++; + $i++; + } + $buffer2 .= " \page ".$buffer; + + $buffers = $awal.$buffer2.$akhir; + + $berkas_arsip = $path_arsip."undangan.rtf"; + $handle = fopen($berkas_arsip,'w+'); + fwrite($handle,$buffers); + fclose($handle); + $_SESSION['success']=8; + header("location:".base_url($berkas_arsip)); + } + + } + + function list_dokumen($id=""){ + $sql = "SELECT * FROM dokumen WHERE id_pend = ? "; + $query = $this->db->query($sql,$id); + $data=null; + if($query) + $data=$query->result_array(); + + $i=0; + while($idb->query($sql,$id); + $data=null; + if($query) + $data=$query->result_array(); + + $i=0; + while($idb->insert('dokumen',$data); + if($outp) $_SESSION['success']=1; + } else { + $_SESSION['success']=-1; + } + } + function delete_dokumen($id=''){ + $sql = "DELETE FROM dokumen WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all_dokumen(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM dokumen WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function get_dokumen($id=0){ + $sql = "SELECT * FROM dokumen WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } +} \ No newline at end of file diff --git a/app/models/Plan_area_model.php b/app/models/Plan_area_model.php new file mode 100644 index 000000000..9b183570f --- /dev/null +++ b/app/models/Plan_area_model.php @@ -0,0 +1,238 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND l.nama LIKE '$kw'"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND l.enabled = $kf"; + return $filter_sql; + } + } + function polygon_sql(){ + if(isset($_SESSION['polygon'])){ + $kf = $_SESSION['polygon']; + $polygon_sql= " AND p.id = $kf"; + return $polygon_sql; + } + } + function subpolygon_sql(){ + if(isset($_SESSION['subpolygon'])){ + $kf = $_SESSION['subpolygon']; + $subpolygon_sql= " AND m.id = $kf"; + return $subpolygon_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(l.id) AS id FROM area l LEFT JOIN polygon p ON l.ref_polygon = p.id LEFT JOIN polygon m ON p.parrent = m.id WHERE 1 "; + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->polygon_sql(); + $sql .= $this->subpolygon_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + switch($o){ + case 1: $order_sql = ' ORDER BY nama'; break; + case 2: $order_sql = ' ORDER BY nama DESC'; break; + case 3: $order_sql = ' ORDER BY enabled'; break; + case 4: $order_sql = ' ORDER BY enabled DESC'; break; + default:$order_sql = ' ORDER BY id'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT l.*,p.nama AS kategori,m.nama AS jenis,p.simbol AS simbol,p.color AS color FROM area l LEFT JOIN polygon p ON l.ref_polygon = p.id LEFT JOIN polygon m ON p.parrent = m.id "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->polygon_sql(); + $sql .= $this->subpolygon_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($idb->insert('area',$data); + } + }else{ + unset($data['foto']); + $outp = $this->db->insert('area',$data); + } + + if($outp) + $_SESSION['success']=1; + else + $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $area_file = $_FILES['foto']['tmp_name']; + $tipe_file = $_FILES['foto']['type']; + $nama_file = $_FILES['foto']['name']; + if (!empty($area_file)){ + if ($tipe_file == "image/jpg" OR $tipe_file == "image/jpeg"){ + Uploadarea($nama_file); + $data['foto'] = $nama_file; + $this->db->where('id',$id); + $outp = $this->db->update('area',$data); + } + }else{ + unset($data['foto']); + $this->db->where('id',$id); + $outp = $this->db->update('area',$data); + } + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM area WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM area WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function list_polygon(){ + $sql = "SELECT * FROM polygon WHERE tipe = 2 "; + + if(isset($_SESSION['subpolygon'])){ + $kf = $_SESSION['subpolygon']; + $sql .= " AND parrent = $kf"; + } + + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function list_subpolygon(){ + $sql = "SELECT * FROM polygon WHERE tipe = 0 "; + + if(isset($_SESSION['polygon'])){ + + $sqlx = "SELECT * FROM polygon WHERE id = ?"; + $query = $this->db->query($sqlx,$_SESSION['polygon']); + $temp=$query->row_array(); + + $kf = $temp['parrent']; + + + } + + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function area_lock($id='',$val=0){ + + $sql = "UPDATE area SET enabled=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_area($id=0){ + $sql = "SELECT * FROM area WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function update_position($id=0){ + $data = $_POST; + $this->db->where('id',$id); + $outp = $this->db->update('area',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function list_dusun(){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function get_desa(){ + $sql = "SELECT * FROM config WHERE 1"; + $query = $this->db->query($sql); + return $query->row_array(); + } +} +?> \ No newline at end of file diff --git a/app/models/Plan_garis_model.php b/app/models/Plan_garis_model.php new file mode 100644 index 000000000..5fed9c770 --- /dev/null +++ b/app/models/Plan_garis_model.php @@ -0,0 +1,237 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND l.nama LIKE '$kw'"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND l.enabled = $kf"; + return $filter_sql; + } + } + function line_sql(){ + if(isset($_SESSION['line'])){ + $kf = $_SESSION['line']; + $line_sql= " AND p.id = $kf"; + return $line_sql; + } + } + function subline_sql(){ + if(isset($_SESSION['subline'])){ + $kf = $_SESSION['subline']; + $subline_sql= " AND m.id = $kf"; + return $subline_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(l.id) AS id FROM garis l LEFT JOIN line p ON l.ref_line = p.id LEFT JOIN line m ON p.parrent = m.id WHERE 1 "; + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->line_sql(); + $sql .= $this->subline_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + switch($o){ + case 1: $order_sql = ' ORDER BY nama'; break; + case 2: $order_sql = ' ORDER BY nama DESC'; break; + case 3: $order_sql = ' ORDER BY enabled'; break; + case 4: $order_sql = ' ORDER BY enabled DESC'; break; + default:$order_sql = ' ORDER BY id'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT l.*,p.nama AS kategori,m.nama AS jenis,p.simbol AS simbol FROM garis l LEFT JOIN line p ON l.ref_line = p.id LEFT JOIN line m ON p.parrent = m.id WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->line_sql(); + $sql .= $this->subline_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($idb->insert('garis',$data); + } + }else{ + unset($data['foto']); + $outp = $this->db->insert('garis',$data); + } + + if($outp) + $_SESSION['success']=1; + else + $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $garis_file = $_FILES['foto']['tmp_name']; + $tipe_file = $_FILES['foto']['type']; + $nama_file = $_FILES['foto']['name']; + if (!empty($garis_file)){ + if ($tipe_file == "image/jpg" OR $tipe_file == "image/jpeg"){ + Uploadgaris($nama_file); + $data['foto'] = $nama_file; + $this->db->where('id',$id); + $outp = $this->db->update('garis',$data); + } + }else{ + unset($data['foto']); + $this->db->where('id',$id); + $outp = $this->db->update('garis',$data); + } + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; +} + function delete($id=''){ + $sql = "DELETE FROM garis WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM garis WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function list_line(){ + $sql = "SELECT * FROM line WHERE tipe = 2 "; + + if(isset($_SESSION['subline'])){ + $kf = $_SESSION['subline']; + $sql .= " AND parrent = $kf"; + } + + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function list_subline(){ + $sql = "SELECT * FROM line WHERE tipe = 0 "; + + if(isset($_SESSION['line'])){ + + $sqlx = "SELECT * FROM line WHERE id = ?"; + $query = $this->db->query($sqlx,$_SESSION['line']); + $temp=$query->row_array(); + + $kf = $temp['parrent']; + + + } + + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function garis_lock($id='',$val=0){ + + $sql = "UPDATE garis SET enabled=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_garis($id=0){ + $sql = "SELECT * FROM garis WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function update_position($id=0){ + $data = $_POST; + $this->db->where('id',$id); + $outp = $this->db->update('garis',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function list_dusun(){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function get_desa(){ + $sql = "SELECT * FROM config WHERE 1"; + $query = $this->db->query($sql); + return $query->row_array(); + } +} +?> \ No newline at end of file diff --git a/app/models/Plan_line_model.php b/app/models/Plan_line_model.php new file mode 100644 index 000000000..21fc55225 --- /dev/null +++ b/app/models/Plan_line_model.php @@ -0,0 +1,317 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (nama LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND enabled = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM line WHERE tipe = 0 "; + $sql .= $this->search_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + switch($o){ + case 1: $order_sql = ' ORDER BY nama'; break; + case 2: $order_sql = ' ORDER BY nama DESC'; break; + case 3: $order_sql = ' ORDER BY enabled'; break; + case 4: $order_sql = ' ORDER BY enabled DESC'; break; + default:$order_sql = ' ORDER BY id'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT * FROM line WHERE tipe = 0 "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($idb->insert('line',$data); + } + }else { + unset($data['simbol']); + $outp = $this->db->insert('line',$data); + } + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $lokasi_file = $_FILES['simbol']['tmp_name']; + $tipe_file = $_FILES['simbol']['type']; + $nama_file = $_FILES['simbol']['name']; + if (!empty($lokasi_file)){ + if ($tipe_file == "image/png" OR $tipe_file == "image/gif"){ + UploadSimbol($nama_file); + $data['simbol'] = $nama_file; + $this->db->where('id',$id); + $outp = $this->db->update('line',$data); + } + $_SESSION['success']=1; + } + + unset($data['simbol']); + $this->db->where('id',$id); + $outp = $this->db->update('line',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; +} + function delete($id=''){ + $sql = "DELETE FROM line WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM line WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function list_sub_line($line=1){ + $sql = "SELECT * FROM line WHERE parrent = ? AND tipe = 2 "; + + $query = $this->db->query($sql,$line); + $data=$query->result_array(); + + $i=0; + while($idb->insert('line',$data); + if($outp) $_SESSION['success']=1; + } else { + $_SESSION['success']=-1; + } + }else{ + $data = $_POST; + unset($data['simbol']); + $data['parrent'] = $parrent; + $data['tipe'] = 2; + $outp = $this->db->insert('line',$data); +} + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update_sub_line($id=0){ + $data = $_POST; + $lokasi_file = $_FILES['simbol']['tmp_name']; + $tipe_file = $_FILES['simbol']['type']; + $nama_file = $_FILES['simbol']['name']; + if (!empty($lokasi_file)){ + if ($tipe_file == "image/png" OR $tipe_file == "image/gif"){ + UploadSimbol($nama_file); + $data['simbol'] = $nama_file; + $this->db->where('id',$id); + $outp = $this->db->update('line',$data); + } + $_SESSION['success']=1; + }else{ + + unset($data['simbol']); + $this->db->where('id',$id); + $outp = $this->db->update('line',$data); + } + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; +} + function delete_sub_line($id=''){ + $sql = "DELETE FROM line WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all_sub_line(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM line WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function line_lock($id='',$val=0){ + + $sql = "UPDATE line SET enabled=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_line($id=0){ + $sql = "SELECT * FROM line WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function line_show(){ + $sql = "SELECT * FROM line WHERE enabled=?"; + $query = $this->db->query($sql,1); + $data = $query->result_array(); + return $data; + } + function list_line_atas(){ + + + $sql = "SELECT m.* FROM line m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 1"; + + $query = $this->db->query($sql); + $data=$query->result_array(); + $url = site_url("first"); + $i=0; + while($i".$data[$i]['nama'].""; + + $sql2 = "SELECT s.* FROM line s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; + $query = $this->db->query($sql2,$data[$i]['id']); + $data2=$query->result_array(); + + if($data2){ + $data[$i]['line'] = $data[$i]['line'].""; + } + $data[$i]['line'] = $data[$i]['line'].""; + $i++; + } + return $data; + } + function list_line_kiri(){ + + + $sql = "SELECT m.* FROM line m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 2"; + + $query = $this->db->query($sql); + $data=$query->result_array(); + $url = site_url("first"); + $i=0; + while($i".$data[$i]['nama'].""; + + $sql2 = "SELECT s.* FROM line s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; + $query = $this->db->query($sql2,$data[$i]['id']); + $data2=$query->result_array(); + + if($data2){ + $data[$i]['line'] = $data[$i]['line'].""; + } + $data[$i]['line'] = $data[$i]['line'].""; + $i++; + } + return $data; + } +} +?> \ No newline at end of file diff --git a/app/models/Plan_lokasi_model.php b/app/models/Plan_lokasi_model.php new file mode 100644 index 000000000..58dcdc988 --- /dev/null +++ b/app/models/Plan_lokasi_model.php @@ -0,0 +1,237 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND l.nama LIKE '$kw'"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND l.enabled = $kf"; + return $filter_sql; + } + } + function point_sql(){ + if(isset($_SESSION['point'])){ + $kf = $_SESSION['point']; + $point_sql= " AND p.id = $kf"; + return $point_sql; + } + } + function subpoint_sql(){ + if(isset($_SESSION['subpoint'])){ + $kf = $_SESSION['subpoint']; + $subpoint_sql= " AND m.id = $kf"; + return $subpoint_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(l.id) AS id FROM lokasi l WHERE 1 "; + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->point_sql(); + $sql .= $this->subpoint_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + switch($o){ + case 1: $order_sql = ' ORDER BY nama'; break; + case 2: $order_sql = ' ORDER BY nama DESC'; break; + case 3: $order_sql = ' ORDER BY enabled'; break; + case 4: $order_sql = ' ORDER BY enabled DESC'; break; + default:$order_sql = ' ORDER BY id'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT l.*,p.nama AS kategori,m.nama AS jenis,p.simbol AS simbol FROM lokasi l LEFT JOIN point p ON l.ref_point = p.id LEFT JOIN point m ON p.parrent = m.id WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->point_sql(); + $sql .= $this->subpoint_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($idb->insert('lokasi',$data); + } + }else{ + unset($data['foto']); + $outp = $this->db->insert('lokasi',$data); + } + + if($outp) + $_SESSION['success']=1; + else + $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $lokasi_file = $_FILES['foto']['tmp_name']; + $tipe_file = $_FILES['foto']['type']; + $nama_file = $_FILES['foto']['name']; + if (!empty($lokasi_file)){ + if ($tipe_file == "image/jpg" OR $tipe_file == "image/jpeg"){ + UploadLokasi($nama_file); + $data['foto'] = $nama_file; + $this->db->where('id',$id); + $outp = $this->db->update('lokasi',$data); + } + }else{ + unset($data['foto']); + $this->db->where('id',$id); + $outp = $this->db->update('lokasi',$data); + } + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; +} + function delete($id=''){ + $sql = "DELETE FROM lokasi WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM lokasi WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function list_point(){ + $sql = "SELECT * FROM point WHERE tipe = 2 "; + + if(isset($_SESSION['subpoint'])){ + $kf = $_SESSION['subpoint']; + $sql .= " AND parrent = $kf"; + } + + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function list_subpoint(){ + $sql = "SELECT * FROM point WHERE tipe = 0 "; + + if(isset($_SESSION['point'])){ + + $sqlx = "SELECT * FROM point WHERE id = ?"; + $query = $this->db->query($sqlx,$_SESSION['point']); + $temp=$query->row_array(); + + $kf = $temp['parrent']; + + + } + + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function lokasi_lock($id='',$val=0){ + + $sql = "UPDATE lokasi SET enabled=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_lokasi($id=0){ + $sql = "SELECT * FROM lokasi WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function update_position($id=0){ + $data = $_POST; + $this->db->where('id',$id); + $outp = $this->db->update('lokasi',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function list_dusun(){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE rt = '0' AND rw = '0' "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + + function get_desa(){ + $sql = "SELECT * FROM config WHERE 1"; + $query = $this->db->query($sql); + return $query->row_array(); + } +} +?> \ No newline at end of file diff --git a/app/models/Plan_point_model.php b/app/models/Plan_point_model.php new file mode 100644 index 000000000..a66eb4ed0 --- /dev/null +++ b/app/models/Plan_point_model.php @@ -0,0 +1,269 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (nama LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND enabled = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM point WHERE tipe = 0 "; + $sql .= $this->search_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + switch($o){ + case 1: $order_sql = ' ORDER BY nama'; break; + case 2: $order_sql = ' ORDER BY nama DESC'; break; + case 3: $order_sql = ' ORDER BY enabled'; break; + case 4: $order_sql = ' ORDER BY enabled DESC'; break; + default:$order_sql = ' ORDER BY id'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT * FROM point WHERE tipe = 0 "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($idb->insert('point',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + + + $this->db->where('id',$id); + $outp = $this->db->update('point',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; +} + function delete($id=''){ + $sql = "DELETE FROM point WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM point WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function list_sub_point($point=1){ + $sql = "SELECT * FROM point WHERE parrent = ? AND tipe = 2 "; + + $query = $this->db->query($sql,$point); + $data=$query->result_array(); + + $i=0; + while($idb->insert('point',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update_sub_point($id=0){ + $data = $_POST; + + $this->db->where('id',$id); + $outp = $this->db->update('point',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; +} + function delete_sub_point($id=''){ + $sql = "DELETE FROM point WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all_sub_point(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM point WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function point_lock($id='',$val=0){ + + $sql = "UPDATE point SET enabled=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_point($id=0){ + $sql = "SELECT * FROM point WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function point_show(){ + $sql = "SELECT * FROM point WHERE enabled=?"; + $query = $this->db->query($sql,1); + $data = $query->result_array(); + return $data; + } + function list_simbol(){ + $sql = "SELECT * FROM gis_simbol WHERE 1"; + $query = $this->db->query($sql); + $data = $query->result_array(); + return $data; + } + function list_point_atas(){ + + + $sql = "SELECT m.* FROM point m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 1"; + + $query = $this->db->query($sql); + $data=$query->result_array(); + $url = site_url("first"); + $i=0; + while($i".$data[$i]['nama'].""; + + $sql2 = "SELECT s.* FROM point s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; + $query = $this->db->query($sql2,$data[$i]['id']); + $data2=$query->result_array(); + + if($data2){ + $data[$i]['point'] = $data[$i]['point'].""; + } + $data[$i]['point'] = $data[$i]['point'].""; + $i++; + } + return $data; + } + function list_point_kiri(){ + + + $sql = "SELECT m.* FROM point m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 2"; + + $query = $this->db->query($sql); + $data=$query->result_array(); + $url = site_url("first"); + $i=0; + while($i".$data[$i]['nama'].""; + + $sql2 = "SELECT s.* FROM point s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; + $query = $this->db->query($sql2,$data[$i]['id']); + $data2=$query->result_array(); + + if($data2){ + $data[$i]['point'] = $data[$i]['point'].""; + } + $data[$i]['point'] = $data[$i]['point'].""; + $i++; + } + return $data; + } +} +?> \ No newline at end of file diff --git a/app/models/Plan_polygon_model.php b/app/models/Plan_polygon_model.php new file mode 100644 index 000000000..860b1f43e --- /dev/null +++ b/app/models/Plan_polygon_model.php @@ -0,0 +1,317 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (nama LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND enabled = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM polygon WHERE tipe = 0 "; + $sql .= $this->search_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + switch($o){ + case 1: $order_sql = ' ORDER BY nama'; break; + case 2: $order_sql = ' ORDER BY nama DESC'; break; + case 3: $order_sql = ' ORDER BY enabled'; break; + case 4: $order_sql = ' ORDER BY enabled DESC'; break; + default:$order_sql = ' ORDER BY id'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT * FROM polygon WHERE tipe = 0 "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($idb->insert('polygon',$data); + } + }else { + unset($data['simbol']); + $outp = $this->db->insert('polygon',$data); + } + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $lokasi_file = $_FILES['simbol']['tmp_name']; + $tipe_file = $_FILES['simbol']['type']; + $nama_file = $_FILES['simbol']['name']; + if (!empty($lokasi_file)){ + if ($tipe_file == "image/png" OR $tipe_file == "image/gif"){ + UploadSimbol($nama_file); + $data['simbol'] = $nama_file; + $this->db->where('id',$id); + $outp = $this->db->update('polygon',$data); + } + $_SESSION['success']=1; + } + + unset($data['simbol']); + $this->db->where('id',$id); + $outp = $this->db->update('polygon',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; +} + function delete($id=''){ + $sql = "DELETE FROM polygon WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM polygon WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function list_sub_polygon($polygon=1){ + $sql = "SELECT * FROM polygon WHERE parrent = ? AND tipe = 2 "; + + $query = $this->db->query($sql,$polygon); + $data=$query->result_array(); + + $i=0; + while($idb->insert('polygon',$data); + if($outp) $_SESSION['success']=1; + } else { + $_SESSION['success']=-1; + } + }else{ + $data = $_POST; + unset($data['simbol']); + $data['parrent'] = $parrent; + $data['tipe'] = 2; + $outp = $this->db->insert('polygon',$data); +} + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update_sub_polygon($id=0){ + $data = $_POST; + $lokasi_file = $_FILES['simbol']['tmp_name']; + $tipe_file = $_FILES['simbol']['type']; + $nama_file = $_FILES['simbol']['name']; + if (!empty($lokasi_file)){ + if ($tipe_file == "image/png" OR $tipe_file == "image/gif"){ + UploadSimbol($nama_file); + $data['simbol'] = $nama_file; + $this->db->where('id',$id); + $outp = $this->db->update('polygon',$data); + } + $_SESSION['success']=1; + }else{ + + unset($data['simbol']); + $this->db->where('id',$id); + $outp = $this->db->update('polygon',$data); + } + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; +} + function delete_sub_polygon($id=''){ + $sql = "DELETE FROM polygon WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all_sub_polygon(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM polygon WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function polygon_lock($id='',$val=0){ + + $sql = "UPDATE polygon SET enabled=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_polygon($id=0){ + $sql = "SELECT * FROM polygon WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function polygon_show(){ + $sql = "SELECT * FROM polygon WHERE enabled=?"; + $query = $this->db->query($sql,1); + $data = $query->result_array(); + return $data; + } + function list_polygon_atas(){ + + + $sql = "SELECT m.* FROM polygon m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 1"; + + $query = $this->db->query($sql); + $data=$query->result_array(); + $url = site_url("first"); + $i=0; + while($i".$data[$i]['nama'].""; + + $sql2 = "SELECT s.* FROM polygon s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; + $query = $this->db->query($sql2,$data[$i]['id']); + $data2=$query->result_array(); + + if($data2){ + $data[$i]['polygon'] = $data[$i]['polygon'].""; + } + $data[$i]['polygon'] = $data[$i]['polygon'].""; + $i++; + } + return $data; + } + function list_polygon_kiri(){ + + + $sql = "SELECT m.* FROM polygon m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 2"; + + $query = $this->db->query($sql); + $data=$query->result_array(); + $url = site_url("first"); + $i=0; + while($i".$data[$i]['nama'].""; + + $sql2 = "SELECT s.* FROM polygon s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; + $query = $this->db->query($sql2,$data[$i]['id']); + $data2=$query->result_array(); + + if($data2){ + $data[$i]['polygon'] = $data[$i]['polygon'].""; + } + $data[$i]['polygon'] = $data[$i]['polygon'].""; + $i++; + } + return $data; + } +} +?> \ No newline at end of file diff --git a/app/models/Program_bantuan_model.php b/app/models/Program_bantuan_model.php new file mode 100644 index 000000000..c1bb7232a --- /dev/null +++ b/app/models/Program_bantuan_model.php @@ -0,0 +1,371 @@ +load->database(); + } + public function list_program($sasaran=0){ + if ($sasaran > 0){ + $strSQL = "SELECT p.id,p.nama,p.sasaran,p.ndesc,p.sdate,p.edate,p.userid,p.status FROM program p WHERE p.sasaran=".$sasaran; + }else{ + $strSQL = "SELECT p.id,p.nama,p.sasaran,p.ndesc,p.sdate,p.edate,p.userid,p.status FROM program p WHERE 1"; + } + $query = $this->db->query($strSQL); + $data = $query->result_array(); + return $data; + } + public function get_program($slug){ + if ($slug === false){ + $strSQL = "SELECT p.id,p.nama,p.sasaran,p.ndesc,p.sdate,p.edate,p.userid,p.status FROM program p WHERE 1"; + $query = $this->db->query($strSQL); + $data = $query->result_array(); + return $data; + }else{ + $strSQL = "SELECT p.id,p.nama,p.sasaran,p.ndesc,p.sdate,p.edate,p.userid,p.status FROM program p WHERE p.id=".$slug; + $query = $this->db->query($strSQL); + $hasil0 = $query->row_array(); + + switch ($hasil0["sasaran"]){ + case 1: + + $strSQL = "SELECT p.id,p.peserta,o.nama,w.rt,w.rw,w.dusun FROM program_peserta p + LEFT JOIN tweb_penduduk o ON p.peserta=o.nik + LEFT JOIN tweb_wil_clusterdesa w ON w.id=o.id_cluster WHERE p.program_id=".$slug; + $query = $this->db->query($strSQL); + $filter = array(); + if($query->num_rows()>0){ + $data=$query->result_array(); + $i=0; + while($idb->query($strSQL); + $data = ""; + $data=$query->result_array(); + if($query->num_rows() > 0){ + $i=0;$j=0; + while($idb->query($strSQL); + $filter = array(); + if($query->num_rows()>0){ + $data=$query->result_array(); + $i=0; + while($idb->query($strSQL); + $data = ""; + $data=$query->result_array(); + if($query->num_rows() > 0){ + $i=0;$j=0; + while($idb->query($strSQL); + $filter = array(); + if($query->num_rows()>0){ + $data=$query->result_array(); + $i=0; + while($idb->query($strSQL); + $data = ""; + $data=$query->result_array(); + if($query->num_rows() > 0){ + $i=0;$j=0; + while($idb->query($strSQL); + $filter = array(); + if($query->num_rows()>0){ + $data=$query->result_array(); + $i=0; + while($idb->query($strSQL); + $data = ""; + $data=$query->result_array(); + if($query->num_rows() > 0){ + $i=0; + while($idb->query($strSQL); + if($query->num_rows() > 0){ + $data_program = $query->result_array(); + } + + switch ($cat){ + case 1: + + $strSQL = "SELECT o.nama,o.foto,o.nik,w.rt,w.rw,w.dusun FROM tweb_penduduk o + LEFT JOIN tweb_wil_clusterdesa w ON w.id=o.id_cluster WHERE o.nik='".fixSQL($id)."'"; + $query = $this->db->query($strSQL); + if($query->num_rows() > 0){ + $row = $query->row_array(); + $data_profil = array( + "id"=>$id, + "nama"=>$row["nama"] ." - ".$row["nik"], + "ndesc"=>"Alamat: RT ".strtoupper($row["rt"])." / RW ".strtoupper($row["rw"])." ".strtoupper($row["dusun"]), + "foto"=>$row["foto"] + ); + } + + break; + case 2: + + $strSQL = "SELECT o.nik_kepala,o.no_kk,p.nama,w.rt,w.rw,w.dusun FROM tweb_keluarga o + LEFT JOIN tweb_penduduk p ON o.nik_kepala=p.id + LEFT JOIN tweb_wil_clusterdesa w ON w.id=p.id_cluster WHERE o.no_kk='".fixSQL($id)."'"; + $query = $this->db->query($strSQL); + if($query->num_rows() > 0){ + $row = $query->row_array(); + $data_profil = array( + "id"=>$id, + "nama"=> "Kepala KK : ".$row["nama"].", NO KK: ".$row["no_kk"], + "ndesc"=>"Alamat: RT ".strtoupper($row["rt"])." / RW ".strtoupper($row["rw"])." ".strtoupper($row["dusun"]), + "foto"=>"" + ); + } + + break; + case 3: + + $strSQL = "SELECT r.id, r.no_kk, o.nama, o.nik,w.rt,w.rw,w.dusun FROM tweb_rtm r + LEFT JOIN tweb_penduduk o ON o.id=r.nik_kepala + LEFT JOIN tweb_wil_clusterdesa w ON w.id=o.id_cluster + WHERE 1 + "; + $query = $this->db->query($strSQL); + if($query->num_rows() > 0){ + $row = $query->row_array(); + $data_profil = array( + "id"=>$id, + "nama"=> "Kepala RTM : ".$row["nama"].", NIK: ".$row["nik"], + "ndesc"=>"Alamat: RT ".strtoupper($row["rt"])." / RW ".strtoupper($row["rw"])." ".strtoupper($row["dusun"]), + "foto"=>"" + ); + } + + break; + case 4: + + $strSQL = "SELECT k.id as id,k.nama as nama,p.nama as ketua,p.nik as nik,w.rt,w.rw,w.dusun FROM kelompok k + LEFT JOIN tweb_penduduk p ON p.id=k.id_ketua + LEFT JOIN tweb_wil_clusterdesa w ON w.id=p.id_cluster + WHERE k.id='".fixSQL($id)."'"; + $query = $this->db->query($strSQL); + if($query->num_rows() > 0){ + $row = $query->row_array(); + $data_profil = array( + "id"=>$id, + "nama"=> $row["nama"], + "ndesc"=>"Ketua: ".$row["ketua"]." [".$row["nik"]."]
    Alamat: RT ".strtoupper($row["rt"])." / RW ".strtoupper($row["rw"])." ".strtoupper($row["dusun"]), + "foto"=>"" + ); + } + break; + default: + + } + if(!$data_program==false){ + $hasil = array($data_program,$data_profil); + return $hasil; + }else{ + return null; + } + } + public function set_program(){ + $data = array( + 'sasaran' => $this->input->post('cid'), + 'nama' => fixSQL($this->input->post('nama')), + 'ndesc' => fixSQL($this->input->post('ndesc')), + 'userid' => $this->input->post('userid'), + 'sdate' => date("Y-m-d",strtotime($this->input->post('sdate'))), + 'edate' => date("Y-m-d",strtotime($this->input->post('edate'))) + ); + return $this->db->insert('program', $data); + } + public function add_peserta($nik,$id){ + $strSQL = "SELECT sasaran FROM program WHERE id=".$id; + $hasil = $this->db->query($strSQL); + if($hasil->num_rows()>0){ + $row = $hasil->row_array(); + } + $strSQL = "SELECT id FROM `program_peserta` WHERE program_id='".fixSQL($id)."' AND peserta='".fixSQL($nik)."'"; + $hasil = $this->db->query($strSQL); + if($hasil->num_rows()>0){ + return false; + }else{ + $strSQL = "INSERT INTO `program_peserta`(program_id,peserta,sasaran) VALUES('".$id."','".fixSQL($nik)."','".$row["sasaran"]."')"; + $hasil = $this->db->query($strSQL); + if($hasil){ + return true; + }else{ + return false; + } + } + } + public function update_program($id){ + $strSQL = "UPDATE `program` SET `sasaran`='".$this->input->post('cid')."', + `nama`='".fixSQL($this->input->post('nama'))."', + `ndesc`='".fixSQL($this->input->post('ndesc'))."', + `sdate`='".date("Y-m-d",strtotime($this->input->post('sdate')))."', + `edate`='".date("Y-m-d",strtotime($this->input->post('edate')))."', + `status`='".$this->input->post('status')."' + WHERE id=".$id; + + $hasil = $this->db->query($strSQL); + if($hasil){ + $_SESSION["success"] = 1; + $_SESSION["pesan"] = "Data program telah diperbarui"; + }else{ + $_SESSION["success"] = -1; + } + } + public function hapus_program($id){ + $strSQL = "DELETE FROM `program` WHERE id=".$id; + $hasil = $this->db->query($strSQL); + if($hasil){ + $_SESSION["success"] = 1; + $_SESSION["pesan"] = "Data program telah dihapus"; + }else{ + $_SESSION["success"] = -1; + } + } +} +?> \ No newline at end of file diff --git a/app/models/Rtm_model.php b/app/models/Rtm_model.php new file mode 100644 index 000000000..ae80e5ff7 --- /dev/null +++ b/app/models/Rtm_model.php @@ -0,0 +1,429 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari)); + $kw = '%' .$kw. '%'; + $search_sql= " AND (t.nama LIKE '$kw' OR u.no_kk LIKE '$kw') "; + return $search_sql; + } + } + function jenis_sql(){ + if(isset($_SESSION['jenis'])){ + $kh = $_SESSION['jenis']; + $jenis_sql= " AND jenis = $kh"; + return $jenis_sql; + } + } + function kelas_sql(){ + if(isset($_SESSION['kelas'])){ + $kh = $_SESSION['kelas']; + $kelas_sql= " AND kelas_sosial= $kh"; + return $kelas_sql; + } + } + function raskin_sql(){ + if(isset($_SESSION['raskin'])){ + $kh = $_SESSION['raskin']; + $raskin_sql= " AND raskin= $kh"; + return $raskin_sql; + } + } + function blt_sql(){ + if(isset($_SESSION['id_blt'])){ + $kh = $_SESSION['id_blt']; + $blt_sql= " AND id_blt= $kh"; + return $blt_sql; + } + } + function bos_sql(){ + if(isset($_SESSION['id_bos'])){ + $kh = $_SESSION['id_bos']; + $bos_sql= " AND id_bos= $kh"; + return $bos_sql; + } + } + function pkh_sql(){ + if(isset($_SESSION['id_pkh'])){ + $kh = $_SESSION['id_pkh']; + $pkh_sql= " AND id_pkh= $kh"; + return $pkh_sql; + } + } + function jampersal_sql(){ + if(isset($_SESSION['id_jampersal'])){ + $kh = $_SESSION['id_jampersal']; + $jampersal_sql= " AND id_jampersal= $kh"; + return $jampersal_sql; + } + } + function bedah_rumah_sql(){ + if(isset($_SESSION['id_bedah_rumah'])){ + $kh = $_SESSION['id_bedah_rumah']; + $bedah_rumah_sql= " AND id_bedah_rumah= $kh"; + return $bedah_rumah_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(u.id) AS id FROM tweb_rtm u LEFT JOIN tweb_penduduk t ON t.id_rtm = u.id LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE t.rtm_level = 1 "; + $sql .= $this->search_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.no_kk'; break; + case 2: $order_sql = ' ORDER BY u.no_kk DESC'; break; + case 3: $order_sql = ' ORDER BY kepala_kk'; break; + case 4: $order_sql = ' ORDER BY kepala_kk DESC'; break; + case 5: $order_sql = ' ORDER BY g.nama'; break; + case 6: $order_sql = ' ORDER BY g.nama DESC'; break; + default:$order_sql = ' '; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT u.*,t.nama AS kepala_kk,(SELECT COUNT(id) FROM tweb_penduduk WHERE id_rtm = u.id ) AS jumlah_anggota,c.dusun,c.rw,c.rt FROM tweb_rtm u LEFT JOIN tweb_penduduk t ON u.id = t.id_rtm AND t.rtm_level = 1 LEFT JOIN tweb_wil_clusterdesa c ON t.id_cluster = c.id WHERE 1 "; + + $sql .= $this->search_sql(); + + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($isearch_sql(); + + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($idb->query($sqlp,$data[$i]['id']); + $data[$i]['anggota'] = $query->result_array(); + + $i++; + $j++; + } + return $data; + } + function insert(){ + $nik = $_POST['nik_kepala']; + + $data['no_kk'] = "0"; + $outp = $this->db->insert('tweb_rtm',$data); + + $sql = "SELECT id FROM tweb_rtm ORDER by id DESC LIMIT 1"; + $query = $this->db->query($sql); + $kk = $query->row_array(); + + $kw = $this->get_kode_wilayah(); + $nortm = 100000+$kk['id']; + $nortm = substr($nortm,1,5); + $rtm['no_kk'] = $kw."".$nortm; + $rtm['nik_kepala'] = $nik; + $this->db->where('id',$kk['id']); + $this->db->update('tweb_rtm',$rtm); + + $default['id_rtm'] = $kk['id']; + $default['rtm_level'] = 1; + $this->db->where('id',$nik); + $this->db->update('tweb_penduduk',$default); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $temp['id_rtm'] = 0; + $temp['rtm_level'] = 0; + $this->db->where('id_rtm',$id); + $outp = $this->db->update('tweb_penduduk',$temp); + + + $sql = "DELETE FROM tweb_rtm WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM tweb_rtm WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + $default['id_rtm'] = ""; + $default['rtm_level'] = ""; + + $this->db->where('id_rtm',$id); + $this->db->update('tweb_penduduk',$default); + + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function add_anggota($id=0){ + $data = $_POST; + $temp['id_rtm'] = $id; + $temp['rtm_level'] = 2; + $this->db->where('id',$data['nik']); + $outp = $this->db->update('tweb_penduduk',$temp); + + if($temp['rtm_level']=="1"){ + $temp2['nik_kepala'] = $data['nik']; + $this->db->where('id',$temp['id_rtm']); + $outp = $this->db->update('tweb_rtm',$temp2); + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function update_anggota($id=0){ + $data = $_POST; + + if($data['rtm_level'] == 1){ + + $sql = "SELECT id_rtm FROM tweb_penduduk WHERE id=?"; + $query = $this->db->query($sql,$id); + $r = $query->row_array(); + $id_rtm = $r['id_rtm']; + + $del['rtm_level'] = 2; + $this->db->where('id_rtm',$id_rtm); + + $this->db->update('tweb_penduduk',$del); + $rtm['nik_kepala'] = $id; + $this->db->where('id',$id_rtm); + $outp = $this->db->update('tweb_rtm',$rtm); + } + + $this->db->where('id',$id); + $this->db->update('tweb_penduduk',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function rem_anggota($kk=0,$id=0){ + $temp['id_rtm'] = 0; + $temp['rtm_level'] = 0; + + $pend = $this->rtm_model->get_anggota($id); + $this->db->where('id',$id); + $outp = $this->db->update('tweb_penduduk',$temp); + if($pend['rtm_level']=='1'){ + $temp2['nik_kepala']=0; + $this->db->where('id',$pend['id_rtm']); + $outp = $this->db->update('tweb_rtm',$temp2); + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function rem_all_anggota($kk){ + $id_cb = $_POST['id_cb']; + $temp['id_rtm'] = 0; + $temp['rtm_level'] = 0; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $this->db->where('id',$id); + $outp = $this->db->update('tweb_penduduk',$temp); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_dusun($id=0){ + $sql = "SELECT * FROM tweb_rtm WHERE dusun_id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + + function get_rtm($id=0){ + $sql = "SELECT * FROM tweb_rtm WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_anggota($id=0){ + $sql = "SELECT * FROM tweb_penduduk WHERE id_rtm=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_kode_wilayah(){ + $sql = "SELECT * FROM config WHERE 1"; + $query = $this->db->query($sql); + $d = $query->row_array(); + $data = $d['kode_kabupaten'].$d['kode_kecamatan'].$d['kode_desa']; + + return $data; + } + function list_penduduk_lepas(){ + $sql = "SELECT p.id,p.nik,p.nama,h.nama as kk_level FROM tweb_penduduk p LEFT JOIN tweb_penduduk_hubungan h ON p.kk_level=h.id WHERE (status = 1 OR status = 3) AND id_rtm = 0"; + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + while($idb->query($sql,array($id)); + $data=$query->result_array(); + + + $i=0; + while($idb->query($sql,array($id)); + return $query->row_array(); + + } + function get_desa(){ + $sql = "SELECT * FROM config WHERE 1"; + $query = $this->db->query($sql); + return $query->row_array(); + } + function list_hubungan(){ + $sql = "SELECT id,nama as hubungan FROM tweb_rtm_hubungan WHERE 1"; + $query = $this->db->query($sql); + return $query->result_array(); + } + function update_nokk($id=0){ + $data = $_POST; + + $this->db->where("id",$id); + $outp=$this->db->update("tweb_rtm",$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + + } +} \ No newline at end of file diff --git a/app/models/Sms_model.php b/app/models/Sms_model.php new file mode 100644 index 000000000..3b81d4b58 --- /dev/null +++ b/app/models/Sms_model.php @@ -0,0 +1,717 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.SenderNumber LIKE '$kw' OR u.TextDecoded LIKE '$kw')"; + return $search_sql; + } + } + + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND u.Class = $kf"; + return $filter_sql; + } + } + + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(ID) AS id FROM inbox u WHERE 1"; + $sql .= $this->search_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function insert_autoreply(){ + $data=$_POST; + $sql = "DELETE FROM setting_sms"; + $query = $this->db->query($sql); + $outp = $this->db->insert('setting_sms',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function get_autoreply(){ + $sql = "SELECT * FROM setting_sms LIMIT 1 "; + $query = $this->db->query($sql); + $data = $query->row_array(); + return $data; + } + function list_data($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.SenderNumber'; break; + case 2: $order_sql = ' ORDER BY u.SenderNumber DESC'; break; + case 3: $order_sql = ' ORDER BY u.Class'; break; + case 4: $order_sql = ' ORDER BY u.Class DESC'; break; + case 5: $order_sql = ' ORDER BY u.ReceivingDateTime'; break; + case 6: $order_sql = ' ORDER BY u.ReceivingDateTime DESC'; break; + default:$order_sql = ' ORDER BY u.ReceivingDateTime DESC'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT p.nama,u.* FROM inbox u LEFT JOIN kontak k on u.SenderNumber=k.no_hp LEFT JOIN tweb_penduduk p on k.id_pend=p.id WHERE 1"; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + return $data; + } + function paging_terkirim($p=1,$o=0){ + $sql = "SELECT count(u.ID) as id FROM sentitems u LEFT JOIN kontak k on u.DestinationNumber=k.no_hp LEFT JOIN tweb_penduduk p on k.id_pend=p.id WHERE 1"; + + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data_terkirim($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.DestinationNumber'; break; + case 2: $order_sql = ' ORDER BY u.DestinationNumber DESC'; break; + case 3: $order_sql = ' ORDER BY u.Class'; break; + case 4: $order_sql = ' ORDER BY u.Class DESC'; break; + case 5: $order_sql = ' ORDER BY u.SendingDateTime'; break; + case 6: $order_sql = ' ORDER BY u.SendingDateTime DESC'; break; + default:$order_sql = ' ORDER BY u.SendingDateTime DESC'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT p.nama,u.* FROM sentitems u LEFT JOIN kontak k on u.DestinationNumber=k.no_hp LEFT JOIN tweb_penduduk p on k.id_pend=p.id WHERE 1"; + + + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + return $data; + } + function paging_tertunda($p=1,$o=0){ + $sql = "SELECT count(u.ID) as id FROM outbox u LEFT JOIN kontak k on u.DestinationNumber=k.no_hp LEFT JOIN tweb_penduduk p on k.id_pend=p.id WHERE 1"; + + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data_tertunda($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.DestinationNumber'; break; + case 2: $order_sql = ' ORDER BY u.DestinationNumber DESC'; break; + case 3: $order_sql = ' ORDER BY u.Class'; break; + case 4: $order_sql = ' ORDER BY u.Class DESC'; break; + case 5: $order_sql = ' ORDER BY u.SendingDateTime'; break; + case 6: $order_sql = ' ORDER BY u.SendingDateTime DESC'; break; + default:$order_sql = ' ORDER BY u.SendingDateTime DESC'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT p.nama,u.* FROM outbox u LEFT JOIN kontak k on u.DestinationNumber=k.no_hp LEFT JOIN tweb_penduduk p on k.id_pend=p.id WHERE 1"; + + + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + return $data; + } + function insert(){ + $data = $_POST; + $outp = $this->db->insert('outbox',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($Class=0,$ID=''){ + if($Class==2){ + $sql = "DELETE FROM sentitems WHERE ID=?"; + }elseif($Class==1){ + $sql = "DELETE FROM inbox WHERE ID=?"; + }else{ + $sql = "DELETE FROM outbox WHERE ID=?"; + } + $outp = $this->db->query($sql,array($ID)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all($Class=0){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $ID){ + if($Class==2){ + $sql = "DELETE FROM sentitems WHERE ID=?"; + }elseif($Class==1){ + $sql = "DELETE FROM inbox WHERE ID=?"; + }else{ + $sql = "DELETE FROM outbox WHERE ID=?"; + } + $outp = $this->db->query($sql,array($ID)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function get_sms($Class=0,$ID=0){ + if($Class==2){ + $sql = "SELECT * FROM sentitems WHERE ID=?"; + }elseif($Class==1){ + $sql = "SELECT SenderNumber AS DestinationNumber,TextDecoded FROM inbox WHERE ID=?"; + }else{ + $sql = "SELECT * FROM outbox WHERE ID=?"; + } + $query = $this->db->query($sql,array($ID)); + $data = $query->row_array(); + + return $data; + } + function list_nama(){ + $sql = "SELECT * FROM tweb_penduduk WHERE id NOT IN (SELECT id_pend FROM kontak)"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function list_kontak(){ + $sql = "SELECT a.*,b.* FROM kontak a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function get_kontak($id=0){ + $sql = "SELECT a.*,b.nama FROM kontak a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id WHERE a.id='$id'"; + + $query = $this->db->query($sql); + $data = $query->row_array(); + return $data; + } + function get_grup($id=0){ + $sql = "SELECT * FROM kontak_grup WHERE nama_grup ='$id' AND id_kontak='0' "; + + $query = $this->db->query($sql); + $data = $query->row_array(); + return $data; + } + function update_setting($ID=0){ + $password = md5($this->input->post('pass_lama')); + $pass_baru = $this->input->post('pass_baru'); + $pass_baru1 = $this->input->post('pass_baru1'); + $nama = $this->input->post('nama'); + + $sql = "SELECT password,id_grup,session FROM user WHERE id=?"; + $query=$this->db->query($sql,array($id)); + $row=$query->row(); + + if($password==$row->password){ + if($pass_baru == $pass_baru1){ + $pass_baru = md5($pass_baru); + $sql = "UPDATE user SET password=?,nama=? WHERE id=?"; + $outp = $this->db->query($sql,array($pass_baru,$nama,$id)); + } + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_grup(){ + $sql = "SELECT * FROM user_grup"; + $query = $this->db->query($sql); + return $query->result_array(); + } + function list_grup_kontak(){ + $sql = "SELECT * FROM kontak_grup group by nama_grup"; + $query = $this->db->query($sql); + return $query->result_array(); + } + function sex_sql(){ + if(isset($_SESSION['sex1'])){ + $kf = $_SESSION['sex1']; + $sex_sql= " AND u.sex = $kf"; + return $sex_sql; + } + } + function dusun_sql(){ + if(isset($_SESSION['dusun1'])){ + $kf = $_SESSION['dusun1']; + $dusun_sql= " AND a.dusun = '$kf'"; + return $dusun_sql; + } + } + function rw_sql(){ + if(isset($_SESSION['rw1'])){ + $kf = $_SESSION['rw1']; + $rw_sql= " AND a.rw = '$kf'"; + return $rw_sql; + } + } + function rt_sql(){ + if(isset($_SESSION['rt1'])){ + $kf = $_SESSION['rt1']; + $rt_sql= " AND a.rt = '$kf'"; + return $rt_sql; + } + } + function agama_sql(){ + if(isset($_SESSION['agama1'])){ + $kf = $_SESSION['agama1']; + $agama_sql= " AND u.agama_id = $kf"; + return $agama_sql; + } + } + function pekerjaan_sql(){ + if(isset($_SESSION['pekerjaan1'])){ + $kf = $_SESSION['pekerjaan1']; + $pekerjaan_sql= " AND u.pekerjaan_id = $kf"; + return $pekerjaan_sql; + } + } + function statuskawin_sql(){ + if(isset($_SESSION['status1'])){ + $kf = $_SESSION['status1']; + $statuskawin_sql= " AND u.status_kawin = $kf"; + return $statuskawin_sql; + } + } + function pendidikan_sql(){ + if(isset($_SESSION['pendidikan1'])){ + $kf = $_SESSION['pendidikan1']; + $pendidikan_sql= " AND u.pendidikan_id = $kf"; + return $pendidikan_sql; + } + } + function status_penduduk_sql(){ + if(isset($_SESSION['status_penduduk1'])){ + $kf = $_SESSION['status_penduduk1']; + $status_penduduk_sql= " AND u.status = $kf"; + return $status_penduduk_sql; + } + } + function grup_sql(){ + if(isset($_SESSION['grup1'])){ + $kf = $_SESSION['grup1']; + $grup_sql= " AND k.id IN (SELECT id_kontak FROM kontak_grup WHERE nama_grup='$kf')"; + return $grup_sql; + } + } + function umur_max_sql(){ + if(isset($_SESSION['umur_max1'])){ + $kf = $_SESSION['umur_max1']; + $umur_max_sql= " AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) <= $kf"; + return $umur_max_sql; + } + } + function umur_min_sql(){ + if(isset($_SESSION['umur_min1'])){ + $kf = $_SESSION['umur_min1']; + $umur_min_sql= " AND (SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(`tanggallahir`)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) >= $kf"; + return $umur_min_sql; + } + } + function send_broadcast($o=0){ + $isi=$_SESSION['TextDecoded1']; + + $sql = "SELECT no_hp FROM kontak k LEFT JOIN tweb_penduduk u on k.id_pend=u.id LEFT JOIN tweb_wil_clusterdesa a on u.id_cluster=a.id WHERE 1 "; + $sql .= $this->sex_sql(); + $sql .= $this->dusun_sql(); + $sql .= $this->rw_sql(); + $sql .= $this->rt_sql(); + $sql .= $this->agama_sql(); + $sql .= $this->umur_min_sql(); + $sql .= $this->umur_max_sql(); + $sql .= $this->pekerjaan_sql(); + $sql .= $this->statuskawin_sql(); + $sql .= $this->pendidikan_sql(); + $sql .= $this->status_penduduk_sql(); + $sql .= $this->grup_sql(); + + $query = $this->db->query($sql); + $data=$query->result_array(); + foreach($data as $hsl): + $no=$hsl['no_hp']; + $sqlku="INSERT INTO outbox(DestinationNumber,TextDecoded)values('$no','$isi')"; + $query = $this->db->query($sqlku); + endforeach; + } + function paging_kontak($p=1,$o=0){ + $sql = "SELECT COUNT(a.id) as id FROM kontak a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id WHERE 1"; + $sql .= $this->search_kontak_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data_kontak($o=0,$offset=0,$limit=500){ + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT a.*, b.nama, b.alamat_sekarang, (CASE WHEN sex='1' THEN 'Laki-laki' ELSE 'Perempuan' END) AS sex FROM kontak a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id WHERE 1"; + + $sql .= $this->search_kontak_sql(); + + + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + return $data; + } + function search_kontak_sql(){ + if(isset($_SESSION['cari_kontak'])){ + $cari = $_SESSION['cari_kontak']; + $kw = $this->db->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_kontak_sql= " AND (b.nama LIKE '$kw' OR a.no_hp LIKE '$kw')"; + return $search_kontak_sql; + } + } + function insert_kontak($id=0){ + $data=$_POST; + $sql = "DELETE FROM kontak WHERE id_pend='$_POST[id_pend]' "; + $query = $this->db->query($sql); + $outp = $this->db->insert('kontak',$data); + } + function delete_kontak($id=0){ + $sql = "DELETE FROM kontak WHERE id='$id' "; + $query = $this->db->query($sql); + } + function delete_all_kontak(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM kontak WHERE id='$id' "; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function paging_grup($p=1,$o=0){ + $sql = "SELECT COUNT(nama_grup) as id FROM (SELECT nama_grup, (SELECT COUNT(id_kontak) FROM kontak_grup WHERE id_kontak<>'0') as jumlah_kontak FROM kontak_grup WHERE id_kontak='0' ) AS TB WHERE 1 "; + $sql .= $this->search_grup_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data_grup($o=0,$offset=0,$limit=500){ + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT * FROM (SELECT a.nama_grup, (SELECT COUNT(id_kontak) FROM kontak_grup WHERE id_kontak<>'0' AND nama_grup=a.nama_grup) as jumlah_kontak FROM kontak_grup a WHERE id_kontak='0' ) AS TB WHERE 1 "; + + $sql .= $this->search_grup_sql(); + + + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + return $data; + } + function insert_grup($id=0){ + $data['nama_grup']=$_POST['nama_grup']; + $data['id_kontak']="-"; + $outp = $this->db->insert('kontak_grup',$data); + } + function update_grup($id=0){ + $nama_baru=$_POST['nama_grup']; + $nama_awal=$_POST['nama_grup_awal']; + $sql = "UPDATE kontak_grup SET nama_grup='$nama_baru' WHERE nama_grup='$nama_awal'"; + echo $sql; + $query = $this->db->query($sql); + } + function delete_grup($id=0){ + $sql = "DELETE FROM kontak_grup WHERE nama_grup='$id' "; + $query = $this->db->query($sql); + } + function delete_all_grup(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM kontak_grup WHERE nama_grup='$id' "; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function search_grup_sql(){ + if(isset($_SESSION['cari_grup'])){ + $cari = $_SESSION['cari_grup']; + $kw = $this->db->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_grup_sql= " AND (nama_grup LIKE '$kw')"; + return $search_grup_sql; + } + } + function search_anggota_sql(){ + if(isset($_SESSION['cari_anggota'])){ + $cari = $_SESSION['cari_anggota']; + $kw = $this->db->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_anggota_sql= " AND (nama LIKE '$kw')"; + return $search_anggota_sql; + } + } + function paging_anggota($id=0,$p=1,$o=0){ + $sql = "SELECT COUNT(c.id) as id FROM kontak_grup a LEFT JOIN kontak b ON a.id_kontak=b.id LEFT JOIN tweb_penduduk c ON b.id_pend=c.id WHERE a.id_kontak<>'0' AND nama_grup='$id' "; + $sql .= $this->search_anggota_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data_anggota($id=0,$o=0,$offset=0,$limit=500){ + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + $sql = "SELECT a.*,c.*,b.*,(CASE when sex='1' then 'Laki-laki' else 'Perempuan' end) as sex FROM kontak_grup a LEFT JOIN kontak b ON a.id_kontak=b.id LEFT JOIN tweb_penduduk c ON b.id_pend=c.id WHERE a.id_kontak<>'0' AND nama_grup='$id' "; + + $sql .= $this->search_anggota_sql(); + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + $i=0; + $j=$offset; + return $data; + } + function list_data_nama($id=0){ + $sql = "SELECT a.*, b.nama, b.alamat_sekarang, b.sex FROM kontak a LEFT JOIN tweb_penduduk b ON a.id_pend=b.id WHERE a.id NOT IN (SELECT id_kontak FROM kontak_grup WHERE nama_grup='$id') "; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function insert_anggota($id=0){ + $id_cb = $_POST['id_cb']; + if(count($id_cb)){ + foreach($id_cb as $a){ + $sql = "INSERT INTO kontak_grup(nama_grup, id_kontak)VALUES('$id','$a')"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_anggota($grup=0,$id=0){ + $sql = "DELETE FROM kontak_grup WHERE nama_grup='$grup' AND id_kontak='$id'"; + $query = $this->db->query($sql); + } + function delete_all_anggota($grup=0){ + $id_cb = $_POST['id_cb']; + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM kontak_grup WHERE nama_grup='$grup' AND id_kontak='$id'"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function paging_polling($p=1,$o=0){ + $sql = "SELECT count(id_polling) as id FROM polling "; + + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data_polling($o=0,$offset=0,$limit=500){ + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + $sql = "SELECT a.*,(SELECT COUNT(b.id) FROM pertanyaan b WHERE b.id_polling=a.id_polling) as jumlah_pertanyaan FROM polling a"; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + return $data; + } + function get_data_polling($id=0){ + $sql = "SELECT * FROM polling WHERE id_polling='$id'"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function insert_polling($id=0){ + $data=$_POST; + if ($id==0){ + $outp = $this->db->insert('polling',$data); + } else { + $this->db->where('id_polling',$id); + $outp = $this->db->update('polling',$data); + } + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_polling($id=0){ + $sql = "DELETE FROM polling WHERE id_polling='$id' "; + $query = $this->db->query($sql); + } + function delete_all_polling(){ + $id_cb = $_POST['id_cb']; + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM polling WHERE id_polling='$id' "; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function paging_pertanyaan($id=0,$p=1,$o=0){ + $sql = "SELECT COUNT(c.id) as id FROM kontak_grup a LEFT JOIN kontak b ON a.id_kontak=b.id LEFT JOIN tweb_penduduk c ON b.id_pend=c.id WHERE a.id_kontak<>'0' AND nama_grup='$id' "; + $sql .= $this->search_anggota_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data_pertanyaan($id=0,$o=0,$offset=0,$limit=500){ + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + $sql = "SELECT a.*,c.*,b.*,(CASE when sex='1' then 'Laki-laki' else 'Perempuan' end) as sex FROM kontak_grup a LEFT JOIN kontak b ON a.id_kontak=b.id LEFT JOIN tweb_penduduk c ON b.id_pend=c.id WHERE a.id_kontak<>'0' AND nama_grup='$id' "; + + $sql .= $this->search_anggota_sql(); + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + $i=0; + $j=$offset; + return $data; + } +} +?> \ No newline at end of file diff --git a/app/models/Surat_keluar_model.php b/app/models/Surat_keluar_model.php new file mode 100644 index 000000000..a53805463 --- /dev/null +++ b/app/models/Surat_keluar_model.php @@ -0,0 +1,257 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.no_surat LIKE '$kw' OR u.id_pend LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['nik'])){ + $kf = $_SESSION['nik']; + if($kf=="0"){ + $filter_sql= "";} else { + $filter_sql= " AND n.id = '".$kf."'";} + return $filter_sql; + } + } + function filterku_sql($nik=0){ + $kf = $nik; + if($kf==0){ + $filterku_sql= "";} else { + $filterku_sql= " AND u.id_pend = '".$kf."'";} + return $filterku_sql; + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM log_surat u WHERE 1"; + $sql .= $this->search_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function paging_perorangan($nik=0,$p=1,$o=0){ + $sql = "SELECT count(id_format_surat) as id FROM log_surat u LEFT JOIN tweb_penduduk n ON u.id_pend = n.id LEFT JOIN tweb_surat_format k ON u.id_format_surat = k.id LEFT JOIN tweb_desa_pamong s ON u.id_pamong = s.pamong_id WHERE 1 "; + $sql .= $this->filterku_sql($nik); + + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data_surat($nik=0,$o=0,$offset=0,$limit=500){ + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT u.*,n.nama AS nama,w.nama AS nama_user, n.nik AS nik,k.nama AS format, k.url_surat as berkas,s.pamong_nama AS pamong + FROM log_surat u + LEFT JOIN tweb_penduduk n ON u.id_pend = n.id + LEFT JOIN tweb_surat_format k ON u.id_format_surat = k.id + LEFT JOIN tweb_desa_pamong s ON u.id_pamong = s.pamong_id + LEFT JOIN user w ON u.id_user = w.id + WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->filterku_sql($nik); + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($isearch_sql(); + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($idb->query($sql,$f); + if($query->num_rows() > 0){ + $pam=$query->row_array(); + $data['id_format_surat']=$pam['id']; + }else{ + $data['id_format_surat'] = $f; + } + + $sql = "SELECT pamong_id FROM tweb_desa_pamong WHERE pamong_nama = ?"; + $query = $this->db->query($sql,$g); + if($query->num_rows() > 0){ + $pam=$query->row_array(); + $data['id_pamong']=$pam['pamong_id']; + }else{ + $data['id_pamong'] = 1; + } + + + if($data['id_pamong']=='') + $data['id_pamong'] = 1; + + $data['id_user']=$u; + $data['bulan']=date('m'); + $data['tahun']=date('Y'); + $data['no_surat']=$z; + + $this->db->insert('log_surat',$data); + + } + function grafik(){ + $sql = "select round(((jml*100)/(select count(id) from log_surat)),2) as jumlah, nama from (SELECT COUNT(l.id) as jml, f.nama from log_surat l left join tweb_surat_format f on l.id_format_surat=f.id group by l.id_format_surat) as a"; + $query = $this->db->query($sql); + $data=$query->result_array(); + return $data; + } + function update($id=0){ + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM log_surat WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM log_surat WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_penduduk(){ + $sql = "SELECT id,nik,nama FROM tweb_penduduk WHERE status = 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + while($iinput->post('pass_lama')); + $pass_baru = $this->input->post('pass_baru'); + $pass_baru1 = $this->input->post('pass_baru1'); + $nama = $this->input->post('nama'); + + $sql = "SELECT password,id_grup,session FROM user WHERE id=?"; + $query=$this->db->query($sql,array($id)); + $row=$query->row(); + + if($password==$row->password){ + if($pass_baru == $pass_baru1){ + $pass_baru = md5($pass_baru); + $sql = "UPDATE user SET password=?,nama=? WHERE id=?"; + $outp = $this->db->query($sql,array($pass_baru,$nama,$id)); + } + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_grup(){ + $sql = "SELECT * FROM user_grup"; + $query = $this->db->query($sql); + return $query->result_array(); + } +} +?> \ No newline at end of file diff --git a/app/models/Surat_master_model.php b/app/models/Surat_master_model.php new file mode 100644 index 000000000..60b7c0021 --- /dev/null +++ b/app/models/Surat_master_model.php @@ -0,0 +1,241 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND nama LIKE '$kw'"; + return $search_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM tweb_surat_format u WHERE 1"; + $sql .= $this->search_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.nomor'; break; + case 2: $order_sql = ' ORDER BY u.nomor DESC'; break; + case 3: $order_sql = ' ORDER BY u.pertanyaan'; break; + case 4: $order_sql = ' ORDER BY u.pertanyaan DESC'; break; + case 5: $order_sql = ' ORDER BY u.id_kategori'; break; + case 6: $order_sql = ' ORDER BY u.id_kategori DESC'; break; + default:$order_sql = ' ORDER BY u.id'; + } + + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + + $sql = "SELECT u.* FROM tweb_surat_format u WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($idb->insert('tweb_surat_format',$data); + + $mypath="surat\\".$data['url_surat']."\\"; + $path = "".str_replace("\\","/",$mypath)."/"; + + if (!file_exists($path)) { + mkdir($path, 0777, true); + } + + + $raw="surat\\raw\\"; + $raw_path = "".str_replace("\\","/",$raw); + $file = $raw_path."template.rtf"; + $handle = fopen($file,'r'); + + $buffer = stream_get_contents($handle); + //$handle = fopen($path.$data['url_surat'],'w+'); + + $berkas = $path.$data['url_surat'].".rtf"; + $handle = fopen($berkas,'w+'); + fwrite($handle,$buffer); + fclose($handle); + + + $mypath="donjo-app\\views\\surat\\form\\"; + $path_form = "".str_replace("\\","/",$mypath)."/"; + + $raw="surat\\raw\\"; + $raw_path = "".str_replace("\\","/",$raw); + $file = $raw_path."form.raw"; + $handle = fopen($file,'r'); + + $buffer = stream_get_contents($handle); + //$handle = fopen($path_form.$data['url_surat'],'w+'); + + $berkas = $path_form.$data['url_surat'].".php"; + $handle = fopen($berkas,'w+'); + $buffer=str_replace("[nama_surat]","Surat $data[nama]",$buffer); + fwrite($handle,$buffer); + fclose($handle); + + + $mypath="donjo-app\\views\\surat\\print\\"; + $path_form = "".str_replace("\\","/",$mypath)."/"; + + $raw="surat\\raw\\"; + $raw_path = "".str_replace("\\","/",$raw); + $file = $raw_path."print.raw"; + $handle = fopen($file,'r'); + + $buffer = stream_get_contents($handle); + //$handle = fopen($path_form.$data['url_surat'],'w+'); + + $berkas = $path_form."print_".$data['url_surat'].".php"; + $handle = fopen($berkas,'w+'); + $nama_surat = strtoupper($data['nama']); + $buffer=str_replace("[nama_surat]","SURAT $nama_surat",$buffer); + fwrite($handle,$buffer); + fclose($handle); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $this->db->where('id',$id); + $outp = $this->db->update('tweb_surat_format',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function upload($url=""){ + $tipe_file = $_FILES['foto']['type']; + $name = $_FILES['foto']['name']; + $name = substr($name,strlen($name)-4,4); + + + if ($name != ".rtf"){ + $_SESSION['success']=-1; + } else { + + $vdir_upload = "surat/$url/$url.rtf"; + unlink($vdir_upload); + move_uploaded_file($_FILES["foto"]["tmp_name"], $vdir_upload); + $_SESSION['success']=1; + } + + } + function delete($id=''){ + $sql = "DELETE FROM tweb_surat_format WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM tweb_surat_format WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_atribut($id=0){ + $sql = "SELECT * FROM tweb_surat_atribut WHERE id_surat = ?"; + $query = $this->db->query($sql,$id); + $data= $query->result_array(); + + $i=0; + while($idb->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_tweb_surat_atribut($id=''){ + $sql = "SELECT * FROM tweb_surat_atribut WHERE id=?"; + $query = $this->db->query($sql,$id); + return $query->row_array(); + } + function favorit($id=0,$k=0){ + + if($k==1) + $sql = "UPDATE tweb_surat_format SET favorit = 0 WHERE id=?"; + else + $sql = "UPDATE tweb_surat_format SET favorit = 1 WHERE id=?"; + + $outp = $this->db->query($sql,$id); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function lock($id=0,$k=0){ + + if($k==1) + $sql = "UPDATE tweb_surat_format SET kunci = 0 WHERE id=?"; + else + $sql = "UPDATE tweb_surat_format SET kunci = 1 WHERE id=?"; + + $outp = $this->db->query($sql,$id); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } +} \ No newline at end of file diff --git a/app/models/Surat_model.php b/app/models/Surat_model.php new file mode 100644 index 000000000..5be0566dd --- /dev/null +++ b/app/models/Surat_model.php @@ -0,0 +1,618 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + while($idb->query($sql); + $data = $query->result_array(); + return $data; + } + function list_surat_fav(){ + $sql = "SELECT * FROM tweb_surat_format WHERE kunci = 0 AND favorit = 1"; + $query = $this->db->query($sql); + $data = $query->result_array(); + return $data; + } + function list_penduduk(){ + $sql = "SELECT u.id,nik,nama,w.dusun,w.rw,w.rt FROM tweb_penduduk u LEFT JOIN tweb_wil_clusterdesa w ON u.id_cluster = w.id WHERE u.status = 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + while($idb->query($sql); + $data=$query->result_array(); + + + $i=0; + while($idb->query($sql); + $data=$query->result_array(); + + + $i=0; + while($idb->query($sql,$id); + $data=$query->result_array(); + + + $i=0; + while($idb->query($sql,$id); + $data = $query->row_array(); + + $data['alamat']=''; + + if($data['rt'] != "-") + $data['alamat']="RT-".$data['rt']; + + if($data['rw'] != "-") + $data['alamat']=$data['alamat']." RW-".$data['rw']; + + if($data['dusun'] != "-") + $data['alamat']=$data['alamat']." Dusun ".ununderscore($data['dusun']); + + return $data; + } + + function list_anggota($id=0,$nik=0){ + $sql = "SELECT u.*,(SELECT DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(tanggallahir)), '%Y')+0 FROM tweb_penduduk WHERE id = u.id) AS umur,x.nama AS pendidikan,h.nama AS hubungan FROM tweb_penduduk u LEFT JOIN tweb_penduduk_pendidikan_kk x ON u.pendidikan_kk_id = x.id LEFT JOIN tweb_penduduk_hubungan h ON u.kk_level = h.id WHERE u.id_kk = ? AND u.nik <> ?"; + $query = $this->db->query($sql,array($id,$nik)); + $data = $query->result_array(); + + return $data; + } + + + function pengikut(){ + $id_cb = $_POST['id_cb']; + $outp=""; + if(count($id_cb)){ + foreach($id_cb as $id){ + + $outp = $outp.$id.','; + } + $outp = $outp.'7070'; + + + + $sql = "select `u`.`id` AS `id`,`u`.`nama` AS `nama`,`x`.`nama` AS `sex`,`u`.`tempatlahir` AS `tempatlahir`,`u`.`tanggallahir` AS `tanggallahir`,(select (date_format(from_days((to_days(now()) - to_days(`tweb_penduduk`.`tanggallahir`))),'%Y') + 0) AS `(date_format(from_days((to_days(now()) - to_days(``tweb_penduduk``.``tanggallahir``))),'%Y') + 0)` from `tweb_penduduk` where (`tweb_penduduk`.`id` = `u`.`id`)) AS `umur`,`w`.`nama` AS `status_kawin`,`f`.`nama` AS `warganegara`,`a`.`nama` AS `agama`,`d`.`nama` AS `pendidikan`,`j`.`nama` AS `pekerjaan`,`u`.`nik` AS `nik`,`c`.`rt` AS `rt`,`c`.`rw` AS `rw`,`c`.`dusun` AS `dusun`,`k`.`no_kk` AS `no_kk`,(select `tweb_penduduk`.`nama` AS `nama` from `tweb_penduduk` where (`tweb_penduduk`.`id` = `k`.`nik_kepala`)) AS `kepala_kk`,hb.nama AS hubungan from ((((((((`tweb_penduduk` `u` left join `tweb_penduduk_sex` `x` on((`u`.`sex` = `x`.`id`))) left join `tweb_penduduk_kawin` `w` on((`u`.`status_kawin` = `w`.`id`))) left join `tweb_penduduk_agama` `a` on((`u`.`agama_id` = `a`.`id`))) left join `tweb_penduduk_pendidikan_kk` `d` on((`u`.`pendidikan_kk_id` = `d`.`id`))) left join `tweb_penduduk_pekerjaan` `j` on((`u`.`pekerjaan_id` = `j`.`id`))) left join `tweb_wil_clusterdesa` `c` on((`u`.`id_cluster` = `c`.`id`))) left join `tweb_keluarga` `k` on((`u`.`id_kk` = `k`.`id`))) left join `tweb_penduduk_warganegara` `f` on((`u`.`warganegara_id` = `f`.`id`)) LEFT JOIN tweb_penduduk_hubungan hb ON u.kk_level = hb.id ) WHERE u.nik IN($outp)"; + $query = $this->db->query($sql); + $data = $query->result_array(); + } + return $data; + } + function list_pamong(){ + $sql = "SELECT u.* FROM tweb_desa_pamong u WHERE pamong_status=1 "; + $query = $this->db->query($sql); + $data = $query->result_array(); + return $data; + } + function get_data_surat($id=0){ + $sql = "select `u`.*,g.nama AS gol_darah,`x`.`nama` AS `sex`,(select (date_format(from_days((to_days(now()) - to_days(`tweb_penduduk`.`tanggallahir`))),'%Y') + 0) AS `(date_format(from_days((to_days(now()) - to_days(``tweb_penduduk``.``tanggallahir``))),'%Y') + 0)` from `tweb_penduduk` where (`tweb_penduduk`.`id` = `u`.`id`)) AS `umur`,`w`.`nama` AS `status_kawin`,`f`.`nama` AS `warganegara`,`a`.`nama` AS `agama`,`d`.`nama` AS `pendidikan`,`j`.`nama` AS `pekerjaan`,`c`.`rt` AS `rt`,`c`.`rw` AS `rw`,`c`.`dusun` AS `dusun`,`k`.`no_kk` AS `no_kk`,(select `tweb_penduduk`.`nama` AS `nama` from `tweb_penduduk` where (`tweb_penduduk`.`id` = `k`.`nik_kepala`)) AS `kepala_kk` from ((((((((`tweb_penduduk` `u` left join `tweb_penduduk_sex` `x` on((`u`.`sex` = `x`.`id`))) left join `tweb_penduduk_kawin` `w` on((`u`.`status_kawin` = `w`.`id`))) left join `tweb_penduduk_agama` `a` on((`u`.`agama_id` = `a`.`id`))) left join `tweb_penduduk_pendidikan_kk` `d` on((`u`.`pendidikan_kk_id` = `d`.`id`))) left join `tweb_penduduk_pekerjaan` `j` on((`u`.`pekerjaan_id` = `j`.`id`))) left join `tweb_wil_clusterdesa` `c` on((`u`.`id_cluster` = `c`.`id`))) left join `tweb_keluarga` `k` on((`u`.`id_kk` = `k`.`id`))) left join `tweb_penduduk_warganegara` `f` on((`u`.`warganegara_id` = `f`.`id`))) left join tweb_golongan_darah g on u.golongan_darah_id=g.id WHERE u.id = ?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_data_desa(){ + $sql = "SELECT * FROM config WHERE 1"; + $query = $this->db->query($sql); + return $query->row_array(); + } + function get_pamong($id=0){ + $sql = "SELECT u.* FROM tweb_desa_pamong u WHERE pamong_id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_data_pribadi($id=0){ + $sql = "SELECT u.*,h.nama as hubungan, p.nama as kepala_kk,g.nama as gol_darah,d.nama as pend,r.nama as pek,m.nama as men, w.nama as wn, n.nama as agama,c.rw,c.rt,c.dusun,(DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( u.tanggallahir ) ) , '%Y' ) +0) as umur, sex.nama as sex FROM tweb_penduduk u left join tweb_penduduk_hubungan h on u.kk_level=h.id left join tweb_keluarga k on u.id_kk=k.id left join tweb_penduduk p on k.nik_kepala=p.id left join tweb_golongan_darah g on u.golongan_darah_id=g.id left join tweb_penduduk_pendidikan_kk d on u.pendidikan_kk_id=d.id left join tweb_penduduk_pekerjaan r on u.pekerjaan_id=r.id left join tweb_cacat m on u.cacat_id=m.id left join tweb_wil_clusterdesa c on u.id_cluster=c.id left join tweb_penduduk_warganegara w on u.warganegara_id=w.id left join tweb_penduduk_agama n on u.agama_id=n.id LEFT JOIN tweb_penduduk_sex sex ON u.sex=sex.id WHERE u.id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_data_kk($id=0){ + $sql = "SELECT b.nik_kepala, b.no_kk,b.id AS id_kk, c.nama as kepala_kk, d.* FROM tweb_penduduk a LEFT JOIN tweb_keluarga b ON a.id_kk=b.id LEFT JOIN tweb_penduduk c ON b.nik_kepala=c.id LEFT JOIN tweb_wil_clusterdesa d ON c.id_cluster=d.id WHERE a.id=? "; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + + function get_penduduk_ortu($id=0){ + $sql = "SELECT u.* FROM tweb_penduduk u WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_data_istri($id=0){ + $sql = "SELECT u.*,h.nama as hubungan, p.nama as kepala_kk,g.nama as gol_darah,d.nama as pend,r.nama as pek,m.nama as men, w.nama as wn,c.rw,c.rt,c.dusun, n.nama as agama FROM tweb_penduduk u left join tweb_penduduk_hubungan h on u.kk_level=h.id left join tweb_keluarga k on u.id_kk=k.id left join tweb_penduduk p on k.nik_kepala=p.id left join tweb_golongan_darah g on u.golongan_darah_id=g.id left join tweb_penduduk_pendidikan d on u.pendidikan_id=d.id left join tweb_penduduk_pekerjaan r on u.pekerjaan_id=r.id left join tweb_cacat m on u.cacat_id=m.id left join tweb_penduduk_warganegara w on u.warganegara_id=w.id left join tweb_wil_clusterdesa c on u.id_cluster=c.id left join tweb_penduduk_agama n on u.agama_id=n.id WHERE u.id=(SELECT id FROM tweb_penduduk WHERE id_kk=(SELECT id_kk FROM tweb_penduduk WHERE id=$id AND kk_level=1) AND kk_level=3 limit 1)"; + $query = $this->db->query($sql); + $data = $query->row_array(); + return $data; + } + function get_data_suami($id=0){ + $sql = "SELECT u.*,h.nama as hubungan, p.nama as kepala_kk,g.nama as gol_darah,d.nama as pend,r.nama as pek,m.nama as men, w.nama as wn, n.nama as agama,c.rw,c.rt,c.dusun,(DATE_FORMAT( FROM_DAYS( TO_DAYS( NOW( ) ) - TO_DAYS( u.tanggallahir ) ) , '%Y' ) +0) as umur FROM tweb_penduduk u left join tweb_penduduk_hubungan h on u.kk_level=h.id left join tweb_keluarga k on u.id_kk=k.id left join tweb_penduduk p on k.nik_kepala=p.id left join tweb_golongan_darah g on u.golongan_darah_id=g.id left join tweb_penduduk_pendidikan d on u.pendidikan_id=d.id left join tweb_penduduk_pekerjaan r on u.pekerjaan_id=r.id left join tweb_cacat m on u.cacat_id=m.id left join tweb_wil_clusterdesa c on u.id_cluster=c.id left join tweb_penduduk_warganegara w on u.warganegara_id=w.id left join tweb_penduduk_agama n on u.agama_id=n.id WHERE u.id=(SELECT id FROM tweb_penduduk WHERE id_kk=(SELECT id_kk FROM tweb_penduduk WHERE id=$id AND kk_level=3) AND kk_level=1 limit 1 )"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_data_ayah($id=0){ + $sql = "SELECT u.*,h.nama as hubungan, p.nama as kepala_kk,g.nama as gol_darah,d.nama as pend,r.nama as pek,m.nama as men, w.nama as wn,c.rw,c.rt,c.dusun, n.nama as agama FROM tweb_penduduk u left join tweb_penduduk_hubungan h on u.kk_level=h.id left join tweb_keluarga k on u.id_kk=k.id left join tweb_penduduk p on k.nik_kepala=p.id left join tweb_golongan_darah g on u.golongan_darah_id=g.id left join tweb_penduduk_pendidikan d on u.pendidikan_id=d.id left join tweb_penduduk_pekerjaan r on u.pekerjaan_id=r.id left join tweb_cacat m on u.cacat_id=m.id left join tweb_penduduk_warganegara w on u.warganegara_id=w.id left join tweb_wil_clusterdesa c on u.id_cluster=c.id left join tweb_penduduk_agama n on u.agama_id=n.id WHERE u.nik=(SELECT ayah_nik from tweb_penduduk where id='$id') or (u.id_kk=(SELECT id_kk FROM tweb_penduduk where id=$id) AND u.kk_level=1) limit 1"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + + function get_data_ibu($id=0){ + $sql = "SELECT u.*,h.nama as hubungan, p.nama as kepala_kk,g.nama as gol_darah,d.nama as pend,r.nama as pek,m.nama as men, w.nama as wn,c.rw,c.rt,c.dusun, n.nama as agama FROM tweb_penduduk u left join tweb_penduduk_hubungan h on u.kk_level=h.id left join tweb_keluarga k on u.id_kk=k.id left join tweb_penduduk p on k.nik_kepala=p.id left join tweb_golongan_darah g on u.golongan_darah_id=g.id left join tweb_penduduk_pendidikan d on u.pendidikan_id=d.id left join tweb_penduduk_pekerjaan r on u.pekerjaan_id=r.id left join tweb_cacat m on u.cacat_id=m.id left join tweb_penduduk_warganegara w on u.warganegara_id=w.id left join tweb_wil_clusterdesa c on u.id_cluster=c.id left join tweb_penduduk_agama n on u.agama_id=n.id WHERE u.nik=(SELECT ibu_nik from tweb_penduduk where id=$id) or (u.id_kk=(SELECT id_kk FROM tweb_penduduk where id=$id) AND u.kk_level=3) limit 1"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_dusun($dusun=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE dusun = ? AND rt = '0' AND rw = '0'"; + $query = $this->db->query($sql,$dusun); + return $query->row_array(); + } + + function get_rw($dusun='',$rw=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE dusun = ? AND rw = ? AND rt = '0'"; + $query = $this->db->query($sql,array($dusun,$rw)); + return $query->row_array(); + } + function get_rt($dusun='',$rw='',$rt=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE dusun = ? AND rw = ? AND rt = ?"; + $query = $this->db->query($sql,array($dusun,$rw,$rt)); + return $query->row_array(); + } + function get_surat($url=''){ + $sql = "SELECT * FROM tweb_surat_format WHERE url_surat = ?"; + $query = $this->db->query($sql,$url); + return $query->row_array(); + } + + function coba($url=''){ + $g=$_POST['pamong']; + $u=$_SESSION['user']; + $z=$_POST['nomor']; + + $id = $_SESSION['nik']; + $individu = $this->get_data_surat($id); + + $ayah = $_SESSION['nik_ayah']; + $ayah = $this->get_data_surat($ayah); + + $ibu = $_SESSION['nik_ibu']; + $ibu = $this->get_data_surat($ibu); + + $input = $_POST; + $tgl = tgl_indo(date("Y m d")); + $thn = date("Y"); + $config = $this->get_data_desa(); + $surat = $this->get_surat($url); + + $tgllhr = strtoupper(tgl_indo($individu['tanggallahir'])); + $individu['nama'] = strtoupper($individu['nama']); + $individu['tempatlahir'] = strtoupper($individu['tempatlahir']); + + if($individu['rt'][0] != "0" AND $individu['rt'][0] < 10) + $individu['rt'] = "0".$individu['rt']; + + if($individu['rw'][0] != "0" AND $individu['rw'][0] < 10) + $individu['rw'] = "0".$individu['rw']; + + $ayah_tgllhr = strtoupper(tgl_indo($ayah['tanggallahir'])); + $ayah['nama'] = strtoupper($ayah['nama']); + $ayah['tempatlahir'] = strtoupper($ayah['tempatlahir']); + + if($ayah['rt'][0] != "0" AND $ayah['rt'][0] < 10) + $ayah['rt'] = "0".$ayah['rt']; + + if($ayah['rw'][0] != "0" AND $ayah['rw'][0] < 10) + $ayah['rw'] = "0".$ayah['rw']; + + $ibu_tgllhr = strtoupper(tgl_indo($ibu['tanggallahir'])); + $ibu['nama'] = strtoupper($ibu['nama']); + $ibu['tempatlahir'] = strtoupper($ibu['tempatlahir']); + + if($ibu['rt'][0] != "0" AND $ibu['rt'][0] < 10) + $ibu['rt'] = "0".$ibu['rt']; + + if($ibu['rw'][0] != "0" AND $ibu['rw'][0] < 10) + $ibu['rw'] = "0".$ibu['rw']; + + $mypath="surat\\$url\\"; + $mypath_arsip="surat\\arsip\\"; + $path = "".str_replace("\\","/",$mypath); + $path_arsip = "".str_replace("\\","/",$mypath_arsip); + $file = $path."$url.rtf"; + if(is_file($file)){ + $handle = fopen($file,'r'); + $buffer = stream_get_contents($handle); + + + + $buffer=str_replace("[kode_surat]","$surat[kode_surat]",$buffer); + $buffer=str_replace("[judul_surat]",strtoupper("surat ".$surat['nama']),$buffer); + $buffer=str_replace("[JUDUL_SURAT]",strtoupper("surat ".$surat['nama']),$buffer); + $buffer=str_replace("[tgl_surat]","$tgl",$buffer); + $buffer=str_replace("[tahun]","$thn",$buffer); + + $buffer=str_replace("[nomor_surat]","$input[nomor]",$buffer); + $buffer=str_replace("[nomor_sorat]","$input[nomor]",$buffer); + + if($input['berlaku_dari'] == "") + $input['berlaku_dari'] = ".........................."; + + if($input['berlaku_sampai'] == "") + $input['berlaku_sampai'] = "........................"; + + + $buffer=str_replace("[mulai_berlaku]","$input[berlaku_dari]",$buffer); + $buffer=str_replace("[tgl_akhir]","$input[berlaku_sampai]",$buffer); + + + $buffer=str_replace("[jabatan]","$input[jabatan]",$buffer); + $buffer=str_replace("[nama_pamong]","$input[pamong]",$buffer); + $buffer=str_replace("[keterangan]","$input[keterangan]",$buffer); + $buffer=str_replace("[keperluan]","$input[keperluan]",$buffer); + $buffer=str_replace("[tujuan]","$input[tujuan]",$buffer); + + $buffer=str_replace("[kode_desa]","$config[kode_desa]",$buffer); + $buffer=str_replace("[nama_kab]","$config[nama_kabupaten]",$buffer); + $buffer=str_replace("[nama_kec]","$config[nama_kecamatan]",$buffer); + $buffer=str_replace("[nama_des]","$config[nama_desa]",$buffer); + $buffer=str_replace("[NAMA_KAB]",strtoupper($config['nama_kabupaten']),$buffer); + $buffer=str_replace("[NAMA_KEC]",strtoupper($config['nama_kecamatan']),$buffer); + $buffer=str_replace("[NAMA_DES]",strtoupper($config['nama_desa']),$buffer); + $buffer=str_replace("[nama_kepala_camat]","$config[nama_kepala_camat]",$buffer); + $buffer=str_replace("[kades]","$config[nama_kepala_desa]",$buffer); + $buffer=str_replace("[nip_kepala_camat]","$config[nip_kepala_camat]",$buffer); + $buffer=str_replace("[pos]","$config[kode_pos]",$buffer); + $buffer=str_replace("[alamat_des]","$config[alamat_kantor] Pos : $config[kode_pos]",$buffer); + + $buffer=str_replace("[alamat]","RT $individu[rt] / RW $individu[rw] $individu[dusun]",$buffer); + $buffer=str_replace("[rt]","$individu[rt]",$buffer); + $buffer=str_replace("[rw]","$individu[rw]",$buffer); + $buffer=str_replace("[dusun]","$individu[dusun]",$buffer); + $buffer=str_replace("[nama_ayah]","$individu[nama_ayah]",$buffer); + $buffer=str_replace("[nama_ibu]","$individu[nama_ibu]",$buffer); + $buffer=str_replace("[nik_ayah]","$individu[ayah_nik]",$buffer); + $buffer=str_replace("[nik_ibu]","$individu[ibu_nik]",$buffer); + $buffer=str_replace("[nama]","$individu[nama]",$buffer); + $buffer=str_replace("[sex]","$individu[sex]",$buffer); + $buffer=str_replace("[agama]","$individu[agama]",$buffer); + $buffer=str_replace("[status_kawin]","$individu[status_kawin]",$buffer); + $buffer=str_replace("[gol_darah]","$individu[gol_darah]",$buffer); + $buffer=str_replace("[pekerjaan]","$individu[pekerjaan]",$buffer); + $buffer=str_replace("[warga_negara]","$individu[warganegara]",$buffer); + $buffer=str_replace("[no_ktp]","$individu[nik]",$buffer); + $buffer=str_replace("[nik]","$individu[nik]",$buffer); + $buffer=str_replace("*usia","$individu[umur] Tahun",$buffer); + $buffer=str_replace("[usia]","$individu[umur] Tahun",$buffer); + $buffer=str_replace("[no_kk]","$individu[no_kk]",$buffer); + $buffer=str_replace("[ttl]","$individu[tempatlahir]/$tgllhr",$buffer); + + + //PENGIKUT + $pxnama = ""; + $pxnik = ""; + $pxhubungan = ""; + $pxusia = ""; + if(isset($_POST['id_cb'])){ + $pengikut = $this->pengikut(); + $nom = 1; + foreach($pengikut AS $pgkt){ + $pxnama .= $pgkt['nama']."\line \line "; + $pxnik .= $pgkt['nik']."\line \line "; + $pxhubungan .= $pgkt['hubungan']."\line \line "; + $pxusia .= $pgkt['umur']." Thn\line \line "; + $pxtglahir .= $pgkt['tanggallahir']."\line \line "; + $pxtmplahir .= $pgkt['tempatlahir']."\line \line "; + $pxttl .= $pgkt['tempatlahir'].", ".tgl_indo($pgkt['tanggallahir'])."\line "; + $pxttl2 .= $pgkt['tempatlahir'].", ".rev_tgl($pgkt['tanggallahir'])."\line "; + $pxno .= $nom."\line \line "; + + $nom++; + } + + $buffer=str_replace("[px_nama]","$pxnama",$buffer); + $buffer=str_replace("[px_nik]","$pxnik",$buffer); + $buffer=str_replace("[px_hubungan]","$pxhubungan",$buffer); + $buffer=str_replace("[px_usia]","$pxusia",$buffer); + $buffer=str_replace("[px_tempatlahir]","$pxtglahir",$buffer); + $buffer=str_replace("[px_tanggallahir]","$pxtmplahir",$buffer); + $buffer=str_replace("[px_ttl]","$pxttl",$buffer); + $buffer=str_replace("[px_ttl2]","$pxttl2",$buffer); + $buffer=str_replace("[no]","$pxno",$buffer); + + + } + + + + + $buffer=str_replace("[kode_surat]","$surat[kode_surat]",$buffer); + $buffer=str_replace("[judul_surat]",strtoupper("surat ".$surat['nama']),$buffer); + $buffer=str_replace("[JUDUL_SURAT]",strtoupper("surat ".$surat['nama']),$buffer); + $buffer=str_replace("[tgl_surat]","$tgl",$buffer); + $buffer=str_replace("[tahun]","$thn",$buffer); + + + $buffer=str_replace("[nomor_surat]","$input[nomor]",$buffer); + $buffer=str_replace("[nomor_sorat]","$input[nomor]",$buffer); + $buffer=str_replace("[mulai_berlaku]","$input[berlaku_dari]",$buffer); + $buffer=str_replace("[tgl_akhir]","$input[berlaku_sampai]",$buffer); + $buffer=str_replace("[jabatan]","$input[jabatan]",$buffer); + $buffer=str_replace("[nama_pamong]","$input[pamong]",$buffer); + $buffer=str_replace("[keterangan]","$input[keterangan]",$buffer); + $buffer=str_replace("[keperluan]","$input[keperluan]",$buffer); + $buffer=str_replace("[tujuan]","$input[tujuan]",$buffer); + $buffer=str_replace("[hari]","$input[hari]",$buffer); + $buffer=str_replace("[tgl_keg]","$input[tgl_keg]",$buffer); + $buffer=str_replace("[waktu]","$input[waktu]",$buffer); + $buffer=str_replace("[jenis_keg]","$input[jenis_keg]",$buffer); + $buffer=str_replace("[lokasi_keg]","$input[lokasi_keg]",$buffer); + $buffer=str_replace("[bidang_keg]","$input[bidang_keg]",$buffer); + $buffer=str_replace("[alamat_sekarang]","$input[alamat_sekarang]",$buffer); + + + $buffer=str_replace("[kode_desa]","$config[kode_desa]",$buffer); + $buffer=str_replace("[nama_kab]","$config[nama_kabupaten]",$buffer); + $buffer=str_replace("[nama_kec]","$config[nama_kecamatan]",$buffer); + $buffer=str_replace("[nama_des]","$config[nama_desa]",$buffer); + $buffer=str_replace("[NAMA_KAB]",strtoupper($config['nama_kabupaten']),$buffer); + $buffer=str_replace("[NAMA_KEC]",strtoupper($config['nama_kecamatan']),$buffer); + $buffer=str_replace("[NAMA_DES]",strtoupper($config['nama_desa']),$buffer); + $buffer=str_replace("[nama_kepala_camat]","$config[nama_kepala_camat]",$buffer); + $buffer=str_replace("[kades]","$config[nama_kepala_desa]",$buffer); + $buffer=str_replace("[nip_kepala_camat]","$config[nip_kepala_camat]",$buffer); + $buffer=str_replace("[pos]","$config[kode_pos]",$buffer); + $buffer=str_replace("[alamat_des]","$config[alamat_kantor] Pos : $config[kode_pos]",$buffer); + + + + $buffer=str_replace("[alamat]","$individu[dusun] RT $individu[rt] / RW $individu[rw]",$buffer); + $buffer=str_replace("[rt]","$individu[rt]",$buffer); + $buffer=str_replace("[rw]","$individu[rw]",$buffer); + $buffer=str_replace("[dusun]","$individu[dusun]",$buffer); + $buffer=str_replace("[nama_ayah]","$individu[nama_ayah]",$buffer); + $buffer=str_replace("[nama_ibu]","$individu[nama_ibu]",$buffer); + $buffer=str_replace("[nik_ayah]","$individu[ayah_nik]",$buffer); + $buffer=str_replace("[nik_ibu]","$individu[ibu_nik]",$buffer); + $buffer=str_replace("[nama]","$individu[nama]",$buffer); + $buffer=str_replace("[sex]","$individu[sex]",$buffer); + $buffer=str_replace("[agama]","$individu[agama]",$buffer); + $buffer=str_replace("[status_kawin]","$individu[status_kawin]",$buffer); + $buffer=str_replace("[gol_darah]","$individu[gol_darah]",$buffer); + $buffer=str_replace("[pekerjaan]","$individu[pekerjaan]",$buffer); + $buffer=str_replace("[pendidikan]","$individu[pendidikan]",$buffer); + $buffer=str_replace("[warga_negara]","$individu[warganegara]",$buffer); + $buffer=str_replace("[no_ktp]","$individu[nik]",$buffer); + $buffer=str_replace("[hubungan]","$individu[hubungan]",$buffer); + $buffer=str_replace("[nik]","$individu[nik]",$buffer); + $buffer=str_replace("*usia","$individu[umur] Tahun",$buffer); + $buffer=str_replace("[usia]","$individu[umur] Tahun",$buffer); + $buffer=str_replace("[no_kk]","$individu[no_kk]",$buffer); + $buffer=str_replace("[ttl]","$individu[tempatlahir]/$tgllhr",$buffer); + $buffer=str_replace("[nama_lahir]","$input[nama_lahir]",$buffer); + $buffer=str_replace("[nik_lahir]","$input[nik_lahir]",$buffer); + $buffer=str_replace("[nama_mati]","$input[nama_mati]",$buffer); + $buffer=str_replace("[nik_mati]","$input[nik_mati]",$buffer); + $buffer=str_replace("[nama_doc]","$input[nama_doc]",$buffer); + $buffer=str_replace("[dokumen]","$input[dokumen]",$buffer); + $buffer=str_replace("[alamat_nikah]","$input[alamat_nikah]",$buffer); + $buffer=str_replace("[tgl_nikah]","$input[tgl_nikah]",$buffer); + $buffer=str_replace("[nama_wali]","$input[nama_wali]",$buffer); + $buffer=str_replace("[nik_wali]","$input[nik_wali]",$buffer); + $buffer=str_replace("[alamat_wali]","$input[alamat_wali]",$buffer); + $buffer=str_replace("[kelamin_wali]","$input[kelamin_wali]",$buffer); + $buffer=str_replace("[hubungan_wali]","$input[hubungan_wali]",$buffer); + $buffer=str_replace("[agama_wali]","$input[agama_wali]",$buffer); + $buffer=str_replace("[tptlhr_wali]","$input[tptlhr_wali]",$buffer); + $buffer=str_replace("[tgllhr_wali]","$input[tgllhr_wali]",$buffer); + $buffer=str_replace("[pekerjaan_wali]","$input[pekerjaan_wali]",$buffer); + $buffer=str_replace("[sebab_wali]","$input[sebab_wali]",$buffer); + $rp_ayah=Rupiah($input['ayah_penghasilan'])." (".Rpt($input['ayah_penghasilan']).")"; + $rp_ibu=Rupiah($input['ibu_penghasilan'])." (".Rpt($input['ibu_penghasilan']).")"; + + $buffer=str_replace("[ayah_penghasilan]","$rp_ayah",$buffer); + $buffer=str_replace("[ibu_penghasilan]","$rp_ibu",$buffer); + $total = $input['ibu_penghasilan']+$input['ayah_penghasilan']; + + $rpt = Rpt($total); + $total = Rupiah($total); + $buffer=str_replace("[total]","$total",$buffer); + $buffer=str_replace("[rphuruf]","$rpt",$buffer); + + + $buffer=str_replace("[sekolah]","$input[sekolah]",$buffer); + $buffer=str_replace("[jurusan]","$input[jurusan]",$buffer); + $buffer=str_replace("[kelas]","$input[kelas]",$buffer); + + $buffer=str_replace("[ayah_alamat]","$ayah[dusun] RT $ayah[rt] / RW $ayah[rw]",$buffer); + $buffer=str_replace("[ayah_rt]","$ayah[rt]",$buffer); + $buffer=str_replace("[ayah_rw]","$ayah[rw]",$buffer); + $buffer=str_replace("[ayah_dusun]","$ayah[dusun]",$buffer); + $buffer=str_replace("[ayah_nama_ayah]","$ayah[nama_ayah]",$buffer); + $buffer=str_replace("[ayah_nama_ibu]","$ayah[nama_ibu]",$buffer); + $buffer=str_replace("[ayah_nik_ayah]","$ayah[ayah_nik]",$buffer); + $buffer=str_replace("[ayah_nik_ibu]","$ayah[ibu_nik]",$buffer); + $buffer=str_replace("[ayah_nama]","$ayah[nama]",$buffer); + $buffer=str_replace("[ayah_sex]","$ayah[sex]",$buffer); + $buffer=str_replace("[ayah_agama]","$ayah[agama]",$buffer); + $buffer=str_replace("[ayah_status_kawin]","$ayah[status_kawin]",$buffer); + $buffer=str_replace("[ayah_gol_darah]","$ayah[gol_darah]",$buffer); + $buffer=str_replace("[ayah_pekerjaan]","$ayah[pekerjaan]",$buffer); + $buffer=str_replace("[ayah_pendidikan]","$ayah[pendidikan]",$buffer); + $buffer=str_replace("[ayah_warga_negara]","$ayah[warganegara]",$buffer); + $buffer=str_replace("[ayah_no_ktp]","$ayah[nik]",$buffer); + $buffer=str_replace("[ayah_nik]","$ayah[nik]",$buffer); + $buffer=str_replace("*ayah_usia","$ayah[umur] Tahun",$buffer); + $buffer=str_replace("[ayah_usia]","$ayah[umur] Tahun",$buffer); + $buffer=str_replace("[ayah_no_kk]","$ayah[no_kk]",$buffer); + $buffer=str_replace("[ayah_ttl]","$ayah[tempatlahir]/$ayah_tgllhr",$buffer); + + $buffer=str_replace("[ibu_alamat]","$ibu[dusun] RT $ibu[rt] / RW $ibu[rw]",$buffer); + $buffer=str_replace("[ibu_rt]","$ibu[rt]",$buffer); + $buffer=str_replace("[ibu_rw]","$ibu[rw]",$buffer); + $buffer=str_replace("[ibu_dusun]","$ibu[dusun]",$buffer); + $buffer=str_replace("[ibu_nama_ayah]","$ibu[nama_ayah]",$buffer); + $buffer=str_replace("[ibu_nama_ibu]","$ibu[nama_ibu]",$buffer); + $buffer=str_replace("[ibu_nik_ayah]","$ibu[ibu_nik]",$buffer); + $buffer=str_replace("[ibu_nik_ibu]","$ibu[ibu_nik]",$buffer); + $buffer=str_replace("[ibu_nama]","$ibu[nama]",$buffer); + $buffer=str_replace("[ibu_sex]","$ibu[sex]",$buffer); + $buffer=str_replace("[ibu_agama]","$ibu[agama]",$buffer); + $buffer=str_replace("[ibu_status_kawin]","$ibu[status_kawin]",$buffer); + $buffer=str_replace("[ibu_gol_darah]","$ibu[gol_darah]",$buffer); + $buffer=str_replace("[ibu_pekerjaan]","$ibu[pekerjaan]",$buffer); + $buffer=str_replace("[ibu_pendidikan]","$ibu[pendidikan]",$buffer); + $buffer=str_replace("[ibu_warga_negara]","$ibu[warganegara]",$buffer); + $buffer=str_replace("[ibu_no_ktp]","$ibu[nik]",$buffer); + $buffer=str_replace("[ibu_nik]","$ibu[nik]",$buffer); + $buffer=str_replace("*ibu_usia","$ibu[umur] Tahun",$buffer); + $buffer=str_replace("[ibu_usia]","$ibu[umur] Tahun",$buffer); + $buffer=str_replace("[ibu_no_kk]","$ibu[no_kk]",$buffer); + $buffer=str_replace("[ibu_ttl]","$ibu[tempatlahir]/$ibu_tgllhr",$buffer); + + $buffer=str_replace("[kua]","$input[kua]",$buffer); + $buffer=str_replace("[nomor_nikah]","$input[nomor_nikah]",$buffer); + + $buffer=str_replace("[hari_lahir]","$input[hari_lahir]",$buffer); + $buffer=str_replace("[tgl_lahir]","$input[tgl_lahir]",$buffer); + $buffer=str_replace("[jam_lahir]","$input[jam_lahir]",$buffer); + $buffer=str_replace("[tpt_lahir]","$input[tpt_lahir]",$buffer); + $buffer=str_replace("[sex_lahir]","$input[sex_lahir]",$buffer); + $buffer=str_replace("[hub_lapor]","$input[hub_lapor]",$buffer); + + + $buffer=str_replace("[hari_mati]","$input[hari_mati]",$buffer); + $buffer=str_replace("[tgl_mati]","$input[tgl_mati]",$buffer); + $buffer=str_replace("[jam_mati]","$input[jam_mati]",$buffer); + $buffer=str_replace("[tpt_mati]","$input[tpt_mati]",$buffer); + $buffer=str_replace("[sebab_mati]","$input[sebab_mati]",$buffer); + + $buffer=str_replace("[nama_baru1]","$input[nama_baru1]",$buffer); + $buffer=str_replace("[tpt_baru1]","$input[tpt_baru1]",$buffer); + $buffer=str_replace("[tgl_baru1]","$input[tgl_baru1]",$buffer); + $buffer=str_replace("[hubkel_baru1]","$input[hubkel_baru1]",$buffer); + $buffer=str_replace("[nama_baru2]","$input[nama_baru2]",$buffer); + $buffer=str_replace("[tpt_baru2]","$input[tpt_baru2]",$buffer); + $buffer=str_replace("[tgl_baru2]","$input[tgl_baru2]",$buffer); + $buffer=str_replace("[hubkel_baru2]","$input[hubkel_baru2]",$buffer); + $buffer=str_replace("[nama_baru3]","$input[nama_baru3]",$buffer); + $buffer=str_replace("[tpt_baru3]","$input[tpt_baru3]",$buffer); + $buffer=str_replace("[tgl_baru3]","$input[tgl_baru3]",$buffer); + $buffer=str_replace("[hubkel_baru3]","$input[hubkel_baru3]",$buffer); + $buffer=str_replace("[nama_baru4]","$input[nama_baru4]",$buffer); + $buffer=str_replace("[tpt_baru4]","$input[tpt_baru4]",$buffer); + $buffer=str_replace("[tgl_baru4]","$input[tgl_baru4]",$buffer); + $buffer=str_replace("[hubkel_baru4]","$input[hubkel_baru4]",$buffer); + $buffer=str_replace("[nama_baru5]","$input[nama_baru5]",$buffer); + $buffer=str_replace("[tpt_baru5]","$input[tpt_baru5]",$buffer); + $buffer=str_replace("[tgl_baru5]","$input[tgl_baru5]",$buffer); + $buffer=str_replace("[hubkel_baru5]","$input[hubkel_baru5]",$buffer); + $buffer=str_replace("[nama_baru6]","$input[nama_baru6]",$buffer); + $buffer=str_replace("[tpt_baru6]","$input[tpt_baru6]",$buffer); + $buffer=str_replace("[tgl_baru6]","$input[tgl_baru6]",$buffer); + $buffer=str_replace("[hubkel_baru6]","$input[hubkel_baru6]",$buffer); + $buffer=str_replace("[saksi_baru1]","$input[saksi_baru1]",$buffer); + $buffer=str_replace("[saksi_baru2]","$input[saksi_baru2]",$buffer); + + $buffer=str_replace("[pria_status]","$input[pria_status]",$buffer); + $buffer=str_replace("[wanita_status]","$input[wanita_status]",$buffer); + $buffer=str_replace("[istri_lama]","$input[istri_lama]",$buffer); + $buffer=str_replace("[nama_calon]","$input[nama_calon]",$buffer); + $buffer=str_replace("[binti]","$input[binti]",$buffer); + $buffer=str_replace("[alamat_calon]","$input[alamat_calon]",$buffer); + $buffer=str_replace("[tpt_lahir_calon]","$input[tpt_lahir_calon]",$buffer); + $buffer=str_replace("[tgl_lahir_calon]","$input[tgl_lahir_calon]",$buffer); + $buffer=str_replace("[warga_negara_calon]","$input[warga_negara_calon]",$buffer); + $buffer=str_replace("[agama_calon]","$input[agama_calon]",$buffer); + $buffer=str_replace("[kerja_calon]","$input[kerja_calon]",$buffer); + $buffer=str_replace("[hari_nikah]","$input[hari_nikah]",$buffer); + $buffer=str_replace("[tgl_nikah]","$input[tgl_nikah]",$buffer); + $buffer=str_replace("[jam_nikah]","$input[jam_nikah]",$buffer); + $buffer=str_replace("[tpt_nikah]","$input[tpt_nikah]",$buffer); + $buffer=str_replace("[mahar_nikah]","$input[mahar_nikah]",$buffer); + + $buffer=str_replace("[kartu_beda]","$input[kartu_beda]",$buffer); + $buffer=str_replace("[identitas_beda]","$input[identitas_beda]",$buffer); + $buffer=str_replace("[nama_beda]","$input[nama_beda]",$buffer); + $buffer=str_replace("[tempatlahir]","$input[tempatlahir]",$buffer); + $buffer=str_replace("[tgllahir]","$input[tgllahir]",$buffer); + + foreach ($input as $key => $entry){ + $buffer=str_replace("[$key]",$entry,$buffer); + } + + $berkas_arsip = $path_arsip.$url."_".$individu['nik']."_".date("Y-m-d").".rtf"; + $handle = fopen($berkas_arsip,'w+'); + fwrite($handle,$buffer); + fclose($handle); + $_SESSION['success']=8; + header("location:".base_url($berkas_arsip)); + } + + } +} \ No newline at end of file diff --git a/app/models/User_model.php b/app/models/User_model.php new file mode 100644 index 000000000..2d666a557 --- /dev/null +++ b/app/models/User_model.php @@ -0,0 +1,429 @@ +input->post('username'); + $password = hash_password($this->input->post('password')); + + $sql = "SELECT id,password,id_grup,session FROM user WHERE username=?"; + $query=$this->db->query($sql,array($username)); + $row=$query->row(); + if($row){ + if($password==$row->password){ + $this->reset_timer(); + $data['session'] = hash_password(time().$password); + $this->db->where('id',$row->id); + $this->db->update('user',$data); + + $_SESSION['siteman'] = 1; + $_SESSION['sesi'] = $data['session']; + //$_SESSION['sesi'] = $row->session; + $_SESSION['user'] = $row->id; + $_SESSION['grup'] = $row->id_grup; + $_SESSION['per_page'] = 10; + } + else{ + $_SESSION['siteman']=-1; + } + }else{ + $_SESSION['siteman']=-1; + } + } + function sesi_grup($sesi=''){ + + $sql = "SELECT id_grup FROM user WHERE session=? AND session <> ''"; + $query=$this->db->query($sql,array($sesi)); + $row=$query->row_array(); + if($this->cek_login()){ + if(isset($row['id_grup'])){ + return $row['id_grup']; + } + }else{ + $_SESSION['siteman'] = -2; + $this->logout(); + return null; + } + } + //time out + function reset_timer(){ + $time=3600; //15menit + $_SESSION['timeout']=time()+$time; + } + function cek_login(){ + $timeout=$_SESSION['timeout']; + if(time()<$timeout){ + $this->reset_timer(); + return true; + }else{ + unset($_SESSION['timeout']); + return false; + } + } + function login(){ + $username = $this->input->post('username'); + $password = hash_password($this->input->post('password')); + + $sql = "SELECT id,password,id_grup,session FROM user WHERE id_grup=1 LIMIT 1"; + $query=$this->db->query($sql); + $row=$query->row(); + + if($password!=$row->password){ + $_SESSION['siteman'] = 1; + $_SESSION['sesi'] = $row->session; + $_SESSION['user'] = $row->id; + $_SESSION['grup'] = $row->id_grup; + $_SESSION['per_page'] = 10; + } + else{ + $_SESSION['siteman']=-1; + } + } + function logout(){ + if(isset($_SESSION['user'])){ + $id = $_SESSION['user']; + $sql = "UPDATE user SET last_login=NOW(),session='' WHERE id=?"; + $this->db->query($sql, $id); + } + + $sql = "SELECT (SELECT COUNT(id) FROM tweb_penduduk WHERE status_dasar =1) AS pend,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_dasar =1 AND sex =1) AS lk,(SELECT COUNT(id) FROM tweb_penduduk WHERE status_dasar =1 AND sex =2) AS pr,(SELECT COUNT(id) FROM tweb_keluarga) AS kk"; + $query = $this->db->query($sql); + $data=$query->row_array(); + + $bln=date("m"); + $thn=date("Y"); + + $sql = "SELECT * FROM log_bulanan WHERE month(tgl) = $bln AND year(tgl) = $thn"; + $query = $this->db->query($sql); + $ada = $query->result_array(); + + if(!$ada){ + $this->db->insert('log_bulanan',$data); + }else{ + + $sql = "UPDATE log_bulanan SET pend=$data[pend], lk = $data[lk],pr=$data[pr],kk = $data[kk] WHERE month(tgl) = $bln AND year(tgl) = $thn"; + $this->db->query($sql); + } + + unset($_SESSION['user']); + unset($_SESSION['sesi']); + unset($_SESSION['cari']); + unset($_SESSION['filter']); + + } + function autocomplete(){ + $sql = "SELECT username FROM user + UNION SELECT nama FROM user"; + $query = $this->db->query($sql); + $data = $query->result_array(); + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (u.username LIKE '$kw' OR u.nama LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND u.id_grup = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM user u WHERE 1"; + $sql .= $this->search_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + + switch($o){ + case 1: $order_sql = ' ORDER BY u.username'; break; + case 2: $order_sql = ' ORDER BY u.username DESC'; break; + case 3: $order_sql = ' ORDER BY u.nama'; break; + case 4: $order_sql = ' ORDER BY u.nama DESC'; break; + case 5: $order_sql = ' ORDER BY g.nama'; break; + case 6: $order_sql = ' ORDER BY g.nama DESC'; break; + default:$order_sql = ' ORDER BY u.username'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + $sql = "SELECT u.*,g.nama as grup + FROM user u, user_grup g + WHERE u.id_grup = g.id"; + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + $i=0; + $j=$offset; + while($iinput->post('old_foto'); + if (!empty($lokasi_file)){ + if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ + $_SESSION['success']=-1; + } else { + UploadFoto($nama_file,$old_foto); + $data['foto'] = $nama_file; + } + } + + $data['session'] = hash_password(now()); + + $outp = $this->db->insert('user',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + unset($data['old_foto']); + unset($data['foto']); + $lokasi_file = $_FILES['foto']['tmp_name']; + $tipe_file = $_FILES['foto']['type']; + $nama_file = $_FILES['foto']['name']; + $old_foto = $this->input->post('old_foto'); + if (!empty($lokasi_file)){ + if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ + $_SESSION['success']=-1; + } else { + UploadFoto($nama_file,$old_foto); + $data['foto'] = $nama_file; + } + } + + if($data['password']=='radiisi'){ + unset($data['password']); + $this->db->where('id',$id); + $outp = $this->db->update('user',$data); + } + else{ + $data['password'] = hash_password($data['password']); + $this->db->where('id',$id); + $outp = $this->db->update('user',$data); + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM user WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM user WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function user_lock($id='',$val=0){ + + $sql = "UPDATE user SET active=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_user($id=0){ + $sql = "SELECT * FROM user WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + + + $data['password'] = 'radiisi'; + return $data; + } + function get_user2($user=''){ + $sql = "SELECT id,nama,username FROM user WHERE username=?"; + $query = $this->db->query($sql,$user); + return $query->row_array(); + } + + function update_setting($id=0){ + $password = hash_password($this->input->post('pass_lama')); + $pass_baru = $this->input->post('pass_baru'); + $pass_baru1 = $this->input->post('pass_baru1'); + $nama = $this->input->post('nama'); + + $data = $_POST; + unset($data['old_foto']); + unset($data['foto']); + $lokasi_file = $_FILES['foto']['tmp_name']; + $tipe_file = $_FILES['foto']['type']; + $nama_file = $_FILES['foto']['name']; + $old_foto = $this->input->post('old_foto'); + if (!empty($lokasi_file)){ + if ($tipe_file != "image/jpeg" AND $tipe_file != "image/pjpeg" AND $tipe_file != "image/png"){ + $_SESSION['success']=-1; + } else { + UploadFoto($nama_file,$old_foto); + $data['foto'] = $nama_file; + } + } + $sql = "UPDATE user SET foto = '$nama_file' WHERE id=?"; + $this->db->query($sql,array($id)); + + $sql = "SELECT password,id_grup,session FROM user WHERE id=?"; + $query=$this->db->query($sql,array($id)); + $row=$query->row(); + + if($password==$row->password){ + if($pass_baru !=""){ + if($pass_baru == $pass_baru1){ + $pass_baru = hash_password($pass_baru); + $sql = "UPDATE user SET password=? WHERE id=?"; + $outp = $this->db->query($sql,array($pass_baru,$id)); + } + } + } + + $sql = "UPDATE user SET nama=? WHERE id=?"; + $outp = $this->db->query($sql,array($nama,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_grup(){ + $sql = "SELECT * FROM user_grup"; + $query = $this->db->query($sql); + return $query->result_array(); + } + function sid_online(){ + $q=$_GET["q"]; + $q="sid.web.id"; + $input=""; + exec("ping -n 1 -w 1 $q", $input, $result); + if ($result == 0) + return true; + else return false; + + } + function create_xml(){ + $sql = "SELECT * FROM config WHERE 1"; + $query = $this->db->query($sql); + $desa = $query->row_array(); + $nl="\r\n"; + $string = ""; + + $string .= "".$nl; + $string .= "".$desa['nama_desa']."".$nl; + $string .= "".$desa['kode_kabupaten'].$desa['kode_kecamatan'].$desa['kode_desa']."".$nl; + $string .= "".$desa['lat']."".$nl; + $string .= "".$desa['lng']."".$nl; + + $string .= "".$nl.$nl; + + $sql = "SELECT DISTINCT(dusun) FROM tweb_wil_clusterdesa"; + $query = $this->db->query($sql); + $wilayah = $query->result_array(); + + $string .= "".$nl; + foreach($wilayah AS $wil){ + + $string .= "".$wil['dusun']."".$nl; + + } + + $string .= "".$nl.$nl; + + $sql = "SELECT * FROM data_surat"; + $query = $this->db->query($sql); + $penduduk = $query->result_array(); + + $string .= "".$nl; + foreach($penduduk AS $pend){ + + $string .= "".$nl; + $string .= "".$pend['nik']."".$nl; + $string .= "".$pend['nama']."".$nl; + $string .= "".$pend['pekerjaan']."".$nl; + $string .= "".$nl; + + } + + $string .= "".$nl.$nl; + + + $mypath="assets\\sync\\"; + $path = "".str_replace("\\","/",$mypath)."/"; + + $ccyymmdd = date("Y-m-d"); + $handle = fopen($path."sycn_data_".$ccyymmdd.".xml",'w+'); + fwrite($handle,$string); + fclose($handle); + + + + + } + function send_data(){ + + + $ip = "127.0.0.1"; + $Connect = fsockopen($ip,"80",$errno,$errstr,1); + if($Connect){ + $soap_request="$key$p[id]"; + fputs($Connect, "POST /iWsService HTTP/1.0".$newLine); + fputs($Connect, "Content-Type: text/xml".$newLine); + fputs($Connect, "Content-Length: ".strlen($soap_request).$newLine.$newLine); + fputs($Connect, $soap_request.$newLine); + $buffer=""; + while($Response=fgets($Connect, 8192)){ + $buffer.=$Response; + } + echo $buffer; + } + } +} +?> \ No newline at end of file diff --git a/app/models/Web_artikel_model.php b/app/models/Web_artikel_model.php new file mode 100644 index 000000000..52bff82d9 --- /dev/null +++ b/app/models/Web_artikel_model.php @@ -0,0 +1,402 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (judul LIKE '$kw' OR isi LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND a.enabled = $kf"; + return $filter_sql; + } + } + function grup_sql(){ + if($_SESSION['grup'] == 4){ + $kf = $_SESSION['user']; + $filter_sql= " AND a.id_user = $kf"; + return $filter_sql; + } + } + function paging($cat=0,$p=1,$o=0){ + $sql = "SELECT COUNT(a.id) AS id FROM artikel a WHERE a.id_kategori = ?"; + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $query = $this->db->query($sql,$cat); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($cat=0,$o=0,$offset=0,$limit=500){ + switch($o){ + case 1: $order_sql = ' ORDER BY judul'; break; + case 2: $order_sql = ' ORDER BY judul DESC'; break; + case 3: $order_sql = ' ORDER BY enabled'; break; + case 4: $order_sql = ' ORDER BY enabled DESC'; break; + case 5: $order_sql = ' ORDER BY tgl_upload'; break; + case 6: $order_sql = ' ORDER BY tgl_upload DESC'; break; + default:$order_sql = ' ORDER BY id DESC'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT a.*,k.kategori AS kategori FROM artikel a LEFT JOIN kategori k ON a.id_kategori = k.id WHERE id_kategori = ? "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $this->grup_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql,$cat); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($idb->query($sql); + return $query->result_array(); + } + function get_kategori($cat=0){ + $sql = "SELECT kategori FROM kategori WHERE id=?"; + $query = $this->db->query($sql,$cat); + return $query->row_array(); + } + function insert($cat=1){ + $fp = time(); + $lokasi_file = $_FILES['gambar']['tmp_name']; + $tipe_file = $_FILES['gambar']['type']; + $nama_file = $_FILES['gambar']['name']; + if (!empty($lokasi_file)){ + if ($tipe_file == "image/jpeg" OR $tipe_file == "image/pjpeg"){ + UploadArtikel($nama_file,"gambar",$fp); + } + } + $lokasi_file1 = $_FILES['gambar1']['tmp_name']; + $tipe_file1 = $_FILES['gambar1']['type']; + $nama_file1 = $_FILES['gambar1']['name']; + if (!empty($lokasi_file1)){ + if ($tipe_file1 == "image/jpeg" OR $tipe_file1 == "image/pjpeg"){ + UploadArtikel($nama_file1,"gambar1",$fp); + } + } + $lokasi_file2 = $_FILES['gambar2']['tmp_name']; + $tipe_file2 = $_FILES['gambar2']['type']; + $nama_file2 = $_FILES['gambar2']['name']; + if (!empty($lokasi_file2)){ + if ($tipe_file2 == "image/jpeg" OR $tipe_file2 == "image/pjpeg"){ + UploadArtikel($nama_file2,"gambar2",$fp); + } + } + $lokasi_file3 = $_FILES['gambar3']['tmp_name']; + $tipe_file3 = $_FILES['gambar3']['type']; + $nama_file3 = $_FILES['gambar3']['name']; + if (!empty($lokasi_file3)){ + if ($tipe_file3 == "image/jpeg" OR $tipe_file3 == "image/pjpeg"){ + UploadArtikel($nama_file3,"gambar3",$fp); + } + } + $data = $_POST; + $data['id_kategori'] = $cat; + $data['id_user'] = $_SESSION['user']; + $data['gambar'] = $fp.$nama_file; + $data['gambar1'] = $fp.$nama_file1; + $data['gambar2'] = $fp.$nama_file2; + $data['gambar3'] = $fp.$nama_file3; + + if($_SESSION['grup'] == 4){ + $data['enabled'] = 2; + } + + + + $lokasi_file = $_FILES['dokumen']['tmp_name']; + $tipe_file = $_FILES['dokumen']['type']; + $nama_file = $_FILES['dokumen']['name']; + + if($nama_file) + $data['dokumen']=$nama_file; + + if($data['link_dokumen']=='') + $data['link_dokumen']= $data['judul']; + + if (!empty($lokasi_file)){ + UploadDocument2($nama_file); + } + $data['isi'] = str_replace("","
    ",$data['isi']); + $outp = $this->db->insert('artikel',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + $fp = time(); + + $lokasi_file = $_FILES['gambar']['tmp_name']; + $tipe_file = $_FILES['gambar']['type']; + $nama_file = $_FILES['gambar']['name']; + if (!empty($lokasi_file)){ + if ($tipe_file == "image/jpeg" OR $tipe_file == "image/pjpeg"){ + UploadArtikel($nama_file,"gambar",$fp); + $data['gambar'] = $fp.$nama_file; + } + }else{unset($data['gambar']);} + + $lokasi_file1 = $_FILES['gambar1']['tmp_name']; + $tipe_file1 = $_FILES['gambar1']['type']; + $nama_file1 = $_FILES['gambar1']['name']; + if (!empty($lokasi_file1)){ + if ($tipe_file1 == "image/jpeg" OR $tipe_file1 == "image/pjpeg"){ + UploadArtikel($nama_file1,"gambar1",$fp); + $data['gambar1'] = $fp.$nama_file1; + } + }else{unset($data['gambar1']);} + $lokasi_file2 = $_FILES['gambar2']['tmp_name']; + $tipe_file2 = $_FILES['gambar2']['type']; + $nama_file2 = $_FILES['gambar2']['name']; + if (!empty($lokasi_file2)){ + if ($tipe_file2 == "image/jpeg" OR $tipe_file2 == "image/pjpeg"){ + UploadArtikel($nama_file2,"gambar2",$fp); + $data['gambar2'] = $fp.$nama_file2; + } + }else{unset($data['gambar2']);} + $lokasi_file3 = $_FILES['gambar3']['tmp_name']; + $tipe_file3 = $_FILES['gambar3']['type']; + $nama_file3 = $_FILES['gambar3']['name']; + if(!empty($lokasi_file3)){ + if ($tipe_file3 == "image/jpeg" OR $tipe_file3 == "image/pjpeg"){ + UploadArtikel($nama_file3,"gambar3",$fp); + $data['gambar3'] = $fp.$nama_file3; + } + }else{unset($data['gambar3']);} + $lokasi_file = $_FILES['dokumen']['tmp_name']; + $tipe_file = $_FILES['dokumen']['type']; + $nama_file = $_FILES['dokumen']['name']; + + if($nama_file) + $data['dokumen']=$nama_file; + + if($data['link_dokumen']=='') + $data['link_dokumen']= $data['judul']; + + if (!empty($lokasi_file)){ + UploadDocument2($nama_file); + } + + if(isset($data['gambar_hapus'])){ + HapusArtikel($data['gambar_hapus']); + $data['gambar'] = ""; + unset($data['gambar_hapus']); + } + + if(isset($data['gambar1_hapus'])){ + HapusArtikel($data['gambar1_hapus']); + $data['gambar1'] = ""; + unset($data['gambar1_hapus']); + } + + if(isset($data['gambar2_hapus'])){ + HapusArtikel($data['gambar2_hapus']); + $data['gambar2'] = ""; + unset($data['gambar2_hapus']); + } + + if(isset($data['gambar3_hapus'])){ + HapusArtikel($data['gambar3_hapus']); + $data['gambar3'] = ""; + unset($data['gambar3_hapus']); + } + + + $data['isi'] = str_replace("
    ","
    ",$data['isi']); + $this->db->where('id',$id); + $outp = $this->db->update('artikel',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM artikel WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function hapus($id=''){ + $sql = "DELETE FROM kategori WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM artikel WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function artikel_lock($id='',$val=0){ + + $sql = "UPDATE artikel SET enabled=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_artikel($id=0){ + $sql = "SELECT a.*,u.nama AS owner FROM artikel a LEFT JOIN user u ON a.id_user = u.id WHERE a.id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + + + + + return $data; + } + + function get_headline(){ + $sql = "SELECT a.*,u.nama AS owner FROM artikel a LEFT JOIN user u ON a.id_user = u.id WHERE headline = 1 ORDER BY tgl_upload DESC LIMIT 1 "; + $query = $this->db->query($sql); + $data = $query->row_array(); + + if(empty($data)) + $data = null; + else{ + $id = $data['id']; + + $panjang=str_split($data['isi'],300); + $data['isi'] = "Baca Selengkapnya"; + } + + return $data; + } + function artikel_show(){ + $sql = "SELECT a.*,u.nama AS owner,k.kategori AS kategori FROM artikel a LEFT JOIN user u ON a.id_user = u.id LEFT JOIN kategori k ON a.id_kategori = k.id WHERE a.enabled=? AND k.tipe = 1 ORDER BY a.tgl_upload DESC LIMIT 4"; + $query = $this->db->query($sql,1); + $data = $query->result_array(); + + $i=0; + while($iBaca Selengkapnya"; + $i++; + } + return $data; + } + function insert_kategori(){ + $data['kategori'] = $_POST['kategori']; + $data['tipe'] = '2'; + $outp = $this->db->insert('kategori',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function insert_comment($id=0){ + $data = $_POST; + $data['enabled'] = 2; + $data['id_artikel'] = $id; + $outp = $this->db->insert('komentar',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_komentar($id=0){ + $sql = "SELECT * FROM komentar WHERE id_artikel = ? ORDER BY tgl_upload DESC"; + $query = $this->db->query($sql,$id); + $data = $query->result_array(); + + $i=0; + while($idb->query($sql1); + + $sql = "UPDATE artikel SET headline = 1 WHERE id=?"; + $outp = $this->db->query($sql,$id); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function slide($id=0){ + $sql = "SELECT * FROM artikel WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + + if($data['headline']=='3'){ + $sql = "UPDATE artikel SET headline = 0 WHERE id=?"; + $outp = $this->db->query($sql,$id); + }else{ + $sql = "UPDATE artikel SET headline = 3 WHERE id=?"; + $outp = $this->db->query($sql,$id); + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } +} \ No newline at end of file diff --git a/app/models/Web_dokumen_model.php b/app/models/Web_dokumen_model.php new file mode 100644 index 000000000..8674cb888 --- /dev/null +++ b/app/models/Web_dokumen_model.php @@ -0,0 +1,166 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (satuan LIKE '$kw' OR nama LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND enabled = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM dokumen WHERE id_pend = 0 "; + $sql .= $this->search_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + switch($o){ + case 1: $order_sql = ' ORDER BY nama'; break; + case 2: $order_sql = ' ORDER BY nama DESC'; break; + case 3: $order_sql = ' ORDER BY enabled'; break; + case 4: $order_sql = ' ORDER BY enabled DESC'; break; + case 5: $order_sql = ' ORDER BY tgl_upload'; break; + case 6: $order_sql = ' ORDER BY tgl_upload DESC'; break; + default:$order_sql = ' ORDER BY id'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT * FROM dokumen WHERE id_pend = 0 "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data = null; + if($query) + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($idb->insert('dokumen',$data); + if($outp) $_SESSION['success']=1; + } else { + $_SESSION['success']=-1; + } + } + function update($id=0){ + $data = $_POST; + $lokasi_file = $_FILES['satuan']['tmp_name']; + $nama_file = $_FILES['satuan']['name']; + $old_file = $data['old_file']; + if (!empty($lokasi_file)){ + UploadDocument($nama_file,$old_file); + unset($data['old_file']); + } else { + $_SESSION['success']=-1; + $nama_file = $data['old_file']; + } + $data['satuan'] = underscore($nama_file); + $this->db->where('id',$id); + $outp = $this->db->update('dokumen',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM dokumen WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM dokumen WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function dokumen_lock($id='',$val=0){ + + $sql = "UPDATE dokumen SET enabled=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_dokumen($id=0){ + $sql = "SELECT * FROM dokumen WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function dokumen_show(){ + $sql = "SELECT * FROM dokumen WHERE enabled=?"; + $query = $this->db->query($sql,1); + $data = $query->result_array(); + return $data; + } +} +?> \ No newline at end of file diff --git a/app/models/Web_gallery_model.php b/app/models/Web_gallery_model.php new file mode 100644 index 000000000..84bbf8de3 --- /dev/null +++ b/app/models/Web_gallery_model.php @@ -0,0 +1,272 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (gambar LIKE '$kw' OR nama LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND enabled = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM gambar_gallery WHERE tipe = 0 "; + $sql .= $this->search_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + switch($o){ + case 1: $order_sql = ' ORDER BY nama'; break; + case 2: $order_sql = ' ORDER BY nama DESC'; break; + case 3: $order_sql = ' ORDER BY enabled'; break; + case 4: $order_sql = ' ORDER BY enabled DESC'; break; + case 5: $order_sql = ' ORDER BY tgl_upload'; break; + case 6: $order_sql = ' ORDER BY tgl_upload DESC'; break; + default:$order_sql = ' ORDER BY id'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT * FROM gambar_gallery WHERE tipe = 0 "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($idb->insert('gambar_gallery',$data); + if($outp) $_SESSION['success']=1; + } else { + $_SESSION['success']=-1; + } + } + } + function update($id=0){ + $x = $_POST; + $lokasi_file = $_FILES['gambar']['tmp_name']; + $tipe_file = $_FILES['gambar']['type']; + $nama_file = $_FILES['gambar']['name']; + $old_gambar = $x['old_gambar']; + if (!empty($lokasi_file)){ + if ($tipe_file == "image/jpeg" OR $tipe_file == "image/pjpeg"){ + UploadGallery($nama_file,$old_gambar); + unset($x['old_gambar']); + }} else { + $_SESSION['success']=-1; + $nama_file = $x['old_gambar']; + + } + + $data['gambar'] = $nama_file; + $data['nama'] = $_POST['nama']; + $this->db->where('id',$id); + $outp = $this->db->update('gambar_gallery',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM gambar_gallery WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + $sql = "DELETE FROM gambar_gallery WHERE parrent=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM gambar_gallery WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + $sql = "DELETE FROM gambar_gallery WHERE parrent=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function gallery_lock($id='',$val=0){ + + $sql = "UPDATE gambar_gallery SET enabled=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_gallery($id=0){ + $sql = "SELECT * FROM gambar_gallery WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function gallery_show(){ + $sql = "SELECT * FROM gambar_gallery WHERE enabled=?"; + $query = $this->db->query($sql,1); + $data = $query->result_array(); + return $data; + } + function paging2($gal=0,$p=1){ + $sql = "SELECT COUNT(id) AS id FROM gambar_gallery WHERE parrent = ? AND tipe = 2 "; + $sql .= $this->search_sql(); + $query = $this->db->query($sql,$gal); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_sub_gallery($gal=1,$offset=0,$limit=500){ + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + $sql = "SELECT * FROM gambar_gallery WHERE parrent = ? AND tipe = 2 "; + + $sql .= $paging_sql; + $query = $this->db->query($sql,$gal); + $data=$query->result_array(); + + $i=0; + while($idb->insert('gambar_gallery',$data); + if($outp) $_SESSION['success']=1; + } else { + $_SESSION['success']=-1; + } + }else{ + $data = $_POST; + unset($data['gambar']); + $data['parrent'] = $parrent; + $data['tipe'] = 2; + $outp = $this->db->insert('gambar_gallery',$data); +} + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update_sub_gallery($id=0){ + $x = $_POST; + $lokasi_file = $_FILES['gambar']['tmp_name']; + $tipe_file = $_FILES['gambar']['type']; + $nama_file = $_FILES['gambar']['name']; + $old_gambar = $x['old_gambar']; + if (!empty($nama_file)){ + if ($tipe_file == "image/jpeg" OR $tipe_file == "image/pjpeg"){ + UploadGallery($nama_file,$old_gambar); + unset($x['old_gambar']); + }} else { + $_SESSION['success']=-1; + $nama_file = $x['old_gambar']; + + } + + $data['gambar'] = $nama_file; + $data['nama'] = $_POST['nama']; + $this->db->where('id',$id); + $outp = $this->db->update('gambar_gallery',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } +} +?> \ No newline at end of file diff --git a/app/models/Web_kategori_model.php b/app/models/Web_kategori_model.php new file mode 100644 index 000000000..3212e425d --- /dev/null +++ b/app/models/Web_kategori_model.php @@ -0,0 +1,291 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (kategori LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND enabled = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM kategori WHERE parrent = 0"; + $sql .= $this->search_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + switch($o){ + case 1: $order_sql = ' ORDER BY kategori'; break; + case 2: $order_sql = ' ORDER BY kategori DESC'; break; + case 3: $order_sql = ' ORDER BY enabled'; break; + case 4: $order_sql = ' ORDER BY enabled DESC'; break; + default:$order_sql = ' ORDER BY id'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + $sql = "SELECT k.*,k.kategori AS kategori FROM kategori k WHERE parrent = 0"; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($idb->insert('kategori',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + + } + function update($id=0){ + $data = $_POST; + $this->db->where('id',$id); + $outp = $this->db->update('kategori',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM kategori WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM kategori WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function list_sub_kategori($kategori=1){ + $sql = "SELECT * FROM kategori WHERE parrent = ? "; + + $query = $this->db->query($sql,$kategori); + $data=$query->result_array(); + + $i=0; + while($idb->query($sql); + $data=$query->result_array(); + + $i=0; + while($idb->query($sql); + $data=$query->result_array(); + + $i=0; + while($idb->insert('kategori',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update_sub_kategori($id=0){ + $data = $_POST; + + $this->db->where('id',$id); + $outp = $this->db->update('kategori',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_sub_kategori($id=''){ + $sql = "DELETE FROM kategori WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all_sub_kategori(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM kategori WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function kategori_lock($id='',$val=0){ + + $sql = "UPDATE kategori SET enabled=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_kategori($id=0){ + $sql = "SELECT * FROM kategori WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function kategori_show(){ + $sql = "SELECT * FROM kategori WHERE enabled=?"; + $query = $this->db->query($sql,1); + $data = $query->result_array(); + return $data; + } + function list_kategori_atas(){ + + + $sql = "SELECT m.* FROM kategori m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 1"; + + $query = $this->db->query($sql); + $data=$query->result_array(); + $url = site_url("first"); + $i=0; + while($i".$data[$i]['kategori'].""; + + $sql2 = "SELECT s.* FROM kategori s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; + $query = $this->db->query($sql2,$data[$i]['id']); + $data2=$query->result_array(); + + if($data2){ + $data[$i]['kategori'] = $data[$i]['kategori'].""; + } + $data[$i]['kategori'] = $data[$i]['kategori'].""; + $i++; + } + return $data; + } + function list_kategori_kiri(){ + + + $sql = "SELECT m.* FROM kategori m WHERE m.parrent = 1 AND m.enabled = 1 AND m.tipe = 2"; + + $query = $this->db->query($sql); + $data=$query->result_array(); + $url = site_url("first"); + $i=0; + while($i".$data[$i]['kategori'].""; + + $sql2 = "SELECT s.* FROM kategori s WHERE s.parrent = ? AND s.enabled = 1 AND s.tipe = 3"; + $query = $this->db->query($sql2,$data[$i]['id']); + $data2=$query->result_array(); + + if($data2){ + $data[$i]['kategori'] = $data[$i]['kategori'].""; + } + $data[$i]['kategori'] = $data[$i]['kategori'].""; + $i++; + } + return $data; + } +} +?> \ No newline at end of file diff --git a/app/models/Web_komentar_model.php b/app/models/Web_komentar_model.php new file mode 100644 index 000000000..260285cde --- /dev/null +++ b/app/models/Web_komentar_model.php @@ -0,0 +1,197 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (komentar LIKE '$kw' OR komentar LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND enabled = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM komentar WHERE 1"; + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500,$cas=0){ + switch($o){ + case 1: $order_sql = ' ORDER BY tgl_upload DESC'; break; + case 2: $order_sql = ' ORDER BY owner'; break; + case 3: $order_sql = ' ORDER BY email'; break; + case 4: $order_sql = ' ORDER BY komentar'; break; + + default:$order_sql = ' ORDER BY tgl_upload DESC'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT * FROM komentar WHERE 1 "; + if($cas==2) + $sql .= " AND id_artikel = 775"; + else + $sql .= " AND id_artikel <> 775"; + + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($idb->query($sql,$tipe); + return $query->result_array(); + } + function insert(){ + + $data = $_POST; + $data['id_user'] = $_SESSION['user']; + $outp = $this->db->insert('komentar',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + + $this->db->where('id',$id); + $outp = $this->db->update('komentar',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM komentar WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM komentar WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function komentar_lock($id='',$val=0){ + + $sql = "UPDATE komentar SET enabled=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_komentar($id=0){ + $sql = "SELECT a.* FROM komentar a WHERE a.id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + + + + + return $data; + } + function komentar_show(){ + $sql = "SELECT a.*,u.nama AS owner FROM komentar a LEFT JOIN user u ON a.id_user = u.id WHERE enabled=? ORDER BY a.tgl_upload DESC LIMIT 6"; + $query = $this->db->query($sql,1); + $data = $query->result_array(); + + $i=0; + while($iBaca Selengkapnya"; + $i++; + } + return $data; + } + function insert_comment($id=0){ + $data = $_POST; + + $data['id_komentar'] = $id; + $outp = $this->db->insert('komentar',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_komentar($id=0){ + $sql = "SELECT * FROM komentar WHERE id_komentar = ? ORDER BY tgl_upload DESC"; + $query = $this->db->query($sql,$id); + $data = $query->result_array(); + + $i=0; + while($i \ No newline at end of file diff --git a/app/models/Web_menu_model.php b/app/models/Web_menu_model.php new file mode 100644 index 000000000..f8e4a7a2b --- /dev/null +++ b/app/models/Web_menu_model.php @@ -0,0 +1,280 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (nama LIKE '$kw')"; + + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND enabled = $kf"; + return $filter_sql; + } + } + function paging($tip=0,$p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM menu WHERE tipe = ?"; + $sql .= $this->search_sql(); + $query = $this->db->query($sql,$tip); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($tip=0,$o=0,$offset=0,$limit=500){ + switch($o){ + case 1: $order_sql = ' ORDER BY nama'; break; + case 2: $order_sql = ' ORDER BY nama DESC'; break; + case 3: $order_sql = ' ORDER BY enabled'; break; + case 4: $order_sql = ' ORDER BY enabled DESC'; break; + default:$order_sql = ' ORDER BY id'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + if($tip==1) + $sql = "SELECT * FROM menu WHERE tipe =? "; + else + $sql = "SELECT k.id,k.kategori AS nama FROM kategori k WHERE 1"; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql,$tip); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($idb->insert('menu',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + + } + function update($id=0){ + + + $data = $_POST; + + + if($data['manual_link']!=""){ + $data['link_tipe'] = 1; + $data['link'] = $data['manual_link']; + }else{ + $data['link_tipe'] = 0; + } + UNSET($data['manual_link']); + + if($data['link']=="") + UNSET($data['link']); + + $this->db->where('id',$id); + $outp = $this->db->update('menu',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM menu WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM menu WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function list_sub_menu($menu=1){ + $sql = "SELECT * FROM menu WHERE parrent = ? AND tipe = 3 "; + + $query = $this->db->query($sql,$menu); + $data=$query->result_array(); + + $i=0; + while($idb->query($sql); + $data=$query->result_array(); + + $i=0; + while($idb->query($sql); + $data=$query->result_array(); + + $i=0; + while($idb->insert('menu',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update_sub_menu($id=0){ + $data = $_POST; + + + + + if($data['manual_link']!=""){ + $data['link_tipe'] = 1; + $data['link'] = $data['manual_link']; + }else{ + $data['link_tipe'] = 0; + } + if($data['link']==""){ + UNSET($data['link']); + } + + $this->db->where('id',$id); + $outp = $this->db->update('menu',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_sub_menu($id=''){ + $sql = "DELETE FROM menu WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all_sub_menu(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM menu WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function menu_lock($id='',$val=0){ + + $sql = "UPDATE menu SET enabled=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_menu($id=0){ + $sql = "SELECT * FROM menu WHERE id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function menu_show(){ + $sql = "SELECT * FROM menu WHERE enabled=?"; + $query = $this->db->query($sql,1); + $data = $query->result_array(); + return $data; + } +} +?> \ No newline at end of file diff --git a/app/models/Web_sosmed_model.php b/app/models/Web_sosmed_model.php new file mode 100644 index 000000000..f5ce4c854 --- /dev/null +++ b/app/models/Web_sosmed_model.php @@ -0,0 +1,39 @@ +db->query($sql,$id); + $data=$query->row_array(); + + return $data; + } + function list_sosmed(){ + $sql = "SELECT * FROM media_sosial WHERE 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + + return $data; + } + function update($id=0){ + + $data = $_POST; + + $sql="SELECT * FROM media_sosial WHERE id =? "; + $query = $this->db->query($sql,$id); + $hasil=$query->result_array(); + + if($hasil){ + $this->db->where('id',$id); + $outp = $this->db->update('media_sosial',$data); + }else{ + $outp = $this->db->insert('media_sosial',$data); + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } +} +?> \ No newline at end of file diff --git a/app/models/Web_statis_model.php b/app/models/Web_statis_model.php new file mode 100644 index 000000000..77c4af31c --- /dev/null +++ b/app/models/Web_statis_model.php @@ -0,0 +1,192 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND (komentar LIKE '$kw' OR komentar LIKE '$kw')"; + return $search_sql; + } + } + function filter_sql(){ + if(isset($_SESSION['filter'])){ + $kf = $_SESSION['filter']; + $filter_sql= " AND enabled = $kf"; + return $filter_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM komentar WHERE 1"; + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + switch($o){ + case 1: $order_sql = ' ORDER BY tgl_upload DESC'; break; + case 2: $order_sql = ' ORDER BY owner'; break; + case 3: $order_sql = ' ORDER BY email'; break; + case 4: $order_sql = ' ORDER BY komentar'; break; + + default:$order_sql = ' ORDER BY tgl_upload DESC'; + } + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT * FROM komentar WHERE 1 "; + + $sql .= $this->search_sql(); + $sql .= $this->filter_sql(); + $sql .= $order_sql; + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + $i=0; + $j=$offset; + while($idb->query($sql,$tipe); + return $query->result_array(); + } + function insert(){ + + $data = $_POST; + $data['id_user'] = $_SESSION['user']; + $outp = $this->db->insert('komentar',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=0){ + $data = $_POST; + + $this->db->where('id',$id); + $outp = $this->db->update('komentar',$data); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $sql = "DELETE FROM komentar WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM komentar WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function komentar_lock($id='',$val=0){ + + $sql = "UPDATE komentar SET enabled=? WHERE id=?"; + $outp = $this->db->query($sql, array($val,$id)); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function get_komentar($id=0){ + $sql = "SELECT a.* FROM komentar a WHERE a.id=?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + + + + + return $data; + } + function komentar_show(){ + $sql = "SELECT a.*,u.nama AS owner FROM komentar a LEFT JOIN user u ON a.id_user = u.id WHERE enabled=? ORDER BY a.tgl_upload DESC LIMIT 6"; + $query = $this->db->query($sql,1); + $data = $query->result_array(); + + $i=0; + while($iBaca Selengkapnya"; + $i++; + } + return $data; + } + function insert_comment($id=0){ + $data = $_POST; + + $data['id_komentar'] = $id; + $outp = $this->db->insert('komentar',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_komentar($id=0){ + $sql = "SELECT * FROM komentar WHERE id_komentar = ? ORDER BY tgl_upload DESC"; + $query = $this->db->query($sql,$id); + $data = $query->result_array(); + + $i=0; + while($i \ No newline at end of file diff --git a/app/models/Web_widget_model.php b/app/models/Web_widget_model.php new file mode 100644 index 000000000..8500c9802 --- /dev/null +++ b/app/models/Web_widget_model.php @@ -0,0 +1,31 @@ +db->query($sql); + $data=$query->row_array(); + + return $data; + } + function update($id=0){ + + $data = $_POST; + + $sql="SELECT * FROM widget WHERE 1 "; + $query = $this->db->query($sql); + $hasil=$query->result_array(); + + if($hasil){ + $this->db->where('id',$id); + $outp = $this->db->update('widget',$data); + }else{ + $outp = $this->db->insert('widget',$data); + } + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } +} +?> \ No newline at end of file diff --git a/app/models/Wilayah_model.php b/app/models/Wilayah_model.php new file mode 100644 index 000000000..acc5fd5b4 --- /dev/null +++ b/app/models/Wilayah_model.php @@ -0,0 +1,395 @@ +db->query($sql); + $data = $query->result_array(); + + $i=0; + $outp=''; + while($idb->escape_like_str($cari); + $kw = '%' .$kw. '%'; + $search_sql= " AND u.dusun LIKE '$kw'"; + return $search_sql; + } + } + function paging($p=1,$o=0){ + $sql = "SELECT COUNT(id) AS id FROM tweb_wil_clusterdesa u WHERE u.rt = '0' AND u.rw = '0' "; + $sql .= $this->search_sql(); + $query = $this->db->query($sql); + $row = $query->row_array(); + $jml_data = $row['id']; + + $this->load->library('paging'); + $cfg['page'] = $p; + $cfg['per_page'] = $_SESSION['per_page']; + $cfg['num_rows'] = $jml_data; + $this->paging->init($cfg); + + return $this->paging; + } + function list_data($o=0,$offset=0,$limit=500){ + $paging_sql = ' LIMIT ' .$offset. ',' .$limit; + + $sql = "SELECT u.*,a.nama AS nama_kadus,a.nik AS nik_kadus, + (SELECT COUNT(rw.id) FROM tweb_wil_clusterdesa rw WHERE dusun = u.dusun AND rw <> '-' AND rt = '-') AS jumlah_rw, + (SELECT COUNT(v.id) FROM tweb_wil_clusterdesa v WHERE dusun = u.dusun AND v.rt <> '0' AND v.rt <> '-') AS jumlah_rt, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = u.dusun) and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = u.dusun) AND p.sex = 1 and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_l, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = u.dusun) AND p.sex = 2 and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_p, + (SELECT COUNT(p.id) FROM tweb_keluarga k inner join tweb_penduduk p ON k.nik_kepala=p.id WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = u.dusun) AND p.kk_level = 1 and status_dasar=1) AS jumlah_kk + FROM tweb_wil_clusterdesa u LEFT JOIN tweb_penduduk a ON u.id_kepala = a.id WHERE u.rt = '0' AND u.rw = '0' ORDER BY u.rw"; + + $sql .= $this->search_sql(); + $sql .= $paging_sql; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + $j=$offset; + while($idb->insert('tweb_wil_clusterdesa',penetration($data)); + + $rw = penetration($data); + $rw['rw'] = "-"; + $this->db->insert('tweb_wil_clusterdesa',$rw); + + $rt = penetration($rw); + $rt['rt'] = "-"; + $outp = $this->db->insert('tweb_wil_clusterdesa',$rt); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update($id=''){ + if(empty($_POST['id_kepala'])){ + UNSET($_POST['id_kepala']); + }else{ + $data['id_kepala']=$_POST['id_kepala']; + $temp = $this->wilayah_model->cluster_by_id($id); + $this->db->where('dusun',$temp['dusun']); + $this->db->where('rw','0'); + $this->db->where('rt','0'); + $outp = $this->db->update('tweb_wil_clusterdesa',$data); + } + UNSET($data); + $data['dusun']=$_POST['dusun']; + $temp = $this->wilayah_model->cluster_by_id($id); + $this->db->where('dusun',$temp['dusun']); + $outp = $this->db->update('tweb_wil_clusterdesa',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete($id=''){ + $temp = $this->cluster_by_id($id); + $dusun = (penetration($temp['dusun'])); + + $sql = "DELETE FROM tweb_wil_clusterdesa WHERE dusun='$dusun'"; + $outp = $this->db->query($sql); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $dusun){ + $sql = "DELETE FROM tweb_wil_clusterdesa WHERE id=?"; + $outp = $this->db->query($sql,array($dusun)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_data_rw($id=''){ + $temp = $this->cluster_by_id($id); + $dusun = $temp['dusun']; + + $sql = "SELECT u.*,a.nama AS nama_ketua,a.nik AS nik_ketua, + (SELECT COUNT(rt.id) FROM tweb_wil_clusterdesa rt WHERE dusun = u.dusun AND rw = u.rw AND rw <> '-' AND rt <> '-' AND rt <> '0' ) AS jumlah_rt, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.sex = 1 AND p.status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_l, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.sex = 2 AND p.status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_p, + (SELECT COUNT(p.id) FROM tweb_keluarga k inner join tweb_penduduk p ON k.nik_kepala=p.id WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.kk_level = 1 AND p.status_dasar=1) AS jumlah_kk + FROM tweb_wil_clusterdesa u LEFT JOIN tweb_penduduk a ON u.id_kepala = a.id WHERE u.rt = '0' AND u.rw <> '0' AND u.dusun = '$dusun'"; + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + while($icluster_by_id($dusun); + $data['dusun']= $temp['dusun']; + $outp = $this->db->insert('tweb_wil_clusterdesa',$data); + + $rt = $data; + $rt['rt'] = "-"; + $outp = $this->db->insert('tweb_wil_clusterdesa',$rt); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update_rw($dusun='',$rw=''){ + if(empty($_POST['id_kepala'])) + UNSET($_POST['id_kepala']); + + $data = $_POST; + $temp = $this->wilayah_model->cluster_by_id($dusun); + $this->db->where('dusun',$temp['dusun']); + $this->db->where('rw',$rw); + $outp = $this->db->update('tweb_wil_clusterdesa',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_rw($id){ + $temp = $this->cluster_by_id($id); + $rw = $temp['rw']; + $dusun = $temp['dusun']; + + $sql = "DELETE FROM tweb_wil_clusterdesa WHERE rw='$rw' and dusun='$dusun'"; + $outp = $this->db->query($sql,array($id)); + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + + } + function delete_all_rw(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM tweb_wil_clusterdesa WHERE id=?"; + $outp = $this->db->query($sql,array($id)); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_data_rt($dusun='',$rw=''){ + $sql = "SELECT u.*,a.nama AS nama_ketua,a.nik AS nik_ketua, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.sex = 1 AND p.status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_l,( + SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.sex = 2 AND p.status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_p, + (SELECT COUNT(p.id) FROM tweb_keluarga k inner join tweb_penduduk p ON k.nik_kepala=p.id WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.kk_level = 1) AS jumlah_kk + FROM tweb_wil_clusterdesa u LEFT JOIN tweb_penduduk a ON u.id_kepala = a.id WHERE u.rt <> '0' AND u.rw = '$rw' AND u.dusun = '$dusun' AND u.rt <> '-'"; + + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + while($icluster_by_id($dusun); + $data['dusun']= $temp['dusun']; + $data['rw'] = $rw; + $outp = $this->db->insert('tweb_wil_clusterdesa',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update_rt($id=0){ + if(empty($_POST['id_kepala'])) + UNSET($_POST['id_kepala']); + + $data = $_POST; + $this->db->where('id',$id); + $outp = $this->db->update('tweb_wil_clusterdesa',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + + function update_dusun_map($dusun=''){ + $data = $_POST; + $this->db->where('id',$dusun); + $outp = $this->db->update('tweb_wil_clusterdesa',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function get_dusun_maps($id=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE id=?"; + $query = $this->db->query($sql,$id); + return $query->row_array(); + } + function update_rw_map($dus=0,$id=0){ + $data = $_POST; + $this->db->where('dusun',$dus); + $this->db->where('rw',$id); + $this->db->where('rt','0'); + $outp = $this->db->update('tweb_wil_clusterdesa',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function update_rt_map($dus=0,$rw=0,$id=0){ + $data = $_POST; + $this->db->where('dusun',$dus); + $this->db->where('rw',$rw); + $this->db->where('rt',$id); + $outp = $this->db->update('tweb_wil_clusterdesa',$data); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_rt($id=0){ + $sql = "DELETE FROM tweb_wil_clusterdesa WHERE id = ?"; + $outp = $this->db->query($sql,$id); + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function delete_all_rt(){ + $id_cb = $_POST['id_cb']; + + if(count($id_cb)){ + foreach($id_cb as $id){ + $sql = "DELETE FROM tweb_wil_clusterdesa WHERE id = ?"; + $outp = $this->db->query($sql,$id); + } + } + else $outp = false; + + if($outp) $_SESSION['success']=1; + else $_SESSION['success']=-1; + } + function list_penduduk(){ + $sql = "SELECT id,nik,nama FROM tweb_penduduk WHERE status = 1"; + $query = $this->db->query($sql); + $data=$query->result_array(); + + + $i=0; + while($idb->query($sql,$id); + $data=$query->result_array(); + + + $i=0; + while($idb->query($sql,$id); + $data = $query->row_array(); + return $data; + } + + function get_penduduk($id=0){ + $sql = "SELECT id,nik,nama FROM tweb_penduduk WHERE id = ?"; + $query = $this->db->query($sql,$id); + $data = $query->row_array(); + return $data; + } + function get_dusun($dusun=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE dusun = ? AND rt = '0' AND rw = '0'"; + $query = $this->db->query($sql,$dusun); + return $query->row_array(); + } + + function cluster_by_id($id=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE id = ?"; + $query = $this->db->query($sql,$id); + return $query->row_array(); + } + + function get_rw($dusun='',$rw=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE dusun = ? AND rw = ? AND rt = '0'"; + $query = $this->db->query($sql,array($dusun,$rw)); + return $query->row_array(); + } + function get_rt($dusun='',$rw='',$rt=''){ + $sql = "SELECT * FROM tweb_wil_clusterdesa WHERE dusun = ? AND rw = ? AND rt = ?"; + $query = $this->db->query($sql,array($dusun,$rw,$rt)); + return $query->row_array(); + } + function total(){ + $sql = "SELECT (SELECT COUNT(rw.id) FROM tweb_wil_clusterdesa rw WHERE rw <> '-' AND rt = '-') AS total_rw, + (SELECT COUNT(v.id) FROM tweb_wil_clusterdesa v WHERE v.rt <> '0' AND v.rt <> '-') AS total_rt, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa ) and (status_dasar=1 OR status_dasar=4) and (status = 1 OR status = 2)) AS total_warga, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa) AND p.sex = 1 and (status_dasar=1 OR status_dasar = 4) and (status = 1 OR status = 2)) AS total_warga_l, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa) AND p.sex = 2 and (status_dasar=1 OR status_dasar = 4) and (status = 1 OR status = 2)) AS total_warga_p, + (SELECT COUNT(p.id) FROM tweb_keluarga k inner join tweb_penduduk p ON k.nik_kepala=p.id WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa) AND p.kk_level = 1 and status_dasar=1 and (status = 1 OR status = 2)) AS total_kk FROM tweb_wil_clusterdesa u LEFT JOIN tweb_penduduk a ON u.id_kepala = a.id WHERE u.rt = '0' AND u.rw = '0' limit 1"; + $query = $this->db->query($sql); + return $query->row_array(); + } + function total_rw($dusun=''){ + $sql = "select sum(jumlah_rt) as jmlrt,sum(jumlah_warga) as jmlwarga,sum(jumlah_warga_l) as jmlwargal,sum(jumlah_warga_p) as jmlwargap,sum(jumlah_kk) as jmlkk from + (SELECT u.*,a.nama AS nama_ketua,a.nik AS nik_ketua,(SELECT COUNT(rt.id) FROM tweb_wil_clusterdesa rt WHERE dusun = u.dusun AND rw = u.rw AND rw <> '-' AND rt <> '-' AND rt <> '0' ) AS jumlah_rt, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw ) and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.sex = 1 and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_l, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.sex = 2 and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_p, + (SELECT COUNT(p.id) FROM tweb_keluarga k inner join tweb_penduduk p ON k.nik_kepala=p.id WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = u.rw) AND p.kk_level = 1 and status_dasar=1) AS jumlah_kk FROM tweb_wil_clusterdesa u LEFT JOIN tweb_penduduk a ON u.id_kepala = a.id WHERE u.rt = '0' AND u.rw <> '0' AND u.dusun = '$dusun') as x "; + $query = $this->db->query($sql); + $data=$query->row_array(); + return $data; + } + function total_rt($dusun='',$rw=''){ + $sql = "select sum(jumlah_warga) as jmlwarga,sum(jumlah_warga_l) as jmlwargal,sum(jumlah_warga_p) as jmlwargap,sum(jumlah_kk) as jmlkk from + (SELECT u.*,a.nama AS nama_ketua,a.nik AS nik_ketua, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga, + (SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.sex = 1 and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_l,(SELECT COUNT(p.id) FROM tweb_penduduk p WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.sex = 2 and status_dasar=1 and (status = 1 OR status = 2)) AS jumlah_warga_p, + (SELECT COUNT(p.id) FROM tweb_keluarga k inner join tweb_penduduk p ON k.nik_kepala=p.id WHERE p.id_cluster IN(SELECT id FROM tweb_wil_clusterdesa WHERE dusun = '$dusun' AND rw = '$rw' AND rt = u.rt) AND p.kk_level = 1 and status_dasar=1) AS jumlah_kk FROM tweb_wil_clusterdesa u LEFT JOIN tweb_penduduk a ON u.id_kepala = a.id WHERE u.rt <> '0' AND u.rt <> '-' AND u.rw = '$rw' AND u.dusun = '$dusun') as x "; + $query = $this->db->query($sql); + $data=$query->row_array(); + return $data; + } +} +?> \ No newline at end of file diff --git a/app/models/index.html b/app/models/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/models/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/third_party/index.html b/app/third_party/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/third_party/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/views/analisis_grafik/penduduk_excel.php b/app/views/analisis_grafik/penduduk_excel.php new file mode 100644 index 000000000..1007a05c8 --- /dev/null +++ b/app/views/analisis_grafik/penduduk_excel.php @@ -0,0 +1,58 @@ + + + + +Laporan Statistik + + + + +
    + +
    +
    + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + +
    NoStatistikJumlahLaki-lakiPerempuan
    + + +
    + + +
    +
    + +
    + diff --git a/app/views/analisis_grafik/penduduk_pie.php b/app/views/analisis_grafik/penduduk_pie.php new file mode 100644 index 000000000..e58ce7ad9 --- /dev/null +++ b/app/views/analisis_grafik/penduduk_pie.php @@ -0,0 +1,162 @@ +
    + + + + +
    + Statistik Keluarga + + + Statistik Penduduk + + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoStatistikJumlahLaki-lakiPerempuan
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_grafik/penduduk_print.php b/app/views/analisis_grafik/penduduk_print.php new file mode 100644 index 000000000..cfd5d549b --- /dev/null +++ b/app/views/analisis_grafik/penduduk_print.php @@ -0,0 +1,158 @@ + + + +Laporan Statistik + + + + +
    + +
    + + + + + + + +
    + +

    PEMERINTAH KABUPATEN

    +

    +

    KECAMATAN

    +

    DESA

    +

    LAPORAN STATISTIK

    +
    +
    + + + + + + +
    +
    + + + -00001 +
    +
    +
    + + + - +
    +
    + + + - +
    +
    + + + + + +
    +
    + Melaporkan Data Statistik + + +
    +
    + + + +
    +
    + + + + +
    +
    + Dengan rincian sebagai berikut + : +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoStatistikJumlahLaki-lakiPerempuan
    +
    + + + + +
    +
    + + + +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + +
    +
    + + + - +
    +
    + +
    +
    + +
    + diff --git a/app/views/analisis_grafik/table.php b/app/views/analisis_grafik/table.php new file mode 100644 index 000000000..3ee6265ac --- /dev/null +++ b/app/views/analisis_grafik/table.php @@ -0,0 +1,135 @@ +
    + + + + +
    + + + + + +
    +
    +
    +
    + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + +
    NoStatistikJumlah
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_grafik/time.php b/app/views/analisis_grafik/time.php new file mode 100644 index 000000000..38b9b60e0 --- /dev/null +++ b/app/views/analisis_grafik/time.php @@ -0,0 +1,98 @@ +
    + + + + +
    + + + + + +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + +
    NoStatistik
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_indikator/form.php b/app/views/analisis_indikator/form.php new file mode 100644 index 000000000..d28b4a341 --- /dev/null +++ b/app/views/analisis_indikator/form.php @@ -0,0 +1,108 @@ +
    + + +load->view('analisis_master/left',$data);?> +
    +
    +
    +

    Form Pertanyaan -

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tipe Pertanyaan +
    + +> +> +> +> +
    +
    Kode Pertanyaan
    Pertanyaan
    Bobot + "> +
    Aksi Analisis +
    + +> +> +
    +
    Kategori Indikator +
    + + +> + +
    +
    Publikasi Indikator +
    + +> +> +
    +*) Tampilkan data indikator di halaman depan website desa (Menu Data Desa -> Data Analisis). +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/app/views/analisis_indikator/manajemen_kuisioner_form.php b/app/views/analisis_indikator/manajemen_kuisioner_form.php new file mode 100644 index 000000000..eda8ba6d5 --- /dev/null +++ b/app/views/analisis_indikator/manajemen_kuisioner_form.php @@ -0,0 +1,71 @@ + + + +
    Data Responden
    +
    +

    Form Manajemen Responden

    +
    +
    +
    +
    + + + + +
     
    +
    >
    + +
    >
    + + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    diff --git a/app/views/analisis_indikator/parameter/ajax_form.php b/app/views/analisis_indikator/parameter/ajax_form.php new file mode 100644 index 000000000..bb96b9a2f --- /dev/null +++ b/app/views/analisis_indikator/parameter/ajax_form.php @@ -0,0 +1,24 @@ + + +
    + + + + + + + + + + + + + + +
    Kode
    Jawaban
    Ukuran/Nilai
    +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_indikator/parameter/table.php b/app/views/analisis_indikator/parameter/table.php new file mode 100644 index 000000000..f291f6b89 --- /dev/null +++ b/app/views/analisis_indikator/parameter/table.php @@ -0,0 +1,76 @@ + +
    +load->view('analisis_master/left',$data);?> +
    +
    +
    +
    +
    +

    Manajemen Ukuran/Nilai Indikator Analisis

    +

      Indikator/Pertanyaan :

    + +
    + +
    +
    +
    + +
    +
    +
    +
    +
    diff --git a/app/views/analisis_indikator/table.php b/app/views/analisis_indikator/table.php new file mode 100644 index 000000000..88290549f --- /dev/null +++ b/app/views/analisis_indikator/table.php @@ -0,0 +1,176 @@ + +
    +load->view('analisis_master/left',$data);?> +
    +
    +
    +
    +
    +

    Manajemen Indikator Analisis -

    +
    +
    + Tambah Indikator Baru +
    +
    +
    +
    +
    +
    + +   + +   + +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    No Aksi">Kode ">Kode ">Kode ">Pertanyaan/Indikator ">Pertanyaan/Indikator ">Pertanyaan/Indikator ">Tipe Pertanyaan ">Tipe Pertanyaan ">Tipe Pertanyaan ">Kategori/Variabel ">Kategori/Variabel ">Kategori/Variabel ">Bobot ">Bobot ">Bobot ">Aksi Analisis ">Aksi Analisis ">Aksi Analisis 
    + + + +
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    diff --git a/app/views/analisis_kategori/ajax_form.php b/app/views/analisis_kategori/ajax_form.php new file mode 100644 index 000000000..d1e065c62 --- /dev/null +++ b/app/views/analisis_kategori/ajax_form.php @@ -0,0 +1,15 @@ + + +
    + + + + + +
    Nama Kategori/Variabel
    +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_kategori/form.php b/app/views/analisis_kategori/form.php new file mode 100644 index 000000000..2bd086316 --- /dev/null +++ b/app/views/analisis_kategori/form.php @@ -0,0 +1,35 @@ +
    + + +
    + +
    + +
    +
    +

    Form Data Kategori/Variabel -

    +
    +
    +
    + + + + + +
    Nama Kategori/Variabel
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    diff --git a/app/views/analisis_kategori/table.php b/app/views/analisis_kategori/table.php new file mode 100644 index 000000000..534db7946 --- /dev/null +++ b/app/views/analisis_kategori/table.php @@ -0,0 +1,113 @@ + +
    +load->view('analisis_master/left',$data);?> +
    +
    +
    +
    +
    +

    Pengaturan Kategori/Variabel -

    +
    +
    + Tambah Kategori/Variabel Baru +
    +
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    + +
    diff --git a/app/views/analisis_klasifikasi/ajax_form.php b/app/views/analisis_klasifikasi/ajax_form.php new file mode 100644 index 000000000..5304841b1 --- /dev/null +++ b/app/views/analisis_klasifikasi/ajax_form.php @@ -0,0 +1,23 @@ + + +
    + + + + + + + + + + + + + +
    Klasifikasi
    Nilai Minimal
    Nilai Maksimal
    +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_klasifikasi/table.php b/app/views/analisis_klasifikasi/table.php new file mode 100644 index 000000000..7a44f79c5 --- /dev/null +++ b/app/views/analisis_klasifikasi/table.php @@ -0,0 +1,134 @@ + +
    +load->view('analisis_master/left',$data);?> +
    +
    +
    +
    +
    +

    Manajemen Klasifikasi Analisis -

    +
    +
    +  Tambah Klasifikasi Baru +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    diff --git a/app/views/analisis_laporan/ajax_multi.php b/app/views/analisis_laporan/ajax_multi.php new file mode 100644 index 000000000..c00a7c00f --- /dev/null +++ b/app/views/analisis_laporan/ajax_multi.php @@ -0,0 +1,67 @@ + + +
    + + + + + +
    +
    + > + +
    + +
    + > + +
    + +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_laporan/form.php b/app/views/analisis_laporan/form.php new file mode 100644 index 000000000..1fe0a0e67 --- /dev/null +++ b/app/views/analisis_laporan/form.php @@ -0,0 +1,124 @@ + +
    +load->view('analisis_master/left',$data);?> +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + +
    Hasil Pendataan :
    Nomor Identitas :
    Nama Subjek :
    + +

    DAFTAR ANGGOTA

    + + + + + + + + + + + + + + + + + + + +
    NONIKNAMATANGGAL LAHIRJENIS KELAMIN 
     
    + + + + + + + + + + + + = 1){$bg = "class='bg'";}else{$bg ="";} + ?> + > + + + + + + + + + + + + + + +
    NoPertanyaan / IndikatorBobot + JawabanNilaiPoin
    TOTAL
    + + + + + + +
     
    + + + + + + + + +

    Berkas Bukti / Pengesahan Form Pendataan

    + + + +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_laporan/table.php b/app/views/analisis_laporan/table.php new file mode 100644 index 000000000..712f43bcb --- /dev/null +++ b/app/views/analisis_laporan/table.php @@ -0,0 +1,202 @@ + + + +
    +load->view('analisis_master/left',$data);?> +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + +
    Nama Analisis :
    Subjek Analisis :
    Periode :
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoRincian"> "> "> "> "> "> L/PDusunRWRT">Nilai ">Nilai ">Nilai ">Klasifikasi ">Klasifikasi ">Klasifikasi 
    + +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    + +
    + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    diff --git a/app/views/analisis_laporan/table_excel.php b/app/views/analisis_laporan/table_excel.php new file mode 100644 index 000000000..102d4ba4e --- /dev/null +++ b/app/views/analisis_laporan/table_excel.php @@ -0,0 +1,57 @@ + + + +
    +
    + +

    DATA STATISTIK ANALISIS JAWABAN

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoL/PDusunRWRTNilaiKlasifikasi
    +
    + \ No newline at end of file diff --git a/app/views/analisis_laporan/table_print.php b/app/views/analisis_laporan/table_print.php new file mode 100644 index 000000000..08a53d810 --- /dev/null +++ b/app/views/analisis_laporan/table_print.php @@ -0,0 +1,68 @@ + + + + +Data Analisis + + + + + +
    + +
    +

    Laporan Hasil Analisis

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoL/PDusunRWRTNilaiKlasifikasi
    +
    + + +
    + diff --git a/app/views/analisis_master/form.php b/app/views/analisis_master/form.php new file mode 100644 index 000000000..af39a7c5f --- /dev/null +++ b/app/views/analisis_master/form.php @@ -0,0 +1,129 @@ + + + + + +
    + + +
    +
    +
    +
    +

    Form Master Analisis

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nama Analisis
    Subjek/Unit Analisis +
    + +> +> +> +> +
    +
    Kategori Kelompok + +
    Status Analisis +
    + +> +> +
    Rumus Penilaian Analisis
    Sigma [Bobot (indikator) x Nilai (ukuran)] / "Bilangan Pembagi"
    Bilangan Pembagi *) untuk tanda koma "," gunakan tanda titik "." sebagai substitusinya.
    Analisis Terhubung + + *) Kosongi jika tida ada analisis terhubung. +
    Deskripsi Analisis
    + +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_master/import.php b/app/views/analisis_master/import.php new file mode 100644 index 000000000..e356cf183 --- /dev/null +++ b/app/views/analisis_master/import.php @@ -0,0 +1,19 @@ +
    + + + + + + + + +
      +
    • Data yang dibutuhkan untuk Import dengan memenuhi aturan data sebagai berikut Aturan Data
    • +
    • Contoh urutan format dapat dilihat pada tautan berikut Contoh
    • +
    File Master Analisis
    +
    +
    + +
    +
    +
    diff --git a/app/views/analisis_master/left.php b/app/views/analisis_master/left.php new file mode 100644 index 000000000..139a843ca --- /dev/null +++ b/app/views/analisis_master/left.php @@ -0,0 +1,46 @@ + + + + + + +
    +

    MENU ANALISIS

    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_master/menu.php b/app/views/analisis_master/menu.php new file mode 100644 index 000000000..36848f955 --- /dev/null +++ b/app/views/analisis_master/menu.php @@ -0,0 +1,24 @@ +
    +load->view('analisis_master/left',$data);?> +
    +
    +

    +
    +
    +
    +


    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_master/nav.php b/app/views/analisis_master/nav.php new file mode 100644 index 000000000..0cdafcca8 --- /dev/null +++ b/app/views/analisis_master/nav.php @@ -0,0 +1,30 @@ + + \ No newline at end of file diff --git a/app/views/analisis_master/nav2.php b/app/views/analisis_master/nav2.php new file mode 100644 index 000000000..6ec884bde --- /dev/null +++ b/app/views/analisis_master/nav2.php @@ -0,0 +1,10 @@ + diff --git a/app/views/analisis_master/panduan.php b/app/views/analisis_master/panduan.php new file mode 100644 index 000000000..a20f0f381 --- /dev/null +++ b/app/views/analisis_master/panduan.php @@ -0,0 +1,18 @@ +
    + + + + +
    +
    +

    Panduan Modul

    +
    +
    + +

    Tentang SID
    Sistem Informasi Desa (SID) adalah sebuah platform teknologi informasi komunikasi untuk mendukung pengelolaan sumber daya komunitas di tingkat desa. Ini bersifat terbuka bagi siapa saja yang akan bergabung dalam gerakan membangun kemandirian komunitas. Konsep pengelolaan sumber daya berada dalam payung besar gagasan Lumbung Komunitas yang dikelola oleh COMBINE Resource Institution.

    Sekilas pandang sistem informasi desa
    Aplikasi Gratis untuk desa yang berbasis Opensource, SID merupakan inisiatif Combine resource institution, sebuah organisasi masyarakat sipil yang sangat tekun dan dedikatif dalam mengembangkan informasi dan komunikasi alternatif berbasis masyarakat.

    Awal mula SID
    "Awalnya ada keinginan dari pemerintah Desa Balerante yang berharap pelayanan pemerintah desa bisa seperti pengunjung rumah sakit yang ingin mencari data pasien rawat inap, tinggal ketik nama di komputer, maka data tersebut akan keluar"
    (Mart Widarto, pengelola Program Lumbung Komunitas)
    Program ini mulai dibuat dari awal 2006:
    1. (2006) komunitas melakukan komunikasi dan diskusi lepas tentang sebuah sistem yang bisa digunakan untuk menyimpan data.
    2. (2008) Rangkaian FDG dengan pemerintah desa membahas tentang tata kelola pendokumentasian di desa
    3. (2009) Ujicoba SID yang sudah dikembangkan di balerante
    4. (2009-2010) Membangun SID (aplikasi) dibeberapa desa yang lain: terong (bantul), Nglegi (Gunungkidul)
    5. (2011) Kandangan (Temanggung) Gilangharjo (bantul) Girikarto (gunungkidul) Talun (klaten) Pager Gunung (magelang)
    6. hingga saat ini 2013 sudah banyak desa pengguna SID.

    SID sebagai tanggapan atas kebutuhan:
    Kalau dulu untuk mencari data penduduk menurut kelompok umur saja kesulitan karena tidak mempunyai databasenya. Dengan adanya SID menjadi lebih mudah.
    (Nuryanto, Kabag Pelayanan Pemdes Terong)

    Membangun sebuah sistem bukan hanya membuatkan software dan meninggalkan begitu saja, namun ada upaya untuk memadukan sistem dengan kebutuhan yang ada pada desa. sehingga software dapat memenuhi kebutuhan yang telah ada bukan memaksakan desa untuk mengikuti dan berpindah sistem. inilah yang melatari combine melaksanakan alur pengaplikasian software.
    1. Bentuk tim kerja bersama pemerintah desa
    2. Diskusikan basis data apa saja yang diperlukan untuk warga
    3. Himpun data kependudukan warga dari Kartu Keluarga (KK)
    4. Daftarkan proyek SID dan dapatkan aplikasi softwarenya di http://abcd.lumbungkomunitas.net
    5. Install aplikasi software SID di komputer desa
    6. Entry data penduduk ke SID
    7. Basis data kependudukan sudah bisa dimanfaatkan
    8. Diskusikan rencana pengembangan SID sesuai kebutuhan desa
    9. Sebarluaskan informasi desa melalui beragam media untuk warga
    (Elanto Wijoyono, pengelola Program Lumbung Komunitas)

    Pemberdayaan data desa yang dibangun diharapkan dapat menjunjung kesejahteraan masyarakat desa, data-data tersebut dapat diperuntukkan untuk riset lebih lanjut tentang kemiskinan, tanggap bencana, sumberdaya desa yang bisa diekspose keluar dan dengan menghubungkan dari desa ke desa dapat mencontohkan banyak hal dalam keberhasilan pemberdayaannya.
    (sumber: Buku Sistem Informasi Desa)

    Hal-hal penting yang harus diperhatikan dalam mengaplikasikan SID
    1. SID mencoba masuk keranah paling kecil dari penduduk, dengan tujuan menyatukan warga masyarakat bersama perangkat desa bersama-sama memajukan desa dengan memanfaatkan informasi dan jaringan. Konsep gotong royong sebagai kearifan lokal dipertahankan dan dikuatkan kembali.
    2. Data yang dikumpulkan dijaga kerahasiaanya dari publik, Keamanan data pribadi warga mengacu pada Undang-Undang Nomor 23 Tahun 2006 tentang Administrasi Kependudukan. Penerapan sistem informasi administrasi kependudukan diatur dalam Keputusan Presiden (Keppres) No. 88/2004 tentang pengelolaan administrasi kependudukan, Undang-Undang (UU) No. 23 tahun 2006 tentang administrasi kependudukan dan Peraturan Menteri Dalam Negeri (Permendagri) No. 18/2005 serta Peraturan Pemerintah (PP) No. 37 tahun 2007 tentang administrasi kependudukan. Pencatatan data penduduk suatu daerah yang melalui sistem informasi administrasi kependudukan menjadi tanggung jawab pemerintah kabupaten dan kota dimana dalam pelaksanaannya diawali dari desa dan kelurahan sebagai awal dari pendataan penduduk disuatu daerah.
    3. Software SID hanyalah sebuah alat, yang membutuhkan ketrampilan dari pengguna alat. alat ini bisa menjadi kekuatan desa apabila digunakan dengan semestinya, namun juga bisa menjadi bumerang ketika jatuh ketangan yang salah.

    Pengembangan dengan ACCESS
    ACCESS yang memiliki pengalaman melakukan participatory poverty assessment dengan pendekatan Community Led Action and participatory Process (CLAPP) dimana melibatkan warga secara partisipatif dalam menyusun dan menghasilkan data yang valid. Yang kemudian Memanfaatkan SAID (Sistem Administrasi dan Informasi Desa) sebagai “mesin†untuk memanfaatkan database partisipatif yang diperoleh.
    ACCESS bekerjasama dengan Combine Resource Institution (CRI) bersama mengembangkan SAID di sejumlah desa di wilayah dampingan ACCESS, dan beberapa daerah telah menyatakan minatnya sebagai bagian dari upaya mereka menyediakan informasi terbaru yang lebih akurat di level yang paling bawah yaitu desa/kelurahan. Hal ini dirasakan karena Indonesia masih menghadapi kesulitan terkait dengan ketepatan data dan SAID membantu menyediakan data tersebut dari desa ke atas.

    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_master/table.php b/app/views/analisis_master/table.php new file mode 100644 index 000000000..d13891edf --- /dev/null +++ b/app/views/analisis_master/table.php @@ -0,0 +1,139 @@ + +
    +
    +
    +
    +
    +

    Modul Analisis Data Potensi/Sumber Daya di Tingkat Desa

    +
    +
    +  Tambah Analisis Baru + +  Import Analisis +
    +
    +
    +
    +
    +
    + +   + +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksi">Nama ">Nama ">Nama ">Subjek/Unit Analisis ">Subjek/Unit Analisis ">Subjek/Unit Analisis ">Status ">Status ">Status 
    + + + +
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    diff --git a/app/views/analisis_periode/form.php b/app/views/analisis_periode/form.php new file mode 100644 index 000000000..e45b8dbfe --- /dev/null +++ b/app/views/analisis_periode/form.php @@ -0,0 +1,75 @@ +
    + + +
    +
    +
    +
    +

    Form Data Periode -

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nama Periode
    Periode Aktif +
    + +> +> +
    +
    Tahap Pendataan +
    + +> +> +> +
    +
    Tahun Pelaksanaan
    Duplikat data pendataan sebelumnya +
    + + +
    +
    Keterangan
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_periode/table.php b/app/views/analisis_periode/table.php new file mode 100644 index 000000000..855121faa --- /dev/null +++ b/app/views/analisis_periode/table.php @@ -0,0 +1,132 @@ + +
    +load->view('analisis_master/left',$data);?> +
    +
    +
    +
    +
    +

    Manajemen Periode Analisis -

    +
    +
    +  Tambah Periode Baru +
    +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksi">Periode ">Periode ">Periode ">Tahun Pelaksanaan ">Tahun Pelaksanaan ">Tahun Pelaksanaan Tahap PendataanKeteranganAktif
    + + +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    diff --git a/app/views/analisis_respon/form.php b/app/views/analisis_respon/form.php new file mode 100644 index 000000000..7daac427d --- /dev/null +++ b/app/views/analisis_respon/form.php @@ -0,0 +1,233 @@ + + +
    + +load->view('analisis_master/left',$data);?> + +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + +
    Form Pendataan :
    Nomor Identitas :
    Nama Subjek :
    + +

    DAFTAR ANGGOTA

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NOAKSINIKNAMATANGGAL LAHIRJENIS KELAMIN 
    + +  
    + + + + + + + + + + + + + + + + +


    + + + + + +
    + > + +
    + + + + + + +
    +
    + +
    +
    + + + + + + +
    +
    + +
    +
    + + + +

    + + + + + + + + + + +
    *) Format file harus *.jpg
    *) Berkas form pendataan digunakan sebagai penguat / bukti pendataan maupun untuk verifikasi data yang sudah terinput.
    *) Berkas Bukti / pengesahan harus berupa file gambar dengan format .jpg, dengan ukuran maksimal 1 Mb (1 megabyte)
    + + + + + + +
    + + + +
    +
    +
    +
    + + + Normal + + Full Screen + +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + + +
    diff --git a/app/views/analisis_respon/form_ajax.php b/app/views/analisis_respon/form_ajax.php new file mode 100644 index 000000000..d934ce533 --- /dev/null +++ b/app/views/analisis_respon/form_ajax.php @@ -0,0 +1,103 @@ + + +
    + + + + + + + + + + +

    + +
    + > +
    + + + + + +
    +
    + > + +
    + + + + + + +
    +
    + +
    +
    + + + + + + +
    +
    + +
    +
    + + + + +

    + +
    +
    \ No newline at end of file diff --git a/app/views/analisis_respon/import/aturan_ajax.php b/app/views/analisis_respon/import/aturan_ajax.php new file mode 100644 index 000000000..509e61372 --- /dev/null +++ b/app/views/analisis_respon/import/aturan_ajax.php @@ -0,0 +1,18 @@ + + + + + + + + +
    + Data yang dibutuhkan untuk import dengan memenuhi aturan data sebagai berikut : +
    + Aturan Data +
    +
    +
    + Lanjut +
    +
    \ No newline at end of file diff --git a/app/views/analisis_respon/import/aturan_unduh.php b/app/views/analisis_respon/import/aturan_unduh.php new file mode 100644 index 000000000..2d6145f9b --- /dev/null +++ b/app/views/analisis_respon/import/aturan_unduh.php @@ -0,0 +1,59 @@ + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoPertanyaanJawaban
    +
    + * +
    + + .
    + +
    + +
    + +
    --
    +
    \ No newline at end of file diff --git a/app/views/analisis_respon/import/data_ajax.php b/app/views/analisis_respon/import/data_ajax.php new file mode 100644 index 000000000..395d8e61c --- /dev/null +++ b/app/views/analisis_respon/import/data_ajax.php @@ -0,0 +1,28 @@ + + + + + + + + + + + + +
    +

    Bla bla bla... Data yang dibutuhkan untuk Import dengan memenuhi aturan data sebagai berikut Aturan Data Data yang dibutuhkan untuk Import dengan memenuhi aturan data sebagai berikut Aturan Data

    +
    + Data yang dibutuhkan untuk Import dengan memenuhi aturan data sebagai berikut : +
    + Form Excel + + Form Excel + Isi Data +
    +
    + analisis_respon/import/1" class="uibutton special" target="ajax-modal" rel="window" header="Unggah Format Import" >Format 1 + */ ?> + Lanjut +
    diff --git a/app/views/analisis_respon/import/data_unduh.php b/app/views/analisis_respon/import/data_unduh.php new file mode 100644 index 000000000..3a51b6ee6 --- /dev/null +++ b/app/views/analisis_respon/import/data_unduh.php @@ -0,0 +1,199 @@ + + +
    + + + + + + + + + + + "; + echo $pt['no']."
    ".$pt['pertanyaan']; + + if($pt['par']){ + foreach($pt['par'] AS $jb){ + echo "
    ".$jb['kode_jawaban']." ".$jb['jawaban']; + } + } + + echo ""; + + }else + if($pt['id_tipe'] == 2){ + + echo ""; + + } elseif($pt['id_tipe'] == 3) { + echo ""; + }else { + echo ""; + } + } + ?> + + + + + "; + echo $pt['nomor']; + echo ""; + } + ?> + + + + + + + + + + + + "; + } + }else{ + + foreach($indikator as $pt){ + //cumawarna + $bx = ""; + $false = 0; + foreach($data['par'] AS $jawab){ + $isi = ""; + if($pt['id'] == $jawab['id_indikator'] AND $false == 0){ + + if($pt['id_tipe'] == 1){ + $isi = $jawab['kode_jawaban']; + }elseif($pt['id_tipe'] == 2){ + $isi .= $jawab['kode_jawaban']; + }else{ + $isi = $jawab['jawaban']; + } + + //kosong dia + if($isi == ""){ + $bx = "style='background-color:#bbffbb;'"; + } + + //koreksi + if($jawab['korek'] == -1){ + $bx = "style='background-color:#ff9999;'"; + } + + if($pt['id_tipe'] != 2){ + $false = 1; + } + } + } + + echo ""; + } + + } + ?> + + +
    NoL/PDusunRWRTBatas"; + echo $pt['no']."
    ".$pt['pertanyaan']; + + if($pt['par']){ + foreach($pt['par'] AS $jb){ + echo "
    ".$jb['kode_jawaban']." ".$jb['jawaban']; + } + } + + echo "
    "; + echo $pt['no']."
    ".$pt['pertanyaan']; + echo "
    "; + echo $pt['no']."
    ".$pt['pertanyaan']; + echo "
    "; + + $false = 0; + $isi = ""; + foreach($data['par'] AS $jawab){ + if($pt['id'] == $jawab['id_indikator'] AND $false == 0){ + + if($pt['id_tipe'] == 1){ + $isi = $jawab['kode_jawaban']; + }elseif($pt['id_tipe'] == 2){ + $isi .= $jawab['kode_jawaban'].","; + }else{ + $isi = $jawab['jawaban']; + } + + //kosong dia + if($isi == ""){ + $bx = "style='background-color:#bbffbb;'"; + } + + //koreksi + if($jawab['korek'] == -1){ + $isi = "xxx"; + $bx = "style='background-color:#ff9999;'"; + } + + if($pt['id_tipe'] != 2){ + $false = 1; + } + } + } + + //DEL last koma + if($pt['id_tipe'] == 2){ + $jml = strlen($isi); + $isi = substr($isi,0,$jml-1); + } + + echo $isi; + echo "
    +
    \ No newline at end of file diff --git a/app/views/analisis_respon/import/import.php b/app/views/analisis_respon/import/import.php new file mode 100644 index 000000000..4637d309b --- /dev/null +++ b/app/views/analisis_respon/import/import.php @@ -0,0 +1,18 @@ +
    + + + + + + + + +
    + Pastikan format berkas telah sesuai +
    Unggah Form Excel
    +
    +
    + +
    +
    +
    diff --git a/app/views/analisis_respon/table.php b/app/views/analisis_respon/table.php new file mode 100644 index 000000000..d8c46f99c --- /dev/null +++ b/app/views/analisis_respon/table.php @@ -0,0 +1,185 @@ + + + +
    +load->view('analisis_master/left',$data);?> +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + +
    Nama Analisis :
    Subjek Analisis :
    Periode :
    +
    +
    + + + + + + + + + + + + " class="uibutton special tipsy south" title="Fungsi Import harap digunakan secara seksama" target="ajax-modal" rel="window" header="Unduh Form Rujukan Import"> Import +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksi"> "> "> "> "> "> L/PDusunRWRTStatus
    + +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    + +
    + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    diff --git a/app/views/analisis_statistik_jawaban/form.php b/app/views/analisis_statistik_jawaban/form.php new file mode 100644 index 000000000..30874163c --- /dev/null +++ b/app/views/analisis_statistik_jawaban/form.php @@ -0,0 +1,100 @@ +
    + + + +load->view('analisis_master/left',$data);?> + +
    + +
    +
    +

    Form Pertanyaan -

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tipe Pertanyaan +
    + +> +> +> +> +
    +
    Kode Pertanyaan
    Pertanyaan
    Bobot + "> +
    Aksi Analisis +
    + +> +> +
    +
    Kategori Pertanyaan +
    + + +> + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    + +
    diff --git a/app/views/analisis_statistik_jawaban/manajemen_kuisioner_form.php b/app/views/analisis_statistik_jawaban/manajemen_kuisioner_form.php new file mode 100644 index 000000000..eda8ba6d5 --- /dev/null +++ b/app/views/analisis_statistik_jawaban/manajemen_kuisioner_form.php @@ -0,0 +1,71 @@ + + + +
    Data Responden
    +
    +

    Form Manajemen Responden

    +
    +
    +
    +
    + + + + +
     
    +
    >
    + +
    >
    + + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    diff --git a/app/views/analisis_statistik_jawaban/parameter/ajax_form.php b/app/views/analisis_statistik_jawaban/parameter/ajax_form.php new file mode 100644 index 000000000..445f65713 --- /dev/null +++ b/app/views/analisis_statistik_jawaban/parameter/ajax_form.php @@ -0,0 +1,24 @@ + + +
    + + + + + + + + + + + + + + +
    Kode
    Jawaban
    Nilai
    +
    +
    + +
    +
    +
    diff --git a/app/views/analisis_statistik_jawaban/parameter/form.php b/app/views/analisis_statistik_jawaban/parameter/form.php new file mode 100644 index 000000000..22daa0270 --- /dev/null +++ b/app/views/analisis_statistik_jawaban/parameter/form.php @@ -0,0 +1,41 @@ +
    + + +
    + +
    + +
    +
    +

    Form Data Parameter

    +

      Pertanyaan :

    +
    +
    +
    + + + + + + + + + + +
    Jawaban
    Nilai
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    diff --git a/app/views/analisis_statistik_jawaban/parameter/grafik_table.php b/app/views/analisis_statistik_jawaban/parameter/grafik_table.php new file mode 100644 index 000000000..9f8c80254 --- /dev/null +++ b/app/views/analisis_statistik_jawaban/parameter/grafik_table.php @@ -0,0 +1,136 @@ +
    +
    +
    +
    + +

    +
    +
    +
    + + + + + + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + +
    NoJawabanJumlah
    +
    +
    + +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/analisis_statistik_jawaban/parameter/subjek_excel.php b/app/views/analisis_statistik_jawaban/parameter/subjek_excel.php new file mode 100644 index 000000000..14ee4d111 --- /dev/null +++ b/app/views/analisis_statistik_jawaban/parameter/subjek_excel.php @@ -0,0 +1,64 @@ + + + + +Data Subjek Analisis + + + + + +
    +
    +
    + +

    DATA SUBJEK ANALISIS

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNIKNamaDusunRWRTUmurJ. Kelamin
    +
    + +
    + + diff --git a/app/views/analisis_statistik_jawaban/parameter/subjek_table.php b/app/views/analisis_statistik_jawaban/parameter/subjek_table.php new file mode 100644 index 000000000..9b4fa6367 --- /dev/null +++ b/app/views/analisis_statistik_jawaban/parameter/subjek_table.php @@ -0,0 +1,85 @@ +
    + + +
    +
    +
    +
    +
    +
    +

    +

    + +
    + " class="uibutton special tipsy south" title="Cetak Data" target="_blank"> Cetak + " class="uibutton special tipsy south" title="Unduh" target="_blank"> Unduh + + + + + + + + + + +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNIKNamaDusunRWRTUmur (Tahun)J. Kelamin
    " target="_blank">" target="_blank">
    +
    +
    +
    + +
    +
    +
    + + diff --git a/app/views/analisis_statistik_jawaban/parameter/table.php b/app/views/analisis_statistik_jawaban/parameter/table.php new file mode 100644 index 000000000..062e540d6 --- /dev/null +++ b/app/views/analisis_statistik_jawaban/parameter/table.php @@ -0,0 +1,79 @@ + +
    + + +
    +
    +
    +
    +
    diff --git a/app/views/analisis_statistik_jawaban/parameter/table_print.php b/app/views/analisis_statistik_jawaban/parameter/table_print.php new file mode 100644 index 000000000..a2b02ba2a --- /dev/null +++ b/app/views/analisis_statistik_jawaban/parameter/table_print.php @@ -0,0 +1,57 @@ + + + +Data Analisis + + + + + +
    +
    +

    DATA Analisis

    +

    +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNIKNamaDusunRWRTUmurJ. Kelamin
    +
    + + +
    + diff --git a/app/views/analisis_statistik_jawaban/table.php b/app/views/analisis_statistik_jawaban/table.php new file mode 100644 index 000000000..ef4722070 --- /dev/null +++ b/app/views/analisis_statistik_jawaban/table.php @@ -0,0 +1,212 @@ + +
    +load->view('analisis_master/left',$data);?> +
    +
    +
    +
    +

    Analisis Statistik Jawaban -

    +
    +
    +
    +
    +
    + +   + +   + + + + + + + + + + + + +" class="uibutton special tipsy south" title="Cetak Data" target="_blank"> Cetak +" class="uibutton special tipsy south" title="Unduh" target="_blank"> Unduh +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    No">Pertanyaan/Indikator ">Pertanyaan/Indikator ">Pertanyaan/Indikator Total">Kode ">Kode ">Kode JawabanRespondenJumlah">Tipe Pertanyaan ">Tipe Pertanyaan ">Tipe Pertanyaan ">Kategori/Variabel ">Kategori/Variabel ">Kategori/Variabel ">Aksi Analisis ">Aksi Analisis ">Aksi Analisis 
    " > + + .
    + +
    + +
    + +
    + + " >
    + +
    TOTAL
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/analisis_statistik_jawaban/table_excel.php b/app/views/analisis_statistik_jawaban/table_excel.php new file mode 100644 index 000000000..d953210a8 --- /dev/null +++ b/app/views/analisis_statistik_jawaban/table_excel.php @@ -0,0 +1,79 @@ + + + + +Data Analisis Jawaban + + + + + +
    +
    +
    + +

    DATA STATISTIK ANALISIS JAWABAN

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoPertanyaanTotalKodeJawabanRespondenTipe IndikatorKategori IndikatorAksi Analisis
    + + .
    + +
    + +
    + +
    + +
    + +
    +
    + +
    + + diff --git a/app/views/analisis_statistik_jawaban/table_print.php b/app/views/analisis_statistik_jawaban/table_print.php new file mode 100644 index 000000000..793cc3322 --- /dev/null +++ b/app/views/analisis_statistik_jawaban/table_print.php @@ -0,0 +1,70 @@ + + + +Data Analisis + + + + + +
    +
    +

    DATA Analisis

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoPertanyaanTotalKodeJawabanRespondenTipe IndikatorKategori IndikatorAksi Analisis
    + + .
    + +
    + +
    + +
    + +
    + +
    +
    + + +
    + diff --git a/app/views/area/ajax_add_sub_polygon_form.php b/app/views/area/ajax_add_sub_polygon_form.php new file mode 100644 index 000000000..43de37fd5 --- /dev/null +++ b/app/views/area/ajax_add_sub_polygon_form.php @@ -0,0 +1,20 @@ +
    + + + + + + + + + +
    Nama area
    Simbol + +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/area/ajax_wil_dusun.php b/app/views/area/ajax_wil_dusun.php new file mode 100644 index 000000000..185623864 --- /dev/null +++ b/app/views/area/ajax_wil_dusun.php @@ -0,0 +1,105 @@ + + + +
    +
    + + + + + +
    +
    \ + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/area/form.php b/app/views/area/form.php new file mode 100644 index 000000000..f5859b31b --- /dev/null +++ b/app/views/area/form.php @@ -0,0 +1,73 @@ +
    + + +
    +
    +

    Edit Properti / area

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nama area / Porperti
    Kategori + +
    Foto + +
    Ganti Foto + + )* Kosongi jika tidak ingin merubah Foto. +
    Keterangan
    Status +
    + > + + > + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/area/maps.php b/app/views/area/maps.php new file mode 100644 index 000000000..3e3a9ded8 --- /dev/null +++ b/app/views/area/maps.php @@ -0,0 +1,99 @@ + + + +
    +
    + +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/area/sub_line_table.php b/app/views/area/sub_line_table.php new file mode 100644 index 000000000..cebc7a866 --- /dev/null +++ b/app/views/area/sub_line_table.php @@ -0,0 +1,69 @@ + \ No newline at end of file diff --git a/app/views/area/table.php b/app/views/area/table.php new file mode 100644 index 000000000..fceba1361 --- /dev/null +++ b/app/views/area/table.php @@ -0,0 +1,150 @@ + + +
    + + + + + +
    +
    +

    Manajemen Properti / area

    +
    Modul ini masih dalam tahap pengembangan. Ide-ide dan usulan mari kita kumpulkan untuk memperkaya khazanah SID
    +
    +
    +
    +
    +
    +
    +" class="uibutton tipsy south" title="Tambah Data" > Tambah Data Baru +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/data_persil/create.php b/app/views/data_persil/create.php new file mode 100644 index 000000000..706e3f4e6 --- /dev/null +++ b/app/views/data_persil/create.php @@ -0,0 +1,189 @@ + +
    + + + + + + +
    + load->view('data_persil/menu_kiri.php') + ?> + + Pengelolaan Data Persil +
    +
    + + + ".$_SESSION["pesan"]." +
    "; + $_SESSION["success"]==0; + } + + ?> + + + $(document).ready(function() { + var nik = {}; + nik.results = ["; + if($penduduk){ + foreach ($penduduk as $item){ + if(strlen($item["id"])>0){ + echo "{id: ".$item["id"].", name:\"".$item["nama"]."\",info:\"".$item["info"]."\"},\n"; + } + } + } + echo " + ]; + + $('#nik').flexbox(nik, { + resultTemplate: '
    {name}
    {info}
    ', + watermark: \"Cari nama di sini..\", + width: 400, + noResultsText :'Tidak ada no nik yang sesuai..', + onSelect: function() { + $('#'+'main').submit(); + } + }); + }); + +"; +if($persil_detail>0){ + if(isset($persil_detail["id"])){ + $nik = $persil_detail["nik"]; + $nama = $persil_detail["nopersil"]; + $cid = $persil_detail["persil_jenis_id"]; + $sid = $persil_detail["persil_peruntukan_id"]; + $pid = $persil_detail["id_clusterdesa"]; + $kelas = $persil_detail["kelas"]; + $luas = $persil_detail["luas"]; + $sppt = $persil_detail["no_sppt_pbb"]; + $id = $persil_detail["id"]; + }else{ + $nama = ""; + $cid = 0; + $sid = 0; + $pid = 0; + $kelas = ""; + $luas = 0; + $sppt = ""; + $cid = 0; + $id = 0; + } +}else{ + $nama = ""; + $cid = 0; + $sid = 0; + $pid = 0; + $kelas = ""; + $luas = 0; + $sppt = ""; + $cid = 0; + $id = 0; +} +echo " +
    + Formulir Penambahan/Pembaruan Data Peruntukan Persil +
    + Pemilik Persil +
    +
    + +
    +
    +
    +
    +"; +echo form_open('data_persil/simpan_persil')."\n"; +if($pemilik){ + echo " +
    +
    + Data Pemilik + +
    +
    Nama Penduduk
    +
    : ".$pemilik["nama"]."
    +
    NIK
    +
    : ".$pemilik["nik"]."
    +
    Alamat
    +
    : RT ".$pemilik["rt"]." / RT ".$pemilik["rw"]." - ".strtoupper($pemilik["dusun"])."
    +
    +
    +
    + "; +} +echo " +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + + + +
    +
    +"; +echo " +
    "; +?> +
    +
    + +
    + load->view('data_persil/panduan.php'); + ?> +
    +
    \ No newline at end of file diff --git a/app/views/data_persil/create_ext.php b/app/views/data_persil/create_ext.php new file mode 100644 index 000000000..7c0e4b57b --- /dev/null +++ b/app/views/data_persil/create_ext.php @@ -0,0 +1,135 @@ + +
    + + + + + + +
    + load->view('data_persil/menu_kiri.php') + ?> + + Pengelolaan Data Persil +
    +
    + + + ".$_SESSION["pesan"]." +
    "; + $_SESSION["success"]==0; + } + + ?> + +0){ + if(isset($persil_detail["id"])){ + $nik = $persil_detail["nik"]; + $nama = $persil_detail["nopersil"]; + $cid = $persil_detail["persil_jenis_id"]; + $sid = $persil_detail["persil_peruntukan_id"]; + $pid = $persil_detail["id_clusterdesa"]; + $kelas = $persil_detail["kelas"]; + $luas = $persil_detail["luas"]; + $sppt = $persil_detail["no_sppt_pbb"]; + $id = $persil_detail["id"]; + $ext = $persil_detail["alamat_ext"]; + }else{ + $nama = ""; + $cid = 0; + $sid = 0; + $pid = ""; + $kelas = ""; + $luas = 0; + $sppt = ""; + $cid = 0; + $id = 0; + $ext = ""; + } +}else{ + $nama = ""; + $cid = 0; + $sid = 0; + $pid = ""; + $kelas = ""; + $luas = 0; + $sppt = ""; + $cid = 0; + $id = 0; + $ext = ""; +} +echo form_open('data_persil/simpan_persil')."\n"; +echo "
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + + + +
    +
    +"; +echo " +"; +?> +
    +
    + +
    + load->view('data_persil/panduan.php'); + ?> +
    +
    \ No newline at end of file diff --git a/app/views/data_persil/detail.php b/app/views/data_persil/detail.php new file mode 100644 index 000000000..9b72e50db --- /dev/null +++ b/app/views/data_persil/detail.php @@ -0,0 +1,95 @@ + +
    + + + + + + +
    + load->view('data_persil/menu_kiri.php') + ?> + + Pengelolaan Data Persil +
    +
    + + + ".$_SESSION["pesan"]." +
    "; + $_SESSION["success"]==0; + } + + ?> + + +
    + Data Pemilik +
    +
    Nama Penduduk
    +
    : ".$pemilik["nama"]."
    +
    NIK
    +
    : ".$pemilik["nik"]."
    +
    Alamat
    +
    : RT ".$pemilik["rt"]." / RT ".$pemilik["rw"]." - ".strtoupper($pemilik["dusun"])."
    +
    +
    +
    + "; +}else{ + echo " +
    +
    + Data Pemilik +
    +
    NAMA PEMILIK
    +
    : ".$persil_detail["namapemilik"]."
    +
    ALAMAT PEMILIK
    +
    : ".$persil_detail["alamat_ext"]."
    +
    +
    +
    + "; +} +echo " +
    +
    + Detail Persil +
    +
    Nomor Persil
    +
    : ".$persil_detail["nopersil"]."
    +
    Keterangan Persil
    +
    : ".$persil_jenis[$persil_detail["persil_jenis_id"]][0]." +
    ".$persil_jenis[$persil_detail["persil_jenis_id"]][1]."
    +
    Luas Tanah
    +
    : ".$persil_detail["luas"]." m2
    +
    Kelas Tanah
    +
    : ".$persil_detail["kelas"]."
    +
    Peruntukan
    +
    : ".$persil_peruntukan[$persil_detail["persil_peruntukan_id"]][0]." +
    ".$persil_peruntukan[$persil_detail["persil_peruntukan_id"]][1]."
    +
    Nomor SPPT PBB
    +
    : ".$persil_detail["no_sppt_pbb"]."
    +
    Lokasi
    +
    : RT ".$persil_detail["rt"]." / RW ".$persil_detail["rt"]." - ".$persil_detail["dusun"]."
    +
    +
    +
    "; +?> +
    + + +
    + load->view('data_persil/panduan.php'); + ?> +
    +
    \ No newline at end of file diff --git a/app/views/data_persil/edit.php b/app/views/data_persil/edit.php new file mode 100644 index 000000000..cfac39789 --- /dev/null +++ b/app/views/data_persil/edit.php @@ -0,0 +1,129 @@ + +
    + + + + + + +
    + load->view('program_bantuan/menu_kiri.php') + ?> + + Form Penulisan Program Bantuan +
    + +
    + Ada Kesalahan +
    +
    + ".validation_errors()." +
    +
    + "; + } + + if($_SESSION["success"] == 1){ + echo "Simpan Berhasil"; + } + $data= $program[0]; + $cid = $data["sasaran"]; + ?> + +
    + + +
    +
    + + "> +
    +
    + + +
    +
    + + Mulai "> + s.d "> +
    + +
    +
    + + +
    +
    + + +
    + load->view('program_bantuan/panduan.php') + ?> +
    + + + +
    \ No newline at end of file diff --git a/app/views/data_persil/import.php b/app/views/data_persil/import.php new file mode 100644 index 000000000..b35f86be1 --- /dev/null +++ b/app/views/data_persil/import.php @@ -0,0 +1,34 @@ + +
    +
    + + + + + + + + + +
    Contoh Format Data + Contoh urutan format dapat dilihat pada tautan berikut
    +
    Upload Fil XLS + (File harus dalam format .xls) +
    +
    +
    +
    +
    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/data_persil/menu_kiri.php b/app/views/data_persil/menu_kiri.php new file mode 100644 index 000000000..986e33d88 --- /dev/null +++ b/app/views/data_persil/menu_kiri.php @@ -0,0 +1,39 @@ + +Menu Pendataan Persil + +
    + Jenis Persil + +
    +
    + Peruntukan Persil + +
    \ No newline at end of file diff --git a/app/views/data_persil/panduan.php b/app/views/data_persil/panduan.php new file mode 100644 index 000000000..2454c2aa4 --- /dev/null +++ b/app/views/data_persil/panduan.php @@ -0,0 +1,25 @@ + +

    Keterangan

    +

    Modul Data Persil adalah modul untuk pengelolaan data dokumen tentang kepemilikan lahan.

    +

    Panduan

    +

    Cara menyimpan/memperbarui data Persil adalah dengan mengisikan formulir yang terdapat dari menu Tulis Data Persil Baru:

    +

    +

      +
    1. Kolom Data Pemilik +

      Tuliskan NIK atau Nama Pemilik Persil. Sistem akan memberikan pilihan sesuai dengan data yang tersimpan di SID

      +
    2. +
    3. Kolom Nomor Persil +

      Nomor Persil wajib diisi

      +
    4. +
    5. Kolom Keterangan Surat +

      Pilih sesuai dengan jenis surat persil

      +
    6. +
    7. Kolom Luas Tanah +

      Isikan dengan menggunakan angka saja. Bila data luasan tidak bulat, gunakan tanda titik(.) untuk menggantikan data koma pada nilai desimal. Nilai luasan dalam satuan meter persegi (m2)

      +
    8. +
    9. Kolom Nomor SPPT PBB +

      Isikan sesuai dengan data nomor SPPT PBB atas persil tersebut

      +
    10. +
    +

    \ No newline at end of file diff --git a/app/views/data_persil/persil.php b/app/views/data_persil/persil.php new file mode 100644 index 000000000..8dffb6a6a --- /dev/null +++ b/app/views/data_persil/persil.php @@ -0,0 +1,95 @@ + + +
    + + + + + + +
    + load->view('data_persil/menu_kiri.php') + ?> + + Daftar Data Persil +
    +
    + +
    +
    + + +
    +
    + ".$_SESSION["pesan"]."
    "; + $_SESSION["success"]=0; + $_SESSION["pesan"]=""; + } + ?> + +0){ + echo " +
    + + + + + + + + + "; + $nomer =0; + foreach($persil as $key=>$item){ + $nomer++; + echo " + + + + + + + + "; + } + echo " + +
    #Nama PemilikNIKNO PersilLuas (m2)Nomor SPPT PBB
    ".$nomer."
    + Detail + + +
    ".$item["namapemilik"]."".$item["nik"]."".$item["nopersil"]."".$item["luas"]."".$item["no_sppt_pbb"]."
    +
    + "; + } +}else{ + echo " +
    +

    Belum ada Data

    +
    Silakan ditambahkan data persil dengan menggunakan formulir dari menu Tambah Data Persil Baru
    +
    + "; +} +?> +
    +
    + +
    + load->view('data_persil/panduan.php'); + ?> +
    +
    diff --git a/app/views/data_persil/persil_jenis.php b/app/views/data_persil/persil_jenis.php new file mode 100644 index 000000000..2f6b5fd45 --- /dev/null +++ b/app/views/data_persil/persil_jenis.php @@ -0,0 +1,97 @@ + +
    + + + + + + +
    + load->view('data_persil/menu_kiri.php') + ?> + + Pengelolaan Data Jenis Persil +
    +
    + + + + + +
    +
    + + +
    +
    +
    + + + +
    +
    +"; +echo ""; +?> +0){ + echo " +
    + + + + "; + $nomer =0; + foreach($persil_jenis as $key=>$item){ + $nomer++; + echo " + + + + + "; + } + echo " + +
    #NamaKeterangan
    ".$nomer." +
    + Detail + + +
    +
    ".$item[0]."".$item[1]."
    +
    + "; + } +}else{ + echo " +
    +

    Belum ada Data

    +
    Silakan ditambahkan data Jenis Persil dengan menggunakan formulir dari menu Tambah Data Jenis Persil
    +
    + "; +} +?> +
    +
    + +
    + load->view('data_persil/panduan.php'); + ?> +
    +
    diff --git a/app/views/data_persil/persil_peruntukan.php b/app/views/data_persil/persil_peruntukan.php new file mode 100644 index 000000000..a529497e0 --- /dev/null +++ b/app/views/data_persil/persil_peruntukan.php @@ -0,0 +1,100 @@ + +
    + + + + + + +
    + load->view('data_persil/menu_kiri.php') + ?> + + Pengelolaan Data Peruntukan Persil +
    +
    + + Formulir Penambahan/Pembaruan Data Peruntukan Persil +"; +echo form_open('data_persil/persil_peruntukan')."\n"; +echo " +
    + + +
    +
    + + +
    +
    +
    + + + +
    +
    +"; +echo " +"; +?> +0){ + echo " +
    + + + + "; + $nomer =0; + foreach($persil_peruntukan as $key=>$item){ + $nomer++; + echo " + + + + + "; + } + echo " + +
    #NamaKeterangan
    ".$nomer." +
    + Detail + + +
    +
    ".$item[0]."".$item[1]."
    +
    + "; + } +}else{ + echo " +
    +

    Belum ada Data

    +
    Silakan ditambahkan data Jenis Persil dengan menggunakan formulir dari menu Tambah Data Jenis Persil
    +
    + "; +} +?> +
    +
    +
    +
    + load->view('data_persil/panduan.php'); + ?> +
    +
    diff --git a/app/views/database/backup.php b/app/views/database/backup.php new file mode 100644 index 000000000..8795e8378 --- /dev/null +++ b/app/views/database/backup.php @@ -0,0 +1,22 @@ + +
    +
    +
    +
    +

    Backup / Restore Database SID

    +
    +
    +
    +

    Backup seluruh database SID (.sql) yang bisa diimport melalui perangkat PhpMyAdmin

    + /exec_backup" target="confirm" message="Sistem akan melakukan proses backup database SID setelah Anda menekan tombol YA. Simpan file (.sql) tersebut di tempat yang aman." header="Backup Database SID">Backup Database +
    +
    +

    + Proses restore database SID disarankan menggunakan perangkat PhpMyAdmin untuk meminimalkan kesalahan. Silakan klik tombol berikut untuk masuk ke halaman PhpMyadmin. +

    + + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/database/export.php b/app/views/database/export.php new file mode 100644 index 000000000..1e25cc05c --- /dev/null +++ b/app/views/database/export.php @@ -0,0 +1,81 @@ +load->database(); + + $mysqlUserName = $CI->db->username; + $mysqlPassword = $CI->db->password; + $mysqlHostName = $CI->db->hostname; + $DbName = $CI->db->database;; + $backup_name = "sid.sql"; + + Export_Database($mysqlHostName,$mysqlUserName,$mysqlPassword,$DbName, $tables=false, $backup_name=false ); + + function Export_Database($host,$user,$pass,$name, $tables=false, $backup_name=false ) + { + $mysqli = new mysqli($host,$user,$pass,$name); + $mysqli->select_db($name); + $mysqli->query("SET NAMES 'utf8'"); + + $queryTables = $mysqli->query('SHOW TABLES'); + while($row = $queryTables->fetch_row()) + { + $target_tables[] = $row[0]; + } + if($tables !== false) + { + $target_tables = array_intersect( $target_tables, $tables); + } + foreach($target_tables as $table) + { + $result = $mysqli->query('SELECT * FROM '.$table); + $fields_amount = $result->field_count; + $rows_num=$mysqli->affected_rows; + $res = $mysqli->query('SHOW CREATE TABLE '.$table); + $TableMLine = $res->fetch_row(); + $content = (!isset($content) ? '' : $content) . "\n\n".$TableMLine[1].";\n\n"; + + for ($i = 0, $st_counter = 0; $i < $fields_amount; $i++, $st_counter=0) + { + while($row = $result->fetch_row()) + { //when started (and every after 100 command cycle): + if ($st_counter%100 == 0 || $st_counter == 0 ) + { + $content .= "\nINSERT INTO ".$table." VALUES"; + } + $content .= "\n("; + for($j=0; $j<$fields_amount; $j++) + { + $row[$j] = str_replace("\n","\\n", addslashes($row[$j]) ); + if (isset($row[$j])) + { + $content .= '"'.$row[$j].'"' ; + } + else + { + $content .= '""'; + } + if ($j<($fields_amount-1)) + { + $content.= ','; + } + } + $content .=")"; + if ( (($st_counter+1)%100==0 && $st_counter!=0) || $st_counter+1==$rows_num) + { + $content .= ";"; + } + else + { + $content .= ","; + } + $st_counter=$st_counter+1; + } + } $content .="\n\n\n"; + } + $_SESSION['success'] = 1; + $backup_name = $backup_name ? $backup_name : $name."_(".date('H-i-s')."_".date('d-m-Y').")_".rand(1,11111111).".sql"; + header('Content-Type: application/octet-stream'); + header("Content-Transfer-Encoding: Binary"); + header("Content-disposition: attachment; filename=\"".$backup_name."\""); + echo $content; exit; + } \ No newline at end of file diff --git a/app/views/dokumen/form.php b/app/views/dokumen/form.php new file mode 100644 index 000000000..954c4e557 --- /dev/null +++ b/app/views/dokumen/form.php @@ -0,0 +1,47 @@ +
    + + +
    +
    +

    Form Manajemen Dokumen

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + +
    Judul Dokumen
    Dokumen +
    + +
    +
    Upload Dokumen (Kosongkan jika tidak ingin mengubah dokumen)
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/dokumen/table.php b/app/views/dokumen/table.php new file mode 100644 index 000000000..ddb4d1155 --- /dev/null +++ b/app/views/dokumen/table.php @@ -0,0 +1,139 @@ + +
    + + + + +
    +
    +

    Manajemen Dokumen

    +
    +
    +
    +
    +
    +
    +  Tambah Dokumen Baru +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/errors/cli/error_404.php b/app/views/errors/cli/error_404.php new file mode 100644 index 000000000..6984b61e9 --- /dev/null +++ b/app/views/errors/cli/error_404.php @@ -0,0 +1,8 @@ + + +An uncaught Exception was encountered + +Type: +Message: +Filename: getFile(), "\n"; ?> +Line Number: getLine(); ?> + + + +Backtrace: +getTrace() as $error): ?> + + File: + Line: + Function: + + + + diff --git a/app/views/errors/cli/error_general.php b/app/views/errors/cli/error_general.php new file mode 100644 index 000000000..6984b61e9 --- /dev/null +++ b/app/views/errors/cli/error_general.php @@ -0,0 +1,8 @@ + + +A PHP Error was encountered + +Severity: +Message: +Filename: +Line Number: + + + +Backtrace: + + + File: + Line: + Function: + + + + diff --git a/app/views/errors/cli/index.html b/app/views/errors/cli/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/views/errors/cli/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/views/errors/html/error_404.php b/app/views/errors/html/error_404.php new file mode 100644 index 000000000..756ea9d62 --- /dev/null +++ b/app/views/errors/html/error_404.php @@ -0,0 +1,64 @@ + + + + +404 Page Not Found + + + +
    +

    + +
    + + \ No newline at end of file diff --git a/app/views/errors/html/error_db.php b/app/views/errors/html/error_db.php new file mode 100644 index 000000000..f5a43f638 --- /dev/null +++ b/app/views/errors/html/error_db.php @@ -0,0 +1,64 @@ + + + + +Database Error + + + +
    +

    + +
    + + \ No newline at end of file diff --git a/app/views/errors/html/error_exception.php b/app/views/errors/html/error_exception.php new file mode 100644 index 000000000..87848866a --- /dev/null +++ b/app/views/errors/html/error_exception.php @@ -0,0 +1,32 @@ + + +
    + +

    An uncaught Exception was encountered

    + +

    Type:

    +

    Message:

    +

    Filename: getFile(); ?>

    +

    Line Number: getLine(); ?>

    + + + +

    Backtrace:

    + getTrace() as $error): ?> + + + +

    + File:
    + Line:
    + Function: +

    + + + + + + +
    \ No newline at end of file diff --git a/app/views/errors/html/error_general.php b/app/views/errors/html/error_general.php new file mode 100644 index 000000000..fc3b2ebad --- /dev/null +++ b/app/views/errors/html/error_general.php @@ -0,0 +1,64 @@ + + + + +Error + + + +
    +

    + +
    + + \ No newline at end of file diff --git a/app/views/errors/html/error_php.php b/app/views/errors/html/error_php.php new file mode 100644 index 000000000..b146f9c5b --- /dev/null +++ b/app/views/errors/html/error_php.php @@ -0,0 +1,33 @@ + + +
    + +

    A PHP Error was encountered

    + +

    Severity:

    +

    Message:

    +

    Filename:

    +

    Line Number:

    + + + +

    Backtrace:

    + + + + +

    + File:
    + Line:
    + Function: +

    + + + + + + + +
    \ No newline at end of file diff --git a/app/views/errors/html/index.html b/app/views/errors/html/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/views/errors/html/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/views/errors/index.html b/app/views/errors/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/views/errors/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/views/export/exp.php b/app/views/export/exp.php new file mode 100644 index 000000000..21f21939a --- /dev/null +++ b/app/views/export/exp.php @@ -0,0 +1,64 @@ +
    + + + +
    +
    +
    +
    +
    +

    Export Data Desa

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + +
    Export Data Penduduk (.sid) + +
    Export Data Analisis (.sid) + +
    Export Data Penduduk (.xls) + +
    Export Data Penduduk (.csv) + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/export/penduduk_csv.php b/app/views/export/penduduk_csv.php new file mode 100644 index 000000000..c4df4723f --- /dev/null +++ b/app/views/export/penduduk_csv.php @@ -0,0 +1,11 @@ + +Dusun,RW,RT,Nama,Nomor KK,Nomor NIK,Jenis Kelamin,Tempat Lahir,Tanggal Lahir,Agama,Pendidikan (dLm KK),Pendidikan (sdg ditemph),Pekerjaan,Kawin,Hub. Keluarga,Kewarganegaraan,NIK Ayah,Nama Ayah,NIK Ibu,Nama Ibu,Gol. Darah + +,,,"",,,,,,,,,,,,,,"",,"", + \ No newline at end of file diff --git a/app/views/export/penduduk_excel.php b/app/views/export/penduduk_excel.php new file mode 100644 index 000000000..1b1513695 --- /dev/null +++ b/app/views/export/penduduk_excel.php @@ -0,0 +1,82 @@ + + + + +Data Penduduk + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    DusunRWRTNamaNomor KKNomor NIKJenis KelaminTempat LahirTanggal LahirAgamaPendidikan (dLm KK)Pendidikan (sdg ditemph)PekerjaanKawinHub. KeluargaKewarganegaraanNama AyahNama IbuGol. Darah
    +
    +
    + + diff --git a/app/views/feed.php b/app/views/feed.php new file mode 100644 index 000000000..4f51c7240 --- /dev/null +++ b/app/views/feed.php @@ -0,0 +1,37 @@ + + + Desa ". $data_config["nama_desa"] ." + ". base_url() ." + Situs Web Desa ". $data_config["nama_desa"] ." Kec. ". $data_config["nama_kecamatan"] ." Kab. ". $data_config["nama_kabupaten"] ." - ". $data_config["nama_propinsi"] ." + ID + Sistem Informasi Desa v". VERSI_SID ." + ".date(DATE_RFC2822)." + + Desa ". $data_config["nama_desa"] ." + ". base_url("assets/files/logo/".$data_config["logo"]."") ." + ". base_url() ." + + + "; +foreach($feeds as $key=>$item) +{ + if(strlen(trim($item["judul"]))>0) + { + $kategori = (strlen(trim($item["kategori"]))==0)? "Artikel":$item["kategori"]; + $details .= " + + ".htmlspecialchars($item["judul"])." + ".$item["url"]." + Situs Web Desa ". $data_config["nama_desa"] ." + ".date(DATE_RFC2822,strtotime($item["tgl"]))." + + + ".htmlspecialchars($item["url"])." + + \n"; + } +} +$details .=" +"; +printf($details); \ No newline at end of file diff --git a/app/views/footer.php b/app/views/footer.php new file mode 100644 index 000000000..72fe981f3 --- /dev/null +++ b/app/views/footer.php @@ -0,0 +1,8 @@ +
    + + + + diff --git a/app/views/gallery/form.php b/app/views/gallery/form.php new file mode 100644 index 000000000..1b448f631 --- /dev/null +++ b/app/views/gallery/form.php @@ -0,0 +1,47 @@ +
    + + +
    +
    +

    Form Manajemen Gallery

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + +
    Nama Album
    Gambar +
    + +
    +
    Upload Gambar (Kosongi jika tidak ingin mengubah gambar)
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/gallery/form_sub_gallery.php b/app/views/gallery/form_sub_gallery.php new file mode 100644 index 000000000..85210b4ea --- /dev/null +++ b/app/views/gallery/form_sub_gallery.php @@ -0,0 +1,47 @@ +
    + + +
    +
    +

    Form Sub Gallery

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + +
    Judul Gambar
    Judul Gambar +
    + +
    +
    Upload Gambar (Kosongi jika tidak ingin mengubah gambar)
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/gallery/sub_gallery_table.php b/app/views/gallery/sub_gallery_table.php new file mode 100644 index 000000000..bf0f98b49 --- /dev/null +++ b/app/views/gallery/sub_gallery_table.php @@ -0,0 +1,147 @@ + +
    + + + + +
    +
    +
    +
    +
    +
    +

    Manajemen Gallery Album

    +
    +
    + " class="uibutton tipsy south" title="Tambah Data" > Tambah Gambar Baru + +
    +
    +
    + +
    +
    +
    +
    +
    + " class="uibutton">Kembali + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/gallery/table.php b/app/views/gallery/table.php new file mode 100644 index 000000000..fc46c58dc --- /dev/null +++ b/app/views/gallery/table.php @@ -0,0 +1,158 @@ + + + + +
    + + + + +
    +
    +

    Manajemen Gallery

    +
    +
    +
    +
    +
    +
    +  Tambah Album Baru + +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/garis/ajax_add_sub_line_form.php b/app/views/garis/ajax_add_sub_line_form.php new file mode 100644 index 000000000..b0f708e5e --- /dev/null +++ b/app/views/garis/ajax_add_sub_line_form.php @@ -0,0 +1,20 @@ +
    + + + + + + + + + +
    Nama garis
    Simbol + +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/garis/form.php b/app/views/garis/form.php new file mode 100644 index 000000000..82e8728ae --- /dev/null +++ b/app/views/garis/form.php @@ -0,0 +1,73 @@ +
    + + +
    +
    +

    Edit Properti / garis

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    Nama garis / Porperti
    Kategori + +
    Foto +
    + +
    +
    Ganti Foto + + )* Kosongi jika tidak ingin merubah Foto. +
    Status +
    + > + + > + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/garis/maps.php b/app/views/garis/maps.php new file mode 100644 index 000000000..fb2179da8 --- /dev/null +++ b/app/views/garis/maps.php @@ -0,0 +1,103 @@ + + + +
    +
    + +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/garis/sub_line_table.php b/app/views/garis/sub_line_table.php new file mode 100644 index 000000000..e0231c6a1 --- /dev/null +++ b/app/views/garis/sub_line_table.php @@ -0,0 +1,69 @@ + \ No newline at end of file diff --git a/app/views/garis/table.php b/app/views/garis/table.php new file mode 100644 index 000000000..6ab1c02c1 --- /dev/null +++ b/app/views/garis/table.php @@ -0,0 +1,150 @@ + + +
    + + + + + +
    +
    +

    Manajemen Properti / garis

    +
    Modul ini masih dalam tahap pengembangan. Ide-ide dan usulan mari kita kumpulkan untuk memperkaya khazanah SID
    +
    +
    +
    +
    +
    +
    +" class="uibutton tipsy south" title="Tambah Data" > Tambah Data Baru +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/garis/table2.php b/app/views/garis/table2.php new file mode 100644 index 000000000..02814270e --- /dev/null +++ b/app/views/garis/table2.php @@ -0,0 +1,148 @@ + +
    + + + + + +
    +
    +

    Manajemen Properti / garis

    +
    +
    +
    +
    +
    +
    +" class="uibutton tipsy south" title="Tambah Data" > Tambah Data Baru +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/gis/ajax_adv_search_form.php b/app/views/gis/ajax_adv_search_form.php new file mode 100644 index 000000000..9720b725f --- /dev/null +++ b/app/views/gis/ajax_adv_search_form.php @@ -0,0 +1,111 @@ + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nama
    Umur -
    Dusun +
    Jenis Kelamin + +
    Pekerjaan +
    Status Perkawinan +
    Agama + +
    Pendidikan Terakhir + +
    Status Penduduk +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/gis/header.php b/app/views/gis/header.php new file mode 100644 index 000000000..eb448ae61 --- /dev/null +++ b/app/views/gis/header.php @@ -0,0 +1,109 @@ + + + + +Sistem Informasi Desa + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/views/gis/maps.php b/app/views/gis/maps.php new file mode 100644 index 000000000..d234b9497 --- /dev/null +++ b/app/views/gis/maps.php @@ -0,0 +1,321 @@ + + +
    + +
    +
    +
    + + + + + + + + + + + + + +" class="uibutton tipsy south" title="Clear Pencarian" style=""> Clear + +
    +
    +
    \ No newline at end of file diff --git a/app/views/gis/menu.php b/app/views/gis/menu.php new file mode 100644 index 000000000..9778ec44b --- /dev/null +++ b/app/views/gis/menu.php @@ -0,0 +1,37 @@ + \ No newline at end of file diff --git a/app/views/header-gis.php b/app/views/header-gis.php new file mode 100644 index 000000000..7fbbcbd44 --- /dev/null +++ b/app/views/header-gis.php @@ -0,0 +1,105 @@ + + + + + +SID - Desa <?php echo $desa['nama_desa'] ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +header_model->init_penduduk(); ?> + + + + +
    + + + + + + + + + + +
    +
    + + + + + + +
    +
    diff --git a/app/views/header-min.php b/app/views/header-min.php new file mode 100644 index 000000000..a82628f34 --- /dev/null +++ b/app/views/header-min.php @@ -0,0 +1,38 @@ + + + + + SID - Desa <?php echo $desa['nama_desa'] ?> + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    diff --git a/app/views/header.php b/app/views/header.php new file mode 100644 index 000000000..5254cf7e7 --- /dev/null +++ b/app/views/header.php @@ -0,0 +1,83 @@ + + + + + SID - Desa <?php echo $desa['nama_desa'] ?> + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    +
    + + + + + + +
    +
    diff --git a/app/views/home/about.php b/app/views/home/about.php new file mode 100644 index 000000000..c3568c2e6 --- /dev/null +++ b/app/views/home/about.php @@ -0,0 +1,59 @@ +
    +Anda sedang menggunakan aplikasi Sistem Informasi Desa (SID) versi
    +
    +
    APAKAH SISTEM INFORMASI (SID)?

    +
    +Aplikasi Sistem Informasi Desa (SID) merupakan bagian dari prakarsa pengembangan seperangkat alat dan proses pemanfaatan data dan informasi untuk mendukung pengelolaan sumberdaya berbasis komunitas di tingkat desa. Prakarsa ini dikelola oleh lembaga swadaya masyarakat Yayasan Combine Resource Institution (CRI) bersama jejaring organisasi mitra, komunitas, dan lembaga pemerintahan lintas sektor dan lintas daerah di Indonesia sejak tahun 2009. +
    +
    +PERSETUJUAN LISENSI
    +
    +Perangkat lunak ini beserta semua hak kekayaan intelektual yang terkait adalah milik Yayasan Combine Resource Institution, yang kemudian disebut CRI, yang berkedudukan di Jl. K.H. Ali Maksum No. 183 Pelemsewu, Panggungharjo, Sewon, Bantul, Daerah Istimewa Yogyakarta, Indonesia. +
    +
    +Sistem Informasi Desa (SID) secara teknis terdiri atas "perangkat lunak" (kode sumber program dan aplikasi-aplikasi turunannya) dan "layanan" (sistem perangkat lunak klien dan server yang membentuk satu kesatuan fungsi). Perangkat lunak dan kode sumber Sistem Informasi Desa ini tidak untuk komersial, bersumber terbuka, serta berlisensi GNU GPL Versi 3 (Periksa lebih lanjut di http://www.gnu.org/licenses/gpl.html). Penggunaan layanan Sistem Informasi Desa diizinkan mengikuti ketentuan yang dijelaskan di ketentuan ini. +
    +
    +Layanan Sistem Informasi Desa (SID) hanya ditujukan untuk penggunaan pribadi atas nama kelembagaan berupa lembaga pemerintah desa/kelurahan, yang dapat dikoordinasikan oleh dan/atau bersama pemerintah kabupaten/kota setempat di wilayah Republik Indonesia. Jika Anda ingin menggunakan Sistem Informasi Desa (SID) untuk tujuan apa pun selain itu atau punya kebutuhan tambahan, kami menawarkan layanan tambahan yang akan diatur dalam kesepakatan yang khusus/berbeda. Untuk informasi lebih lanjut, silakan kirim email ke office[at]combine.or.id. +
    +
    +Ketentuan Penggunaan
    +
    +Dengan menggunakan layanan Sistem Informasi Desa (SID), Anda setuju tidak akan menggunakannya dengan cara apa pun yang melanggar hukum di Republik Indonesia atau hak pihak ketiga. +
    +
    +Penggunaan Pribadi atau Tertentu
    +
    +Dengan menggunakan Sistem Informasi Desa (SID), Anda setuju menggunakan layanan ini hanya untuk penggunaan pribadi, non-komersial. Anda tidak diperkenankan (dan tidak diperkenankan membolehkan pihak ketiga) meminjamkan, menyewakan, mengadakan sublisensi, menjual, menjual kembali, atau melakukan segala bentuk distribusi layanan Sistem Informasi Desa (SID) lainnya untuk tujuan komersial. +
    +
    +Pernyataan tentang Batasan Kewajiban
    +
    +Layanan Sistem Informasi Desa (SID) diberikan oleh CRI "sebagaimana adanya" dan tanpa disertai jaminan atau kewajiban apa pun, tersurat maupun tersirat. Sistem Informasi Desa (SID) menyangkal semua jaminan dan kewajiban yang berkaitan dengan penggunaan layanan ini meliputi cedera pribadi maupun segala bentuk kerugian pribadi atau komersial yang bersifat insidental, khusus, tak langsung, atau sebab-akibat, termasuk kehilangan data dan gangguan bisnis. +
    +
    +Layanan Penggunaan
    +
    +Penggunaan layanan Sistem Informasi Desa (SID) akan terhubung pada sistem informasi jaringan desa-desa penerap SID yang dikelola oleh CRI untuk kepentingan layanan administrasi dan sertifikasi pengguna, layanan dukungan teknis pengguna, dan analisis kebutuhan pengembangan ke depan. +
    +
    +Penghentian Layanan; Pelanggaran Ketentuan Layanan
    +
    +CRI dengan Sistem Informasi Desa (SID) berhak atas keputusannya sendiri untuk mengakhiri lisensi ini kapan pun dengan atau tanpa alasan apa pun dan tanpa berakibat hukuman. Dengan menggunakan Sistem Informasi Desa (SID), Anda setuju tidak akan menggunakan layanan ini dengan cara apa pun yang melanggar Ketentuan Penggunaan dan Persetujuan Lisensi. +
    +
    +Sebagai pengguna, Anda bebas membatalkan persetujuan lisensi ini kapan pun dengan menghentikan pemakaian sebagian dan seluruh layanan Sistem Informasi Desa (SID) serta menghapus semua jejak penggunaan perangkat lunak ini dari perangkat Anda. +
    +
    +
    +KONTAK DAN INFORMASI
    +
    +Combine Resource Institution
    +Alamat: Jl. K.H. Ali Maksum No. 183 Panggungharjo, Sewon, Bantul, D.I. Yogyakarta 55188 INDONESIA
    +Telp. / Faks. : +62 274 - 411 123
    +e-mail: office[at]combine.or.id
    +Twitter: @combineri
    +Group Facebook: Sistem Informasi Desa
    +Website: http://combine.or.id
    +
    +
    \ No newline at end of file diff --git a/app/views/home/ajax_kantor_desa_maps.php b/app/views/home/ajax_kantor_desa_maps.php new file mode 100644 index 000000000..f46c43517 --- /dev/null +++ b/app/views/home/ajax_kantor_desa_maps.php @@ -0,0 +1,67 @@ + + +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/app/views/home/ajax_wilayah_desa_maps.php b/app/views/home/ajax_wilayah_desa_maps.php new file mode 100644 index 000000000..a3241f150 --- /dev/null +++ b/app/views/home/ajax_wilayah_desa_maps.php @@ -0,0 +1,95 @@ + + + +
    +
    +
    + + +
    +
    \ No newline at end of file diff --git a/app/views/home/desa.php b/app/views/home/desa.php new file mode 100644 index 000000000..ce72da2dc --- /dev/null +++ b/app/views/home/desa.php @@ -0,0 +1,29 @@ +
    + + + +
    +
    + +
    +
    +
    +
    +

    Tentang SID

    +
    +
    +
    + load->view('home/about.php');?> +
    +
    +
    +
    + Kembali +
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/home/konfigurasi_form.php b/app/views/home/konfigurasi_form.php new file mode 100644 index 000000000..7fda0d252 --- /dev/null +++ b/app/views/home/konfigurasi_form.php @@ -0,0 +1,103 @@ +
    + + +
    +
    + +
    +
    +

    Pengaturan

    +
    +
    " method="POST" enctype="multipart/form-data"> +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nama Desa Kode Kode POS
    Nama Kepala Desa
    NIP Kepala Desa
    Alamat Kantor Desa
    e-mail Desa
    Nama Kecamatan Kode
    Nama Camat
    NIP Camat
    Nama Kabupaten Kode
    Nama Provinsi Kode
    Lambang +
    + + + + + +
    +
    Ganti Lambang (Kosongkan jika tidak ingin mengubah lambang)
    Lokasi Kantor / Wilayah Desa dalam Peta + " class="uibutton confirm" target="ajax-modalz" rel="window-lok" header="Lokasi " title="Lokasi ">Kantor Desa

    + " class="uibutton confirm" target="ajax-modalz" rel="window-wil" header="Wilayah " title="Wilayah ">Wilayah Desa +
    Google API Key
    *) Kode unik yang didapatkan dari pendaftaran akun Google Maps. Klik di sini untuk petunjuk lebih jelas: Google API Key
    +
    + +
    +
    + + + + + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/home/nav.php b/app/views/home/nav.php new file mode 100644 index 000000000..62f909914 --- /dev/null +++ b/app/views/home/nav.php @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/app/views/home/pengurus.php b/app/views/home/pengurus.php new file mode 100644 index 000000000..3b8c94b49 --- /dev/null +++ b/app/views/home/pengurus.php @@ -0,0 +1,81 @@ + +
    + + + +
    +
    + +
    +
    +
    +
    +

    Pemerintah Desa

    +
    +  Tambah Perangkat Desa +
    +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksiNamaN.I.PJabatan 
    + + +  
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    diff --git a/app/views/home/pengurus_form.php b/app/views/home/pengurus_form.php new file mode 100644 index 000000000..21eccecc0 --- /dev/null +++ b/app/views/home/pengurus_form.php @@ -0,0 +1,58 @@ +
    + + + + +
    +
    +
    +
    +
    +

    Form Perangkat Desa

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    Nama
    NIP
    NIK
    Jabatan
    Status +
    + > + + > + +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    diff --git a/app/views/import/imp.php b/app/views/import/imp.php new file mode 100644 index 000000000..ecb8ad1d8 --- /dev/null +++ b/app/views/import/imp.php @@ -0,0 +1,129 @@ +
    + +
    +
    +

    Import Database Kependudukan

    +
    +
    +
    + + +

    Import Data Penduduk dan Keluarga (Basis NIK dan Nomor KK)

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + Mempersiapkan database dengan tipe spreadsheet (.xls) untuk diimport ke dalam database SID: +
    +

      +
    1. Pastikan format data yang akan diimport sudah sesuai dengan aturan import data: +
      +
      -> Boleh menggunakan tanda ' (petik satu) dalam penggunaan nama, +
      -> Struktur RT RW, jika tidak ada dalam struktur wilayah desa diganti dengan tanda (min/strip/dash) +
      -> Data (Jenis Kelamin, Agama, Pendidikan, Pekerjaan, Status Perkawinan, Status Hubungan dalam Keluarga, Kewarganegaraan, Golongan darah, Jamkesmas, raskin, klasifikasi sosial ekonomi) terwakili dengan Kode Nomor. Misal : laki-laki terwakili dengan nomor 1 dan perempuan dengan nomor 2
      +
      +
    2. Simpan (Save) file spreadsheet sebagai .xls file (jika Anda memakai excel 2007 gunakan Save As pilih format .xls) +
    3. Pastikan tipe spreadsheet berekstensi .xls format Excel 2003 +
    4. Data yang dibutuhkan untuk import dengan memenuhi aturan data. +
    + UNDUH LAMPIRAN : Aturan Data + Contoh Format
    +

    +
    +   +
    + Pilih File .xls: + + + + Import Data Penduduk + +   +
    +

    Jumlah Data Gagal +

    + + +
    +

    Letak Baris Data Gagal: +

    + + +
    +

    Total Data Berhasil: +

    + + +
    +
    + +
    +

    Import Pengelompokan Data Rumah Tangga

    +
    + + + + + + + + + + +
    +

    + Pengelompokan data penduduk yang sudah tersimpan di dalam database SID, sehingga terkelompokkan secara otomatis berdasarkan nomor urut rumah tangga: +
    +

      +
    1. Pastikan format data yang akan diimport sudah sesuai dengan aturan import data: +
    2. Simpan (Save) file speradsheet sebagai .xls file (jika Anda memakai excel 2007 gunakan Save As pilih format .xls) +
    3. Pastikan tipe spreadsheet berekstensi .xls format Excel 2003 +
    4. Data yang dibutuhkan untuk import dengan memenuhi aturan data. +
    + UNDUH LAMPIRAN : Aturan Data + Contoh Format
    +

    +
    +   +
    + Pilih File .xls: + + + + Import Data Pengelompokan Rumah Tangga + +   +
    +
    + +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/app/views/import/ppls.php b/app/views/import/ppls.php new file mode 100644 index 000000000..e3354d104 --- /dev/null +++ b/app/views/import/ppls.php @@ -0,0 +1,92 @@ +
    + + + +
    +
    +
    +
    +
    +

    Import Data PBDT

    +
    +
    +
    + + + + + + + + */ ?> + + + + + + + + + + + + + + + + + + + + + +
    + Rumah Tangga .xls: + + + + + +   +
    + PBDT Individu .xls: + + + + + +   +
    +

    Jumlah Data Gagal +

    + + +
    +

    Letak Baris Data Gagal: +

    + + +
    +

    Tota Data Berhasil: +

    + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/app/views/import/siak.php b/app/views/import/siak.php new file mode 100644 index 000000000..6eb51cc7f --- /dev/null +++ b/app/views/import/siak.php @@ -0,0 +1,52 @@ +
    + +
    +
    +
    +
    +

    Import Data SIAK

    +
    +
    +
    + +
    +

    Unggah Berkas

    +
    + 1){ + echo $_SESSION["SIAK"]; + } + $_SESSION["SIAK"] = ""; + + $max_upload = (int)(ini_get('upload_max_filesize')); + $max_post = (int)(ini_get('post_max_size')); + $memory_limit = (int)(ini_get('memory_limit')); + $upload_mb = min($max_upload, $max_post, $memory_limit)/10; + echo "

    Batas Maksimal Pengunggahan Berkas ".$upload_mb." MB

    +

    Proses ini akan membutuhkan waktu beberapa menit, menyesuaikan dengan spesifikasi + komputer server SID dan sambungan internet yang tersedia.

    "; + + ?> +
    +
    +
    + + + + + + + +
    Berkas DK :
    Berkas BW :
      + Import +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/index.html b/app/views/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/app/views/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

    Directory access is forbidden.

    + + + diff --git a/app/views/init.php b/app/views/init.php new file mode 100644 index 000000000..90e65e0b2 --- /dev/null +++ b/app/views/init.php @@ -0,0 +1,82 @@ + + + + + Sistem Informasi Desa (SID) + + + + + + + + + + + + + + + + + + + + +
    +

    BERHASIL!

    +

    Anda baru saja menginstall aplikasi SID dengan lancar.

    +Mulai SID       +

    + + + diff --git a/app/views/install.php b/app/views/install.php new file mode 100644 index 000000000..a71c42f02 --- /dev/null +++ b/app/views/install.php @@ -0,0 +1,53 @@ + + + + + Sistem Informasi Desa (SID) + + + + + + + + + + + + + + + + + + + +
    +

    Instalasi Database SID

    +
    +
    +

    Klik “Lanjut” untuk memulai proses instalasi database SID. Proses instalasi memerlukan waktu singkat. Setelah selesai, Anda akan mendapatkan “username” dan “password”. Catat/simpan “username” dan “password” sebelum meneruskan ke langkah selanjutnya.


    +Lanjut      +
    +
    + + diff --git a/app/views/kategori/ajax_add_sub_kategori_form.php b/app/views/kategori/ajax_add_sub_kategori_form.php new file mode 100644 index 000000000..897705072 --- /dev/null +++ b/app/views/kategori/ajax_add_sub_kategori_form.php @@ -0,0 +1,15 @@ +
    + + + + + +
    Sub Kategori + +
    +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/kategori/form.php b/app/views/kategori/form.php new file mode 100644 index 000000000..b1bae1ee1 --- /dev/null +++ b/app/views/kategori/form.php @@ -0,0 +1,62 @@ + +
    + + + +
    +
    +Kategori kategori + +
    +
    +
    +
    +
    + + + + + +
    Nama Kategori
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/kategori/sub_kategori_table.php b/app/views/kategori/sub_kategori_table.php new file mode 100644 index 000000000..3ea0f4aba --- /dev/null +++ b/app/views/kategori/sub_kategori_table.php @@ -0,0 +1,77 @@ + diff --git a/app/views/kategori/table.php b/app/views/kategori/table.php new file mode 100644 index 000000000..3d319da99 --- /dev/null +++ b/app/views/kategori/table.php @@ -0,0 +1,136 @@ + +
    + + + + +
    +
    +

    Pengelolaan Kategori

    + +
    + +
    +
    diff --git a/app/views/kelompok/anggota/cetak.php b/app/views/kelompok/anggota/cetak.php new file mode 100644 index 000000000..b06ea4f06 --- /dev/null +++ b/app/views/kelompok/anggota/cetak.php @@ -0,0 +1,51 @@ + + + +Data Kelompok - <?php echo $kelompok['nama']?> + + + + + +
    +
    +
    + +

    DATA KELOMPOK -

    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    NoNIKNamaAlamatUmur (Tahun)Jenis Kelamin
    +
    + +
    + + diff --git a/app/views/kelompok/anggota/excel.php b/app/views/kelompok/anggota/excel.php new file mode 100644 index 000000000..21fffa430 --- /dev/null +++ b/app/views/kelompok/anggota/excel.php @@ -0,0 +1,59 @@ + + + + +Data Kelompok - <?php echo $kelompok['nama']?> + + + + + +
    +
    +
    + +

    DATA KELOMPOK -

    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    NoNIKNamaAlamatUmur (Tahun)Jenis Kelamin
    +
    + +
    + + diff --git a/app/views/kelompok/anggota/form.php b/app/views/kelompok/anggota/form.php new file mode 100644 index 000000000..532caa15f --- /dev/null +++ b/app/views/kelompok/anggota/form.php @@ -0,0 +1,62 @@ + +
    + + +
    +
    +
    +
    +

    Form Input Anggota

    +
    +
    +
    + + + + + + + + + + +
    NIK / Nama Penduduk +
    +
    Nomor Anggota +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/kelompok/anggota/table.php b/app/views/kelompok/anggota/table.php new file mode 100644 index 000000000..d8b85b7b7 --- /dev/null +++ b/app/views/kelompok/anggota/table.php @@ -0,0 +1,69 @@ + diff --git a/app/views/kelompok/cetak.php b/app/views/kelompok/cetak.php new file mode 100644 index 000000000..805d4ede8 --- /dev/null +++ b/app/views/kelompok/cetak.php @@ -0,0 +1,49 @@ + + + +Data Kelompok + + + + + +
    +
    +
    + +

    DATA KELOMPOK

    +
    + + + + + + + + + + + + + + + + + + + + + +
    NoNamaNama KetuaKategori KelompokJumlah Anggota
    +
    + +
    + + diff --git a/app/views/kelompok/excel.php b/app/views/kelompok/excel.php new file mode 100644 index 000000000..4373f1d45 --- /dev/null +++ b/app/views/kelompok/excel.php @@ -0,0 +1,56 @@ + + + + +Data Kelompok + + + + + +
    +
    +
    + +

    DATA KELOMPOK

    +
    + + + + + + + + + + + + + + + + + + + + + +
    NoNamaNama KetuaKategori KelompokJumlah Anggota
    +
    + +
    + + diff --git a/app/views/kelompok/form.php b/app/views/kelompok/form.php new file mode 100644 index 000000000..233a8b2a0 --- /dev/null +++ b/app/views/kelompok/form.php @@ -0,0 +1,90 @@ + + + + +
    + + + + +
    +
    +
    +
    +

    Form Master kelompok

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    Nama kelompok
    Nomor / Kode kelompok
    Kategori Kelompok + +
    Nama/NIK Pimpinan +
    +
    Deskripsi kelompok
    + +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    diff --git a/app/views/kelompok/table.php b/app/views/kelompok/table.php new file mode 100644 index 000000000..d518cb2bd --- /dev/null +++ b/app/views/kelompok/table.php @@ -0,0 +1,157 @@ + +
    + + + + +
    +
    +Kategori Kelompok +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/kelompok_master/form.php b/app/views/kelompok_master/form.php new file mode 100644 index 000000000..ca9643c2c --- /dev/null +++ b/app/views/kelompok_master/form.php @@ -0,0 +1,39 @@ +
    +
    +
    +
    +

    Form Kategori Kelompok

    +
    +
    +
    + + + + + + + + + + + + +
    Kategori/ Kategori Kelompok
    Deskripsi
    + +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/kelompok_master/table.php b/app/views/kelompok_master/table.php new file mode 100644 index 000000000..ce5aeb6e7 --- /dev/null +++ b/app/views/kelompok_master/table.php @@ -0,0 +1,112 @@ + +
    +
    +
    +
    +
    +
    +

    Modul kelompok

    +
    +
    +  Tambah Kategori Kelompok Baru +
    +
    +
    + + +
    +
    + +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    diff --git a/app/views/komentar/form.php b/app/views/komentar/form.php new file mode 100644 index 000000000..8be125268 --- /dev/null +++ b/app/views/komentar/form.php @@ -0,0 +1,55 @@ +
    + + + +
    + +
    +

    Komentar

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + +
    Pengirim
    Email
    + +
    Status +
    +> + +> + +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/komentar/table.php b/app/views/komentar/table.php new file mode 100644 index 000000000..526007270 --- /dev/null +++ b/app/views/komentar/table.php @@ -0,0 +1,136 @@ + +
    + + + + +
    +
    +

    Manajemen Komentar

    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/lapor/form.php b/app/views/lapor/form.php new file mode 100644 index 000000000..9cb7c5962 --- /dev/null +++ b/app/views/lapor/form.php @@ -0,0 +1,55 @@ +
    + + + +
    + +
    +

    Komentar

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + +
    Pengirim
    e-mail
    + +
    Status +
    +> + +> + +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/lapor/nav.php b/app/views/lapor/nav.php new file mode 100644 index 000000000..1e643e9e3 --- /dev/null +++ b/app/views/lapor/nav.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/app/views/lapor/table.php b/app/views/lapor/table.php new file mode 100644 index 000000000..30b836fb3 --- /dev/null +++ b/app/views/lapor/table.php @@ -0,0 +1,136 @@ + +
    + + + + +
    +
    +

    Manajemen Komentar

    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/laporan/bulanan.php b/app/views/laporan/bulanan.php new file mode 100644 index 000000000..1acb717f9 --- /dev/null +++ b/app/views/laporan/bulanan.php @@ -0,0 +1,225 @@ +
    + + + +
    +
    +
    + +
    + + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN PERKEMBANGAN PENDUDUK

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Desa/Kelurahan:
    Kecamatan:
    Tahun:
    Bulan: + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    No.
    PERINCIAN
    + + + + + + + + +
    Warga Negara Indonesia
    Laki-laki
    Perempuan
    +
    + + + + + + + + +
    Orang Asing
    Laki-laki
    Perempuan
    +
    + + + + + + + + + +
    Jumlah
    Laki-laki
    Perempuan
    L + P
    +
    1
    2
    3
    4
    5
    6
    7
    8
    9
    1
    Kelahiran bulan ini
    2
    Kematian bulan ini
    3
    Pendatang bulan ini
    4
    Pindah bulan ini
    5
    Penduduk awal bulan ini
    6
    Penduduk akhir bulan ini
    +

     

    +

     

    +

     

    +

     

    +

     

    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    diff --git a/app/views/laporan/bulanan_excel.php b/app/views/laporan/bulanan_excel.php new file mode 100644 index 000000000..70946b4d0 --- /dev/null +++ b/app/views/laporan/bulanan_excel.php @@ -0,0 +1,185 @@ + + + + +Cetak Laporan Bulanan + + + + +
    + +
    + + + + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN DESA/KELURAHAN

    +
    + + + + + + + + + + + + + + + + + + + + + +
    Desa/Kelurahan:
    Kecamatan:
    Laporan Bulan: tahun
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    No.
    PERINCIAN
    + + + + + + + + +
    Warga Negara Indonesia
    Laki-laki
    Perempuan
    +
    + + + + + + + + +
    Orang Asing
    Laki-laki
    Perempuan
    +
    + + + + + + + + + +
    Jumlah
    Laki-laki
    Perempuan
    L + P
    +
    1
    2
    3
    4
    5
    6
    7
    8
    9
    1
    Penduduk awal bulan ini
    2
    Kelahiran bulan ini
    3
    Kematian bulan ini
    4
    Pendatang bulan ini
    5
    Pindah bulan ini
    6
    Penduduk akhir bulan ini
    +

     

    +

     

    +
    + +
    + diff --git a/app/views/laporan/bulanan_print.php b/app/views/laporan/bulanan_print.php new file mode 100644 index 000000000..340dd4a2f --- /dev/null +++ b/app/views/laporan/bulanan_print.php @@ -0,0 +1,177 @@ + + + +Cetak Laporan Bulanan + + + + +
    + +
    + + + + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN DESA/KELURAHAN

    +
    + + + + + + + + + + + + + + + + + + + + + +
    Desa/Kelurahan:
    Kecamatan:
    Laporan Bulan: tahun
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    No.
    PERINCIAN
    + + + + + + + + +
    Warga Negara Indonesia
    Laki-laki
    Perempuan
    +
    + + + + + + + + +
    Orang Asing
    Laki-laki
    Perempuan
    +
    + + + + + + + + + +
    Jumlah
    Laki-laki
    Perempuan
    L + P
    +
    1
    2
    3
    4
    5
    6
    7
    8
    9
    1
    Penduduk awal bulan ini
    2
    Kelahiran bulan ini
    3
    Kematian bulan ini
    4
    Pendatang bulan ini
    5
    Pindah bulan ini
    6
    Penduduk akhir bulan ini
    +

     

    +

     

    +
    + +
    + diff --git a/app/views/laporan/kelompok.php b/app/views/laporan/kelompok.php new file mode 100644 index 000000000..019669813 --- /dev/null +++ b/app/views/laporan/kelompok.php @@ -0,0 +1,193 @@ +
    + + +
    +
    +
    + +
    + + + + + + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    DATA PILAH KEPENDUDUKAN MENURUT UMUR DAN FAKTOR KERENTANAN

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Desa/Kelurahan:
    Kecamatan:
    Periode:
    Dusun: + +
    + + + + +

    DATA PILAH DUSUN

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    DUSUN
    RW
    RT
    KK
    Kondisi dan Kelompok Umur
    Hamil
    Menyusui
    Cacat
    L
    P
    Dibawah 1 Tahun
    1-5 Tahun
    6-12 Tahun
    13-15 Tahun
    16-18 Tahun
    19-59 Tahun
    Diatas 60 Tahun
    Tua
    Muda
    L
    P
    ">">">">">">">">">">">">">">
    Total
    +

     

    +

     

    +

     

    +
    +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    diff --git a/app/views/laporan/kelompok_excel.php b/app/views/laporan/kelompok_excel.php new file mode 100644 index 000000000..5d22a8f2e --- /dev/null +++ b/app/views/laporan/kelompok_excel.php @@ -0,0 +1,165 @@ + +
    + +
    + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    DATA PILAH KEPENDUDUKAN MENURUT UMUR DAN FAKTOR KERENTANAN

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Desa/Kelurahan:
    Kecamatan:
    Periode:
    Dusun: + +
    +
    + + + + +

    DATA PILAH DUSUN

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    DUSUN
    RW
    RT
    KK
    Kondisi dan Kelompok Umur
    Hamil
    Menyusui
    Cacat
    L
    P
    Dibawah 1 Tahun
    1-5 Tahun
    6-12 Tahun
    13-15 Tahun
    16-18 Tahun
    19-59 Tahun
    Diatas 60 Tahun
    Tua
    Muda
    L
    P
    Total
    +

     

    +

     

    +

     

    +
    +
    + +
    \ No newline at end of file diff --git a/app/views/laporan/kelompok_print.php b/app/views/laporan/kelompok_print.php new file mode 100644 index 000000000..64dbedf21 --- /dev/null +++ b/app/views/laporan/kelompok_print.php @@ -0,0 +1,160 @@ + + + +Cetak Laporan Kelompok Rentan + + + + +
    + +
    + + + + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    DATA PILAH KEPENDUDUKAN MENURUT UMUR DAN FAKTOR KERENTANAN

    +
    + + + + + + + + + + + + + + + + + + + + + +
    Desa/Kelurahan:
    Kecamatan:
    Periode:
    +
    + + + + +

    DATA PILAH DUSUN

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    DUSUN
    RW
    RT
    KK
    Kondisi dan Kelompok Umur
    Hamil
    Menyusui
    Cacat
    L
    P
    Dibawah 1 Tahun
    1-5 Tahun
    6-12 Tahun
    13-15 Tahun
    16-18 Tahun
    19-59 Tahun
    Diatas 60 Tahun
    Tua
    Muda
    L
    P
    Total
    +

     

    +

     

    +

     

    +
    +
    + +
    + diff --git a/app/views/laporan/keluarga.php b/app/views/laporan/keluarga.php new file mode 100644 index 000000000..07e2edf59 --- /dev/null +++ b/app/views/laporan/keluarga.php @@ -0,0 +1,163 @@ +
    + + + + +
    +
    Laporan : + +
    +
    Statistik Keluarga Berdasarkan : + +
    + +
    Statistik Penduduk Berdasarkan : + +
    +
    Statistik Keluarga Berdasarkan : + +
    + +
    +
    +

    Laporan

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + +
    NoNamaJumlah KK
    -
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/laporan/pendidikan.php b/app/views/laporan/pendidikan.php new file mode 100644 index 000000000..40e5b6695 --- /dev/null +++ b/app/views/laporan/pendidikan.php @@ -0,0 +1,102 @@ +
    +

    Wilayah administratif

    +
    +
    +
    +
    +
    +
    +  Tambah Pengurus Desa +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksiNamaJabatabN.I.PNo. TeleponAlamat
    + + + + + " class="ui-icons icon-edit tipsy south" title="Edit Data">" class="ui-icons icon-remove tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> + +
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/laporan/penduduk.php b/app/views/laporan/penduduk.php new file mode 100644 index 000000000..6a401abdc --- /dev/null +++ b/app/views/laporan/penduduk.php @@ -0,0 +1,111 @@ +
    + + + + +
    +
    Laporan : + +
    + + +
    +
    +

    Laporan

    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    NoStatistikJumlahLaki-lakiPerempuan
    +
    +
    +
    +
    +
    +
    " method="post"> + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/laporan/penduduk_tetap.php b/app/views/laporan/penduduk_tetap.php new file mode 100644 index 000000000..e47099863 --- /dev/null +++ b/app/views/laporan/penduduk_tetap.php @@ -0,0 +1,158 @@ +
    + + + + +
    +
    Laporan : + +
    + +
    Penduduk Desa + +
    + + +
    +
    +

    Manajemen Penduduk

    +
    +
    +
    +
    +
    +
    +  Tambah Data +
    +
    +
    +
    +
    +
    + + + " class="uibutton tipsy south" title="Clear Pencarian"> Clear +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksi">NIK">NIK">NIK">Nama ">Nama ">Nama No. KKAlamatPendidikanUmurPekerjaanStatus PerkawinanStatus Penduduk
    + + +" class="ui-icons icon-edit tipsy south" title="Edit Data">" target="ajax-modalz" rel="window" header="Lokasi " class="ui-icons icon-maps tipsy south" title="Lokasi ">" class="ui-icons icon-remove tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> +" id="test" name="">">">
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/laporan/perubahan.php b/app/views/laporan/perubahan.php new file mode 100644 index 000000000..48f8f0ed4 --- /dev/null +++ b/app/views/laporan/perubahan.php @@ -0,0 +1,199 @@ +
    + + + + +
    +
    Laporan : + +
    + +
    +
    +
    + +
    + + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAPORAN PERUBAHAN PENDUDUK

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Desa/Kelurahan:
    Kecamatan:
    Kabupaten:
    Laporan Bulan:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NO
    DUSUN
    PENDUDUK AKHIR BULAN LALU
    PERUBAHAN PENDUDUK
    PENDUDUK AKHIR BULAN INI
    KELAHIRAN
    DATANG
    PERGI
    KEMATIAN
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    Total
    +

     

    +

     

    +

     

    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/laporan/perubahan_print.php b/app/views/laporan/perubahan_print.php new file mode 100644 index 000000000..807dee55d --- /dev/null +++ b/app/views/laporan/perubahan_print.php @@ -0,0 +1,169 @@ + + + +Cetak Laporan Perubahan Penduduk + + + + +
    + +
    + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAPORAN PERUBAHAN PENDUDUK

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Desa/Kelurahan:
    Kecamatan:
    Kabupaten:
    Laporan Bulan:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NO
    DUSUN
    PENDUDUK AKHIR BULAN LALU
    PERUBAHAN PENDUDUK
    PENDUDUK AKHIR BULAN INI
    KELAHIRAN
    DATANG
    PERGI
    KEMATIAN
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    Total
    +

     

    +

     

    +

     

    +
    + +
    + diff --git a/app/views/layouts/analisis.tpl.php b/app/views/layouts/analisis.tpl.php new file mode 100644 index 000000000..13e657816 --- /dev/null +++ b/app/views/layouts/analisis.tpl.php @@ -0,0 +1,58 @@ +load->view('layouts/header.php');?> +
    +
    +
    + load->view('partials/analisis.php'); + }else{ ?> +

    DAFTAR DATA STATISTIK ANALISIS DI TINGKAT DESA

    +

    Klik judul Analisis untuk melihat tampilan detail data statistik


    +
      + +
      +
      + +

      +
      +
      +
      + + + + + + + + + + + + + + + + +
      Pendataan :
      Subjek :
      Tahun :
      +
      +
      + +
    +
    +
    +
    +
    + load->view('partials/side.right.stat.php');?> +
    +
    + + +
    + + \ No newline at end of file diff --git a/app/views/layouts/arsip.tpl.php b/app/views/layouts/arsip.tpl.php new file mode 100644 index 000000000..7c67f14b9 --- /dev/null +++ b/app/views/layouts/arsip.tpl.php @@ -0,0 +1,19 @@ +load->view('layouts/header.php');?> +
    +
    +
    + load->view('partials/arsip.php');?> +
    +
    +
    +
    +
    + load->view('partials/side.right.php');?> +
    +
    + +
    + + \ No newline at end of file diff --git a/app/views/layouts/artikel.tpl.php b/app/views/layouts/artikel.tpl.php new file mode 100644 index 000000000..5bf150d17 --- /dev/null +++ b/app/views/layouts/artikel.tpl.php @@ -0,0 +1,24 @@ +load->view('layouts/header.php');?> +
    +
    +
    + load->view('partials/artikel.php'); + ?> +
    +
    +
    +
    +
    + load->view('partials/side.right.php');?> +
    +
    + + +
    + + \ No newline at end of file diff --git a/app/views/layouts/gallery.tpl.php b/app/views/layouts/gallery.tpl.php new file mode 100644 index 000000000..b25b9ca72 --- /dev/null +++ b/app/views/layouts/gallery.tpl.php @@ -0,0 +1,19 @@ +load->view('layouts/header.php');?> +
    +
    +
    + load->view('partials/gallery.php');?> +
    +
    +
    +
    +
    + load->view('partials/side.right.php');?> +
    +
    + +
    + + \ No newline at end of file diff --git a/app/views/layouts/header.php b/app/views/layouts/header.php new file mode 100644 index 000000000..9f0644734 --- /dev/null +++ b/app/views/layouts/header.php @@ -0,0 +1,95 @@ + + + + + <?php if(@$single_artikel){echo $single_artikel['judul']." - ";}?>Website Desa <?php echo unpenetration($desa['nama_desa']);?> + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    + +
    +
    + + <?php echo $desa['nama_desa']?> + +
    +
    +
    +
    + + 0){ + $this->load->view('layouts/teks_berjalan.php'); + } ?> + + + +
    +
    diff --git a/app/views/layouts/main.tpl.php b/app/views/layouts/main.tpl.php new file mode 100644 index 000000000..a818c5416 --- /dev/null +++ b/app/views/layouts/main.tpl.php @@ -0,0 +1,19 @@ +load->view('layouts/header.php');?> +
    +
    +
    + load->view('partials/content.php');?> +
    +
    +
    +
    +
    + load->view('partials/side.right.php');?> +
    +
    + +
    + + \ No newline at end of file diff --git a/app/views/layouts/mandiri.php b/app/views/layouts/mandiri.php new file mode 100644 index 000000000..2ce961357 --- /dev/null +++ b/app/views/layouts/mandiri.php @@ -0,0 +1,26 @@ +load->view('layouts/header.php');?> +
    +
    +
    + load->view('partials/mandiri.php'); + elseif($m==2) + $this->load->view('partials/layanan.php'); + else + $this->load->view('partials/lapor.php'); + ?> +
    +
    +
    +
    +
    + load->view('partials/side.right.php');?> +
    +
    + +
    + + \ No newline at end of file diff --git a/app/views/layouts/slide.php b/app/views/layouts/slide.php new file mode 100644 index 000000000..e6364469e --- /dev/null +++ b/app/views/layouts/slide.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/app/views/layouts/stat.tpl.php b/app/views/layouts/stat.tpl.php new file mode 100644 index 000000000..be249e1d8 --- /dev/null +++ b/app/views/layouts/stat.tpl.php @@ -0,0 +1,36 @@ +load->view('layouts/header.php');?> +
    +
    +
    + load->view('partials/statistik_sos.php'); + }elseif($tipex==3){ + $this->load->view('partials/statistik_ras.php'); + }else{ + $this->load->view('partials/statistik_jam.php'); + } + }elseif($tipe == 3){ + $this->load->view('partials/wilayah.php'); + }else{ + $this->load->view('partials/statistik.php'); + } + ?> +
    +
    +
    +
    +
    + load->view('partials/side.right.stat.php');?> +
    +
    + + +
    + + \ No newline at end of file diff --git a/app/views/layouts/sub_gallery.tpl.php b/app/views/layouts/sub_gallery.tpl.php new file mode 100644 index 000000000..ee4f2d2f1 --- /dev/null +++ b/app/views/layouts/sub_gallery.tpl.php @@ -0,0 +1,19 @@ +load->view('layouts/header.php');?> +
    +
    +
    + load->view('partials/sub_gallery.php');?> +
    +
    +
    +
    +
    + load->view('partials/side.right.php');?> +
    +
    + +
    + + \ No newline at end of file diff --git a/app/views/layouts/teks_berjalan.php b/app/views/layouts/teks_berjalan.php new file mode 100644 index 000000000..e8e193a42 --- /dev/null +++ b/app/views/layouts/teks_berjalan.php @@ -0,0 +1,88 @@ +
    + + + +
    \ No newline at end of file diff --git a/app/views/line/ajax_add_sub_line_form.php b/app/views/line/ajax_add_sub_line_form.php new file mode 100644 index 000000000..24bfbde3e --- /dev/null +++ b/app/views/line/ajax_add_sub_line_form.php @@ -0,0 +1,21 @@ +
    + + + + + + + + + +
    Nama line
    Warna + +
    +
    +
    + + +
    +
    +
    + \ No newline at end of file diff --git a/app/views/line/form.php b/app/views/line/form.php new file mode 100644 index 000000000..29fee42a2 --- /dev/null +++ b/app/views/line/form.php @@ -0,0 +1,37 @@ +
    + + +
    +
    +
    +
    + + + + + + + + + + +
    Nama Kategori
    Warna + +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/line/sub_line_table.php b/app/views/line/sub_line_table.php new file mode 100644 index 000000000..efd98c2e4 --- /dev/null +++ b/app/views/line/sub_line_table.php @@ -0,0 +1,67 @@ + \ No newline at end of file diff --git a/app/views/line/table.php b/app/views/line/table.php new file mode 100644 index 000000000..cd6387d3d --- /dev/null +++ b/app/views/line/table.php @@ -0,0 +1,128 @@ + +
    + + + + +
    +
    +

    Manajemen Kategori line

    +
    Modul ini masih dalam tahap pengembangan. Ide-ide dan usulan mari kita kumpulkan untuk memperkaya khazanah SID
    +
    + +
    +
    \ No newline at end of file diff --git a/app/views/lokasi/ajax_add_sub_point_form.php b/app/views/lokasi/ajax_add_sub_point_form.php new file mode 100644 index 000000000..98594c41c --- /dev/null +++ b/app/views/lokasi/ajax_add_sub_point_form.php @@ -0,0 +1,20 @@ +
    + + + + + + + + + +
    Nama lokasi
    Simbol + +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/lokasi/form.php b/app/views/lokasi/form.php new file mode 100644 index 000000000..bd2388057 --- /dev/null +++ b/app/views/lokasi/form.php @@ -0,0 +1,77 @@ +
    + + +
    +
    +

    Edit Properti / Lokasi

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nama Lokasi / Porperti
    Kategori + +
    Foto +
    + +
    +
    Ganti Foto + + )* Kosongi jika tidak ingin merubah Foto. +
    Keterangan
    Status +
    + > + + > + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/lokasi/maps.php b/app/views/lokasi/maps.php new file mode 100644 index 000000000..52d4e7f67 --- /dev/null +++ b/app/views/lokasi/maps.php @@ -0,0 +1,68 @@ + + +
    +
    + + + +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/lokasi/sub_point_table.php b/app/views/lokasi/sub_point_table.php new file mode 100644 index 000000000..a178d11c2 --- /dev/null +++ b/app/views/lokasi/sub_point_table.php @@ -0,0 +1,70 @@ + \ No newline at end of file diff --git a/app/views/lokasi/table.php b/app/views/lokasi/table.php new file mode 100644 index 000000000..5fa764279 --- /dev/null +++ b/app/views/lokasi/table.php @@ -0,0 +1,149 @@ + +
    + + + + + +
    +
    +

    Manajemen Properti / Lokasi

    +
    Modul ini masih dalam tahap pengembangan. Ide-ide dan usulan mari kita kumpulkan untuk memperkaya khazanah SID
    +
    +
    +
    +
    +
    +
    +" class="uibutton tipsy south" title="Tambah Data" > Tambah Data Baru +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/man_user/manajemen_user_form.php b/app/views/man_user/manajemen_user_form.php new file mode 100644 index 000000000..dc09f0e94 --- /dev/null +++ b/app/views/man_user/manajemen_user_form.php @@ -0,0 +1,114 @@ + +
    + + +
    +
    +
    +
    +

    Form Manajemen Pengguna / User

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Level +
    + + +> +> +> + +> +
    +
    Username
    Passwordvalue="radiisi"/>
    Nama
    Nomor HP
    e-mail
    Foto +
    + + + + + +
    +
    Ganti Foto (Kosongkan jika tidak ingin mengubah foto)
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/man_user/manajemen_user_table.php b/app/views/man_user/manajemen_user_table.php new file mode 100644 index 000000000..67ff69547 --- /dev/null +++ b/app/views/man_user/manajemen_user_table.php @@ -0,0 +1,147 @@ + +
    + + +
    +
    +

    Manajemen Pengguna

    +
    +
    +
    +
    +
    +
    +  Tambah Penguna Baru +
    +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksi">Username">Username">Username">Nama Pengguna ">Nama Pengguna ">Nama Pengguna ">Level ">Level ">Level Last Login
    + + + + +
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/man_user/nav.php b/app/views/man_user/nav.php new file mode 100644 index 000000000..6867cbe06 --- /dev/null +++ b/app/views/man_user/nav.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/app/views/mandiri/ajax_pin.php b/app/views/mandiri/ajax_pin.php new file mode 100644 index 000000000..d8686cfdc --- /dev/null +++ b/app/views/mandiri/ajax_pin.php @@ -0,0 +1,50 @@ + + + +
    + + + + + + + + + + + + +
    NIK / Nama Penduduk +
    +
    + Jika PIN tidak diisi maka sistem akan menghasilkan PIN secara acak. +
    PIN + +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/mandiri/mandiri.php b/app/views/mandiri/mandiri.php new file mode 100644 index 000000000..16992d6f2 --- /dev/null +++ b/app/views/mandiri/mandiri.php @@ -0,0 +1,119 @@ +
    + + + +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    NoNIKNama PendudukTanggal BuatLogin Terakhir
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    + + diff --git a/app/views/menu/ajax_add_sub_menu_form.php b/app/views/menu/ajax_add_sub_menu_form.php new file mode 100644 index 000000000..d0a8d8924 --- /dev/null +++ b/app/views/menu/ajax_add_sub_menu_form.php @@ -0,0 +1,43 @@ + +
    + + + + + + + + + +
    Nama Sub Menu + +
    Link + +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/menu/form.php b/app/views/menu/form.php new file mode 100644 index 000000000..7787294f6 --- /dev/null +++ b/app/views/menu/form.php @@ -0,0 +1,74 @@ + +
    + + + +
    +
    +Kategori Menu + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + +
    Nama Menu
    Link Sebelumnya
    Auto Link + *)kosongi kolom auto link jika yang diisi kolom manual link. +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/menu/sub_menu_table.php b/app/views/menu/sub_menu_table.php new file mode 100644 index 000000000..f60a6368d --- /dev/null +++ b/app/views/menu/sub_menu_table.php @@ -0,0 +1,77 @@ + diff --git a/app/views/menu/table.php b/app/views/menu/table.php new file mode 100644 index 000000000..5f508774d --- /dev/null +++ b/app/views/menu/table.php @@ -0,0 +1,131 @@ + +
    + + + + +
    +
    +
    +
    +
    +
    +

    Manajemen Menu Statis

    +
    +
    +" class="uibutton tipsy south" title="Tambah Data" > Tambah Menu Baru +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/nav.php b/app/views/nav.php new file mode 100644 index 000000000..b41500737 --- /dev/null +++ b/app/views/nav.php @@ -0,0 +1,21 @@ + diff --git a/app/views/partials/admin.tpl.php b/app/views/partials/admin.tpl.php new file mode 100644 index 000000000..610d90383 --- /dev/null +++ b/app/views/partials/admin.tpl.php @@ -0,0 +1,144 @@ +
    + +
    \ No newline at end of file diff --git a/app/views/partials/analisis.php b/app/views/partials/analisis.php new file mode 100644 index 000000000..f1fd41d1c --- /dev/null +++ b/app/views/partials/analisis.php @@ -0,0 +1,97 @@ +


    + +
    + + + + + +
    +
    + + + + + + + + + + + + + + + + + +
    NoJawabanJumlah Responden
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/partials/arsip.php b/app/views/partials/arsip.php new file mode 100644 index 000000000..495faea82 --- /dev/null +++ b/app/views/partials/arsip.php @@ -0,0 +1,64 @@ + +
    +

    Arsip Konten Situs Web ".$desa["nama_desa"]."

    +
    "; + if(count($farsip)>0){ + echo " + + + + "; + foreach($farsip AS $data){ + echo " + + + + + "; + } + echo " + +
    ".$data["no"]."".$data["tgl"]."".$data["isi"]."
    + "; + + }else{ + echo "Belum ada arsip konten web."; + } + + echo " +
    "; + if(count($farsip)>0){ + echo " +
    + +
    + "; + } + echo " +
    +
    + "; +?> \ No newline at end of file diff --git a/app/views/partials/artikel-x.php b/app/views/partials/artikel-x.php new file mode 100644 index 000000000..43bc12dd7 --- /dev/null +++ b/app/views/partials/artikel-x.php @@ -0,0 +1,88 @@ + +
    +
    +

    +
    +
    +

    + + + + + + + +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + Ditulis oleh:
    + Pada: +
    + + +
      +
    +
    +

    Komentar Artikel Terkait

    + + +
    + +
    + +

    Berkata: +

    +
    +
    + + +
    +
    +

    Post Komentar :

    +
    + + " method=POST onSubmit=\"return validasi(this)\"> + + + + + +
    Nama
    Alamat e-mail
    Komentar
     

    +
    + +
    + \ No newline at end of file diff --git a/app/views/partials/artikel.php b/app/views/partials/artikel.php new file mode 100644 index 000000000..16dfe6ad2 --- /dev/null +++ b/app/views/partials/artikel.php @@ -0,0 +1,124 @@ + +

    ".$single_artikel["judul"]."

    +

    ".$single_artikel['owner']." ".tgl_indo2($single_artikel['tgl_upload'])."

    + "; + + if($single_artikel['gambar']!=''){ + if(is_file("assets/files/artikel/kecil_".$single_artikel['gambar'])) { + echo ""; + } + } + echo " +
    ".$single_artikel["isi"]."
    "; + + if($single_artikel['dokumen']!=''){ + if(is_file("assets/files/dokumen/".$single_artikel['dokumen'])) { + echo "

    Dokumen Lampiran : ".$single_artikel['link_dokumen']."


    "; + } + } + if($single_artikel['gambar1']!=''){ + if(is_file("assets/files/artikel/kecil_".$single_artikel['gambar1'])) { + echo ""; + } + } + if($single_artikel['gambar2']!=''){ + if(is_file("assets/files/artikel/kecil_".$single_artikel['gambar2'])) { + echo ""; + } + } + if($single_artikel['gambar3']!=''){ + if(is_file("assets/files/artikel/kecil_".$single_artikel['gambar3'])) { + echo ""; + } + } + echo " +
    + + "; ?> + + +
    + "; + if(is_array($komentar)){ + echo " +
    +

    Komentar atas ".$single_artikel["judul"]."

    +
    + "; + foreach($komentar AS $data){ + if($data['enabled']==1){ + echo " +
    +
    + ".$data['owner']." ".tgl_indo2($data['tgl_upload'])." +
    +
    +
    ".$data['komentar']."
    +
    +
    "; + } + } + echo " +
    +
    + "; + }else{ + echo "
    Belum ada komentar atas artikel ini, silakan tuliskan dalam formulir berikut ini
    "; + } + echo " +
    +
    +
    +

    Formulir Penulisan Komentar

    +
    +
    + + + + + +
    Nama
    Alamat e-mail
    Komentar
     
    +
    +
    +
    +
    +
    + "; +}else{ + echo " +
    +
    +

    Maaf, data tidak ditemukan

    +
    + Anda telah terdampar di halaman yang datanya tidak ada lagi di web ini. Mohon periksa kembali atau laporkan kepada kami. +
    +
    +
    + "; +} +?> \ No newline at end of file diff --git a/app/views/partials/bottom.php b/app/views/partials/bottom.php new file mode 100644 index 000000000..fbdfee11f --- /dev/null +++ b/app/views/partials/bottom.php @@ -0,0 +1,13 @@ + +
    +
    + + + + + + + +
    +
    + \ No newline at end of file diff --git a/app/views/partials/bottom_admin.tpl.php b/app/views/partials/bottom_admin.tpl.php new file mode 100644 index 000000000..720132451 --- /dev/null +++ b/app/views/partials/bottom_admin.tpl.php @@ -0,0 +1,25 @@ +
      + Menu_model->get_menu('bottom') as $key => $item):?> + session->userdata('group_id') && $item->group_id == $this->session->userdata('group_id') || $item->group_id == '0'):?> + > + url != '') { + echo "" .$item->title. ""; + } + else { + echo anchor($item->controller .'/'. $item->view,$item->title); + } + ?> + + +
    • |
    • +
    • + +
    • +
    • |
    • + +
    • + +
    • + +
    \ No newline at end of file diff --git a/app/views/partials/bottom_menu.tpl.php b/app/views/partials/bottom_menu.tpl.php new file mode 100644 index 000000000..ab1b22698 --- /dev/null +++ b/app/views/partials/bottom_menu.tpl.php @@ -0,0 +1,14 @@ +
      + +
    • |
    • +
    • +
    • +
    • |
    • +
    • + +
    • +
    • + +
    • + +
    \ No newline at end of file diff --git a/app/views/partials/breadcrumb.tpl.php b/app/views/partials/breadcrumb.tpl.php new file mode 100644 index 000000000..e89f2afd1 --- /dev/null +++ b/app/views/partials/breadcrumb.tpl.php @@ -0,0 +1,2 @@ +breadcrumbs->generate_breadcrumb()):?> + breadcrumbs->generate_breadcrumb();?> \ No newline at end of file diff --git a/app/views/partials/cek.php b/app/views/partials/cek.php new file mode 100644 index 000000000..eb73a25c6 --- /dev/null +++ b/app/views/partials/cek.php @@ -0,0 +1,17 @@ +
    +

    Artikel

    +
  • + + + +Program
    +Posted on March 4, 2013 +
  • +
  • + + + +Suara Komunitas
    +Posted on March 4, 2013 +
  • +
    \ No newline at end of file diff --git a/app/views/partials/chart.php b/app/views/partials/chart.php new file mode 100644 index 000000000..83e863fc2 --- /dev/null +++ b/app/views/partials/chart.php @@ -0,0 +1,61 @@ +
    + + + + + +
    + \ No newline at end of file diff --git a/app/views/partials/content.php b/app/views/partials/content.php new file mode 100644 index 000000000..aeeba57dc --- /dev/null +++ b/app/views/partials/content.php @@ -0,0 +1,162 @@ + +
    +

    ". $headline['judul'] ."

    +
    ". $headline['owner'].", ". tgl_indo2($headline['tgl_upload'])."
    +
    +
    "; + if($headline["gambar"]!=""){ + if(is_file("assets/files/artikel/sedang_".$headline['gambar'])){ + echo " + + "; + }else{ + echo " + "; + } + } + $head = explode("

    ",$headline['isi']); + echo $head[0]."

    "; + + echo " +
    +
    "; +} +$title = (!empty($judul_kategori))? $judul_kategori: "Artikel Terkini"; +if(is_array($title)){ + foreach($title as $item){ + $title= $item; + } +} +echo " +
    +
    +

    ".$title."

    +
    +
    +"; +function clean($string) { + $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens. + + return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars. +} +if($artikel){ + echo " +
    +
      "; + foreach($artikel as $data){ + $teks = fixTag($data['isi']); + if(strlen($teks)>310){ + $abstrak = substr($teks,0,strpos($teks," ",300)); + }else{ + $abstrak = $teks; + } + $judul = str_replace(" ","-",$data['judul']); + $judul = preg_replace('/[^A-Za-z0-9\-]/','-', $judul); + echo " +
    • +

      ". $data["judul"] ."

      + +
      +
      ".tgl_indo2($data['tgl_upload'])." ".$data['owner']."
      +
      "; + if($data['gambar']!=''){ + if(is_file("assets/files/artikel/kecil_".$data['gambar'])) { + echo "\""."; + }else{ + echo "\""."; + } + } + echo " +
      + ".$abstrak." ..selengkapnya +
      +
      +
    • "; + } + echo " +
    +
    + "; + +}else{ + echo " +
    +
    +

    Maaf, belum ada data

    +
    +

    Belum ada artikel yang dituliskan dalam ".$title.".

    +

    Silakan kunjungi situs web kami dalam waktu dekat.

    +
    +
    +
    + "; +} +echo " +
    "; +if($artikel){ + echo " +
    + +
    + "; +} + echo " +
    +"; +?> + \ No newline at end of file diff --git a/app/views/partials/copywright.tpl.php b/app/views/partials/copywright.tpl.php new file mode 100644 index 000000000..763ecba57 --- /dev/null +++ b/app/views/partials/copywright.tpl.php @@ -0,0 +1 @@ +

    Website desa ini berbasis Aplikasi Sistem Informasi Desa (SID) yang diprakarsai dan dikembangkan oleh Combine Resource Institution sejak 2009 dengan merujuk pada GNU GENERAL PUBLIC LICENSE Version 3. Isi website ini berada di bawah ketentuan yang diatur dalam Undang-Undang Republik Indonesia Nomor 14 Tahun 2008 tentang Keterbukaan Informasi Publik dan Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

    \ No newline at end of file diff --git a/app/views/partials/gallery.php b/app/views/partials/gallery.php new file mode 100644 index 000000000..805472aeb --- /dev/null +++ b/app/views/partials/gallery.php @@ -0,0 +1,30 @@ + +
    +

    Arsip Galeri ".$desa["nama_desa"]."

    +
    +
      "; + $i=1; + foreach($gallery AS $data){ + if(is_file("assets/files/galeri/sedang_".$data['gambar'])) { + echo " +
    • +
      + + +
      + +
    • "; + if(fmod($i,2)==0){echo "
      ";} + $i++; + } + } + echo " +
    +
    +
    +
    +
    + "; +?> \ No newline at end of file diff --git a/app/views/partials/high.php b/app/views/partials/high.php new file mode 100644 index 000000000..1c6699bce --- /dev/null +++ b/app/views/partials/high.php @@ -0,0 +1,67 @@ +
    + +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/partials/lapor.php b/app/views/partials/lapor.php new file mode 100644 index 000000000..2e2e37f92 --- /dev/null +++ b/app/views/partials/lapor.php @@ -0,0 +1,25 @@ +
    + +
    +Sila laporkan perubahan data dan/atau informasi penting lainnya yang terkait dengan profil Anda kepada pemerintah desa melalui formulir ini. + + + + + + + + + + + + + + + + +
    Pengirim
    NIK
    Laporan +
    +
    +
    \ No newline at end of file diff --git a/app/views/partials/layanan.php b/app/views/partials/layanan.php new file mode 100644 index 000000000..7c5bcfd2c --- /dev/null +++ b/app/views/partials/layanan.php @@ -0,0 +1,34 @@ +
    +

    DAFTAR REKAM CETAK SURAT

    + + + + + + + + + + + + + + + + + + + + + + +
    NoNomor SuratJenis SuratNama StafTanggal
    +
    + + + + load->view('surat/signature.php');?> +
    +
      +
    +
    \ No newline at end of file diff --git a/app/views/partials/mandiri.php b/app/views/partials/mandiri.php new file mode 100644 index 000000000..d1d919b6c --- /dev/null +++ b/app/views/partials/mandiri.php @@ -0,0 +1,181 @@ +
    +

    BIODATA PENDUDUK

    +" target="_blank" class="uibutton special" >Cetak Biodata + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + +
    +
    Nama:
    Akta lahir:
    Dusun:
    RT/ RW: /
    Jenis Kelamin:
    Tempat / Tanggal Lahir: /
    Agama:
    Pendidikan dalam KK:
    Pendidikan sedang ditempuh:
    Pekerjaan:
    Status Kawin:
    Warga Negara:
    Dokumen Paspor:
    Dokumen KITAS:
    Alamat Sebelumnya:
    Alamat Sekarang:
    Akta perkawinan:
    Tanggal perkawinan:
    Akta perceraian:
    Tanggal perceraian:
    Cacat:
    Status:
    Data Orang Tua
    NIK Ayah:
    Nama Ayah:
    NIK Ibu:
    Nama Ibu:
     
    + +

    KEANGGOTAAN KELOMPOK

    + + + + + + + + + + + + + + + + + + + +
    NoNama KelompokKategori Kelompok
    + +

    DOKUMEN / KELENGKAPAN PENDUDUK

    + + + + + + + + + + + + + + + + + + + + + +
    NoNama DokumenFileTanggal Upload
    + + +
    \ No newline at end of file diff --git a/app/views/partials/menu.left.php b/app/views/partials/menu.left.php new file mode 100644 index 000000000..fd2f0a207 --- /dev/null +++ b/app/views/partials/menu.left.php @@ -0,0 +1,8 @@ +
    + +
    \ No newline at end of file diff --git a/app/views/partials/menu.tpl.php b/app/views/partials/menu.tpl.php new file mode 100644 index 000000000..c96f9c19e --- /dev/null +++ b/app/views/partials/menu.tpl.php @@ -0,0 +1,8 @@ + +
    + +
    \ No newline at end of file diff --git a/app/views/partials/print_kk.php b/app/views/partials/print_kk.php new file mode 100644 index 000000000..3e2356178 --- /dev/null +++ b/app/views/partials/print_kk.php @@ -0,0 +1,446 @@ + + + + <?php echo $id; ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +












    KARTU KELUARGA

    NO.

    Nama Kepala Keluarga
    :

    Kecamatan:



    Alamat
    :

    Kabupaten / Kota:



    Rt / Rw
    :

    Kode pos:



    Kelurahan / Desa
    :

    Propinsi:



    No.Nama LengkapNIK/NKSJenis KelaminTempat LahirTanggal LahirAgamaPendidikanPekerjaan

    123456789

























































































    NO.Status PerkawinanStatus Hubungan dalam keluargaKewarganegaraanDokumen ImigrasiNama Orang tua





    No. PasporNo. KITAS / KITAPAyahIbu


    10111213141516














































































    ........,........200..

    Dikeluarkan Tanggal:


    Kepala Keluarga,

    Camat / lurah /kepala desa













    LEMBAR :
    I. KEPADA KELUARGA









    ii. RT









    iii. Desa / Kelurahan









    iv. Kecamatan
    Tanda tangan/Cap Jempol

    NIP.












    + + \ No newline at end of file diff --git a/app/views/partials/scroller.php b/app/views/partials/scroller.php new file mode 100644 index 000000000..35c2903ed --- /dev/null +++ b/app/views/partials/scroller.php @@ -0,0 +1,68 @@ + + + +
    +
    +
    +
    + + + +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/partials/side.left.php b/app/views/partials/side.left.php new file mode 100644 index 000000000..d109e6ab5 --- /dev/null +++ b/app/views/partials/side.left.php @@ -0,0 +1,16 @@ +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/partials/side.right.php b/app/views/partials/side.right.php new file mode 100644 index 000000000..90977566e --- /dev/null +++ b/app/views/partials/side.right.php @@ -0,0 +1,355 @@ + 1 && $_SESSION['mandiri_wait'] == 1) { ?> +
    +
    +

    Layanan Mandiri


    + Silakan datang / hubungi perangkat desa untuk mendapatkan kode PIN Anda. +
    +
    +

    Gagal 3 kali. Sila coba kembali dalam detik lagi

    +
    + Login Gagal. Username atau Password yang Anda masukkan salah! +
    +
    +
    + +
    +
    +

    Layanan Mandiri


    + Silakan datang / hubungi perangkat desa untuk mendapatkan kode PIN Anda. +
    +
    +

    Masukkan NIK dan PIN!

    +
    + + + + + +
    + Kesempatan mencoba kali lagi. +
    + + +
    + Login Gagal. Username atau Password yang Anda masukkan salah! +
    + + +
    +
    +
    + +
    +
    +

    Layanan Mandiri

    +
    +
    +
    +
    + +
    +
    +

    Layanan Mandiri


    + Untuk keamanan, sila ubah kode PIN Anda. +
    +
    +

    Masukkan PIN Baru

    +
    + + + +
    +
    + Silakan login kembali setelah PIN baru disimpan. +
    +
    +
    + +
    +
    +

    Layanan Mandiri


    + Untuk keamanan, silakan ubah kode PIN Anda. +
    +
    +
    + PIN baru berhasil disimpan! +
    +
    +
    + + + + + + +
    +
    +

    Agenda

    +
    +
    + +
    +
    + + + + +
    + +
    + +
    +
    + + + +
    +
    +

    Komentar Terkini

    +
    +
    + +
    +
    + + +
    +
    +

    Media Sosial

    +
    +
    + \"""; + } ?> +
    +
    + +
    +
    +

    Statistik Kunjungan

    +
    +
    + db->query("SELECT Tanggal,ipAddress FROM sys_traffic WHERE Tanggal='" . date("Y-m-d") . "'"); + if ($cek->num_rows() == 0) { + $up = $this->db->query("INSERT INTO sys_traffic (Tanggal,ipAddress,Jumlah) VALUES ('" . date("Y-m-d") . "','" . $ip . "','1')"); + $_SESSION['MemberOnline'] = date('Y-m-d H:i:s'); + } else { + $res = $cek->row(0); + $ipaddr = $res->ipAddress; + $up = $this->db->query("UPDATE sys_traffic SET Jumlah=Jumlah + 1,ipAddress='" . $ip . "' WHERE Tanggal='" . date("Y-m-d") . "'"); + $_SESSION['MemberOnline'] = date('Y-m-d H:i:s'); + } + } + $rs = $this->db->query('SELECT Jumlah AS Visitor FROM sys_traffic WHERE Tanggal="' . date("Y-m-d") . '" LIMIT 1'); + if ($rs->num_rows() > 0) { + $visitor = $rs->row(0); + $today = $visitor->Visitor; + } else { + $today = 0; + } + $strSQL = "SELECT Jumlah AS Visitor FROM sys_traffic WHERE + Tanggal=(SELECT DATE_ADD(CURDATE(),INTERVAL -1 DAY) FROM sys_traffic LIMIT 1) + LIMIT 1"; + $rs = $this->db->query($strSQL); + if ($rs->num_rows() > 0) { + $visitor = $rs->row(0); + $yesterday = $visitor->Visitor; + } else { + $yesterday = 0; + } + $rs = $this->db->query('SELECT SUM(Jumlah) as Total FROM sys_traffic'); + $visitor = $rs->row(0); + $total = $visitor->Total; + function num_toimage($tot, $jumlah) + { + $pattern = ''; + for ($j = 0; $j < $jumlah; $j++) { + $pattern .= '0'; + } + $len = strlen($tot); + $length = strlen($pattern) - $len; + $start = substr($pattern, 0, $length) . substr($tot, 0, $len - 1); + $last = substr($tot, $len - 1, 1); + $last_rpc = ''; + $inc = str_replace($last, $last_rpc, $last); + for ($i = 0; $i <= 9; $i++) { + $rpc = ''; + $start = str_replace($i, $rpc, $start); + } + $num = $start . $inc; + $num = str_replace('_BASE_URL_', base_url(), $num); + return $num; + } + ?> +
    + + + + + + + + + + + + + +
    Hari ini
    Kemarin
    Jumlah pengunjung
    +
    +
    +
    + + +
    + +
    +
      + +
    • ">
    • + +
    +
    +
    + + + +
    +

    " . $data["judul"] . "

    +
    +
    + " . $data['isi'] . " +
    + + "; + } +} +?> + + + + +
    +

    Lokasi " . $desa["nama_desa"] . "

    +
    +
    +
    + "; + ?> + + tampilkan dalam peta lebih besar
    +
    + + "; + ?> + \ No newline at end of file diff --git a/app/views/partials/side.right.stat.php b/app/views/partials/side.right.stat.php new file mode 100644 index 000000000..34209eec7 --- /dev/null +++ b/app/views/partials/side.right.stat.php @@ -0,0 +1,176 @@ + +
    +
    +

    Info Media Sosial

    +
    +
    +\"".$data["nama"]."\""; +} +?> +
    +
    + + +
    +

    Lokasi ". $desa["nama_desa"] ."

    +
    +
    +
    + "; + ?> + + tampilkan dalam peta lebih besar
    +
    + + "; +} +?> +
    +
    +

    Statistik Pengunjung

    +
    +
    + db->query("SELECT Tanggal,ipAddress FROM sys_traffic WHERE Tanggal='".date("Y-m-d")."'"); + if($cek->num_rows()==0){ + $up = $this->db->query("INSERT INTO sys_traffic (Tanggal,ipAddress,Jumlah) VALUES ('".date("Y-m-d")."','".$ip."','1')"); + $_SESSION['MemberOnline']=date('Y-m-d H:i:s'); + }else{ + $res = mysql_fetch_array($cek); + $ipaddr = $res['ipAddress'].$ip; + $up = $this->db->query("UPDATE sys_traffic SET Jumlah=Jumlah + 1,ipAddress='".$ipx."' WHERE Tanggal='".date("Y-m-d")."'"); + $_SESSION['MemberOnline']=date('Y-m-d H:i:s'); + } + } + $rs = $this->db->query('SELECT Jumlah AS Visitor FROM sys_traffic WHERE Tanggal="'.date("Y-m-d").'" LIMIT 1'); + if($rs->num_rows()>0){ + $visitor = $rs->row(0); + $today = $visitor->Visitor; + }else{ + $today = 0; + } + $strSQL = "SELECT Jumlah AS Visitor FROM sys_traffic WHERE + Tanggal=(SELECT DATE_ADD(CURDATE(),INTERVAL -1 DAY) FROM sys_traffic LIMIT 1) + LIMIT 1"; + $rs = $this->db->query($strSQL); + if($rs->num_rows()>0){ + $visitor = $rs->row(0); + $yesterday = $visitor->Visitor; + }else{ + $yesterday = 0; + } + $rs = $this->db->query('SELECT SUM(Jumlah) as Total FROM sys_traffic'); + $visitor = $rs->row(0); + $total = $visitor->Total; + function num_toimage($tot,$jumlah){ + $pattern=''; + for($j=0;$j<$jumlah;$j++){ + $pattern .= '0'; + } + $len = strlen($tot); + $length = strlen($pattern)-$len; + $start = substr($pattern,0,$length).substr($tot,0,$len-1); + $last = substr($tot,$len-1,1); + $last_rpc= ''; + $inc = str_replace($last,$last_rpc,$last); + for($i=0;$i<=9;$i++){ + $rpc =''; + $start=str_replace($i,$rpc,$start); + } + $num = $start.$inc; + $num = str_replace('_BASE_URL_',base_url(),$num); + return $num; + } + ?> +
    + + + + + + + + + + + + + +
    Hari ini
    Kemarin
    Jumlah pengunjung
    +
    +
    +
    + +
    + +
    +
      + +
    • ">
    • + +
    +
    +
    + + +
    +

    ".$data["judul"]."

    +
    +
    + ".$data['isi']." +
    + + "; + } +} +?> \ No newline at end of file diff --git a/app/views/partials/statistik.php b/app/views/partials/statistik.php new file mode 100644 index 000000000..62f5fcacc --- /dev/null +++ b/app/views/partials/statistik.php @@ -0,0 +1,176 @@ + + + + + + + + + + + +
    +

    Statistik Berdasar
    ". strtoupper($heading)."

    +
    +
    "; + $strC = ($tipe==1)? "btn-primary":"btn-default"; + echo "Bar Graph"; + $strC = ($tipe==0)? "btn-primary":"btn-default"; + echo "Pie Cart +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    Tabel Data Kependudukan berdasar ". $heading."

    +
    +
    + + + + + + + + + + + + + + + + "; + $i=0; $l=0; $p=0; + $hide="";$h=0; + $jm = count($stat); + foreach($stat as $data){ + $h++; + if($h > 10 AND $jm > 11)$hide="hide"; + echo " + + + + + + + + + "; + $i=$i+$data['jumlah']; + $l=$l+$data['laki']; $p=$p+$data['perempuan']; + } + echo " + +
    NoKelompokJumlahLaki-lakiPerempuan
    n%n%n%
    ".$data['no']."".$data['nama']."".$data['jumlah']."".$data['persen']."".$data['laki']."".$data['persen1']."".$data['perempuan']."".$data['persen2']."
    "; + if($hide=="hide"){ + echo " +
    + +
    + "; + } + echo " +
    +
    "; \ No newline at end of file diff --git a/app/views/partials/statistik_blt.php b/app/views/partials/statistik_blt.php new file mode 100644 index 000000000..f4cd6f94b --- /dev/null +++ b/app/views/partials/statistik_blt.php @@ -0,0 +1,183 @@ + + + +
    +

    Grafik Data Penerima Bantuan Langsung Tunai

    +
    +
    "; + $strC = ($tipe==1)? "btn-primary":"btn-default"; + echo "Bar Graph"; + $strC = ($tipe==0)? "btn-primary":"btn-default"; + echo "Pie Cart +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    Tabel Data Penerima Bantuan Langsung Tunai

    +
    +
    + + + + + + + + + + + + + + + + "; + $i=0; $l=0; $p=0; + foreach($stat as $data){ + echo " + + + + + + + + + "; + $i=$i+$data['jumlah']; + $l=$l+$data['laki']; $p=$p+$data['perempuan']; + } + echo " + +
    NoKelompokJumlahLaki-lakiPerempuan
    n%n%n%
    ".$data['no']."".$data['nama']."".$data['jumlah']."".$data['persen']."".$data['laki']."".$data['persen1']."".$data['perempuan']."".$data['persen2']."
    "; + + echo " +
    +
    "; +?> +
    + +
    + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoStatistikPopulasiMemperoleh Bantuan Langsung Tunai
    Jumlah
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/partials/statistik_jam.php b/app/views/partials/statistik_jam.php new file mode 100644 index 000000000..9a202c51b --- /dev/null +++ b/app/views/partials/statistik_jam.php @@ -0,0 +1,125 @@ + + + +
    +

    Statistik Kependudukan berdasarkan Penerimaan Jamkesmas

    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    Tabel Statistik Kependudukan berdasarkan Penerimaan Jamkesmas

    +
    +
    + + + + + + + + + "; + + $i=0;$j=0; + + foreach($main as $data){ + echo " + + + + "; + $i=$i+$data['jumlah']; + $j=$j+$data['jamkesmas']; + } + echo " + + +
    #KelompokJumlah
    ".$data['id']."".$data['nama']."".$data['jumlah']."
    JUMLAH".$i."
    "; + + echo " +
    +
    "; +?> \ No newline at end of file diff --git a/app/views/partials/statistik_ras.php b/app/views/partials/statistik_ras.php new file mode 100644 index 000000000..ecbcc0f96 --- /dev/null +++ b/app/views/partials/statistik_ras.php @@ -0,0 +1,122 @@ + + + +
    +

    Grafik Penerima Bantuan Raskin

    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    Tabel Data Penerima Bantuan Raskin

    +
    +
    + + + + + + + + + "; + $i=0; + foreach($main as $data){ + echo " + + + + "; + $i=$i+$data['jumlah']; + } + echo " + + +
    #KelompokJumlah
    ".$data['id']."".$data['nama']."".$data['jumlah']."
    JUMLAH".$i."
    "; + + echo " +
    +
    "; +?> \ No newline at end of file diff --git a/app/views/partials/statistik_sos.php b/app/views/partials/statistik_sos.php new file mode 100644 index 000000000..c98da4f90 --- /dev/null +++ b/app/views/partials/statistik_sos.php @@ -0,0 +1,113 @@ + + + +
    +

    Grafik Statistik Kependudukan berdasarkan Indeks Kemiskinan

    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    Tabel Statistik Kependudukan berdasarkan Indeks Kemiskinan

    +
    +
    + + + + + + + + + "; + $i=0; + foreach($main as $data){ + echo " + + + + "; + $i=$i+$data['jumlah']; + } + echo " + + +
    #KelompokJumlah
    ".$data['id']."".$data['nama']."".$data['jumlah']."
    JUMLAH".$i."
    "; + + echo " +
    +
    "; +?> \ No newline at end of file diff --git a/app/views/partials/sub_gallery.php b/app/views/partials/sub_gallery.php new file mode 100644 index 000000000..529507a30 --- /dev/null +++ b/app/views/partials/sub_gallery.php @@ -0,0 +1,30 @@ + +
    +

    Arsip Galeri ".$desa["nama_desa"]."

    +
    +
      "; + $i=1; + foreach($gallery AS $data){ + if(is_file("assets/files/galeri/sedang_".$data['gambar'])) { + echo " +
    • +
      + + +
      +
      ". $data["nama"]."
      +
    • "; + if(fmod($i,2)==0){echo "
      ";} + $i++; + } + } + echo " +
    +
    +
    +
    + + "; +?> \ No newline at end of file diff --git a/app/views/partials/wilayah.php b/app/views/partials/wilayah.php new file mode 100644 index 000000000..312ea6553 --- /dev/null +++ b/app/views/partials/wilayah.php @@ -0,0 +1,55 @@ + +
    +

    Tabel Data Kependudukan berdasar ". $heading."

    +
    +
    "; + if(count($main) > 0){ + echo " + + + + + + + + + + + + + "; + foreach($main as $data){ + echo " + + + + + + + + + "; + } + echo " + + + + + + + + + + + +
    NoNama DusunNama Kepala DusunJumlah RTJumlah KKJiwaLkPr
    ".$data['no']."".strtoupper(unpenetration(ununderscore($data['dusun'])))."".strtoupper(unpenetration($data['nama_kadus']))."".$data['jumlah_rt']."".$data['jumlah_kk']."".$data['jumlah_warga']."".$data['jumlah_warga_l']."".$data['jumlah_warga_p']."
    TOTAL".$total['total_rt']."".$total['total_kk']."".$total['total_warga']."".$total['total_warga_l']."".$total['total_warga_p']."
    "; + }else{ + echo "
    Belum ada data
    "; + } + + echo " +
    + "; +?> \ No newline at end of file diff --git a/app/views/plan/menu.php b/app/views/plan/menu.php new file mode 100644 index 000000000..77ff8c506 --- /dev/null +++ b/app/views/plan/menu.php @@ -0,0 +1,48 @@ + \ No newline at end of file diff --git a/app/views/plan/nav.php b/app/views/plan/nav.php new file mode 100644 index 000000000..e23d79bb0 --- /dev/null +++ b/app/views/plan/nav.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/app/views/point/ajax_add_sub_point_form.php b/app/views/point/ajax_add_sub_point_form.php new file mode 100644 index 000000000..b49106e3e --- /dev/null +++ b/app/views/point/ajax_add_sub_point_form.php @@ -0,0 +1,48 @@ +
    + + + + + + + + + +
    Nama Point
    Simbol +
    +
    + + + + + +
    +
    +
    +
    + + +
    +
    +
    + \ No newline at end of file diff --git a/app/views/point/form.php b/app/views/point/form.php new file mode 100644 index 000000000..3bda82e2f --- /dev/null +++ b/app/views/point/form.php @@ -0,0 +1,65 @@ +
    + + +
    +
    +
    +
    + + + + + + + + + + +
    Nama Kategori
    Simbol +
    +
    + + + + + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    + \ No newline at end of file diff --git a/app/views/point/sub_point_table.php b/app/views/point/sub_point_table.php new file mode 100644 index 000000000..2eb69d517 --- /dev/null +++ b/app/views/point/sub_point_table.php @@ -0,0 +1,69 @@ + \ No newline at end of file diff --git a/app/views/point/table.php b/app/views/point/table.php new file mode 100644 index 000000000..9ca982eb3 --- /dev/null +++ b/app/views/point/table.php @@ -0,0 +1,141 @@ + + +
    + + + + + +
    +
    +

    Manajemen Kategori Point

    +
    Modul ini masih dalam tahap pengembangan. Ide-ide dan usulan mari kita kumpulkan untuk memperkaya khazanah SID
    +
    + +
    +
    \ No newline at end of file diff --git a/app/views/point/table2.php b/app/views/point/table2.php new file mode 100644 index 000000000..31f504e81 --- /dev/null +++ b/app/views/point/table2.php @@ -0,0 +1,133 @@ + +
    + + + + + +
    +
    +

    Manajemen Kategori Point

    +
    +
    +
    +
    +
    +
    +" class="uibutton tipsy south" title="Tambah Data" > Tambah Kategori Baru +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/polygon/ajax_add_sub_polygon_form.php b/app/views/polygon/ajax_add_sub_polygon_form.php new file mode 100644 index 000000000..8fa63020f --- /dev/null +++ b/app/views/polygon/ajax_add_sub_polygon_form.php @@ -0,0 +1,35 @@ +
    + + +
    +
    +
    +
    + + + + + + + + + +
    Nama polygon
    Warna + +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/polygon/form.php b/app/views/polygon/form.php new file mode 100644 index 000000000..9aa109253 --- /dev/null +++ b/app/views/polygon/form.php @@ -0,0 +1,37 @@ +
    + + +
    +
    +
    +
    + + + + + + + + + + +
    Nama Kategori
    Warna + +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/polygon/sub_polygon_table.php b/app/views/polygon/sub_polygon_table.php new file mode 100644 index 000000000..f961f4d92 --- /dev/null +++ b/app/views/polygon/sub_polygon_table.php @@ -0,0 +1,69 @@ + \ No newline at end of file diff --git a/app/views/polygon/table.php b/app/views/polygon/table.php new file mode 100644 index 000000000..14653e947 --- /dev/null +++ b/app/views/polygon/table.php @@ -0,0 +1,132 @@ + +
    + + + + + +
    +
    +

    Manajemen Kategori polygon

    +
    Modul ini masih dalam tahap pengembangan. Ide-ide dan usulan mari kita kumpulkan untuk memperkaya khazanah SID
    +
    +
    +
    +
    +
    +
    +" class="uibutton tipsy south" title="Tambah Data" > Tambah Kategori Baru +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/print/headjs.php b/app/views/print/headjs.php new file mode 100644 index 000000000..7293ad5c8 --- /dev/null +++ b/app/views/print/headjs.php @@ -0,0 +1,20 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/views/program_bantuan/create.php b/app/views/program_bantuan/create.php new file mode 100644 index 000000000..d1ab27341 --- /dev/null +++ b/app/views/program_bantuan/create.php @@ -0,0 +1,127 @@ + +
    + + + + + + +
    + load->view('program_bantuan/menu_kiri.php') + ?> + + Form Penulisan Program Bantuan +
    +
    + +
    + Ada Kesalahan +
    +
    + ".validation_errors()." +
    +
    + "; + } + $cid = @$_REQUEST["cid"]; + ?> + +
    + + +
    +
    + + +
    +
    + + +
    +
    + + Mulai + s.d +
    + +
    +
    + + +
    +
    + +
    +
    + +
    + load->view('program_bantuan/panduan.php') + ?> +
    + + + +
    \ No newline at end of file diff --git a/app/views/program_bantuan/detail.php b/app/views/program_bantuan/detail.php new file mode 100644 index 000000000..158b6d5e1 --- /dev/null +++ b/app/views/program_bantuan/detail.php @@ -0,0 +1,106 @@ + +
    + + + + + +
    + load->view('program_bantuan/menu_kiri.php') + ?> + +
    +
    + Detail Program +
    + + + + + + +
    Nama Program".strtoupper($program[0]["nama"])."
    Sasaran Peserta".$sasaran[$program[0]["sasaran"]]."
    Masa Berlaku".fTampilTgl($program[0]["sdate"],$program[0]["edate"])."
    Keterangan".$program[0]["ndesc"]."
    +
    + "; + + if($program[0]["status"] == 0){ + echo " +
    +
    + Formulir Penambahan Peserta +
    +
    + +
    +
    +
    +
    +
    + "; + echo " + + "; + } + $peserta = $program[1]; + ?> + Daftar Peserta Program + + + + $item){ + $nomer++; + ?> + + + + + + + +
    #Nama PesertaKeterangan
    ">
    + +
    +
    + +
    +
    \ No newline at end of file diff --git a/app/views/program_bantuan/edit.php b/app/views/program_bantuan/edit.php new file mode 100644 index 000000000..7b9134a92 --- /dev/null +++ b/app/views/program_bantuan/edit.php @@ -0,0 +1,134 @@ + +
    + + + + + + +
    + load->view('program_bantuan/menu_kiri.php') + ?> + +
    +
    + + Form Penulisan Program Bantuan +
    + +
    + Ada Kesalahan +
    +
    + ".validation_errors()." +
    +
    + "; + } + + if($_SESSION["success"] == 1){ + echo "Simpan Berhasil"; + } + $data= $program[0]; + $cid = $data["sasaran"]; + ?> + +
    + + +
    +
    + + "> +
    +
    + + +
    +
    + + Mulai "> + s.d "> +
    + +
    +
    + + +
    +
    + +
    +
    + +
    + load->view('program_bantuan/panduan.php') + ?> +
    + + + +
    \ No newline at end of file diff --git a/app/views/program_bantuan/form.php b/app/views/program_bantuan/form.php new file mode 100644 index 000000000..0e4de687f --- /dev/null +++ b/app/views/program_bantuan/form.php @@ -0,0 +1,117 @@ + +
    + + + + + + +
    + load->view('program_bantuan/menu_kiri.php') + ?> + + Form Penulisan Program Bantuan +
    + + +
    + + +
    +
    + + +
    +
    + + +
    +
    + + Mulai + s.d +
    + +
    +
    + + +
    +
    + +
    +
    +

    Panduan

    +

    Isikanlah formulir disamping ini untuk menambahkan data program bantuan.

    +

    +

      +
    • Kolom Sasaran Program +

      Pilihlah salah satu dari sasaran program, apakah pribadi/perorangan, keluarga/kk, Rumah Tangga, ataupu Organisasi/kelompok warga

      +
    • +
    • Kolom Nama Program +

      Nama program wajib diisi

      +
    • +
    • Kolom Keterangan Program +

      Isikan keterangan program ini

      +
    • +
    +

    +
    + + + +
    \ No newline at end of file diff --git a/app/views/program_bantuan/formsuccess.php b/app/views/program_bantuan/formsuccess.php new file mode 100644 index 000000000..0fd72d4ff --- /dev/null +++ b/app/views/program_bantuan/formsuccess.php @@ -0,0 +1,34 @@ + +
    + + + + + + +
    + load->view('program_bantuan/menu_kiri.php') + ?> + +
    + Ada Kesalahan +
    +
    + ".validation_errors()." +
    + + "; + } + + ?> +
    + load->view('program_bantuan/panduan.php') + ?> +
    +
    \ No newline at end of file diff --git a/app/views/program_bantuan/menu_kiri.php b/app/views/program_bantuan/menu_kiri.php new file mode 100644 index 000000000..000083674 --- /dev/null +++ b/app/views/program_bantuan/menu_kiri.php @@ -0,0 +1,9 @@ + +Daftar Program Bantuan + \ No newline at end of file diff --git a/app/views/program_bantuan/panduan.php b/app/views/program_bantuan/panduan.php new file mode 100644 index 000000000..c145f4a71 --- /dev/null +++ b/app/views/program_bantuan/panduan.php @@ -0,0 +1,22 @@ + +

    Keterangan

    +

    Program Bantuan adalah modul untuk pengelolaan data aktivitas program kerja dan keterlibatan warga, baik secara personal, keluarga, rumah tangga, maupun kelompok/organisasi.

    +

    Panduan

    +

    Cara menyimpan/memperbarui data Program Bantuan adalah dengan mengisikan formulir yang terdapat dari menu Tulis Program Bantuan Baru:

    +

    +

      +
    • Kolom Sasaran Program +

      Pilihlah salah satu dari sasaran program, apakah pribadi/perorangan, keluarga/kk, Rumah Tangga, ataupu Organisasi/kelompok warga

      +
    • +
    • Kolom Nama Program +

      Nama program wajib diisi

      +
    • +
    • Kolom Keterangan Program +

      Isikan keterangan program ini

      +
    • +
    • Kolom Rentang Waktu +

      Isikan keterangan waktu masa kerja program akan berlangsung

      +
    • +
    +

    \ No newline at end of file diff --git a/app/views/program_bantuan/peserta.php b/app/views/program_bantuan/peserta.php new file mode 100644 index 000000000..7b2ec18c8 --- /dev/null +++ b/app/views/program_bantuan/peserta.php @@ -0,0 +1,57 @@ + +
    + + + + + + +
    + load->view('program_bantuan/menu_kiri.php') + + + ?> + + Profil Penerima Manfaat Program + + + + +
    Nama".strtoupper($profil["nama"])."
    Keterangan".$profil["ndesc"]."
    + + "; + + $programkerja = $program[0]; + ?> + Program yang pernah diikuti +
    + + + + + + + + + + + + + +
    #Waktu/TanggalNama ProgramKeterangan
    ">
    +
    +
    + load->view('program_bantuan/panduan.php'); + ?> +
    +
    \ No newline at end of file diff --git a/app/views/program_bantuan/program.php b/app/views/program_bantuan/program.php new file mode 100644 index 000000000..6d861c425 --- /dev/null +++ b/app/views/program_bantuan/program.php @@ -0,0 +1,67 @@ + +
    + + + + + + +
    + load->view('program_bantuan/menu_kiri.php') + ?> + +
    +
    + Daftar Program Bantuan"; + }else{ + echo "Daftar Program Bantuan dengan Sasaran ".$sasaran[$tampil].""; + } + + if($_SESSION["success"]==1){ + echo " +
    + ".$_SESSION["pesan"]." +
    "; + $_SESSION["success"]==0; + } + + ?> + + +
    +
    +
    + load->view('program_bantuan/panduan.php'); + ?> +
    +
    diff --git a/app/views/program_bantuan/unduh-sheet.php b/app/views/program_bantuan/unduh-sheet.php new file mode 100644 index 000000000..0bb24a883 --- /dev/null +++ b/app/views/program_bantuan/unduh-sheet.php @@ -0,0 +1,51 @@ + + + + +Peserta Program <?php echo $peserta[0]["nama"];?> + + + + + +
    +
    + +

    Daftar Peserta Program

    +

    +
    +
    +
    + + + + + + + + + + + $item){ + echo " + + + + "; + $i++; + } + ?> + +
    NoIDNamaKeterangan
    ".$i."'".$item["nik"]."".$item["nama"]."".$item["info"]."
    +
    +
    + + diff --git a/app/views/setting.php b/app/views/setting.php new file mode 100644 index 000000000..46882a781 --- /dev/null +++ b/app/views/setting.php @@ -0,0 +1,59 @@ + +
    " method="POST" id="validasi" enctype="multipart/form-data"> +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Username
    Nama
    Password Lama
    Password Baru
    Password Baru [Ulangi]
    Foto +
    + + + + + +
    +
    Ganti Foto (Kosongi jika tidak ingin merubah foto)
    +
    +
    +
    +
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/setting/modul/form.php b/app/views/setting/modul/form.php new file mode 100644 index 000000000..da7fc06b0 --- /dev/null +++ b/app/views/setting/modul/form.php @@ -0,0 +1,46 @@ +
    +
    +
    +
    +

    Form Pengaturan Modul

    +
    +
    +
    + + + + + + + + + + + + + + + + + +
    Nama Modul
    URL
    Ikon
    Status +
    + > + > +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/setting/modul/table.php b/app/views/setting/modul/table.php new file mode 100644 index 000000000..1823a018d --- /dev/null +++ b/app/views/setting/modul/table.php @@ -0,0 +1,79 @@ + +
    +
    +
    +
    +
    +

    Pengaturan Modul

    +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksiNama Modul URLStatus 
    + + + +  
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    diff --git a/app/views/setting/nav.php b/app/views/setting/nav.php new file mode 100644 index 000000000..7f62fb73b --- /dev/null +++ b/app/views/setting/nav.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_add_anggota_form.php b/app/views/sid/kependudukan/ajax_add_anggota_form.php new file mode 100644 index 000000000..e75c0cd30 --- /dev/null +++ b/app/views/sid/kependudukan/ajax_add_anggota_form.php @@ -0,0 +1,78 @@ + + + + +
    + + + + + + + + + + + + + + +
    NIK / Nama Penduduk +
    +
    +
    Hubungan +
    +
    +

    KK No. Keluarga :

    +
    + + + + + + + + + + + + + + + + + + + + +
    NoNIKNamaHubungan
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_add_anggota_rtm_form.php b/app/views/sid/kependudukan/ajax_add_anggota_rtm_form.php new file mode 100644 index 000000000..05e7eb79d --- /dev/null +++ b/app/views/sid/kependudukan/ajax_add_anggota_rtm_form.php @@ -0,0 +1,64 @@ + +
    + + + + + + + + +
    NIK / Nama Penduduk +
    +
      +
    +
    +

    KK No. Keluarga :

    +
    + + + + + + + + + + + + + + + + + + + + +
    NoNIKNamaHubungan
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_add_keluarga.php b/app/views/sid/kependudukan/ajax_add_keluarga.php new file mode 100644 index 000000000..80d049513 --- /dev/null +++ b/app/views/sid/kependudukan/ajax_add_keluarga.php @@ -0,0 +1,44 @@ + + + +
    + + + + + + + + + +
    NIK Kepala Keluarga +
    +
    Nomor KK + +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_add_rtm.php b/app/views/sid/kependudukan/ajax_add_rtm.php new file mode 100644 index 000000000..d12a15821 --- /dev/null +++ b/app/views/sid/kependudukan/ajax_add_rtm.php @@ -0,0 +1,49 @@ + + + +
    + + + + + + + + + + + + + +
    NIK Kepala Rumah Tangga +
    +
     
    Keterangan
    + Silakan cari nama / NIK dari data penduduk yang sudah terinput.
    + Penduduk yang dipilih otomatis berstatus sebagai Kepala Rumah Tangga baru tersebut. +
    +
    +
    + + +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_add_rtm_kk.php b/app/views/sid/kependudukan/ajax_add_rtm_kk.php new file mode 100644 index 000000000..17a27ca9f --- /dev/null +++ b/app/views/sid/kependudukan/ajax_add_rtm_kk.php @@ -0,0 +1,41 @@ + + + +
    + + + + + + + + + +
    Nomor KK RTM +
    +
    Nomor RTM + +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_adv_search_form.php b/app/views/sid/kependudukan/ajax_adv_search_form.php new file mode 100644 index 000000000..43ec6f5e6 --- /dev/null +++ b/app/views/sid/kependudukan/ajax_adv_search_form.php @@ -0,0 +1,92 @@ +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Umur -
    Pekerjaan +
    Status Perkawinan +
    Agama + +
    Pendidikan Sedang + +
    Pendidikan KK + +
    Status Hubungan Dalam Keluarga + +
    Golongan Darah + +
    Cacat / Difable + +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_delete.php b/app/views/sid/kependudukan/ajax_delete.php new file mode 100644 index 000000000..6cfd29155 --- /dev/null +++ b/app/views/sid/kependudukan/ajax_delete.php @@ -0,0 +1,14 @@ + + + + + + + +
    Anda tidak berhak menghapus data ini. Hubungi administrator!
    +
    +
    + + +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_edit_anggota_form.php b/app/views/sid/kependudukan/ajax_edit_anggota_form.php new file mode 100644 index 000000000..055a054d3 --- /dev/null +++ b/app/views/sid/kependudukan/ajax_edit_anggota_form.php @@ -0,0 +1,40 @@ +
    +
    +

    KK No. Keluarga :

    +
    + + + + + + + + + + + + + + + + + + +
    NIK + +
    Nama Penduduk + +
    +
    Hubungan +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_edit_anggota_rtm.php b/app/views/sid/kependudukan/ajax_edit_anggota_rtm.php new file mode 100644 index 000000000..2a3236699 --- /dev/null +++ b/app/views/sid/kependudukan/ajax_edit_anggota_rtm.php @@ -0,0 +1,39 @@ +
    +
    +

    KK No. Keluarga :

    +
    + + + + + + + + + + + + + + + + + + +
    NIK + +
    Nama Penduduk + +
    +
    Hubungan +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_edit_no_rtm.php b/app/views/sid/kependudukan/ajax_edit_no_rtm.php new file mode 100644 index 000000000..697f1fdc5 --- /dev/null +++ b/app/views/sid/kependudukan/ajax_edit_no_rtm.php @@ -0,0 +1,17 @@ +
    + + + + + + +
    Nomor Rumah Tangga + +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_edit_nokk.php b/app/views/sid/kependudukan/ajax_edit_nokk.php new file mode 100644 index 000000000..b901e9f8e --- /dev/null +++ b/app/views/sid/kependudukan/ajax_edit_nokk.php @@ -0,0 +1,65 @@ + + +
    + + + + + + + + + + + + + + + + + + + + + +*/ ?> + +
    Nomor KK + +
    Raskin +
    + > + + > + +
    +
    BLSM +
    + > + + > + +
    +
    PKH +
    + > + + > + +
    +
    Bedah Rumah +
    + > + + > + +
    +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_edit_status_dasar.php b/app/views/sid/kependudukan/ajax_edit_status_dasar.php new file mode 100644 index 000000000..e50c874e2 --- /dev/null +++ b/app/views/sid/kependudukan/ajax_edit_status_dasar.php @@ -0,0 +1,41 @@ + + + + + +
    + + + + + + + + + + + + +
    Peristiwa Penting +
    + > + + > + + > + +
    +
      +
    + Tanggal Peristiwa + + : +
    +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_pindah_form.php b/app/views/sid/kependudukan/ajax_pindah_form.php new file mode 100644 index 000000000..bb0df1a59 --- /dev/null +++ b/app/views/sid/kependudukan/ajax_pindah_form.php @@ -0,0 +1,60 @@ + +
    + + + + + + + + +
    Dusun +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/ajax_query.php b/app/views/sid/kependudukan/ajax_query.php new file mode 100644 index 000000000..62da6532f --- /dev/null +++ b/app/views/sid/kependudukan/ajax_query.php @@ -0,0 +1,23 @@ + + +Firstname +"; +while($row = mysql_fetch_array($result)) + { + echo ""; + echo "" . $row['id'] . ""; + echo ""; + } +echo ""; +mysql_close($con); +?> \ No newline at end of file diff --git a/app/views/sid/kependudukan/cetak_biodata.php b/app/views/sid/kependudukan/cetak_biodata.php new file mode 100644 index 000000000..0e8500632 --- /dev/null +++ b/app/views/sid/kependudukan/cetak_biodata.php @@ -0,0 +1,186 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + +
    + +
    + +
    +

    BIODATA PENDUDUK WARGANEGARA INDONESIA

    +
    +
    +
    +
    + + +
    + + + + + + + + + + + + + +
    Kabupaten:Desa:
    Kecamatan:Dusun:
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    DATA PERSONAL
    1.Nama:
    2.NIK:
    3.Dusun:
    4.RT/ RW: /
    5.Jenis Kelamin:
    6.Tempat / Tanggal Lahir: /
    7.Agama:
    8.Pendidikan:
    9.Pekerjaan:
    10.Status Kawin:
    11.Warga Negara:
    12.Alamat Sekarang:
    13.Akta perkawinan:
    14.Data Orang Tua
    15.NIK Ayah:
    16.Nama Ayah:
    17.NIK Ibu:
    18.Nama Ibu:
    19.Status:
    DATA KEPEMILIKAN DOKUMEN
    1.Nomor Kartu Keluarga (No.KK):
    2.Nomor Akta Kelahiran:
    3.Dokumen Pasport:
    4.Dokumen Kitas:
    5.Nomor Paspor:
    6.Nomor Perkawinan:
    7.Tanggal perkawinan:
    8.Akta perceraian:
    9.Tanggal perceraian:
    +
    +
    + + + +
    +
    + + + diff --git a/app/views/sid/kependudukan/cetak_kk.php b/app/views/sid/kependudukan/cetak_kk.php new file mode 100644 index 000000000..852f28115 --- /dev/null +++ b/app/views/sid/kependudukan/cetak_kk.php @@ -0,0 +1,131 @@ +load->view('print/headjs.php');?> + +
    + + +
    +
    +

    KARTU KELUARGA

    +

    SALINAN

    +
    No.
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nama KK: Kecamatan:
    Alamat: Kabupaten/Kota:
    RT / RW: / Kode Pos:
    Kelurahan/Desa: Provinsi:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNamaNIKJenis KelaminTempat LahirTanggal LahirAgamaPendidikanPekerjaan
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoStatus PerkawinanStatus Hubungan dalam KeluargaKewarganegaraanNo. PasporNo. KITAS / KITAPNama AyahNama IbuGolongan darah
    +
    + + + + + + + + + + + + + + + + + + + + + +
    ,
     
    KEPALA KELUARGAKEPALA DESA
     
     
     
     
    +
    + +
    +
    +
    + + + \ No newline at end of file diff --git a/app/views/sid/kependudukan/cetak_rtm.php b/app/views/sid/kependudukan/cetak_rtm.php new file mode 100644 index 000000000..18f96199e --- /dev/null +++ b/app/views/sid/kependudukan/cetak_rtm.php @@ -0,0 +1,129 @@ +load->view('print/headjs.php');?> + +
    + + +
    +
    +

    KARTU RUMAH TANGGA

    +

    SALINAN

    +
    No.
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nama KK: Kecamatan:
    Alamat: Kabupaten/Kota:
    RT / RW: / Kode Pos:
    Kelurahan/Desa: Provinsi:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNamaNIKNOMOR KKJenis KelaminTempat LahirTanggal LahirAgamaPendidikanPekerjaan
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoStatus PerkawinanStatus Hubungan dalam KeluargaKewarganegaraanNama AyahNama IbuGolongan darah
    +
    + + + + + + + + + + + + + + + + + + + + + +
    ,
     
    KEPALA KELUARGAKEPALA DESA
     
     
     
     
    +
    + +
    +
    +
    + + + \ No newline at end of file diff --git a/app/views/sid/kependudukan/dokumen_ajax.php b/app/views/sid/kependudukan/dokumen_ajax.php new file mode 100644 index 000000000..9f8685831 --- /dev/null +++ b/app/views/sid/kependudukan/dokumen_ajax.php @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + +
    NoNama DokumenTgl Upload
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/dokumen_form.php b/app/views/sid/kependudukan/dokumen_form.php new file mode 100644 index 000000000..1d7324a27 --- /dev/null +++ b/app/views/sid/kependudukan/dokumen_form.php @@ -0,0 +1,32 @@ + +
    + + + + + + + + + +
    Nama / Jenis Dokumen + +
    Berkas Dokumen + +
    + +
    +
    +
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/kartu_keluarga.php b/app/views/sid/kependudukan/kartu_keluarga.php new file mode 100644 index 000000000..aa02dc2d8 --- /dev/null +++ b/app/views/sid/kependudukan/kartu_keluarga.php @@ -0,0 +1,181 @@ + +
    + + + +
    +
    +

    Form Manajemen KK :

    +
    +
    +
    + +
    + +
    +

    KARTU KELUARGA

    +

    SALINAN

    +

    No.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    Alamat: Kabupaten:
    RT/RW: / Kode Pos:
    Kelurahan/Desa: Propinsi:
    Kecamatan: Jumlah Anggota Keluarga:
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNamaNIKJenis KelaminTempat LahirTanggal LahirAgamaPendidikanPekerjaan
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoStatus PerkawinanStatus Hubungan dalam KeluargaKewarganegaraanNo. PasporNo. KITAS / KITAPNama AyahNama IbuGolongan darah
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    +

    +
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/kartu_rtm.php b/app/views/sid/kependudukan/kartu_rtm.php new file mode 100644 index 000000000..3f8e5fc53 --- /dev/null +++ b/app/views/sid/kependudukan/kartu_rtm.php @@ -0,0 +1,176 @@ + +
    + + + +
    +
    +

    Form Manajemen KK :

    +
    +
    +
    + +
    + +
    +

    KARTU RUMAH TANGGA

    +

    No.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    Alamat: Kabupaten:
    RT/RW: / Kode Pos:
    Kelurahan/Desa: Propinsi:
    Kecamatan: Jumlah Anggota Rumah Tangga:
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNamaNIKNOMOR KKJenis KelaminTempat LahirTanggal LahirAgamaPendidikanPekerjaan
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoStatus PerkawinanStatus Hubungan dalam KeluargaKewarganegaraanNama AyahNama IbuGolongan darah
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    +

    +
    + +
    +
    +
    +
    diff --git a/app/views/sid/kependudukan/keluarga.php b/app/views/sid/kependudukan/keluarga.php new file mode 100644 index 000000000..a617f1458 --- /dev/null +++ b/app/views/sid/kependudukan/keluarga.php @@ -0,0 +1,178 @@ + +
    + + + +
    +
    +

    Data Keluarga

    +
    +
    +
    +
    +
    +
    +  Tambah KK Baru + +  Tambah KK + + + + " target="_blank" class="uibutton tipsy south" title="Cetak" > Cetak + + " target="_blank" class="uibutton tipsy south" title="Unduh" > Unduh +   + + + + + + + + + + + +
    +
    +
    + + +
    + +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/sid/kependudukan/keluarga_anggota.php b/app/views/sid/kependudukan/keluarga_anggota.php new file mode 100644 index 000000000..0a090fd40 --- /dev/null +++ b/app/views/sid/kependudukan/keluarga_anggota.php @@ -0,0 +1,79 @@ + diff --git a/app/views/sid/kependudukan/keluarga_excel.php b/app/views/sid/kependudukan/keluarga_excel.php new file mode 100644 index 000000000..41e8bc6ba --- /dev/null +++ b/app/views/sid/kependudukan/keluarga_excel.php @@ -0,0 +1,65 @@ + + + + +Data Keluarga + + + + + +
    +
    +

    DATA KELUARGA

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNomor KKNIK Kepala KeluargaKepala KeluargaJumlah AnggotaJenis KelaminDusunRWRTTanggal Terdaftar
    +
    + + +
    + diff --git a/app/views/sid/kependudukan/keluarga_form.php b/app/views/sid/kependudukan/keluarga_form.php new file mode 100644 index 000000000..904837748 --- /dev/null +++ b/app/views/sid/kependudukan/keluarga_form.php @@ -0,0 +1,251 @@ + + + + + +
    + + + +
    +
    +

    Form Manajemen KK

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nomor KK
    Data Kepala Keluarga BaruNIK / Nama Kepala Keluarga +
    +
    Dusun +
    RW +
    RT +
    Foto +
    + +
    +
    Ganti Foto (Kosongi jika tidak ingin merubah foto)
    Nomor KK
    Nama
    NIK
    Jenis Kelamin +
    + + + + +
    +
    Tempat Lahir
    Tanggal Lahir
    Agama +
    Pendidikan dalam KK +
    Pekerjaan +
    Status Perkawinan +
    Hubungan dalam Keluarga +
    Kewarganegaraan +
    No Pasport
    No Kitas/Kitap
    NIK Ayah
    NIK Ibu
    Nama Ayah
    Nama Ibu
    Golongan Darah +
    Status +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/keluarga_form_a.php b/app/views/sid/kependudukan/keluarga_form_a.php new file mode 100644 index 000000000..5cc0416af --- /dev/null +++ b/app/views/sid/kependudukan/keluarga_form_a.php @@ -0,0 +1,198 @@ + +
    + + + +
    +
    +

    Form Manajemen KK

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    No. KK
    Kepala Keluarga
    Dusun
    RW
    RT
    Foto +
    + +
    +
    Ganti Foto (Kosongi jika tidak ingin merubah foto)
    Nama
    NIK
    Jenis Kelamin +
    + + + + +
    +
    Tempat Lahir
    Tanggal Lahir
    Agama +
    Pendidikan dalam KK +
    Pekerjaan +
    Status Perkawinan +
    Hubungan dalam Keluarga +
    Kewarganegaraan +
    No Pasport
    No Kitas/Kitap
    NIK Ayah
    NIK Ibu
    Nama Ayah
    Nama Ibu
    Golongan Darah +
    Status +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/keluarga_jamkesmas.php b/app/views/sid/kependudukan/keluarga_jamkesmas.php new file mode 100644 index 000000000..9c5ced6b1 --- /dev/null +++ b/app/views/sid/kependudukan/keluarga_jamkesmas.php @@ -0,0 +1,151 @@ + + + +
    + + +
    +

    Data Keluarga

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + +
    NoStatistikPopulasiMemperoleh Jamkesmas
    +
    +
    +
    +
    + \ No newline at end of file diff --git a/app/views/sid/kependudukan/keluarga_print.php b/app/views/sid/kependudukan/keluarga_print.php new file mode 100644 index 000000000..59252622a --- /dev/null +++ b/app/views/sid/kependudukan/keluarga_print.php @@ -0,0 +1,52 @@ + + + +Data Keluarga + + + + +
    +
    +

    DATA KELUARGA

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNomor KKNIK Kepala KeluargaKepala KeluargaJumlah AnggotaJenis KelaminDusunRWRTTanggal Terdaftar
    +
    + + +
    + diff --git a/app/views/sid/kependudukan/keluarga_raskin.php b/app/views/sid/kependudukan/keluarga_raskin.php new file mode 100644 index 000000000..a80a77579 --- /dev/null +++ b/app/views/sid/kependudukan/keluarga_raskin.php @@ -0,0 +1,150 @@ + + + +
    + +
    +

    Data Keluarga

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + +
    NoStatistikPopulasiMemperoleh Raskin
    +
    +
    +
    +
    + \ No newline at end of file diff --git a/app/views/sid/kependudukan/keluarga_sosial.php b/app/views/sid/kependudukan/keluarga_sosial.php new file mode 100644 index 000000000..9eb5ef114 --- /dev/null +++ b/app/views/sid/kependudukan/keluarga_sosial.php @@ -0,0 +1,140 @@ + + + +
    + + +
    +

    Data Keluarga

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + +
    NoStatistikPopulasi
    +
    +
    +
    +
    + \ No newline at end of file diff --git a/app/views/sid/kependudukan/keluarga_statistik.php b/app/views/sid/kependudukan/keluarga_statistik.php new file mode 100644 index 000000000..69ad371e2 --- /dev/null +++ b/app/views/sid/kependudukan/keluarga_statistik.php @@ -0,0 +1,185 @@ + + + +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    + + + diff --git a/app/views/sid/kependudukan/penduduk_detail.php b/app/views/sid/kependudukan/penduduk_detail.php new file mode 100644 index 000000000..7fdda772d --- /dev/null +++ b/app/views/sid/kependudukan/penduduk_detail.php @@ -0,0 +1,214 @@ +
    + + +
    +
    +

    Form Data Penduduk

    +
    +
    +
    +
    +

    BIODATA PENDUDUK

    +

    No.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + +
    +
    Nama:
    Akta lahir:
    Dusun:
    RT/ RW: /
    Jenis Kelamin:
    Tempat / Tanggal Lahir: /
    Agama:
    Pendidikan dalam KK:
    Pendidikan sedang ditempuh:
    Pekerjaan:
    Status Kawin:
    Warga Negara:
    Dokumen Paspor:
    Dokumen KITAS:
    Alamat Sebelumnya:
    Alamat Sekarang:
    Akta perkawinan:
    Tanggal perkawinan:
    Akta perceraian:
    Tanggal perceraian:
    Status Kehamilan:
    Ibu Menyusui:
    Cacat:
    Status:
    Data Orang Tua
    NIK Ayah:
    Nama Ayah:
    NIK Ibu:
    Nama Ibu:
     
    + +

    KEANGGOTAAN KELOMPOK

    + + + + + + + + + + + + + + + + + + + +
    NoNama KelompokKategori Kelompok
    + +

    DOKUMEN / KELENGKAPAN PENDUDUK

    + + + + + + + + + + + + + + + + + + + + + +
    NoNama DokumenFileTanggal Upload
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/penduduk_dokumen.php b/app/views/sid/kependudukan/penduduk_dokumen.php new file mode 100644 index 000000000..b21576766 --- /dev/null +++ b/app/views/sid/kependudukan/penduduk_dokumen.php @@ -0,0 +1,59 @@ +
    +
    +
    +
    +

    Dokumen / Kelengkpan Penduduk - []

    +
    +
    + " class="uibutton"> Tambah Dokumen +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksiNama DokumenFileTanggal Upload
    + +
    +
    + +
    +
    +
    +
    diff --git a/app/views/sid/kependudukan/penduduk_excel.php b/app/views/sid/kependudukan/penduduk_excel.php new file mode 100644 index 000000000..8773c7cf4 --- /dev/null +++ b/app/views/sid/kependudukan/penduduk_excel.php @@ -0,0 +1,86 @@ + + + + +Data Penduduk + + + + + +
    +
    +
    + +

    DATA PENDUDUK

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNIKNamaNo. KKDusunRWRTPendidikan (dLm KK)Pendidikan (sdg ditemph)PekerjaanTanggal LahirTempat LahirUmurKawinHub. KeluargaGol. DarahNama AyahNama IbuStatus
    +
    + +
    + + diff --git a/app/views/sid/kependudukan/penduduk_form.php b/app/views/sid/kependudukan/penduduk_form.php new file mode 100644 index 000000000..b110d31b4 --- /dev/null +++ b/app/views/sid/kependudukan/penduduk_form.php @@ -0,0 +1,351 @@ + + +
    + + + + +
    +
    +

    Form Data Penduduk

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ + ?> + + + + + + + + + + + + + + + +
    Dusun +
    RW +
    RT +
    Foto +
    + + + + + +
    +
    Ganti Foto (Kosongkan jika tidak ingin mengubah foto)
    Nama
    NIK
    Akta Kelahiran
    Jenis Kelamin +
    + > + + > + +
    +
    Tempat Lahir
    Tanggal Lahir
    Agama +
    Pendidikan dalam KK +
    Pendidikan sedang ditempuh +
    Pekerjaan +
    Status Kawin +
    Hubungan dalam Keluarga +
    Warganegara +
    Dokumen Paspor
    Dokumen KITAS
    Akta Perkawinan
    Tanggal Perkawinan
    Akta Perceraian
    Tanggal Perceraian
    NIK Ayah
    NIK Ibu
    Nama Ayah
    Nama Ibu
    Golongan Darah +
    Status +
    + + > + > + > +
    +
    Alamat Sebelumnya
    Alamat Sekarang
    Cacat +
    Status Kehamilan/ Ibu Menyusui +
    + > + > + > + > +
    +
    JAMKESMAS +
    + > + + > + + > + +
    +
    Lokasi Penduduk + " target="ajax-modalz" rel="window" header="Lokasi " class="uibutton special" title="Lokasi ">Edit Lokasi +
     
    DOKUMEN / KELENGKAPAN PENDUDUK
    Dokumen / Kelengkapan Penduduk + " class="uibutton confirm">Manajemen Dokumen +
    + + + + + + + + + + + + + + + + + + + + + +
    NoNama DokumenFileTanggal Upload
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    diff --git a/app/views/sid/kependudukan/penduduk_log.php b/app/views/sid/kependudukan/penduduk_log.php new file mode 100644 index 000000000..48e63d3c5 --- /dev/null +++ b/app/views/sid/kependudukan/penduduk_log.php @@ -0,0 +1,203 @@ + +
    + + +
    +
    +

    Manajemen Penduduk

    +
    +
    +
    + +
    +
    +
    + + +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksi">NIK">NIK">NIK">Nama ">Nama ">Nama  + + ">No. KK + + ">No. KK + ">No. KK + +  DusunRWRT + + ">Umur + + ">Umur + ">Umur + +  StatusTanggal (Kejadian)
    + + + " class="uibutton tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> + " id="test" name="">">">
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/sid/kependudukan/penduduk_print.php b/app/views/sid/kependudukan/penduduk_print.php new file mode 100644 index 000000000..b0e5edbc4 --- /dev/null +++ b/app/views/sid/kependudukan/penduduk_print.php @@ -0,0 +1,80 @@ + + + +Data Penduduk + + + + + +
    +
    + ".$_SESSION['judul_statistik_cetak'].""; unset($_SESSION['judul_statistik']);}else{ ?> +

    DATA PENDUDUK

    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNIKNamaNo. KKDusunRWRTPendidikan (dLm KK)Pendidikan (sdg ditemph)PekerjaanTanggal LahirTempat LahirUmurKawinHub. KeluargaGol. DarahNama AyahNama IbuStatus
    +
    + + +
    + diff --git a/app/views/sid/kependudukan/rtm.php b/app/views/sid/kependudukan/rtm.php new file mode 100644 index 000000000..1db04ada5 --- /dev/null +++ b/app/views/sid/kependudukan/rtm.php @@ -0,0 +1,171 @@ + +
    + + + +
    +
    +
    +
    +

    Pengaturan / Pengelompokan Rumah Tangga

    +
    +
    +  Tambah Rumah Tangga + + + + + + " target="_blank" class="uibutton tipsy south" title="Cetak" > Cetak + + " target="_blank" class="uibutton tipsy south" title="Unduh" > Unduh + " target="_blank" class="uibutton special tipsy south" title="Unduh" > Excel PBDT + */ ?> +   + + + + + + + + + + +
    +
    +
    +
    + + + +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/sid/kependudukan/rtm_anggota.php b/app/views/sid/kependudukan/rtm_anggota.php new file mode 100644 index 000000000..78db03dfc --- /dev/null +++ b/app/views/sid/kependudukan/rtm_anggota.php @@ -0,0 +1,82 @@ +
    + + +
    +
    +
    +
    +
    +
    +

    Daftar Anggota Rumah Tangga : -

    + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksiNIKNomor KKNamaJenis KelaminHubunganNama AyahNama IbuAlamat
    + + + +
    +
    +
    + +
    +
    +
    diff --git a/app/views/sid/kependudukan/rtm_excel.php b/app/views/sid/kependudukan/rtm_excel.php new file mode 100644 index 000000000..f8b227c2f --- /dev/null +++ b/app/views/sid/kependudukan/rtm_excel.php @@ -0,0 +1,42 @@ + +
    +
    +

    Data Rumah Tangga

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNomor Rumah TanggaKepala Rumah TanggaJumlah AnggotaDusunRWRTTanggal Terdaftar
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/rtm_excel_pbdt.php b/app/views/sid/kependudukan/rtm_excel_pbdt.php new file mode 100644 index 000000000..50c56c61d --- /dev/null +++ b/app/views/sid/kependudukan/rtm_excel_pbdt.php @@ -0,0 +1,139 @@ + + + +
    +
    +
    + +
    + + + + +
    PBDK2016.FKP.01
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    BLOK I. IDENTITAS WILAYAH SLS
    1KabupatenGUNUNGKIDUL  4Nama SLS lengkap dibawah Desa   Padukuhan:: 
    2Kecamatan      RT / RW::
    3Desa  5Jumlah RTS pada kolom (5) yg berkode 1 di SLS  +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    BLOK II. DAFTAR RTS
    Nomor RTSNama Kepala Rumah Tangga(KRT)/Nomor Induk Kependudukan(NIK)Nama Anggota Rumah Tangga (ART) LainnyaJumlah ARTAlamat Lengkap (nama jalan/gang/lorong/nomor, RT/RW/dusun)Apakah rumah tangga masih ada? (Lingkar iKODE)
    + 1. Ada, Status Kesejahteraan Tetap
    + 2. Ada, Status Kesejahteraan Berubah
    + 3. Ganti Kepala Rumah Tangga
    + 4. Pindah
    + 5. Meninggal
    + 6. Berubah Jml / Komposisi ART
    + 7. Baru
    + 8. Tidak dikenal/diketahui +
    KeteranganTelah diperiksa oleh asisten fasilitator (v)
    (01)(02)(03)(04)(05)(06)(07)(08)
    + RT RW   1     2     3     4     5     6     7     8  
    +
    \ No newline at end of file diff --git a/app/views/sid/kependudukan/rtm_print.php b/app/views/sid/kependudukan/rtm_print.php new file mode 100644 index 000000000..b405e9096 --- /dev/null +++ b/app/views/sid/kependudukan/rtm_print.php @@ -0,0 +1,47 @@ + + + +Data Rumah Tangga + + + + +
    +
    +

    Data Rumah Tangga

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNomor Rumah TanggaKepala Rumah TanggaJumlah AnggotaDusunRWRTTanggal Terdaftar
    +
    + + +
    + diff --git a/app/views/sid/nav.php b/app/views/sid/nav.php new file mode 100644 index 000000000..8d019fc3e --- /dev/null +++ b/app/views/sid/nav.php @@ -0,0 +1,19 @@ + \ No newline at end of file diff --git a/app/views/sid/wilayah/ajax_wil_dusun.php b/app/views/sid/wilayah/ajax_wil_dusun.php new file mode 100644 index 000000000..49f173e76 --- /dev/null +++ b/app/views/sid/wilayah/ajax_wil_dusun.php @@ -0,0 +1,105 @@ + + + +
    +
    + + + + + +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/wilayah/ajax_wil_rw.php b/app/views/sid/wilayah/ajax_wil_rw.php new file mode 100644 index 000000000..4b7aafa1f --- /dev/null +++ b/app/views/sid/wilayah/ajax_wil_rw.php @@ -0,0 +1,105 @@ + + + +
    +
    + + + + + +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/wilayah/list_dusun_rt.php b/app/views/sid/wilayah/list_dusun_rt.php new file mode 100644 index 000000000..30b44d498 --- /dev/null +++ b/app/views/sid/wilayah/list_dusun_rt.php @@ -0,0 +1,106 @@ +
    + + + + +
    +
    + +
    + +
    +
    +

    Wilayah Administratif RT (RW / Dusun )

    +
    +
    +
    +
    +
    +
    + " class="uibutton tipsy south" title="Tambah Data" > Tambah RT +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksiNomor RTNIK Ketua RTNama Ketua RTJumlah KKJiwaLKPR
    + + + " class="fa fa-pencil" title="Edit Data">" class="fa fa-trash-o" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> +
    NoTotaltotal_kktotal_jiwatotal_lktotal_pr
    +
    +
    + +
    +
    +
    diff --git a/app/views/sid/wilayah/wilayah.php b/app/views/sid/wilayah/wilayah.php new file mode 100644 index 000000000..a12903875 --- /dev/null +++ b/app/views/sid/wilayah/wilayah.php @@ -0,0 +1,155 @@ + +
    + + + +
    +
    +
    +
    +

    Wilayah Administratif Dusun

    + +
    + + +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/sid/wilayah/wilayah_cetak.php b/app/views/sid/wilayah/wilayah_cetak.php new file mode 100644 index 000000000..7e3d587b3 --- /dev/null +++ b/app/views/sid/wilayah/wilayah_cetak.php @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNama DusunNama KadusRWRTKKJiwaLKPR
    + + " title="Rincian Sub Wilayah">" title="Rincian Sub Wilayah">
    NoTotal
    \ No newline at end of file diff --git a/app/views/sid/wilayah/wilayah_excel.php b/app/views/sid/wilayah/wilayah_excel.php new file mode 100644 index 000000000..7c3be362c --- /dev/null +++ b/app/views/sid/wilayah/wilayah_excel.php @@ -0,0 +1,66 @@ + + + + +Data Wilayah + + + + +
    +
    +

    DATA WILAYAH ADMINISTRASI

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNama DusunNama KadusRWRTKKJiwaLKPR
    +
    + +
    + diff --git a/app/views/sid/wilayah/wilayah_form.php b/app/views/sid/wilayah/wilayah_form.php new file mode 100644 index 000000000..a804c718f --- /dev/null +++ b/app/views/sid/wilayah/wilayah_form.php @@ -0,0 +1,66 @@ + +
    + + +
    +
    +
    +
    +

    Form Data Dusun

    + + + + + + + + + + + + + + + +
    Nama Dusun
    Kepala Dusun Sebelumnya + +
    NIK - +
    NIK / Nama Kepala Dusun +
    +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/wilayah/wilayah_form_rt.php b/app/views/sid/wilayah/wilayah_form_rt.php new file mode 100644 index 000000000..73c916600 --- /dev/null +++ b/app/views/sid/wilayah/wilayah_form_rt.php @@ -0,0 +1,65 @@ + +
    + + +
    +
    +
    +
    +

    Form Data RT

    + + + + + + + + + + + + + + + +
    Nomor RT
    Ketua RT Sebelumnya + +
    NIK - +
    NIK / Nama Ketua RT +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/wilayah/wilayah_form_rw.php b/app/views/sid/wilayah/wilayah_form_rw.php new file mode 100644 index 000000000..a253e4e91 --- /dev/null +++ b/app/views/sid/wilayah/wilayah_form_rw.php @@ -0,0 +1,66 @@ + +
    + + +
    +
    +
    +
    +

    Form Data RW

    + + + + + + + + + + + + + + + +
    Nomor RW
    Ketua RW Sebelumnya + +
    NIK - +
    NIK / Nama Ketua RW +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sid/wilayah/wilayah_print.php b/app/views/sid/wilayah/wilayah_print.php new file mode 100644 index 000000000..75dc73a51 --- /dev/null +++ b/app/views/sid/wilayah/wilayah_print.php @@ -0,0 +1,74 @@ + + + +Data Wilayah + + + + + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +
    +
    +

    Data Kependudukan berdasarkan Wilayah

    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNama DusunNama KadusRWRTKKJiwaLKPR
    +
    + +
    + + diff --git a/app/views/sid/wilayah/wilayah_rt.php b/app/views/sid/wilayah/wilayah_rt.php new file mode 100644 index 000000000..141119cae --- /dev/null +++ b/app/views/sid/wilayah/wilayah_rt.php @@ -0,0 +1,90 @@ +
    + + + +
    +
    +
    + +
    +
    diff --git a/app/views/sid/wilayah/wilayah_rt_excel.php b/app/views/sid/wilayah/wilayah_rt_excel.php new file mode 100644 index 000000000..52bc726db --- /dev/null +++ b/app/views/sid/wilayah/wilayah_rt_excel.php @@ -0,0 +1,62 @@ + + + + +Data Wilayah + + + + +
    +
    +

    DATA RT DAN JUMLAH PENDUDUK

    +

    DUSUN RW

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoRTNIK Ketua RTNama Ketua RTJumlah KKJiwaLKPR
    + + + + +
    +
    + + +
    + diff --git a/app/views/sid/wilayah/wilayah_rt_print.php b/app/views/sid/wilayah/wilayah_rt_print.php new file mode 100644 index 000000000..99951ee90 --- /dev/null +++ b/app/views/sid/wilayah/wilayah_rt_print.php @@ -0,0 +1,55 @@ + + + +Data Wilayah + + + + +
    +
    +

    DATA RT DAN JUMLAH PENDUDUK

    +

    DUSUN RW

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoRTNIK Ketua RTNama Ketua RTJumlah KKJiwaLKPR
    + + + + +
    +
    + + +
    + diff --git a/app/views/sid/wilayah/wilayah_rw.php b/app/views/sid/wilayah/wilayah_rw.php new file mode 100644 index 000000000..2142454f6 --- /dev/null +++ b/app/views/sid/wilayah/wilayah_rw.php @@ -0,0 +1,93 @@ + diff --git a/app/views/sid/wilayah/wilayah_rw_excel.php b/app/views/sid/wilayah/wilayah_rw_excel.php new file mode 100644 index 000000000..bf2554196 --- /dev/null +++ b/app/views/sid/wilayah/wilayah_rw_excel.php @@ -0,0 +1,65 @@ + + + + +Data Wilayah + + + + +
    +
    +

    DATA RW DAN JUMLAH PENDUDUK

    +

    DUSUN

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoRWNIK Ketua RWNama Ketua RWJumlah RTJumlah KKJiwaLKPR
    + + + + + +
    +
    + + +
    + diff --git a/app/views/sid/wilayah/wilayah_rw_print.php b/app/views/sid/wilayah/wilayah_rw_print.php new file mode 100644 index 000000000..7d0c9fb55 --- /dev/null +++ b/app/views/sid/wilayah/wilayah_rw_print.php @@ -0,0 +1,58 @@ + + + +Data Wilayah + + + + +
    +
    +

    DATA RW DAN JUMLAH PENDUDUK

    +

    DUSUN

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoRWNIK Ketua RWNama Ketua RWJumlah RTJumlah KKJiwaLKPR
    + + + + + +
    +
    + + +
    + diff --git a/app/views/siteman.php b/app/views/siteman.php new file mode 100644 index 000000000..3b2919c3b --- /dev/null +++ b/app/views/siteman.php @@ -0,0 +1,43 @@ + + + + + SID <?= VERSI_SID ?> Login + + + +
    + +
    +
    SID
    +
    ver.
    + +
    Desa
    +
    Kecamatan
    +
    Kabupaten
    +
    +
    +
    +
    +

    Masukkan Username dan Password

    +
    + + + + +
    + Login Gagal. Username atau Password yang Anda masukkan salah! +
    + +
    + Tidak ada aktivitas dalam jangka waktu yang cukup lama. Demi keamanan silakan Login kembali. +
    + +
    +
    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/sms/ajax_anggota_form.php b/app/views/sms/ajax_anggota_form.php new file mode 100644 index 000000000..a6a01ea11 --- /dev/null +++ b/app/views/sms/ajax_anggota_form.php @@ -0,0 +1,42 @@ + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    NoNama Jenis KelaminAlamatNo HP
    + +
    +
    +
    + + +
    + +
    \ No newline at end of file diff --git a/app/views/sms/ajax_broadcast_form.php b/app/views/sms/ajax_broadcast_form.php new file mode 100644 index 000000000..1ec4c8a44 --- /dev/null +++ b/app/views/sms/ajax_broadcast_form.php @@ -0,0 +1,122 @@ + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Umur -
    Dusun +
    Jenis Kelamin + +
    Pekerjaan +
    Status Perkawinan +
    Agama + +
    Pendidikan Terakhir + +
    Status Penduduk +
    Group Kontak + +
    Isi Pesan
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sms/ajax_grup_form.php b/app/views/sms/ajax_grup_form.php new file mode 100644 index 000000000..d763833c1 --- /dev/null +++ b/app/views/sms/ajax_grup_form.php @@ -0,0 +1,17 @@ + + +
    + + + + + +
    Nama Group +
    +
    + + +
    + +
    \ No newline at end of file diff --git a/app/views/sms/ajax_kontak_form.php b/app/views/sms/ajax_kontak_form.php new file mode 100644 index 000000000..525c76e58 --- /dev/null +++ b/app/views/sms/ajax_kontak_form.php @@ -0,0 +1,28 @@ + + +
    + + + + + + + + + +
    Nama + +
    No HP
    +
    + + +
    + +
    \ No newline at end of file diff --git a/app/views/sms/ajax_kontak_form_edit.php b/app/views/sms/ajax_kontak_form_edit.php new file mode 100644 index 000000000..3c1625f64 --- /dev/null +++ b/app/views/sms/ajax_kontak_form_edit.php @@ -0,0 +1,20 @@ + + +
    + + + + + + + + + +
    Nama
    No HP
    +
    + + +
    + +
    \ No newline at end of file diff --git a/app/views/sms/ajax_penduduk_pindah_form.php b/app/views/sms/ajax_penduduk_pindah_form.php new file mode 100644 index 000000000..c35cc504f --- /dev/null +++ b/app/views/sms/ajax_penduduk_pindah_form.php @@ -0,0 +1,58 @@ + +
    + + + + + + + + +
    Dusun +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sms/ajax_penduduk_pindah_form_rt.php b/app/views/sms/ajax_penduduk_pindah_form_rt.php new file mode 100644 index 000000000..ac6441bad --- /dev/null +++ b/app/views/sms/ajax_penduduk_pindah_form_rt.php @@ -0,0 +1,7 @@ + RT + + \ No newline at end of file diff --git a/app/views/sms/ajax_penduduk_pindah_form_rw.php b/app/views/sms/ajax_penduduk_pindah_form_rw.php new file mode 100644 index 000000000..07c4f275c --- /dev/null +++ b/app/views/sms/ajax_penduduk_pindah_form_rw.php @@ -0,0 +1,7 @@ +RW + + \ No newline at end of file diff --git a/app/views/sms/ajax_polling_form.php b/app/views/sms/ajax_polling_form.php new file mode 100644 index 000000000..8204f3ea4 --- /dev/null +++ b/app/views/sms/ajax_polling_form.php @@ -0,0 +1,22 @@ + + +
    + + + + + + + + + +
    Nama Polling +
    Keterangan +
    +
    + + +
    + +
    \ No newline at end of file diff --git a/app/views/sms/ajax_sms_form.php b/app/views/sms/ajax_sms_form.php new file mode 100644 index 000000000..b5aea9d2a --- /dev/null +++ b/app/views/sms/ajax_sms_form.php @@ -0,0 +1,20 @@ + + +
    + + + + + + + + + +
    No. Tujuan
    Isi Pesan
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sms/ajax_sms_form_kirim.php b/app/views/sms/ajax_sms_form_kirim.php new file mode 100644 index 000000000..ff453fad2 --- /dev/null +++ b/app/views/sms/ajax_sms_form_kirim.php @@ -0,0 +1,44 @@ + + + +
    + + + + + + + + + +
    No HP Tujuan +
    +
    Pesan + +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/sms/berita_terkirim.php b/app/views/sms/berita_terkirim.php new file mode 100644 index 000000000..f8036d5b9 --- /dev/null +++ b/app/views/sms/berita_terkirim.php @@ -0,0 +1,132 @@ + +
    + + + + +
    +
    + +
    + +
    +
    +

    Berita Terkirim

    +
    +
    +
    +
    +
    +
    +  Tulis Pesan Baru +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/sms/create_sms.php b/app/views/sms/create_sms.php new file mode 100644 index 000000000..5b4407be7 --- /dev/null +++ b/app/views/sms/create_sms.php @@ -0,0 +1,125 @@ + +
    + + + + +
    +
    + +
    + +
    +
    +

    Kirim Pesan

    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNama">Nomor HP">Nomor HP">Nomor HPIsi Pesan">Dikirim ">Dikirim ">Dikirim 
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/sms/group.php b/app/views/sms/group.php new file mode 100644 index 000000000..ad475e524 --- /dev/null +++ b/app/views/sms/group.php @@ -0,0 +1,119 @@ + +
    + + + + +
    +
    + +
    + +
    +
    +

    Manajemen Group Kontak

    +
    +
    +
    +
    +
    +
    +  Tambah Group +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/sms/group_detail.php b/app/views/sms/group_detail.php new file mode 100644 index 000000000..78d3b74d8 --- /dev/null +++ b/app/views/sms/group_detail.php @@ -0,0 +1,121 @@ + +
    + + + + +
    +
    + +
    + +
    +
    +

    Manajemen Anggota Group Kontak +
    +
    + +
    +
    +
    + ');$('#'+'mainform').submit();}"> + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksiNama AnggotaJenis KelaminAlamatNo HP
    + + + " class="uibutton tipsy south" title="Hapus Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> + ">
    + +
    +
    +
    +
    +
    +
    " method="post"> + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +

    +
    diff --git a/app/views/sms/kontak.php b/app/views/sms/kontak.php new file mode 100644 index 000000000..8d802e237 --- /dev/null +++ b/app/views/sms/kontak.php @@ -0,0 +1,123 @@ + +
    + + + + +
    +
    + +
    + +
    +
    +

    Manajemen Nomer Kontak

    +
    +
    +
    +
    +
    +
    +  Tambah Kontak +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/sms/manajemen_sms_form.php b/app/views/sms/manajemen_sms_form.php new file mode 100644 index 000000000..6e635fd69 --- /dev/null +++ b/app/views/sms/manajemen_sms_form.php @@ -0,0 +1,152 @@ + + +
    + + + +
    +
    +

    Info Terbaru

    +
    +

    + If your Windows Vista or 7, has problems running one of our programs, there is a compatibility mode you can easily set per application. To configure this for your application, just locate the installation directory and right click on the .exe, select Properties from the menu. - Select the Compatibility tab and choose what compatibility you would like to run the program in. You can also choose - Run? this program as an administrator. There will be a tutorial coming soon on this subject. +

    +
    +
    +
    +
    +

    Form Manajemen User

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Group +
    + + + > + > + + > +
    +
    Username
    Password
    Nama
    Nomor HP
    Mail
    Nama Bendahara
    NIP Bendahara
    Nama Pengguna Anggaran
    NIP Pengguna Anggaran
    Foto +
    + + + + + +
    +
    Ganti Foto (Kosongi jika tidak ingin merubah foto)
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sms/manajemen_sms_table.php b/app/views/sms/manajemen_sms_table.php new file mode 100644 index 000000000..334f9817b --- /dev/null +++ b/app/views/sms/manajemen_sms_table.php @@ -0,0 +1,133 @@ + +
    + + + + +
    +
    + +
    + +
    +
    +

    Kotak Masuk

    +
    +
    +
    +
    +
    +
    +  Tulis Pesan Baru +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/sms/nav.php b/app/views/sms/nav.php new file mode 100644 index 000000000..aae3668a3 --- /dev/null +++ b/app/views/sms/nav.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/app/views/sms/pertanyaan.php b/app/views/sms/pertanyaan.php new file mode 100644 index 000000000..7ebf57bc0 --- /dev/null +++ b/app/views/sms/pertanyaan.php @@ -0,0 +1,122 @@ + +
    + + + + +
    +
    + +
    + +
    +
    +

    Manajemen Anggota Group Kontak +
    +
    + +
    +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksiNama AnggotaJenis KelaminAlamatNo HP
    + + + " class="ui-icons icon-remove tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> +
    + +
    +
    +
    +
    +
    +
    " method="post"> + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +

    +
    \ No newline at end of file diff --git a/app/views/sms/pesan_tertunda.php b/app/views/sms/pesan_tertunda.php new file mode 100644 index 000000000..8ae983783 --- /dev/null +++ b/app/views/sms/pesan_tertunda.php @@ -0,0 +1,132 @@ + +
    + + + + +
    +
    + +
    + +
    +
    +

    Pesan Tertunda

    +
    +
    +
    +
    +
    +
    +  Tulis Pesan Baru +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/sms/polling.php b/app/views/sms/polling.php new file mode 100644 index 000000000..66923b9ab --- /dev/null +++ b/app/views/sms/polling.php @@ -0,0 +1,117 @@ + +
    + + + + +
    +
    + +
    + +
    +
    +

    Polling SMS

    +
    +
    +
    +
    +
    +
    +  Tambah Polling +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksiNama PollingKeteranganJumlah Pertanyaan
    + + + " class="ui-icons icon-edit tipsy south" title="Edit Data" target="ajax-modalx" rel="window" header="Edit Data"> + " class="ui-icons icon-remove tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> + " class="ui-icons icon-document-table tipsy south" title="Rincian Anggota"> +
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sms/setting.php b/app/views/sms/setting.php new file mode 100644 index 000000000..b1d305da3 --- /dev/null +++ b/app/views/sms/setting.php @@ -0,0 +1,70 @@ + + +
    + + + +
    +
    + +
    + +
    +
    +

    Pengaturan Balas Otomatis

    +
    +
    +
    +
    + + + + +
    Isi Pesan Autoreply
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sosmed/facebook.php b/app/views/sosmed/facebook.php new file mode 100644 index 000000000..1d038e68d --- /dev/null +++ b/app/views/sosmed/facebook.php @@ -0,0 +1,56 @@ +
    + + + +
    + + + +
    +
    +
    + + + + + + + + +
    Link Akun Facebook
    Aktif +
    + + > + > +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sosmed/google.php b/app/views/sosmed/google.php new file mode 100644 index 000000000..07762fa37 --- /dev/null +++ b/app/views/sosmed/google.php @@ -0,0 +1,58 @@ +
    + + + +
    + + + +
    +

    Pengaturan Google

    +
    +
    +
    +
    + + + + + + + + +
    Link Akun Google
    Aktif +
    + + > + > +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sosmed/instagram.php b/app/views/sosmed/instagram.php new file mode 100644 index 000000000..dbe9fce18 --- /dev/null +++ b/app/views/sosmed/instagram.php @@ -0,0 +1,58 @@ +
    + + + +
    + + + +
    +

    Pengaturan Google

    +
    +
    +
    +
    + + + + + + + + +
    Link Akun Google
    Aktif +
    + + > + > +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sosmed/twitter.php b/app/views/sosmed/twitter.php new file mode 100644 index 000000000..955f93304 --- /dev/null +++ b/app/views/sosmed/twitter.php @@ -0,0 +1,58 @@ +
    + + + +
    + + + +
    +

    Pengaturan Twitter

    +
    +
    +
    +
    + + + + + + + + +
    Link Akun Twitter
    Aktif +
    + + > + > +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/sosmed/youtube.php b/app/views/sosmed/youtube.php new file mode 100644 index 000000000..41460ecc0 --- /dev/null +++ b/app/views/sosmed/youtube.php @@ -0,0 +1,58 @@ +
    + + + +
    + + + +
    +

    Pengaturan Youtube

    +
    +
    +
    +
    + + + + + + + + +
    Link Akun Youtube
    Aktif +
    + + > + > +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/statistik/ajax_rentang_form.php b/app/views/statistik/ajax_rentang_form.php new file mode 100644 index 000000000..2facc3448 --- /dev/null +++ b/app/views/statistik/ajax_rentang_form.php @@ -0,0 +1,17 @@ + + +
    + + + + + +
    Rentang - +
    +
    + + +
    + +
    \ No newline at end of file diff --git a/app/views/statistik/laporan/bulanan.php b/app/views/statistik/laporan/bulanan.php new file mode 100644 index 000000000..d3e8fa7cf --- /dev/null +++ b/app/views/statistik/laporan/bulanan.php @@ -0,0 +1,230 @@ +
    + + + +
    +
    +
    + +
    + + + + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN KELURAHAN

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Kelurahan:
    Kecamatan:
    Tahun:
    Bulan: + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    No.
    PERINCIAN
    + + + + + + + + +
    Warga Negara Indonesia
    Laki-laki
    Perempuan
    +
    + + + + + + + + +
    Orang Asing
    Laki-laki
    Perempuan
    +
    + + + + + + + + + +
    Jumlah
    Laki-laki
    Perempuan
    L + P
    +
    1
    2
    3
    4
    5
    6
    7
    8
    9
    1
    Penduduk awal bulan ini
    2
    Kelahiran bulan ini
    3
    Kematian bulan ini
    4
    Pendatang bulan ini
    5
    Pindah bulan ini
    6
    Penduduk akhir bulan ini
    7
    Penduduk hilang bulan ini
    +

     

    +

     

    +

     

    +

     

    +

     

    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/statistik/laporan/bulanan_excel.php b/app/views/statistik/laporan/bulanan_excel.php new file mode 100644 index 000000000..2fa4bf423 --- /dev/null +++ b/app/views/statistik/laporan/bulanan_excel.php @@ -0,0 +1,196 @@ + + + + +Cetak Laporan Bulanan + + + + +
    + +
    + + + + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN KELURAHAN

    +
    + + + + + + + + + + + + + + + + + + + + + +
    Kelurahan:
    Kecamatan:
    Laporan Bulan: tahun
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    No.
    PERINCIAN
    + + + + + + + + +
    Warga Negara Indonesia
    Laki-laki
    Perempuan
    +
    + + + + + + + + +
    Orang Asing
    Laki-laki
    Perempuan
    +
    + + + + + + + + + +
    Jumlah
    Laki-laki
    Perempuan
    L + P
    +
    1
    2
    3
    4
    5
    6
    7
    8
    9
    1
    Penduduk awal bulan ini
    2
    Kelahiran bulan ini
    3
    Kematian bulan ini
    4
    Pendatang bulan ini
    5
    Pindah bulan ini
    6
    Penduduk akhir bulan ini
    7
    Penduduk hilang bulan ini
    +

     

    +

     

    +
    + +
    + diff --git a/app/views/statistik/laporan/bulanan_print.php b/app/views/statistik/laporan/bulanan_print.php new file mode 100644 index 000000000..7c108ceb1 --- /dev/null +++ b/app/views/statistik/laporan/bulanan_print.php @@ -0,0 +1,189 @@ + + + +Cetak Laporan Bulanan + + + + +
    + +
    + + + + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN KELURAHAN

    +
    + + + + + + + + + + + + + + + + + + + + + +
    Kelurahan:
    Kecamatan:
    Laporan Bulan: tahun
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    No.
    PERINCIAN
    + + + + + + + + +
    Warga Negara Indonesia
    Laki-laki
    Perempuan
    +
    + + + + + + + + +
    Orang Asing
    Laki-laki
    Perempuan
    +
    + + + + + + + + + +
    Jumlah
    Laki-laki
    Perempuan
    L + P
    +
    1
    2
    3
    4
    5
    6
    7
    8
    9
    1
    Penduduk awal bulan ini
    2
    Kelahiran bulan ini
    3
    Kematian bulan ini
    4
    Pendatang bulan ini
    5
    Pindah bulan ini
    6
    Penduduk akhir bulan ini
    7
    Penduduk hilang bulan ini
    +

     

    +

     

    +
    + +
    + diff --git a/app/views/statistik/laporan/kelompok.php b/app/views/statistik/laporan/kelompok.php new file mode 100644 index 000000000..73f61590d --- /dev/null +++ b/app/views/statistik/laporan/kelompok.php @@ -0,0 +1,167 @@ +
    + + + +
    +
    +
    + +
    + + + + + + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN KELURAHAN

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Kelurahan:
    Kecamatan:
    Laporan Bulan:
    Dusun: + +
    + + + +

    DATA PILAH DUSUN

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RW
    RT
    + + + + + + + + +
    KK
    L
    P
    +
    + + + + + + + + + + + + +
    Kondisi dan kelompok umur
    Bayi(<1thn)
    Balita(1-5thn)
    SD(6-12thn)
    SMP(13-15thn)
    SMA(16-18thn)
    Lansia(>60)
    +
    + + + + + + + + +
    Difabel
    Fisik
    Mental
    +
    + + + + + + + + +
    Sakit Menahun
    L
    P
    +
    Hamil
    +

     

    +

     

    +

     

    +
    +
    +
    + +
    +
    + + +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/statistik/laporan/kelompok_excel.php b/app/views/statistik/laporan/kelompok_excel.php new file mode 100644 index 000000000..c2665b580 --- /dev/null +++ b/app/views/statistik/laporan/kelompok_excel.php @@ -0,0 +1,147 @@ + + + + +Cetak Laporan Kelompok Rentan + + + + +
    + +
    + + + + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN KELURAHAN

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Kelurahan:
    Kecamatan:
    Laporan Bulan:
    Dusun: + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RW
    RT
    + + + + + + + + +
    KK
    L
    P
    +
    + + + + + + + + + + + + +
    Kondisi dan kelompok umur
    Bayi(<1thn)
    Balita(1-5thn)
    SD(6-12thn)
    SMP(13-15thn)
    SMA(16-18thn)
    Lansia(>60)
    +
    + + + + + + + + +
    Difabel
    Fisik
    Mental
    +
    + + + + + + + + +
    Sakit Menahun
    L
    P
    +
    Hamil
    +

     

    +

     

    +

     

    +
    +
    + + + diff --git a/app/views/statistik/laporan/kelompok_print.php b/app/views/statistik/laporan/kelompok_print.php new file mode 100644 index 000000000..4c31739fd --- /dev/null +++ b/app/views/statistik/laporan/kelompok_print.php @@ -0,0 +1,141 @@ + + + +Cetak Laporan Kelompok Rentan + + + + +
    + +
    + + + + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAMPIRAN A - 9

    LAPORAN BULANAN KELURAHAN

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Kelurahan:
    Kecamatan:
    Laporan Bulan:
    Dusun: + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RW
    RT
    + + + + + + + + +
    KK
    L
    P
    +
    + + + + + + + + + + + + +
    Kondisi dan kelompok umur
    Bayi(<1thn)
    Balita(1-5thn)
    SD(6-12thn)
    SMP(13-15thn)
    SMA(16-18thn)
    Lansia(>60)
    +
    + + + + + + + + +
    Difabel
    Fisik
    Mental
    +
    + + + + + + + + +
    Sakit Menahun
    L
    P
    +
    Hamil
    +

     

    +

     

    +

     

    +
    +
    + + + diff --git a/app/views/statistik/laporan/keluarga.php b/app/views/statistik/laporan/keluarga.php new file mode 100644 index 000000000..07e2edf59 --- /dev/null +++ b/app/views/statistik/laporan/keluarga.php @@ -0,0 +1,163 @@ +
    + + + + +
    +
    Laporan : + +
    +
    Statistik Keluarga Berdasarkan : + +
    + +
    Statistik Penduduk Berdasarkan : + +
    +
    Statistik Keluarga Berdasarkan : + +
    + +
    +
    +

    Laporan

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + +
    NoNamaJumlah KK
    -
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/statistik/laporan/pendidikan.php b/app/views/statistik/laporan/pendidikan.php new file mode 100644 index 000000000..7cd9738a8 --- /dev/null +++ b/app/views/statistik/laporan/pendidikan.php @@ -0,0 +1,102 @@ +
    +

    Wilayah administratif

    +
    +
    +
    +
    +
    +
    +  Tambah Pengurus +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksiNamaJabatabN.I.PNo. TeleponAlamat
    + + + + + " class="ui-icons icon-edit tipsy south" title="Edit Data">" class="ui-icons icon-remove tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> + +
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/statistik/laporan/penduduk.php b/app/views/statistik/laporan/penduduk.php new file mode 100644 index 000000000..6a401abdc --- /dev/null +++ b/app/views/statistik/laporan/penduduk.php @@ -0,0 +1,111 @@ +
    + + + + +
    +
    Laporan : + +
    + + +
    +
    +

    Laporan

    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    NoStatistikJumlahLaki-lakiPerempuan
    +
    +
    +
    +
    +
    +
    " method="post"> + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/statistik/laporan/penduduk_tetap.php b/app/views/statistik/laporan/penduduk_tetap.php new file mode 100644 index 000000000..cfcb8d869 --- /dev/null +++ b/app/views/statistik/laporan/penduduk_tetap.php @@ -0,0 +1,158 @@ +
    + + + + +
    +
    Laporan : + +
    + +
    Penduduk Kelurahan + +
    + + +
    +
    +

    Manajemen Penduduk

    +
    +
    +
    +
    +
    +
    +  Tambah Data +
    +
    +
    +
    +
    +
    + + + " class="uibutton tipsy south" title="Clear Pencarian"> Clear +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoAksi">NIK">NIK">NIK">Nama ">Nama ">Nama No. KKAlamatPendidikanUmurPekerjaanStatus PerkawinanStatus Penduduk
    + + +" class="ui-icons icon-edit tipsy south" title="Edit Data">" target="ajax-modalz" rel="window" header="Lokasi " class="ui-icons icon-maps tipsy south" title="Lokasi ">" class="ui-icons icon-remove tipsy south" title="Delete Data" target="confirm" message="Apakah Anda Yakin?" header="Hapus Data"> +" id="test" name="">">">
    +
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/statistik/laporan/perubahan.php b/app/views/statistik/laporan/perubahan.php new file mode 100644 index 000000000..854d51dd5 --- /dev/null +++ b/app/views/statistik/laporan/perubahan.php @@ -0,0 +1,199 @@ +
    + + + + +
    +
    Laporan : + +
    + +
    +
    +
    + +
    + + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAPORAN PERUBAHAN PENDUDUK

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Kelurahan:
    Kecamatan:
    Kabupaten:
    Laporan Bulan:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NO
    DUSUN
    PENDUDUK AKHIR BULAN LALU
    PERUBAHAN PENDUDUK
    PENDUDUK AKHIR BULAN INI
    KELAHIRAN
    DATANG
    PERGI
    KEMATIAN
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    Total
    +

     

    +

     

    +

     

    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/statistik/laporan/perubahan_print.php b/app/views/statistik/laporan/perubahan_print.php new file mode 100644 index 000000000..f779dec9b --- /dev/null +++ b/app/views/statistik/laporan/perubahan_print.php @@ -0,0 +1,169 @@ + + + +Cetak Laporan Perubahan Penduduk + + + + +
    + +
    + + + + + + + + +

    PEMERINTAH KABUPATEN/KOTA

    LAPORAN PERUBAHAN PENDUDUK

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Kelurahan:
    Kecamatan:
    Kabupaten:
    Laporan Bulan:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NO
    DUSUN
    PENDUDUK AKHIR BULAN LALU
    PERUBAHAN PENDUDUK
    PENDUDUK AKHIR BULAN INI
    KELAHIRAN
    DATANG
    PERGI
    KEMATIAN
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    L
    P
    JML
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    Total
    +

     

    +

     

    +

     

    +
    + + + diff --git a/app/views/statistik/menu.php b/app/views/statistik/menu.php new file mode 100644 index 000000000..18000e52a --- /dev/null +++ b/app/views/statistik/menu.php @@ -0,0 +1,48 @@ + \ No newline at end of file diff --git a/app/views/statistik/nav.php b/app/views/statistik/nav.php new file mode 100644 index 000000000..a9640839d --- /dev/null +++ b/app/views/statistik/nav.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/app/views/statistik/penduduk.php b/app/views/statistik/penduduk.php new file mode 100644 index 000000000..a18f20677 --- /dev/null +++ b/app/views/statistik/penduduk.php @@ -0,0 +1,156 @@ + diff --git a/app/views/statistik/penduduk_excel.php b/app/views/statistik/penduduk_excel.php new file mode 100644 index 000000000..fc8baddc9 --- /dev/null +++ b/app/views/statistik/penduduk_excel.php @@ -0,0 +1,58 @@ + + + + +Laporan Data Statistik Kependudukan menurut + + + + +
    + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + +
    NoKategori KelompokJumlahLaki-lakiPerempuan
    + + +
    + + +
    +
    + +
    + diff --git a/app/views/statistik/penduduk_graph.php b/app/views/statistik/penduduk_graph.php new file mode 100644 index 000000000..abfbf9236 --- /dev/null +++ b/app/views/statistik/penduduk_graph.php @@ -0,0 +1,168 @@ +
    + + + + + +
    + Statistik Penduduk + + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoKategori KelompokJumlahLaki-lakiPerempuan
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/statistik/penduduk_pie.php b/app/views/statistik/penduduk_pie.php new file mode 100644 index 000000000..a236f485e --- /dev/null +++ b/app/views/statistik/penduduk_pie.php @@ -0,0 +1,143 @@ +
    + + + + +
    + Statistik Penduduk + + + + + + + +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoKategori KelompokJumlahLaki-lakiPerempuan
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/statistik/penduduk_print.php b/app/views/statistik/penduduk_print.php new file mode 100644 index 000000000..818e5b872 --- /dev/null +++ b/app/views/statistik/penduduk_print.php @@ -0,0 +1,134 @@ + + + +Laporan Statistik + + + + +
    + +
    + + + + + + + +
    + +

    PEMERINTAH KABUPATEN

    +

    +

    KECAMATAN

    +

    DESA

    +

    LAPORAN DATA STATISTIK KEPENDUDUKAN MENURUT

    +
    +
    + + + +
    + + + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + + +
    +
    + + : +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoStatistikJumlahLaki-lakiPerempuan
    +
    + + + + +
    +
    + + + +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + +
    +
    + + + - +
    +
    + +
    + diff --git a/app/views/statistik/rentang_umur.php b/app/views/statistik/rentang_umur.php new file mode 100644 index 000000000..f516fe3a1 --- /dev/null +++ b/app/views/statistik/rentang_umur.php @@ -0,0 +1,65 @@ + + diff --git a/app/views/surat/form/surat_bio_penduduk.php b/app/views/surat/form/surat_bio_penduduk.php new file mode 100644 index 000000000..7c2f62b99 --- /dev/null +++ b/app/views/surat/form/surat_bio_penduduk.php @@ -0,0 +1,171 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Biodata Penduduk

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    DATA PRIBADI :
    Alamat Sebelumnya
    No Paspor
    Tanggal Berakhir Paspor
    Akte Kelahiran
    No Akte Kelahiran
    Akte Perkawinan /Buku Nikah
    No Akte Perkawinan /Buku Nikah
    Tanggal Akte Perkawinan /Buku Nikah
    Akte Perceraian
    Tanggal Perceraian
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_izin_keramaian.php b/app/views/surat/form/surat_izin_keramaian.php new file mode 100644 index 000000000..6f053cbc5 --- /dev/null +++ b/app/views/surat/form/surat_izin_keramaian.php @@ -0,0 +1,146 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Pengantar Izin Keramaian

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Jenis Acara + +
    Keperluan + +
    Berlaku + sampai +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_izin_orangtua.php b/app/views/surat/form/surat_izin_orangtua.php new file mode 100644 index 000000000..2383b6505 --- /dev/null +++ b/app/views/surat/form/surat_izin_orangtua.php @@ -0,0 +1,164 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Izin Orang Tua

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    DATA PASANGAN :
    Nama Lengkap + +
    Tempat Tanggal Lahir + + +
    Warganegara + +
    Agama + +
    Pekerjaan + +
    Tempat Tinggal + +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_jalan.php b/app/views/surat/form/surat_jalan.php new file mode 100644 index 000000000..3e3b0f010 --- /dev/null +++ b/app/views/surat/form/surat_jalan.php @@ -0,0 +1,140 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Bepergian / Jalan

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Keterangan + +
    Berlaku + sampai +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_kehendak_nikah.php b/app/views/surat/form/surat_kehendak_nikah.php new file mode 100644 index 000000000..e4ffab0d7 --- /dev/null +++ b/app/views/surat/form/surat_kehendak_nikah.php @@ -0,0 +1,190 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Pemberitahuan Kehendak Nikah

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama yang Melapor +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Calon Mempelai Pria
    Calon Mempelai Wanita
    Hari, Tanggal, Jam, + , +
    Mas Kawin
    Tunai / Hutang
    Tempat
    Jumlah Lampiran
    Lampiran 1
    Lampiran 2
    Lampiran 3
    Lampiran 4
    Lampiran 5
    Lampiran 6
    Lampiran 7
    Lampiran 8
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_asalusul.php b/app/views/surat/form/surat_ket_asalusul.php new file mode 100644 index 000000000..ee7204117 --- /dev/null +++ b/app/views/surat/form/surat_ket_asalusul.php @@ -0,0 +1,186 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Keterangan Asal Usul

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    DATA AYAH (Isi jika ayah bukan warga desa ini)
    Nama
    Tempat Tanggal Lahir +
    Warganegara
    Agama
    Pekerjaan
    Tempat Tinggal
    DATA IBU (Isi jika ibu bukan warga desa ini)
    Nama
    Tempat Tanggal Lahir +
    Warganegara
    Agama
    Pekerjaan
    Tempat Tinggal
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_beda_nama.php b/app/views/surat/form/surat_ket_beda_nama.php new file mode 100644 index 000000000..3aefb9e02 --- /dev/null +++ b/app/views/surat/form/surat_ket_beda_nama.php @@ -0,0 +1,172 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Keterangan Beda Identitas

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    IDENTITAS KEDUA
    Identitas dalam (nama kartu)
    Nomor identitas
    Nama
    Tempat Tanggal Lahir +
    Jenis Kelamin
    Alamat
    Agama
    Pekerjaan
    Keterangan
    Perbedaan
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_catatan_kriminal.php b/app/views/surat/form/surat_ket_catatan_kriminal.php new file mode 100644 index 000000000..3f5a56e11 --- /dev/null +++ b/app/views/surat/form/surat_ket_catatan_kriminal.php @@ -0,0 +1,137 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Formulir Layanan: Surat Pengantar SKCK

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Keterangan + +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    +
    + +
    +
    +
    + + + + + +
    +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_domisili_usaha.php b/app/views/surat/form/surat_ket_domisili_usaha.php new file mode 100644 index 000000000..8bdd49f3c --- /dev/null +++ b/app/views/surat/form/surat_ket_domisili_usaha.php @@ -0,0 +1,140 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Keterangan Domisili Usaha

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Nama/ Jenis Usaha + +
    Keterangan + +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_jual_beli.php b/app/views/surat/form/surat_ket_jual_beli.php new file mode 100644 index 000000000..e7b39ef6b --- /dev/null +++ b/app/views/surat/form/surat_ket_jual_beli.php @@ -0,0 +1,171 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Keterangan Jual Beli

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    BARANG JUAL BELI
    Jenis Barang
    Rincian Barang
    IDENTITAS PEMBELI
    Nomor identitas
    Nama
    Tempat Tanggal Lahir +
    Jenis Kelamin
    Alamat
    Pekerjaan
    Nama ketua adat
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_kehilangan.php b/app/views/surat/form/surat_ket_kehilangan.php new file mode 100644 index 000000000..2423127ba --- /dev/null +++ b/app/views/surat/form/surat_ket_kehilangan.php @@ -0,0 +1,146 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Pengantar Keterangan Kehilangan

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Barang yang hilang + +
    Rincian + +
    Keterangan kejadian + +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_kelahiran.php b/app/views/surat/form/surat_ket_kelahiran.php new file mode 100644 index 000000000..6676e4c17 --- /dev/null +++ b/app/views/surat/form/surat_ket_kelahiran.php @@ -0,0 +1,173 @@ + + +
    +
    +
    +

    Surat Keterangan Kelahiran

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama Ibu +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat
    DATA KELAHIRAN :
    Hari/ Tanggal/ Jam / + / +
    Tempat kelahiran +
    Nama Bayi
    Jenis Kelamin Bayi
    DATA PELAPOR :
    Nama
    NIK
    Umur tahun
    Pekerjaan
    Alamat
    Hubungan Pelapor dengan Bayi
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    +
    + +
    +
    +
    + + + + +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_kematian.php b/app/views/surat/form/surat_ket_kematian.php new file mode 100644 index 000000000..6940b291f --- /dev/null +++ b/app/views/surat/form/surat_ket_kematian.php @@ -0,0 +1,177 @@ + + +
    + + + +
    +
    +Surat Administrasi + +
    + +
    +
    +
    +
    +
    +

    Surat Keterangan Kematian

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama yang Meninggal +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat
    Hari/ Tanggal/ Jam/ + / +
    Tempat Meninggal
    Penyebab Kematian
    DATA PELAPOR
    Nama
    NIK
    Tanggal Lahir
    Pekerjaan
    Alamat
    Hubungan dengan yang mati
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    +
    + +
    +
    +
    + + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_kematian_suami_istri.php b/app/views/surat/form/surat_ket_kematian_suami_istri.php new file mode 100644 index 000000000..2703568d1 --- /dev/null +++ b/app/views/surat/form/surat_ket_kematian_suami_istri.php @@ -0,0 +1,167 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Keterangan Kematian Suami/Istri

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama []
    Nomor Surat + +
    DATA ORANG MENINGGAL :
    Nama
    Bin/ Binti
    Tempat Tanggal Lahir +
    Warganegara
    Agama
    Pekerjaan
    Tempat Tinggal
    Tanggal Meninggal
    Tempat Meninggal
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_ktp_dlm_proses.php b/app/views/surat/form/surat_ket_ktp_dlm_proses.php new file mode 100644 index 000000000..b5154b1b8 --- /dev/null +++ b/app/views/surat/form/surat_ket_ktp_dlm_proses.php @@ -0,0 +1,129 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Keterangan KTP dalam Proses

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_kurang_mampu.php b/app/views/surat/form/surat_ket_kurang_mampu.php new file mode 100644 index 000000000..82ba39c7c --- /dev/null +++ b/app/views/surat/form/surat_ket_kurang_mampu.php @@ -0,0 +1,134 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Keterangan Kurang Mampu

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Keterangan + +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_lahir_mati.php b/app/views/surat/form/surat_ket_lahir_mati.php new file mode 100644 index 000000000..f5b9bdcb5 --- /dev/null +++ b/app/views/surat/form/surat_ket_lahir_mati.php @@ -0,0 +1,161 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Keterangan Lahir Mati

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Hari, Tanggal Mati +, + +
    Tempat Mati + +
    Lama di Kandungan + bulan +
    Pelapor + +
    Hubungan dengan yang Lahir Mati + +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_nikah.php b/app/views/surat/form/surat_ket_nikah.php new file mode 100644 index 000000000..ccc0812c4 --- /dev/null +++ b/app/views/surat/form/surat_ket_nikah.php @@ -0,0 +1,170 @@ + + +
    + + + +
    +
    +Surat Administrasi + +
    +
    +
    +
    +
    +
    +

    Surat Keterangan Untuk Nikah

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Keterangan + +
    Bin/Binti + +
    Jika pria, terangkan jejaka, duda atau beristri dan berapa istrinya + +
    Jika wanita, terangkan gadis atau janda + +
    Nama Istri/Suami terdahulu + +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_orangtua.php b/app/views/surat/form/surat_ket_orangtua.php new file mode 100644 index 000000000..fa8b59069 --- /dev/null +++ b/app/views/surat/form/surat_ket_orangtua.php @@ -0,0 +1,200 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Keterangan Tentang Orang Tua

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    DATA AYAH :
    Nama Lengkap + +
    Tempat Tanggal Lahir + + +
    Warganegara + +
    Agama + +
    Pekerjaan + +
    Tempat Tinggal + +
    DATA IBU :
    Nama Lengkap + +
    Tempat Tanggal Lahir + + +
    Warganegara + +
    Agama + +
    Pekerjaan + +
    Tempat Tinggal + +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_penduduk.php b/app/views/surat/form/surat_ket_penduduk.php new file mode 100644 index 000000000..65ca1bf2e --- /dev/null +++ b/app/views/surat/form/surat_ket_penduduk.php @@ -0,0 +1,139 @@ + + +
    + + + +
    +
    +
    +

    Surat Keterangan

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Keterangan + +
    Berlaku + sampai +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_pengantar.php b/app/views/surat/form/surat_ket_pengantar.php new file mode 100644 index 000000000..67324b40b --- /dev/null +++ b/app/views/surat/form/surat_ket_pengantar.php @@ -0,0 +1,135 @@ + + +
    +
    +
    +

    Formulir Layanan: Surat Keterangan

    +
    +
    + + + + + +
    NIK / Nama +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat
    Pendidikan
    Warganegara / Agama / +
    Dokumen Kelengkapan / Syarat + " class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama []
    Nomor Surat
    Keperluan
    Tujuan
    Keterangan
    Berlaku sampai
    Staf Pemerintah Desa
    Sebagai
    +
    +
    +
    +
    + +
    +
    +
    + + + +
    +
    +
    + +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_pindah_penduduk.php b/app/views/surat/form/surat_ket_pindah_penduduk.php new file mode 100644 index 000000000..802517fb0 --- /dev/null +++ b/app/views/surat/form/surat_ket_pindah_penduduk.php @@ -0,0 +1,243 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Keterangan Pindah Penduduk

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Alasan Pindah + +
    Jumlah Pengikut + +
    Pengikut +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNIKNamaJKUmurStatus KawinPendidikan
    + +
    +
    +
    Pindah Ke
    RW + +
    RT + +
    Kampung + +
    Kelurahan + +
    Kecamatan + +
    kabupaten + +
    provinsi + +
    Berlaku + +
    Keterangan + +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    +
    + +
    +
    +
    + + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_ket_usaha.php b/app/views/surat/form/surat_ket_usaha.php new file mode 100644 index 000000000..53e7974e1 --- /dev/null +++ b/app/views/surat/form/surat_ket_usaha.php @@ -0,0 +1,146 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Keterangan Usaha

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Nama/ Jenis Usaha + +
    Keterangan + +
    Berlaku + sampai +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_keterangan_rahasia.php b/app/views/surat/form/surat_keterangan_rahasia.php new file mode 100644 index 000000000..42d7432b6 --- /dev/null +++ b/app/views/surat/form/surat_keterangan_rahasia.php @@ -0,0 +1,216 @@ + + +
    + + + + +
    +
    +
    +

    Formulir Layanan : Surat Keterangan Rahasia

    +
    +
    + + + + + +
    NIK / Nama +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat
    Pendidikan
    Warganegara / Agama /
    Data Keluarga / KK + Tampilkan + Sembunyikan +
    Keluarga +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNIKNamaJKHubunganUmurStatus KawinPendidikan
    + +
    +
    +
    Dokumen Kelengkapan / Syarat + " class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama []
    Nomor Surat
    Keperluan + +
    Tujuan + +
    Keterangan + +
    Berlaku sampai
    Staf/ Jabatan Pemerintah Desa +
    Sebagai +
    +
    +
    +
    +
    + +
    +
    +
    + + + + +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_lap_kehilangan.php b/app/views/surat/form/surat_lap_kehilangan.php new file mode 100644 index 000000000..f8b9cd937 --- /dev/null +++ b/app/views/surat/form/surat_lap_kehilangan.php @@ -0,0 +1,152 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Pengantar Keterangan Kehilangan

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Hari + +
    Tanggal + +
    Tempat + +
    Barang yang hilang + +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_permohonan_akta.php b/app/views/surat/form/surat_permohonan_akta.php new file mode 100644 index 000000000..8fa593663 --- /dev/null +++ b/app/views/surat/form/surat_permohonan_akta.php @@ -0,0 +1,165 @@ + + +
    + + + +
    +
    +Surat Administrasi + +
    + +
    +
    +
    +
    +
    +

    Surat Permohonan Akte Lahir

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama kepala Keluarga +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat
    Nama Anak
    Tempat Tanggal lahir +
    Hari Lahir
    Alamat
    Nama Ayah
    Nama Ibu
    Alamat
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_permohonan_duplikat_kelahiran.php b/app/views/surat/form/surat_permohonan_duplikat_kelahiran.php new file mode 100644 index 000000000..c2993dbc7 --- /dev/null +++ b/app/views/surat/form/surat_permohonan_duplikat_kelahiran.php @@ -0,0 +1,168 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Pengantar Permohonan Duplikat Kelahiran

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Hari lahir, Pukul +
    Tempat Lahir
    DATA PELAPOR :
    Nama
    NIK
    Jenis Kelamin
    Tempat Lahir
    Tanggal lahir
    Pekerjaan
    Alamat
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_pernyataan_akta.php b/app/views/surat/form/surat_pernyataan_akta.php new file mode 100644 index 000000000..62a04f361 --- /dev/null +++ b/app/views/surat/form/surat_pernyataan_akta.php @@ -0,0 +1,155 @@ + + +
    + + + +
    +
    +Surat Administrasi + +
    +
    +
    +
    +
    +
    +

    Surat Pernyataan Belum Memiliki Akte Lahir

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama Ayah +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat
    DATA KELAHIRAN
    Nama
    Tempat Tanggal Lahir +
    Jenis Kelamin
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_persetujuan_mempelai.php b/app/views/surat/form/surat_persetujuan_mempelai.php new file mode 100644 index 000000000..23447a41c --- /dev/null +++ b/app/views/surat/form/surat_persetujuan_mempelai.php @@ -0,0 +1,165 @@ + + +
    + + + +
    +
    +Surat Administrasi + +
    +
    +
    +
    +
    +
    +

    Surat Persetujuan Mempelai

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nomor Surat
    DATA SUAMI (Berasal dari desa) :
    Nama Suami + +*) Diisi jika suami berasal dari dalam desa
    DATA SUAMI (Berasal dari luar desa) :
    Nama Lengkap*) Diisi jika suami berasal dari luar desa
    Bin
    Tempat Tanggal Lahir +
    Warganegara
    Agama
    Pekerjaan
    Tempat Tinggal
    DATA ISTRI (Berasal dari desa) :
    Nama Istri + +*) Diisi jika istri berasal dari dalam desa
    DATA ISTRI (Berasal dari luar desa) :
    Nama Lengkap*) Diisi jika istri berasal dari luar desa
    Bin
    Tempat Tanggal Lahir +
    Warganegara
    Agama
    Pekerjaan
    Tempat Tinggal
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/form/surat_pindah_antar_kab_prov.php b/app/views/surat/form/surat_pindah_antar_kab_prov.php new file mode 100644 index 000000000..fb9e07c28 --- /dev/null +++ b/app/views/surat/form/surat_pindah_antar_kab_prov.php @@ -0,0 +1,140 @@ + + +
    + + +
    +
    +
    +
    +
    +

    Surat Pengantar Pindah Antar Kabupaten/Kota atau Provinsi

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat Tanggal Lahir (Umur) + ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    Dokumen Kelengkapan / Syarat +" class="uibutton special">Daftar Dokumen" class="uibutton confirm">Manajemen Dokumen )* Atas Nama [] +
    Nomor Surat + +
    Alamat Tujuan Pindah + +
    Jumlah Keluarga yang Pindah + orang +
    Staf Pemerintah Desa + +
    Sebagai + +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/format_surat.php b/app/views/surat/format_surat.php new file mode 100644 index 000000000..7c01cdc44 --- /dev/null +++ b/app/views/surat/format_surat.php @@ -0,0 +1,64 @@ + +
    +
    +
    +
    +
    +
    +

    Menu Cepat Pencarian / Cetak Layanan Surat

    +
    +
    +
    + +
    +
    +

    +
    +

    Layanan Surat Administrasi Kependudukan

    +
    +
    +
    +

    Jenis-jenis surat dapat diubah, ditambah, atau dikurangi dengan menggunakan fungsi pengaturan di Menu Master Surat.

    + + + + + + +
    +
    +
    +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/nav.php b/app/views/surat/nav.php new file mode 100644 index 000000000..37eec2ead --- /dev/null +++ b/app/views/surat/nav.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/app/views/surat/panduan.php b/app/views/surat/panduan.php new file mode 100644 index 000000000..96ca9e09a --- /dev/null +++ b/app/views/surat/panduan.php @@ -0,0 +1,12 @@ +
    +
    +
    +

    Panduan Pembuatan Surat Administrasi Kependudukan

    +
    +
    +
    + load->view('surat/signature.php');?> +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/print/print_surat_bio_penduduk.php b/app/views/surat/print/print_surat_bio_penduduk.php new file mode 100644 index 000000000..1bfa5f997 --- /dev/null +++ b/app/views/surat/print/print_surat_bio_penduduk.php @@ -0,0 +1,113 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +
    +
    +

    BIODATA PENDUDUK

    +

    Nomor :

    +
    +
    +
    + + + + + +
    I. DATA KELUARGA
    Nama Kepala Keluarga:
    Nomor Kartu Keluarga:
    Alamat Keluarga:RT. , RW. , Dusun , Desa , Kec. , Kab.
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    II. DATA INDIVIDU
    Nama Lengkap:
    NIK:
    Alamat Sebelumnya:
    Nomor Paspor:
    Tanggal Berakhir Paspor:
    Jenis Kelamin:
    Tempat Lahir:
    Tanggal Lahir:
    Akte Kelahiran /Surat Kelahiran:
    No Akte Kelahiran:
    Golongan Darah:
    Agama:
    Status:
    Akte Perkawinan /Buku Nikah:
    No Akte /Buku Nikah:
    Tgl. Akte /Buku Nikah:
    Akte Perceraian:
    Tanggal Perceraian:
    Status Hubungan dalam Keluarga:
    Kelainan Fisik / Mental: /
    Pendidikan Terakhir:
    Pekerjaan:
    +
    + + + + + + + +
    III. DATA ORANG TUA
    Nama Ibu:
    NIK Ibu:
    Nama Ayah:
    NIK Ayah:
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_izin_keramaian.php b/app/views/surat/print/print_surat_izin_keramaian.php new file mode 100644 index 000000000..7b216720d --- /dev/null +++ b/app/views/surat/print/print_surat_izin_keramaian.php @@ -0,0 +1,96 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT PENGANTAR IZIN KERAMAIAN

    +

    Nomor :

    +
    +
    + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    +
    + + + + + + + + + + + + + +
    Nama Lengkap:
    NIK/ No. KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pekerjaan:
    Pendidikan:
    Kewarganegaraan :
    Keterangan :Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam +No. KK: dengan NIK: , kepala keluarga : .
    Keperluan : Sebagai pengantar untuk mendapatkan Surat Izin Keramaian berupa mulai tanggal sampai dengan dengan keperluan .
    + + + + + + + + + + + +
    Demikian surat keterangan ini kami buat untuk dapat dipergunakan sebagaimana mestinya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    Pemegang Surat
    ( )( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_izin_orangtua.php b/app/views/surat/print/print_surat_izin_orangtua.php new file mode 100644 index 000000000..f7f2fa034 --- /dev/null +++ b/app/views/surat/print/print_surat_izin_orangtua.php @@ -0,0 +1,124 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN IZIN ORANG TUA

    +

    No:

    +
    +
    + + + + + +
    Yang bertanda tangan dibawah ini:
    +
    + + + + + + + + + + + + + + +
    Nama Lengkap:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    Nama Lengkap:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    + + + + + + +
    Adalah ayah kandung dan ibu kandung dari
    + + + + + + + +
    Nama Lengkap:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    + + + + + + +
    Memberikan izin kepadanya untuk melakukan pernikahan dengan:
    + + + + + + + +
    Nama Lengkap:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    + + + + + + + + + +
    Demikianlah surat izin ini dibuat dengan kesadaran tanpa ada paksaan dari siapapun juga dan dipergunakan seperlunya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    I. AyahII. Ibu
    ( )( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_jalan.php b/app/views/surat/print/print_surat_jalan.php new file mode 100644 index 000000000..2eef09e62 --- /dev/null +++ b/app/views/surat/print/print_surat_jalan.php @@ -0,0 +1,95 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN BEPERGIAN

    +

    Nomor :

    + +
    + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    + + + + + + + + + + + + + + +
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Keterangan :Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam +No. KK: dengan NIK: , kepala keluarga : .
    Keperluan :
    Berlaku mulai : sampai dengan
    + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_kehendak_nikah.php b/app/views/surat/print/print_surat_kehendak_nikah.php new file mode 100644 index 000000000..8efce8b3d --- /dev/null +++ b/app/views/surat/print/print_surat_kehendak_nikah.php @@ -0,0 +1,120 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +
    + + + + + + + + + +
    Lampiran: lembar ,
    Perihal:Pemberitahuan Kehendak Nikah
    + + + + + + + + + + + + + +
    Kepada Yth.
    Kepala KUA / Penghulu Kecamatan
    + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    Assalamualaikum Wr. Wb.
    Dengan ini kami memberitahukan bahwa akan dilangsungkan pernikahan antara dengan pada hari , tanggal jam dengan maskawin berupa dibayar bertempat di
    Bersama ini kami lampirkan surat-surat yang diperlukan untuk diperiksa, sebagai berikut :
    Kami mohon pernikahan tersebut dapat dihadiri/ diawasi dan dicatat oleh Bapak Penghulu sesuai dengan ketentuan perundang-undangan yang berlaku.
    Wassalamualaikum Wr. Wb.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Diterima Tanggal : ________________
    Yang menerimaYang memberitahukan
    Kepala KUA/ Penghulu *)Calon mempelai / Wali/ Wakil Wali *)
    __________________________( )
    *) coret yang tidak perlu
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_asalusul.php b/app/views/surat/print/print_surat_ket_asalusul.php new file mode 100644 index 000000000..177bf9676 --- /dev/null +++ b/app/views/surat/print/print_surat_ket_asalusul.php @@ -0,0 +1,142 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN ASAL - USUL

    +

    No:

    +
    +
    + + + + + +
    Yang bertanda tangan dibawah ini menerangkan dengan sesungguhnya bahwa:
    +
    + + + + + + + +
    Nama Lengkap:
    Tempat dan Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    + + + + + + +
    adalah benar anak kandung dari pernikahan seorang pria:
    + + + + + + + + +
    Nama Lengkap:
    Tempat/Tgl. Lahir: ,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    + + + + + + + + +
    Nama Lengkap:
    Tempat/Tgl. Lahir: ,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    + + + + + + + +
    dengan seorang wanita:
    + + + + + + + + +
    Nama Lengkap:
    Tempat dan Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RW. , RT. , Dusun , Kel. , Kec. , Kab.
    + + + + + + + + +
    Nama Lengkap:
    Tempat dan Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    + + + + + + + + + + + + + +
    Demikianlah, surat keterangan ini dibuat dengan mengingat sumpah jabatan dan untuk dipergunakan seperlunya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_beda_nama.php b/app/views/surat/print/print_surat_ket_beda_nama.php new file mode 100644 index 000000000..1b3ac2dbe --- /dev/null +++ b/app/views/surat/print/print_surat_ket_beda_nama.php @@ -0,0 +1,103 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN BEDA IDENTITAS

    +

    Nomor :

    +
    +
    + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    +
    + + + + + + + + + + + + + + + + + + + + + +
    I. Identitas dalam KK
    Nama Lengkap:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RW. , RT. , Dusun , Desa , Kec. , Kab.
    Agama:
    Pekerjaan:
    II. Identitas dalam
    No Identitas:
    Nama:
    Tempat dan Tanggal Lahir:
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:
    Agama:
    Pekerjaan:
    Keterangan:
    + + + + + + + + + + + +
    Adalah benar-benar warga Desa dan merupakan orang yang sama namun terdapat perbedaan seperti tersebut di atas. Adapun data yang benar dan dipakai seperti yang tercantum di Kartu Keluarga (KK).
    Demikian surat keterangan ini dibuat dengan sesungguhnya agar dapat dipergunakan sebagaimana mestinya
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_catatan_kriminal.php b/app/views/surat/print/print_surat_ket_catatan_kriminal.php new file mode 100644 index 000000000..669c0368b --- /dev/null +++ b/app/views/surat/print/print_surat_ket_catatan_kriminal.php @@ -0,0 +1,96 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    PENGANTAR SURAT KETERANGAN CATATAN KEPOLISIAN

    +

    Nomor :

    +
    +
    + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    +
    + + + + + + + + + + + + + +
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Keterangan :Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam +No. KK: dengan NIK: , kepala keluarga : menurut data kami tidak pernah terlibat perkara Polisi dan beradat istiadat baik
    Keperluan : Sebagai pengantar untuk mendapatkan SKCK yang akan dipergunakan untuk
    + + + + + + + + + + + +
    Demikian Surat ini dibuat, untuk dipergunakan sebagaimana mestinya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_domisili_usaha.php b/app/views/surat/print/print_surat_ket_domisili_usaha.php new file mode 100644 index 000000000..84c771ff0 --- /dev/null +++ b/app/views/surat/print/print_surat_ket_domisili_usaha.php @@ -0,0 +1,102 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN TEMPAT BERDOMISILI USAHA

    +

    Nomor :

    +
    +
    + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    +
    + + + + + + + + + + + + + +
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Bahwa yang tersebut namanya diatas, memang benar penduduk kami yang memiliki usaha , berlokasi di Dusun , Desa , Kecamatan , Kabupaten .
    Demikian surat keterangan ini dibuat dengan sebenarnya agar dapat dipergunakan sebagaimana mestinya.
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    Pemegang Surat
    ( )( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_jual_beli.php b/app/views/surat/print/print_surat_ket_jual_beli.php new file mode 100644 index 000000000..aac171e9e --- /dev/null +++ b/app/views/surat/print/print_surat_ket_jual_beli.php @@ -0,0 +1,99 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN JUAL BELI

    +

    Nomor :

    +
    +
    + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    +
    + + + + + + + + + + + + + + + + + +
    Nama Lengkap:
    Tempat dan Tgl. Lahir (Umur):, ( Tahun)
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RW. , RT. , Dusun , Desa , Kec. , Kab.
    Pekerjaan:
    Yang bersangkutan hendak menjual . + tersebut tidak dalam sengketa dengan pihak lain sehingga dapat dijual kepada pihak kedua yaitu:
    Nama:
    Tempat dan Tanggal Lahir:,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:
    Pekerjaan:
    Keterangan:
    + + + + + + + + + + +
    Demikian surat keterangan ini dibuat dengan sesungguhnya agar dapat dipergunakan sebagaimana mestinya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Mengetahui,,
    Ketua Adat
    ( )( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_kehilangan.php b/app/views/surat/print/print_surat_ket_kehilangan.php new file mode 100644 index 000000000..83444ee39 --- /dev/null +++ b/app/views/surat/print/print_surat_ket_kehilangan.php @@ -0,0 +1,96 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN KEHILANGAN

    +

    Nomor :

    +
    +
    + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    +
    + + + + + + + + + + + + + + + + +
    Nama Lengkap:
    NIK/ No. KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pekerjaan:
    Pendidikan:
    Kewarganegaraan :
    Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam +No. KK: dengan NIK: .
    Orang tersebut telah datang kepada kami untuk melapor dan mengaku telah kehilangan .
    Rincian : .
    Keterangan: .
    Demikian surat keterangan ini dibuat dengan sebenarnya agar dapat dipergunakan sebagaimana mestinya.
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    Pemegang Surat
    ( )( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_kelahiran.php b/app/views/surat/print/print_surat_ket_kelahiran.php new file mode 100644 index 000000000..0322c284a --- /dev/null +++ b/app/views/surat/print/print_surat_ket_kelahiran.php @@ -0,0 +1,119 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN KELAHIRAN

    +

    No:

    +
    +
    + + +
    Yang bertanda tangan dibawah ini , Kecamatan , Kabupaten + , Provinsi menerangkan bahwa pada:
    +
    + + + + + + + + + + + + + +tr> + + + + + + + + + + + + + + + + + + + + + + + + +
    Hari:
    Tanggal:
    Pukul :
    Tempat Kelahiran:
    Telah lahir seorang anak bernama :
    Dari seorang ibu :
    Nama Lengkap:
    NIK:
    Umur: tahun
    Pekerjaan:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Istri dari :
    Nama Lengkap:
    NIK:
    Umur: tahun
    Pekerjaan:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Hubungan pelapor dengan bayi ::
    Surat keterangan ini dibuat berdasarkan keterangan pelapor :
    Nama Lengkap:
    NIK:
    Umur: tahun
    Pekerjaan:
    Alamat:
    Hubungan pelapor dengan bayi :
    + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_kematian.php b/app/views/surat/print/print_surat_ket_kematian.php new file mode 100644 index 000000000..01804ed0a --- /dev/null +++ b/app/views/surat/print/print_surat_ket_kematian.php @@ -0,0 +1,110 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN KEMATIAN

    +

    No:

    +
    +
    + + + + + +
    Yang bertanda tangan dibawah ini , Kecamatan , Kabupaten + , Provinsi menerangkan bahwa:
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nama:
    NIK:
    Jenis Kelamin:
    Tempat dan Tgl. Lahir :,
    Agama:/
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Telah meninggal dunia pada:
    Hari/ Tanggal/ Jam://
    Bertempat di:
    Penyebab Kematian:
    Surat keterangan ini dibuat berdasarkan keterangan pelapor :
    Nama:
    NIK:
    Tgl Lahir/:
    Pekerjaan:
    Alamat:
    Hubungan dengan yang mati:
    + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    *)nama terang
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_kematian_suami_istri.php b/app/views/surat/print/print_surat_ket_kematian_suami_istri.php new file mode 100644 index 000000000..d7ad6f0d3 --- /dev/null +++ b/app/views/surat/print/print_surat_ket_kematian_suami_istri.php @@ -0,0 +1,102 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN KEMATIAN SUAMI/ISTRI

    +

    No:

    +
    +
    + + + + + +
    Yang bertanda tangan dibawah ini menerangkan dengan sesungguhnya bahwa:
    + + + + + + + + + +
    Nama Lengkap:
    Tempat/Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    telah meninggal dunia pada tanggal:
    di:
    + + + + + + + +
    Nama Lengkap:
    Tempat dan Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    + + + + + + + + + + + + + + +
    adalah orang yang telah meninggal tersebut di atas.
    Demikianlah, surat keterangan ini dibua dengan mengingat sumpah jabatan dan untuk dipergunakan seperlunya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    *)nama terang
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_ktp_dlm_proses.php b/app/views/surat/print/print_surat_ket_ktp_dlm_proses.php new file mode 100644 index 000000000..f4de01bc5 --- /dev/null +++ b/app/views/surat/print/print_surat_ket_ktp_dlm_proses.php @@ -0,0 +1,102 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN KTP DALAM PROSES

    +

    Nomor :

    +
    +
    +
    + + +
    Yang bertanda tangan dibawah ini , Kecamatan , Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    + + + + + + + + + + + + +
    Nama Lengkap:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pekerjaan:
    Kewarganegaraan :
    + +
    Orang tersebut di atas adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , yang saat ini Kartu Tanda Penduduk sedang dalam proses.
    +
    + + +
    +Demikian surat keterangan ini dibuat dengan sesungguhnya untuk dapat digunakan sebagaimana mestinya.
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_kurang_mampu.php b/app/views/surat/print/print_surat_ket_kurang_mampu.php new file mode 100644 index 000000000..f0c7883d6 --- /dev/null +++ b/app/views/surat/print/print_surat_ket_kurang_mampu.php @@ -0,0 +1,96 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN KURANG MAMPU

    +

    Nomor :

    +
    +
    + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    +
    + + + + + + + + + + + + + +
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Keterangan :Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam +No. KK: dengan NIK: , kepala keluarga : yang perekonomiannya kurang mampu.
    Keperluan :
    + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_lahir_mati.php b/app/views/surat/print/print_surat_ket_lahir_mati.php new file mode 100644 index 000000000..797f98f8b --- /dev/null +++ b/app/views/surat/print/print_surat_ket_lahir_mati.php @@ -0,0 +1,94 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN LAHIR MATI

    +

    Nomor :

    +
    +
    + + + + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa seorang ibu:
    + + + + + + + + + + +
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Pekerjaan:
    Kewarganegaraan :
    Pada hari, tanggal: ,
    di :
    + + + + + + + + + + + + +
    telah lahir bayi dalam keadaan mati, setelah dikandungannya selama bulan
    Surat keterangan Lahir Mati ini dibuat atas dasar yang sebenarnya.
    Pelapor:
    Hubungn dengan yang Lahir Mati :
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_nikah.php b/app/views/surat/print/print_surat_ket_nikah.php new file mode 100644 index 000000000..9ece0aebd --- /dev/null +++ b/app/views/surat/print/print_surat_ket_nikah.php @@ -0,0 +1,99 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN UNTUK NIKAH

    +

    No:

    +
    +
    + + + + + +
    Yang bertanda tangan dibawah ini menerangkan dengan sesungguhnya bahwa:
    + + + + + + + + + + + + + +
    Nama Lengkap:
    Jenis Kelamin:
    Tempat dan Tgl. Lahir :,
    Warga negara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    Bin/Binti:
    Status Perkawinan
    a. Jika pria, terangkan jejaka, duda atau beristri dan berapa istrinya:
    b. Jika wanita, terangkan gadis atau janda:
    Nama Istri/Suami terdahulu:
    + + + + + + + + + + + + + + +
    Demikianlah, surat keterangan ini dibuat dengan mengingat sumpah jabatan dan untuk dipergunakan seperlunya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    *)nama lengkap +
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_orangtua.php b/app/views/surat/print/print_surat_ket_orangtua.php new file mode 100644 index 000000000..aaaecad03 --- /dev/null +++ b/app/views/surat/print/print_surat_ket_orangtua.php @@ -0,0 +1,123 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN TENTANG ORANG TUA

    +

    No:

    +
    +
    + + + + + +
    Yang bertanda tangan dibawah ini menerangkan dengan sesungguhnya bahwa:
    +
    + + + + + + + + + + + + + + + + +
    Nama Lengkap:
    Tempat/Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    Nama Lengkap:
    Tempat/Tgl. Lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    + + + + + + + + + + + + +
    adalah benar ayah dan ibu kandung dari seorang:
    + + + + + + + +
    Nama Lengkap:
    Tempat dan Tgl. Lahir:
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Kel. , Kec. , Kab.
    + + + + + + + + + + + + + + +
    Demikianlah, surat keterangan ini dibuat dengan mengingat sumpah jabatan dan untuk dipergunakan seperlunya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    *)nama lengkap
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_penduduk.php b/app/views/surat/print/print_surat_ket_penduduk.php new file mode 100644 index 000000000..379055319 --- /dev/null +++ b/app/views/surat/print/print_surat_ket_penduduk.php @@ -0,0 +1,100 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN PENDUDUK

    +

    Nomor :

    + + + + +
    + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    + + + + + + + + + + + + + + +
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Berlaku mulai : sampai dengan
    Keperluan :
    Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam +No. KK: dengan NIK: , kepala keluarga : .
    + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_pengantar.php b/app/views/surat/print/print_surat_ket_pengantar.php new file mode 100644 index 000000000..8e2e0626a --- /dev/null +++ b/app/views/surat/print/print_surat_ket_pengantar.php @@ -0,0 +1,104 @@ +load->view('print/headjs.php');?> + +
    +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +
    +
    +

    SURAT KETERANGAN

    +

    Nomor :

    + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    +
    + + + + + + + + + + + + + + + + + + +
    Nama Lengkap:
    Nomor KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Keterangan :
    Keperluan :
    Berlaku mulai : sampai dengan
    + + + + + + + + + + + +
    Demikian Surat Keterangan ini kami buat untuk dapat dipergunakan sebagaimana mestinya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    + +
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_pindah_penduduk.php b/app/views/surat/print/print_surat_ket_pindah_penduduk.php new file mode 100644 index 000000000..8d4876e06 --- /dev/null +++ b/app/views/surat/print/print_surat_ket_pindah_penduduk.php @@ -0,0 +1,128 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN PINDAH

    +

    No:

    + +
    + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan bahwa:
    + + + + + + + + + + + + + + +
    Nama Lengkap:
    Jenis Kelamin:
    Tempat dan Tgl. Lahir :,
    Status:
    Kewarganegaraan / Agama: /
    Pekerjaan:
    No KTP:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Alamat yang dituju:RT. , RW. , Kampung , Dusun , Desa , Kec. , Kab.
    Alasan :
    Tanggal pindah :
    Jumlah Pengikut : orang
    + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNIKNamaJKUmurStatus Kawin
    + + + + + + + + + + +
    Surat keterangan ini diterbitkan sebagai .
    Demikianlah surat ini kami buat dengan sesungguhnya semoga dapat dipergunakan sebagaimana mestinya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    Pemegang Surat
    ( )( )
    +
    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_ket_usaha.php b/app/views/surat/print/print_surat_ket_usaha.php new file mode 100644 index 000000000..c2ea33d6a --- /dev/null +++ b/app/views/surat/print/print_surat_ket_usaha.php @@ -0,0 +1,104 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN USAHA

    +

    Nomor :

    +
    +
    + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    +
    + + + + + + + + + + + + + + +
    Nama Lengkap:
    NIK/ No KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Keterangan :Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam +No. KK: dengan NIK: , kepala keluarga : yang memiliki usaha
    Keperluan :
    Berlaku mulai : sampai dengan
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    Pemegang Surat
    ( )( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_keterangan_rahasia.php b/app/views/surat/print/print_surat_keterangan_rahasia.php new file mode 100644 index 000000000..f6e717c05 --- /dev/null +++ b/app/views/surat/print/print_surat_keterangan_rahasia.php @@ -0,0 +1,112 @@ +load->view('print/headjs.php');?> + +
    +
    + + + +
    + + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    + +
    +
    + +

    SURAT KETERANGAN RAHASIA

    +

    Nomor :

    +
    + + + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    +
    + + + + + + + + + + + + + + + + + + +
    Nama Lengkap:
    Nomor KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pendidikan:
    Pekerjaan:
    Kewarganegaraan :
    Keterangan :
    Keperluan :
    Berlaku mulai : sampai dengan
    + + + + + + + + + + + +
    Demikian Surat Keterangan ini kami buat untuk dapat dipergunakan sebagaimana mestinya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_lap_kehilangan.php b/app/views/surat/print/print_surat_lap_kehilangan.php new file mode 100644 index 000000000..fc278a773 --- /dev/null +++ b/app/views/surat/print/print_surat_lap_kehilangan.php @@ -0,0 +1,96 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT PENGANTAR LAPORAN KEHILANGAN

    +

    Nomor :

    +
    +
    + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    +
    + + + + + + + + + + + + + +
    Nama Lengkap:
    NIK/ No. KTP:
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Alamat/ Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Agama:
    Status:
    Pekerjaan:
    Pendidikan:
    Kewarganegaraan :
    Keterangan :Bahwa orang tersebut adalah benar-benar warga kami yang bertempat tinggal di Dusun , Rt. , , , tercatat dalam +No. KK: dengan NIK: , kepala keluarga : .
    Keperluan : Sebagai pengantar untuk mendapatkan Surat Kehilangan yang akan dipergunakan untuk .
    + + + + + + + + + + + +
    Demikian surat keterangan ini kami buat untuk dapat dipergunakan sebagaimana mestinya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    Pemegang Surat
    ( )( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_permohonan_akta.php b/app/views/surat/print/print_surat_permohonan_akta.php new file mode 100644 index 000000000..f303a951a --- /dev/null +++ b/app/views/surat/print/print_surat_permohonan_akta.php @@ -0,0 +1,139 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + +
    ,
    Nomor:
    Perihal:Permohonan Akta Kelahiran
    + + + + + + + + + + + + + + + + +

    Kepada Yth.

    Kepala Pengadilan Agama
    Kabupaten
    + + + + + + + + + + + + +
    Yang bertanda tangan dibawah ini , Kecamatan , + Kabupaten , Provinsi menerangkan bahwa:
    + + + + + + + + + + + + + + + + +
    Nama Lengkap:
    Tempat dan Tgl. Lahir :,
    Pekerjaan :
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Mengajukan permohonan untuk diterbitkan penetapan Pengadilan Negeri sebagai persyaratan pencatatan peristiwa kelahiran dan penerbitan kutipan Akta Kelahiran atas nama:
    Nama:
    Tempat dan Tanggal Lahir:,
    Hari Lahir:
    Alamat:
    Nama Orang Tua
    Nama Ayah:
    Nama Ibu:
    Alamat Orang Tua:
    + + + +
    + + + + + + + + + + + + +
    Demikian Surat Keterangan ini dibuat dengan sesungguhnya agar dapat dipergunakan sebagaimana mestinya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_permohonan_duplikat_kelahiran.php b/app/views/surat/print/print_surat_permohonan_duplikat_kelahiran.php new file mode 100644 index 000000000..60096885c --- /dev/null +++ b/app/views/surat/print/print_surat_permohonan_duplikat_kelahiran.php @@ -0,0 +1,111 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT PERMOHONAN DUPLIKAT KELAHIRAN

    +

    Nomor :

    +
    +
    + + +
    Dengan ini kami mengajukan orang untuk mengadakan Permohonan Duplikat Kelahiran seperti tersebut di bawah ini :
    +
    + + + + + + + + + + + + + + + + + + + + + +
    Nama Lengkap:
    NIK:
    Jenis Kelamin:
    Tanggal Lahir:
    Agama:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Telah lahir pada :
    Hari, Tanggal, Pukul:,
    Bertempat di:
    Nama Ibu:
    NIK:
    Tanggal lahir:
    Pekerjaan:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Nama Ayah:
    NIK:
    Tanggal lahir:
    Pekerjaan:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    +
    + +Surat Keterangan ini dibuat berdasarkan keterangan pelapor : + + + + + + +
    Nama Lengkap:
    NIK/ No. KTP:
    Tempat dan Tgl. Lahir :
    Jenis Kelamin:
    Pekerjaan:
    Alamat:
    + + + + + + + + + + +
    Demikian surat keterangan ini dibuat, atas perhatian dan terkabulnya diucapkan terimakasih.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_pernyataan_akta.php b/app/views/surat/print/print_surat_pernyataan_akta.php new file mode 100644 index 000000000..2a8e68c80 --- /dev/null +++ b/app/views/surat/print/print_surat_pernyataan_akta.php @@ -0,0 +1,88 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT PERNYATAAN BELUM MEMILIKI AKTA KELAHIRAN

    +

    No:

    +
    +
    + + + + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan dengan sebenarnya bahwa:
    +
    + + + + + + + + + + +
    Nama Lengkap:
    Alamat:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Tempat dan Tgl. Lahir :,
    Jenis Kelamin:
    Nama Ayah:
    Nama Ibu:
    Betul-betul belum pernah memiliki AKTA KELAHIRAN.
    Demikian Surat Keterangan ini kami buat dengan sesungguhnya agar dapat dipergunakan sebagaimanan mestinya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_persetujaun_mempelai.php b/app/views/surat/print/print_surat_persetujaun_mempelai.php new file mode 100644 index 000000000..6e2b2ca07 --- /dev/null +++ b/app/views/surat/print/print_surat_persetujaun_mempelai.php @@ -0,0 +1,134 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT PERSETUJUAN MEMPELAI

    +

    NO:

    +
    +
    + + + + + +
    Yang bertanda tangan dibawah ini :
    +
    + + + + + + +
    I. Calon Suami
    + + + + + + + + + + + + + + + + + + +
    Nama Lengkap:
    Bin:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Nama Lengkap:
    Bin:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    + + + + + + +
    II. Calon Istri
    + + + + + + + + + + + + + + + + + + +
    Nama Lengkap:
    Binti:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Nama Lengkap:
    Binti:
    Tempat dan tanggal lahir:,
    Warganegara:
    Agama:
    Pekerjaan:
    Tempat Tinggal:
    + + + + + + + + + + + + + +
    Menyatakan dengan sesungguhnya bahwa atas dasar sukarela dengan kesadaran sendiri, tanpa paksaan dari siapapun untuk melangsungkan pernikahan.
    Demikianlah surat persetujuan ini dibuat untuk dipergunakan seperlunya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    I. Calon SuamiII. Calon Istri
    ( )( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/print/print_surat_pindah_antar_kab_prov.php b/app/views/surat/print/print_surat_pindah_antar_kab_prov.php new file mode 100644 index 000000000..50ec48d95 --- /dev/null +++ b/app/views/surat/print/print_surat_pindah_antar_kab_prov.php @@ -0,0 +1,95 @@ +load->view('print/headjs.php');?> + +
    +
    + +
    + + +
    +

    PEMERINTAH KABUPATEN

    +

    KECAMATAN

    +

    DESA

    +
    +
    +
    +

    SURAT KETERANGAN PINDAH

    +

    ANTAR KABUPATEN/KOTA ATAU ANTAR PROVINSI

    +

    Nomor :

    +
    +
    + + +
    Yang bertanda tangan dibawah ini , Kecamatan , +Kabupaten , Provinsi menerangkan Permohonan Pindah Penduduk WNI dengan data sebagai berikut :
    +
    + + + + + + + + +
    Nama Lengkap:
    NIK:
    Nomor Kartu Keluarga:
    Nama Kepala Keluarga:
    Alamat Sekarang:RT. , RW. , Dusun , Desa , Kec. , Kab.
    Alamat Tujuan Pindah:
    Jumlah Keluarga yang Pindah: orang
    + +
    Adapun Permohonan Pindah Penduduk WNI yang bersangkutan sebagaimana terlampir.
    + + + + + + + + + + + +
    Demikian surat keterangan ini dibuat dengan sesungguhnya untuk dapat digunakan sebagaimana mestinya.
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ,
    ( )
    +
    +
    +
    + + \ No newline at end of file diff --git a/app/views/surat/signature.php b/app/views/surat/signature.php new file mode 100644 index 000000000..66a4a9326 --- /dev/null +++ b/app/views/surat/signature.php @@ -0,0 +1,262 @@ +

    Salah satu fungsi aplikasi Sistem Informasi Desa (SID) adalah untuk mengoptimalkan pelayanan administrasi publik berbasis data. Pelayanan administrasi publik yang bisa dilakukan dengan aplikasi SID meliputi pelayanan olah data dan pelayanan olah dokumen/surat. Pelayanan olah data dapat dilakukan dengan memanfaatkan fungsi-fungsi statistik yang dapat dimanfaatkan untuk laporan dan rujukan pengambilan keputusan. Pelayanan olah dokumen bisa dilakukan dari data yang telah diolah dan/atau dari pengelolaan administrasi surat-menyurat.

    +

    Aplikasi SID menghimpun seluruh data penduduk desa, sehingga bisa digunakan untuk data dasar pembuatan surat administrasi kependudukan. Pelayanan administrasi persuratan itu dapat dikelola oleh pemerintah desa di kantor pemerintah desa masing-masing. Tata cara pemanfaatan module cetak surat aplikasi SID dalam alur pelayanan publik di kantor desa secara garis besar dapat dilakukan dengan urutan sebagai berikut:

    +

    +

      +
    1. Penduduk pemohon surat datang dengan membawa kartu identitas diri (KTP atau Kartu Keluarga/KK) dan diterima oleh staf pemerintah desa yang bertugas dalam pelayanan.
    2. +
    3. Pastikan keberadaan dan status penduduk tersebut dalam database SID di Module "Penduduk". Gunakan fasilitas "Cari" dengan mengisikan nama atau NIK penduduk tersebut. Jika ada perubahan status, perbarui saat itu juga berdasarkan laporan penduduk yang bersangkutan. Jika penduduk tersebut belum terdaftar dalam database, masukkan data penduduk yang bersangkutan ke dalam SID merujuk pada dokumen kependudukan yang dimilikinya (wajib disertai dengan dokumen pendukung lainnya bagi penduduk pendatang/tinggal sementara). Jika data penduduk tersebut sudah tersimpan dalam SID, pembuatan surat dapat dilakukan.
    4. +
    5. Klik module "Cetak Surat" untuk memulai pembuatan surat.
    6. +
    7. Klik salah satu jenis surat yang akan dibuat, sesuaikan dengan jenis urusan yang diajukan oleh penduduk pemohon surat. Pastikan surat yang akan dicetak telah disiapkan templatenya di Menu "Master Surat"
    8. +
    9. Isikan NIK / Nama, nomor surat, keterangan, dan hal lainnya sesuai kolom isian pada jenis surat yang dibuat.
    10. +
    11. Pilih nama dan jabatan kepala desa atau perangkat desa yang berwenang melakukan pengesahan atas nama kepala desa.
    12. +
    13. Setelah semua kolom terisi dengan benar, surat bisa langsung dicetak dengan klik tombol "Cetak" di bagian kanan bawah, atau bisa diedit lebih lanjut ke versi .doc dengan klik "Unduh" di bagian kanan bawah.
    14. +
    15. Surat dapat dicetak 2 eksemplar, 1 eks. untuk penduduk pemohon surat dan 1 eks. untuk arsip pemerintah desa.
    16. +
    17. Setiap jenis surat yang tercetak akan tersimpan data lognya di Menu "Surat Keluar"
    18. +

    +
    +

    PANDUAN KODE EKSPORT SURAT

    +
    +

    PRINSIP FUNGSI
    [kata_template] -> akan digantikan dengan data di bawah ini (sebelah kanan)

    DATA SURAT
    [kode_surat] -> $surat[kode_surat]
    +[judul_surat]",strtoupper("surat ".$surat['nama']),$buffer);
    +[JUDUL_SURAT]",strtoupper("surat ".$surat['nama']),$buffer);
    +[tgl_surat] -> $tgl
    +[tahun] -> $thn
    +[nomor_surat] -> $input[nomor]
    +[nomor_sorat] -> $input[nomor]
    +[mulai_berlaku] -> $input[berlaku_dari]
    +[tgl_akhir] -> $input[berlaku_sampai]
    +[jabatan] -> $input[jabatan]
    +[nama_pamong] -> $input[pamong]
    +[keterangan] -> $input[keterangan]
    +[keperluan] -> $input[keperluan]
    +[tujuan] -> $input[tujuan]
    +[kode_desa] -> $config[kode_desa]
    +[nama_kab] -> $config[nama_kabupaten]
    +[nama_kec] -> $config[nama_kecamatan]
    +[nama_des] -> $config[nama_desa]
    +[NAMA_KAB]",strtoupper($config['nama_kabupaten']),$buffer);
    +[NAMA_KEC]",strtoupper($config['nama_kecamatan']),$buffer);
    +[NAMA_DES]",strtoupper($config['nama_desa']),$buffer);
    +[nama_kepala_camat] -> $config[nama_kepala_camat]
    +[kades] -> $config[nama_kepala_desa]
    +[nip_kepala_camat] -> $config[nip_kepala_camat]
    +[pos] -> $config[kode_pos]
    +[alamat_des] -> $config[alamat_kantor] Pos : $config[kode_pos]
    +[alamat] -> RT $individu[rt] / RW $individu[rw] $individu[dusun]
    +[rt] -> $individu[rt]
    +[rw] -> $individu[rw]
    +[dusun] -> $individu[dusun]
    +[nama_ayah] -> $individu[nama_ayah]
    +[nama_ibu] -> $individu[nama_ibu]
    +[nik_ayah] -> $individu[ayah_nik]
    +[nik_ibu] -> $individu[ibu_nik]
    +[nama] -> $individu[nama]
    +[sex] -> $individu[sex]
    +[agama] -> $individu[agama]
    +[status_kawin] -> $individu[status_kawin]
    +[gol_darah] -> $individu[gol_darah]
    +[pekerjaan] -> $individu[pekerjaan]
    +[warga_negara] -> $individu[warganegara]
    +[no_ktp] -> $individu[nik]
    +[nik] -> $individu[nik]
    +*usia -> $individu[umur] Tahun
    +[usia] -> $individu[umur] Tahun
    +[no_kk] -> $individu[no_kk]
    +[ttl] -> $individu[tempatlahir]/$tgllhr
    +[px_nama] -> $pxnama
    +[px_nik] -> $pxnik
    +[px_hubungan] -> $pxhubungan
    +[px_usia] -> $pxusia
    +[px_tempatlahir] -> $pxtglahir
    +[px_tanggallahir] -> $pxtmplahir
    +[px_ttl] -> $pxttl
    +[px_ttl2] -> $pxttl2
    +[no] -> $pxno
    +[kode_surat] -> $surat[kode_surat]
    +[judul_surat]",strtoupper("surat ".$surat['nama']),$buffer);
    +[JUDUL_SURAT]",strtoupper("surat ".$surat['nama']),$buffer);
    +[tgl_surat] -> $tgl
    +[tahun] -> $thn
    +[nomor_surat] -> $input[nomor]
    +[nomor_sorat] -> $input[nomor]
    +[mulai_berlaku] -> $input[berlaku_dari]
    +[tgl_akhir] -> $input[berlaku_sampai]
    +[jabatan] -> $input[jabatan]
    +[nama_pamong] -> $input[pamong]
    +[keterangan] -> $input[keterangan]
    +[keperluan] -> $input[keperluan]
    +[tujuan] -> $input[tujuan]
    +[hari] -> $input[hari]
    +[tgl_keg] -> $input[tgl_keg]
    +[waktu] -> $input[waktu]
    +[jenis_keg] -> $input[jenis_keg]
    +[lokasi_keg] -> $input[lokasi_keg]
    +[bidang_keg] -> $input[bidang_keg]
    +[alamat_sekarang] -> $input[alamat_sekarang]
    +[kode_desa] -> $config[kode_desa]
    +[nama_kab] -> $config[nama_kabupaten]
    +[nama_kec] -> $config[nama_kecamatan]
    +[nama_des] -> $config[nama_desa]
    +[NAMA_KAB]",strtoupper($config['nama_kabupaten']),$buffer);
    +[NAMA_KEC]",strtoupper($config['nama_kecamatan']),$buffer);
    +[NAMA_DES]",strtoupper($config['nama_desa']),$buffer);
    +[nama_kepala_camat] -> $config[nama_kepala_camat]
    +[kades] -> $config[nama_kepala_desa]
    +[nip_kepala_camat] -> $config[nip_kepala_camat]
    +[pos] -> $config[kode_pos]
    +[alamat_des] -> $config[alamat_kantor] Pos : $config[kode_pos]
    +[alamat] -> $individu[dusun] RT $individu[rt] / RW $individu[rw]
    +[rt] -> $individu[rt]
    +[rw] -> $individu[rw]
    +[dusun] -> $individu[dusun]
    +[nama_ayah] -> $individu[nama_ayah]
    +[nama_ibu] -> $individu[nama_ibu]
    +[nik_ayah] -> $individu[ayah_nik]
    +[nik_ibu] -> $individu[ibu_nik]
    +[nama] -> $individu[nama]
    +[sex] -> $individu[sex]
    +[agama] -> $individu[agama]
    +[status_kawin] -> $individu[status_kawin]
    +[gol_darah] -> $individu[gol_darah]
    +[pekerjaan] -> $individu[pekerjaan]
    +[pendidikan] -> $individu[pendidikan]
    +[warga_negara] -> $individu[warganegara]
    +[no_ktp] -> $individu[nik]
    +[hubungan] -> $individu[hubungan]
    +[nik] -> $individu[nik]
    +*usia -> $individu[umur] Tahun
    +[usia] -> $individu[umur] Tahun
    +[no_kk] -> $individu[no_kk]
    +[ttl] -> $individu[tempatlahir]/$tgllhr
    +[nama_lahir] -> $input[nama_lahir]
    +[nik_lahir] -> $input[nik_lahir]
    +[nama_mati] -> $input[nama_mati]
    +[nik_mati] -> $input[nik_mati]
    +[nama_doc] -> $input[nama_doc]
    +[dokumen] -> $input[dokumen]
    +[alamat_nikah] -> $input[alamat_nikah]
    +[tgl_nikah] -> $input[tgl_nikah]
    +[nama_wali] -> $input[nama_wali]
    +[nik_wali] -> $input[nik_wali]
    +[alamat_wali] -> $input[alamat_wali]
    +[kelamin_wali] -> $input[kelamin_wali]
    +[hubungan_wali] -> $input[hubungan_wali]
    +[agama_wali] -> $input[agama_wali]
    +[tptlhr_wali] -> $input[tptlhr_wali]
    +[tgllhr_wali] -> $input[tgllhr_wali]
    +[pekerjaan_wali] -> $input[pekerjaan_wali]
    +[sebab_wali] -> $input[sebab_wali]
    +[ayah_penghasilan] -> $rp_ayah
    +[ibu_penghasilan] -> $rp_ibu
    +[total] -> $total
    +[rphuruf] -> $rpt
    +[sekolah] -> $input[sekolah]
    +[jurusan] -> $input[jurusan]
    +[kelas] -> $input[kelas]
    +[ayah_alamat] -> $ayah[dusun] RT $ayah[rt] / RW $ayah[rw]
    +[ayah_rt] -> $ayah[rt]
    +[ayah_rw] -> $ayah[rw]
    +[ayah_dusun] -> $ayah[dusun]
    +[ayah_nama_ayah] -> $ayah[nama_ayah]
    +[ayah_nama_ibu] -> $ayah[nama_ibu]
    +[ayah_nik_ayah] -> $ayah[ayah_nik]
    +[ayah_nik_ibu] -> $ayah[ibu_nik]
    +[ayah_nama] -> $ayah[nama]
    +[ayah_sex] -> $ayah[sex]
    +[ayah_agama] -> $ayah[agama]
    +[ayah_status_kawin] -> $ayah[status_kawin]
    +[ayah_gol_darah] -> $ayah[gol_darah]
    +[ayah_pekerjaan] -> $ayah[pekerjaan]
    +[ayah_pendidikan] -> $ayah[pendidikan]
    +[ayah_warga_negara] -> $ayah[warganegara]
    +[ayah_no_ktp] -> $ayah[nik]
    +[ayah_nik] -> $ayah[nik]
    +*ayah_usia -> $ayah[umur] Tahun
    +[ayah_usia] -> $ayah[umur] Tahun
    +[ayah_no_kk] -> $ayah[no_kk]
    +[ayah_ttl] -> $ayah[tempatlahir]/$ayah_tgllhr
    +[ibu_alamat] -> $ibu[dusun] RT $ibu[rt] / RW $ibu[rw]
    +[ibu_rt] -> $ibu[rt]
    +[ibu_rw] -> $ibu[rw]
    +[ibu_dusun] -> $ibu[dusun]
    +[ibu_nama_ayah] -> $ibu[nama_ayah]
    +[ibu_nama_ibu] -> $ibu[nama_ibu]
    +[ibu_nik_ayah] -> $ibu[ibu_nik]
    +[ibu_nik_ibu] -> $ibu[ibu_nik]
    +[ibu_nama] -> $ibu[nama]
    +[ibu_sex] -> $ibu[sex]
    +[ibu_agama] -> $ibu[agama]
    +[ibu_status_kawin] -> $ibu[status_kawin]
    +[ibu_gol_darah] -> $ibu[gol_darah]
    +[ibu_pekerjaan] -> $ibu[pekerjaan]
    +[ibu_pendidikan] -> $ibu[pendidikan]
    +[ibu_warga_negara] -> $ibu[warganegara]
    +[ibu_no_ktp] -> $ibu[nik]
    +[ibu_nik] -> $ibu[nik]
    +*ibu_usia -> $ibu[umur] Tahun
    +[ibu_usia] -> $ibu[umur] Tahun
    +[ibu_no_kk] -> $ibu[no_kk]
    +[ibu_ttl] -> $ibu[tempatlahir]/$ibu_tgllhr
    +[kua] -> $input[kua]
    +[nomor_nikah] -> $input[nomor_nikah]
    +[hari_lahir] -> $input[hari_lahir]
    +[tgl_lahir] -> $input[tgl_lahir]
    +[jam_lahir] -> $input[jam_lahir]
    +[tpt_lahir] -> $input[tpt_lahir]
    +[sex_lahir] -> $input[sex_lahir]
    +[hub_lapor] -> $input[hub_lapor]
    +[hari_mati] -> $input[hari_mati]
    +[tgl_mati] -> $input[tgl_mati]
    +[jam_mati] -> $input[jam_mati]
    +[tpt_mati] -> $input[tpt_mati]
    +[sebab_mati] -> $input[sebab_mati]
    +[nama_baru1] -> $input[nama_baru1]
    +[tpt_baru1] -> $input[tpt_baru1]
    +[tgl_baru1] -> $input[tgl_baru1]
    +[hubkel_baru1] -> $input[hubkel_baru1]
    +[nama_baru2] -> $input[nama_baru2]
    +[tpt_baru2] -> $input[tpt_baru2]
    +[tgl_baru2] -> $input[tgl_baru2]
    +[hubkel_baru2] -> $input[hubkel_baru2]
    +[nama_baru3] -> $input[nama_baru3]
    +[tpt_baru3] -> $input[tpt_baru3]
    +[tgl_baru3] -> $input[tgl_baru3]
    +[hubkel_baru3] -> $input[hubkel_baru3]
    +[nama_baru4] -> $input[nama_baru4]
    +[tpt_baru4] -> $input[tpt_baru4]
    +[tgl_baru4] -> $input[tgl_baru4]
    +[hubkel_baru4] -> $input[hubkel_baru4]
    +[nama_baru5] -> $input[nama_baru5]
    +[tpt_baru5] -> $input[tpt_baru5]
    +[tgl_baru5] -> $input[tgl_baru5]
    +[hubkel_baru5] -> $input[hubkel_baru5]
    +[nama_baru6] -> $input[nama_baru6]
    +[tpt_baru6] -> $input[tpt_baru6]
    +[tgl_baru6] -> $input[tgl_baru6]
    +[hubkel_baru6] -> $input[hubkel_baru6]
    +[saksi_baru1] -> $input[saksi_baru1]
    +[saksi_baru2] -> $input[saksi_baru2]
    +[pria_status] -> $input[pria_status]
    +[wanita_status] -> $input[wanita_status]
    +[istri_lama] -> $input[istri_lama]
    +[nama_calon] -> $input[nama_calon]
    +[binti] -> $input[binti]
    +[alamat_calon] -> $input[alamat_calon]
    +[tpt_lahir_calon] -> $input[tpt_lahir_calon]
    +[tgl_lahir_calon] -> $input[tgl_lahir_calon]
    +[warga_negara_calon] -> $input[warga_negara_calon]
    +[agama_calon] -> $input[agama_calon]
    +[kerja_calon] -> $input[kerja_calon]
    +[hari_nikah] -> $input[hari_nikah]
    +[tgl_nikah] -> $input[tgl_nikah]
    +[jam_nikah] -> $input[jam_nikah]
    +[tpt_nikah] -> $input[tpt_nikah]
    +[mahar_nikah] -> $input[mahar_nikah]
    +[kartu_beda] -> $input[kartu_beda]
    +[identitas_beda] -> $input[identitas_beda]
    +[nama_beda] -> $input[nama_beda]
    +[tempatlahir] -> $input[tempatlahir]
    +[tgllahir] -> $input[tgllahir]
    +

    +Referensi file -> surat_model.php baris ke 277 +

    +

    Demikian panduan pembuatan surat dengan menggunakan aplikasi SID. Selamat menyelenggarakan pelayanan administrasi publik.

    \ No newline at end of file diff --git a/app/views/surat/surat_keluar.php b/app/views/surat/surat_keluar.php new file mode 100644 index 000000000..431ce8517 --- /dev/null +++ b/app/views/surat/surat_keluar.php @@ -0,0 +1,125 @@ +
    + + + + +
    + + +
    + +
    +
    +
    +

    Manajemen Surat Keluar

    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ".$data['no_surat']." "; + }else{ + echo ""; + } + ?> + + + + + + + + +
    NoNomor SuratNomor SuratNomor SuratJenis SuratNama PendudukNama PendudukNama PendudukNama Staf Pemerintah DesaTanggalTanggalTanggalUser
    ".$data['no_surat']."
    +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + +
    + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/surat/surat_keluar_graph.php b/app/views/surat/surat_keluar_graph.php new file mode 100644 index 000000000..b50430037 --- /dev/null +++ b/app/views/surat/surat_keluar_graph.php @@ -0,0 +1,99 @@ + +
    + + + +
    +Menu Surat Keluar + + +
    + +
    +
    +
    +

    Grafik Surat Keluar

    +
    + +
    + + + + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat/surat_keluar_perorangan.php b/app/views/surat/surat_keluar_perorangan.php new file mode 100644 index 000000000..2136e9cf6 --- /dev/null +++ b/app/views/surat/surat_keluar_perorangan.php @@ -0,0 +1,165 @@ + + +
    + + + +
    + + +
    + +
    +
    +
    +

    Rekam Surat Perseorangan

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    NIK / Nama +
    +
    +
    +
    Tempat/ Tanggal Lahir (Umur) + / ( Tahun) +
    Alamat + +
    Pendidikan + +
    Warganegara / Agama + / +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NoNomor SuratNomor SuratNomor SuratJenis SuratNama Staf Pemerintah DesaTanggalTanggalTanggal
    +
    + +
    +
    +
    +
    " method="post"> + + + + + +
    +
    +
    +
    + +
    + + start_link;$i<=$paging->end_link;$i++): ?> + " class="uibutton"> + +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat_master/ajax-upload.php b/app/views/surat_master/ajax-upload.php new file mode 100644 index 000000000..de76d3cd6 --- /dev/null +++ b/app/views/surat_master/ajax-upload.php @@ -0,0 +1,28 @@ + +
    +
    + + + + + +
    Upload Template + (File harus dalam format .rtf) +
    +
    +
    +
    +
    + + +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat_master/atribut/ajax_form.php b/app/views/surat_master/atribut/ajax_form.php new file mode 100644 index 000000000..fa9eea84d --- /dev/null +++ b/app/views/surat_master/atribut/ajax_form.php @@ -0,0 +1,26 @@ + + +
    + + + + + + + + + + + + + + + + +
    Atribut
    Tipe
    Nilai
    Nilai
    +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat_master/atribut/form.php b/app/views/surat_master/atribut/form.php new file mode 100644 index 000000000..eaeff5799 --- /dev/null +++ b/app/views/surat_master/atribut/form.php @@ -0,0 +1,39 @@ +
    + + +
    +
    +
    +
    +

    Form Data Parameter

    +

      Pertanyaan :

    +
    +
    +
    + + + + + + + + + + +
    Jawaban
    Nilai
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat_master/atribut/table.php b/app/views/surat_master/atribut/table.php new file mode 100644 index 000000000..fe1671bc0 --- /dev/null +++ b/app/views/surat_master/atribut/table.php @@ -0,0 +1,77 @@ + + diff --git a/app/views/surat_master/form.php b/app/views/surat_master/form.php new file mode 100644 index 000000000..ff979bd46 --- /dev/null +++ b/app/views/surat_master/form.php @@ -0,0 +1,33 @@ +
    +
    +
    +
    +

    Form Layanan Administrasi Surat

    +
    +
    +
    + + + + + + + + + +
    Kode Surat
    Nama LayananSURAT
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat_master/manajemen_kuisioner_form.php b/app/views/surat_master/manajemen_kuisioner_form.php new file mode 100644 index 000000000..8f2f34c56 --- /dev/null +++ b/app/views/surat_master/manajemen_kuisioner_form.php @@ -0,0 +1,70 @@ + + +
    Data Responden
    +
    +

    Form Manajemen Responden

    +
    +
    +
    +
    + + + + +
     
    +
    >
    + +
    >
    + + +
    +
    + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/surat_master/table.php b/app/views/surat_master/table.php new file mode 100644 index 000000000..437db852d --- /dev/null +++ b/app/views/surat_master/table.php @@ -0,0 +1,138 @@ + + diff --git a/app/views/web/artikel/ajax_add_kategori_form.php b/app/views/web/artikel/ajax_add_kategori_form.php new file mode 100644 index 000000000..73b3b1663 --- /dev/null +++ b/app/views/web/artikel/ajax_add_kategori_form.php @@ -0,0 +1,16 @@ +
    + + + + + +
    Nama Kategori + +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff --git a/app/views/web/artikel/form.php b/app/views/web/artikel/form.php new file mode 100644 index 000000000..eb87c6077 --- /dev/null +++ b/app/views/web/artikel/form.php @@ -0,0 +1,141 @@ + + + +
    + + +
    +
    +
    +
    +

    Form Artikel

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Judul Artikel
    Isi Artikel
    + +
    +  +
    Dokumen Lampiran
    Dokumen +Download +
    Nama Dokumen (Nantinya akan menjadi link unduh/download)
    +  +
    Gambar +
    + +
    Hapus Gambar +
    Unggah/Upload Gambar Utama (Kosongi jika tidak ingin mengubah gambar)
    Gambar + +
    + +
    Hapus Gambar +
    Gambar Tambahan (Kosongi jika tidak ingin mengubah gambar)
    Gambar + +
    + +
    Hapus Gambar +
    Gambar Tambahan (Kosongi jika tidak ingin mengubah gambar)
    Gambar + +
    + +
    Hapus Gambar +
    Gambar Tambahan (Kosongi jika tidak ingin mengubah gambar)
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/web/artikel/table.php b/app/views/web/artikel/table.php new file mode 100644 index 000000000..1cccd4620 --- /dev/null +++ b/app/views/web/artikel/table.php @@ -0,0 +1,199 @@ + +
    + + + + + +
    +
    +Kategori Artikel +
    + +Artikel Statis + +
    +
    + +
    +
    +
    +
    +
    +
    +" class="uibutton tipsy south" title="Tambah Data" > Tambah Baru + +
    +
    + +
    + +
    + +
    + +
    +
    +
    +
    +
    " method="post"> + + + + + +
    +
    +
    +
    + +
    +start_link;$i<=$paging->end_link;$i++): ?> +" class="uibutton"> + +
    + +
    +
    +
    +
    +
    diff --git a/app/views/web/artikel/widget-form.php b/app/views/web/artikel/widget-form.php new file mode 100644 index 000000000..9403ce8c0 --- /dev/null +++ b/app/views/web/artikel/widget-form.php @@ -0,0 +1,111 @@ +
    + + +
    +
    +
    +
    +

    Form Pengaturan Customizable Widget

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Judul Widget
    Kode Widget
    + +
    +  +
    Gambar +
    + +
    +
    Dokumen Lampiran
    Nama Dokumen (akan menjadi link unduh/download)
    Unggah/Upload Gambar Utama (Kosongi jika tidak ingin mengubah gambar)
    Gambar + +
    + +
    +
    Gambar Tambahan (Kosongi jika tidak ingin mengubah gambar)
    Gambar + +
    + +
    +
    Gambar Tambahan (Kosongi jika tidak ingin mengubah gambar)
    Gambar + +
    + +
    +
    Gambar Tambahan (Kosongi jika tidak ingin mengubah gambar)
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/web/nav.php b/app/views/web/nav.php new file mode 100644 index 000000000..045170506 --- /dev/null +++ b/app/views/web/nav.php @@ -0,0 +1,37 @@ + \ No newline at end of file diff --git a/app/views/web/spacer.php b/app/views/web/spacer.php new file mode 100644 index 000000000..8d543b0e8 --- /dev/null +++ b/app/views/web/spacer.php @@ -0,0 +1,5 @@ +
    + +
    + \ No newline at end of file diff --git a/app/views/welcome_message.php b/app/views/welcome_message.php new file mode 100644 index 000000000..9db22bc5e --- /dev/null +++ b/app/views/welcome_message.php @@ -0,0 +1,100 @@ + + + + + Welcome to CodeIgniter + + + + + +
    +

    Welcome to CodeIgniter!

    + +
    +

    The page you are looking at is being generated dynamically by CodeIgniter.

    + +

    If you would like to edit this page you'll find it located at:

    + application/views/welcome_message.php + +

    The corresponding controller for this page is found at:

    + application/controllers/Welcome.php + +

    If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.

    +
    + + +
    + + + diff --git a/index.php b/index.php index 502ac4ddb..84acc0473 100644 --- a/index.php +++ b/index.php @@ -114,7 +114,7 @@ * * NO TRAILING SLASH! */ - $application_folder = 'donjo-app'; + $application_folder = 'app'; /* *--------------------------------------------------------------- From 3ef4412d3347ab7f5bfc6dc304fc41a33973f7c2 Mon Sep 17 00:00:00 2001 From: satujalur <98323567+satujalur@users.noreply.github.com> Date: Wed, 19 Oct 2022 20:41:53 +0700 Subject: [PATCH 6/6] hapus session_start() karena sudah autoload --- app/config/config.php | 2 +- app/controllers/Analisis_grafik.php | 34 +- app/controllers/Analisis_indikator.php | 38 +- app/controllers/Analisis_kategori.php | 26 +- app/controllers/Analisis_klasifikasi.php | 20 +- app/controllers/Analisis_laporan.php | 36 +- app/controllers/Analisis_master.php | 34 +- app/controllers/Analisis_periode.php | 22 +- app/controllers/Analisis_respon.php | 50 +- .../Analisis_statistik_jawaban.php | 76 +- app/controllers/Area.php | 38 +- app/controllers/Data_persil.php | 46 +- app/controllers/Database.php | 16 +- app/controllers/Dokumen.php | 20 +- app/controllers/Feed.php | 4 +- app/controllers/First.php | 154 +- app/controllers/Gallery.php | 40 +- app/controllers/Garis.php | 36 +- app/controllers/Gis.php | 48 +- app/controllers/Hom_desa.php | 160 +- app/controllers/Kategori.php | 26 +- app/controllers/Kelompok.php | 64 +- app/controllers/Kelompok_master.php | 28 +- app/controllers/Keluar.php | 14 +- app/controllers/Keluarga.php | 246 +-- app/controllers/Komentar.php | 22 +- app/controllers/Lapor.php | 22 +- app/controllers/Laporan.php | 28 +- app/controllers/Laporan_rentan.php | 24 +- app/controllers/Line.php | 56 +- app/controllers/Main.php | 8 +- app/controllers/Man_user.php | 22 +- app/controllers/Mandiri.php | 14 +- app/controllers/Menu.php | 30 +- app/controllers/Modul.php | 28 +- app/controllers/Penduduk.php | 1412 ++++++++--------- app/controllers/Penduduk_log.php | 38 +- app/controllers/Pengurus.php | 28 +- app/controllers/Plan.php | 44 +- app/controllers/Point.php | 54 +- app/controllers/Polygon.php | 56 +- app/controllers/Program_bantuan.php | 24 +- app/controllers/Rtm.php | 58 +- app/controllers/Sid_core.php | 114 +- app/controllers/Siteman.php | 10 +- app/controllers/Sms.php | 174 +- app/controllers/Sosmed.php | 24 +- app/controllers/Statistik.php | 52 +- app/controllers/Surat.php | 44 +- app/controllers/Surat_master.php | 36 +- app/controllers/User_setting.php | 12 +- app/controllers/Web.php | 28 +- app/controllers/Widget.php | 12 +- 53 files changed, 1876 insertions(+), 1876 deletions(-) diff --git a/app/config/config.php b/app/config/config.php index a121a7ac1..7f101e5e8 100644 --- a/app/config/config.php +++ b/app/config/config.php @@ -37,7 +37,7 @@ | variable so that it is blank. | */ -$config['index_page'] = 'index.php'; +$config['index_page'] = 'index.php/'; /* |-------------------------------------------------------------------------- diff --git a/app/controllers/Analisis_grafik.php b/app/controllers/Analisis_grafik.php index 6db3f5121..d0fb0df31 100644 --- a/app/controllers/Analisis_grafik.php +++ b/app/controllers/Analisis_grafik.php @@ -2,7 +2,7 @@ class Analisis_grafik extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('analisis_grafik_model'); $this->load->model('analisis_laporan_keluarga_model'); $this->load->model('user_model'); @@ -24,42 +24,42 @@ function index($p=1,$o=0){ unset($_SESSION['cari2']); $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->analisis_laporan_keluarga_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->analisis_laporan_keluarga_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; $data['rt'] = ''; } - - if(isset($_POST['per_page'])) + + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['list_dusun'] = $this->analisis_laporan_keluarga_model->list_dusun(); $data['paging'] = $this->analisis_grafik_model->paging($p,$o); $data['main'] = $this->analisis_grafik_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->analisis_grafik_model->autocomplete(); $data['analisis_master'] = $this->analisis_grafik_model->get_analisis_master(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_grafik/table',$data); @@ -69,22 +69,22 @@ function time($p=1,$o=0){ unset($_SESSION['cari2']); $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - - if(isset($_POST['per_page'])) + + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->analisis_grafik_model->paging($p,$o); $data['main'] = $this->analisis_grafik_model->list_data2($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->analisis_grafik_model->autocomplete(); $data['analisis_master'] = $this->analisis_grafik_model->get_analisis_master(); $data['periode'] = $this->analisis_grafik_model->list_periode(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_grafik/time',$data); @@ -121,4 +121,4 @@ function search(){ else unset($_SESSION['cari']); redirect('analisis_grafik'); } -} \ No newline at end of file +} diff --git a/app/controllers/Analisis_indikator.php b/app/controllers/Analisis_indikator.php index 0f60ea10b..fbc3a1893 100644 --- a/app/controllers/Analisis_indikator.php +++ b/app/controllers/Analisis_indikator.php @@ -2,7 +2,7 @@ class analisis_indikator extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('analisis_indikator_model'); $this->load->model('user_model'); $this->load->model('header_model'); @@ -27,11 +27,11 @@ function index($p=1,$o=0){ unset($_SESSION['cari2']); $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; @@ -41,10 +41,10 @@ function index($p=1,$o=0){ if(isset($_SESSION['kategori'])) $data['kategori'] = $_SESSION['kategori']; else $data['kategori'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->analisis_indikator_model->paging($p,$o); $data['main'] = $this->analisis_indikator_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->analisis_indikator_model->autocomplete(); @@ -52,7 +52,7 @@ function index($p=1,$o=0){ $data['list_tipe'] = $this->analisis_indikator_model->list_tipe(); $data['list_kategori'] = $this->analisis_indikator_model->list_kategori(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_indikator/table',$data); @@ -61,21 +61,21 @@ function index($p=1,$o=0){ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['analisis_indikator'] = $this->analisis_indikator_model->get_analisis_indikator($id); $data['form_action'] = site_url("analisis_indikator/update/$p/$o/$id"); } - + else{ $data['analisis_indikator'] = null; $data['form_action'] = site_url("analisis_indikator/insert"); } - + $data['list_kategori'] = $this->analisis_indikator_model->list_kategori(); $header = $this->header_model->get_data(); $data['analisis_master'] = $this->analisis_indikator_model->get_analisis_master(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_indikator/form',$data); @@ -85,13 +85,13 @@ function parameter($id=''){ $ai = $this->analisis_indikator_model->get_analisis_indikator($id); if($ai['id_tipe']==3 OR $ai['id_tipe']==4) redirect('analisis_indikator'); - + $data['analisis_indikator'] = $this->analisis_indikator_model->get_analisis_indikator($id); $data['analisis_master'] = $this->analisis_indikator_model->get_analisis_master(); $data['main'] = $this->analisis_indikator_model->list_indikator($id); - + $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_indikator/parameter/table',$data); @@ -102,15 +102,15 @@ function form_parameter($in='',$id=''){ $data['analisis_parameter'] = $this->analisis_indikator_model->get_analisis_parameter($id); $data['form_action'] = site_url("analisis_indikator/p_update/$in/$id"); } - + else{ $data['analisis_parameter'] = null; $data['form_action'] = site_url("analisis_indikator/p_insert/$in"); } - + $data['analisis_master'] = $this->analisis_indikator_model->get_analisis_master(); $data['analisis_indikator'] = $this->analisis_indikator_model->get_analisis_indikator($in); - + // $this->load->view('header', $header); // $this->load->view('analisis_master/nav'); $this->load->view('analisis_indikator/parameter/ajax_form',$data); @@ -118,9 +118,9 @@ function form_parameter($in='',$id=''){ } function menu($id=''){ $data['analisis_indikator'] = $this->analisis_indikator_model->get_analisis_indikator($id); - + $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_indikator/menu',$data); @@ -186,4 +186,4 @@ function p_delete_all(){ $this->analisis_indikator_model->p_delete_all(); redirect("analisis_indikator/parameter/$in"); } -} \ No newline at end of file +} diff --git a/app/controllers/Analisis_kategori.php b/app/controllers/Analisis_kategori.php index c1425686b..2afe39ada 100644 --- a/app/controllers/Analisis_kategori.php +++ b/app/controllers/Analisis_kategori.php @@ -2,7 +2,7 @@ class Analisis_kategori extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('analisis_kategori_model'); $this->load->model('user_model'); $this->load->model('header_model'); @@ -24,21 +24,21 @@ function index($p=1,$o=0){ unset($_SESSION['cari2']); $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - - if(isset($_POST['per_page'])) + + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->analisis_kategori_model->paging($p,$o); $data['main'] = $this->analisis_kategori_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->analisis_kategori_model->autocomplete(); $data['analisis_master'] = $this->analisis_kategori_model->get_analisis_master(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_kategori/table',$data); @@ -47,20 +47,20 @@ function index($p=1,$o=0){ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['analisis_kategori'] = $this->analisis_kategori_model->get_analisis_kategori($id); $data['form_action'] = site_url("analisis_kategori/update/$p/$o/$id"); } - + else{ $data['analisis_kategori'] = null; $data['form_action'] = site_url("analisis_kategori/insert"); } - - - - + + + + //$this->load->view('header', $header); //$this->load->view('analisis_master/nav'); $this->load->view('analisis_kategori/ajax_form',$data); @@ -89,4 +89,4 @@ function delete_all($p=1,$o=0){ $this->analisis_kategori_model->delete_all(); redirect("analisis_kategori/index/$p/$o"); } -} \ No newline at end of file +} diff --git a/app/controllers/Analisis_klasifikasi.php b/app/controllers/Analisis_klasifikasi.php index e27b0fe3b..efcdb3d49 100644 --- a/app/controllers/Analisis_klasifikasi.php +++ b/app/controllers/Analisis_klasifikasi.php @@ -2,7 +2,7 @@ class Analisis_klasifikasi extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('analisis_klasifikasi_model'); $this->load->model('user_model'); $this->load->model('header_model'); @@ -24,21 +24,21 @@ function index($p=1,$o=0){ unset($_SESSION['cari2']); $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - - if(isset($_POST['per_page'])) + + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->analisis_klasifikasi_model->paging($p,$o); $data['main'] = $this->analisis_klasifikasi_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->analisis_klasifikasi_model->autocomplete(); $data['analisis_master'] = $this->analisis_klasifikasi_model->get_analisis_master(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_klasifikasi/table',$data); @@ -47,17 +47,17 @@ function index($p=1,$o=0){ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['analisis_klasifikasi'] = $this->analisis_klasifikasi_model->get_analisis_klasifikasi($id); $data['form_action'] = site_url("analisis_klasifikasi/update/$p/$o/$id"); } - + else{ $data['analisis_klasifikasi'] = null; $data['form_action'] = site_url("analisis_klasifikasi/insert"); } - + $data['analisis_master'] = $this->analisis_klasifikasi_model->get_analisis_master(); $this->load->view('analisis_klasifikasi/ajax_form',$data); } @@ -84,4 +84,4 @@ function delete_all($p=1,$o=0){ $this->analisis_klasifikasi_model->delete_all(); redirect("analisis_klasifikasi/index/$p/$o"); } -} \ No newline at end of file +} diff --git a/app/controllers/Analisis_laporan.php b/app/controllers/Analisis_laporan.php index 76915c7c6..7df310e3f 100644 --- a/app/controllers/Analisis_laporan.php +++ b/app/controllers/Analisis_laporan.php @@ -2,7 +2,7 @@ class analisis_laporan extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('analisis_laporan_model'); $this->load->model('user_model'); $this->load->model('header_model'); @@ -30,39 +30,39 @@ function index($p=1,$o=0){ unset($_SESSION['cari2']); $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['klasifikasi'])) $data['klasifikasi'] = $_SESSION['klasifikasi']; else $data['klasifikasi'] = ''; - + if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->analisis_laporan_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->analisis_laporan_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; $data['rt'] = ''; } - - if(isset($_POST['per_page'])) + + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['list_dusun'] = $this->analisis_laporan_model->list_dusun(); $data['list_klasifikasi'] = $this->analisis_laporan_model->list_klasifikasi(); $data['paging'] = $this->analisis_laporan_model->paging($p,$o); @@ -71,7 +71,7 @@ function index($p=1,$o=0){ $data['analisis_master'] = $this->analisis_laporan_model->get_analisis_master(); $data['analisis_periode'] = $this->analisis_laporan_model->get_periode(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_laporan/table',$data); @@ -80,17 +80,17 @@ function index($p=1,$o=0){ function kuisioner($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + $data['analisis_master'] = $this->analisis_laporan_model->get_analisis_master(); $data['subjek'] = $this->analisis_laporan_model->get_subjek($id); $data['total'] = $this->analisis_laporan_model->get_total($id); - + $this->load->model('analisis_respon_model'); $data['list_bukti'] = $this->analisis_respon_model->list_bukti($id); $data['list_anggota'] = $this->analisis_respon_model->list_anggota($id); $data['list_jawab'] = $this->analisis_laporan_model->list_indikator($id); $data['form_action'] = site_url("analisis_laporan/update_kuisioner/$p/$o/$id"); - + $header = $this->header_model->get_data(); $this->load->view('header', $header); $this->load->view('analisis_master/nav'); @@ -136,7 +136,7 @@ function multi_jawab_proses(){ } } $_SESSION['jawab'] = $cb."7777777"; - + $jmkf = $this->analisis_laporan_model->group_parameter(); $_SESSION['jmkf'] = count($jmkf); } @@ -180,5 +180,5 @@ function search(){ else unset($_SESSION['cari']); redirect('analisis_laporan'); } - -} \ No newline at end of file + +} diff --git a/app/controllers/Analisis_master.php b/app/controllers/Analisis_master.php index 5cbcf15dc..6a68b2cb1 100644 --- a/app/controllers/Analisis_master.php +++ b/app/controllers/Analisis_master.php @@ -2,7 +2,7 @@ class analisis_master extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('analisis_master_model'); $this->load->model('analisis_import_model'); $this->load->model('user_model'); @@ -24,28 +24,28 @@ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; $nav['act']= 1; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - + if(isset($_SESSION['state'])) $data['state'] = $_SESSION['state']; else $data['state'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->analisis_master_model->paging($p,$o); $data['main'] = $this->analisis_master_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->analisis_master_model->autocomplete(); $data['list_subjek'] = $this->analisis_master_model->list_subjek(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav',$nav); $this->load->view('analisis_master/table',$data); @@ -55,21 +55,21 @@ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; $nav['act']= 1; - + if($id){ $data['analisis_master'] = $this->analisis_master_model->get_analisis_master($id); $data['form_action'] = site_url("analisis_master/update/$p/$o/$id"); } - + else{ $data['analisis_master'] = null; $data['form_action'] = site_url("analisis_master/insert"); } - + $data['list_kelompok'] = $this->analisis_master_model->list_kelompok(); $data['list_analisis'] = $this->analisis_master_model->list_analisis_child(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav',$nav); $this->load->view('analisis_master/form',$data); @@ -78,7 +78,7 @@ function form($p=1,$o=0,$id=''){ function panduan(){ $nav['act']= 1; $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav',$nav); $this->load->view('analisis_master/panduan'); @@ -86,7 +86,7 @@ function panduan(){ } function import_analisis(){ $header = $this->header_model->get_data(); - + $nav['act']= 1; $data['form_action'] = site_url("analisis_master/import"); $this->load->view('analisis_master/import', $data); @@ -98,7 +98,7 @@ function menu($id='',$p=0){ $da = $data['analisis_master']; $subjek = $da['subjek_tipe']; $_SESSION['subjek_tipe']=$subjek; - + switch($subjek){ case 1: $data['menu_respon'] = "analisis_respon_penduduk"; $data['menu_laporan'] = "analisis_laporan_penduduk"; break; case 2: $data['menu_respon'] = "analisis_respon_keluarga"; $data['menu_laporan'] = "analisis_laporan_keluarga";break; @@ -109,14 +109,14 @@ function menu($id='',$p=0){ $data['menu_respon'] = "analisis_respon"; $data['menu_laporan'] = "analisis_laporan"; $header = $this->header_model->get_data(); - + //PATCH //if($p==1){ $this->load->model('analisis_respon_model'); $this->analisis_respon_model->pre_update(); //} //---- - + $nav['act']= 1; $this->load->view('header', $header); $this->load->view('analisis_master/nav',$nav); @@ -164,4 +164,4 @@ function delete_all($p=1,$o=0){ $this->analisis_master_model->delete_all(); redirect("analisis_master/index/$p/$o"); } -} \ No newline at end of file +} diff --git a/app/controllers/Analisis_periode.php b/app/controllers/Analisis_periode.php index b0d571a6e..cd29d16d2 100644 --- a/app/controllers/Analisis_periode.php +++ b/app/controllers/Analisis_periode.php @@ -2,7 +2,7 @@ class Analisis_periode extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('analisis_periode_model'); $this->load->model('user_model'); $this->load->model('header_model'); @@ -25,25 +25,25 @@ function index($p=1,$o=0){ unset($_SESSION['cari2']); $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['state'])) $data['state'] = $_SESSION['state']; else $data['state'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->analisis_periode_model->paging($p,$o); $data['main'] = $this->analisis_periode_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->analisis_periode_model->autocomplete(); $data['analisis_master'] = $this->analisis_periode_model->get_analisis_master(); $data['list_state'] = $this->analisis_periode_model->list_state(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_periode/table',$data); @@ -52,20 +52,20 @@ function index($p=1,$o=0){ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['analisis_periode'] = $this->analisis_periode_model->get_analisis_periode($id); $data['form_action'] = site_url("analisis_periode/update/$p/$o/$id"); } - + else{ $data['analisis_periode'] = null; $data['form_action'] = site_url("analisis_periode/insert"); } - + $header = $this->header_model->get_data(); $data['analisis_master'] = $this->analisis_periode_model->get_analisis_master(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_periode/form',$data); @@ -106,4 +106,4 @@ function list_state(){ $query = $this->db->query($sql); return $query->result_array(); } -} \ No newline at end of file +} diff --git a/app/controllers/Analisis_respon.php b/app/controllers/Analisis_respon.php index 02e254574..607e0cb57 100644 --- a/app/controllers/Analisis_respon.php +++ b/app/controllers/Analisis_respon.php @@ -2,7 +2,7 @@ class analisis_respon extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + UNSET($_SESSION['delik']); $this->load->model('analisis_respon_model'); $this->load->model('user_model'); @@ -30,11 +30,11 @@ function index($p=1,$o=0){ unset($_SESSION['cari2']); $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['isi'])) $data['isi'] = $_SESSION['isi']; else $data['isi'] = ''; @@ -42,36 +42,36 @@ function index($p=1,$o=0){ if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->analisis_respon_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->analisis_respon_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; $data['rt'] = ''; } - - if(isset($_POST['per_page'])) + + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['list_dusun'] = $this->analisis_respon_model->list_dusun(); $data['paging'] = $this->analisis_respon_model->paging($p,$o); $data['main'] = $this->analisis_respon_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->analisis_respon_model->autocomplete(); $data['analisis_master'] = $this->analisis_respon_model->get_analisis_master(); $data['analisis_periode'] = $this->analisis_respon_model->get_periode(); - + $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_respon/table',$data); @@ -80,24 +80,24 @@ function index($p=1,$o=0){ function kuisioner($p=1,$o=0,$id='',$fs=0){ if($fs==1) $_SESSION['fullscreen'] = 1; - + if($fs==2) unset($_SESSION['fullscreen']); - + if($fs != 0) redirect("analisis_respon/kuisioner/$p/$o/$id"); - + $data['p'] = $p; $data['o'] = $o; $data['id'] = $id; - + $data['analisis_master'] = $this->analisis_respon_model->get_analisis_master(); $data['subjek'] = $this->analisis_respon_model->get_subjek($id); $data['list_jawab'] = $this->analisis_respon_model->list_indikator($id); $data['list_bukti'] = $this->analisis_respon_model->list_bukti($id); $data['list_anggota'] = $this->analisis_respon_model->list_anggota($id); $data['form_action'] = site_url("analisis_respon/update_kuisioner/$p/$o/$id"); - + $header = $this->header_model->get_data(); if(isset($_SESSION['fullscreen'])) $this->load->view('header-min', $header); @@ -105,9 +105,9 @@ function kuisioner($p=1,$o=0,$id='',$fs=0){ $this->load->view('header', $header); $this->load->view('analisis_master/nav'); } - + $this->load->view('analisis_respon/form',$data); - + $this->load->view('footer'); } function update_kuisioner($p=1,$o=0,$id=''){ @@ -117,13 +117,13 @@ function update_kuisioner($p=1,$o=0,$id=''){ //CHILD-------------------- function kuisioner_child($p=1,$o=0,$id='',$idc=''){ - + $data['p'] = $p; $data['o'] = $o; - + $data['list_jawab'] = $this->analisis_respon_model->list_indikator_child($idc); $data['form_action'] = site_url("analisis_respon/update_kuisioner_child/$p/$o/$id/$idc"); - + $this->load->view('analisis_respon/form_ajax',$data); } function update_kuisioner_child($p=1,$o=0,$id='',$idc=''){ @@ -131,7 +131,7 @@ function update_kuisioner_child($p=1,$o=0,$id='',$idc=''){ $this->analisis_respon_model->update_kuisioner($idc,$per); redirect("analisis_respon/kuisioner/$p/$o/$id"); } - + function aturan_ajax(){ $this->load->view('analisis_respon/import/aturan_ajax'); } @@ -152,7 +152,7 @@ function import($op=0){ $data['form_action'] = site_url("analisis_respon/import_proses/$op"); $this->load->view('analisis_respon/import/import',$data); } - + function satu_jiwa($op=0){ $this->analisis_respon_model->satu_jiwa($op); redirect('analisis_respon'); @@ -205,4 +205,4 @@ function rt(){ else unset($_SESSION['rt']); redirect('analisis_respon'); } -} \ No newline at end of file +} diff --git a/app/controllers/Analisis_statistik_jawaban.php b/app/controllers/Analisis_statistik_jawaban.php index 10e181dee..0b60fc3fb 100644 --- a/app/controllers/Analisis_statistik_jawaban.php +++ b/app/controllers/Analisis_statistik_jawaban.php @@ -2,7 +2,7 @@ class analisis_statistik_jawaban extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('analisis_statistik_jawaban_model'); $this->load->model('user_model'); $this->load->model('header_model'); @@ -30,11 +30,11 @@ function index($p=1,$o=0){ unset($_SESSION['cari2']); $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; @@ -44,30 +44,30 @@ function index($p=1,$o=0){ if(isset($_SESSION['kategori'])) $data['kategori'] = $_SESSION['kategori']; else $data['kategori'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->analisis_statistik_jawaban_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->analisis_statistik_jawaban_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; $data['rt'] = ''; } - + $data['paging'] = $this->analisis_statistik_jawaban_model->paging($p,$o); $data['main'] = $this->analisis_statistik_jawaban_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->analisis_statistik_jawaban_model->autocomplete(); @@ -76,7 +76,7 @@ function index($p=1,$o=0){ $data['list_kategori'] = $this->analisis_statistik_jawaban_model->list_kategori(); $data['list_dusun'] = $this->analisis_statistik_jawaban_model->list_dusun(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_statistik_jawaban/table',$data); @@ -85,21 +85,21 @@ function index($p=1,$o=0){ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['analisis_statistik_jawaban'] = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); $data['form_action'] = site_url("analisis_statistik_jawaban/update/$p/$o/$id"); } - + else{ $data['analisis_statistik_jawaban'] = null; $data['form_action'] = site_url("analisis_statistik_jawaban/insert"); } - + $data['list_kategori'] = $this->analisis_statistik_jawaban_model->list_kategori(); $header = $this->header_model->get_data(); $data['analisis_master'] = $this->analisis_statistik_jawaban_model->get_analisis_master(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_statistik_jawaban/form',$data); @@ -109,13 +109,13 @@ function parameter($id=''){ $ai = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); if($ai['id_tipe']==3 OR $ai['id_tipe']==4) redirect('analisis_statistik_jawaban'); - + $data['analisis_statistik_jawaban'] = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); $data['analisis_master'] = $this->analisis_statistik_jawaban_model->get_analisis_master(); $data['main'] = $this->analisis_statistik_jawaban_model->list_indikator($id); - + $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_statistik_jawaban/parameter/table',$data); @@ -125,34 +125,34 @@ function grafik_parameter($id=''){ if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->analisis_statistik_jawaban_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->analisis_statistik_jawaban_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; $data['rt'] = ''; } $data['list_dusun'] = $this->analisis_statistik_jawaban_model->list_dusun(); - + $ai = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); - + //redirect('analisis_statistik_jawaban'); - + $data['analisis_statistik_jawaban'] = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); $data['analisis_master'] = $this->analisis_statistik_jawaban_model->get_analisis_master(); $data['main'] = $this->analisis_statistik_jawaban_model->list_indikator($id); - + $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_statistik_jawaban/parameter/grafik_table',$data); @@ -162,35 +162,35 @@ function subjek_parameter($id='',$par=''){ if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->analisis_statistik_jawaban_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->analisis_statistik_jawaban_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; $data['rt'] = ''; } $data['list_dusun'] = $this->analisis_statistik_jawaban_model->list_dusun(); - + $ai = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); //if($ai['id_tipe']==3 OR $ai['id_tipe']==4) // redirect('analisis_statistik_jawaban'); - + $data['analisis_statistik_pertanyaan'] = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); $data['analisis_statistik_jawaban'] = $this->analisis_statistik_jawaban_model->get_analisis_parameter($par); $data['analisis_master'] = $this->analisis_statistik_jawaban_model->get_analisis_master(); $data['main'] = $this->analisis_statistik_jawaban_model->list_subjek($par); - + $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('analisis_master/nav'); $this->load->view('analisis_statistik_jawaban/parameter/subjek_table',$data); @@ -204,7 +204,7 @@ function excel($o=0){ $data['main'] = $this->analisis_statistik_jawaban_model->list_data($o,0, 10000); $this->load->view('analisis_statistik_jawaban/table_excel',$data); } - + function cetak2($id='',$par=''){ $data['analisis_statistik_pertanyaan'] = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id); $data['analisis_statistik_jawaban'] = $this->analisis_statistik_jawaban_model->get_analisis_parameter($par); @@ -217,7 +217,7 @@ function excel2($id='',$par=''){ $data['main'] = $this->analisis_statistik_jawaban_model->list_subjek($par); $this->load->view('analisis_statistik_jawaban/parameter/subjek_excel',$data); } - + function search(){ $cari = $this->input->post('cari'); if($cari!='') @@ -350,4 +350,4 @@ function p_delete_all(){ $this->analisis_statistik_jawaban_model->p_delete_all(); redirect("analisis_statistik_jawaban/parameter/$in"); } -} \ No newline at end of file +} diff --git a/app/controllers/Area.php b/app/controllers/Area.php index a0320484c..cdca7bfa2 100644 --- a/app/controllers/Area.php +++ b/app/controllers/Area.php @@ -2,13 +2,13 @@ class area extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); - + $this->load->model('header_model'); $this->load->model('plan_area_model'); - - + + $this->load->database(); } function clear(){ @@ -21,11 +21,11 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; @@ -35,10 +35,10 @@ function index($p=1,$o=0){ if(isset($_SESSION['subpolygon'])) $data['subpolygon'] = $_SESSION['subpolygon']; else $data['subpolygon'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->plan_area_model->paging($p,$o); $data['main'] = $this->plan_area_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->plan_area_model->autocomplete(); @@ -46,22 +46,22 @@ function index($p=1,$o=0){ $data['list_subpolygon'] = $this->plan_area_model->list_subpolygon(); $header= $this->header_model->get_data(); $nav['act']=4; - + $this->load->view('header-gis', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('area/table',$data); $this->load->view('footer'); - + } function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + $data['desa'] = $this->plan_area_model->get_desa(); $data['list_polygon'] = $this->plan_area_model->list_polygon(); $data['dusun'] = $this->plan_area_model->list_dusun(); - + if($id){ $data['area'] = $this->plan_area_model->get_area($id); $data['form_action'] = site_url("area/update/$id/$p/$o"); @@ -71,14 +71,14 @@ function form($p=1,$o=0,$id=''){ $data['form_action'] = site_url("area/insert"); } $header= $this->header_model->get_data(); - + $nav['act']=4; $this->load->view('header-gis', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('area/form',$data); $this->load->view('footer'); - + } function ajax_area_maps($p=1,$o=0,$id=''){ $data['p'] = $p; @@ -87,12 +87,12 @@ function ajax_area_maps($p=1,$o=0,$id=''){ $data['area'] = $this->plan_area_model->get_area($id); else $data['area'] = null; - + $data['desa'] = $this->plan_area_model->get_desa(); $data['form_action'] = site_url("area/update_maps/$p/$o/$id"); $this->load->view("area/maps", $data); } - + function update_maps($p=1,$o=0,$id=''){ $this->plan_area_model->update_position($id); redirect("area/index/$p/$o"); @@ -150,4 +150,4 @@ function area_unlock($id=''){ $this->plan_area_model->area_lock($id,2); redirect("area/index/$p/$o"); } -} \ No newline at end of file +} diff --git a/app/controllers/Data_persil.php b/app/controllers/Data_persil.php index fa73f5c06..ef59097a9 100644 --- a/app/controllers/Data_persil.php +++ b/app/controllers/Data_persil.php @@ -3,9 +3,9 @@ class Data_persil extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); - + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2) redirect('siteman'); $this->load->model('header_model'); @@ -20,11 +20,11 @@ function clear(){ function index($page=1){ $header = $this->header_model->get_data(); $this->load->view('header', $header); - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + $data["desa"] = $this->config_model->get_data(); $data["persil"] = $this->data_persil_model->list_persil('',0,$page); $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); @@ -56,16 +56,16 @@ function detail($id=0){ $data["persil_lokasi"] = $this->data_persil_model->list_dusunrwrt(); $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); - + $this->load->view('data_persil/detail',$data); $this->load->view('footer'); } function create($id=0){ $this->load->helper('form'); $this->load->library('form_validation'); - + $this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required'); - + $header = $this->header_model->get_data(); $this->load->view('header', $header); $data["penduduk"] = $this->data_persil_model->list_penduduk(); @@ -78,10 +78,10 @@ function create($id=0){ if(isset($_POST['nik'])){ $data['pemilik']=$this->data_persil_model->get_penduduk($_POST['nik']); } - + $data["persil_lokasi"] = $this->data_persil_model->list_dusunrwrt(); - - + + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); $this->load->view('data_persil/create',$data); @@ -90,14 +90,14 @@ function create($id=0){ function create_ext($id=0){ $this->load->helper('form'); $this->load->library('form_validation'); - + $this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required'); - + $header = $this->header_model->get_data(); $this->load->view('header', $header); $data["penduduk"] = $this->data_persil_model->list_penduduk(); - $data["persil_detail"] = $this->data_persil_model->get_persil($id); - + $data["persil_detail"] = $this->data_persil_model->get_persil($id); + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); $this->load->view('data_persil/create_ext',$data); @@ -106,13 +106,13 @@ function create_ext($id=0){ function simpan_persil($page=1){ $this->load->helper('form'); $this->load->library('form_validation'); - + $this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required'); $header = $this->header_model->get_data(); $this->load->view('header', $header); $data["hasil"] = $this->data_persil_model->simpan_persil(); $data["persil"] = $this->data_persil_model->list_persil(0,$page); - + $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); redirect("data_persil/clear"); @@ -134,15 +134,15 @@ function peruntukan($apa='',$page=1){ $data["persil_peruntukan"] = $this->data_persil_model->list_persil_peruntukan(); $data["persil_jenis"] = $this->data_persil_model->list_persil_jenis(); $data["persil"] = $this->data_persil_model->list_persil('peruntukan',$apa,$page);; - + $this->load->view('data_persil/persil',$data); $this->load->view('footer'); } function persil_jenis($id=0){ - + $this->load->helper('form'); $this->load->library('form_validation'); - + $this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required'); $header = $this->header_model->get_data(); $this->load->view('header', $header); @@ -167,10 +167,10 @@ public function hapus_persil_jenis($id){ redirect("data_persil/persil_jenis"); } function persil_peruntukan($id=0){ - + $this->load->helper('form'); $this->load->library('form_validation'); - + $this->form_validation->set_rules('nama', 'Nama Jenis Persil', 'required'); $header = $this->header_model->get_data(); $this->load->view('header', $header); @@ -189,7 +189,7 @@ function persil_peruntukan($id=0){ $this->load->view('data_persil/persil_peruntukan',$data); } $this->load->view('footer'); - } + } public function hapus_persil_peruntukan($id){ $this->data_persil_model->hapus_peruntukan($id); redirect("data_persil/persil_peruntukan"); @@ -204,4 +204,4 @@ function import_proses(){ redirect("data_persil"); } } -?> \ No newline at end of file +?> diff --git a/app/controllers/Database.php b/app/controllers/Database.php index 7ee9178ff..f9e25ad9d 100644 --- a/app/controllers/Database.php +++ b/app/controllers/Database.php @@ -2,7 +2,7 @@ class Database extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $this->load->dbforge(); //$this->load->model('wilayah_model'); @@ -11,7 +11,7 @@ function __construct(){ $this->load->model('header_model'); $this->load->model('import_model'); $this->load->model('export_model'); - + } function clear(){ unset($_SESSION['cari']); @@ -80,7 +80,7 @@ function import2(){ $this->load->view('export/nav',$nav); $this->load->view('export/imp',$data); $this->load->view('footer'); - + } function pre_migrate(){ $nav['act']= 3; @@ -102,22 +102,22 @@ function migrate(){ function import_dasar(){ $this->import_model->import_excel(); redirect('database/import/1'); - + } function ppls_kuisioner(){ $this->import_model->ppls_kuisioner(); redirect('database/import_ppls/1'); - + } function ppls_individu(){ $this->import_model->pbdt_individu(); //redirect('database/import_ppls'); - + } function ppls_rumahtangga(){ $this->import_model->pbdt_rumahtangga(); redirect('database/import_ppls/1'); - + } function import_siak(){ $data["siak"] = $this->import_model->import_siak(); @@ -160,4 +160,4 @@ function export_csv(){ $data['main'] = $this->export_model->export_excel(); $this->load->view('export/penduduk_csv',$data); } -} \ No newline at end of file +} diff --git a/app/controllers/Dokumen.php b/app/controllers/Dokumen.php index f22845a8d..cfa88b636 100644 --- a/app/controllers/Dokumen.php +++ b/app/controllers/Dokumen.php @@ -2,7 +2,7 @@ class Dokumen extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3 AND $grup!=4) redirect('siteman'); @@ -17,24 +17,24 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->web_dokumen_model->paging($p,$o); $data['main'] = $this->web_dokumen_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->web_dokumen_model->autocomplete(); $header = $this->header_model->get_data(); $nav['act']=4; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('dokumen/table',$data); @@ -43,7 +43,7 @@ function index($p=1,$o=0){ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['dokumen'] = $this->web_dokumen_model->get_dokumen($id); $data['form_action'] = site_url("dokumen/update/$id/$p/$o"); @@ -52,9 +52,9 @@ function form($p=1,$o=0,$id=''){ $data['dokumen'] = null; $data['form_action'] = site_url("dokumen/insert"); } - + $header = $this->header_model->get_data(); - + $nav['act']=4; $this->load->view('header', $header); $this->load->view('web/nav',$nav); @@ -99,4 +99,4 @@ function dokumen_unlock($id=''){ $this->web_dokumen_model->dokumen_lock($id,2); redirect("dokumen/index/$p/$o"); } -} \ No newline at end of file +} diff --git a/app/controllers/Feed.php b/app/controllers/Feed.php index 9f3236cec..3e4c53b75 100644 --- a/app/controllers/Feed.php +++ b/app/controllers/Feed.php @@ -2,7 +2,7 @@ class Feed extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('header_model'); $this->load->model('feed_model'); $this->load->model('config_model'); @@ -13,4 +13,4 @@ public function index(){ $data["feeds"] = $this->feed_model->list_feeds(); $this->load->view("feed",$data); } -} \ No newline at end of file +} diff --git a/app/controllers/First.php b/app/controllers/First.php index 632099932..5dca02dd9 100644 --- a/app/controllers/First.php +++ b/app/controllers/First.php @@ -3,11 +3,11 @@ class First extends CI_Controller{ function __construct() { - parent::__construct(); - session_start(); - + parent::__construct(); + + mandiri_timeout(); - + $this->load->model('header_model'); $this->load->model('config_model'); $this->load->model('first_keluarga_m'); @@ -15,13 +15,13 @@ function __construct() { $this->load->model('first_artikel_m'); $this->load->model('first_gallery_m'); $this->load->model('first_menu_m'); - $this->load->model('first_penduduk_m'); - $this->load->model('penduduk_model'); - $this->load->model('surat_model'); - $this->load->model('surat_keluar_model'); + $this->load->model('first_penduduk_m'); + $this->load->model('penduduk_model'); + $this->load->model('surat_model'); + $this->load->model('surat_keluar_model'); } - + function auth(){ if($_SESSION['mandiri_wait']!=1){ $this->first_m->siteman(); @@ -31,22 +31,22 @@ function auth(){ else redirect('first'); } - + function mobile($user="",$pass=""){ $token = $this->first_m->m_siteman(); return $token; } - + function logout(){ $this->first_m->logout(); redirect('first'); } - + function ganti(){ $this->first_m->ganti(); redirect('first'); } - + function index($p=1){ $data['p'] = $p; $data['desa'] = $this->first_m->get_data(); @@ -54,26 +54,26 @@ function index($p=1){ $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); $data['headline'] = $this->first_artikel_m->get_headline(); $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); - + $data['paging'] = $this->first_artikel_m->paging($p); $data['artikel'] = $this->first_artikel_m->artikel_show(0,$data['paging']->offset,$data['paging']->per_page); - + $data['arsip'] = $this->first_artikel_m->arsip_show(); $data['komen'] = $this->first_artikel_m->komentar_show(); $data['agenda'] = $this->first_artikel_m->agenda_show(); $data['slide'] = $this->first_artikel_m->slide_show(); - + $data['stat'] = $this->first_penduduk_m->list_data(4); $data['sosmed'] = $this->first_artikel_m->list_sosmed(); $data['w_gal'] = $this->first_gallery_m->gallery_widget(); $data['w_cos'] = $this->first_artikel_m->cos_widget(); $data['data_config'] = $this->config_model->get_data(); ; - $this->load->view('layouts/main.tpl.php',$data); + $this->load->view('layouts/main.tpl.php',$data); } - + function cetak_biodata($id=''){ - + $data['desa'] = $this->header_model->get_data(); $data['penduduk'] = $this->penduduk_model->get_penduduk($id); $this->load->view('sid/kependudukan/cetak_biodata',$data); @@ -89,40 +89,40 @@ function mandiri($p=1,$m=0){ $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); $data['headline'] = $this->first_artikel_m->get_headline(); $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); - + //$data['paging'] = $this->first_artikel_m->paging($p); //$data['artikel'] = $this->first_artikel_m->artikel_show(0,$data['paging']->offset,$data['paging']->per_page); - + $data['penduduk'] = $this->penduduk_model->get_penduduk($_SESSION['id']); $data['arsip'] = $this->first_artikel_m->arsip_show(); $data['komen'] = $this->first_artikel_m->komentar_show(); $data['agenda'] = $this->first_artikel_m->agenda_show(); $data['slide'] = $this->first_artikel_m->slide_show(); - + $data['stat'] = $this->first_penduduk_m->list_data(4); $data['sosmed'] = $this->first_artikel_m->list_sosmed(); $data['w_gal'] = $this->first_gallery_m->gallery_widget(); $data['w_cos'] = $this->first_artikel_m->cos_widget(); $data['data_config'] = $this->config_model->get_data(); - + $data['list_dokumen'] = $this->penduduk_model->list_dokumen($_SESSION['id']); $data['list_kelompok'] = $this->penduduk_model->list_kelompok($_SESSION['id']); - + //if($m == 2) $data['surat_keluar'] = $this->surat_keluar_model->list_data_surat($_SESSION['id']); //$data['menu_surat2'] = $this->surat_model->list_surat2(); $data['m'] = $m; - $this->load->view('layouts/mandiri.php',$data); + $this->load->view('layouts/mandiri.php',$data); } } - + function artikel($id="",$p=1) { $id = explode("-",$id); $id = $id[0]; $data['p'] = $p; $data['desa'] = $this->first_m->get_data(); - + $data['paging'] = $this->first_artikel_m->paging($p); $data['artikel'] = $this->first_artikel_m->list_artikel(0,$data['paging']->offset,$data['paging']->per_page); @@ -139,15 +139,15 @@ function artikel($id="",$p=1) { $data['stat'] = $this->first_penduduk_m->list_data(5); $data['w_gal'] = $this->first_gallery_m->gallery_widget(); $data['w_cos'] = $this->first_artikel_m->cos_widget(); - + $data['data_config'] = $this->config_model->get_data(); $this->load->view('layouts/artikel.tpl.php',$data); } - + function arsip($p=1) { $data['p'] = $p; $data['paging'] = $this->first_artikel_m->paging_arsip($p); - + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); $data['desa'] = $this->first_m->get_data(); $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); @@ -164,18 +164,18 @@ function arsip($p=1) { $data['data_config'] = $this->config_model->get_data(); - $this->load->view('layouts/arsip.tpl.php',$data); + $this->load->view('layouts/arsip.tpl.php',$data); } - + function gallery($p=1){ $data['p'] = $p; - + $data['desa'] = $this->first_m->get_data(); $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); $data['paging'] = $this->first_artikel_m->paging($p); $data['artikel'] = $this->first_artikel_m->artikel_show(0,$data['paging']->offset,$data['paging']->per_page); - + $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); $data['arsip'] = $this->first_artikel_m->arsip_show(); @@ -183,15 +183,15 @@ function gallery($p=1){ $data['agenda'] = $this->first_artikel_m->agenda_show(); $data['slide'] = $this->first_artikel_m->slide_show(); $data['sosmed'] = $this->first_artikel_m->list_sosmed(); - + $data['paging'] = $this->first_gallery_m->paging($p); $data['gallery'] = $this->first_gallery_m->gallery_show($data['paging']->offset,$data['paging']->per_page); - + $data['stat'] = $this->first_penduduk_m->list_data(6); $data['w_gal'] = $this->first_gallery_m->gallery_widget(); $data['w_cos'] = $this->first_artikel_m->cos_widget(); $data['data_config'] = $this->config_model->get_data(); - $this->load->view('layouts/gallery.tpl.php',$data); + $this->load->view('layouts/gallery.tpl.php',$data); } function sub_gallery($gal=0,$p=1){ @@ -205,27 +205,27 @@ function sub_gallery($gal=0,$p=1){ $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); - + $data['paging'] = $this->first_gallery_m->paging2($gal,$p); $data['gallery'] = $this->first_gallery_m->sub_gallery_show($gal,$data['paging']->offset,$data['paging']->per_page); - + $data['parrent'] = $this->first_gallery_m->get_parrent($gal); $data['arsip'] = $this->first_artikel_m->arsip_show(); $data['komen'] = $this->first_artikel_m->komentar_show(); $data['agenda'] = $this->first_artikel_m->agenda_show(); $data['slide'] = $this->first_artikel_m->slide_show(); $data['sosmed'] = $this->first_artikel_m->list_sosmed(); - + $data['stat'] = $this->first_penduduk_m->list_data(4); $data['w_gal'] = $this->first_gallery_m->gallery_widget(); $data['w_cos'] = $this->first_artikel_m->cos_widget(); $data['data_config'] = $this->config_model->get_data(); $data['mode']= 1; - $this->load->view('layouts/sub_gallery.tpl.php',$data); + $this->load->view('layouts/sub_gallery.tpl.php',$data); } - + function statistik($stat="",$tipe=0){ - + switch($stat){ case "pendidikan-dalam-kk":$data['heading']="Pendidikan";break; case "pekerjaan":$data['heading']="Pekerjaan";break; @@ -237,10 +237,10 @@ function statistik($stat="",$tipe=0){ case "warga-negara":$data['heading']="Warga Negara";break; case "wilayah":redirect("first/wilayah");break; case "pendidikan-ditempuh":$data['heading']="Pendidikan Sedang Ditempuh";break; - + default:$data['heading']="";redirect("first");break; } - + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); $data['slide'] = $this->first_artikel_m->slide_show(); $data['desa'] = $this->first_m->get_data(); @@ -252,21 +252,21 @@ function statistik($stat="",$tipe=0){ $data['sosmed'] = $this->first_artikel_m->list_sosmed(); $data['arsip'] = $this->first_artikel_m->arsip_show(); $data['w_cos'] = $this->first_artikel_m->cos_widget(); - + $data['data_config'] = $this->config_model->get_data(); $data['st'] = $stat; - - $this->load->view('layouts/stat.tpl.php',$data); + + $this->load->view('layouts/stat.tpl.php',$data); } - + function data_analisis($stat="",$sb=0,$per=0){ - + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); $data['slide'] = $this->first_artikel_m->slide_show(); $data['desa'] = $this->first_m->get_data(); $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); - + if($stat == ""){ $data['list_indikator'] = $this->first_penduduk_m->list_indikator(); $data['list_jawab'] = null; @@ -275,20 +275,20 @@ function data_analisis($stat="",$sb=0,$per=0){ $data['list_indikator'] = ""; $data['list_jawab'] = $this->first_penduduk_m->list_jawab($stat,$sb,$per); $data['indikator'] = $this->first_penduduk_m->get_indikator($stat); - + } $data['sosmed'] = $this->first_artikel_m->list_sosmed(); $data['arsip'] = $this->first_artikel_m->arsip_show(); $data['w_cos'] = $this->first_artikel_m->cos_widget(); - + $data['data_config'] = $this->config_model->get_data(); - - $this->load->view('layouts/analisis.tpl.php',$data); + + $this->load->view('layouts/analisis.tpl.php',$data); } - - + + function wilayah(){ - + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); $data['main'] = $this->first_penduduk_m->wilayah(); $data['heading']="Populasi Per Wilayah"; @@ -302,19 +302,19 @@ function wilayah(){ $data['w_cos'] = $this->first_artikel_m->cos_widget(); $data['tipe'] = 3; - + $data['total'] = $this->first_penduduk_m->total(); $data['st'] = 1; $data['data_config'] = $this->config_model->get_data(); - $this->load->view('layouts/stat.tpl.php',$data); + $this->load->view('layouts/stat.tpl.php',$data); } - + function statistik_k($tipex=0) { - + $data['tipe'] = 2; $data['tipex'] = $tipex; - + $data['desa'] = $this->first_m->get_data(); @@ -332,7 +332,7 @@ function statistik_k($tipex=0) { $data['data_config'] = $this->config_model->get_data(); $this->load->view('layouts/stat.tpl.php',$data); } - + function agenda($stat=0) { $data['desa'] = $this->first_m->get_data(); $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); @@ -344,18 +344,18 @@ function agenda($stat=0) { $data['sosmed'] = $this->first_artikel_m->list_sosmed(); $data['stat'] = $this->first_penduduk_m->list_data(4); $data['data_config'] = $this->config_model->get_data(); - - $this->load->view('layouts/main.tpl.php',$data); + + $this->load->view('layouts/main.tpl.php',$data); } - + function kategori($kat=0,$p=0){ - + $data['p'] = $p; $data['desa'] = $this->first_m->get_data(); $data['menu_atas'] = $this->first_menu_m->list_menu_atas(); $data['menu_kiri'] = $this->first_menu_m->list_menu_kiri(); $data['headline'] = null; - + $data['teks_berjalan'] = $this->first_artikel_m->get_teks_berjalan(); $data['paging'] = $this->first_artikel_m->paging_kat($p,$kat); $data['artikel'] = $this->first_artikel_m->list_artikel($data['paging']->offset,$data['paging']->per_page,$kat); @@ -368,26 +368,26 @@ function kategori($kat=0,$p=0){ $data['sosmed'] = $this->first_artikel_m->list_sosmed(); $data['w_gal'] = $this->first_gallery_m->gallery_widget(); $data['w_cos'] = $this->first_artikel_m->cos_widget(); - + $data["judul_kategori"] = $this->first_artikel_m->get_kategori($kat); - + $data['data_config'] = $this->config_model->get_data(); $this->load->view('layouts/main.tpl.php',$data); - } - + } + function add_comment($id=0) { $this->first_artikel_m->insert_comment($id); $data['data_config'] = $this->config_model->get_data(); if($id!=775) redirect("first/artikel/$id"); else{ - $_SESSION['sukses']=1; - redirect("first/mandiri/1/3"); + $_SESSION['sukses']=1; + redirect("first/mandiri/1/3"); } } - + function randomap($id=0) { $this->penduduk_model->randomap(); } - + } diff --git a/app/controllers/Gallery.php b/app/controllers/Gallery.php index 9a1604d5c..9d0c779d6 100644 --- a/app/controllers/Gallery.php +++ b/app/controllers/Gallery.php @@ -2,7 +2,7 @@ class gallery extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3 AND $grup!=4) redirect('siteman'); @@ -17,24 +17,24 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->web_gallery_model->paging($p,$o); $data['main'] = $this->web_gallery_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->web_gallery_model->autocomplete(); $header = $this->header_model->get_data(); $nav['act']=3; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('gallery/table',$data); @@ -43,7 +43,7 @@ function index($p=1,$o=0){ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['gallery'] = $this->web_gallery_model->get_gallery($id); $data['form_action'] = site_url("gallery/update/$id/$p/$o"); @@ -52,9 +52,9 @@ function form($p=1,$o=0,$id=''){ $data['gallery'] = null; $data['form_action'] = site_url("gallery/insert"); } - + $header = $this->header_model->get_data(); - + $nav['act']=3; $this->load->view('header', $header); $this->load->view('web/nav',$nav); @@ -102,26 +102,26 @@ function gallery_unlock($id=''){ function sub_gallery($gal=0,$p=1){ $data['p'] = 1; $data['o'] = 0; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->web_gallery_model->paging2($gal,$p); - + $data['sub_gallery'] = $this->web_gallery_model->list_sub_gallery($gal,$data['paging']->offset, $data['paging']->per_page); - $data['gallery'] = $gal; + $data['gallery'] = $gal; $data['sub'] = $this->web_gallery_model->get_gallery($gal); $header = $this->header_model->get_data(); $nav['act']=3; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('gallery/sub_gallery_table',$data); @@ -137,10 +137,10 @@ function form_sub_gallery($gallery=0,$id=0){ $data['form_action'] = site_url("gallery/insert_sub_gallery/$gallery"); } $data['album']=$gallery; - - + + $header = $this->header_model->get_data(); - + $nav['act']=3; $this->load->view('header', $header); $this->load->view('web/nav',$nav); @@ -171,4 +171,4 @@ function gallery_unlock_sub_gallery($gallery='',$id=''){ $this->web_gallery_model->gallery_lock($id,2); redirect("gallery/sub_gallery/$gallery"); } -} \ No newline at end of file +} diff --git a/app/controllers/Garis.php b/app/controllers/Garis.php index 6e6a46edf..db0797d0b 100644 --- a/app/controllers/Garis.php +++ b/app/controllers/Garis.php @@ -2,13 +2,13 @@ class garis extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); - + $this->load->model('header_model'); $this->load->model('plan_garis_model'); - - + + $this->load->database(); } function clear(){ @@ -21,11 +21,11 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; @@ -35,10 +35,10 @@ function index($p=1,$o=0){ if(isset($_SESSION['subline'])) $data['subline'] = $_SESSION['subline']; else $data['subline'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->plan_garis_model->paging($p,$o); $data['main'] = $this->plan_garis_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->plan_garis_model->autocomplete(); @@ -46,19 +46,19 @@ function index($p=1,$o=0){ $data['list_subline'] = $this->plan_garis_model->list_subline(); $header= $this->header_model->get_data(); $nav['act']=1; - + $this->load->view('header-gis', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('garis/table',$data); $this->load->view('footer'); - + } function form($p=1,$o=0,$id=''){ $data['desa'] = $this->plan_garis_model->get_desa(); $data['list_line'] = $this->plan_garis_model->list_line(); $data['dusun'] = $this->plan_garis_model->list_dusun(); - + if($id){ $data['garis'] = $this->plan_garis_model->get_garis($id); $data['form_action'] = site_url("garis/update/$id/$p/$o"); @@ -68,14 +68,14 @@ function form($p=1,$o=0,$id=''){ $data['form_action'] = site_url("garis/insert"); } $header= $this->header_model->get_data(); - + $nav['act']=1; $this->load->view('header-gis', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('garis/form',$data); $this->load->view('footer'); - + } function ajax_garis_maps($p=1,$o=0,$id=''){ $data['p'] = $p; @@ -84,12 +84,12 @@ function ajax_garis_maps($p=1,$o=0,$id=''){ $data['garis'] = $this->plan_garis_model->get_garis($id); else $data['garis'] = null; - + $data['desa'] = $this->plan_garis_model->get_desa(); $data['form_action'] = site_url("garis/update_maps/$p/$o/$id"); $this->load->view("garis/maps", $data); } - + function update_maps($p=1,$o=0,$id=''){ $this->plan_garis_model->update_position($id); redirect("garis/index/$p/$o"); @@ -147,4 +147,4 @@ function garis_unlock($id=''){ $this->plan_garis_model->garis_lock($id,2); redirect("garis/index/$p/$o"); } -} \ No newline at end of file +} diff --git a/app/controllers/Gis.php b/app/controllers/Gis.php index 1e5f07171..6a772e540 100644 --- a/app/controllers/Gis.php +++ b/app/controllers/Gis.php @@ -2,20 +2,20 @@ class Gis extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); - - + + $this->load->model('penduduk_model'); $this->load->model('plan_lokasi_model'); $this->load->model('plan_area_model'); $this->load->model('plan_garis_model'); $this->load->model('header_model'); - + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1) redirect('siteman'); - - + + $this->load->database(); } function clear(){ @@ -52,28 +52,28 @@ function index(){ if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; if(isset($_SESSION['sex'])) $data['sex'] = $_SESSION['sex']; else $data['sex'] = ''; - + if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; @@ -82,33 +82,33 @@ function index(){ if(isset($_SESSION['agama'])) $data['agama'] = $_SESSION['agama']; else $data['agama'] = ''; - + if(isset($_SESSION['layer_penduduk'])) $data['layer_penduduk']=$_SESSION['layer_penduduk']; else $data['layer_penduduk']= 0; - + if(isset($_SESSION['layer_keluarga'])) $data['layer_keluarga']=$_SESSION['layer_keluarga']; else $data['layer_keluarga']= 0; - + if(isset($_SESSION['layer_desa'])) $data['layer_desa']=$_SESSION['layer_desa']; else $data['layer_desa']=0; - + if(isset($_SESSION['layer_wilayah'])) $data['layer_wilayah']=$_SESSION['layer_wilayah']; else $data['layer_wilayah']=0; - + if(isset($_SESSION['layer_area'])) $data['layer_area']=$_SESSION['layer_area']; else $data['layer_area']= 0; - + if(isset($_SESSION['layer_line'])) $data['layer_line']=$_SESSION['layer_line']; else $data['layer_line']=0; - + $data['layer_point']=@$_SESSION['layer_point']; - + $data['list_dusun'] = $this->penduduk_model->list_dusun(); $data['wilayah'] = $this->penduduk_model->list_wil(); $data['list_agama'] = $this->penduduk_model->list_agama(); @@ -120,11 +120,11 @@ function index(){ $data['penduduk'] = $this->penduduk_model->list_data_map(); $data['keyword'] = $this->penduduk_model->autocomplete(); $header = $this->header_model->get_data(); - + $this->load->view('gis/header', $header); $this->load->view('gis/maps',$data); $this->load->view('footer'); - + } function search(){ $cari = $this->input->post('cari'); @@ -252,7 +252,7 @@ function adv_search_proses(){ else $_SESSION[$col[$i]]=$adv_search[$col[$i]]; } - + redirect('gis'); } -} \ No newline at end of file +} diff --git a/app/controllers/Hom_desa.php b/app/controllers/Hom_desa.php index 70f27f5ee..5a0c9ff26 100644 --- a/app/controllers/Hom_desa.php +++ b/app/controllers/Hom_desa.php @@ -1,80 +1,80 @@ -load->model('user_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2) redirect('siteman'); - $this->load->model('header_model'); - $this->load->model('config_model'); - } - - function index(){ - $_SESSION['delik'] = 0; - $nav['act']= 0; - $header = $this->header_model->get_data(); - $data['main'] = $this->config_model->get_data(); - $this->load->view('header',$header); - $this->load->view('home/nav',$nav); - $this->load->view('home/konfigurasi_form',$data); - $this->load->view('footer'); - } - - function about(){ - $nav['act']= 2; - $header = $this->header_model->get_data(); - $this->load->view('header',$header); - $this->load->view('home/nav',$nav); - $this->load->view('home/desa'); - $this->load->view('footer'); - } - - function insert(){ - $this->config_model->insert(); - redirect('hom_desa'); - } - - function update($id=''){ - $this->config_model->update($id); - redirect("hom_desa"); - } - - function ajax_kantor_maps(){ - $data['desa'] = $this->config_model->get_data(); - $data['form_action'] = site_url("hom_desa/update_kantor_maps/"); - $this->load->view("home/ajax_kantor_desa_maps", $data); - } - - function ajax_wilayah_maps(){ - $data['desa'] = $this->config_model->get_data(); - $data['form_action'] = site_url("hom_desa/update_wilayah_maps/"); - $this->load->view("home/ajax_wilayah_desa_maps", $data); - } - - function update_kantor_maps(){ - $this->config_model->update_kantor(); - redirect("hom_desa"); - } - - function update_wilayah_maps(){ - $this->config_model->update_wilayah(); - redirect("hom_desa"); - } - - function kosong_pend(){ - $this->config_model->kosong_pend(); - redirect("hom_desa"); - } - - function undelik(){ - if(isset($_SESSION['delik'])){ - unset($_SESSION['delik']); - } - redirect("analisis_master/clear"); - } - -} +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2) redirect('siteman'); + $this->load->model('header_model'); + $this->load->model('config_model'); + } + + function index(){ + $_SESSION['delik'] = 0; + $nav['act']= 0; + $header = $this->header_model->get_data(); + $data['main'] = $this->config_model->get_data(); + $this->load->view('header',$header); + $this->load->view('home/nav',$nav); + $this->load->view('home/konfigurasi_form',$data); + $this->load->view('footer'); + } + + function about(){ + $nav['act']= 2; + $header = $this->header_model->get_data(); + $this->load->view('header',$header); + $this->load->view('home/nav',$nav); + $this->load->view('home/desa'); + $this->load->view('footer'); + } + + function insert(){ + $this->config_model->insert(); + redirect('hom_desa'); + } + + function update($id=''){ + $this->config_model->update($id); + redirect("hom_desa"); + } + + function ajax_kantor_maps(){ + $data['desa'] = $this->config_model->get_data(); + $data['form_action'] = site_url("hom_desa/update_kantor_maps/"); + $this->load->view("home/ajax_kantor_desa_maps", $data); + } + + function ajax_wilayah_maps(){ + $data['desa'] = $this->config_model->get_data(); + $data['form_action'] = site_url("hom_desa/update_wilayah_maps/"); + $this->load->view("home/ajax_wilayah_desa_maps", $data); + } + + function update_kantor_maps(){ + $this->config_model->update_kantor(); + redirect("hom_desa"); + } + + function update_wilayah_maps(){ + $this->config_model->update_wilayah(); + redirect("hom_desa"); + } + + function kosong_pend(){ + $this->config_model->kosong_pend(); + redirect("hom_desa"); + } + + function undelik(){ + if(isset($_SESSION['delik'])){ + unset($_SESSION['delik']); + } + redirect("analisis_master/clear"); + } + +} diff --git a/app/controllers/Kategori.php b/app/controllers/Kategori.php index d4770c47d..98876fd6b 100644 --- a/app/controllers/Kategori.php +++ b/app/controllers/Kategori.php @@ -2,7 +2,7 @@ class kategori extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); @@ -18,24 +18,24 @@ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; $data['tip'] = 2; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->web_kategori_model->paging($p,$o); $data['main'] = $this->web_kategori_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->web_kategori_model->autocomplete(); $header = $this->header_model->get_data(); $nav['act']=7; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('kategori/table',$data); @@ -52,7 +52,7 @@ function form($id=''){ $data['form_action'] = site_url("kategori/insert"); } $header = $this->header_model->get_data(); - + $nav['act']=7; $this->load->view('header', $header); $this->load->view('web/nav',$nav); @@ -62,10 +62,10 @@ function form($id=''){ function sub_kategori($kategori=1){ $data['tip'] = 2; $data['subkategori'] = $this->web_kategori_model->list_sub_kategori($kategori); - $data['kategori'] = $kategori; + $data['kategori'] = $kategori; $header = $this->header_model->get_data(); $nav['act']=7; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('kategori/sub_kategori_table',$data); @@ -73,9 +73,9 @@ function sub_kategori($kategori=1){ } function ajax_add_sub_kategori($kategori='',$id=''){ $data['kategori'] = $kategori; - + $data['link'] = $this->web_kategori_model->list_link(); - + if($id){ $data['subkategori'] = $this->web_kategori_model->get_kategori($id); $data['form_action'] = site_url("kategori/update_sub_kategori/$kategori/$id"); @@ -123,7 +123,7 @@ function kategori_lock($id=''){ function kategori_unlock($id=''){ $this->web_kategori_model->kategori_lock($id,2); redirect("kategori/index/$p/$o"); - } + } function insert_sub_kategori($kategori=''){ $this->web_kategori_model->insert_sub_kategori($kategori); redirect("kategori/sub_kategori/$kategori"); @@ -148,4 +148,4 @@ function kategori_unlock_sub_kategori($kategori='',$id=''){ $this->web_kategori_model->kategori_lock($id,2); redirect("kategori/sub_kategori/$kategori"); } -} \ No newline at end of file +} diff --git a/app/controllers/Kelompok.php b/app/controllers/Kelompok.php index 34c31335e..870bea6e9 100644 --- a/app/controllers/Kelompok.php +++ b/app/controllers/Kelompok.php @@ -2,7 +2,7 @@ class kelompok extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('kelompok_model'); $this->load->model('user_model'); $this->load->model('header_model'); @@ -19,30 +19,30 @@ function index($p=1,$o=0){ unset($_SESSION['kelompok']); $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; if(isset($_SESSION['state'])) $data['state'] = $_SESSION['state']; else $data['state'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->kelompok_model->paging($p,$o); $data['main'] = $this->kelompok_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->kelompok_model->autocomplete(); $data['list_master'] = $this->kelompok_model->list_master(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $nav['act']= 4; - + $this->load->view('sid/nav',$nav); $this->load->view('kelompok/table',$data); $this->load->view('footer'); @@ -52,10 +52,10 @@ function anggota($id=0){ $data['kelompok'] = $this->kelompok_model->get_kelompok($id); $data['main'] = $this->kelompok_model->list_anggota($id); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $nav['act']= 4; - + $this->load->view('sid/nav',$nav); $this->load->view('kelompok/anggota/table',$data); $this->load->view('footer'); @@ -63,24 +63,24 @@ function anggota($id=0){ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['kelompok'] = $this->kelompok_model->get_kelompok($id); $data['form_action'] = site_url("kelompok/update/$p/$o/$id"); } - + else{ $data['kelompok'] = null; $data['form_action'] = site_url("kelompok/insert"); } - + $data['list_master'] = $this->kelompok_model->list_master(); $data['list_penduduk'] = $this->kelompok_model->list_penduduk(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $nav['act']= 4; - + $this->load->view('sid/nav',$nav); $this->load->view('kelompok/form',$data); $this->load->view('footer'); @@ -91,7 +91,7 @@ function form_anggota($id=0,$id_a=0){ $data['pend'] = null; $data['form_action'] = site_url("kelompok/insert_a/$id"); }else{ - + $data['kelompok'] = $id; $data['pend'] = $this->kelompok_model->get_anggota($id,$id_a); $data['form_action'] = site_url("kelompok/update_a/$id/$id_a"); @@ -99,59 +99,59 @@ function form_anggota($id=0,$id_a=0){ } $data['list_penduduk'] = $this->kelompok_model->list_penduduk(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $nav['act']= 4; - + $this->load->view('sid/nav',$nav); $this->load->view('kelompok/anggota/form',$data); $this->load->view('footer'); } function panduan(){ $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('kelompok/nav2'); $this->load->view('kelompok/panduan'); $this->load->view('footer'); } - + function cetak(){ $data['header'] = $this->header_model->get_data(); $data['main'] = $this->kelompok_model->list_data(); - + $this->load->view('kelompok/cetak',$data); } - + function excel(){ $data['header'] = $this->header_model->get_data(); $data['main'] = $this->kelompok_model->list_data(); - + $this->load->view('kelompok/excel',$data); } - + function cetak_a($id=0){ $data['header'] = $this->header_model->get_data(); $data['main'] = $this->kelompok_model->list_anggota($id); $data['kelompok'] = $this->kelompok_model->get_kelompok($id); - + $this->load->view('kelompok/anggota/cetak',$data); } - + function excel_a($id=0){ $data['header'] = $this->header_model->get_data(); $data['main'] = $this->kelompok_model->list_anggota($id); $data['kelompok'] = $this->kelompok_model->get_kelompok($id); - + $this->load->view('kelompok/anggota/excel',$data); } - + function menu($id=''){ $_SESSION['kelompok']=$id; $data['kelompok'] = $this->kelompok_model->get_kelompok($id); $da = $data['kelompok']; $master = $da['master_tipe']; - + switch($master){ case 1: $data['menu_respon'] = "kelompok_respon_penduduk"; break; case 2: $data['menu_respon'] = "kelompok_respon_keluarga"; break; @@ -159,9 +159,9 @@ function menu($id=''){ case 4: $data['menu_respon'] = "kelompok_respon_kelompok"; break; default:redirect('kelompok'); } - + $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('kelompok/nav'); $this->load->view('kelompok/menu',$data); @@ -216,7 +216,7 @@ function delete_a($id='',$a=0){ $this->kelompok_model->delete_a($a); redirect("kelompok/anggota/$id"); } - + function to_master($id=0){ $filter = $id; if($filter!=0) @@ -224,4 +224,4 @@ function to_master($id=0){ else unset($_SESSION['filter']); redirect('kelompok'); } -} \ No newline at end of file +} diff --git a/app/controllers/Kelompok_master.php b/app/controllers/Kelompok_master.php index 2afdd042a..988a69666 100644 --- a/app/controllers/Kelompok_master.php +++ b/app/controllers/Kelompok_master.php @@ -2,7 +2,7 @@ class kelompok_master extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('kelompok_master_model'); $this->load->model('user_model'); $this->load->model('header_model'); @@ -19,30 +19,30 @@ function index($p=1,$o=0){ unset($_SESSION['kelompok_master']); $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; if(isset($_SESSION['state'])) $data['state'] = $_SESSION['state']; else $data['state'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->kelompok_master_model->paging($p,$o); $data['main'] = $this->kelompok_master_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->kelompok_master_model->autocomplete(); - + $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $nav['act']= 4; - + $this->load->view('sid/nav',$nav); $this->load->view('kelompok_master/table',$data); $this->load->view('footer'); @@ -50,22 +50,22 @@ function index($p=1,$o=0){ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['kelompok_master'] = $this->kelompok_master_model->get_kelompok_master($id); $data['form_action'] = site_url("kelompok_master/update/$p/$o/$id"); } - + else{ $data['kelompok_master'] = null; $data['form_action'] = site_url("kelompok_master/insert"); } - + $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $nav['act']= 4; - + $this->load->view('sid/nav',$nav); $this->load->view('kelompok_master/form',$data); $this->load->view('footer'); @@ -107,4 +107,4 @@ function delete_all($p=1,$o=0){ $this->kelompok_master_model->delete_all(); redirect("kelompok_master/index/$p/$o"); } -} \ No newline at end of file +} diff --git a/app/controllers/Keluar.php b/app/controllers/Keluar.php index aaa8cc2c8..7c1d17f3a 100644 --- a/app/controllers/Keluar.php +++ b/app/controllers/Keluar.php @@ -2,14 +2,14 @@ class Keluar extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $this->load->model('surat_keluar_model'); $this->load->model('surat_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); $this->load->model('header_model'); - + } function clear(){ unset($_SESSION['cari']); @@ -34,7 +34,7 @@ function index($p=1,$o=0){ $header = $this->header_model->get_data(); $nav['act']= 2; $this->load->view('header', $header); - + $this->load->view('surat/nav',$nav); $this->load->view('surat/surat_keluar',$data); $this->load->view('footer'); @@ -48,7 +48,7 @@ function search(){ } function perorangan($nik=0,$p=1,$o=0){ if(isset($_POST['nik'])){ - + $nik=$_POST['nik']; } if($nik<>0){ @@ -69,7 +69,7 @@ function perorangan($nik=0,$p=1,$o=0){ $nav['act']= 2; $header = $this->header_model->get_data(); $this->load->view('header',$header); - + $this->load->view('surat/nav',$nav); $this->load->view('surat/surat_keluar_perorangan',$data); $this->load->view('footer'); @@ -80,7 +80,7 @@ function graph(){ $header = $this->header_model->get_data(); $data['stat'] = $this->surat_keluar_model->grafik(); $this->load->view('header',$header); - + $this->load->view('surat/nav',$nav); $this->load->view('surat/surat_keluar_graph',$data); $this->load->view('footer'); @@ -99,4 +99,4 @@ function nik(){ else unset($_SESSION['nik']); redirect('keluar/perorangan'); } -} \ No newline at end of file +} diff --git a/app/controllers/Keluarga.php b/app/controllers/Keluarga.php index 8facd4023..22e7c451c 100644 --- a/app/controllers/Keluarga.php +++ b/app/controllers/Keluarga.php @@ -2,7 +2,7 @@ class Keluarga extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $this->load->model('keluarga_model'); $this->load->model('penduduk_model'); @@ -29,11 +29,11 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; @@ -46,39 +46,39 @@ function index($p=1,$o=0){ if(isset($_SESSION['id_blt'])) $data['id_blt'] = $_SESSION['id_blt']; else $data['id_blt'] = ''; - + if(isset($_SESSION['id_bos'])) $data['id_bos'] = $_SESSION['id_bos']; else $data['id_bos'] = ''; - + if(isset($_SESSION['id_pkh'])) $data['id_pkh'] = $_SESSION['id_pkh']; else $data['id_pkh'] = ''; - + if(isset($_SESSION['id_jampersal'])) $data['id_jampersal'] = $_SESSION['id_jampersal']; else $data['id_jampersal'] = ''; if(isset($_SESSION['id_bedah_rumah'])) $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; else $data['id_bedah_rumah'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; @@ -89,7 +89,7 @@ function index($p=1,$o=0){ $data['main'] = $this->keluarga_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->keluarga_model->autocomplete(); $data['list_dusun'] = $this->penduduk_model->list_dusun(); - + $nav['act']= 1; $header = $this->header_model->get_data(); $this->load->view('header',$header); @@ -100,58 +100,58 @@ function index($p=1,$o=0){ function sosial($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; if(isset($_SESSION['raskin'])) $data['raskin'] = $_SESSION['raskin']; else $data['raskin'] = ''; - + if(isset($_SESSION['id_blt'])) $data['id_blt'] = $_SESSION['id_blt']; else $data['id_blt'] = ''; if(isset($_SESSION['id_pkh'])) $data['id_pkh'] = $_SESSION['id_pkh']; - else $data['id_pkh'] = ''; + else $data['id_pkh'] = ''; if(isset($_SESSION['id_bos'])) $data['id_bos'] = $_SESSION['id_bos']; else $data['id_bos'] = ''; - + if(isset($_SESSION['id_jampersal'])) $data['id_jampersal'] = $_SESSION['id_jampersal']; else $data['id_jampersal'] = ''; if(isset($_SESSION['id_bedah_rumah'])) $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; else $data['id_bedah_rumah'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; $data['rt'] = ''; } - + $data['paging'] = $this->keluarga_model->paging($p,$o); $data['main'] = $this->keluarga_model->list_raskin(); $data['keyword'] = $this->keluarga_model->autocomplete(); @@ -162,15 +162,15 @@ function sosial($p=1,$o=0){ $this->load->view('sid/nav',$nav); $this->load->view('sid/kependudukan/keluarga_sosial',$data); $this->load->view('footer'); - } + } function raskin_graph($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; @@ -192,30 +192,30 @@ function raskin_graph($p=1,$o=0){ if(isset($_SESSION['id_bedah_rumah'])) $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; else $data['id_bedah_rumah'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; $data['rt'] = ''; } - + $data['paging'] = $this->keluarga_model->paging($p,$o); $data['main'] = $this->keluarga_model->list_raskin(); $data['keyword'] = $this->keluarga_model->autocomplete(); @@ -226,16 +226,16 @@ function raskin_graph($p=1,$o=0){ $this->load->view('sid/nav',$nav); $this->load->view('sid/kependudukan/keluarga_raskin',$data); $this->load->view('footer'); - } - + } + function jamkesmas_graph($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; @@ -257,30 +257,30 @@ function jamkesmas_graph($p=1,$o=0){ if(isset($_SESSION['id_bedah_rumah'])) $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; else $data['id_bedah_rumah'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; $data['rt'] = ''; } - + $data['paging'] = $this->keluarga_model->paging($p,$o); $data['main'] = $this->keluarga_model->list_raskin(); $data['keyword'] = $this->keluarga_model->autocomplete(); @@ -291,11 +291,11 @@ function jamkesmas_graph($p=1,$o=0){ $this->load->view('sid/nav',$nav); $this->load->view('sid/kependudukan/keluarga_jamkesmas',$data); $this->load->view('footer'); - } + } function pentagon(){ $data['main'] = $this->keluarga_model->list_raskin(); $this->load->view('sid/kependudukan/pentagon/pentagon',$data); - } + } function cetak($o=0){ $data['main'] = $this->keluarga_model->list_data($o, 0, 10000); $this->load->view('sid/kependudukan/keluarga_print',$data); @@ -304,27 +304,27 @@ function excel($o=0){ $data['main'] = $this->keluarga_model->list_data($o, 0, 10000); $this->load->view('sid/kependudukan/keluarga_excel',$data); } - + function form($p=1,$o=0,$id=0,$new=1){ - + if($new==1){ - + if(isset($_POST['dusun'])){ $data['dus_sel'] = $_POST['dusun']; }else $data['dus_sel'] = ''; - + if(isset($_POST['rw'])){ $data['rw_sel'] = $_POST['rw']; - + }else $data['rw_sel'] = ''; - + if(isset($_POST['rt'])) $data['rt_sel'] = $_POST['rt']; else $data['rt_sel'] = ''; - + $data['new'] = $new; }else{ $data['new'] = 0; @@ -332,23 +332,23 @@ function form($p=1,$o=0,$id=0,$new=1){ $data['rw_sel'] = ''; $data['rt_sel'] = ''; } - + if($id > 0){ $data['kk'] = $this->keluarga_model->get_keluarga($id); $data['form_action'] = site_url("keluarga/update/$id"); }elseif($new>0){ $data['kk'] = null; $data['form_action'] = site_url("keluarga/insert_new"); - + }else{ $data['kk'] = null; $data['form_action'] = site_url("keluarga/insert"); } - + $data['penduduk'] = $this->keluarga_model->list_penduduk_lepas(); - + $nav['act']= 1; - + $data['list_no_kk'] = $this->keluarga_model->duplikasi(); $data['dusun'] = $this->penduduk_model->list_dusun(); $data['rw'] = $this->penduduk_model->list_rw($data['dus_sel']); @@ -362,23 +362,23 @@ function form($p=1,$o=0,$id=0,$new=1){ $data['kawin'] = $this->penduduk_model->list_status_kawin(); $data['golongan_darah'] = $this->penduduk_model->list_golongan_darah(); $data['cacat'] = $this->penduduk_model->list_cacat(); - - + + $header = $this->header_model->get_data(); $this->load->view('header',$header); $this->load->view('sid/nav',$nav); $this->load->view('sid/kependudukan/keluarga_form',$data); $this->load->view('footer'); } - + function form_a($p=1,$o=0, $id=0){ - + $data['id_kk'] = $id; $data['kk'] = $this->keluarga_model->get_kepala_a($id); $data['form_action'] = site_url("keluarga/insert_a"); - + $nav['act']= 2; - + $data['agama'] = $this->penduduk_model->list_agama(); $data['pendidikan_kk'] = $this->penduduk_model->list_pendidikan_kk(); $data['pendidikan'] = $this->penduduk_model->list_pendidikan(); @@ -388,8 +388,8 @@ function form_a($p=1,$o=0, $id=0){ $data['kawin'] = $this->penduduk_model->list_status_kawin(); $data['golongan_darah'] = $this->penduduk_model->list_golongan_darah(); $data['cacat'] = $this->penduduk_model->list_cacat(); - - + + $header = $this->header_model->get_data(); $this->load->view('header',$header); $this->load->view('sid/nav',$nav); @@ -400,13 +400,13 @@ function edit_nokk($p=1,$o=0,$id=0){ $data['kk'] = $this->keluarga_model->get_keluarga($id); $data['form_action'] = site_url("keluarga/update_nokk/$id"); $this->load->view('sid/kependudukan/ajax_edit_nokk',$data); - + } function form_old($p=1,$o=0,$id=0){ $data['penduduk'] = $this->keluarga_model->list_penduduk_lepas(); $data['form_action'] = site_url("keluarga/insert/$id"); $this->load->view('sid/kependudukan/ajax_add_keluarga',$data); - + } function dusun($s=0){ $dusun = $this->input->post('dusun'); @@ -419,7 +419,7 @@ function dusun($s=0){ } redirect('keluarga'); } - + function rw($s=0){ $rw = $this->input->post('rw'); if($rw!="") @@ -485,16 +485,16 @@ function insert(){ } function insert_a(){ $data = $this->keluarga_model->dn(); - + $i=0; $dp=0; $link = site_url()."keluarga"; while($ikeluarga_model->dp(); - + $i=0; $dp=0; $link = site_url()."keluarga/form/0/1"; while($ikeluarga_model->delete_all(); redirect('keluarga'); - } + } function anggota($p=1,$o=0,$id=0){ $data['p'] = $p; $data['o'] = $o; $data['kk'] = $id; - + $data['main'] = $this->keluarga_model->list_anggota($id); $data['kepala_kk']= $this->keluarga_model->get_kepala_kk($id); $nav['act']= 1; @@ -560,7 +560,7 @@ function anggota($p=1,$o=0,$id=0){ $this->load->view('sid/kependudukan/keluarga_anggota',$data); $this->load->view('footer'); } - + function ajax_add_anggota($p=1,$o=0,$id=0){ $data['p'] = $p; $data['o'] = $o; @@ -572,26 +572,26 @@ function ajax_add_anggota($p=1,$o=0,$id=0){ else $data['kepala_kk'] = NULL; $data['penduduk'] = $this->keluarga_model->list_penduduk_lepas(); - + $data['form_action'] = site_url("keluarga/add_anggota/$p/$o/$id"); - + $this->load->view("sid/kependudukan/ajax_add_anggota_form", $data); } - + function edit_anggota($p=1,$o=0,$id_kk=0,$id=0){ $data['p'] = $p; $data['o'] = $o; $data['hubungan'] = $this->keluarga_model->list_hubungan(); $data['main'] = $this->keluarga_model->get_anggota($id); - + $kk = $this->keluarga_model->get_kepala_kk($id); if($kk) $data['kepala_kk'] = $kk; else $data['kepala_kk'] = NULL; - + $data['form_action'] = site_url("keluarga/update_anggota/$p/$o/$id_kk/$id"); - + $this->load->view("sid/kependudukan/ajax_edit_anggota_form", $data); } function kartu_keluarga($p=1,$o=0,$id=0){ @@ -602,25 +602,25 @@ function kartu_keluarga($p=1,$o=0,$id=0){ $data['main'] = $this->keluarga_model->list_anggota($id); $kk = $this->keluarga_model->get_kepala_kk($id); $data['desa'] = $this->keluarga_model->get_desa(); - + if($kk) $data['kepala_kk'] = $kk; - + else $data['kepala_kk'] = NULL; - + $data['penduduk'] = $this->keluarga_model->list_penduduk_lepas(); $nav['act']= 1; $header = $this->header_model->get_data(); $this->load->view('header',$header); $this->load->view('sid/nav',$nav); $data['form_action'] = site_url("keluarga/print"); - + $this->load->view("sid/kependudukan/kartu_keluarga", $data); $this->load->view('footer'); - + } - + function cetak_kk($id=0){ $data['id_kk'] = $id; $data['main'] = $this->keluarga_model->list_anggota($id); @@ -630,29 +630,29 @@ function cetak_kk($id=0){ $nav['act']= 1; $header = $this->header_model->get_data(); $this->load->view("sid/kependudukan/cetak_kk", $data); - + } - + function doc_kk($id=0){ $data['desa'] = $this->keluarga_model->get_desa(); - + $data['id_kk'] = $id; $data['main'] = $this->keluarga_model->list_anggota($id); $data['kepala_kk']= $this->keluarga_model->get_kepala_kk($id); - + $this->keluarga_model->coba($data); } - + function coba2($id=0){ - - - - - - + + + + + + $this->keluarga_model->coba2(); } - + function add_anggota($p=1,$o=0,$id=0){ $this->keluarga_model->add_anggota($id); redirect("keluarga/anggota/$p/$o/$id"); @@ -668,7 +668,7 @@ function delete_anggota($p=1,$o=0,$kk=0,$id=''){ function delete_all_anggota($p=1,$o=0,$kk=0){ $this->keluarga_model->rem_all_anggota($kk); redirect("keluarga/anggota/$p/$o/$kk"); - } + } function pindah_proses($id=0){ $id_cluster = $_POST['id_cluster']; $this->keluarga_model->pindah_proses($id,$id_cluster); @@ -676,13 +676,13 @@ function pindah_proses($id=0){ } function ajax_penduduk_pindah($id=0){ $data['dusun'] = $this->penduduk_model->list_dusun(); - + $data['form_action'] = site_url("keluarga/pindah_proses/$id"); $this->load->view('sid/kependudukan/ajax_pindah_form',$data); } function ajax_penduduk_pindah_rw($dusun=''){ $rw = $this->penduduk_model->list_rw($dusun); - + echo"RW "; @@ -709,7 +709,7 @@ function statistik($tipe=0,$nomor=0,$p=1,$o=0){ if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; @@ -719,53 +719,53 @@ function statistik($tipe=0,$nomor=0,$p=1,$o=0){ if(isset($_SESSION['id_blt'])) $data['id_blt'] = $_SESSION['id_blt']; else $data['id_blt'] = ''; - + if(isset($_SESSION['id_bos'])) $data['id_bos'] = $_SESSION['id_bos']; else $data['id_bos'] = ''; - + if(isset($_SESSION['id_pkh'])) $data['id_pkh'] = $_SESSION['id_pkh']; else $data['id_pkh'] = ''; - + if(isset($_SESSION['id_jampersal'])) $data['id_jampersal'] = $_SESSION['id_jampersal']; else $data['id_jampersal'] = ''; if(isset($_SESSION['id_bedah_rumah'])) $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; else $data['id_bedah_rumah'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; $data['rt'] = ''; } switch($tipe){ - + case 21: $_SESSION['kelas'] = $nomor; $pre="KELAS SOSIAL : ";break; - case 22: $_SESSION['raskin'] = $nomor; $pre="RASKIN : ";break; + case 22: $_SESSION['raskin'] = $nomor; $pre="RASKIN : ";break; case 23: $_SESSION['id_blt'] = $nomor; $pre="BLT : ";break; case 24: $_SESSION['id_bos'] = $nomor; $pre="BOS : ";break; case 25: $_SESSION['id_pkh'] = $nomor; $pre="PKH : ";break; case 26: $_SESSION['id_jampersal'] = $nomor; $pre="JAMPERSAL : ";break; - case 27: $_SESSION['id_bedah_rumah'] = $nomor;$pre="BEDAH RUMAH : "; break; + case 27: $_SESSION['id_bedah_rumah'] = $nomor;$pre="BEDAH RUMAH : "; break; } $data['grup'] = $this->user_model->sesi_grup($_SESSION['sesi']); $data['paging'] = $this->keluarga_model->paging_statistik($p,$o); @@ -790,4 +790,4 @@ function cetak_statistik($tipe=0){ $data['main'] = $this->keluarga_model->list_data_statistik($tipe); $this->load->view('sid/kependudukan/keluarga_print',$data); } -} \ No newline at end of file +} diff --git a/app/controllers/Komentar.php b/app/controllers/Komentar.php index e96f196cb..db2aa0991 100644 --- a/app/controllers/Komentar.php +++ b/app/controllers/Komentar.php @@ -2,7 +2,7 @@ class komentar extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); @@ -17,24 +17,24 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->web_komentar_model->paging($p,$o); $data['main'] = $this->web_komentar_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->web_komentar_model->autocomplete(); $header = $this->header_model->get_data(); $nav['act']=2; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('komentar/table',$data); @@ -43,7 +43,7 @@ function index($p=1,$o=0){ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['komentar'] = $this->web_komentar_model->get_komentar($id); $data['form_action'] = site_url("komentar/update/$id/$p/$o"); @@ -52,11 +52,11 @@ function form($p=1,$o=0,$id=''){ $data['komentar'] = null; $data['form_action'] = site_url("komentar/insert"); } - + $data['list_kategori'] = $this->web_komentar_model->list_kategori(1); - + $header = $this->header_model->get_data(); - + $nav['act']=2; $this->load->view('header', $header); $this->load->view('web/spacer'); @@ -102,4 +102,4 @@ function komentar_unlock($id=''){ $this->web_komentar_model->komentar_lock($id,2); redirect("komentar/index/$p/$o"); } -} \ No newline at end of file +} diff --git a/app/controllers/Lapor.php b/app/controllers/Lapor.php index 9cf9991a2..182ef1a8c 100644 --- a/app/controllers/Lapor.php +++ b/app/controllers/Lapor.php @@ -2,7 +2,7 @@ class lapor extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); @@ -17,24 +17,24 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->web_komentar_model->paging($p,$o); $data['main'] = $this->web_komentar_model->list_data($o, $data['paging']->offset, $data['paging']->per_page,2); $data['keyword'] = $this->web_komentar_model->autocomplete(); $header = $this->header_model->get_data(); $nav['act']=0; - + $this->load->view('header', $header); $this->load->view('lapor/nav',$nav); $this->load->view('lapor/table',$data); @@ -43,7 +43,7 @@ function index($p=1,$o=0){ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['komentar'] = $this->web_komentar_model->get_komentar($id); $data['form_action'] = site_url("komentar/update/$id/$p/$o"); @@ -52,11 +52,11 @@ function form($p=1,$o=0,$id=''){ $data['komentar'] = null; $data['form_action'] = site_url("komentar/insert"); } - + $data['list_kategori'] = $this->web_komentar_model->list_kategori(1); - + $header = $this->header_model->get_data(); - + $nav['act']=2; $this->load->view('header', $header); $this->load->view('web/spacer'); @@ -102,4 +102,4 @@ function komentar_unlock($id=''){ $this->web_komentar_model->komentar_lock($id,2); redirect("lapor/index/$p/$o"); } -} \ No newline at end of file +} diff --git a/app/controllers/Laporan.php b/app/controllers/Laporan.php index bf826e57c..ef27bd00e 100644 --- a/app/controllers/Laporan.php +++ b/app/controllers/Laporan.php @@ -2,19 +2,19 @@ class Laporan extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $this->load->model('laporan_bulanan_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); $this->load->model('header_model'); - + $_SESSION['success'] = 0; $_SESSION['cari'] = ''; - + $this->load->model('header_model'); } - + function clear(){ unset($_SESSION['cari']); unset($_SESSION['filter']); @@ -40,15 +40,15 @@ function index($lap=0,$p=1,$o=0){ if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + if(isset($_SESSION['bulanku'])) $data['bulanku'] = $_SESSION['bulanku']; - else $data['bulanku'] = date("n"); - + else $data['bulanku'] = date("n"); + if(isset($_SESSION['tahunku'])) $data['tahunku'] = $_SESSION['tahunku']; - else $data['tahunku'] = date("Y"); - + else $data['tahunku'] = date("Y"); + $data['bulan']=$data['bulanku']; $data['tahun']=$data['tahunku']; $data['config'] = $this->laporan_bulanan_model->configku(); @@ -66,8 +66,8 @@ function index($lap=0,$p=1,$o=0){ $this->load->view('statistik/nav',$nav); $this->load->view('laporan/bulanan',$data); $this->load->view('footer'); - - + + } function cetak($lap=0){ $data['config'] = $this->laporan_bulanan_model->configku(); @@ -98,17 +98,17 @@ function excel($lap=0){ $data['hilang'] = $this->laporan_bulanan_model->hilang(); $data['lap']=$lap; $this->load->view('statistik/laporan/bulanan_excel',$data); - } + } function bulan(){ $bulanku= $this->input->post('bulan'); if($bulanku!="") $_SESSION['bulanku']=$bulanku; else unset($_SESSION['bulanku']); - + $tahunku= $this->input->post('tahun'); if($tahunku!="") $_SESSION['tahunku']=$tahunku; else unset($_SESSION['tahunku']); redirect('laporan'); } -} \ No newline at end of file +} diff --git a/app/controllers/Laporan_rentan.php b/app/controllers/Laporan_rentan.php index 86092a57e..123af2795 100644 --- a/app/controllers/Laporan_rentan.php +++ b/app/controllers/Laporan_rentan.php @@ -2,19 +2,19 @@ class Laporan_Rentan extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $this->load->model('laporan_bulanan_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); $this->load->model('header_model'); - - + + $_SESSION['success'] = 0; $_SESSION['per_page'] = 20; $_SESSION['cari'] = ''; - - + + $this->load->model('header_model'); } function clear(){ @@ -28,13 +28,13 @@ function clear(){ function index(){ if(isset($_SESSION['dusun'])) $data['dusun'] = $_SESSION['dusun']; - else $data['dusun'] = ''; - + else $data['dusun'] = ''; + $data['list_dusun'] = $this->laporan_bulanan_model->list_dusun(); $data['config'] = $this->laporan_bulanan_model->configku(); - + $data['main'] = $this->laporan_bulanan_model->list_data(); - + $nav['act']= 2; $header = $this->header_model->get_data(); $this->load->view('header',$header); @@ -42,7 +42,7 @@ function index(){ $this->load->view('laporan/kelompok',$data); $this->load->view('footer'); } - + function cetak(){ $data['config'] = $this->laporan_bulanan_model->configku(); $data['main'] = $this->laporan_bulanan_model->list_data(); @@ -53,7 +53,7 @@ function excel(){ $data['main'] = $this->laporan_bulanan_model->list_data(); $this->load->view('laporan/kelompok_excel',$data); } - + function dusun(){ $dusun = $this->input->post('dusun'); if($dusun!="") @@ -61,4 +61,4 @@ function dusun(){ else unset($_SESSION['dusun']); redirect('laporan_rentan'); } -} \ No newline at end of file +} diff --git a/app/controllers/Line.php b/app/controllers/Line.php index 22bb4aab8..5ee0edb5c 100644 --- a/app/controllers/Line.php +++ b/app/controllers/Line.php @@ -2,15 +2,15 @@ class line extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); - + $this->load->model('header_model'); $this->load->model('plan_line_model'); - - + + $this->load->database(); - + } function clear(){ unset($_SESSION['cari']); @@ -20,37 +20,37 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->plan_line_model->paging($p,$o); $data['main'] = $this->plan_line_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->plan_line_model->autocomplete(); $header = $this->header_model->get_data(); $nav['act']=2; - + $this->load->view('header-gis', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('line/table',$data); $this->load->view('footer'); - + } function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - - - + + + if($id){ $data['line'] = $this->plan_line_model->get_line($id); $data['form_action'] = site_url("line/update/$id/$p/$o"); @@ -60,33 +60,33 @@ function form($p=1,$o=0,$id=''){ $data['form_action'] = site_url("line/insert"); } $header= $this->header_model->get_data(); - + $nav['act']=2; $this->load->view('header-gis', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('line/form',$data); $this->load->view('footer'); - + } function sub_line($line=1){ $data['subline'] = $this->plan_line_model->list_sub_line($line); - $data['line'] = $line; + $data['line'] = $line; $header= $this->header_model->get_data(); $nav['act']=2; - + $this->load->view('header-gis', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('line/sub_line_table',$data); $this->load->view('footer'); - + } function ajax_add_sub_line($line=0,$id=0){ - - - - + + + + if($id){ $data['line'] = $this->plan_line_model->get_line($id); $data['form_action'] = site_url("line/update_sub_line/$line/$id"); @@ -134,7 +134,7 @@ function line_lock($id=''){ function line_unlock($id=''){ $this->plan_line_model->line_lock($id,2); redirect("line/index/$p/$o"); - } + } function insert_sub_line($line=''){ $this->plan_line_model->insert_sub_line($line); redirect("line/sub_line/$line"); @@ -159,4 +159,4 @@ function line_unlock_sub_line($line='',$id=''){ $this->plan_line_model->line_lock($id,2); redirect("line/sub_line/$line"); } -} \ No newline at end of file +} diff --git a/app/controllers/Main.php b/app/controllers/Main.php index 9939e152c..14de1f706 100644 --- a/app/controllers/Main.php +++ b/app/controllers/Main.php @@ -2,7 +2,7 @@ class Main extends CI_Controller { function __construct(){ parent::__construct(); - session_start(); + $this->load->model('header_model'); $this->load->model('user_model'); $this->load->model('config_model'); @@ -33,11 +33,11 @@ function initial(){ $this->load->view('install'); } function install(){ - $out = $this->config_model->initial(); + $out = $this->config_model->initial(); $this->load->view('init',$out); } function init($out=null){ - $this->load->view('init',$out); + $this->load->view('init',$out); } function auth(){ $this->user_model->login(); @@ -50,4 +50,4 @@ function logout(){ $header = $this->header_model->get_config(); $this->load->view('siteman',$header); } -} \ No newline at end of file +} diff --git a/app/controllers/Man_user.php b/app/controllers/Man_user.php index 58b9bdb12..be864f72c 100644 --- a/app/controllers/Man_user.php +++ b/app/controllers/Man_user.php @@ -2,7 +2,7 @@ class Man_User extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $this->load->model('header_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); @@ -16,24 +16,24 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->user_model->paging($p,$o); $data['main'] = $this->user_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->user_model->autocomplete(); $header = $this->header_model->get_data(); $menu['act']='man_user'; - + $this->load->view('header', $header); $this->load->view('man_user/nav'); $this->load->view('man_user/manajemen_user_table',$data); @@ -42,20 +42,20 @@ function index($p=1,$o=0){ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['user'] = $this->user_model->get_user($id); $data['form_action'] = site_url("man_user/update/$p/$o/$id"); } - + else{ $data['user'] = null; $data['form_action'] = site_url("man_user/insert"); } - + $data['grup'] = $this->user_model->list_grup(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('man_user/nav'); $this->load->view('man_user/manajemen_user_form',$data); @@ -99,4 +99,4 @@ function user_unlock($id=''){ $this->user_model->user_lock($id,1); redirect("man_user/index/$p/$o"); } -} \ No newline at end of file +} diff --git a/app/controllers/Mandiri.php b/app/controllers/Mandiri.php index 656b0e75c..4a381f576 100644 --- a/app/controllers/Mandiri.php +++ b/app/controllers/Mandiri.php @@ -2,13 +2,13 @@ class mandiri extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $this->load->model('mandiri_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2) redirect('siteman'); $this->load->model('header_model'); - + } function clear(){ unset($_SESSION['cari']); @@ -30,12 +30,12 @@ function index($p=1,$o=0){ $data['paging'] = $this->mandiri_model->paging($p,$o); $data['main'] = $this->mandiri_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->mandiri_model->autocomplete(); - - + + $header = $this->header_model->get_data(); $nav['act']= 1; $this->load->view('header', $header); - + $this->load->view('lapor/nav',$nav); $this->load->view('mandiri/mandiri',$data); $this->load->view('footer'); @@ -44,7 +44,7 @@ function ajax_pin($p=1,$o=0,$id=0){ $data['penduduk'] = $this->mandiri_model->list_penduduk(); $data['form_action'] = site_url("mandiri/insert/$id"); $this->load->view('mandiri/ajax_pin',$data); - + } function search(){ $cari = $this->input->post('cari'); @@ -75,4 +75,4 @@ function insert(){ function ajax_pin_show($pin=""){ redirect('mandiri'); } -} \ No newline at end of file +} diff --git a/app/controllers/Menu.php b/app/controllers/Menu.php index f9e1c413f..c0b5e5d9f 100644 --- a/app/controllers/Menu.php +++ b/app/controllers/Menu.php @@ -2,7 +2,7 @@ class menu extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); @@ -18,24 +18,24 @@ function index($tip=1,$p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; $data['tip'] = $tip; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->web_menu_model->paging($tip,$p,$o); $data['main'] = $this->web_menu_model->list_data($tip,$o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->web_menu_model->autocomplete(); $header = $this->header_model->get_data(); $nav['act']=1; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('menu/table',$data); @@ -56,8 +56,8 @@ function form($tip=1,$id=''){ $data['form_action'] = site_url("menu/insert/$tip"); } $header = $this->header_model->get_data(); - $data['tip'] = $tip; - + $data['tip'] = $tip; + $nav['act']=1; $this->load->view('header', $header); $this->load->view('web/nav',$nav); @@ -66,11 +66,11 @@ function form($tip=1,$id=''){ } function sub_menu($tip=1,$menu=1){ $data['submenu'] = $this->web_menu_model->list_sub_menu($menu); - $data['tip'] = $tip; - $data['menu'] = $menu; + $data['tip'] = $tip; + $data['menu'] = $menu; $header = $this->header_model->get_data(); $nav['act']=1; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('menu/sub_menu_table',$data); @@ -79,9 +79,9 @@ function sub_menu($tip=1,$menu=1){ function ajax_add_sub_menu($tip=1,$menu='',$id=''){ $data['menu'] = $menu; $data['tip'] = $tip; - + $data['link'] = $this->web_menu_model->list_link(); - + if($id){ $data['submenu'] = $this->web_menu_model->get_menu($id); $data['form_action'] = site_url("menu/update_sub_menu/$tip/$menu/$id"); @@ -129,7 +129,7 @@ function menu_lock($tip=1,$id=''){ function menu_unlock($tip=1,$id=''){ $this->web_menu_model->menu_lock($id,2); redirect("menu/index/$tip/$p/$o"); - } + } function insert_sub_menu($tip=1,$menu=''){ $this->web_menu_model->insert_sub_menu($menu); redirect("menu/sub_menu/$tip/$menu"); @@ -154,4 +154,4 @@ function menu_unlock_sub_menu($tip=1,$menu='',$id=''){ $this->web_menu_model->menu_lock($id,2); redirect("menu/sub_menu/$tip/$menu"); } -} \ No newline at end of file +} diff --git a/app/controllers/Modul.php b/app/controllers/Modul.php index 33bd8a8ac..0a95a212a 100644 --- a/app/controllers/Modul.php +++ b/app/controllers/Modul.php @@ -2,25 +2,25 @@ class modul extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $this->load->model('modul_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1) redirect('siteman'); - $this->load->model('header_model'); + $this->load->model('header_model'); } - + function clear(){ unset($_SESSION['cari']); unset($_SESSION['filter']); redirect('modul'); } function index(){ - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; @@ -28,16 +28,16 @@ function index(){ $data['keyword'] = $this->modul_model->autocomplete(); $nav['act']= 1; $header = $this->header_model->get_data(); - + $this->load->view('header',$header); - + $this->load->view('setting/nav',$nav); $this->load->view('setting/modul/table',$data); $this->load->view('footer'); } - + function form($id=''){ - + if($id){ $data['modul'] = $this->modul_model->get_data($id); $data['form_action'] = site_url("modul/update/$id"); @@ -46,11 +46,11 @@ function form($id=''){ $data['modul'] = null; $data['form_action'] = site_url("modul/insert"); } - + $header = $this->header_model->get_data(); - + $this->load->view('header',$header); - + $nav['act']= 1; $this->load->view('setting/nav',$nav); $this->load->view('setting/modul/form',$data); @@ -85,5 +85,5 @@ function delete($id=''){ function delete_all(){ $this->modul_model->delete_all(); redirect('modul'); - } -} \ No newline at end of file + } +} diff --git a/app/controllers/Penduduk.php b/app/controllers/Penduduk.php index 6a00a01e4..ab53e7fe8 100644 --- a/app/controllers/Penduduk.php +++ b/app/controllers/Penduduk.php @@ -1,706 +1,706 @@ -load->model('user_model'); - $grup = $this->user_model->sesi_grup($_SESSION['sesi']); - if($grup!=1 AND $grup!=2) redirect('siteman'); - - $this->load->model('penduduk_model'); - $this->load->model('header_model'); - } - function clear(){ - unset($_SESSION['log']); - $_SESSION['status_dasar']=1; - unset($_SESSION['judul_statistik']); - unset($_SESSION['judul_statistik_cetak']); - unset($_SESSION['cari']); - unset($_SESSION['duplikat']); - - unset($_SESSION['filter']); - unset($_SESSION['sex']); - unset($_SESSION['warganegara']); - unset($_SESSION['cacat']); - unset($_SESSION['menahun']); - unset($_SESSION['golongan_darah']); - unset($_SESSION['dusun']); - unset($_SESSION['rw']); - unset($_SESSION['rt']); - unset($_SESSION['hubungan']); - unset($_SESSION['agama']); - unset($_SESSION['umur_min']); - unset($_SESSION['umur_max']); - unset($_SESSION['pekerjaan_id']); - unset($_SESSION['pendidikan_sedang_id']); - unset($_SESSION['pendidikan_kk_id']); - unset($_SESSION['status_penduduk']); - unset($_SESSION['hamil']); - - - unset($_SESSION['status']); - unset($_SESSION['umurx']); - unset($_SESSION['cacatx']); - unset($_SESSION['menahunx']); - - $_SESSION['per_page'] = 50; - redirect('penduduk'); - } - function index($p=1,$o=0){ - - unset($_SESSION['log']); - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['judul_statistik'])) - $data['judul_statistik'] = $_SESSION['judul_statistik']; - else $data['judul_statistik'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_SESSION['status_dasar'])) - $data['status_dasar'] = $_SESSION['status_dasar']; - else $data['status_dasar'] = '1'; - if(isset($_SESSION['sex'])) - $data['sex'] = $_SESSION['sex']; - else $data['sex'] = ''; - - if(isset($_SESSION['dusun'])){ - $data['dusun'] = $_SESSION['dusun']; - $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); - - if(isset($_SESSION['rw'])){ - $data['rw'] = $_SESSION['rw']; - $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); - - if(isset($_SESSION['rt'])) - $data['rt'] = $_SESSION['rt']; - else $data['rt'] = ''; - - }else $data['rw'] = ''; - - }else{ - $data['dusun'] = ''; - $data['rw'] = ''; - $data['rt'] = ''; - } - - if(isset($_POST['per_page'])) - $_SESSION['per_page']=$_POST['per_page']; - $data['per_page'] = $_SESSION['per_page']; - - $data['grup'] = $this->user_model->sesi_grup($_SESSION['sesi']); - $data['paging'] = $this->penduduk_model->paging($p,$o); - $data['main'] = $this->penduduk_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); - $data['keyword'] = $this->penduduk_model->autocomplete(); - $data['list_agama'] = $this->penduduk_model->list_agama(); - $data['list_dusun'] = $this->penduduk_model->list_dusun(); - - $header = $this->header_model->get_data(); - $nav['act']= 2; - - $data['info'] = $this->penduduk_model->get_filter(); - - $this->load->view('header', $header); - $this->load->view('sid/nav',$nav); - $this->load->view('sid/kependudukan/penduduk',$data); - $this->load->view('footer'); - - } - function form($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - - if(isset($_POST['dusun'])) - $data['dus_sel'] = $_POST['dusun']; - else - $data['dus_sel'] = ''; - - if(isset($_POST['rw'])) - $data['rw_sel'] = $_POST['rw']; - else - $data['rw_sel'] = ''; - - if(isset($_POST['rt'])) - $data['rt_sel'] = $_POST['rt']; - else - $data['rt_sel'] = ''; - - if($id){ - $data['penduduk'] = $this->penduduk_model->get_penduduk($id); - $data['form_action'] = site_url("penduduk/update/$p/$o/$id"); - $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); - } - else{ - $data['penduduk'] = null; - $data['form_action'] = site_url("penduduk/insert"); - $data['list_dokumen'] = null; - } - - $header = $this->header_model->get_data(); - $data['dusun'] = $this->penduduk_model->list_dusun(); - $data['rw'] = $this->penduduk_model->list_rw($data['dus_sel']); - $data['rt'] = $this->penduduk_model->list_rt($data['dus_sel'],$data['rw_sel']); - $data['agama'] = $this->penduduk_model->list_agama(); - $data['pendidikan_sedang'] = $this->penduduk_model->list_pendidikan_sedang(); - $data['pendidikan_kk'] = $this->penduduk_model->list_pendidikan_kk(); - $data['pekerjaan'] = $this->penduduk_model->list_pekerjaan(); - $data['warganegara'] = $this->penduduk_model->list_warganegara(); - $data['hubungan'] = $this->penduduk_model->list_hubungan(); - $data['kawin'] = $this->penduduk_model->list_status_kawin(); - $data['golongan_darah'] = $this->penduduk_model->list_golongan_darah(); - $data['cacat'] = $this->penduduk_model->list_cacat(); - $data['sakit_menahun'] = $this->penduduk_model->list_sakit_menahun(); - - $this->load->view('header', $header); - $nav['act']= 2; - $this->load->view('sid/nav',$nav); - $this->load->view('sid/kependudukan/penduduk_form',$data); - $this->load->view('footer'); - } - function detail($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); - $data['list_kelompok'] = $this->penduduk_model->list_kelompok($id); - $data['penduduk'] = $this->penduduk_model->get_penduduk($id); - $header = $this->header_model->get_data(); - - $this->load->view('header', $header); - $nav['act']= 2; - $this->load->view('sid/nav',$nav); - $this->load->view('sid/kependudukan/penduduk_detail',$data); - $this->load->view('footer'); - } - function dokumen($id=''){ - $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); - $data['penduduk'] = $this->penduduk_model->get_penduduk($id); - $header = $this->header_model->get_data(); - - $this->load->view('header', $header); - $nav['act']= 2; - $this->load->view('sid/nav',$nav); - $this->load->view('sid/kependudukan/penduduk_dokumen',$data); - $this->load->view('footer'); - } - function dokumen_form($id=0){ - $data['penduduk'] = $this->penduduk_model->get_penduduk($id); - $data['form_action'] = site_url("penduduk/dokumen_insert"); - $this->load->view('sid/kependudukan/dokumen_form',$data); - } - function dokumen_list($id=0){ - $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); - $data['penduduk'] = $this->penduduk_model->get_penduduk($id); - $this->load->view('sid/kependudukan/dokumen_ajax',$data); - } - function dokumen_insert(){ - $this->penduduk_model->dokumen_insert(); - $id = $_POST['id_pend']; - redirect("penduduk/dokumen/$id"); - } - function delete_dokumen($id_pend=0,$id=''){ - $this->penduduk_model->delete_dokumen($id); - redirect("penduduk/dokumen/$id_pend"); - } - function delete_all_dokumen($id_pend=0){ - $this->penduduk_model->delete_all_dokumen(); - redirect("penduduk/dokumen/$id_pend"); - } - function cetak_biodata($id=''){ - - $data['desa'] = $this->header_model->get_data(); - $data['penduduk'] = $this->penduduk_model->get_penduduk($id); - $this->load->view('sid/kependudukan/cetak_biodata',$data); - } - function search(){ - $cari = $this->input->post('cari'); - if($cari!='') - $_SESSION['cari']=$cari; - else unset($_SESSION['cari']); - redirect('penduduk'); - } - function filter(){ - $filter = $this->input->post('filter'); - if($filter!="") - $_SESSION['filter']=$filter; - else unset($_SESSION['filter']); - redirect('penduduk'); - } - function duplikat(){ - $_SESSION['duplikat']=1; - redirect('penduduk'); - } - function status_dasar(){ - $status_dasar = $this->input->post('status_dasar'); - if($status_dasar!="") - $_SESSION['status_dasar']=$status_dasar; - else unset($_SESSION['status_dasar']); - redirect('penduduk'); - } - function sex(){ - $sex = $this->input->post('sex'); - if($sex!="") - $_SESSION['sex']=$sex; - else unset($_SESSION['sex']); - redirect('penduduk'); - } - function agama(){ - $agama = $this->input->post('agama'); - if($agama!="") - $_SESSION['agama']=$agama; - else unset($_SESSION['agama']); - redirect('penduduk'); - } - function warganegara(){ - $warganegara = $this->input->post('warganegara'); - if($warganegara!="") - $_SESSION['warganegara']=$warganegara; - else unset($_SESSION['warganegara']); - redirect('penduduk'); - } - function dusun(){ - unset($_SESSION['rw']); - unset($_SESSION['rt']); - $dusun = $this->input->post('dusun'); - if($dusun!="") - $_SESSION['dusun']=$dusun; - else unset($_SESSION['dusun']); - redirect('penduduk'); - } - function rw(){ - unset($_SESSION['rt']); - $rw = $this->input->post('rw'); - if($rw!="") - $_SESSION['rw']=$rw; - else unset($_SESSION['rw']); - redirect('penduduk'); - } - function rt(){ - $rt = $this->input->post('rt'); - if($rt!="") - $_SESSION['rt']=$rt; - else unset($_SESSION['rt']); - redirect('penduduk'); - } - function insert(){ - - - $data = $this->penduduk_model->dn(); - - $i=0; - $dp=0; - $link = site_url()."penduduk/form"; - while($iTERJADI KESALAHAN

    Data Tidak Tersimpan
    - Sudah terdapat Penduduk dengan nomor NIK $nk, Silahkan periksa kembali dan ulangi proses memasukkan data.
    - Klik disini untuk Kembali"; - }else{ - - $this->penduduk_model->insert(); - redirect('penduduk'); - } - } - function update($p=1,$o=0,$id=''){ - $this->penduduk_model->update($id); - redirect("penduduk/index/$p/$o"); - } - - function delete_confirm($p=1,$o=0,$id=''){ - $data['form_action'] = site_url("penduduk/index/$p/$o/$id"); - $this->load->view("sid/kependudukan/ajax_delete", $data); - } - function delete($p=1,$o=0,$id=''){ - $this->penduduk_model->delete($id); - redirect("penduduk/index/$p/$o"); - } - function delete_all($p=1,$o=0){ - $this->penduduk_model->delete_all(); - redirect("penduduk/index/$p/$o"); - } - function ajax_adv_search(){ - if(isset($_SESSION['cari'])) - $data['cari'] = $_SESSION['cari']; - else $data['cari'] = ''; - - if(isset($_SESSION['judul_statistik'])) - $data['judul_statistik'] = $_SESSION['judul_statistik']; - else $data['judul_statistik'] = ''; - - if(isset($_SESSION['filter'])) - $data['filter'] = $_SESSION['filter']; - else $data['filter'] = ''; - if(isset($_SESSION['sex'])) - $data['sex'] = $_SESSION['sex']; - else $data['sex'] = ''; - - if(isset($_SESSION['hubungan'])) - $data['hubungan'] = $_SESSION['hubungan']; - else $data['hubungan'] = ''; - - if(isset($_SESSION['umur_min'])) - $data['umur_min'] = $_SESSION['umur_min']; - else $data['umur_min'] = ''; - - if(isset($_SESSION['umur_max'])) - $data['umur_max'] = $_SESSION['umur_max']; - else $data['umur_max'] = ''; - - if(isset($_SESSION['agama'])) - $data['agama'] = $_SESSION['agama']; - else $data['agama'] = ''; - - if(isset($_SESSION['tahun'])) - $data['tahun'] = $_SESSION['tahun']; - else $data['tahun'] = date("Y"); - - if(isset($_SESSION['cacat'])) - $data['cacat'] = $_SESSION['cacat']; - else $data['cacat'] = ''; - - if(isset($_SESSION['golongan_darah'])) - $data['golongan_darah'] = $_SESSION['golongan_darah']; - else $data['golongan_darah'] = ''; - - if(isset($_SESSION['pekerjaan_id'])) - $data['pekerjaan_id'] = $_SESSION['pekerjaan_id']; - else $data['pekerjaan_id'] = ''; - - if(isset($_SESSION['status'])) - $data['status'] = $_SESSION['status']; - else $data['status'] = ''; - - if(isset($_SESSION['pendidikan_sedang_id'])) - $data['pendidikan_sedang_id'] = $_SESSION['pendidikan_sedang_id']; - else $data['pendidikan_sedang_id'] = ''; - - if(isset($_SESSION['pendidikan_kk_id'])) - $data['pendidikan_kk_id'] = $_SESSION['pendidikan_kk_id']; - else $data['pendidikan_kk_id'] = ''; - - if(isset($_SESSION['status_penduduk'])) - $data['status_penduduk'] = $_SESSION['status_penduduk']; - else $data['status_penduduk'] = ''; - - $data['list_agama'] = $this->penduduk_model->list_agama(); - $data['list_cacat'] = $this->penduduk_model->list_cacat(); - $data['list_golongan_darah'] = $this->penduduk_model->list_golongan_darah(); - $data['list_hubungan'] = $this->penduduk_model->list_hubungan(); - $data['pendidikan'] = $this->penduduk_model->list_pendidikan(); - $data['pendidikan_kk'] = $this->penduduk_model->list_pendidikan_kk(); - $data['pekerjaan'] = $this->penduduk_model->list_pekerjaan(); - $data['form_action'] = site_url("penduduk/adv_search_proses"); - $this->load->view("sid/kependudukan/ajax_adv_search_form", $data); - } - function adv_search_proses(){ - $adv_search = $_POST; - $i=0; - while($i++ < count($adv_search)){ - $col[$i] = key($adv_search); - next($adv_search); - } - $i=0; - while($i++ < count($col)){ - if($adv_search[$col[$i]]==""){ - UNSET($adv_search[$col[$i]]); - UNSET($_SESSION[$col[$i]]); - }else{ - $_SESSION[$col[$i]]=$adv_search[$col[$i]]; - } - } - //print_r($adv_search); - redirect('penduduk'); - } - function ajax_penduduk_pindah($id=0){ - $data['dusun'] = $this->penduduk_model->list_dusun(); - - $data['form_action'] = site_url("penduduk/pindah_proses/$id"); - $this->load->view('sid/kependudukan/ajax_pindah_form',$data); - } - function ajax_penduduk_pindah_rw($dusun=''){ - $dusun = str_replace("_"," ",$dusun); - $rw = $this->penduduk_model->list_rw($dusun); - - $dusun = str_replace(" ","_",$dusun); - echo"RW - - "; - } - function ajax_penduduk_pindah_rt($dusun='',$rw=''){ - $dusun = str_replace("_"," ",$dusun); - $rt = $this->penduduk_model->list_rt($dusun,$rw); - $dusun = str_replace(" ","_",$dusun); - echo "RT - - "; - } - function ajax_penduduk_cari_rw($dusun=''){ - $rw = $this->penduduk_model->list_rw($dusun); - - echo"RW - - "; - } - function ajax_penduduk_cari_rt($dusun='',$rw=''){ - $rt = $this->penduduk_model->list_rt($dusun,$rw); - echo "RT - - "; - } - function pindah_proses($id=0){ - $id_cluster = $_POST['id_cluster']; - $this->penduduk_model->pindah_proses($id,$id_cluster); - redirect("penduduk"); - } - function ajax_penduduk_maps($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - - $data['penduduk'] = $this->penduduk_model->get_penduduk_map($id); - $data['desa'] = $this->penduduk_model->get_desa(); - - $data['form_action'] = site_url("penduduk/update_maps/$p/$o/$id"); - - $this->load->view("sid/kependudukan/maps", $data); - } - - function update_maps($p=1,$o=0,$id=''){ - $this->penduduk_model->update_position($id); - redirect("penduduk/form/$p/$o/$id"); - } - function wilayah_sel($p=1,$o=0,$id=''){ - $data['p'] = $p; - $data['o'] = $o; - - $data['form_action'] = site_url("penduduk"); - - $this->load->view("sid/kependudukan/maps", $data); - } - function edit_status_dasar($p=1,$o=0,$id=0){ - $data['nik'] = $this->penduduk_model->get_penduduk($id); - $data['form_action'] = site_url("penduduk/update_status_dasar/$p/$o/$id"); - $this->load->view('sid/kependudukan/ajax_edit_status_dasar',$data); - } - - function update_status_dasar($p=1,$o=0,$id=''){ - $this->penduduk_model->update_status_dasar($id); - redirect("penduduk/index/$p/$o"); - } - - function cetak($o=0){ - - $data['info'] = $this->penduduk_model->get_filter(); - $data['main'] = $this->penduduk_model->list_data($o,0, 10000); - $this->load->view('sid/kependudukan/penduduk_print',$data); - } - function excel($o=0){ - - $data['info'] = $this->penduduk_model->get_filter(); - $data['main'] = $this->penduduk_model->list_data($o,0, 10000); - $this->load->view('sid/kependudukan/penduduk_excel',$data); - } - - function statistik($tipe="",$nomor="",$sex=""){ - $_SESSION['per_page'] = 50; - unset($_SESSION['log']); - unset($_SESSION['cari']); - - unset($_SESSION['warganegara']); - unset($_SESSION['cacat']); - unset($_SESSION['menahun']); - unset($_SESSION['golongan_darah']); - unset($_SESSION['dusun']); - unset($_SESSION['rw']); - unset($_SESSION['rt']); - unset($_SESSION['agama']); - unset($_SESSION['umur_min']); - unset($_SESSION['umur_max']); - unset($_SESSION['pekerjaan_id']); - unset($_SESSION['status']); - unset($_SESSION['pendidikan_sedang_id']); - unset($_SESSION['pendidikan_kk_id']); - unset($_SESSION['status_penduduk']); - unset($_SESSION['umurx']); - - if($sex==0) - unset($_SESSION['sex']); - else - $_SESSION['sex']=$sex; - - - if($nomor != 0){ - switch($tipe){ - case 0: $_SESSION['pendidikan_kk_id'] = $nomor; $pre="PENDIDIKAN DALAM KK : "; break; - case 1: $_SESSION['pekerjaan_id'] = $nomor; $pre="PEKERJAAN : "; break; - case 2: $_SESSION['status'] = $nomor; $pre="STATUS PERKAWINAN : "; break; - case 3: $_SESSION['agama'] = $nomor; $pre="AGAMA : "; break; - case 4: $_SESSION['sex'] = $nomor; $pre="JENIS KELAMIN : "; break; - case 5: $_SESSION['warganegara'] = $nomor; $pre="WARGANEGARA : "; break; - case 6: $_SESSION['status_penduduk'] = $nomor; $pre="STATUS PENDUDUK : "; break; - case 7: $_SESSION['golongan_darah'] = $nomor; $pre="GOLONGAN DARAH : "; break; - case 9: $_SESSION['cacat'] = $nomor; $pre="CACAT : "; break; - case 10: $_SESSION['menahun'] = $nomor; $pre="SAKIT MENAHUN : "; break; - case 11: $_SESSION['jamkesmas'] = $nomor; $pre="JAMKESMAS : "; break; - case 13: $_SESSION['umurx'] = $nomor; $pre="UMUR "; break; - case 14: $_SESSION['pendidikan_sedang_id'] = $nomor; $pre="PENDIDIKAN SEDANG DITEMPUH : "; break; - } - $judul= $this->penduduk_model->get_judul_statistik($tipe,$nomor); - if($judul['nama']){ - $_SESSION['judul_statistik']="TABEL DATA KEPENDUDUKAN MENURUT ".$pre.$judul['nama']; - $_SESSION['judul_statistik_cetak']="TABEL DATA KEPENDUDUKAN MENURUT ".$pre.$judul['nama']; - }else{ - unset($_SESSION['judul_statistik']); - } - - redirect('penduduk'); - }else{ - - redirect('penduduk'); - } - } - function lap_statistik($id_cluster=0,$tipe=0,$nomor=0){ - unset($_SESSION['sex']); - unset($_SESSION['cacatx']); - unset($_SESSION['menahun']); - unset($_SESSION['menahunx']); - unset($_SESSION['dusun']); - unset($_SESSION['rw']); - unset($_SESSION['rt']); - unset($_SESSION['umur_min']); - unset($_SESSION['umur_max']); - unset($_SESSION['hamil']); - unset($_SESSION['status']); - $cluster= $this->penduduk_model->get_cluster($id_cluster); - switch($tipe){ - case 1: - $_SESSION['sex'] = '1'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="JENIS KELAMIN LAKI-LAKI "; - break; - case 2: - $_SESSION['sex'] = '2'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="JENIS KELAMIN PEREMPUAN "; - break; - case 3: - $_SESSION['umur_min'] = '0'; - $_SESSION['umur_max'] = '0'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="BERUMUR <1 "; - break; - case 4: - $_SESSION['umur_min'] = '1'; - $_SESSION['umur_max'] = '5'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="BERUMUR 1-5 "; - break; - case 5: - $_SESSION['umur_min'] = '6'; - $_SESSION['umur_max'] = '12'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="BERUMUR 6-12 "; - break; - case 6: - $_SESSION['umur_min'] = '13'; - $_SESSION['umur_max'] = '15'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="BERUMUR 13-16 "; - break; - case 7: - $_SESSION['umur_min'] = '16'; - $_SESSION['umur_max'] = '18'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="BERUMUR 16-18 "; - break; - case 8: - $_SESSION['umur_min'] = '61'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="BERUMUR >60"; - break; - case 9: - $_SESSION['cacatx'] = '7'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="CACAT "; - break; - case 10: - $_SESSION['menahunx'] = '14'; - $_SESSION['sex']='1' ; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="SAKIT MENAHUN LAKI-LAKI "; - break; - case 11: - $_SESSION['menahunx'] = '14'; - $_SESSION['sex']='2'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="SAKIT MENAHUN PEREMPUAN "; - break; - case 12: - $_SESSION['hamil'] = '1'; - $_SESSION['dusun']=$cluster['dusun']; - $_SESSION['rw']=$cluster['rw']; - $_SESSION['rt']=$cluster['rt']; - $pre="HAMIL "; - break; - } - - if($pre){ - $_SESSION['judul_statistik']=$pre; - }else{ - unset($_SESSION['judul_statistik']); - } - redirect("penduduk"); - } - function coba2($id=0){ - $this->penduduk_model->coba2(); - } -} \ No newline at end of file +load->model('user_model'); + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); + if($grup!=1 AND $grup!=2) redirect('siteman'); + + $this->load->model('penduduk_model'); + $this->load->model('header_model'); + } + function clear(){ + unset($_SESSION['log']); + $_SESSION['status_dasar']=1; + unset($_SESSION['judul_statistik']); + unset($_SESSION['judul_statistik_cetak']); + unset($_SESSION['cari']); + unset($_SESSION['duplikat']); + + unset($_SESSION['filter']); + unset($_SESSION['sex']); + unset($_SESSION['warganegara']); + unset($_SESSION['cacat']); + unset($_SESSION['menahun']); + unset($_SESSION['golongan_darah']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['hubungan']); + unset($_SESSION['agama']); + unset($_SESSION['umur_min']); + unset($_SESSION['umur_max']); + unset($_SESSION['pekerjaan_id']); + unset($_SESSION['pendidikan_sedang_id']); + unset($_SESSION['pendidikan_kk_id']); + unset($_SESSION['status_penduduk']); + unset($_SESSION['hamil']); + + + unset($_SESSION['status']); + unset($_SESSION['umurx']); + unset($_SESSION['cacatx']); + unset($_SESSION['menahunx']); + + $_SESSION['per_page'] = 50; + redirect('penduduk'); + } + function index($p=1,$o=0){ + + unset($_SESSION['log']); + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['judul_statistik'])) + $data['judul_statistik'] = $_SESSION['judul_statistik']; + else $data['judul_statistik'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['status_dasar'])) + $data['status_dasar'] = $_SESSION['status_dasar']; + else $data['status_dasar'] = '1'; + if(isset($_SESSION['sex'])) + $data['sex'] = $_SESSION['sex']; + else $data['sex'] = ''; + + if(isset($_SESSION['dusun'])){ + $data['dusun'] = $_SESSION['dusun']; + $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); + + if(isset($_SESSION['rw'])){ + $data['rw'] = $_SESSION['rw']; + $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); + + if(isset($_SESSION['rt'])) + $data['rt'] = $_SESSION['rt']; + else $data['rt'] = ''; + + }else $data['rw'] = ''; + + }else{ + $data['dusun'] = ''; + $data['rw'] = ''; + $data['rt'] = ''; + } + + if(isset($_POST['per_page'])) + $_SESSION['per_page']=$_POST['per_page']; + $data['per_page'] = $_SESSION['per_page']; + + $data['grup'] = $this->user_model->sesi_grup($_SESSION['sesi']); + $data['paging'] = $this->penduduk_model->paging($p,$o); + $data['main'] = $this->penduduk_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); + $data['keyword'] = $this->penduduk_model->autocomplete(); + $data['list_agama'] = $this->penduduk_model->list_agama(); + $data['list_dusun'] = $this->penduduk_model->list_dusun(); + + $header = $this->header_model->get_data(); + $nav['act']= 2; + + $data['info'] = $this->penduduk_model->get_filter(); + + $this->load->view('header', $header); + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/penduduk',$data); + $this->load->view('footer'); + + } + function form($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + if(isset($_POST['dusun'])) + $data['dus_sel'] = $_POST['dusun']; + else + $data['dus_sel'] = ''; + + if(isset($_POST['rw'])) + $data['rw_sel'] = $_POST['rw']; + else + $data['rw_sel'] = ''; + + if(isset($_POST['rt'])) + $data['rt_sel'] = $_POST['rt']; + else + $data['rt_sel'] = ''; + + if($id){ + $data['penduduk'] = $this->penduduk_model->get_penduduk($id); + $data['form_action'] = site_url("penduduk/update/$p/$o/$id"); + $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); + } + else{ + $data['penduduk'] = null; + $data['form_action'] = site_url("penduduk/insert"); + $data['list_dokumen'] = null; + } + + $header = $this->header_model->get_data(); + $data['dusun'] = $this->penduduk_model->list_dusun(); + $data['rw'] = $this->penduduk_model->list_rw($data['dus_sel']); + $data['rt'] = $this->penduduk_model->list_rt($data['dus_sel'],$data['rw_sel']); + $data['agama'] = $this->penduduk_model->list_agama(); + $data['pendidikan_sedang'] = $this->penduduk_model->list_pendidikan_sedang(); + $data['pendidikan_kk'] = $this->penduduk_model->list_pendidikan_kk(); + $data['pekerjaan'] = $this->penduduk_model->list_pekerjaan(); + $data['warganegara'] = $this->penduduk_model->list_warganegara(); + $data['hubungan'] = $this->penduduk_model->list_hubungan(); + $data['kawin'] = $this->penduduk_model->list_status_kawin(); + $data['golongan_darah'] = $this->penduduk_model->list_golongan_darah(); + $data['cacat'] = $this->penduduk_model->list_cacat(); + $data['sakit_menahun'] = $this->penduduk_model->list_sakit_menahun(); + + $this->load->view('header', $header); + $nav['act']= 2; + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/penduduk_form',$data); + $this->load->view('footer'); + } + function detail($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); + $data['list_kelompok'] = $this->penduduk_model->list_kelompok($id); + $data['penduduk'] = $this->penduduk_model->get_penduduk($id); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $nav['act']= 2; + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/penduduk_detail',$data); + $this->load->view('footer'); + } + function dokumen($id=''){ + $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); + $data['penduduk'] = $this->penduduk_model->get_penduduk($id); + $header = $this->header_model->get_data(); + + $this->load->view('header', $header); + $nav['act']= 2; + $this->load->view('sid/nav',$nav); + $this->load->view('sid/kependudukan/penduduk_dokumen',$data); + $this->load->view('footer'); + } + function dokumen_form($id=0){ + $data['penduduk'] = $this->penduduk_model->get_penduduk($id); + $data['form_action'] = site_url("penduduk/dokumen_insert"); + $this->load->view('sid/kependudukan/dokumen_form',$data); + } + function dokumen_list($id=0){ + $data['list_dokumen'] = $this->penduduk_model->list_dokumen($id); + $data['penduduk'] = $this->penduduk_model->get_penduduk($id); + $this->load->view('sid/kependudukan/dokumen_ajax',$data); + } + function dokumen_insert(){ + $this->penduduk_model->dokumen_insert(); + $id = $_POST['id_pend']; + redirect("penduduk/dokumen/$id"); + } + function delete_dokumen($id_pend=0,$id=''){ + $this->penduduk_model->delete_dokumen($id); + redirect("penduduk/dokumen/$id_pend"); + } + function delete_all_dokumen($id_pend=0){ + $this->penduduk_model->delete_all_dokumen(); + redirect("penduduk/dokumen/$id_pend"); + } + function cetak_biodata($id=''){ + + $data['desa'] = $this->header_model->get_data(); + $data['penduduk'] = $this->penduduk_model->get_penduduk($id); + $this->load->view('sid/kependudukan/cetak_biodata',$data); + } + function search(){ + $cari = $this->input->post('cari'); + if($cari!='') + $_SESSION['cari']=$cari; + else unset($_SESSION['cari']); + redirect('penduduk'); + } + function filter(){ + $filter = $this->input->post('filter'); + if($filter!="") + $_SESSION['filter']=$filter; + else unset($_SESSION['filter']); + redirect('penduduk'); + } + function duplikat(){ + $_SESSION['duplikat']=1; + redirect('penduduk'); + } + function status_dasar(){ + $status_dasar = $this->input->post('status_dasar'); + if($status_dasar!="") + $_SESSION['status_dasar']=$status_dasar; + else unset($_SESSION['status_dasar']); + redirect('penduduk'); + } + function sex(){ + $sex = $this->input->post('sex'); + if($sex!="") + $_SESSION['sex']=$sex; + else unset($_SESSION['sex']); + redirect('penduduk'); + } + function agama(){ + $agama = $this->input->post('agama'); + if($agama!="") + $_SESSION['agama']=$agama; + else unset($_SESSION['agama']); + redirect('penduduk'); + } + function warganegara(){ + $warganegara = $this->input->post('warganegara'); + if($warganegara!="") + $_SESSION['warganegara']=$warganegara; + else unset($_SESSION['warganegara']); + redirect('penduduk'); + } + function dusun(){ + unset($_SESSION['rw']); + unset($_SESSION['rt']); + $dusun = $this->input->post('dusun'); + if($dusun!="") + $_SESSION['dusun']=$dusun; + else unset($_SESSION['dusun']); + redirect('penduduk'); + } + function rw(){ + unset($_SESSION['rt']); + $rw = $this->input->post('rw'); + if($rw!="") + $_SESSION['rw']=$rw; + else unset($_SESSION['rw']); + redirect('penduduk'); + } + function rt(){ + $rt = $this->input->post('rt'); + if($rt!="") + $_SESSION['rt']=$rt; + else unset($_SESSION['rt']); + redirect('penduduk'); + } + function insert(){ + + + $data = $this->penduduk_model->dn(); + + $i=0; + $dp=0; + $link = site_url()."penduduk/form"; + while($iTERJADI KESALAHAN


    Data Tidak Tersimpan
    + Sudah terdapat Penduduk dengan nomor NIK $nk, Silahkan periksa kembali dan ulangi proses memasukkan data.
    + Klik disini untuk Kembali"; + }else{ + + $this->penduduk_model->insert(); + redirect('penduduk'); + } + } + function update($p=1,$o=0,$id=''){ + $this->penduduk_model->update($id); + redirect("penduduk/index/$p/$o"); + } + + function delete_confirm($p=1,$o=0,$id=''){ + $data['form_action'] = site_url("penduduk/index/$p/$o/$id"); + $this->load->view("sid/kependudukan/ajax_delete", $data); + } + function delete($p=1,$o=0,$id=''){ + $this->penduduk_model->delete($id); + redirect("penduduk/index/$p/$o"); + } + function delete_all($p=1,$o=0){ + $this->penduduk_model->delete_all(); + redirect("penduduk/index/$p/$o"); + } + function ajax_adv_search(){ + if(isset($_SESSION['cari'])) + $data['cari'] = $_SESSION['cari']; + else $data['cari'] = ''; + + if(isset($_SESSION['judul_statistik'])) + $data['judul_statistik'] = $_SESSION['judul_statistik']; + else $data['judul_statistik'] = ''; + + if(isset($_SESSION['filter'])) + $data['filter'] = $_SESSION['filter']; + else $data['filter'] = ''; + if(isset($_SESSION['sex'])) + $data['sex'] = $_SESSION['sex']; + else $data['sex'] = ''; + + if(isset($_SESSION['hubungan'])) + $data['hubungan'] = $_SESSION['hubungan']; + else $data['hubungan'] = ''; + + if(isset($_SESSION['umur_min'])) + $data['umur_min'] = $_SESSION['umur_min']; + else $data['umur_min'] = ''; + + if(isset($_SESSION['umur_max'])) + $data['umur_max'] = $_SESSION['umur_max']; + else $data['umur_max'] = ''; + + if(isset($_SESSION['agama'])) + $data['agama'] = $_SESSION['agama']; + else $data['agama'] = ''; + + if(isset($_SESSION['tahun'])) + $data['tahun'] = $_SESSION['tahun']; + else $data['tahun'] = date("Y"); + + if(isset($_SESSION['cacat'])) + $data['cacat'] = $_SESSION['cacat']; + else $data['cacat'] = ''; + + if(isset($_SESSION['golongan_darah'])) + $data['golongan_darah'] = $_SESSION['golongan_darah']; + else $data['golongan_darah'] = ''; + + if(isset($_SESSION['pekerjaan_id'])) + $data['pekerjaan_id'] = $_SESSION['pekerjaan_id']; + else $data['pekerjaan_id'] = ''; + + if(isset($_SESSION['status'])) + $data['status'] = $_SESSION['status']; + else $data['status'] = ''; + + if(isset($_SESSION['pendidikan_sedang_id'])) + $data['pendidikan_sedang_id'] = $_SESSION['pendidikan_sedang_id']; + else $data['pendidikan_sedang_id'] = ''; + + if(isset($_SESSION['pendidikan_kk_id'])) + $data['pendidikan_kk_id'] = $_SESSION['pendidikan_kk_id']; + else $data['pendidikan_kk_id'] = ''; + + if(isset($_SESSION['status_penduduk'])) + $data['status_penduduk'] = $_SESSION['status_penduduk']; + else $data['status_penduduk'] = ''; + + $data['list_agama'] = $this->penduduk_model->list_agama(); + $data['list_cacat'] = $this->penduduk_model->list_cacat(); + $data['list_golongan_darah'] = $this->penduduk_model->list_golongan_darah(); + $data['list_hubungan'] = $this->penduduk_model->list_hubungan(); + $data['pendidikan'] = $this->penduduk_model->list_pendidikan(); + $data['pendidikan_kk'] = $this->penduduk_model->list_pendidikan_kk(); + $data['pekerjaan'] = $this->penduduk_model->list_pekerjaan(); + $data['form_action'] = site_url("penduduk/adv_search_proses"); + $this->load->view("sid/kependudukan/ajax_adv_search_form", $data); + } + function adv_search_proses(){ + $adv_search = $_POST; + $i=0; + while($i++ < count($adv_search)){ + $col[$i] = key($adv_search); + next($adv_search); + } + $i=0; + while($i++ < count($col)){ + if($adv_search[$col[$i]]==""){ + UNSET($adv_search[$col[$i]]); + UNSET($_SESSION[$col[$i]]); + }else{ + $_SESSION[$col[$i]]=$adv_search[$col[$i]]; + } + } + //print_r($adv_search); + redirect('penduduk'); + } + function ajax_penduduk_pindah($id=0){ + $data['dusun'] = $this->penduduk_model->list_dusun(); + + $data['form_action'] = site_url("penduduk/pindah_proses/$id"); + $this->load->view('sid/kependudukan/ajax_pindah_form',$data); + } + function ajax_penduduk_pindah_rw($dusun=''){ + $dusun = str_replace("_"," ",$dusun); + $rw = $this->penduduk_model->list_rw($dusun); + + $dusun = str_replace(" ","_",$dusun); + echo"RW + + "; + } + function ajax_penduduk_pindah_rt($dusun='',$rw=''){ + $dusun = str_replace("_"," ",$dusun); + $rt = $this->penduduk_model->list_rt($dusun,$rw); + $dusun = str_replace(" ","_",$dusun); + echo "RT + + "; + } + function ajax_penduduk_cari_rw($dusun=''){ + $rw = $this->penduduk_model->list_rw($dusun); + + echo"RW + + "; + } + function ajax_penduduk_cari_rt($dusun='',$rw=''){ + $rt = $this->penduduk_model->list_rt($dusun,$rw); + echo "RT + + "; + } + function pindah_proses($id=0){ + $id_cluster = $_POST['id_cluster']; + $this->penduduk_model->pindah_proses($id,$id_cluster); + redirect("penduduk"); + } + function ajax_penduduk_maps($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + $data['penduduk'] = $this->penduduk_model->get_penduduk_map($id); + $data['desa'] = $this->penduduk_model->get_desa(); + + $data['form_action'] = site_url("penduduk/update_maps/$p/$o/$id"); + + $this->load->view("sid/kependudukan/maps", $data); + } + + function update_maps($p=1,$o=0,$id=''){ + $this->penduduk_model->update_position($id); + redirect("penduduk/form/$p/$o/$id"); + } + function wilayah_sel($p=1,$o=0,$id=''){ + $data['p'] = $p; + $data['o'] = $o; + + $data['form_action'] = site_url("penduduk"); + + $this->load->view("sid/kependudukan/maps", $data); + } + function edit_status_dasar($p=1,$o=0,$id=0){ + $data['nik'] = $this->penduduk_model->get_penduduk($id); + $data['form_action'] = site_url("penduduk/update_status_dasar/$p/$o/$id"); + $this->load->view('sid/kependudukan/ajax_edit_status_dasar',$data); + } + + function update_status_dasar($p=1,$o=0,$id=''){ + $this->penduduk_model->update_status_dasar($id); + redirect("penduduk/index/$p/$o"); + } + + function cetak($o=0){ + + $data['info'] = $this->penduduk_model->get_filter(); + $data['main'] = $this->penduduk_model->list_data($o,0, 10000); + $this->load->view('sid/kependudukan/penduduk_print',$data); + } + function excel($o=0){ + + $data['info'] = $this->penduduk_model->get_filter(); + $data['main'] = $this->penduduk_model->list_data($o,0, 10000); + $this->load->view('sid/kependudukan/penduduk_excel',$data); + } + + function statistik($tipe="",$nomor="",$sex=""){ + $_SESSION['per_page'] = 50; + unset($_SESSION['log']); + unset($_SESSION['cari']); + + unset($_SESSION['warganegara']); + unset($_SESSION['cacat']); + unset($_SESSION['menahun']); + unset($_SESSION['golongan_darah']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['agama']); + unset($_SESSION['umur_min']); + unset($_SESSION['umur_max']); + unset($_SESSION['pekerjaan_id']); + unset($_SESSION['status']); + unset($_SESSION['pendidikan_sedang_id']); + unset($_SESSION['pendidikan_kk_id']); + unset($_SESSION['status_penduduk']); + unset($_SESSION['umurx']); + + if($sex==0) + unset($_SESSION['sex']); + else + $_SESSION['sex']=$sex; + + + if($nomor != 0){ + switch($tipe){ + case 0: $_SESSION['pendidikan_kk_id'] = $nomor; $pre="PENDIDIKAN DALAM KK : "; break; + case 1: $_SESSION['pekerjaan_id'] = $nomor; $pre="PEKERJAAN : "; break; + case 2: $_SESSION['status'] = $nomor; $pre="STATUS PERKAWINAN : "; break; + case 3: $_SESSION['agama'] = $nomor; $pre="AGAMA : "; break; + case 4: $_SESSION['sex'] = $nomor; $pre="JENIS KELAMIN : "; break; + case 5: $_SESSION['warganegara'] = $nomor; $pre="WARGANEGARA : "; break; + case 6: $_SESSION['status_penduduk'] = $nomor; $pre="STATUS PENDUDUK : "; break; + case 7: $_SESSION['golongan_darah'] = $nomor; $pre="GOLONGAN DARAH : "; break; + case 9: $_SESSION['cacat'] = $nomor; $pre="CACAT : "; break; + case 10: $_SESSION['menahun'] = $nomor; $pre="SAKIT MENAHUN : "; break; + case 11: $_SESSION['jamkesmas'] = $nomor; $pre="JAMKESMAS : "; break; + case 13: $_SESSION['umurx'] = $nomor; $pre="UMUR "; break; + case 14: $_SESSION['pendidikan_sedang_id'] = $nomor; $pre="PENDIDIKAN SEDANG DITEMPUH : "; break; + } + $judul= $this->penduduk_model->get_judul_statistik($tipe,$nomor); + if($judul['nama']){ + $_SESSION['judul_statistik']="TABEL DATA KEPENDUDUKAN MENURUT ".$pre.$judul['nama']; + $_SESSION['judul_statistik_cetak']="TABEL DATA KEPENDUDUKAN MENURUT ".$pre.$judul['nama']; + }else{ + unset($_SESSION['judul_statistik']); + } + + redirect('penduduk'); + }else{ + + redirect('penduduk'); + } + } + function lap_statistik($id_cluster=0,$tipe=0,$nomor=0){ + unset($_SESSION['sex']); + unset($_SESSION['cacatx']); + unset($_SESSION['menahun']); + unset($_SESSION['menahunx']); + unset($_SESSION['dusun']); + unset($_SESSION['rw']); + unset($_SESSION['rt']); + unset($_SESSION['umur_min']); + unset($_SESSION['umur_max']); + unset($_SESSION['hamil']); + unset($_SESSION['status']); + $cluster= $this->penduduk_model->get_cluster($id_cluster); + switch($tipe){ + case 1: + $_SESSION['sex'] = '1'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="JENIS KELAMIN LAKI-LAKI "; + break; + case 2: + $_SESSION['sex'] = '2'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="JENIS KELAMIN PEREMPUAN "; + break; + case 3: + $_SESSION['umur_min'] = '0'; + $_SESSION['umur_max'] = '0'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="BERUMUR <1 "; + break; + case 4: + $_SESSION['umur_min'] = '1'; + $_SESSION['umur_max'] = '5'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="BERUMUR 1-5 "; + break; + case 5: + $_SESSION['umur_min'] = '6'; + $_SESSION['umur_max'] = '12'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="BERUMUR 6-12 "; + break; + case 6: + $_SESSION['umur_min'] = '13'; + $_SESSION['umur_max'] = '15'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="BERUMUR 13-16 "; + break; + case 7: + $_SESSION['umur_min'] = '16'; + $_SESSION['umur_max'] = '18'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="BERUMUR 16-18 "; + break; + case 8: + $_SESSION['umur_min'] = '61'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="BERUMUR >60"; + break; + case 9: + $_SESSION['cacatx'] = '7'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="CACAT "; + break; + case 10: + $_SESSION['menahunx'] = '14'; + $_SESSION['sex']='1' ; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="SAKIT MENAHUN LAKI-LAKI "; + break; + case 11: + $_SESSION['menahunx'] = '14'; + $_SESSION['sex']='2'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="SAKIT MENAHUN PEREMPUAN "; + break; + case 12: + $_SESSION['hamil'] = '1'; + $_SESSION['dusun']=$cluster['dusun']; + $_SESSION['rw']=$cluster['rw']; + $_SESSION['rt']=$cluster['rt']; + $pre="HAMIL "; + break; + } + + if($pre){ + $_SESSION['judul_statistik']=$pre; + }else{ + unset($_SESSION['judul_statistik']); + } + redirect("penduduk"); + } + function coba2($id=0){ + $this->penduduk_model->coba2(); + } +} diff --git a/app/controllers/Penduduk_log.php b/app/controllers/Penduduk_log.php index 2d617bea2..e21571640 100644 --- a/app/controllers/Penduduk_log.php +++ b/app/controllers/Penduduk_log.php @@ -2,14 +2,14 @@ class penduduk_log extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); - + $this->load->model('penduduk_model'); $this->load->model('header_model'); - + } function clear(){ unset($_SESSION['cari']); @@ -33,32 +33,32 @@ function index($p=1,$o=0){ $_SESSION['log'] = 1; $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; if(isset($_SESSION['sex'])) $data['sex'] = $_SESSION['sex']; else $data['sex'] = ''; - + if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; @@ -79,20 +79,20 @@ function index($p=1,$o=0){ if(isset($_SESSION['status_penduduk'])) $data['status_penduduk'] = $_SESSION['status_penduduk']; else $data['status_penduduk'] = ''; - - if(isset($_POST['per_page'])) + + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->penduduk_model->paging($p,$o,1); $data['main'] = $this->penduduk_model->list_data($o, $data['paging']->offset, $data['paging']->per_page,1); $data['keyword'] = $this->penduduk_model->autocomplete(); $data['list_agama'] = $this->penduduk_model->list_agama(); $data['list_dusun'] = $this->penduduk_model->list_dusun(); - + $header = $this->header_model->get_data(); $nav['act']= 2; - + $this->load->view('header', $header); $this->load->view('sid/nav',$nav); $this->load->view('sid/kependudukan/penduduk_log',$data); @@ -152,12 +152,12 @@ function edit_status_dasar($p=1,$o=0,$id=0){ $data['form_action'] = site_url("penduduk_log/update_status_dasar/$p/$o/$id"); $this->load->view('sid/kependudukan/ajax_edit_status_dasar',$data); } - + function update_status_dasar($p=1,$o=0,$id=''){ $this->penduduk_model->update_status_dasar($id); redirect("penduduk_log/index/$p/$o"); } - + function cetak($o=0){ $data['main'] = $this->penduduk_model->list_data($o,0, 10000); $this->load->view('sid/kependudukan/penduduk_print',$data); @@ -165,5 +165,5 @@ function cetak($o=0){ function delete_all($p=1,$o=0){ $this->penduduk_model->delete_all(); redirect("penduduk_log/index/$p/$o"); - } -} \ No newline at end of file + } +} diff --git a/app/controllers/Pengurus.php b/app/controllers/Pengurus.php index 4acecd20f..7b30167be 100644 --- a/app/controllers/Pengurus.php +++ b/app/controllers/Pengurus.php @@ -2,25 +2,25 @@ class Pengurus extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $this->load->model('pamong_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2) redirect('siteman'); - $this->load->model('header_model'); + $this->load->model('header_model'); } - + function clear(){ unset($_SESSION['cari']); unset($_SESSION['filter']); redirect('pengurus'); } function index(){ - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; @@ -28,16 +28,16 @@ function index(){ $data['keyword'] = $this->pamong_model->autocomplete(); $nav['act']= 1; $header = $this->header_model->get_data(); - + $this->load->view('header',$header); - + $this->load->view('home/nav',$nav); $this->load->view('home/pengurus',$data); $this->load->view('footer'); } - + function form($id=''){ - + if($id){ $data['pamong'] = $this->pamong_model->get_data($id); $data['form_action'] = site_url("pengurus/update/$id"); @@ -46,11 +46,11 @@ function form($id=''){ $data['pamong'] = null; $data['form_action'] = site_url("pengurus/insert"); } - + $header = $this->header_model->get_data(); - + $this->load->view('header',$header); - + $nav['act']= 1; $this->load->view('home/nav',$nav); $this->load->view('home/pengurus_form',$data); @@ -85,5 +85,5 @@ function delete($id=''){ function delete_all(){ $this->pamong_model->delete_all(); redirect('pengurus'); - } -} \ No newline at end of file + } +} diff --git a/app/controllers/Plan.php b/app/controllers/Plan.php index 806b70973..55e5c5c21 100644 --- a/app/controllers/Plan.php +++ b/app/controllers/Plan.php @@ -2,21 +2,21 @@ class plan extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); - + $this->load->model('header_model'); $this->load->model('plan_lokasi_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1) redirect('siteman'); - - + + //$this->load->library('ion_auth'); - + //$this->config->item('ion_auth') ; $this->load->database(); - - + + } function clear(){ unset($_SESSION['cari']); @@ -28,11 +28,11 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; @@ -42,33 +42,33 @@ function index($p=1,$o=0){ if(isset($_SESSION['subpoint'])) $data['subpoint'] = $_SESSION['subpoint']; else $data['subpoint'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->plan_lokasi_model->paging($p,$o); $data['main'] = $this->plan_lokasi_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->plan_lokasi_model->autocomplete(); $data['list_point'] = $this->plan_lokasi_model->list_point(); $data['list_subpoint'] = $this->plan_lokasi_model->list_subpoint(); - + $header = $this->header_model->get_data(); $nav['act']=3; - + $this->load->view('header-gis', $header); $this->load->view('plan/nav',$nav); $this->load->view('lokasi/table',$data); $this->load->view('footer'); - + } function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + $data['desa'] = $this->plan_lokasi_model->get_desa(); $data['list_point'] = $this->plan_lokasi_model->list_point(); $data['dusun'] = $this->plan_lokasi_model->list_dusun(); - + if($id){ $data['lokasi'] = $this->plan_lokasi_model->get_lokasi($id); $data['form_action'] = site_url("plan/update/$id/$p/$o"); @@ -78,14 +78,14 @@ function form($p=1,$o=0,$id=''){ $data['form_action'] = site_url("plan/insert"); } $header= $this->header_model->get_data(); - + $nav['act']=3; $this->load->view('header-gis', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('lokasi/form',$data); $this->load->view('footer'); - + } function ajax_lokasi_maps($p=1,$o=0,$id=''){ $data['p'] = $p; @@ -94,12 +94,12 @@ function ajax_lokasi_maps($p=1,$o=0,$id=''){ $data['lokasi'] = $this->plan_lokasi_model->get_lokasi($id); else $data['lokasi'] = null; - + $data['desa'] = $this->plan_lokasi_model->get_desa(); $data['form_action'] = site_url("plan/update_maps/$p/$o/$id"); $this->load->view("lokasi/maps", $data); } - + function update_maps($p=1,$o=0,$id=''){ $this->plan_lokasi_model->update_position($id); redirect("plan/index/$p/$o"); @@ -157,4 +157,4 @@ function lokasi_unlock($id=''){ $this->plan_lokasi_model->lokasi_lock($id,2); redirect("plan/index/$p/$o"); } -} \ No newline at end of file +} diff --git a/app/controllers/Point.php b/app/controllers/Point.php index 716421c23..21d11bb62 100644 --- a/app/controllers/Point.php +++ b/app/controllers/Point.php @@ -2,13 +2,13 @@ class point extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); - + $this->load->model('header_model'); $this->load->model('plan_point_model'); $this->load->database(); - + } function clear(){ unset($_SESSION['cari']); @@ -16,40 +16,40 @@ function clear(){ redirect('point'); } function index($p=1,$o=0){ - + $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->plan_point_model->paging($p,$o); $data['main'] = $this->plan_point_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->plan_point_model->autocomplete(); $header= $this->header_model->get_data(); $nav['act']=0; - + $this->load->view('header', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('point/table',$data); $this->load->view('footer'); - + } function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - - - + + + if($id){ $data['point'] = $this->plan_point_model->get_point($id); $data['form_action'] = site_url("point/update/$id/$p/$o"); @@ -60,33 +60,33 @@ function form($p=1,$o=0,$id=''){ } $data['simbol'] = $this->plan_point_model->list_simbol(); $header = $this->header_model->get_data(); - + $nav['act']=0; $this->load->view('header', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('point/form',$data); $this->load->view('footer'); - + } function sub_point($point=1){ $data['subpoint'] = $this->plan_point_model->list_sub_point($point); - $data['point'] = $point; + $data['point'] = $point; $header = $this->header_model->get_data(); $nav['act']=0; - + $this->load->view('header', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('point/sub_point_table',$data); $this->load->view('footer'); - + } function ajax_add_sub_point($point=0,$id=0){ - - - - + + + + if($id){ $data['point'] = $this->plan_point_model->get_point($id); $data['form_action'] = site_url("point/update_sub_point/$point/$id"); @@ -135,7 +135,7 @@ function point_lock($id=''){ function point_unlock($id=''){ $this->plan_point_model->point_lock($id,2); redirect("point/index/$p/$o"); - } + } function insert_sub_point($point=''){ $this->plan_point_model->insert_sub_point($point); redirect("point/sub_point/$point"); @@ -160,4 +160,4 @@ function point_unlock_sub_point($point='',$id=''){ $this->plan_point_model->point_lock($id,2); redirect("point/sub_point/$point"); } -} \ No newline at end of file +} diff --git a/app/controllers/Polygon.php b/app/controllers/Polygon.php index b49006cdd..e546cdd68 100644 --- a/app/controllers/Polygon.php +++ b/app/controllers/Polygon.php @@ -2,13 +2,13 @@ class polygon extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); - + $this->load->model('header_model'); $this->load->model('plan_polygon_model'); - - + + $this->load->database(); } function clear(){ @@ -19,38 +19,38 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->plan_polygon_model->paging($p,$o); $data['main'] = $this->plan_polygon_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->plan_polygon_model->autocomplete(); $header= $this->header_model->get_data(); $nav['act']=5; - + $this->load->view('header-gis', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('polygon/table',$data); $this->load->view('footer'); - + } function form($p=1,$o=0,$id=''){ - + $data['p'] = $p; $data['o'] = $o; - - - + + + if($id){ $data['polygon'] = $this->plan_polygon_model->get_polygon($id); $data['form_action'] = site_url("polygon/update/$id/$p/$o"); @@ -60,28 +60,28 @@ function form($p=1,$o=0,$id=''){ $data['form_action'] = site_url("polygon/insert"); } $header= $this->header_model->get_data(); - + $nav['act']=5; $this->load->view('header-gis', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('polygon/form',$data); $this->load->view('footer'); - + } function sub_polygon($polygon=1){ - + $data['subpolygon'] = $this->plan_polygon_model->list_sub_polygon($polygon); - $data['polygon'] = $polygon; + $data['polygon'] = $polygon; $header= $this->header_model->get_data(); $nav['act']=5; - + $this->load->view('header-gis', $header); - + $this->load->view('plan/nav',$nav); $this->load->view('polygon/sub_polygon_table',$data); $this->load->view('footer'); - + } function ajax_add_sub_polygon($polygon=0,$id=0){ if($id){ @@ -93,13 +93,13 @@ function ajax_add_sub_polygon($polygon=0,$id=0){ $data['form_action'] = site_url("polygon/insert_sub_polygon/$polygon"); } $header= $this->header_model->get_data(); - + $nav['act']=5; $this->load->view('header-gis', $header); - + $this->load->view('plan/nav',$nav); $this->load->view("polygon/ajax_add_sub_polygon_form",$data); - + } function search(){ $cari = $this->input->post('cari'); @@ -138,7 +138,7 @@ function polygon_lock($id=''){ function polygon_unlock($id=''){ $this->plan_polygon_model->polygon_lock($id,2); redirect("polygon/index/$p/$o"); - } + } function insert_sub_polygon($polygon=''){ $this->plan_polygon_model->insert_sub_polygon($polygon); redirect("polygon/sub_polygon/$polygon"); @@ -163,4 +163,4 @@ function polygon_unlock_sub_polygon($polygon='',$id=''){ $this->plan_polygon_model->polygon_lock($id,2); redirect("polygon/sub_polygon/$polygon"); } -} \ No newline at end of file +} diff --git a/app/controllers/Program_bantuan.php b/app/controllers/Program_bantuan.php index 70101e4f5..0d188fc73 100644 --- a/app/controllers/Program_bantuan.php +++ b/app/controllers/Program_bantuan.php @@ -2,9 +2,9 @@ class Program_bantuan extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); - + $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2) redirect('siteman'); $this->load->model('header_model'); @@ -21,7 +21,7 @@ public function index(){ public function sasaran($sasaran=0){ $header = $this->header_model->get_data(); $this->load->view('header', $header); - + $data['tampil'] = $sasaran; $data['program'] = $this->program_bantuan_model->list_program($sasaran); $this->load->view('program_bantuan/program',$data); @@ -35,7 +35,7 @@ public function detail($id){ else $data['individu']=NULL; $data['program'] = $this->program_bantuan_model->get_program($id); - + $this->load->view('program_bantuan/detail',$data); $this->load->view('footer'); } @@ -43,15 +43,15 @@ public function peserta($cat=0,$id=0){ $header = $this->header_model->get_data(); $this->load->view('header', $header); $data['program'] = $this->program_bantuan_model->get_peserta_program($cat,$id); - + $this->load->view('program_bantuan/peserta',$data); $this->load->view('footer'); } public function create(){ - + $this->load->helper('form'); $this->load->library('form_validation'); - + $this->form_validation->set_rules('cid', 'Sasaran', 'required'); $this->form_validation->set_rules('nama', 'Nama Program', 'required'); $this->form_validation->set_rules('sdate', 'Tanggal awal', 'required'); @@ -69,7 +69,7 @@ public function create(){ public function edit($id){ $this->load->helper('form'); $this->load->library('form_validation'); - + $this->form_validation->set_rules('cid', 'Sasaran', 'required'); $this->form_validation->set_rules('nama', 'Nama Program', 'required'); $this->form_validation->set_rules('sdate', 'Tanggal awal', 'required'); @@ -83,7 +83,7 @@ public function edit($id){ $this->program_bantuan_model->update_program($id); redirect("program_bantuan/"); } - + $this->load->view('footer'); } public function update($id){ @@ -97,11 +97,11 @@ public function hapus($id){ } public function unduhsheet($id=0){ if($id > 0){ - + $data['desa'] = $this->header_model->get_data(); $data['peserta'] = $this->program_bantuan_model->get_program($id); $this->load->view('program_bantuan/unduh-sheet',$data); - + } } -} \ No newline at end of file +} diff --git a/app/controllers/Rtm.php b/app/controllers/Rtm.php index f2235a90f..998811668 100644 --- a/app/controllers/Rtm.php +++ b/app/controllers/Rtm.php @@ -2,7 +2,7 @@ class rtm extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $this->load->model('rtm_model'); $this->load->model('penduduk_model'); @@ -28,11 +28,11 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; @@ -42,39 +42,39 @@ function index($p=1,$o=0){ if(isset($_SESSION['id_blt'])) $data['id_blt'] = $_SESSION['id_blt']; else $data['id_blt'] = ''; - + if(isset($_SESSION['id_bos'])) $data['id_bos'] = $_SESSION['id_bos']; else $data['id_bos'] = ''; - + if(isset($_SESSION['id_pkh'])) $data['id_pkh'] = $_SESSION['id_pkh']; else $data['id_pkh'] = ''; - + if(isset($_SESSION['id_jampersal'])) $data['id_jampersal'] = $_SESSION['id_jampersal']; else $data['id_jampersal'] = ''; if(isset($_SESSION['id_bedah_rumah'])) $data['id_bedah_rumah'] = $_SESSION['id_bedah_rumah']; else $data['id_bedah_rumah'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + if(isset($_SESSION['dusun'])){ $data['dusun'] = $_SESSION['dusun']; $data['list_rw'] = $this->penduduk_model->list_rw($data['dusun']); - + if(isset($_SESSION['rw'])){ $data['rw'] = $_SESSION['rw']; $data['list_rt'] = $this->penduduk_model->list_rt($data['dusun'],$data['rw']); - + if(isset($_SESSION['rt'])) $data['rt'] = $_SESSION['rt']; else $data['rt'] = ''; - + }else $data['rw'] = ''; - + }else{ $data['dusun'] = ''; $data['rw'] = ''; @@ -128,7 +128,7 @@ function dusun($s=0){ else redirect('rtm'); } - + function rw($s=0){ $rw = $this->input->post('rw'); if($rw!="") @@ -212,12 +212,12 @@ function delete($p=1,$o=0,$id=''){ function delete_all($p=1,$o=0){ $this->rtm_model->delete_all(); redirect('rtm'); - } + } function anggota($p=1,$o=0,$id=0){ $data['p'] = $p; $data['o'] = $o; $data['kk'] = $id; - + $data['main'] = $this->rtm_model->list_anggota($id); $data['kepala_kk']= $this->rtm_model->get_kepala_kk($id); $nav['act']= 3; @@ -227,7 +227,7 @@ function anggota($p=1,$o=0,$id=0){ $this->load->view('sid/kependudukan/rtm_anggota',$data); $this->load->view('footer'); } - + function ajax_add_anggota($p=1,$o=0,$id=0){ $data['p'] = $p; $data['o'] = $o; @@ -238,12 +238,12 @@ function ajax_add_anggota($p=1,$o=0,$id=0){ else $data['kepala_kk'] = NULL; $data['penduduk'] = $this->rtm_model->list_penduduk_lepas(); - + $data['form_action'] = site_url("rtm/add_anggota/$p/$o/$id"); - + $this->load->view("sid/kependudukan/ajax_add_anggota_rtm_form", $data); } - + function edit_anggota($p=1,$o=0,$id_kk=0,$id=0){ $data['p'] = $p; $data['o'] = $o; @@ -260,25 +260,25 @@ function kartu_rtm($p=1,$o=0,$id=0){ $data['main'] = $this->rtm_model->list_anggota($id); $kk = $this->rtm_model->get_kepala_kk($id); $data['desa'] = $this->rtm_model->get_desa(); - + if($kk) $data['kepala_kk'] = $kk; - + else $data['kepala_kk'] = NULL; - + $data['penduduk'] = $this->rtm_model->list_penduduk_lepas(); $nav['act']= 3; $header = $this->header_model->get_data(); $this->load->view('header',$header); $this->load->view('sid/nav',$nav); $data['form_action'] = site_url("rtm/print"); - + $this->load->view("sid/kependudukan/kartu_rtm", $data); $this->load->view('footer'); - + } - + function cetak_kk($id=0){ $data['id_kk'] = $id; $data['main'] = $this->rtm_model->list_anggota($id); @@ -288,9 +288,9 @@ function cetak_kk($id=0){ $nav['act']= 3; $header = $this->header_model->get_data(); $this->load->view("sid/kependudukan/cetak_rtm", $data); - + } - + function add_anggota($p=1,$o=0,$id=0){ $this->rtm_model->add_anggota($id); redirect("rtm/anggota/$p/$o/$id"); @@ -306,9 +306,9 @@ function delete_anggota($p=1,$o=0,$kk=0,$id=''){ function delete_all_anggota($p=1,$o=0,$kk=0){ $this->rtm_model->rem_all_anggota($kk); redirect("rtm/anggota/$p/$o/$kk"); - } + } function cetak_statistik($tipe=0){ $data['main'] = $this->rtm_model->list_data_statistik($tipe); $this->load->view('sid/kependudukan/rtm_print',$data); } -} \ No newline at end of file +} diff --git a/app/controllers/Sid_core.php b/app/controllers/Sid_core.php index 5641da34a..147e7b1a5 100644 --- a/app/controllers/Sid_core.php +++ b/app/controllers/Sid_core.php @@ -2,9 +2,9 @@ class Sid_Core extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $_SESSION['filter'] = 77; - + unset($_SESSION['log']); $_SESSION['status_dasar']=1; unset($_SESSION['cari']); @@ -14,7 +14,7 @@ function __construct(){ unset($_SESSION['cacat']); unset($_SESSION['menahun']); unset($_SESSION['cacatx']); - unset($_SESSION['menahunx']); + unset($_SESSION['menahunx']); unset($_SESSION['golongan_darah']); unset($_SESSION['dusun']); unset($_SESSION['rw']); @@ -32,7 +32,7 @@ function __construct(){ unset($_SESSION['status_penduduk']); unset($_SESSION['judul_statistik']); unset($_SESSION['hamil']); - + $this->load->model('user_model'); $this->load->model('wilayah_model'); $this->load->model('config_model'); @@ -40,7 +40,7 @@ function __construct(){ if($grup!=1 AND $grup!=2) redirect('siteman'); $this->load->model('header_model'); } - + function clear(){ unset($_SESSION['cari']); unset($_SESSION['filter']); @@ -49,15 +49,15 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; $data['grup'] = $this->user_model->sesi_grup($_SESSION['sesi']); @@ -84,11 +84,11 @@ function excel(){ $data['total'] = $this->wilayah_model->total(); $this->load->view('sid/wilayah/wilayah_excel',$data); } - + function form($id=''){ - + $data['penduduk'] = $this->wilayah_model->list_penduduk(); - + if($id){ $temp = $this->wilayah_model->cluster_by_id($id); $data['dusun'] = $temp['dusun']; @@ -98,14 +98,14 @@ function form($id=''){ else{ $ex = $data['individu']; $data['penduduk'] = $this->wilayah_model->list_penduduk_ex($ex['id']); - } + } $data['form_action'] = site_url("sid_core/update/$id"); } else{ $data['dusun'] = null; $data['form_action'] = site_url("sid_core/insert"); } - + $nav['act']= 0; $header = $this->header_model->get_data(); $this->load->view('header',$header); @@ -135,7 +135,7 @@ function delete($id=''){ function delete_all(){ $this->wilayah_model->delete_all(); redirect('sid_core'); - } + } function sub_rw($id_dusun=''){ $dusun = $this->wilayah_model->cluster_by_id($id_dusun); $nama_dusun = $dusun['dusun']; @@ -150,7 +150,7 @@ function sub_rw($id_dusun=''){ $this->load->view('sid/wilayah/wilayah_rw',$data); $this->load->view('footer'); } - + function cetak_rw($id_dusun=''){ $dusun = $this->wilayah_model->cluster_by_id($id_dusun); $nama_dusun = $dusun['dusun']; @@ -169,16 +169,16 @@ function excel_rw($id_dusun=''){ $data['total'] = $this->wilayah_model->total_rw($nama_dusun ); $this->load->view('sid/wilayah/wilayah_rw_excel',$data); } - + function form_rw($id_dusun='',$rw=''){ - + $temp = $this->wilayah_model->cluster_by_id($id_dusun); $dusun = $temp['dusun']; $data['dusun'] = $temp['dusun']; $data['id_dusun'] = $id_dusun; - + $data['penduduk'] = $this->wilayah_model->list_penduduk(); - + if($rw){ $data['rw'] = $rw; $temp = $this->wilayah_model->get_rw($dusun,$rw); @@ -188,14 +188,14 @@ function form_rw($id_dusun='',$rw=''){ else{ $ex = $data['individu']; $data['penduduk'] = $this->wilayah_model->list_penduduk_ex($ex['id']); - } + } $data['form_action'] = site_url("sid_core/update_rw/$id_dusun/$rw"); } else{ $data['rw'] = null; $data['form_action'] = site_url("sid_core/insert_rw/$id_dusun"); } - + $nav['act']= 0; $header = $this->header_model->get_data(); $this->load->view('header',$header); @@ -203,17 +203,17 @@ function form_rw($id_dusun='',$rw=''){ $this->load->view('sid/wilayah/wilayah_form_rw',$data); $this->load->view('footer'); } - + function insert_rw($dusun=''){ $this->wilayah_model->insert_rw($dusun); redirect("sid_core/sub_rw/$dusun"); } - + function update_rw($dusun='',$rw=''){ $this->wilayah_model->update_rw($dusun,$rw); redirect("sid_core/sub_rw/$dusun"); } - + function delete_rw($id_dusun='',$id=''){ $this->wilayah_model->delete_rw($id); redirect("sid_core/sub_rw/$id_dusun"); @@ -221,14 +221,14 @@ function delete_rw($id_dusun='',$id=''){ function delete_all_rw($dusun=''){ $this->wilayah_model->delete_all_rw(); redirect("sid_core/sub_rw/$dusun"); - } - + } + function sub_rt($id_dusun='',$rw=''){ $temp = $this->wilayah_model->cluster_by_id($id_dusun); $dusun = $temp['dusun']; $data['dusun'] = $temp['dusun']; $data['id_dusun'] = $id_dusun; - + $data['rw'] = $rw; $data['main'] = $this->wilayah_model->list_data_rt($dusun,$rw); $data['total'] = $this->wilayah_model->total_rt($dusun,$rw); @@ -239,13 +239,13 @@ function sub_rt($id_dusun='',$rw=''){ $this->load->view('sid/wilayah/wilayah_rt',$data); $this->load->view('footer'); } - + function cetak_rt($id_dusun='',$rw=''){ $temp = $this->wilayah_model->cluster_by_id($id_dusun); $dusun = $temp['dusun']; $data['dusun'] = $temp['dusun']; $data['id_dusun'] = $id_dusun; - + $data['rw'] = $rw; $data['main'] = $this->wilayah_model->list_data_rt($dusun,$rw); $data['total'] = $this->wilayah_model->total_rt($dusun,$rw); @@ -256,7 +256,7 @@ function excel_rt($id_dusun='',$rw=''){ $dusun = $temp['dusun']; $data['dusun'] = $temp['dusun']; $data['id_dusun'] = $id_dusun; - + $data['rw'] = $rw; $data['main'] = $this->wilayah_model->list_data_rt($dusun,$rw); $data['total'] = $this->wilayah_model->total_rt($dusun,$rw); @@ -273,17 +273,17 @@ function list_dusun_rt($dusun='',$rw=''){ $this->load->view('sid/wilayah/list_dusun_rt',$data); $this->load->view('footer'); } - + function form_rt($id_dusun='',$rw='',$rt=''){ - + $temp = $this->wilayah_model->cluster_by_id($id_dusun); $dusun = $temp['dusun']; $data['dusun'] = $temp['dusun']; $data['id_dusun'] = $id_dusun; - + $data['rw'] = $rw; $data['penduduk'] = $this->wilayah_model->list_penduduk(); - + if($rt){ $temp2 = $this->wilayah_model->cluster_by_id($rt); $id_cluster=$temp2['id']; @@ -294,14 +294,14 @@ function form_rt($id_dusun='',$rw='',$rt=''){ else{ $ex = $data['individu']; $data['penduduk'] = $this->wilayah_model->list_penduduk_ex($ex['id']); - } + } $data['form_action'] = site_url("sid_core/update_rt/$id_dusun/$rw/$id_cluster"); } else{ $data['rt'] = null; $data['form_action'] = site_url("sid_core/insert_rt/$id_dusun/$rw"); } - + $nav['act']= 0; $header = $this->header_model->get_data(); $this->load->view('header',$header); @@ -309,17 +309,17 @@ function form_rt($id_dusun='',$rw='',$rt=''){ $this->load->view('sid/wilayah/wilayah_form_rt',$data); $this->load->view('footer'); } - + function insert_rt($dusun='',$rw=''){ $this->wilayah_model->insert_rt($dusun,$rw); redirect("sid_core/sub_rt/$dusun/$rw"); } - + function update_rt($dusun='',$rw='',$id_cluster=0){ $this->wilayah_model->update_rt($id_cluster); redirect("sid_core/sub_rt/$dusun/$rw"); } - + function delete_rt($id_cluster=''){ $temp = $this->wilayah_model->cluster_by_id($id_cluster); $id_dusun=$temp['id']; @@ -335,7 +335,7 @@ function delete_all_rt(){ $rw=$temp['rw']; $this->wilayah_model->delete_all_rt(); redirect("sid_core"); - } + } function cetakx(){ $data['input'] = $_POST; $data['tanggal_sekarang'] = tgl_indo(date("Y m d")); @@ -343,15 +343,15 @@ function cetakx(){ $this->surat_keluar_model->log_surat($f,$id,$g,$u); $this->load->view('surat/print_surat_ket_pengantar',$data); } - + function ajax_wil_maps($id=0){ $data['dusun'] = $this->wilayah_model->get_dusun_maps($id); $data['desa'] = $this->config_model->get_data(); $data['form_action'] = site_url("sid_core/update_dusun_map/$id"); - + $this->load->view("sid/wilayah/ajax_wil_dusun", $data); } - + function update_dusun_map($id=0){ $this->wilayah_model->update_dusun_map($id); redirect("sid_core"); @@ -360,33 +360,33 @@ function ajax_rw_maps($dus=0,$id=0){ $data['dusun'] = $this->wilayah_model->get_rw($dus,$id); $data['desa'] = $this->config_model->get_data(); $data['form_action'] = site_url("sid_core/update_rw_map/$dus/$id"); - + $this->load->view("sid/wilayah/ajax_wil_dusun", $data); } - + function update_rw_map($dus=0,$id=0){ $this->wilayah_model->update_rw_map($dus,$id); redirect("sid_core/sub_rw/$dus"); } - + function ajax_rt_maps($dus=0,$rw=0,$id=0){ $data['dusun'] = $this->wilayah_model->get_rt($dus,$rw,$id); $data['desa'] = $this->config_model->get_data(); $data['form_action'] = site_url("sid_core/update_rt_map/$dus/$rw/$id"); - + $this->load->view("sid/wilayah/ajax_wil_dusun", $data); } - + function update_rt_map($dus=0,$rw=0,$id=0){ $this->wilayah_model->update_rt_map($dus,$rw,$id); redirect("sid_core/sub_rt/$dus/$rw"); } - + function warga($id=''){ $temp = $this->wilayah_model->cluster_by_id($id); $id_dusun=$temp['id']; $dusun=$temp['dusun']; - + $_SESSION['per_page'] = 100; $_SESSION['dusun'] = $dusun; redirect("penduduk/index/1/0"); @@ -403,7 +403,7 @@ function warga_l($id=''){ $temp = $this->wilayah_model->cluster_by_id($id); $id_dusun=$temp['id']; $dusun=$temp['dusun']; - + $_SESSION['per_page'] = 100; $_SESSION['dusun'] = $dusun; $_SESSION['sex'] = 1; @@ -413,16 +413,16 @@ function warga_p($id=''){ $temp = $this->wilayah_model->cluster_by_id($id); $id_dusun=$temp['id']; $dusun=$temp['dusun']; - + $_SESSION['per_page'] = 100; $_SESSION['dusun'] = $dusun; $_SESSION['sex'] = 2; redirect("penduduk/index/1/0"); } - + function migrate(){ $this->wilayah_model->migrate(); - + $this->dbforge->drop_table('tweb_dusun_x'); $this->dbforge->drop_table('tweb_rw_x'); $this->dbforge->drop_table('tweb_rt_x'); @@ -430,7 +430,7 @@ function migrate(){ $this->dbforge->drop_table('tweb_keluarga_x_pindah'); $this->dbforge->drop_table('tweb_penduduk_x'); $this->dbforge->drop_table('tweb_penduduk_x_pindah'); - + redirect("penduduk/clear"); } function pre_migrate(){ @@ -441,5 +441,5 @@ function pre_migrate(){ $this->load->view('sid/wilayah/mig'); $this->load->view('footer'); } - -} \ No newline at end of file + +} diff --git a/app/controllers/Siteman.php b/app/controllers/Siteman.php index b8e7d1148..19a3f6810 100644 --- a/app/controllers/Siteman.php +++ b/app/controllers/Siteman.php @@ -2,7 +2,7 @@ class Siteman extends CI_Controller { function __construct(){ parent::__construct(); - session_start(); + $this->load->model('header_model'); $this->load->model('user_model'); $this->load->model('config_model'); @@ -10,8 +10,8 @@ function __construct(){ function index(){ $this->user_model->logout(); $header = $this->header_model->get_config(); - - + + if(!isset($_SESSION['siteman'])) $_SESSION['siteman']=0; $_SESSION['success'] = 0; @@ -20,7 +20,7 @@ function index(){ $_SESSION['pengumuman'] = 0; $_SESSION['sesi'] = "kosong"; $_SESSION['timeout'] = 0; - + $this->load->view('siteman',$header); $_SESSION['siteman']=0; } @@ -33,4 +33,4 @@ function login(){ $this->user_model->logout(); redirect('siteman'); } -} \ No newline at end of file +} diff --git a/app/controllers/Sms.php b/app/controllers/Sms.php index 9ab5a5fab..ded87ccb4 100644 --- a/app/controllers/Sms.php +++ b/app/controllers/Sms.php @@ -2,7 +2,7 @@ class SMS extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $this->load->model('sms_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); @@ -14,15 +14,15 @@ function clear(){ unset($_SESSION['cari']); unset($_SESSION['filter']); unset($_SESSION['cari1']); - unset($_SESSION['sex1']); - unset($_SESSION['dusun1']); - unset($_SESSION['rw1']); + unset($_SESSION['sex1']); + unset($_SESSION['dusun1']); + unset($_SESSION['rw1']); unset($_SESSION['rt1']); unset($_SESSION['agama1']); unset($_SESSION['pekerjaan1']); unset($_SESSION['status1']); unset($_SESSION['pendidikan1']); - unset($_SESSION['status_penduduk1']); + unset($_SESSION['status_penduduk1']); unset($_SESSION['TextDecoded1']); unset($_SESSION['grup1']); redirect('sms'); @@ -30,24 +30,24 @@ function clear(){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->sms_model->paging($p,$o); $data['main'] = $this->sms_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->sms_model->autocomplete(); $header = $this->header_model->get_data(); $menu['act']='0'; - + $this->load->view('header', $header); $this->load->view('sms/nav',$menu); $this->load->view('sms/manajemen_sms_table',$data); @@ -55,15 +55,15 @@ function index($p=1,$o=0){ unset($_SESSION['cari']); unset($_SESSION['filter']); unset($_SESSION['cari1']); - unset($_SESSION['sex1']); - unset($_SESSION['dusun1']); - unset($_SESSION['rw1']); + unset($_SESSION['sex1']); + unset($_SESSION['dusun1']); + unset($_SESSION['rw1']); unset($_SESSION['rt1']); unset($_SESSION['agama1']); unset($_SESSION['pekerjaan1']); unset($_SESSION['status1']); unset($_SESSION['pendidikan1']); - unset($_SESSION['status_penduduk1']); + unset($_SESSION['status_penduduk1']); unset($_SESSION['TextDecoded1']); unset($_SESSION['grup1']); } @@ -72,7 +72,7 @@ function setting($p=1,$o=0){ $data['form_action'] = site_url("sms/insert_autoreply"); $header = $this->header_model->get_data(); $menu['act']='1'; - + $this->load->view('header', $header); $this->load->view('sms/nav',$menu); $this->load->view('sms/setting',$data); @@ -85,21 +85,21 @@ function insert_autoreply(){ function polling($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari_polling'])) $data['cari_polling'] = $_SESSION['cari_polling']; else $data['cari_polling'] = ''; - - if(isset($_POST['per_page'])) + + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->sms_model->paging_polling($p,$o); $data['main'] = $this->sms_model->list_data_polling($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->sms_model->autocomplete(); $header = $this->header_model->get_data(); $menu['act']='3'; - + $this->load->view('header', $header); $this->load->view('sms/nav',$menu); $this->load->view('sms/polling',$data); @@ -108,24 +108,24 @@ function polling($p=1,$o=0){ function outbox($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->sms_model->paging_terkirim($p,$o); $data['main'] = $this->sms_model->list_data_terkirim($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->sms_model->autocomplete(); $header = $this->header_model->get_data(); $menu['act']='0'; - + $this->load->view('header', $header); $this->load->view('sms/nav',$menu); $this->load->view('sms/create_sms',$data); @@ -133,39 +133,39 @@ function outbox($p=1,$o=0){ unset($_SESSION['cari']); unset($_SESSION['filter']); unset($_SESSION['cari1']); - unset($_SESSION['sex1']); - unset($_SESSION['dusun1']); - unset($_SESSION['rw1']); + unset($_SESSION['sex1']); + unset($_SESSION['dusun1']); + unset($_SESSION['rw1']); unset($_SESSION['rt1']); unset($_SESSION['agama1']); unset($_SESSION['pekerjaan1']); unset($_SESSION['status1']); unset($_SESSION['pendidikan1']); - unset($_SESSION['status_penduduk1']); + unset($_SESSION['status_penduduk1']); unset($_SESSION['TextDecoded1']); unset($_SESSION['grup1']); } function sentitem($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->sms_model->paging_terkirim($p,$o); $data['main'] = $this->sms_model->list_data_terkirim($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->sms_model->autocomplete(); $header = $this->header_model->get_data(); $menu['act']='0'; - + $this->load->view('header', $header); $this->load->view('sms/nav',$menu); $this->load->view('sms/berita_terkirim',$data); @@ -173,39 +173,39 @@ function sentitem($p=1,$o=0){ unset($_SESSION['cari']); unset($_SESSION['filter']); unset($_SESSION['cari1']); - unset($_SESSION['sex1']); - unset($_SESSION['dusun1']); - unset($_SESSION['rw1']); + unset($_SESSION['sex1']); + unset($_SESSION['dusun1']); + unset($_SESSION['rw1']); unset($_SESSION['rt1']); unset($_SESSION['agama1']); unset($_SESSION['pekerjaan1']); unset($_SESSION['status1']); unset($_SESSION['pendidikan1']); - unset($_SESSION['status_penduduk1']); + unset($_SESSION['status_penduduk1']); unset($_SESSION['TextDecoded1']); unset($_SESSION['grup1']); } function pending($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->sms_model->paging_tertunda($p,$o); $data['main'] = $this->sms_model->list_data_tertunda($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->sms_model->autocomplete(); $header = $this->header_model->get_data(); $menu['act']='0'; - + $this->load->view('header', $header); $this->load->view('sms/nav',$menu); $this->load->view('sms/pesan_tertunda',$data); @@ -213,22 +213,22 @@ function pending($p=1,$o=0){ unset($_SESSION['cari']); unset($_SESSION['filter']); unset($_SESSION['cari1']); - unset($_SESSION['sex1']); - unset($_SESSION['dusun1']); - unset($_SESSION['rw1']); + unset($_SESSION['sex1']); + unset($_SESSION['dusun1']); + unset($_SESSION['rw1']); unset($_SESSION['rt1']); unset($_SESSION['agama1']); unset($_SESSION['pekerjaan1']); unset($_SESSION['status1']); unset($_SESSION['pendidikan1']); - unset($_SESSION['status_penduduk1']); + unset($_SESSION['status_penduduk1']); unset($_SESSION['TextDecoded1']); unset($_SESSION['grup1']); } function form($p=1,$o=0,$tipe=0,$id=0){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['sms'] = $this->sms_model->get_sms($tipe,$id); $data['form_action'] = site_url("sms/insert/$tipe"); @@ -247,12 +247,12 @@ function form($p=1,$o=0,$tipe=0,$id=0){ } } function carikontak($tipe=0){ - if(isset($_POST['TextDecoded'])) + if(isset($_POST['TextDecoded'])) $data['text']['TextDecoded']=$_POST['TextDecoded']; $data['text']['TextDecoded'] = null; - + $data['form_action'] = site_url("sms/formaftercari/0/0/$tipe"); - + $data['kontak'] = $this->sms_model->list_kontak(); $this->load->view('sms/ajax_sms_form_cari',$data); } @@ -272,23 +272,23 @@ function send_broadcast(){ if(isset($_SESSION['sex1'])) $data['sex1'] = $_SESSION['sex1']; else $data['sex1'] = ''; - + if(isset($_SESSION['dusun1'])){ $data['dusun1'] = $_SESSION['dusun1']; $data['list_rw1'] = $this->penduduk_model->list_rw($data['dusun1']); - + if(isset($_SESSION['rw1'])){ $data['rw1'] = $_SESSION['rw1']; $data['list_rt1'] = $this->penduduk_model->list_rt($data['dusun1'],$data['rw11']); - + if(isset($_SESSION['rt1'])) $data['rt1'] = $_SESSION['rt1']; else $data['rt1'] = ''; - + }else $data['rw1'] = ''; - + }else $data['dusun1'] = ''; - + if(isset($_SESSION['agama1'])) $data['agama1'] = $_SESSION['agama1']; else $data['agama1'] = ''; @@ -304,7 +304,7 @@ function send_broadcast(){ if(isset($_SESSION['status_penduduk1'])) $data['status_penduduk1'] = $_SESSION['status_penduduk1']; else $data['status_penduduk1'] = ''; - + if(isset($_SESSION['TextDecoded1'])) $data['TextDecoded1'] = $_SESSION['TextDecoded1']; else $data['TextDecoded1'] = ''; @@ -328,7 +328,7 @@ function broadcast_proses(){ else $_SESSION[$col[$i]]=$adv_search[$col[$i]]; } - + redirect('sms/send_broadcast'); } function broadcast(){ @@ -373,7 +373,7 @@ function search_kontak(){ $_SESSION['cari_kontak']=$cari; else unset($_SESSION['cari_kontak']); redirect('sms/kontak'); - + } function search_grup(){ $cari = $this->input->post('cari_grup'); @@ -432,24 +432,24 @@ function sms_unlock($id=''){ function kontak($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari_kontak'])) $data['cari_kontak'] = $_SESSION['cari_kontak']; else $data['cari_kontak'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->sms_model->paging_kontak($p,$o); $data['main'] = $this->sms_model->list_data_kontak($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->sms_model->autocomplete(); $header = $this->header_model->get_data(); $menu['act']='2'; - + $this->load->view('header', $header); $this->load->view('sms/nav',$menu); $this->load->view('sms/kontak',$data); @@ -483,28 +483,28 @@ function delete_all_kontak(){ function group($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari_grup'])) $data['cari_grup'] = $_SESSION['cari_grup']; else $data['cari_grup'] = ''; - - if(isset($_POST['per_page'])) + + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->sms_model->paging_grup($p,$o); $data['main'] = $this->sms_model->list_data_grup($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->sms_model->autocomplete(); $header = $this->header_model->get_data(); $menu['act']='2'; - + $this->load->view('header', $header); $this->load->view('sms/nav',$menu); $this->load->view('sms/group',$data); $this->load->view('footer'); unset($_SESSION['cari_grup']); } - function form_grup($id=0){ + function form_grup($id=0){ if($id=="0"){ $data['form_action'] = site_url("sms/grup_insert"); $data['grup']['nama_grup'] = ""; @@ -535,29 +535,29 @@ function delete_all_grup(){ function anggota($id=0,$p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari_anggota'])) $data['cari_anggota'] = $_SESSION['cari_anggota']; else $data['cari_anggota'] = ''; - - if(isset($_POST['per_page'])) + + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->sms_model->paging_anggota($id,$p,$o); $data['main'] = $this->sms_model->list_data_anggota($id,$o, $data['paging']->offset, $data['paging']->per_page); $data['grup']['nama_grup']=$id; $data['keyword'] = $this->sms_model->autocomplete(); $header = $this->header_model->get_data(); $menu['act']='2'; - + $this->load->view('header', $header); $this->load->view('sms/nav',$menu); $this->load->view('sms/group_detail',$data); $this->load->view('footer'); unset($_SESSION['cari_anggota']); } - function form_anggota($id=0){ + function form_anggota($id=0){ $data['form_action'] = site_url("sms/anggota_insert/$id"); $data['main'] = $this->sms_model->list_data_nama($id); $this->load->view('sms/ajax_anggota_form',$data); @@ -574,14 +574,14 @@ function delete_all_anggota($grup=0){ $this->sms_model->delete_all_anggota($grup); redirect("sms/anggota/$grup"); } - function form_polling($id=0){ - + function form_polling($id=0){ + $data['main'] = $this->sms_model->get_data_polling($id); - + $data['form_action'] = site_url("sms/insert_polling/$id"); $this->load->view('sms/ajax_polling_form',$data); } - function insert_polling($id=0){ + function insert_polling($id=0){ $data['insert'] = $this->sms_model->insert_polling($id); redirect("sms/polling"); } @@ -596,24 +596,24 @@ function delete_all_polling(){ function pertanyaan($id=0,$p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - - if(isset($_POST['per_page'])) + + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->sms_model->paging_pertanyaan($id,$p,$o); $data['main'] = $this->sms_model->list_data_pertanyaan($id,$o, $data['paging']->offset, $data['paging']->per_page); $data['polling']['id_polling']=$id; $data['keyword'] = $this->sms_model->autocomplete(); $header = $this->header_model->get_data(); $menu['act']='2'; - + $this->load->view('header', $header); $this->load->view('sms/nav',$menu); $this->load->view('sms/pertanyaan',$data); $this->load->view('footer'); } - function form_pertanyaan($id=0){ + function form_pertanyaan($id=0){ $data['form_action'] = site_url("sms/pertanyaan_insert/$id"); $this->load->view('sms/ajax_pertanyaan_form',$data); } @@ -621,4 +621,4 @@ function pertanyaan_insert($id=0){ $data['insert'] = $this->sms_model->insert_pertanyaan($id); redirect("sms/pertanyaan/$id"); } -} \ No newline at end of file +} diff --git a/app/controllers/Sosmed.php b/app/controllers/Sosmed.php index 6bee62486..8c4249d98 100644 --- a/app/controllers/Sosmed.php +++ b/app/controllers/Sosmed.php @@ -2,65 +2,65 @@ class sosmed extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); $this->load->model('header_model'); $this->load->model('web_sosmed_model'); } - function index(){ + function index(){ $data['main'] = $this->web_sosmed_model->get_sosmed(1); $id=$data['main']['id']; $data['form_action'] = site_url("sosmed/update/1"); $header = $this->header_model->get_data(); $nav['act']=6; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('sosmed/facebook',$data); $this->load->view('footer'); } - function twitter(){ + function twitter(){ $data['main'] = $this->web_sosmed_model->get_sosmed(2); $id=$data['main']['id']; $data['form_action'] = site_url("sosmed/update/2/$id"); $header = $this->header_model->get_data(); $nav['act']=6; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('sosmed/twitter',$data); $this->load->view('footer'); } - function instagram(){ + function instagram(){ $data['main'] = $this->web_sosmed_model->get_sosmed(5); $data['form_action'] = site_url("sosmed/update/5"); $header = $this->header_model->get_data(); $nav['act']=6; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('sosmed/google',$data); $this->load->view('footer'); } - function google(){ + function google(){ $data['main'] = $this->web_sosmed_model->get_sosmed(3); $data['form_action'] = site_url("sosmed/update/3"); $header = $this->header_model->get_data(); $nav['act']=6; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('sosmed/instagram',$data); $this->load->view('footer'); } - function youtube(){ + function youtube(){ $data['main'] = $this->web_sosmed_model->get_sosmed(4); $data['form_action'] = site_url("sosmed/update/4"); $header = $this->header_model->get_data(); $nav['act']=6; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('sosmed/youtube',$data); @@ -80,4 +80,4 @@ function update($id=''){ redirect("sosmed/instagram"); } } -} \ No newline at end of file +} diff --git a/app/controllers/Statistik.php b/app/controllers/Statistik.php index 25cdc2e2c..d86a1390f 100644 --- a/app/controllers/Statistik.php +++ b/app/controllers/Statistik.php @@ -2,8 +2,8 @@ class Statistik extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); - + + $_SESSION['filter'] = 77; unset($_SESSION['log']); $_SESSION['status_dasar']=1; @@ -14,7 +14,7 @@ function __construct(){ unset($_SESSION['cacat']); unset($_SESSION['menahun']); unset($_SESSION['cacatx']); - unset($_SESSION['menahunx']); + unset($_SESSION['menahunx']); unset($_SESSION['golongan_darah']); unset($_SESSION['dusun']); unset($_SESSION['rw']); @@ -32,19 +32,19 @@ function __construct(){ unset($_SESSION['status_penduduk']); unset($_SESSION['judul_statistik']); unset($_SESSION['hamil']); - + $this->load->model('user_model'); $this->load->model('laporan_penduduk_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); $this->load->model('header_model'); $_SESSION['per_page']= 500; - } + } function index($lap=0,$o=0){ $data['main'] = $this->laporan_penduduk_model->list_data($lap,$o); $data['lap']=$lap; $data['o']=$o; - + switch($lap){ case 0: $data['stat'] = "Pendidikan dalam KK"; break; case 1: $data['stat'] = "Pekerjaan"; break; @@ -69,7 +69,7 @@ function index($lap=0,$o=0){ case 27: $data['stat'] = "Penerima Bedah Rumah"; break; default:$data['stat'] = "Pendidikan"; } - + $nav['act']= 0; $header = $this->header_model->get_data(); $this->load->view('header',$header); @@ -77,7 +77,7 @@ function index($lap=0,$o=0){ $this->load->view('statistik/penduduk',$data); $this->load->view('footer'); } - + function clear(){ unset($_SESSION['log']); unset($_SESSION['cari']); @@ -102,8 +102,8 @@ function clear(){ function graph($lap=0){ $data['main'] = $this->laporan_penduduk_model->list_data($lap); $data['lap']=$lap; - - + + switch($lap){ case 1: $data['stat'] = "Pekerjaan"; break; case 2: $data['stat'] = "Status Perkawinan"; break; @@ -128,7 +128,7 @@ function graph($lap=0){ case 27: $data['stat'] = "Penerima Bedah Rumah"; break; default:$data['stat'] = "Pendidikan"; } - + $nav['act']= 0; $header = $this->header_model->get_data(); $this->load->view('header',$header); @@ -136,12 +136,12 @@ function graph($lap=0){ $this->load->view('statistik/penduduk_graph',$data); $this->load->view('footer'); } - + function pie($lap=0){ $data['main'] = $this->laporan_penduduk_model->list_data($lap); $data['lap']=$lap; - - + + switch($lap){ case 0: $data['stat'] = "Pendidikan Telah Ditempuh"; break; case 1: $data['stat'] = "Pekerjaan"; break; @@ -167,7 +167,7 @@ function pie($lap=0){ case 27: $data['stat'] = "Penerima Bedah Rumah"; break; default:$data['stat'] = "Pendidikan"; } - + $nav['act']= 0; $header = $this->header_model->get_data(); $this->load->view('header',$header); @@ -175,7 +175,7 @@ function pie($lap=0){ $this->load->view('statistik/penduduk_pie',$data); $this->load->view('footer'); } - + function cetak($lap=0){ $data['lap']=$lap; switch($lap){ @@ -202,7 +202,7 @@ function cetak($lap=0){ case 27: $data['stat'] = "Penerima Bedah Rumah"; break; default:$data['stat'] = "Pendidikan"; } - + $data['config'] = $this->laporan_penduduk_model->get_config(); $data['main'] = $this->laporan_penduduk_model->list_data($lap); $this->load->view('statistik/penduduk_print',$data); @@ -233,7 +233,7 @@ function excel($lap=0){ case 27: $data['stat'] = "Penerima Bedah Rumah"; break; default:$data['stat'] = "Pendidikan"; } - + $data['config'] = $this->laporan_penduduk_model->get_config(); $data['main'] = $this->laporan_penduduk_model->list_data($lap); $this->load->view('statistik/penduduk_excel',$data); @@ -264,10 +264,10 @@ function warga($lap='',$data=''){ case 27: $data['stat'] = "Penerima Bedah Rumah"; break; default:$data['stat'] = "Pendidikan"; } - + $data['config'] = $this->laporan_penduduk_model->get_config(); $data['main'] = $this->laporan_penduduk_model->list_data($lap); - + $_SESSION['per_page'] = 100; $_SESSION['data'] = $data; redirect("sid_penduduk/index/"); @@ -277,7 +277,7 @@ function rentang_umur(){ $data['main'] = $this->laporan_penduduk_model->list_data_rentang(); $header = $this->header_model->get_data(); $menu['act']='2'; - + $this->load->view('header', $header); //$this->load->view('statistik/menu'); $this->load->view('statistik/nav',$menu); @@ -293,10 +293,10 @@ function form_rentang($id=0){ } else{ $data['form_action'] = site_url("statistik/rentang_update/$id"); - $data['rentang'] = $this->laporan_penduduk_model->get_rentang($id); + $data['rentang'] = $this->laporan_penduduk_model->get_rentang($id); } $this->load->view('statistik/ajax_rentang_form',$data); - + } function rentang_insert(){ $data['insert'] = $this->laporan_penduduk_model->insert_rentang(); @@ -309,9 +309,9 @@ function rentang_update($id=0){ function rentang_delete($id=0){ $this->laporan_penduduk_model->delete_rentang($id); redirect('statistik/rentang_umur'); - } + } function delete_all_rentang(){ $this->laporan_penduduk_model->delete_all_rentang(); redirect('statistik/rentang_umur'); - } -} \ No newline at end of file + } +} diff --git a/app/controllers/Surat.php b/app/controllers/Surat.php index 14218124c..0968491a2 100644 --- a/app/controllers/Surat.php +++ b/app/controllers/Surat.php @@ -2,7 +2,7 @@ class Surat extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); @@ -19,10 +19,10 @@ function index(){ $data['menu_surat'] = $this->surat_model->list_surat(); $data['menu_surat2'] = $this->surat_model->list_surat2(); $data['surat_favorit'] = $this->surat_model->list_surat_fav(); - + $this->load->view('header', $header); $nav['act']= 1; - + $this->load->view('surat/nav',$nav); $this->load->view('surat/format_surat',$data); $this->load->view('footer'); @@ -31,7 +31,7 @@ function panduan(){ $header = $this->header_model->get_data(); $this->load->view('header', $header); $nav['act']= 4; - + $this->load->view('surat/nav',$nav); $this->load->view('surat/panduan'); $this->load->view('footer'); @@ -40,13 +40,13 @@ function form($url=''){ $data['url']=$url; if(isset($_POST['nik'])) $_SESSION['nik'] = $_POST['nik']; - + if(isset($_POST['nik_ayah'])) $_SESSION['nik_ayah'] = $_POST['nik_ayah']; - + if(isset($_POST['nik_ibu'])) $_SESSION['nik_ibu'] = $_POST['nik_ibu']; - + if(isset($_SESSION['nik'])){ $data['individu']=$this->surat_model->get_penduduk($_SESSION['nik']); $data['ayah']=$this->surat_model->get_penduduk($_SESSION['nik_ayah']); @@ -62,56 +62,56 @@ function form($url=''){ } $data['penduduk'] = $this->surat_model->list_penduduk(); $data['pamong'] = $this->surat_model->list_pamong(); - + $data['form_action'] = site_url("surat/cetak/$url"); $data['form_action2'] = site_url("surat/doc/$url"); $nav['act']= 1; $header = $this->header_model->get_data(); $this->load->view('header',$header); - + $this->load->view('surat/nav',$nav); $this->load->view("surat/form/$url",$data); $this->load->view('footer'); } - + function cetak($url=''){ - + $f=$url; $g=$_POST['pamong']; $u=$_SESSION['user']; $z=$_POST['nomor']; - - + + $id = $_POST['nik']; $data['input'] = $_POST; $data['tanggal_sekarang'] = tgl_indo(date("Y m d")); - + $data['data'] = $this->surat_model->get_data_surat($id); $data['ayah'] = $this->surat_model->get_data_suami($id); - + $data['pribadi'] = $this->surat_model->get_data_pribadi($id); $data['kk'] = $this->surat_model->get_data_kk($id); - + $data['desa'] = $this->surat_model->get_data_desa(); $data['pamong'] = $this->surat_model->get_pamong($_POST['pamong']); - + $data['pengikut']=$this->surat_model->pengikut(); $this->surat_keluar_model->log_surat($f,$id,$g,$u,$z); $this->load->view("surat/print/print_".$url."",$data); } function doc($url=''){ - + $format = $this->surat_model->get_surat($url); $f = $format['id']; $g=$_POST['pamong']; $u=$_SESSION['user']; $z=$_POST['nomor']; - + $id = $_POST['nik']; $this->surat_keluar_model->log_surat($f,$id,$g,$u,$z); - + $this->surat_model->coba($url); - } + } function search(){ $cari = $this->input->post('nik'); if($cari!='') @@ -119,4 +119,4 @@ function search(){ else redirect('surat'); } -} \ No newline at end of file +} diff --git a/app/controllers/Surat_master.php b/app/controllers/Surat_master.php index e504b1a84..3dfcf7ed2 100644 --- a/app/controllers/Surat_master.php +++ b/app/controllers/Surat_master.php @@ -2,7 +2,7 @@ class surat_master extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('surat_master_model'); $this->load->model('user_model'); $this->load->model('header_model'); @@ -21,20 +21,20 @@ function clear($id=0){ function index($p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - - if(isset($_POST['per_page'])) + + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->surat_master_model->paging($p,$o); $data['main'] = $this->surat_master_model->list_data($o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->surat_master_model->autocomplete(); $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $nav['act']=3; $this->load->view('surat/nav',$nav); @@ -44,19 +44,19 @@ function index($p=1,$o=0){ function form($p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; - + if($id){ $data['surat_master'] = $this->surat_master_model->get_surat_format($id); $data['form_action'] = site_url("surat_master/update/$p/$o/$id"); } - + else{ $data['surat_master'] = null; $data['form_action'] = site_url("surat_master/insert"); } - + $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $nav['act']=3; $this->load->view('surat/nav',$nav); @@ -71,9 +71,9 @@ function atribut($id=''){ $data['surat_master'] = $this->surat_master_model->get_surat_format($id); $data['surat'] = $this->surat_master_model->get_surat_format(); $data['main'] = $this->surat_master_model->list_atribut($id); - + $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $nav['act']=3; $this->load->view('surat/nav',$nav); @@ -85,15 +85,15 @@ function form_parameter($in='',$id=''){ $data['analisis_parameter'] = $this->surat_master_model->get_analisis_parameter($id); $data['form_action'] = site_url("surat_master/p_update/$in/$id"); } - + else{ $data['analisis_parameter'] = null; $data['form_action'] = site_url("surat_master/p_insert/$in"); } - + $data['surat'] = $this->surat_master_model->get_surat(); $data['surat_master'] = $this->surat_master_model->get_surat_master($in); - + // $this->load->view('header', $header); // $this->load->view('surat/nav'); $this->load->view('surat_master/atribut/ajax_form',$data); @@ -101,9 +101,9 @@ function form_parameter($in='',$id=''){ } function menu($id=''){ $data['surat_master'] = $this->surat_master_model->get_surat_master($id); - + $header = $this->header_model->get_data(); - + $this->load->view('header', $header); $this->load->view('surat/nav'); $this->load->view('surat_master/menu',$data); @@ -181,4 +181,4 @@ function favorit($id=0,$k=0){ $this->surat_master_model->favorit($id,$k); redirect("surat_master"); } -} \ No newline at end of file +} diff --git a/app/controllers/User_setting.php b/app/controllers/User_setting.php index f4ef066ef..98974a386 100644 --- a/app/controllers/User_setting.php +++ b/app/controllers/User_setting.php @@ -2,7 +2,7 @@ class user_setting extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=(1 OR 2 OR 3 OR 4 OR 5)) redirect('login'); @@ -12,16 +12,16 @@ function index(){ $id = $_SESSION['user']; $header = $this->header_model->get_data(); //$this->load->view('header', $header); - + $header = $this->header_model->get_data(); $data['main'] = $this->user_model->get_user($id); - + $this->load->view('setting', $data); //$this->load->view('footer'); - - } + + } function update($id=''){ $this->user_model->update_setting($id); redirect("main"); } -} \ No newline at end of file +} diff --git a/app/controllers/Web.php b/app/controllers/Web.php index 3706ca0ce..6e38978e3 100644 --- a/app/controllers/Web.php +++ b/app/controllers/Web.php @@ -2,7 +2,7 @@ class web extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3 AND $grup!=4) redirect('siteman'); @@ -15,7 +15,7 @@ function clear(){ redirect('web'); } function pager($cat=1){ - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; redirect("web/index/$cat"); } @@ -23,18 +23,18 @@ function index($cat=1,$p=1,$o=0){ $data['p'] = $p; $data['o'] = $o; $data['cat'] = $cat; - + if(isset($_SESSION['cari'])) $data['cari'] = $_SESSION['cari']; else $data['cari'] = ''; - + if(isset($_SESSION['filter'])) $data['filter'] = $_SESSION['filter']; else $data['filter'] = ''; - if(isset($_POST['per_page'])) + if(isset($_POST['per_page'])) $_SESSION['per_page']=$_POST['per_page']; $data['per_page'] = $_SESSION['per_page']; - + $data['paging'] = $this->web_artikel_model->paging($cat,$p,$o); $data['main'] = $this->web_artikel_model->list_data($cat,$o, $data['paging']->offset, $data['paging']->per_page); $data['keyword'] = $this->web_artikel_model->autocomplete(); @@ -43,7 +43,7 @@ function index($cat=1,$p=1,$o=0){ $data['cat'] = $cat; $header = $this->header_model->get_data(); $nav['act']=0; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('web/artikel/table',$data); @@ -53,7 +53,7 @@ function form($cat=1,$p=1,$o=0,$id=''){ $data['p'] = $p; $data['o'] = $o; $data['cat'] = $cat; - + if($id){ $data['artikel'] = $this->web_artikel_model->get_artikel($id); $data['form_action'] = site_url("web/update/$cat/$id/$p/$o"); @@ -62,11 +62,11 @@ function form($cat=1,$p=1,$o=0,$id=''){ $data['artikel'] = null; $data['form_action'] = site_url("web/insert/$cat"); } - + $data['kategori'] = $this->web_artikel_model->get_kategori($cat); - + $header = $this->header_model->get_data(); - + $nav['act']=0; $this->load->view('header', $header); //$this->load->view('web/spacer'); @@ -75,7 +75,7 @@ function form($cat=1,$p=1,$o=0,$id=''){ $this->load->view('web/artikel/form',$data); else $this->load->view('web/artikel/widget-form',$data); - + $this->load->view('footer'); } function search($cat=1){ @@ -104,7 +104,7 @@ function delete($cat=1,$p=1,$o=0,$id=''){ $this->web_artikel_model->delete($id); redirect("web/index/$cat/$p/$o"); } - + function hapus($cat=1,$p=1,$o=0){ $this->web_artikel_model->hapus($cat); redirect("web/index/1/$p/$o"); @@ -137,4 +137,4 @@ function slide($cat=1,$p=1,$o=0,$id=0){ $this->web_artikel_model->slide($id); redirect("web/index/$cat/$p/$o"); } -} \ No newline at end of file +} diff --git a/app/controllers/Widget.php b/app/controllers/Widget.php index 7b496bef4..6cb7236ce 100644 --- a/app/controllers/Widget.php +++ b/app/controllers/Widget.php @@ -2,32 +2,32 @@ class widget extends CI_Controller{ function __construct(){ parent::__construct(); - session_start(); + $this->load->model('user_model'); $grup = $this->user_model->sesi_grup($_SESSION['sesi']); if($grup!=1 AND $grup!=2 AND $grup!=3) redirect('siteman'); $this->load->model('header_model'); $this->load->model('web_widget_model'); } - function index(){ + function index(){ $data['main'] = $this->web_widget_model->get_widget(); $id=$data['main']['id']; $data['form_action'] = site_url("web/widget/update/1/$id"); $header = $this->header_model->get_data(); $nav['act']=5; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('web/widget/facebook',$data); $this->load->view('footer'); } - function twitter(){ + function twitter(){ $data['main'] = $this->web_widget_model->get_widget(); $id=$data['main']['id']; $data['form_action'] = site_url("web/widget/update/2/$id"); $header = $this->header_model->get_data(); $nav['act']=5; - + $this->load->view('header', $header); $this->load->view('web/nav',$nav); $this->load->view('web/widget/twitter',$data); @@ -41,4 +41,4 @@ function update($tipe='',$id=''){ redirect("web/widget/twitter"); } } -} \ No newline at end of file +}