retriveContent("cybercolleges","",$countryCode); $links = $pagesObj->retriveLinks("cybercolleges",$countryCode); $catId = $_GET['catId']; $typeId = $_GET['typeId']; if($typeId == 2) { $heading = "Short Business Courses"; } elseif($typeId == 3){ $heading = "Advanced Business Courses"; } elseif($typeId == 6){ $heading = "IT Courses"; }else{ $heading = "Enrol now! from the complete list of courses"; } $categoryObj = &new category(); $typeObj = &new type(); $cyberObj = &new cyber(); $countryObj = &new country(); $arrCyber = $cyberObj->listCyberCourses($catId,$typeId,$countryCode); $arrType = $typeObj->listType(); $arrCategory = $categoryObj->listCategory(); $currency = $countryObj->getCurrency($countryCode); /* $countryCode = "au"; $arrCyber = listCyberCourses($catId,$typeId,$countryCode); function listCyberCourses($catId,$typeId,$countryCode){ //global $db; $con = mysql_connect("localhost","tcicontr_vs143739","vs143739"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("tcicontr_vs1437391", $con); if($catId) $cond = "cat.id = $catId AND "; if($typeId) $cond = "type.id = $typeId AND"; $sql = "SELECT cyber.id,cyber.name,cyber.categoryId,cyber.typeId,cyber.description,cyber.image,pr.$countryCode,user.sku,cat.id AS categoryId,cat.name AS category,cat.description AS catDescription FROM cyber_master AS cyber, cyber_price AS pr, cyber_users AS user ,category_master AS cat,type_master AS type WHERE $cond cyber.id=user.cyberId AND user.sku=pr.sku AND user.users=1 AND cyber.categoryId= cat.id AND cyber.typeId = type.id ORDER BY cyber.name "; $rs = mysql_query($sql); $category = array(); $categoryId = 0; while($row = mysql_fetch_array($rs)){ if($categoryId != $row['categoryId']){ $categoryId = $row['categoryId']; $category[$categoryId]['name'] = $row['category']; $category[$categoryId]['description'] = $row['catDescription']; //$category[$categoryId]['id'] = $row['id']; //echo $categoryId."CID
"; } $category[$categoryId]['COURSES'][] = array( name => $row['name'], price => $row[$countryCode], id => $row['id'] ) ; } return $category; mysql_close($con); } //$elm1 = $pagesObj->retriveContent("cybercolleges","",$countryCode); //$links = $pagesObj->retriveLinks("cybercolleges",$countryCode); /*$catId = $_GET['catId']; $typeId = $_GET['typeId']; $categoryObj = &new category(); $typeObj = &new type(); $countryObj = &new country(); $arrCyber = $cyberObj->listCyberCourses($catId,$typeId,$countryCode); $arrType = $typeObj->listType(); $arrCategory = $categoryObj->listCategory(); $currency = $countryObj->getCurrency($countryCode); */ require(F_PATH."/tpl/modules/cyber/ncyberList.tpl.php"); require(F_PATH."/app/includes/nfooter.inc.php"); ?>