当前位置: 首页>>代码示例>>PHP>>正文


PHP Redirect::p404方法代码示例

本文整理汇总了PHP中Redirect::p404方法的典型用法代码示例。如果您正苦于以下问题:PHP Redirect::p404方法的具体用法?PHP Redirect::p404怎么用?PHP Redirect::p404使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Redirect的用法示例。


在下文中一共展示了Redirect::p404方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tk

    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
//.........这里部分代码省略.........
开发者ID:CapsuleCorpIndonesia,项目名称:biji_katak,代码行数:101,代码来源:Kl.php

示例2: id

    function id($args)
    {
        list($id, $name, $res, $res_id) = $args;
        $fb_page = "https://www.facebook.com/pages/Stage-City/1076705655676385";
        if ($id == 0) {
            //$ul = new QuizUlangan();
            //$arrUl = $ul->getWhere("")
            header("Location:" . _SPPATH . "Kl/tk");
            exit;
        }
        $ul = new QuizUlangan();
        $ul->getByID($id);
        //tambahan buat user created
        $acc = new Account();
        $ucreate = 0;
        if ($ul->ulangan_creator_id != 0) {
            //TODO cek untuk preview
            $acc->getByID($ul->ulangan_creator_id);
            $ucreate = 1;
        }
        if ($ul->ulangan_aktif != 1 || $ul->ulangan_id == "") {
            Redirect::p404();
        }
        $l = new QuizLevel();
        $l->getByID($ul->ulangan_level_id);
        $point = QuizPoints::myPoints();
        $boleh = 0;
        if ($point >= $l->level_limit) {
            $boleh = 1;
        }
        $actual_link = _BPATH . "ul/id/" . $id . "/" . urlencode($name);
        //pr($ul);
        //ambil next ulangan
        $arrUl = $ul->getWhere("ulangan_level_id = '{$ul->ulangan_level_id}' AND ulangan_aktif =1 AND ulangan_id > {$ul->ulangan_id} LIMIT 0,1");
        $next = $arrUl[0];
        ?>
<style>
    #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);
}
.question{
    
}
#nilaiku{
    font-size: 80px;
}
.iklan{
    position: fixed;
    z-index: 10;
    text-align: center;
    width: 100%;
    height: 100%;
    left: 0px;
    top:0px;
//.........这里部分代码省略.........
开发者ID:CapsuleCorpIndonesia,项目名称:biji_katak,代码行数:101,代码来源:Ul.php

示例3: user

    function user($args)
    {
        list($id) = $args;
        if ($id == "") {
            die("no ID");
        }
        $acc = new Account();
        $acc->getByID($id);
        if ($acc->admin_fb_id == "" || $acc->admin_aktiv != 1 || $acc->admin_fb_id == 0) {
            Redirect::p404();
        }
        //get points
        $p = new QuizPoints();
        $arrP = $p->getWhere("points_acc_id = '{$id}' ORDER BY points_update DESC");
        $tp = 0;
        $badges = array();
        $rapor = array();
        //hitung poin
        foreach ($arrP as $p) {
            $ul = new QuizUlangan();
            $ul->getByID($p->points_ul_id);
            $lvl = new QuizLevel();
            if (!in_array($ul->ulangan_level_id, $rapor)) {
                $lvl->getByID($ul->ulangan_level_id);
                $rapor[$lvl->level_id] = $lvl;
            }
            $tp += $p->points_nilai;
            $point = $p->points_nilai;
            //update badges
            if ($point > 5 && $point < 8) {
                $badges[$p->points_ul_id] = $ul->ulangan_badge_1;
            }
            if ($point > 7 && $point < 10) {
                $badges[$p->points_ul_id] = $ul->ulangan_badge_2;
            }
            if ($point == 10) {
                $badges[$p->points_ul_id] = $ul->ulangan_badge_3;
            }
        }
        ksort($rapor);
        ?>
<div style="margin-top: 30px;">
    <div class="col-md-8 col-md-offset-2">
    <?php 
        if ($id == Account::getMyID()) {
            $kls_id = 1;
            if (isset($arrP[0]->points_ul_id)) {
                $ul = new QuizUlangan();
                $ul->getByID($arrP[0]->points_ul_id);
                $kls_id = $ul->ulangan_level_id;
            }
            ?>
        <div class="mulaitest">
            <div class="judul">Lanjutkan Ujian</div>
             <div class="des">Kamu dapat melanjutkan ujian terakhir yang kamu kerjakan</div>
             <button onclick="document.location='<?php 
            echo _SPPATH;
            ?>
kl/tk/<?php 
            echo $kls_id;
            ?>
';"  style="min-width: 250px; background-color: #f0373c; border-color: #f0373c;" class="btn btn-primary btn-lg">Start</button>
    
        </div>
        <?php 
        }
        ?>
    <div class="col-md-5" style="padding-left: 0px;">
        <div class="profilecon">
    <div class="profiles">
        <div class="col-md-4 col-xs-4 col-sm-4" style="padding-left: 0px;">
            <img width="100%" src="//graph.facebook.com/<?php 
        echo $acc->admin_fb_id;
        ?>
/picture?type=large">
        </div>
        <div class="col-md-8 col-sm-8 col-xs-8">
            <div class="menuprofile">
            <?php 
        echo $acc->admin_name;
        ?>
            </div>
            <div  class="menuprofile">
                <i class="glyphicon glyphicon-stats"></i> &nbsp; <b>#<?php 
        echo $acc->game_ranking;
        ?>
</b>
            </div>
            <div class="menuprofile">
                <i class="glyphicon glyphicon-fire"></i> &nbsp; <?php 
        echo $tp;
        ?>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    
    <div class="ranking">
        <div class="badges">
            <h4>Rapor</h4>
//.........这里部分代码省略.........
开发者ID:CapsuleCorpIndonesia,项目名称:biji_katak,代码行数:101,代码来源:P.php

示例4: id

 public function id($args)
 {
     //        pr($args);
     /*
      * begin the calculation
      */
     $url = addslashes($_GET['jurusan']);
     //        echo $url;
     global $activeLang;
     //        pr($activeLang);
     $langtext = "";
     if (count($activeLang) > 0) {
         $sl = Lang::getLang();
         $langtext = "AND post_lang = '{$sl}'";
     }
     //        echo $langtext;
     $pg = new Page();
     $arrPage = $pg->getWhere("post_url = '{$url}' AND post_status = 'publish' {$langtext}");
     $pg = $arrPage[0];
     //pr($arrPage);
     if ($pg->post_url == "") {
         $pg = new Page();
         $arrPage = $pg->getWhere("post_url = '{$url}' AND post_status = 'publish'");
         if (count($arrPage) > 0) {
             $pg = $arrPage[0];
             if ($pg->post_link == "" || $pg->post_link == '0') {
                 ?>
                 <div class="alert alert-warning language_disclaimer" role="alert">
                     <?php 
                 echo Efiwebsetting::getData('Language_Disclaimer');
                 ?>
                 </div>
             <?php 
             }
         } else {
             Redirect::p404();
         }
     }
     //            Redirect::p404();
     //die('die');
     //pr($pg);
     $page = $pg;
     // isi semua meta tag dan title
     $this->isiMeta($pg);
     $json = "";
     if ($pg->post_attachments != "") {
         $json = json_decode(stripslashes($pg->post_attachments));
     }
     //pr($json);
     if ($pg->post_attachment_order == "") {
         $pa = \Efiwebsetting::getData('PageAttachment');
     } else {
         $pa = $pg->post_attachment_order;
     }
     $exp = explode(",", $pa);
     $dimatikan_animasi_header = 1;
     foreach ($exp as $p) {
         if ($p == "Page") {
             if ($pg->post_link != "" && $pg->post_link != '0') {
                 $_SESSION['pageObj'] = $page;
                 //kalau ada link
                 $arrSp = Registor::getFeatureStartPage();
                 list($cname, $fname) = $arrSp[$pg->post_link];
                 $new = new $cname();
                 $new->{$fname}();
             } else {
                 $arr['page'] = $page;
                 $arr['dimatikan_animasi_header'] = $dimatikan_animasi_header;
                 $layout_id = "Page_id";
                 $file = Layout::getFile($layout_id);
                 Mold::theme("Pages/" . $layout_id . "/" . $file, $arr);
             }
         } else {
             if (array_key_exists($p, $json) && $json->{$p} > 0) {
                 $paralax = new $p();
                 $paralax->viewme($json->{$p}, "Page", $page->ID);
                 if (contains($p, array("Parallax", "Carousel"))) {
                     $dimatikan_animasi_header = 0;
                 }
             }
         }
     }
     //
     //        //cek Parallax plg atas
     //        if(array_key_exists("ParallaxModel",$json) && $json->ParallaxModel>0){
     //            $paralax = new ParallaxModel();
     //            $paralax->viewme($json->ParallaxModel);
     //            $dimatikan_animasi_header = 0;
     //        }
     //
     //        //cek carousel
     //        if(array_key_exists("GalleryCarousel__view",$json) && $json->GalleryCarousel__view>0){
     //            $cr = new GalleryCarousel();
     //            $cr->viewme($json->GalleryCarousel__view);
     //            $dimatikan_animasi_header = 0;
     //        }
     //
     //
     //
     //        if(array_key_exists("Gallery__view",$json)&&$json->Gallery__view>0){
//.........这里部分代码省略.........
开发者ID:CapsuleCorpIndonesia,项目名称:biji_katak,代码行数:101,代码来源:PageViewer.php


注:本文中的Redirect::p404方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。