Commit 18bc3c3d authored by Abdul R. Wahid's avatar Abdul R. Wahid
Browse files

Move to git from old repository

parents
-- License Agreement GTFW --
Hak cipta (c) 2006-2014, PT Gamatechno Indonesia. Lisensi ini merupakan perjanjian hukum antara PT Gamatechno Indonesia dengan pengguna GTFW (Gamatechno Framework). Dengan mengunduh, memiliki dan menggunakan framework ini, maka pengguna GTFW setuju untuk mematuhi syarat dan ketentuan dari lisensi ini. Pengguna GTFW diijinkan untuk menggunakan, menyalin, dan mendistribusikan GTFW Framework beserta dokumentasi, dengan syarat kondisi berikut ini terpenuhi:
1. Salinan perjanjian lisensi ini harus disertakan dalam distribusi.
2. Pendistribusian kembali source code harus menyertakan pemberitahuan hak cipta di atas source code pada semua file dan tanpa modifikasi dalam base GTFW.
3. Setiap file yang telah dimodifikasi harus menyertakan pemberitahuan yang menyatakan sifat perubahan dan nama orang-orang yang mengubahnya.
4. Produk yang berasal dari GTFW harus menyertakan pengakuan bahwa produk tersebut berasal dari GTFW dengan versi tertentu dalam dokumentasinya, tidak menggunakan nama GTFW sebagai bagian dari nama produk tersebut, dan produk tersebut bukan merupakan produk komersial yang bertujuan mendapatkan profit.
5. Pengguna GTFW setuju untuk mengganti kerugian atas klaim pihak ketiga yang langsung, tidak langsung, insidental, atau konsekuensial apapun, dari penyalahgunaan framework, atau pelanggaran persyaratan lisensi ini.
-- Disclaimer of Warranty --
GTFW disediakan sebagaimana adanya, tanpa jaminan apapun, baik tersurat maupun tersirat.
-- Limitations of Liability --
Pengguna menanggung segala risiko yang terkait dengan instalasi dan penggunaan GTFW. Pemegang lisensi bertanggung jawab menentukan kelayakan penggunaan dan risiko yang terkait dengan penggunaannya, serta tidak terbatas untuk risiko kesalahan aplikasi, kerusakan peralatan, kehilangan data dan gangguan operasional.
\ No newline at end of file
<?php
header('Content-Type: application/javascript');
$js_file = str_replace('\\', '/', realpath(GTFW_BASE_DIR . 'main/js'));
define('GTFW_JS',$js_file . '/*.js');
foreach (glob(GTFW_JS) as $value) {
echo file_get_contents($value);
}
?>
\ No newline at end of file
<?php
$gtfw_init_dir = GTFW_BASE_DIR . 'main/init/' . basename(__FILE__, '.php') . '/*.php';
foreach (glob($gtfw_init_dir) as $value) {
require_once $value;
}
?>
<?php
if (strtolower(substr(php_sapi_name(), 0, 3)) != 'cli') {
echo 'You can only run this script through command line interface!';
die;
}
// send pid back to parent process
echo getmypid() . "\n";
// change directory to docroot
chdir(dirname(GTFW_APP_DIR));
// parsing parameters
$process_info_file = $argv[1];
$output_buffer_file = $argv[2];
// obtaining lock for pif file, indicating this child process is running
$ob_file = @fopen($output_buffer_file, 'wb');
if ($ob_file)
flock($ob_file, LOCK_EX);
// parsing pif file, get parameters
$str_pif = @file_get_contents($process_info_file);
list($module, $submodule, $action, $type, $serialized_params, ) = explode("\n", $str_pif);
// start buffering, all result is sent to $output_buffer_file
ob_start();
function flush_output() {
$output = ob_get_contents();
rewind($GLOBALS['ob_file']);
fwrite($GLOBALS['ob_file'], $output);
fflush($GLOBALS['ob_file']);
}
register_tick_function('flush_output');
declare(ticks = 3);
?>
\ No newline at end of file
<?php
require_once GTFW_BASE_DIR . '/main/lib/gtfw/configuration/Configuration.class.php';
require_once GTFW_BASE_DIR . '/main/lib/gtfw/configuration/ConfigurationHookIntf.intf.php';
Configuration::Instance()->SetConfigDirectory(GTFW_APP_DIR . '/config/');
Configuration::Instance()->Load('application.conf.php', 'default');
Configuration::Instance()->Load('organization.conf.ini', 'ini');
// if (Configuration::Instance()->Load('static.conf.php', 'shm') === false) {
// Configuration::Instance()->Load('static.conf.php', 'default');
// SharedMemory::Instance()->Set('static.conf.php', Configuration::$mValues['static']);
// }
// warning: these lines below soon will be obsolete!
require_once GTFW_BASE_DIR . '/main/lib/gtfw/configuration/GTFWConfiguration.class.php';
GTFWConfiguration::SetConfigDirectory(GTFW_APP_DIR . '/config/');
GTFWConfiguration::Load('application.conf.php', 'default');
GTFWConfiguration::Load('organization.conf.ini', 'ini');
// if (GTFWConfiguration::Load('static.conf.php', 'shm') === false) {
// GTFWConfiguration::Load('static.conf.php', 'default');
// SharedMemory::Instance()->Set('static.conf.php', GTFWConfiguration::$mValues['static']);
// }
?>
<?php
require_once Configuration::Instance()->GetValue( 'application', 'gtfw_base') . 'main/lib/gtfw/syslog/SysLog.class.php';
?>
\ No newline at end of file
<?php
require_once Configuration::Instance()->GetValue('application', 'gtfw_base').'main/lib/gtfw/sanitizer/Sanitizer.class.php';
require_once Configuration::Instance()->GetValue('application', 'gtfw_base').'main/lib/gtfw/sanitizer/SanitizerFactory.class.php';
?>
<?php
require_once Configuration::Instance()->GetValue('application', 'gtfw_base').'main/lib/gtfw/database/Database.class.php';
$db = array(); // maintain a list of connection to different databases
?>
<?php
require_once Configuration::Instance()->GetValue('application', 'gtfw_base') .
'main/lib/gtfw/dispatcher/Dispatcher.class.php';
require_once Configuration::Instance()->GetValue('application', 'gtfw_base') .
'main/lib/gtfw/dispatcher/CliDispatcher.class.php';
CliDispatcher::Instance()->Dispatch($module, $submodule, $action, $type);
?>
<?php
unregister_tick_function('flush_output');
// save result
$output = ob_get_contents();
rewind($ob_file);
fwrite($ob_file, $output);
// release lock, indicating child is terminating
flock($ob_file, LOCK_UN);
fclose($ob_file);
ob_end_clean();
?>
<?php
require_once GTFW_BASE_DIR . '/main/lib/gtfw/configuration/Configuration.class.php';
require_once GTFW_BASE_DIR . '/main/lib/gtfw/configuration/ConfigurationHookIntf.intf.php';
$timezone = ini_get('date.timezone');
if(empty($timezone)){
$timezone = Configuration::Instance()->GetValue('application','timezone');
if(empty($timezone))
$timezone='Asia/Jakarta';
ini_set('date.timezone',$timezone);
}
Configuration::Instance()->SetConfigDirectory(GTFW_APP_DIR . '/config/');
Configuration::Instance()->Load('application.conf.php', 'default');
require_once GTFW_BASE_DIR .'/main/lib/gtfw/database/Database.class.php';
require_once GTFW_BASE_DIR . '/main/lib/gtfw/configuration/ConfigurationHelper.class.php';
$config_dir = GTFW_APP_DIR . 'config/*.ini';
foreach (glob($config_dir) as $value) {
$value = str_replace(GTFW_APP_DIR . 'config/','',$value);
Configuration::Instance()->Load($value, 'ini');
}
// if (Configuration::Instance()->Load('static.conf.php', 'shm') === false) {
// Configuration::Instance()->Load('static.conf.php', 'default');
// SharedMemory::Instance()->Set('static.conf.php', Configuration::$mValues['static']);
// }
// warning: these lines below soon will be obsolete!
require_once GTFW_BASE_DIR . '/main/lib/gtfw/configuration/GTFWConfiguration.class.php';
#GTFWConfiguration::GetValue('application',array('db_conn',0,'db_type'));
// GTFWConfiguration::SetConfigDirectory(GTFW_APP_DIR . '/config/');
// GTFWConfiguration::Load('application.conf.php', 'default');
// foreach (glob($config_dir) as $value) {
// $value = str_replace(GTFW_APP_DIR . 'config/','',$value);
// GTFWConfiguration::Load($value, 'ini');
// }
// if (GTFWConfiguration::Load('static.conf.php', 'shm') === false) {
// GTFWConfiguration::Load('static.conf.php', 'default');
// SharedMemory::Instance()->Set('static.conf.php', GTFWConfiguration::$mValues['static']);
// }
?>
<?php
require_once Configuration::Instance()->GetValue( 'application', 'gtfw_base') . 'main/lib/gtfw/syslog/SysLog.class.php';
require_once Configuration::Instance()->GetValue('application', 'gtfw_base').'main/lib/gtfw/log/Log.class.php';
?>
<?php
require_once Configuration::Instance()->GetValue('application', 'gtfw_base') .
'main/lib/gtfw/session/save_handler/SessionSaveHandlerIntf.intf.php';
require_once Configuration::Instance()->GetValue('application', 'gtfw_base') .
'main/lib/gtfw/session/Session.class.php';
require_once Configuration::Instance()->GetValue('application', 'gtfw_base') .
'main/lib/gtfw/session/SessionSso.class.php';
Session::Instance()->PrepareSaveHandler();
Session::Instance()->Start();
SessionSso::Instance()->Start();
$connection = Configuration::Instance()->GetValue('application','db_conn');
if(isset($connection[0])){
//getgetConfig From DB must get after session created
ConfigurationHelper::InstanceClass()->GetAllValues();
}
?>
<?php
require_once Configuration::Instance()->GetValue('application', 'gtfw_base').'main/lib/gtfw/sanitizer/Sanitizer.class.php';
require_once Configuration::Instance()->GetValue('application', 'gtfw_base').'main/lib/gtfw/sanitizer/SanitizerFactory.class.php';
?>
<?php
require_once Configuration::Instance()->GetValue( 'application', 'gtfw_base').'main/lib/gtfw/messenger/Message.class.php';
require_once Configuration::Instance()->GetValue( 'application', 'gtfw_base').'main/lib/gtfw/messenger/MessageQueue.class.php';
require_once Configuration::Instance()->GetValue( 'application', 'gtfw_base').'main/lib/gtfw/messenger/Messenger.class.php';
?>
\ No newline at end of file
<?php
#require_once Configuration::Instance()->GetValue('application', 'gtfw_base') .'main/lib/gtfw/database/Database.class.php';
// $db = array(); // maintain a list of connection to different databases
?>
<?php
require_once Configuration::Instance()->GetValue('application', 'gtfw_base') .
'main/lib/gtfw/redirector/Redirector.class.php';
?>
<?php
require_once Configuration::Instance()->GetValue('application', 'gtfw_base').'main/lib/gtfw/security/Security.class.php';
?>
<?php
require_once Configuration::Instance()->GetValue('application', 'gtfw_base').'main/lib/gtfw/format/Format.class.php';
?>
\ No newline at end of file
<?php
require_once Configuration::Instance()->GetValue('application', 'gtfw_base').'main/lib/gtfw/dispatcher/Dispatcher.class.php';
Dispatcher::Instance()->Dispatch();
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment