public function matapelajaran()
 {
     $klslevel = isset($_GET['klslevel']) ? addslashes($_GET['klslevel']) : 1;
     //$kls = new Kelas();
     //$kls->getByID($id);
     $mp = new Matapelajaran();
     $mp_id = isset($_GET['mp_id']) ? addslashes($_GET['mp_id']) : die('MP ID empty');
     $mp->getByID($mp_id);
     //get quizes
     $quiz = new Quiz();
     $whereClause = "quiz_guru_id = guru_id AND quiz_mp_id = '{$mp_id}' AND quiz_tingkatan = '{$klslevel}' ORDER BY quiz_create_date DESC";
     $arrTables = array("Guru");
     $arrQuiz = $quiz->getWhereFromMultipleTable($whereClause, $arrTables);
     //pr($arrQuiz);
     //get topicmaps
     $tm = new Topicmap();
     $whereClause = "tm_guru_id = guru_id AND tm_mp_id = '{$mp_id}'  AND tm_kelas_tingkatan  = '{$klslevel}' ORDER BY tm_updatedate DESC";
     $arrTables = array("Guru");
     $arrTM = $tm->getWhereFromMultipleTable($whereClause, $arrTables);
     //pr($arrTM);
     $return["mp"] = $mp;
     $return['kelas'] = $kls;
     $return['webClass'] = __CLASS__;
     $return['method'] = __FUNCTION__;
     $return['klslevel'] = $klslevel;
     $return['arrQuiz'] = $arrQuiz;
     $return['arrTM'] = $arrTM;
     Mold::both("elearning/mp_profile", $return);
     //pr($mp);
 }
 public function myHomeroomTeacher()
 {
     $ta = TahunAjaran::ta();
     $kelas = Account::getMyKelas($ta);
     $guru = new Guru();
     $row = $guru->getHomeroomFromKelas($ta, $kelas->kelas_id);
     $guru->fill(toRow($row));
     //pr($guru);
     Mold::both("leap/homeroom_widget", array("guru" => $guru, "kelas" => $kelas));
 }
 public function viewNilaiGraph()
 {
     $ta = isset($_GET['ta']) ? addslashes($_GET['ta']) : TahunAjaran::ta();
     $murid_id = $_GET['murid_id'];
     $matapelajaranID = $_GET['matapelajaranID'];
     $nilai = new Nilai($ta, "", $matapelajaranID, "");
     $return['webClass'] = __CLASS__;
     $return['method'] = __FUNCTION__;
     $return['ta'] = $ta;
     $return['murid_id'] = $murid_id;
     $return['matapelajaranID'] = $matapelajaranID;
     $return['graph'] = $nilai->getNilaiNachSubject($murid_id, $matapelajaranID, $ta);
     Mold::both("studentsetup/graphnilai", $return);
 }
echo $nrHoliday;
?>
</b></div>
    <div class='col-md-4 col-xs-6 col-sm-6 absenlegend' id="weekendcontainer"><?php 
echo Lang::t('Weekend');
?>
 : <b
            id="nrWeekend"><?php 
echo $nrWeekend;
?>
</b></div>
</div>
<div class="table-responsive">
    <table id="absentable" class="table table-bordered">
        <?php 
Mold::both("studentsetup/makeEinzelAbsen", array("murid" => $murid, "calendar" => $calendar, "numDays" => $numDays, "mon" => $mon, "year" => $year, "arrMacemAbsens" => $arrMacemAbsens, "arrCl" => $arrCl, "limithari" => $limithari, "muridview" => 1));
?>
    </table>
</div>
<div class="row" style="margin-bottom: 10px;">
    <?php 
foreach ($arrMacemAbsens as $angka => $value) {
    echo "<div class='col-md-2 col-xs-4 col-sm-3 absenlegend'>" . substr($value, 0, 1) . " = " . $value . "</div>";
}
?>
</div>
<?php 
//pr($arr);
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 public static function kerjakan($array)
 {
     global $template;
     ob_start();
     Mold::both("Atasan", $array);
     $str = ob_get_contents();
     ob_end_clean();
     $template->full_text .= $str;
 }
