function tk($args) { list($lvl, $name) = $args; //$lvl = $_GET['lvl']; if ($lvl == "") { $lvl = 1; } if ($lvl == 0) { header("Location:" . _SPPATH . "rank/dari_untuk_indonesia"); exit; } $l = new QuizLevel(); $l->getByID($lvl); if ($l->level_name == "" || $l->level_aktif != 1) { Redirect::p404(); } $actual_link = _BPATH . "kl/tk/" . $lvl; $point = QuizPoints::myPoints(); $kurang = ""; $lebih = ""; $arrLevelsBig = $l->getWhere("level_limit > {$l->level_limit} AND level_aktif = 1 ORDER BY level_limit ASC LIMIT 0,1"); $lebih = $arrLevelsBig[0]; $arrLevelsSmall = $l->getWhere("level_limit < {$l->level_limit} AND level_aktif = 1 ORDER BY level_limit DESC LIMIT 0,1"); $kurang = $arrLevelsSmall[0]; //pr($arrLevels); $boleh = 0; if ($point >= $l->level_limit) { $boleh = 1; } $arrLevel = $l->getWhere(" level_aktif = 1 ORDER BY level_limit ASC "); ?> <div class="col-md-10 col-sm-12 col-xs-12 kelas col-md-offset-1"> <div id="fbgroup" style="height: 20px; line-height: 20px; margin-bottom: 20px;float: none; "> <div style="float:left;width: 200px; text-align: left;"> Pilih Kelas : <select id="kelassel" onchange="document.location='<?php echo _SPPATH; ?> kl/tk/'+$('#kelassel').val();"> <?php foreach ($arrLevel as $level) { ?> <option <?php if ($level->level_id == $lvl) { echo "selected"; } ?> value="<?php echo $level->level_id; ?> "><?php echo $level->level_name; ?> </option> <?php } ?> </select> </div> <div class="fb-like" data-href="<?php echo $actual_link; ?> " data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div> </div> <div class="kelas_container"> <h1 class="text-center judulkl"> <?php if ($kurang->level_id != "") { ?> <i onclick="document.location='<?php echo _SPPATH; ?> kl/tk/<?php echo $kurang->level_id; ?> ';" class="glyphicon glyphicon-chevron-left"></i> <?php } ?> <?php echo $l->level_name; ?> <?php if ($lebih->level_id != "") { ?> <i onclick="document.location='<?php echo _SPPATH; ?> kl/tk/<?php echo $lebih->level_id; ?> ';" class="glyphicon glyphicon-chevron-right"></i> <?php } ?> </h1> <div class="kelas_isi"> <?php //echo "<h1 class='text-center'>".$l->level_name."</h1>"; //get ulangan dlm level $ul = new QuizUlangan(); $arrUl = $ul->getWhere("ulangan_level_id = '" . $l->level_id . "' AND ulangan_aktif = 1"); //pr($arrUl); foreach ($arrUl as $num => $ul) { ?> <div class="col-md-4 text-center kelas_dalam"> <div class="kelas_dalam_image"> <a href="<?php echo _SPPATH; ?> ul/id/<?php echo $ul->ulangan_id; ?> /<?php echo urlencode($ul->ulangan_name); ?> "> <img class="wow bounceIn" <?php if (!$boleh) { ?> style="opacity:0.5;"<?php } ?> width="100%" src="<?php echo _SPPATH . _PHOTOURL . "thumbnail/" . $ul->ulangan_image; ?> "> </a> </div> <div class="kelas_dalam_text"> <a href="<?php echo _SPPATH; ?> ul/id/<?php echo $ul->ulangan_id; ?> /<?php echo urlencode($ul->ulangan_name); ?> "><?php echo $ul->ulangan_name; ?> </a> </div> </div> <?php if ($num % 3 == 2) { echo '<div class="clearfix"></div>'; } } ?> <div class="clearfix"></div> </div> </div> <div id="comment"> <div class="fb-comments" data-href="<?php echo $actual_link; ?> " data-width="100%" data-numposts="5" data-colorscheme="light"></div> </div> </div> <div class="clearfix"></div> <style> h1.judulkl{ font-family: verdana; margin-top: 0px; } .kelas_dalam_text a{ color:#db031b; } .judulkl i{ font-size: 20px; position: absolute; margin-top: 80px; margin-left: 20px; font-style: normal; cursor: pointer; //color:maroon; } .judulkl i.glyphicon-chevron-left{ margin-left: -40px; //margin-right: 20px; } .kelas_container{ padding-top: 30px; // background-color: #efefef; } </style> <?php global $template; $template->title = $l->level_name . " | Seberapa Indonesiakah Anda"; $template->metades = $l->level_descr . " #Seberapa Indonesiakah Anda | How Indonesia Are You"; $template->metakey = 'How Indonesia Are You, Seberapa Indonesiakah Anda'; $fb_opengraph = '<meta property="og:title" content="' . $l->level_name . '" />'; $template->headText[] = $fb_opengraph; //image $fb_opengraph = '<meta property="og:image" content="' . _BPATH . _PHOTOURL . $l->level_fb_image . '" /> '; $template->headText[] = $fb_opengraph; //url $actual_link = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; $fb_opengraph = '<meta property="og:url" content="' . $actual_link . '" />'; $template->headText[] = $fb_opengraph; //sitename $fb_opengraph = '<meta property="fb:app_id" content="' . Efiwebsetting::getData('fb_app_id') . '" />' . '<meta property="og:type" content="website" />'; $template->headText[] = $fb_opengraph; //sitename $fb_opengraph = '<meta property="og:site_name" content="SeberapaIndonesiakahAnda"/>'; $template->headText[] = $fb_opengraph; //description $fb_opengraph = '<meta property="og:description" content="' . $l->level_descr . '" />'; $template->headText[] = $fb_opengraph; }