sess = $sess; $this->cache = $_SESSION[$this->sess]; if (!is_array($this->cache)) { $this->cache = array(); $this->save(); } } function add($name,$value) { $this->cache[$name] = $value; } function read($name) { if (isset($this->cache[$name])) { return $this->cache[$name]; } else { return false; } } function clear() { $this->cache = ""; $this->cache = array(); $this->save(); } function save() { $_SESSION[$this->sess] = $this->cache; } } ?>sql_query($query) or die(mysql_error()); while ($row = $db->sql_fetch_row($res)) { $run_again = true; } if ($run_again == true) { return makeCode($tb,$len, $column); } else { return $code; } } } /* Function : Generate Code by Date Time Parameters : $tb : Database $len : Length of Code */ function makeCodeByTime($tb,$len, $column='CODE') { global $db; $code = date("YmdHis"); $run_again = false; $colum = strtoupper($column); $query = "SELECT ID FROM $tb WHERE $column = '$code'"; $res = $db->sql_query($query) or die(mysql_error()); while ($row = $db->sql_fetch_row($res)) { $run_again = true; } if ($run_again == true) { return makeCode($tb,$len, $column); } else { return $code; } } function makeCodeByTimeAndCount($tb, $column='CODE') { global $db; $code = date("ymd"); $colum = strtoupper($column); $query = "SELECT COUNT(ID) AS MYCOUNT FROM $tb WHERE $column LIKE '$code%'"; $res = $db->sql_query($query) or die(mysql_error()); $res = $db->sql_query($query) or die(mysql_error()); $row_rsQ = $db->sql_fetch_row($res); return $code.zeroFill($row_rsQ[MYCOUNT] + 1, 3); } ?>\"\?\%\#\^\+\=]+$/&'; $match_3 = preg_match($pattern,$name); return ($match_3); } function file_recognize($ext) { $ext = trim(strtolower($ext)); switch ($ext) { // Document Type case "doc": return "Microsoft Word Document"; break; case "pps": return "Microsoft Powerpoint Document"; break; case "ppt": return "Microsoft Powerpoint Document"; break; case "xls": return "Microsoft Excel Document"; break; case "pdf": return "Acrobat PDF Document"; break; case "html": return "HTML Document"; break; // Image Format case "bmp": return "Bitmap Image"; break; case "jpg": return "JPG Image"; break; case "jpeg": return "JPEG Image"; break; case "gif": return "GIF Image"; break; case "tif": return "TIF Image"; break; case "tiff": return "TIFF Image"; break; case "png": return "PNG Image"; break; // Advance Image Format case "psd": return "Adobe Photoshop PSD Document"; break; case "ai": return "Adobe Illustrator Document"; break; case "fla": return "Macromedia Flash Document"; break; case "swf": return "Macromedia Flash Movie"; break; case "": return "Unknown Format"; break; case ":folder:": return "File Folder"; break; default: return strtoupper($ext)." File"; break; } } function file_icon($ext,$path,$size=16) { $ext = strtolower($ext); if ($ext == ":folder:") $ext = "FOLDER"; $icon_location = "{$path}/icon.{$ext}.{$size}px.gif"; $icon_unknown = "{$path}/icon.unknown.{$size}px.gif"; return file_exists($icon_location)?$icon_location:$icon_unknown; } function file_ext($fname) { if (strstr(trim($fname),'.')) { $s = split("\.",trim($fname)); $ext = $s[count($s)-1]; return $ext; } else { return false; } } function file_showExist($path, $type='all', $showlog=0) { if($type == 'file') $search_ext = array("doc", "pdf", "xls", "txt"); elseif($type == 'image') $search_ext = array("jpg","gif","png","swf","wmv","wma","asf","asx","mid","mov","mp3","wav","mpg","mpeg"); else $search_ext = array("doc", "pdf", "xls", "txt", "jpg","gif","png","swf","wmv","wma","asf","asx","mid","mov","mp3","wav","mpg","mpeg"); $img_src = false; for ($i = 0; $i < count($search_ext); ++$i) { $img = $path.".".$search_ext[$i]; if ($showlog == 1) echo "
Checking if [{$img}] exists..."; if (file_exists($img)) { $img_src = $img; } } return $img_src; } function file_checkEmbed($path,$param="",$bgcolor="#FFFFFF") { // Assume $path may contain an Image (JPG/GIF/PNG) or Flash (SWF) // This function will check the file extension in order to determine using or to show the file // This function will finally return HTML // And return FALSE if $path doesn't exist. // * SWF Embeding only available for Flash MX 2004 or below $nosize = false; if ($param != "" && stristr($param,"NOSIZE")) { $param = str_replace("NOSIZE","",$param); $nosize = true; } if (file_exists($path)) { $file_info = @getimagesize($path); $file_w = $file_info[0]; $file_h = $file_info[1]; if (!$file_info) return false; } else { $file_w = false; $file_h = false; } $ext = file_ext($path); $embed_ext = array("wmv","wma","asf","asx","mid","mov","mp3","wav","mpg","mpeg"); if (strtolower($ext) == "swf") { $tag_begin = ""; $tag_begin .= ""; $tag_begin .= ""; $tag_begin .= ""; $tag_begin .= ""; $tag_begin .= ""; $tag_begin .= ""; $tag_begin .= ""; $tag_begin .= ""; $tag_end = ""; $tag_param = ""; } else if (in_array(strtolower($ext),$embed_ext)) { $tag_begin = ""; $tag_end = ""; $tag_param = ""; } else { $tag_begin = "$file_upload_max){ return false; }else{ return true; } } return false; } function file_upload($master_code, $file_arr, $location, $tb_name, $remove_code=""){ global $file_upload_max; //$file_upload_max = 1000000000; global $db; global $PIC_CONFIG; if(!isEmpty($file_arr['name'])){ $code = makeCode($tb_name,8); $src = $file_arr['tmp_name']; $src_filename = $file_arr['name']; $src_fileext = strtolower(file_ext($src_filename)); $dst_dir = $location."/".strtolower($master_code); @mkdir($dst_dir); $dst = $dst_dir."/".$src_filename; $copy_flag = copy($src,$dst); $copy_flag = file_upload_checking($file_arr); if(!$copy_flag){ $js = ""; echo $js; }else{ // resize image if($src_fileext=="jpg"){ $smail_dst_filename = substr($src_filename, 0, -strlen($src_fileext))."small.{$src_fileext}"; $smail_dst = $dst_dir."/".$smail_dst_filename; @copy($src,$smail_dst); if($PIC_CONFIG['thumb_resize']){ // small image imgResize($smail_dst, $smail_dst,$PIC_CONFIG['thumb_width'],$PIC_CONFIG['thumb_height'],100,($PIC_CONFIG['thumb_crop']?1:0)); // large image //imgResize($dst, $dst,$PIC_CONFIG['large_width'],$PIC_CONFIG['large_height'],100,($PIC_CONFIG['thumb_crop']?1:0)); } } // SQL Statiement for the New Record Insertion $insert = "INSERT INTO ".$tb_name." "; $insert .= " (CODE,MASTER_CODE, FILE_NAME, EXT) "; $insert .= " VALUES "; $insert .= " ('{$code}','{$master_code}','{$file_arr['name']}','{$src_fileext}') "; // Execute the SQL Statement $db->sql_query($insert) or die(mysql_error()); return $code; } } return $remove_code; } function file_del($location, $tb_name, $remove_code){ global $db; if($remove_code!=""){ $query = "SELECT * FROM ".$tb_name." WHERE CODE = '{$remove_code}'"; $res = $db->sql_query($query) or die(jsAlert("No record found!")); $rs = $db->sql_fetch_assoc($res); $master_code = strtolower($rs["MASTER_CODE"]); $ext = $rs["EXT"]; $file_name = $rs["FILE_NAME"]; // remove file $src = strtolower($remove_code); $src = "{$location}/".$master_code."/".$file_name; @unlink($src); // remove resized image if($ext=="jpg"){ $smail_dst_filename = substr($file_name, 0, -strlen($ext))."small.{$ext}"; $src = "{$location}/".$master_code."/{$smail_dst_filename}"; @unlink($src); } // remove record in database $insert = " UPDATE ".$tb_name." SET DELETED = 1 WHERE CODE = '".$remove_code."' "; $db->sql_query($insert) or die(mysql_error()); return true; }else{ return false; } } function filename_safe($name) { $except = array('\\', '/', ':', '*', '?', '"', '<', '>', '|', '&'); $new_name = str_replace($except, '', $name); $new_name = str_replace(' ', '_', $new_name); return strtolower($new_name); } ?>sql_query($query_rsChkTB); if($rsChkTB) { $handle = fopen ("$file_path", "r"); if($handle) { while (!feof ($handle)) { $buffer = fgets($handle, 4096); $buffer = trim($buffer); if($buffer != '') { $var = split("$delimiter", $buffer); for($j = 0; $j < count($var); $j ++) { $var[$j] = trim($var[$j]); //echo $var[$j]; } $insertSQL = " INSERT INTO $tb "; for($g = 0; $g < count($tb_col_ary); $g++) { $insertSQL .= ($g == 0 )?" ( ":""; $insertSQL .= ($genCode == 1 && $g == 0 )?" CODE , ":''; $insertSQL .= ($g == 0 )?" $tb_col_ary[$g]":" , $tb_col_ary[$g] "; $insertSQL .= ($g == count($tb_col_ary) -1)?( " ) "):''; } if($genCode == 1) { $tempCode = makeCode($tb, $len, $codeCol); } $insertSQL .= " VALUES "; for($g = 0; $g < count($tb_col_ary); $g++) { $content = addslashes_unix($var[$file_col_ary[$g]]); $insertSQL .= ($g == 0 )?" ( ":""; $insertSQL .= ($genCode == 1 && $g == 0)?" '$tempCode' , ":''; $insertSQL .= ($g == 0 )?"'".$content."'":" , '".$content."'" ; $insertSQL .= ($g == count($tb_col_ary) -1)?( " ) "):''; } echo $insertSQL.'


