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


PHP Auth::isRole方法代码示例

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


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

示例1: showAll

 public function showAll($limit = null, $batas = null)
 {
     @Session::createSession();
     $role = Session::get('role');
     $bagian = Session::get('bagian');
     $user = Session::get('user');
     if (Auth::isRole($role, 2) and !Auth::isBagian($bagian, 1)) {
         $sql = "SELECT a.id_suratkeluar as id_suratkeluar,\r\n            a.rujukan as rujukan,\r\n            a.no_surat as no_surat,\r\n            a.tgl_surat as tgl_surat,\r\n            b.nama_satker as tujuan,\r\n            a.perihal as perihal,\r\n            c.sifat_surat as sifat,\r\n            d.klasifikasi as jenis,\r\n            a.lampiran as lampiran,\r\n            a.file as file,\r\n            e.status as status,\r\n            h.namaPegawai as user,\r\n            f.tipe_naskah as tipe,\r\n            a.start as start\r\n            FROM suratkeluar a LEFT JOIN alamat b ON a.tujuan = b.kode_satker\r\n            LEFT JOIN sifat_surat c ON a.sifat = c.kode_sifat\r\n            LEFT JOIN klasifikasi_surat d ON a.jenis = d.kode_klassurat\r\n            LEFT JOIN status e ON a.status = e.id_status\r\n            LEFT JOIN tipe_naskah f ON a.tipe = f.id_tipe \r\n            LEFT JOIN notifikasi g ON a.id_suratkeluar = g.id_surat\r\n            LEFT JOIN user h ON a.user = h.username\r\n            WHERE g.jenis_surat='SK' AND g.id_user=" . User::getIdUser($user) . "\r\n            GROUP BY a.id_suratkeluar ORDER BY a.id_suratkeluar DESC";
     } elseif (Auth::isRole($role, 3)) {
         $sql = "SELECT a.id_suratkeluar as id_suratkeluar,\r\n            a.rujukan as rujukan,\r\n            a.no_surat as no_surat,\r\n            a.tgl_surat as tgl_surat,\r\n            b.nama_satker as tujuan,\r\n            a.perihal as perihal,\r\n            c.sifat_surat as sifat,\r\n            d.klasifikasi as jenis,\r\n            a.lampiran as lampiran,\r\n            a.file as file,\r\n            e.status as status,\r\n            h.namaPegawai as user,\r\n            f.tipe_naskah as tipe,\r\n            a.start as start\r\n            FROM suratkeluar a LEFT JOIN alamat b ON a.tujuan = b.kode_satker\r\n            LEFT JOIN sifat_surat c ON a.sifat = c.kode_sifat\r\n            LEFT JOIN klasifikasi_surat d ON a.jenis = d.kode_klassurat\r\n            LEFT JOIN status e ON a.status = e.id_status\r\n            LEFT JOIN tipe_naskah f ON a.tipe = f.id_tipe\r\n            LEFT JOIN user h ON a.user = h.username\r\n            WHERE a.user='" . $user . "'\r\n            GROUP BY a.id_suratkeluar ORDER BY a.id_suratkeluar DESC";
     } else {
         $sql = "SELECT a.id_suratkeluar as id_suratkeluar,\r\n            a.rujukan as rujukan,\r\n            a.no_surat as no_surat,\r\n            a.tgl_surat as tgl_surat,\r\n            b.nama_satker as tujuan,\r\n            a.perihal as perihal,\r\n            c.sifat_surat as sifat,\r\n            d.klasifikasi as jenis,\r\n            a.lampiran as lampiran,\r\n            a.file as file,\r\n            e.status as status,\r\n            h.namaPegawai as user,\r\n            f.tipe_naskah as tipe,\r\n            a.start as start\r\n            FROM suratkeluar a JOIN alamat b ON a.tujuan = b.kode_satker\r\n            JOIN sifat_surat c ON a.sifat = c.kode_sifat\r\n            JOIN klasifikasi_surat d ON a.jenis = d.kode_klassurat\r\n            JOIN status e ON a.status = e.id_status\r\n            LEFT JOIN user h ON a.user = h.username\r\n            JOIN tipe_naskah f ON a.tipe = f.id_tipe ORDER BY a.id_suratkeluar DESC";
     }
     //        var_dump($sql);
     if (!is_null($limit) and !is_null($batas)) {
         $sql .= " LIMIT {$limit},{$batas}";
     }
     $data = $this->select($sql);
     $surat = array();
     foreach ($data as $value) {
         $obj = new $this();
         $obj->setId($value['id_suratkeluar']);
         $obj->setRujukan($value['rujukan']);
         $obj->setNomor($value['no_surat']);
         $obj->setTglSurat($value['tgl_surat']);
         $obj->setAlamat($value['tujuan']);
         $obj->setPerihal($value['perihal']);
         $obj->setSifat($value['sifat']);
         $obj->setJenis($value['jenis']);
         $obj->setJmlLampiran($value['lampiran']);
         $obj->setFile($value['file']);
         $obj->setStatus($value['status']);
         $obj->setTipeSurat($value['tipe']);
         $obj->setStart($value['start']);
         $obj->setUserCreate($value['user']);
         $surat[] = $obj;
     }
     return $surat;
 }
开发者ID:ryderonil,项目名称:sisurip,代码行数:39,代码来源:suratkeluar_model.php

示例2: showAll

 public function showAll($limit = null, $batas = null)
 {
     @Session::createSession();
     $role = Session::get('role');
     $bagian = Session::get('bagian');
     $user = Session::get('user');
     if (Auth::isRole($role, 2) and !Auth::isBagian($bagian, 1) or Auth::isRole($role, 3)) {
         $sql = "SELECT a.id_suratmasuk as id_suratmasuk,\r\n                a.no_agenda as no_agenda,\r\n                a.no_surat as no_surat,\r\n                a.tgl_terima as tgl_terima,\r\n                a.tgl_surat as tgl_surat,\r\n                b.nama_satker as asal_surat,\r\n                a.perihal as perihal,\r\n                a.status as status,\r\n                a.sifat as sifat,\r\n                a.jenis as jenis,\r\n                a.lampiran as lampiran,\r\n                a.start as start,\r\n                a.end as end\r\n                FROM suratmasuk a LEFT JOIN alamat b \r\n                ON a.asal_surat = b.kode_satker\r\n                LEFT JOIN notifikasi c ON a.id_suratmasuk = c.id_surat\r\n                WHERE c.jenis_surat='SM' AND id_user=" . User::getIdUser($user) . "\r\n                ORDER BY a.id_suratmasuk DESC";
     } else {
         $sql = "SELECT a.id_suratmasuk as id_suratmasuk,\r\n                a.no_agenda as no_agenda,\r\n                a.no_surat as no_surat,\r\n                a.tgl_terima as tgl_terima,\r\n                a.tgl_surat as tgl_surat,\r\n                b.nama_satker as asal_surat,\r\n                a.perihal as perihal,\r\n                a.status as status,\r\n                a.sifat as sifat,\r\n                a.jenis as jenis,\r\n                a.lampiran as lampiran,\r\n                a.start as start,\r\n                a.end as end\r\n                FROM suratmasuk a LEFT JOIN alamat b \r\n                ON a.asal_surat = b.kode_satker\r\n                ORDER BY a.id_suratmasuk DESC";
     }
     //$sql = "SELECT * FROM suratmasuk";
     if (!is_null($limit) and !is_null($batas)) {
         $sql .= " LIMIT {$limit},{$batas}";
     }
     //        print_r($sql);
     $data = $this->select($sql);
     //ntar dihapus
     $surat = array();
     foreach ($data as $value) {
         $obj = new $this();
         $obj->setAlamat($value['asal_surat']);
         $obj->setId($value['id_suratmasuk']);
         $obj->setJenis($value['jenis']);
         $obj->setJmlLampiran($value['lampiran']);
         $obj->setNomor($value['no_surat']);
         $obj->setPerihal($value['perihal']);
         $obj->setSifat($value['sifat']);
         $obj->setTglSurat($value['tgl_surat']);
         $obj->setTglTerima($value['tgl_terima']);
         $obj->setAgenda($value['no_agenda']);
         $obj->setStart($value['start']);
         $surat[] = $obj;
     }
     //        var_dump($surat);
     return $surat;
 }
开发者ID:ryderonil,项目名称:sisurip,代码行数:37,代码来源:suratmasuk_model.php

示例3: displayKinerja

 public function displayKinerja()
 {
     $duser = new User();
     $data = $duser->getUser();
     $kinerja = array();
     foreach ($data as $val) {
         if (Auth::isRole($val->get('role'), 3)) {
             $kp = $this->calculateKinerja($val);
             if (!is_null($kp)) {
                 $kinerja[] = $kp;
             }
         }
     }
     return $kinerja;
 }
开发者ID:ryderonil,项目名称:sisurip,代码行数:15,代码来源:kinerjapegawai.php

示例4: selesai

                echo '<font color=red>batas waktu : ' . Tanggal::tgl_indo($tgl[0]) . ' ' . $tgl[1] . '</font>';
            }
            echo '</td>';
            echo '<td width=50%>' . $value->getTipeSurat() . ' <font color=green><i>[' . $value->getUserCreate() . ']</i></font> 
            </br><a href="' . URL . 'suratkeluar/detil/' . $value->getId() . '" title="klik disini untuk melihat detil surat!" class=tip>' . $value->getAlamat() . '</br><i>' . $value->getPerihal() . '</i></a></td>';
        }
        //echo '<td>' . $value['tgl_terima'] . '</td>';
        //echo '<td>' . $value['tgl_surat'] . '</td>';
        //echo '<td>' . $value['asal_surat'] . '</td>';
        //echo '<td>' . $value['perihal'] . '</td>';
        echo '<td width=30%>';
        if (Auth::isRole($role, 2)) {
            echo '<a href="' . URL . 'suratkeluar/edit/' . $value->getId() . '" title="ubah data surat" class=tip><input class="btn btn-green" type=button value=Ubah></a> 
                <a href="' . URL . 'suratkeluar/remove/' . $value->getId() . '" title="hapus data surat" class=tip><input class="btn btn-danger" type=button value=Hapus onclick="return selesai()"></a> ';
        }
        if (!Auth::isRole($role, 5) and !Auth::isRole($role, 4)) {
            echo '<a href="' . URL . 'suratkeluar/rekamrev/' . $value->getId() . '" title="rekam revisi surat" class=tip><input class="btn write" type=button value="Revisi"></a> ';
        }
        echo '<a href="' . URL . 'suratkeluar/download/' . $value->getId() . '" title="download file surat" class=tip><input class="btn download" type=button value="Download"></a></td>';
        echo '</tr>';
    }
    ?>
</table></div>
            <?php 
} else {
    ?>
        </div>
            <br><br><br><br><br><br><br><br>
            <h1 align="center">Data tidak ditemukan</h1>
        <?php 
}
开发者ID:ryderonil,项目名称:sisurip,代码行数:31,代码来源:suratkeluar.php

示例5: selesai

        //echo '<td>' . $value['tgl_terima'] . '</td>';
        //echo '<td>' . $value['tgl_surat'] . '</td>';
        //echo '<td>' . $value['asal_surat'] . '</td>';
        //echo '<td>' . $value['perihal'] . '</td>';
        echo '<td halign=center width=30%>';
        if (Auth::isRole($role, 2) and Auth::isBagian($bagian, 1)) {
            echo '<a href="' . URL . 'suratmasuk/edit/' . $value->getId() . '" title="ubah data surat" class=tip><input class="btn btn-green" type=button value=ubah></a> 
                <a href="' . URL . 'suratmasuk/hapus/' . $value->getId() . '" title="hapus data surat" class=tip><input class="btn btn-danger" type=button value="hapus" onclick="return selesai(\'' . $value->getAgenda() . '\');"></a>';
        }
        if (Auth::isRole($role, 1) or Auth::isRole($role, 4)) {
            echo '<a href="' . URL . 'suratmasuk/disposisi/' . $value->getId() . '" title="rekam disposisi" class=tip><input class="btn write" type=button value=disposisi></a>';
        }
        if (Auth::isRole($role, 5)) {
            echo '<a title="cetak disposisi" class=tip><input class="btn print" type=button value="disposisi" onclick="cetakdisposisi(' . $value->getId() . ');"></a> ';
        }
        if (Auth::isRole($role, 5) or Auth::isRole($role, 3)) {
            echo '<a href="' . URL . 'suratmasuk/upload/' . $value->getId() . '" title="upload file surat" class=tip><input class="btn upload" type=button value="upload"></a>
                <!--<a href="' . URL . 'suratmasuk/updatestatus/' . $value->getId() . '"><input class=btn type=button value=Status></a>
                    <a href="' . URL . 'suratmasuk/distribusi/' . $value->getId() . '"><input class=btn type=button value=Distribusi></a>--></td>';
        }
        echo '</tr>';
        $no++;
    }
    ?>
    </form>
