$base = '/home/weluserkin/public_html/ob/';
$root = '/ob/';
$rootUpload = '/ob/upload/';
$mediaPath = $base.'editor/';
$imagePath = $mediaPath.'image/';
$uploadPath = $base.'upload/';
$thumbnailPath = $mediaPath.'image/thumbnail/';
$domain = 'outwardbound.org.hk';
$cfg_emailAddress = "kevin@circle-soft.com";
$db_server = "localhost";
$db_port = "3306";
$db_user = "weluserkin_user";
$db_password = "welpwkin";
$db_name = "weluserkin_outbound";
$recordPerPage = 20;
$arr_alp = array('--','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
$nature_arr_tc["Reimbursable Courses for Continuing Education Fund"] = "持續進修基金可獲發還款項之課程";
$nature_arr_tc["International Courses"] = "International Courses TC";
$nature_arr_tc["Local Course"] = "Local Courses TC";
$nature_arr_tc["Weekend Course"] = "Weekend Courses TC";
$nature_arr_tc["Kidz Camp"] = "Kidz Camp TC";
$nature_arr_tc["Foundation Course"] = "Foundation Courses TC";
$nature_arr_tc["Sea Course"] = "Sea Courses TC";
function makeDirectory( $dirPath ){
if( !is_dir( $dirPath ) ){
if ( mkdir( $dirPath,0777 ) ){
chmod($dirPath, 0777);
return true;
}else{
return false;
}
}
}
function resize($src,$dest,$w,$file_type,$name){
if($file_type == "image/pjpeg" || $file_type == "image/jpeg" || $file_type == "image/jpg"){
$new_img = imagecreatefromjpeg($src);
}elseif($file_type == "image/x-png" || $file_type == "image/png"){
$new_img = imagecreatefrompng($src);
}elseif($file_type == "image/gif"){
$new_img = imagecreatefromgif($src);
}
//list the width and height and keep the height ratio.
list($width, $height) = getimagesize($src);
//calculate the image ratio
/*
$imgratio=$width/$height;
if ($imgratio>1){
$newwidth = $w;
$newheight = $w/$imgratio;
}else{
$newheight = $w;
$newwidth = $w*$imgratio;
}
*/
$newheight = ($w*$height) / $width;
$newwidth= $w;
//function for resize image.
//if (function_exists(imagecreatetruecolor)){
$resized_img = imagecreatetruecolor($newwidth,$newheight);
//}else{
// die("Error: Please make sure you have GD library ver 2+");
//}
//the resizing is going on here!
imagecopyresampled($resized_img, $new_img, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
//finally, save the image
ImageJpeg ($resized_img,"$dest/$name",100);
ImageDestroy ($resized_img);
ImageDestroy ($new_img);
//ok copy the finished file to the thumbnail directory
//move_uploaded_file ($file_tmp, "$path_big/$rand_name.$file_ext");
}
?>
include_once("Connection.php");
include_once("Utility.php");
include_once("Content.php");
include_once("Course.php");
include_once("Schedule.php");
include_once("Category.php");
include_once("PersonalData.php");
include_once("UpdatedNews.php");
include_once("Souvenirs.php");
include_once("SouvenirsCategory.php");
class Control {
function getSubContent($pid,$array,$indexes){
$content = new Content();
$arr = $content->getAllByParentID($pid,2);
$prefix = "";
for($i=0;$i<$indexes;$i++){
$prefix = $prefix."|-";
}
for($i=0;$igetSubContent($arr[$i]['id'],$array,$indexes+1);
}
return $array;
}
function getAllContent($id){
$array = array();
$result = $this->getSubContent($id,$array,0);
$output = array();
for($i=0;$i 3){
array_push($arr,$file);
}
}
closedir($handle);
Rsort($arr);
}
return $arr;
}
function getCourseGallery($type,$nature,$cPageNo,$rpp){
$course = new Course();
$result = $course->getCourseGallery($type,$nature,$cPageNo,$rpp);
$loop = array_pop($result);
$pn = ($loop%$rpp == 0)?$loop/$rpp:intval($loop/$rpp)+1;
$arr = array(0);
$arr_name = array(0);
for($i=0;$i<$pn;$i++){
$arr[$i] = $i;
$tmp = $i+1;
$arr_name[$i] = "Page ".$tmp;
}
array_push($result,$arr);
array_push($result,$arr_name);
array_push($result,$loop);
return $result;
}
function getCourseList($alp,$cPageNo,$search,$orderBy,$priority,$rpp){
$course = new Course();
$result = $course->getAllCourse($alp,$cPageNo,$search,$orderBy,$priority,$rpp);
$loop = array_pop($result);
$pn = ($loop%$rpp == 0)?$loop/$rpp:intval($loop/$rpp)+1;
$arr = array(0);
$arr_name = array(0);
for($i=0;$i<$pn;$i++){
$arr[$i] = $i;
$tmp = $i+1;
$arr_name[$i] = "Page ".$tmp;
}
array_push($result,$arr);
array_push($result,$arr_name);
array_push($result,$loop);
return $result;
}
function getSouvenirsList($alp,$cPageNo,$search,$orderBy,$priority,$rpp,$category){
$souvenirs = new Souvenirs();
$result = $souvenirs->getAllSouvenirs($alp,$cPageNo,$search,$orderBy,$priority,$rpp,$category);
$loop = array_pop($result);
$pn = ($loop%$rpp == 0)?$loop/$rpp:intval($loop/$rpp)+1;
$arr = array(0);
$arr_name = array(0);
for($i=0;$i<$pn;$i++){
$arr[$i] = $i;
$tmp = $i+1;
$arr_name[$i] = "Page ".$tmp;
}
array_push($result,$arr);
array_push($result,$arr_name);
array_push($result,$loop);
return $result;
}
}
?>
Notice: Undefined index: base in /data/welkin/welkin-multimedia.com/public_html/ob/index.php on line 9
Notice: Undefined variable: base in /data/welkin/welkin-multimedia.com/public_html/ob/index.php on line 34
Notice: Undefined variable: base in /data/welkin/welkin-multimedia.com/public_html/ob/index.php on line 35
Notice: Undefined variable: base in /data/welkin/welkin-multimedia.com/public_html/ob/index.php on line 36
Notice: Undefined variable: base in /data/welkin/welkin-multimedia.com/public_html/ob/index.php on line 37
Fatal error: Class 'Control' not found in /data/welkin/welkin-multimedia.com/public_html/ob/index.php on line 45