'; $db->sql_query($insertSQL) or die(mysql_error()); } else return false; } fclose($handle); } else return false; } else return false; } else return false; } ?> {$sym}"; return $output; } ?>'.($pl ? ''.$p.'' : $p).' '; if($n) $n = ' '.($nl ? ''.$n.'' : $n).''; $calendar = ' '."\n". '\n"; //Sun ~ Sat if($day_name_length){ $color = "#FF0000"; foreach($day_names as $d) { $calendar .= ''; $color = "#000000"; } $calendar .= "\n"; } if($weekday > 0) $calendar .= ''; for($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){ if($weekday == 7){ $weekday = 0; $calendar .= "\n"; } if(isset($days[$day]) and is_array($days[$day])){ @list($link, $classes, $content) = $days[$day]; if(is_null($content)) $content = $day; $calendar .= '' : '>'). ($link ? ''.$content.'' : $content).''; } else { $link = "corner_sub.do.list.php?thisYear=".$year."&thisMonth=".$month."&thisDay=".$day."&this_user=".$this_user; //Holiday? $thisdaystr = $year . "-" . $month . "-" . ($day<10?"0".$day:$day); $SQLstr1 = "select HOLIDAY from VH_HOLIDAYS where HOLIDAY_DATE='$thisdaystr'"; $result1 = $db->sql_query($SQLstr1); $rs1 = $db->sql_fetch_row($result1); if($rs1['HOLIDAY']<>"") $daytext_color = "#FF0000"; else $daytext_color = "#000000"; //Sunday? if(date("w",mktime(0,0,0,$month, $day, $year))==0)$daytext_color = "#FF0000"; if(date("Y-m-d", mktime(0,0,0,$month, $day, $year))== date("Y-m-d")) $cell_color = "#feecd1"; else $cell_color = ""; $calendar .= ""; } } if($weekday != 7) $calendar .= ''; return $calendar."\n
'.$p.($month_href ? ''.$title.'' : $title).$n."
'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'
 