echo $t;
?>
").click(function () {
            $('#myModalLabel').empty().append('<?php 
echo Lang::t('Write your reply');
?>
');
            $('#myModalBody').load('<?php 
echo _SPPATH;
?>
wallweb/viewcomment?cmd=form&typ=kelas&klsid=<?php 
echo $klsid;
?>
&wid=<?php 
echo $wall->wall_id;
?>
');
        });
    </script>
    <h1 style="padding-top: 20px;"><?php 
echo count($mwc);
?>
 <?php 
echo Lang::t('Comments');
?>
</h1>
<?php 
foreach ($mwc as $c) {
    Mold::both("wall/einzel_comment", array("c" => $c));
}
//pr($arr);
                        $("#walllist<?php 
echo $t;
?>
").html(data);
                    }

                });
        });
    </script>
    <div id="walllist<?php 
echo $t;
?>
">
        <?php 
foreach ($arrWall as $m) {
    Mold::both("wall/einzel_post", array("m" => $m, "typ" => "kelas", "klsid" => $kelas_id, "newFor" => $newFor));
}
?>
    </div>
<?php 
$nmore = isset($_GET['nomoreresults']) ? addslashes($_GET['nomoreresults']) : 'no';
if ($nmore != "yes") {
    ?>
    <div class="loadmore" style="padding:10px; text-align: center;">
    <span style="padding:10px; cursor: pointer; color: #777; background-color: #fff; border-radius: 5px;"
          id="loadmoreb<?php 
    echo $t;
    ?>
">
        <?php 
    echo Lang::t('show more results');
 public function fillEnvelope()
 {
     $inbox = new Inbox();
     $return = $inbox->fillEnvelope();
     $return['method'] = __FUNCTION__;
     $return['webClass'] = __CLASS__;
     Mold::both("inbox/fillEnvelope", $return);
 }
 public function myJadwal()
 {
     //pr($_SESSION);
     //ambil tahun ajaran utk Matapelajaran
     $ta = TahunAjaran::ta();
     $murid = new Murid();
     $murid->default_read_coloms = "*";
     $murid->getByAccountID(Account::getMyID());
     $kls = $murid->getMyKelas($ta);
     $cmd = isset($_GET['cmd']) ? $_GET['cmd'] : "read";
     $id = $kls->kelas_id;
     $tag = date("N");
     $jadwalMatapelajaran = new Jadwalmatapelajaran($id, $ta, "Weekly", "");
     // pr($jadwalMatapelajaran);
     $return['webClass'] = __CLASS__;
     $return['method'] = __FUNCTION__;
     $return['ta'] = $ta;
     $return['kls'] = $kls;
     $jadwalMatapelajaran->init();
     $return['jadwalMatapelajaran'] = $jadwalMatapelajaran;
     //Mold::both("studentsetup/jadwalmatapelajaran",  $jadwalMatapelajaran);
     //Mold::both("studentsetup/jadwalmatapelajaranDaily",  $jadwalMatapelajaran);
     Mold::both("studentsetup/jadwalmatapelajaranWeekly", $return);
 }
?>
</h1>
<?php 
foreach ($arrGuru as $murid) {
    Mold::both("leap/printEinzelAsBadge", array("murid" => $murid));
}
?>
<div style="clear: both; margin: 10px;">&nbsp;</div>
<h1><?php 
echo Lang::t('Administratives');
?>
</h1>
<?php 
foreach ($arrTU as $murid) {
    Mold::both("leap/printEinzelAsBadge", array("murid" => $murid));
}
?>
<div style="clear: both;margin: 10px;">&nbsp;</div>
<h1><?php 
echo Lang::t('Supervisors');
?>
</h1>
<?php 
foreach ($arrSupervisor as $murid) {
    Mold::both("leap/printEinzelAsBadge", array("murid" => $murid));
}
?>
<div style="clear: both;margin: 10px;">&nbsp;</div>
<?php 
//pr($arr);
//pr($arr);
    echo _SPPATH;
    ?>
wallweb/composewall?cmd=form&typ=school');
        });
    </script>
<?php 
}
?>
    <div id="walllist<?php 
echo $t;
?>
">

        <?php 
foreach ($arrWall as $m) {
    Mold::both("wall/einzel_post", array("m" => $m, "typ" => "school", "klsid" => "", "newFor" => $newFor));
}
?>
    </div>