</table></div>
        <?php 
} else {
    ?>
        </div>
            <br><br><br><br><br><br><br><br>
开发者ID:ryderonil,项目名称:sisurip,代码行数:31,代码来源:suratmasuk.php

示例6:

        ?>
suratmasuk/edit/<?php 
        echo $this->data[0];
        ?>
" title="ubah data surat" class="tip"><input class="btn edit" type="button" value="U B A H"></a>
                <a href="<?php 
        echo URL;
        ?>
suratmasuk/catatan/<?php 
        echo $this->data[0];
        ?>
" title="rekam disposisi pejabat es IV kepada pelaksana" class="tip"><input class="btn write" type="button" value="DISPOSISI KASI"></a><?php 
    }
    ?>
                <?php 
    if (Auth::isRole($role, 1) or Auth::isRole($role, 4)) {
        echo '<a href="' . URL . 'suratmasuk/disposisi/' . $this->data[0] . '" title="rekam disposisi" class=tip><input class="btn write" type=button value=disposisi></a>';
    }
    ?>
</td></tr>
                
    </table></div>
    
    <?php 
    if ($this->count > 0) {
        ?>
    </br>
    <hr>
    <h3>Lampiran :</h3>
    <hr>
    </br>
开发者ID:ryderonil,项目名称:sisurip,代码行数:31,代码来源:detilsurat.php

示例7:

                <font id="sm" color="white" style="font-size: 50px;font-weight: bold;">0</font>
            </div>
            <?php 
}
?>
        </div>
        <div class="shortcut sk" onclick="menus('suratkeluar')">
            <img src="<?php 
echo URL;
?>
public/images/sk.png"></img>
            <p><font color="white" style="font-family: 'segoe ui','tahoma';font-size: 15px; margin-left: 5px;">
                <b>Surat Keluar</b>
                </font></p>
            <?php 
if (!Auth::isRole(Session::get('role'), 5) and !Auth::isRole(Session::get('role'), 4)) {
    ?>
            <div id="notifsk" style="float: right; margin-right: 10px;margin-top: 100px;color: white;">
                <font id="sk" color="white" style="font-size: 50px;font-weight: bold;">0</font></div>
            <?php 
}
?>
        </div>   
    </div>
    <div  class="shortcut arsip" onclick="menus('arsip')">
        <img src="<?php 
echo URL;
?>
public/images/arsip_home.png"></img>
        <p><font color="white" style="font-family: 'segoe ui','tahoma';font-size: 15px; margin-left: 5px;">
                <b>Arsip</b>
开发者ID:ryderonil,项目名称:sisurip,代码行数:31,代码来源:home.php

示例8:

                                            <?php 
        if (Auth::isRole($role, 5)) {
            ?>
<li onclick="menu('kantor')"><a >Kantor</a></li> <!--href="<?php 
            echo URL;
            ?>
admin/rekamKantor"--><?php 
        }
        ?>
 
                                            <li onclick="menu('alamat')"><a >Alamat Surat</a></li> <!--href="<?php 
        echo URL;
        ?>
admin/rekamAlamat"-->
        <?php 
        if (Auth::isRole($role, 5)) {
            ?>
<li onclick="menu('lokasi')"><a >Lokasi Arsip</a></li> <!--href="<?php 
            echo URL;
            ?>
admin/rekamLokasi"-->
                                                <li onclick="menu('klasarsip')"><a >Klasifikasi Arsip</a></li> <!--href="<?php 
            echo URL;
            ?>
admin/rekamKlasifikasiArsip"-->
                                                <li onclick="menu('tipenaskah')"><a >Lampiran</a></li> <!--href="<?php 
            echo URL;
            ?>
admin/rekamJenisLampiran"-->
                                                <li onclick="menu('nomor')"><a >Penomoran</a></li> <!--href="<?php 
            echo URL;
开发者ID:ryderonil,项目名称:sisurip,代码行数:31,代码来源:header.php


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