". ($day==$thisDay?"":"") ."$day". ($day==$thisDay?"":"") ." 
\n"; } ?> " function del_code($string){ if(substr_count($string,"<") == 0){ $result = $string; }else{ $char_i = 0; $total_code = substr_count($string,"<"); for($i=1; $i<= $total_code; $i++){ $code_open_pos = strpos($string, "<",$char_i); $result .= substr($string, $char_i , $code_open_pos-$char_i); $char_i = $code_open_pos+1; $code_close_pos = strpos($string, ">",$char_i); $result .= " "; $char_i = $code_close_pos+1; } $result .= substr($string, $char_i); //end } return $result; } //show $num text only. function content_limit($string,$num){ if(strlen($string)>$num) return substr($string,0,$num)."..."; else return $string; } //return no symbol string function no_symbol($string){ $except = array('\\', '/', ':', '*', '?', '"', '<', '>', '|', '&', "'"); $string = str_replace($except, '', $string); return $string; } //show $num text only.(include td) function content_limit_td($string,$num){ $string = no_symbol($string); if(strlen($string)>$num) return "".substr($string,0,$num)."..."; else return "".$string.""; } ?>sql_query($SQL_rslog); } ?> <?=txt_lang("Tom Lee Engineering","通利工程","通利工程")?> document.getElementById('youtube_player').src = 'https://www.youtube.com/embed/Q7dVesUjJGk'; document.getElementById('youtube_player').src = 'https://www.youtube.com/embed/Q7dVesUjJGk'; " bgcolor="#6b6b6b">

Mackie DL32R Digital Mixing Console",'Mackie DL32R 無線數碼混音台','Mackie DL32R 无线数字调音台')?>
Yamaha CIS",'Yamaha CIS 商業安裝音響系統','Yamaha CIS 商业安装音频系统')?>

 

",'最新消息 ','最新消息 ')?>


Product Training Seminar",'JBL Intellivox 及AXYS
產品培訓活動','JBL Intellivox 及AXYS
产品培训活动')?>

tried out myMix system",'香港本地樂隊觸執毛
試用myMix系統','香港本地乐队触执毛
试用myMix系统')?>
tried out myMix system",'香港本地樂隊Supper Moment
試用myMix系統','香港本地乐队Supper Moment
试用myMix系统')?>

tried out Aviom A360",'太極樂隊 Joey Tang & Patrick Lui
試用Aviom A360','太极乐队 Joey Tang & Patrick Lui
试用Aviom A360')?>


     
  "> | | | | |
  
Tom Lee Engineering
Tom Lee Engineering
Tom Lee Engineering
Tom Lee Engineering