<?php 
$nmore = isset($_GET['nomoreresults']) ? addslashes($_GET['nomoreresults']) : 'no';
if ($nmore != "yes" && !$noPost) {
    ?>
    <div class="loadmore" style="padding:10px; text-align: center;">
    <span style="padding:10px; cursor: pointer; color: #777; background-color: #fff; border-radius: 5px;"
          id="loadmoreb<?php 
    echo $t;
    ?>
">
        <?php 
    echo Lang::t('show more results');
    public static function incl($qid, $quiz, $actual_link, $base, $calc_number = 1)
    {
        $fb_page = "https://www.facebook.com/pages/Stage-City/1076705655676385";
        ?>
<style>
    #detail,#calc,#resultcontainer{
        background-color: #efefef;
        padding: 20px;
    }
    #detail{
        text-align: center;
        
    }
    .quiz_des{
        text-align: center;
        font-size: 15px;
        padding-bottom: 20px;
    }
    #comment{
        padding-top: 50px;
    }
    #fbgroup{
        padding-bottom: 20px;
    }
    .subtext{
        font-size: 14px;
        text-align: center;
    }
    .aftersales{
        text-align: center;
        padding: 30px;
    }
    #resultcontainer{
        text-align: center;
    }
    .subtextres{
        font-size:18px;
        padding: 20px;
    }
    .moremenu{
        padding-bottom: 40px;
        padding-top: 40px;
    }
    .moremenua{
        text-align: center;
        padding-bottom: 20px;
    }
    .fb-like2 {
    transform: scale(1.8);
    -ms-transform: scale(1.8);
    -webkit-transform: scale(1.8);
    -o-transform: scale(1.8);
    -moz-transform: scale(1.8);
}
</style>
<div class="col-md-8 col-md-offset-2">



    <div id="fbgroup">
    <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 id="detail">
        <h1><?php 
        echo $quiz->quiz_name;
        ?>
</h1>
        <div class="quiz_des"><?php 
        echo $quiz->quiz_descr;
        ?>
</div>
        <button onclick="$('#detail').hide();$('#calc').show();" style="min-width: 250px;" class="btn btn-primary btn-lg">Start</button>
    </div>
    <div id="calc" style="display: none;">
        <?php 
        if ($calc_number == 1) {
            ?>
        <h3 style="text-align: center;">Please fill your gender and date of birth</h3>
        <div class="subtext">PS : We will not save your personal data</div>
        <div class="col-md-8 col-md-offset-2" style="margin-top: 50px; padding-bottom: 30px;">
        <?php 
            Mold::both("bazi_calculator_min", array("buttontext" => "Calculate", "location" => "PlayResult/calc_" . $qid, "qid" => $qid, "actual_link" => $actual_link));
            ?>
        </div>
        <?php 
        }
        ?>
        <?php 
        if ($calc_number == 2) {
            ?>
        <h3 style="text-align: center;">Please fill the gender and the date of birth of you and your sweet heart</h3>
        <div class="subtext">PS : We will not save your personal data</div>
        <div class="col-md-12" style="margin-top: 50px; padding-bottom: 30px;">
        <?php 
            Mold::both("bazi_calculator_max", array("buttontext" => "Calculate", "location" => "PlayResult/calc_" . $qid, "qid" => $qid, "actual_link" => $actual_link));
            ?>
        </div>
        <?php 
        }
        ?>
        <div class="clearfix"></div>
    </div>
    <script>
    function fbs_click(){
        u=location.href;    
        //t=document.title;
        var win = window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&p[images][0]=<?php 
        echo $quiz->quiz_fb_image;
        ?>
','sharer','toolbar=0,status=0,width=626,height=436');
        //win.location.reload();
        setTimeout(win.location.reload, 1400);
        return false;
    }
        </script>
        
    <div id="resultcontainer" style="display:none;">    
        <div id="resulting" style="display:none;"></div>
        <div id="moremenu" style="display:none;">
            <div class="moremenu">
                <div class="moremenua col-md-3"><a href="#more">take other test</a></div>
                <div class="moremenua col-md-3">
                    <div class="fb-like" data-href="<?php 
        echo $fb_page;
        ?>
