function home() { $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"); ?> <script type="text/javascript"> $(document).ready(function () { openLw('Home', '<?php echo _SPPATH; ?> homeLoad', 'fade'); }); </script> <?php }
<?php echo RoleLevel::getMy()->level_name; ?> </td> </tr> <tr> <td> <?php echo Lang::t('Administrator Role'); ?> : </td> <td> <?php echo Account::getMyRole(); ?> </td> </tr> </table> <h3 style="padding-left: 10px;"><?php echo Lang::t('Account Details'); ?> </h3> <table class="table table-striped"> <tr> <td> <?php echo Lang::t('Username'); ?> :
event.preventDefault(); $('#myModalLabel').empty().append('<?php echo Lang::t('Compose Message'); ?> '); $('#myModalBody').load('<?php echo _SPPATH; ?> inboxweb/composeByID?acc_id=<?php echo $acc->admin_id; ?> '); }); </script> <?php if (Account::getMyRole() != "murid") { ?> <button style="margin-top:5px;" id="Gallery<?php echo $acc->admin_id; ?> " type="button" class="btn btn-primary btn-block"><?php echo Lang::t('Upload Photos'); ?> </button> <script> $('#Gallery<?php echo $acc->admin_id; ?> ').click(function () { openLw('ViewGallery<?php
public static function addLog($ket = "", $action = 'browse') { $bl = new BLogger(); $bl->b_log_ip = $_SERVER['REMOTE_ADDR']; $bl->b_log_userid = Account::getMyID(); $bl->b_log_time = leap_mysqldate(); $uri = $_SERVER['REQUEST_URI']; $pos = strpos($uri, 'DMWeb'); if ($pos !== false) { $uri = 'DMWeb'; } $bl->b_log_url = $uri; $bl->b_log_action = $action; $bl->b_log_username = Account::getMyUsername(); $bl->b_log_keterangan = $ket; $bl->b_timestamp = time(); $bl->b_log_userrole = Account::getMyRole(); $md = new \Leap\Utility\MobileDetect(); $isMobile = $md->isMobile(); $isTablet = $md->isTablet(); $userAgent = $md->getUserAgent(); $txt = ""; if ($isMobile) { $txt .= "Mobile"; } elseif ($isTablet) { $txt .= "Tablet"; } else { $txt .= "Desktop"; } $bl->b_log_user_agent = $txt . " | {$userAgent}"; $bl->log_user_org = PortalHierarchy::getMyOrganization(); $bl->log_user_level = PortalHierarchy::getMyLevel(); $bl->save(); }
><?php echo $slots[$day][$kelasName][0]->namaMatapelajaran; ?> </td> <?php } ?> </tr> <?php $slotID++; } ?> </table> </div> <?php if (Account::getMyRole() == "supervisor" || Account::getMyRole() == "tatausaha") { ?> <script> function selectMPNoRestriction(slotID, day, mp_id, mp_type) { //alert(slotID+" "+day); //$('#kls<?php echo $kls->kelas_id; ?> _'+slotID+'_'+day).load('<?php echo _SPPATH; ?> index'); $('#kls<?php echo $kls->kelas_id; ?>
} .walltext { clear: both; } .fotocontainer { margin-bottom: 10px; } </style> <h1><?php echo Lang::t('Schoolwall'); ?> </h1> <?php if (Account::getMyRole() == "supervisor" && !$noPost) { ?> <div id='writewall<?php echo $t; ?> ' data-toggle="modal" data-target="#myModal" style="width:100%; height: 30px; line-height: 30px; color: #999999; text-align: center; border-bottom: 1px solid #aaaaaa;"> <?php echo Lang::t("Write On Wall"); ?> </div> <script type="text/javascript"> $("#writewall<?php echo $t; ?> ").click(function () {
public function composewall() { $ta = TahunAjaran::ta(); $typ = isset($_GET['typ']) ? addslashes($_GET['typ']) : ''; $klsid = isset($_GET['klsid']) ? addslashes($_GET['klsid']) : ''; $cmd = isset($_GET['cmd']) ? addslashes($_GET['cmd']) : 'form'; if ($typ == "") { die('Type must be defined'); } if ($typ == "kelas" && $klsid == "") { die("Kelas must be defined"); } $return['webClass'] = __CLASS__; $return['method'] = __FUNCTION__; if ($cmd == "form") { $return["typ"] = $typ; $return["klsid"] = $klsid; $return['id'] = Wall::createID(); Mold::both("wall/compose", $return); } if ($cmd == "add") { $json['bool'] = 0; $json['err'] = ''; 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'] == '') { //$wall_msg = addslashes(strip_tags(trim(rtrim ($_POST['wall_msg'])),'<p><a><br><b><i><img><hr>')); // am 01.10.2014,insert <embed><iframe> vom Efindi $wall_msg = strip_tags(trim(rtrim($_POST['wall_msg'])), '<p><a><br><b><i><img><hr><embed><iframe>'); if ($typ == "kelas") { $wall = new MuridWall(); $wall->wall_id = $id; $wall->wall_msg = $wall_msg; $wall->wall_from = Account::getMyIDwithCheck(); $wall->wall_kelas_id = $klsid; $wall->wall_role = Account::getMyRole(); $wall->wall_ta_id = $ta; $tgl = Wall::getDateTime(); $wall->wall_date = $tgl; $wall->wall_update = $tgl; $json['bool'] = $wall->save(); } if ($typ == "school") { $wall2 = new SchoolWall(); $wall2->wall_id = $id; $wall2->wall_msg = $wall_msg; $wall2->wall_from = Account::getMyIDwithCheck(); $wall2->wall_role = Account::getMyRole(); Auth::checkRole("supervisor"); $wall2->wall_kls_ta = "school"; $tgl = Wall::getDateTime(); $wall2->wall_date = $tgl; // echo "in"; // die($wall_msg); $json['bool'] = $wall2->save(); } } die(json_encode($json)); } }
public function myProfile() { $role = Account::getMyRole(); if ($role == "murid") { $murid = new Murid(); $murid->default_read_coloms = "*"; $murid->getByAccountID(Account::getMyID()); //pr($murid); $ta = TahunAjaran::ta(); $kelas = $murid->getMyKelas($ta); //pr($murid); //get all my kelas $kelases = $murid->getAllMyKelas(); $return['webClass'] = __CLASS__; $return['method'] = __FUNCTION__; $return['murid'] = $murid; $return['kelas'] = $kelas; $return['kelases'] = $kelases; Mold::both("murid/myprofile", $return); } else { $roleObj = new $role(); $roleObj->default_read_coloms = "*"; $roleObj->getByAccountID(Account::getMyID()); $return['webClass'] = __CLASS__; $return['method'] = __FUNCTION__; $return['roleObj'] = $roleObj; Mold::both("leap/myprofile", $return); } }