Add vagrant machine, new test and travis-ci config
This commit is contained in:
18
deployment/clients/dev/config.php
Normal file
18
deployment/clients/dev/config.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
ini_set('error_log', 'data/icehrm.log');
|
||||
|
||||
define('CLIENT_NAME', 'icehrmpro');
|
||||
define('APP_BASE_PATH', '/vagrant/build/app/');
|
||||
define('CLIENT_BASE_PATH', '/vagrant/deployment/clients/dev/');
|
||||
define('BASE_URL','http://app.app.dev/');
|
||||
define('CLIENT_BASE_URL','http://clients.app.dev/dev/');
|
||||
|
||||
define('APP_DB', '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);
|
||||
7
deployment/clients/dev/cron.php
Normal file
7
deployment/clients/dev/cron.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
if(php_sapi_name() != 'cli'){
|
||||
exit();
|
||||
}
|
||||
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'crons/cron.php');
|
||||
3
deployment/clients/dev/data.php
Normal file
3
deployment/clients/dev/data.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'data.php');
|
||||
1
deployment/clients/dev/data/sample
Executable file
1
deployment/clients/dev/data/sample
Executable file
@@ -0,0 +1 @@
|
||||
Test File
|
||||
18
deployment/clients/dev/entry.php
Normal file
18
deployment/clients/dev/entry.php
Normal 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();
|
||||
}
|
||||
3
deployment/clients/dev/fileupload.php
Normal file
3
deployment/clients/dev/fileupload.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'fileupload.php');
|
||||
3
deployment/clients/dev/fileupload_page.php
Normal file
3
deployment/clients/dev/fileupload_page.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'fileupload_page.php');
|
||||
3
deployment/clients/dev/header.php
Normal file
3
deployment/clients/dev/header.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
include (APP_BASE_PATH.'header.php');
|
||||
22
deployment/clients/dev/index.php
Normal file
22
deployment/clients/dev/index.php
Normal 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();
|
||||
}
|
||||
3
deployment/clients/dev/login.php
Normal file
3
deployment/clients/dev/login.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'login.php');
|
||||
3
deployment/clients/dev/logout.php
Normal file
3
deployment/clients/dev/logout.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'logout.php');
|
||||
3
deployment/clients/dev/rest.php
Normal file
3
deployment/clients/dev/rest.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'rest.php');
|
||||
3
deployment/clients/dev/service.php
Normal file
3
deployment/clients/dev/service.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'service.php');
|
||||
18
deployment/clients/dev/update.php
Normal file
18
deployment/clients/dev/update.php
Normal 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();
|
||||
}
|
||||
18
deployment/clients/test/config.php
Normal file
18
deployment/clients/test/config.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
ini_set('error_log', 'data/icehrm.log');
|
||||
|
||||
define('CLIENT_NAME', 'icehrmpro');
|
||||
define('APP_BASE_PATH', '/vagrant/build/app/');
|
||||
define('CLIENT_BASE_PATH', '/vagrant/deployment/clients/test/');
|
||||
define('BASE_URL','http://app.app.dev/');
|
||||
define('CLIENT_BASE_URL','http://clients.app.dev/test/');
|
||||
|
||||
define('APP_DB', 'testing');
|
||||
define('APP_USERNAME', 'testing');
|
||||
define('APP_PASSWORD', 'testing');
|
||||
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);
|
||||
7
deployment/clients/test/cron.php
Normal file
7
deployment/clients/test/cron.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
if(php_sapi_name() != 'cli'){
|
||||
exit();
|
||||
}
|
||||
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'crons/cron.php');
|
||||
3
deployment/clients/test/data.php
Normal file
3
deployment/clients/test/data.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'data.php');
|
||||
1
deployment/clients/test/data/sample
Executable file
1
deployment/clients/test/data/sample
Executable file
@@ -0,0 +1 @@
|
||||
Test File
|
||||
18
deployment/clients/test/entry.php
Normal file
18
deployment/clients/test/entry.php
Normal 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();
|
||||
}
|
||||
3
deployment/clients/test/fileupload.php
Normal file
3
deployment/clients/test/fileupload.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'fileupload.php');
|
||||
3
deployment/clients/test/fileupload_page.php
Normal file
3
deployment/clients/test/fileupload_page.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'fileupload_page.php');
|
||||
3
deployment/clients/test/header.php
Normal file
3
deployment/clients/test/header.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
include (APP_BASE_PATH.'header.php');
|
||||
22
deployment/clients/test/index.php
Normal file
22
deployment/clients/test/index.php
Normal 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();
|
||||
}
|
||||
3
deployment/clients/test/login.php
Normal file
3
deployment/clients/test/login.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'login.php');
|
||||
3
deployment/clients/test/logout.php
Normal file
3
deployment/clients/test/logout.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'logout.php');
|
||||
3
deployment/clients/test/rest.php
Normal file
3
deployment/clients/test/rest.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'rest.php');
|
||||
3
deployment/clients/test/service.php
Normal file
3
deployment/clients/test/service.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include ('config.php');
|
||||
include (APP_BASE_PATH.'service.php');
|
||||
18
deployment/clients/test/update.php
Normal file
18
deployment/clients/test/update.php
Normal 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();
|
||||
}
|
||||
Reference in New Issue
Block a user