" data-layout="button" data-action="like" data-show-faces="false" data-share="false"></div>
                </div>
                <div class="moremenua col-md-3"><a target="_blank" href="<?php 
        echo _SPPATH;
        ?>
how_we_do_it">how we do it</a></div>
                <div class="moremenua col-md-3"><a href="#comment">leave a comment</a></div>
            </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 id="more">
    <?php 
        $_GET['active_id'] = $qid;
        $qm = new QuizMain();
        $qm->index();
        ?>
  
    </div>
</div>
<!-- Modal -->
<div class="modal fade" id="afterSalesModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <div class="modal-title" id="myModalLabel">Share with friends</div>
      </div>
        <div class="modal-body" id="modalbody">
            <div id="modalbody2" style="text-align: center;">
                
            </div>
            <div class="likeus" style="text-align: center; padding: 20px;">
                If you enjoyed this, please like us. Thanks! 
                <div class="likebut" style="padding:20px;">
                    <div class="fb-like fb-like2" data-href="<?php 
        echo $fb_page;
        ?>
" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div>
                </div>
            </div>  
      </div>
      <!--<div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>-->
    </div>
  </div>
</div>
<?php 
        global $template;
        $template->metades = 'QuizNot is a life event calculator. This method allow you to find out more about your journey in life.';
        $template->metakey = 'Life Quiz,QuizNot,Not A Quiz, Journey Calculator, Facebook Games';
        //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="510260392457364" />' . '<meta property="og:type" content="website" />';
        $template->headText[] = $fb_opengraph;
        //sitename
        $fb_opengraph = '<meta property="og:site_name" content="#LetUsGuess | Stage City Apps"/>';
        $template->headText[] = $fb_opengraph;
        //description
        $fb_opengraph = '<meta property="og:description" content="' . $quiz->quiz_descr . '" />';
        $template->headText[] = $fb_opengraph;
    }
 public function viewcomment()
 {
     $ta = TahunAjaran::ta();
     $wid = isset($_GET['wid']) ? addslashes($_GET['wid']) : '';
     $klsid = isset($_GET['klsid']) ? addslashes($_GET['klsid']) : '';
     $typ = isset($_GET['typ']) ? addslashes($_GET['typ']) : '';
     $cmd = isset($_GET['cmd']) ? addslashes($_GET['cmd']) : 'view';
     $return['webClass'] = __CLASS__;
     $return['method'] = __FUNCTION__;
     $return['ta'] = $ta;
     $return["klsid"] = $klsid;
     if ($cmd == "form") {
         $return["typ"] = $typ;
         $return['id'] = $wid;
         $return['mode'] = "viewcomment";
         Mold::both("wall/compose", $return);
         die;
     }
     if ($cmd == "add") {
         $json['bool'] = 0;
         $json['err'] = '';
         //pr($_POST);
         if (isset($_POST['wall_msg'])) {
             $wall_msg = trim(rtrim($_POST['wall_msg']));
         }
         if ($wall_msg == '') {
             $json['err'] .= Lang::t('Message is empty');
         }
         $id = isset($_GET['id']) ? addslashes($_GET['id']) : '';
         if ($id == '') {
             $json['err'] .= Lang::t('Id is empty');
         }
         if ($json['err'] == '') {
             // am 01.10.2014,insert <embed><iframe> vom Efindi
             //$wall_msg = addslashes(strip_tags(trim(rtrim ($_POST['wall_msg'])),'<p><a><br><b><i><img><hr>'));
             $wall_msg = strip_tags(trim(rtrim($_POST['wall_msg'])), '<p><a><br><b><i><img><hr><embed><iframe>');
             if ($typ == "kelas") {
                 $wall = new MuridWallComment();
                 $wall->wid = $id;
                 $wall->cid_admin_nama = Account::getMyName();
                 $wall->cid_admin_foto = Account::getMyFoto();
                 $wall->cid_admin_id = Account::getMyID();
                 //create date
                 $tgl = Wall::getDateTime();
                 $wall->c_date = $tgl;
                 $wall->c_text = $wall_msg;
                 $json['bool'] = $wall->save();
                 if ($json['bool']) {
                     $wall2 = new MuridWall();
                     $wall2->getByID($id);
                     $wall2->wall_commentcount++;
                     $wall2->wall_update = $tgl;
                     $wall2->load = 1;
                     //spy update
                     $json['bool'] = $wall2->save();
                 }
             }
         }
         die(json_encode($json));
     }
     if ($cmd == "view") {
         $mwc = new MuridWallComment();
         $whereClause = "wid = '{$wid}' ORDER BY c_date DESC";
         $arrComment = $mwc->getWhere($whereClause);
         $wall = new MuridWall();
         $wall->getByID($wid);
         $acc = new Account();
         $acc->getByID($wall->wall_from);
         $wall->acc = $acc;
         $target = "kelaswall___" . $wall->wall_id;
         $foto = new Fotoajax();
         $arrFoto = $foto->getWhere("photo_target_id = '{$target}' ORDER BY photo_date DESC");
         $wall->foto = $arrFoto;
         $return['wall'] = $wall;
         $return['mwc'] = $arrComment;
         Mold::both("wall/viewcomment", $return);
     }
 }
