"; verifyLicense("FRONTEND"); require "include/db_connect.inc.php"; require "include/lang-handler.inc.php"; require "include/wordings.inc.php"; $sql = "select website_status from look"; $rs = mysql_query($sql); list($website_status) = mysql_fetch_array($rs); if ($website_status == 0) // Website is closed { header ("location: closed-website.php"); mysql_close($conn); exit; } ?> <?=$domain_title?> "); print (""); print (""); print (""); print ("
> >
 
>
  ".$field[90][$element]."
"); if (isset($sess_user_login_code)) { $memberName = getMemberName($sess_user_id); print (""); print (""); print (""); print (""); print (""); print ("
Welcome,
$memberName
"); print ("
  • View Online Courses"); print ("
  • Enroll New Course"); print ("
  • Logout"); print ("
  • "); } else { print (""); print (""); if ($SUPPORT_LOCALHOSTADDRESS) { print (""); print (""); print (""); print (""); } print (""); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print (""); print ("
    Organization
    Code:
    "); //print ("
    If you don't have the organization code, then leave this blank."); print ("
    Username:
    Password:
    Not registered? Register now.
     
    "); } $sql = "select count(*) from news where newsticker=1"; $rs = mysql_query($sql); list($count_newsticker) = mysql_fetch_array($rs); if ($count_newsticker > 0) { print ("
    "); print (""); print ("

    "); } ?>






    Client SurveyCape Town
    "); if ($lang == "en") $sql = "select highlight_id,highlight_title,substring_index(highlight_detail,'\r\n\r\n',1),highlight_urllink,highlight_imagename,highlight_flashname,flash_width,flash_height,media_display,layout,hostid,videoname,videowidth,videoheight,videotype,videolocation from highlight where status=1 order by sort"; else $sql = "select highlight_id,highlight_title_th,substring_index(highlight_detail_th,'\r\n\r\n',1),highlight_urllink,highlight_imagename,highlight_flashname,flash_width,flash_height,media_display,layout,hostid,videoname,videowidth,videoheight,videotype,videolocation from highlight where status=1 order by sort"; $rs = mysql_query($sql); while (list($id,$title,$detail,$url,$image,$flash,$flash_width,$flash_height,$media_display,$layout,$hostid,$videoname,$videowidth,$videoheight,$videotype,$videolocation) = mysql_fetch_array($rs)) { $detail = ereg_replace(" ","  ",nl2br($detail)); if (empty($url)) $title = "$title"; else $title = "$title"; $photo_virtual_path = getPhotoVirtualPath($hostid); $flash_virtual_path = getFlashVirtualPath($hostid); $rnd = getStreamingRandomNumber(); if ($videotype == 4) // Media Link { $ext = strtolower(substr($videolocation,strrpos($videolocation,".")+1)); if ($ext == "rm" || $ext == "smi" || $ext == "smil" || $ext == "asf" || $ext == "wmv") $streamingURL = "admin/library/filelink/view-mediaclip.php?localhostaddress=$sess_user_localhostaddress&location=$videolocation&ext=$ext"; else $streamingURL = "http://$sess_user_localhostaddress/$videolocation"; } else { $streamingURL = "admin/library/view-clip.php?mediatype=$videotype&medianame=$videoname&virtual_path=lms/$photo_virtual_path&videolocation=$videolocation&locationhostaddress=$sess_user_localhostaddress&rnd=$rnd"; } $videostreaming = " Video "; $autostart = 0; switch ($layout) { case 1: /* Headline - Media - Details */ if (!empty($title)) { print (""); print (""); print (""); print (""); print ("
    $title
    "); } print ("

    "); print (""); if ((!empty($videoname) || !empty($videolocation)) && $videowidth > 0) { print (""); } else { if (!empty($image) && $media_display==1) { print (""); print (""); print (""); } if (!empty($flash) && $media_display==2) { print (""); print (""); print (""); } } print ("
    "); printStreamMedia($videotype,$videowidth,$videoheight,$videoname,$photo_virtual_path,$up_dir,$autostart,$videolocation,$sess_user_localhostaddress); print ("
    "); print ("

    "); print (""); if (!empty($detail)) { print (""); print (""); print (""); } if ((!empty($videoname) || !empty($videolocation)) && $videowidth <=0) { print (""); print (""); print (""); } print ("
    $detail
    $videostreaming
    "); break; case 2: /* Media align Left */ print (""); print (""); if ((!empty($videoname) || !empty($videolocation)) && $videowidth > 0) { print (""); } else { if (!empty($image) && $media_display==1) print (""); if (!empty($flash) && $media_display==2) print (""); } print (""); print (""); print (""); print ("
    "); printStreamMedia($videotype,$videowidth,$videoheight,$videoname,$photo_virtual_path,$up_dir,$autostart,$videolocation,$sess_user_localhostaddress); print (" "); print ("$title"); print ("

    $detail"); if ((!empty($videoname) || !empty($videolocation)) && $videowidth <=0) print ("

    $videostreaming"); print ("

    "); break; case 3: /* Media align Right */ print (""); print (""); print (""); print (""); if ((!empty($videoname) || !empty($videolocation)) && $videowidth > 0) { print (""); } else { if (!empty($image) && $media_display==1) print (""); if (!empty($flash) && $media_display==2) print (""); } print (""); print ("
    "); print ("$title"); print ("

    $detail"); if ((!empty($videoname) || !empty($videolocation)) && $videowidth <=0) print ("

    $videostreaming"); print ("

     "); printStreamMedia($videotype,$videowidth,$videoheight,$videoname,$photo_virtual_path,$up_dir,$autostart,$videolocation,$sess_user_localhostaddress); print ("
    "); break; } print ("
    "); } } function printPhotoNews() { global $photonews_width,$photonews_column,$lang,$field,$element,$menu_head_bgcolor,$menu_head_font_color,$centerpane_font_color; $cell_width = floor(100/$photonews_column); if ($lang == "en") $sql = "select photonewscategory_id,title from photonewscategory order by sort"; else $sql = "select photonewscategory_id,title_th from photonewscategory order by sort"; $rs = mysql_query($sql); $n = 0; while (list($id,$title) = mysql_fetch_array($rs)) { $arr_photonewscategory_id[$n] = $id; $arr_photonewscategory_title[$n] = $title; $n++; } for ($i=0;$i<$n;$i++) { $photonewscategory_id = $arr_photonewscategory_id[$i]; $photonewscategory_title = $arr_photonewscategory_title[$i]; print (""); print (""); print (""); print (""); print ("
      $photonewscategory_title
    "); if ($lang == "en") $sql = "select photonews_id,title,substring_index(detail,'\r\n\r\n',1),urllink,frontimagename,flashname,imagename,hostid from photonews where photonewscategory_id=$photonewscategory_id order by title"; else $sql = "select photonews_id,title_th,substring_index(detail_th,'\r\n\r\n',1),urllink,frontimagename,flashname,imagename,hostid from photonews where photonewscategory_id=$photonewscategory_id order by title_th"; $rs = mysql_query($sql); if (mysql_num_rows($rs) > 0) { print ("

    "); print (""); $col = 1; while (list($id,$title,$detail,$url,$frontimagename,$flashname,$imagename,$hostid) = mysql_fetch_array($rs)) { $virtual_path = getPhotoVirtualPath($hostid); if (!empty($url)) $title_str = "$title"; else $title_str = "$title"; if ($col == 1) print (""); print (""); if ($col == $photonews_column) { print (""); print (""); } if ($col == $photonews_column) $col = 1; else $col++; } print ("
    "); if (!empty($frontimagename)) { $size = getimagesize("$virtual_path/$frontimagename"); if ($size[0] > $photonews_width) $photo_width = $photonews_width; else $photo_width = $size[0]; print ("

    "); } if (!empty($flashname)) { print ("
    "); } print ($title_str."
    ".$detail); print ("
     
    "); } print ("

    "); } } function printVariousNews() { global $lang,$field,$element,$menu_head_bgcolor,$menu_head_font_color,$centerpane_font_color; if ($lang == "en") $sql = "select variousnews_id,title from variousnews order by sort"; else $sql = "select variousnews_id,title_th from variousnews order by sort"; $rs = mysql_query($sql); $n = 0; while (list($id,$title) = mysql_fetch_array($rs)) { $arr_variousnews_id[$n] = $id; $arr_variousnews_title[$n] = $title; $n++; } for ($i=0;$i<$n;$i++) { $variousnews_id = $arr_variousnews_id[$i]; $variousnews_title = $arr_variousnews_title[$i]; print (""); print (""); print (""); print (""); print ("
      $variousnews_title
    "); if ($lang == "en") $sql = "select news_id,title from variousnews_detail where variousnews_id=$variousnews_id order by title"; else $sql = "select news_id,title_th from variousnews_detail where variousnews_id=$variousnews_id order by title_th"; $rs = mysql_query($sql); if (mysql_num_rows($rs) > 0) { print ("

    "); print (""); while (list($id,$title) = mysql_fetch_array($rs)) { print (""); print (""); print (""); print (""); } print ("
    ::$title
    "); } print ("

    "); } } function printNews() { global $home_news_page_size,$lang,$field,$element,$menu_head_bgcolor,$menu_head_font_color,$centerpane_font_color; if ($lang == "en") $sql = "select news_id,news_title from news order by news_date desc, date_record desc limit 0,$home_news_page_size"; else $sql = "select news_id,news_title_th from news order by news_date desc, date_record desc limit 0,$home_news_page_size"; $rs = mysql_query($sql); if (mysql_num_rows($rs) > 0) { print (""); print (""); print (""); print (""); print ("
      ".$field[8][$element]."
    "); print ("

    "); print (""); while (list($id,$title) = mysql_fetch_array($rs)) { print (""); print (""); print (""); print (""); } print (""); print (""); print (""); print ("
    ::$title

    More
    "); } } function printProduct() { global $product_photo_width,$lang,$field,$element,$menu_head_bgcolor,$menu_head_font_color,$centerpane_font_color; if ($lang == "en") $sql = "select product_id,title,substring_index(description,'\r\n\r\n',1),price,imagename,hostid from product where recommend=1 and status=1"; else $sql = "select product_id,title_th,substring_index(description_th,'\r\n\r\n',1),price,imagename,hostid from product where recommend=1 and status=1"; $rs = mysql_query($sql); $noOfRecommend = mysql_num_rows($rs); if ($noOfRecommend > 0) { print ("

    "); print (""); print (""); print (""); print (""); print ("
      ".$field[51][$element]."
    "); print ("

    "); print (""); $n = 0; while (list($id,$title,$description,$price,$imagename,$hostid) = mysql_fetch_array($rs)) { $description = nl2br($description); $virtual_path = getPhotoVirtualPath($hostid); $url_product = "product/product-detail.php?product_id=$id&lang=$lang"; if (!empty($imagename)) { $size = getimagesize("$virtual_path/$imagename"); if ($size[0] > $product_photo_width) $photo_width = $product_photo_width; else $photo_width = $size[0]; } print (""); if (!empty($imagename)) { print (""); print (""); } else { print (""); print (""); } print (""); print (""); print (""); $n++; } print (""); print (""); print (""); print (""); print ("
    "); print (""); print ("  "); print ("$title"); print ("

    $description"); print ("


    "); print ("
     
    More
     
    "); } } function printDirectory () { global $menu_head_bgcolor,$menu_head_font_color,$centerpane_font_color,$lang,$field,$element; $col = 1; $n = 0; if ($lang == "en") $sql = "select categoryid,title as category_title,description as category_description from directory_category where pid=0 and status=1"; else $sql = "select categoryid,title_th as category_title,description_th as category_description from directory_category where pid=0 and status=1"; $rs = mysql_query($sql); if (mysql_num_rows($rs) > 0) { print ("

    "); print (""); print (""); print (""); print (""); print ("
      ".$field[3][$element]."
    "); print ("

    "); print (""); while ($row = mysql_fetch_array($rs)) { $arr_categoryid[$n] = $row[categoryid]; $arr_title[$n] = $row[category_title]; $arr_description[$n] = $row[category_description]; $n++; } for ($i=0;$i<$n;$i++) { $categoryid = $arr_categoryid[$i]; $title = $arr_title[$i]; $description = $arr_description[$i]; if ($col == 1) print ""; print ""; } if ($col == 1) $col = 2; else $col = 1; } print "
    "; print "$title"; if (!empty($description)) print "
    $description"; if ($col == 2) { print "
    "; } } function printBanner() { global $banner_width; $sql = "select banner_id,url,imagename,flashname,flash_width,flash_height,media_display,hostid from banner order by sort"; $rs = mysql_query($sql); while (list($id,$url,$imagename,$flashname,$flash_width,$flash_height,$media_display,$hostid) = mysql_fetch_array($rs)) { print (""); print (""); print (""); print (""); print ("
    "); if ($media_display == "1") { $virtual_path = getPhotoVirtualPath($hostid); $size = getimagesize("$virtual_path/$imagename"); if ($size[0] > $banner_width) $width = $banner_width; else $width = $size[0]; if (!empty($url)) print ("\"$url\""); else print ("\"$url\""); } else { $virtual_path = getFlashVirtualPath($hostid); print ("
    http://$url "); } print ("
    "); } } function printInfoBlock() { global $infoblock_width,$lang,$field,$element,$rightpane_bgcolor,$rightpane_font_color; print ("
    "); if ($lang == "en") $sql = "select infoblock_id,title,substring_index(description,'\r\n\r\n',1),blockcolor,imagename,hostid,url from infoblock where status=1 order by sort"; else $sql = "select infoblock_id,title_th,substring_index(description_th,'\r\n\r\n',1),blockcolor,imagename,hostid,url from infoblock where status=1 order by sort"; $rs = mysql_query($sql); $no_of_infoblock = mysql_num_rows($rs); if ($no_of_infoblock > 0) { $n = 0; while (list($id,$title,$description,$blockcolor,$imagename,$hostid,$url) = mysql_fetch_array($rs)) { $description = nl2br($description); $url_infoblock = "infoblock/infoblock-detail.php?infoblock_id=$id"; $virtual_path = getPhotoVirtualPath($hostid); if (!empty($blockcolor)) { $blockcolor_str = "bgcolor=$blockcolor"; $infoblock_font_color = getFontColor($blockcolor); } else { $blockcolor_str = "bgcolor=$rightpane_bgcolor"; $infoblock_font_color = $rightpane_font_color; } if (!empty($imagename)) { $size = getimagesize("$virtual_path/$imagename"); if ($size[0] > $infoblock_width) $photo_width = $infoblock_width; else $photo_width = $size[0]; } print (""); print ("
    "); print (""); print (""); if (!empty($url)) print(""); else print (""); print (""); print (""); print (""); print (""); print ("
    $title$title
    "); if (!empty($imagename)) { if (!empty($url)) print ("

    "); else print ("

    "); } print ("

    $description"); print ("

    "); print ("
    "); print ("

    "); $n++; } } } ?>