Adding local config

This commit is contained in:
Thilina Hasantha
2018-04-29 08:59:49 +02:00
parent 8ebf28fbcb
commit 889baf124c
18 changed files with 371 additions and 12 deletions

View File

@@ -0,0 +1,18 @@
<?php
ini_set('error_log', 'data/icehrm.log');
define('CLIENT_NAME', 'icehrm');
define('APP_BASE_PATH', __DIR__.'/../../../build/app/');
define('CLIENT_BASE_PATH', __DIR__.'/');
define('BASE_URL','http://localhost:8888/icehrm-open-dev-base/');
define('CLIENT_BASE_URL','http://localhost:8888/icehrm-open-dev/');
define('APP_DB', 'icehrm_open_dev');
define('APP_USERNAME', 'dev');
define('APP_PASSWORD', 'dev');
define('APP_HOST', 'localhost');
define('APP_CON_STR', 'mysqli://'.APP_USERNAME.':'.APP_PASSWORD.'@'.APP_HOST.'/'.APP_DB);
//file upload
define('FILE_TYPES', 'jpg,png,jpeg');
define('MAX_FILE_SIZE_KB', 10 * 1024);

View File

@@ -0,0 +1,7 @@
<?php
if(php_sapi_name() != 'cli'){
exit();
}
include ('config.php');
include (APP_BASE_PATH.'crons/cron.php');

View File

@@ -0,0 +1,3 @@
<?php
include ('config.php');
include (APP_BASE_PATH.'data.php');

View File

@@ -0,0 +1 @@
Test File

View File

@@ -0,0 +1,18 @@
<?php
include ('config.php');
if(!isset($_REQUEST['g']) || !isset($_REQUEST['n'])){
header("Location:".CLIENT_BASE_URL."login.php");
exit();
}
$group = $_REQUEST['g'];
$name= $_REQUEST['n'];
$groups = array('admin','modules');
if($group == 'admin' || $group == 'modules'){
$name = str_replace("..","",$name);
$name = str_replace("/","",$name);
include APP_BASE_PATH.'/'.$group.'/'.$name.'/entry.php';
}else{
exit();
}

View File

@@ -0,0 +1,3 @@
<?php
include ('config.php');
include (APP_BASE_PATH.'fileupload.php');

View File

@@ -0,0 +1,3 @@
<?php
include ('config.php');
include (APP_BASE_PATH.'fileupload_page.php');

View File

@@ -0,0 +1,3 @@
<?php
include (APP_BASE_PATH.'header.php');

View File

@@ -0,0 +1,22 @@
<?php
if(!file_exists('config.php')){
header("Location:install/");
exit();
}
include ('config.php');
if(!isset($_REQUEST['g']) || !isset($_REQUEST['n'])){
header("Location:".CLIENT_BASE_URL."login.php");
exit();
}
$group = $_REQUEST['g'];
$name= $_REQUEST['n'];
$groups = array('admin','modules');
if($group == 'admin' || $group == 'modules'){
$name = str_replace("..","",$name);
$name = str_replace("/","",$name);
include APP_BASE_PATH.'/'.$group.'/'.$name.'/index.php';
}else{
exit();
}

View File

@@ -0,0 +1,3 @@
<?php
include ('config.php');
include (APP_BASE_PATH.'login.php');

View File

@@ -0,0 +1,3 @@
<?php
include ('config.php');
include (APP_BASE_PATH.'logout.php');

View File

@@ -0,0 +1,3 @@
<?php
include ('config.php');
include (APP_BASE_PATH.'rest.php');

View File

@@ -0,0 +1,3 @@
<?php
include ('config.php');
include (APP_BASE_PATH.'service.php');

View File

@@ -0,0 +1,18 @@
<?php
include ('config.php');
if(!isset($_REQUEST['g']) || !isset($_REQUEST['n'])){
header("Location:".CLIENT_BASE_URL."login.php");
exit();
}
$group = $_REQUEST['g'];
$name= $_REQUEST['n'];
$groups = array('admin','modules');
if($group == 'admin' || $group == 'modules'){
$name = str_replace("..","",$name);
$name = str_replace("/","",$name);
include APP_BASE_PATH.'/'.$group.'/'.$name.'/update.php';
}else{
exit();
}