<h1><?php 
echo $kelas->kelas_name;
?>
    <small><?php 
echo $ta;
?>
</small>
</h1>
<?php 
//print if user is supervisor, so that he can select which class he want to see
if ($selectKelas) {
    ?>
    <div class="row" style="margin-bottom: 10px;">
        <div class="col-md-12">
            <?php 
    //select on kelas
    $urlOnChange = _SPPATH . $webClass . "/" . $method . "?d=1";
    Selection::kelasSelector($kelas, $urlOnChange);
    ?>
        </div>
    </div>
<?php 
}
// Iterate Students
foreach ($arrMurid as $murid) {
    //Molding design for each Students
    Mold::both("murid/printEinzelAsBadge", array("murid" => $murid, "nrRow" => $nrRow));
}
?>
<div style="clear: both;"></div>
 public function browseStaff()
 {
     $guru = new Guru();
     $arrGuru = $guru->getWhere("guru_aktiv = 1 ORDER BY nama_depan ASC", "guru_id,account_id,nama_depan,foto");
     $supervisor = new Supervisor();
     $arrSupervisor = $supervisor->getWhere("supervisor_aktiv = 1 ORDER BY nama_depan ASC", "supervisor_id,account_id,nama_depan,foto");
     $tatausaha = new Tatausaha();
     $arrTU = $tatausaha->getWhere("tu_aktiv = 1 ORDER BY nama_depan ASC", "tu_aktiv,account_id,nama_depan,foto");
     $admin = new Admin();
     $arrAdmin = $admin->getWhere("sys_aktiv = 1 ORDER BY nama_depan ASC", "sys_id,account_id,nama_depan,foto");
     $t = time();
     $return['arrTU'] = $arrTU;
     $return['arrSupervisor'] = $arrSupervisor;
     $return['arrAdmin'] = $arrAdmin;
     $return['arrGuru'] = $arrGuru;
     $return['method'] = __FUNCTION__;
     $return['webClass'] = __CLASS__;
     Mold::both("leap/browseStaff", $return);
 }
?>
    <small><?php 
echo $ta;
?>
</small>
</h1>
<?php 
if (!$muridview) {
    ?>
    <div class="row" style="margin-bottom: 10px;">
        <div class="col-md-3 col-xs-12">
            <?php 
    //select on kelas
    $urlOnChange = _SPPATH . $webClass . "/" . $method . "?dummy=1";
    Selection::kelasSelector($kelas, $urlOnChange);
    ?>
        </div>
    </div>
<?php 
}
Mold::both("wall/class_wall_einzel", $arr);
?>


<?php 
//pr($arr);
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
Example #17
0
 function homeLoad()
 {
     //$arrTabs =$this->loadedDomains4Role[Account::getMyRole()];
     //$arrDomain = $this->domains;
     //mold ini masi ada logic dibelakangnya untuk first loadnya..
     //Mold::both("header",array("arrTabs"=>$arrTabs,"arrDomain"=>$arrDomain));
     //$st = new Schoolsetup();
     //$st->getEffDay();
     Mold::both("timeline");
     exit;
 }