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


PHP Account::getMyRoles方法代码示例

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


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

示例1: checkOwnership

 public static function checkOwnership($app)
 {
     //        echo Account::getMyID()."<br>";
     //        echo $app->app_client_id;
     if ($app->app_client_id != Account::getMyID() && !in_array("master_admin", Account::getMyRoles())) {
         die("Not your App");
     }
 }
开发者ID:CapsuleCorpIndonesia,项目名称:apel-enak,代码行数:8,代码来源:AppAccount.php

示例2: edit

 function edit()
 {
     //cek ID
     if (isset($_GET['id'])) {
         $id = addslashes($_GET['id']);
         $appAcc = new AppAccount();
         $appAcc->getByID($id);
         if ($appAcc->app_client_id != Account::getMyID() && !in_array("master_admin", Account::getMyRoles())) {
             die("Owner's ID Mismatch");
         } else {
             //                ZAppFeature::clearSession();
             //load
             //                session_id($appAcc->app_keywords);
             FeatureSessionLayer::loadJSON($appAcc->app_keywords, $appAcc->app_id);
             //                sleep(1);
             //                pr($_SESSION);
             header("Location:" . _SPPATH . "apps/make?id=" . $id);
             die;
         }
     } else {
         header("Location:" . _SPPATH . "apps/makenew");
         die;
     }
 }
开发者ID:CapsuleCorpIndonesia,项目名称:apel-enak,代码行数:24,代码来源:Apps.php

示例3: impersonate

    function impersonate()
    {
        if (in_array("master_admin", Account::getMyRoles())) {
            $acc = new Account();
            $arr = $acc->getWhere("admin_type = 1 ORDER BY admin_nama_depan ASC");
            //            pr($arr);
            ?>
            <select id="clientselector">
                <option value=""></option>
                <?php 
            foreach ($arr as $user) {
                ?>
                    <option value="<?php 
                echo $user->admin_id;
                ?>
"><?php 
                echo $user->admin_nama_depan;
                ?>
</option>
                <?php 
            }
            ?>
            </select>
            <script>
//                $("#clientselector").change(function(){
//                    var slc = $("#clientselector").val();
////                    alert(slc);
//                    $('#clientdata').load("<?php 
            //=_SPPATH;
            ?>
//AppStats/loadDataApp?clientID="+slc);
//                });
            </script>
        <?php 
        }
    }
开发者ID:CapsuleCorpIndonesia,项目名称:elang-combo,代码行数:36,代码来源:AppAccWeb.php

示例4: receipt

    function receipt()
    {
        $order_id = addslashes($_GET['order_id']);
        $order = new VpTransaction();
        $order->getByID($order_id);
        //        pr($order);
        //TODO : harus dibikin
        if ($order->order_acc_id != Account::getMyID() && !in_array("master_admin", Account::getMyRoles())) {
            die("hacking attempt");
        }
        $app = new AppAccount();
        $app->getByID($order->order_app_id);
        if ($app->app_active == 0) {
            die("App not active");
        }
        $acc = new Account();
        $acc->getByID($app->app_client_id);
        $paket = new Paket();
        $paket->getByID($order->order_paket_id);
        $vpData = new VpData();
        $arr = $vpData->getWhere("order_id = '{$order_id}' LIMIT 0,1");
        if (count($arr) > 0) {
            $data = $arr[0];
        } else {
            $data = new VpData();
        }
        if ($acc->admin_marketer != "") {
            $arrAg = $acc->getWhere("admin_username = '{$acc->admin_marketer}' LIMIT 0,1");
            if (count($arrAg) > 0) {
                $agent = $arrAg[0];
            }
        }
        //        pr($arr);
        ?>
        <style>
            h1{
                font-size: 25px;
                padding-top: 30px;
            }
            h3{
                font-size: 20px;
                font-style: italic;
            }
            h4{
                font-size: 17px;
                margin-top: 20px;
                margin-bottom: 30px;
            }
            .billings td{
                padding-right: 20px;
                padding-bottom: 10px;
            }
            @media (max-width: 768px) {

                .monly {
                    display: initial;
                }

                .donly {
                    display: none;
                }

                h1{
                    font-size: 20px;
                }
                h3{
                    font-size: 17px;
                    font-style: italic;
                }
                h4{
                    font-size: 14px;
                    margin-bottom: 30px;
                }
                .billings td{
                    padding-bottom: 10px;
                }
            }

            @media (min-width: 768px) {
                .monly {
                    display: none;
                }

                .donly {
                    display: initial;
                }



            }
            @media print {
                .pure-toggle-label[data-toggle-label='left']{
                    display: none;
                }
                #printme{
                    display: none;
                }
                body{
                    background-color: #ffffff;
                }
//.........这里部分代码省略.........
开发者ID:CapsuleCorpIndonesia,项目名称:martabak_revolution,代码行数:101,代码来源:PaymentWeb.php

示例5: setID

 function setID()
 {
     if (in_array("master_admin", Account::getMyRoles())) {
         $acc = new AppAccount();
         $apps = $acc->getAll();
         //
     } else {
         $acc = new App2Acc();
         $apps = $acc->getWhereFromMultipleTable("ac_admin_id = '" . Account::getMyID() . "' AND ac_app_id = app_id AND app_active = 1", array("AppAccount"));
     }
     $arrApp = array();
     foreach ($apps as $ap) {
         $semua[] = $ap->app_id;
         $arrApp[$ap->app_id] = $ap;
     }
     if (in_array($_GET['app_id'], $semua)) {
         //ok
         $_SESSION['app_active'] = $arrApp[$_GET['app_id']];
         $_SESSION['app_id'] = addslashes($_GET['app_id']);
         header("Location:" . _SPPATH . "PushHome/home?st=Balance");
         die;
     } else {
         //not ok
         die("hacking attempt");
     }
 }
开发者ID:CapsuleCorpIndonesia,项目名称:elang-combo,代码行数:26,代码来源:PushHome.php

示例6:

                    <?php 
}
?>
                    <?php 
if (Auth::isLogged()) {
    ?>
                        <li><a href="<?php 
    echo _SPPATH;
    ?>
logout">Logout</a></li>
                    <?php 
}
?>

                    <?php 
if (in_array("master_admin", Account::getMyRoles())) {
    ?>
                        <li><a href="<?php 
    echo _SPPATH;
    ?>
PushHome/home">Administration</a></li>
                   <?php 
}
?>
                </ul>

    </nav>

    <div class="pure-pusher-container">
        <div class="pure-pusher">
开发者ID:CapsuleCorpIndonesia,项目名称:apel-enak,代码行数:30,代码来源:skeleton.php

示例7: array

<?php

/*$leap = new EfiHome();
$arrTabs =$leap->loadedDomains4Role[Account::getMyRole()];
$arrDomain = $leap->domains;
*/
//pr(Registor::getRoles());
//global $template;
//pr($template);
//pr($template->adminMenu);
//pr($template->domainMenu);
$arrR = Registor::getAllAdminMenuByRoles(Account::getMyRoles());
//pr($arrR);
/*
 * list of icons
 * fa fa-dashboard
 * fa fa-files-o
 * fa fa-th
 * fa fa-pie-chart
 * fa fa-laptop
 * fa fa-edit
 * fa fa-table
 * fa fa-calendar
 * fa fa-envelope
 * fa fa-envelope
 * fa fa-share
 * fa fa-book
 * fa fa-bar-chart-o
 * fa-wrench
 */
$arrDomainName2Icon = array("Appear" => "fa fa-eye", "Appearance" => "fa fa-tint", "Capsule" => "fa fa-bullhorn", "Content" => "fa fa-bookmark", "Developer" => "fa fa-tasks", "Email" => "fa fa-envelope-o", "Finance" => "fa fa-money", "Komisi" => "fa fa-dollar", "PageCategories" => "fa fa-university", "PaketManagement" => "fa fa-dribbble", "Payment" => "fa fa-diamond", "PushNot" => "fa fa-share", "Setting" => "fa fa-edit", "UserAndRoles" => "fa fa-users");
开发者ID:CapsuleCorpIndonesia,项目名称:apel-enak,代码行数:31,代码来源:leftmenu_home.php

示例8: appView

    function appView()
    {
        $id = addslashes($_GET['id']);
        if (in_array("master_admin", Account::getMyRoles())) {
            //            $acc = new AppAccount();
            //            $apps = $acc->getAll();
            //
            $app = new AppAccount();
            $app->getByID($id);
        } else {
            $acc = new App2Acc();
            //AND app_active = 1
            $apps = $acc->getWhereFromMultipleTable("ac_admin_id = '" . Account::getMyID() . "' AND ac_app_id = app_id AND ac_app_id = '{$id}' ", array("AppAccount"));
            //            pr($apps);
            if (count($apps) < 1) {
                die("hacking attempt");
            } else {
                $app = $apps[0];
            }
        }
        $paket = new Paket();
        $paket->getByID($app->app_paket_id);
        if (!$app->app_active) {
            header("Location:" . _SPPATH . "PaymentWeb/payfor?app_id=" . $app->app_id);
            die;
        }
        ?>
        <div class="container attop" >
        <div class="col-md-8 col-md-offset-2">
        <small><a href="<?php 
        echo _SPPATH;
        ?>
mydashboard">back to dashboard</a> </small>
        <h1><?php 
        echo $app->app_name;
        ?>
 <small><a href="">edit app</a></small></h1>

        <div class="paket">Paket : <b style="font-size: 18px;"><?php 
        echo $paket->paket_name;
        ?>
</b> &nbsp; <i>[<a href="">Edit Paket</a>]</i> </div>
        <div style="padding: 10px;">
            <?php 
        if (!$app->app_active) {
            ?>

                <a class="btn btn-success btn-lg" href="<?php 
            echo _SPPATH;
            ?>
PaymentWeb/payfor?app_id=<?php 
            echo $app->app_id;
            ?>
">Payment</a>
            <?php 
        } else {
            ?>
                <a class="btn btn-success btn-lg" href="<?php 
            echo _SPPATH;
            ?>
PushHome/setID?app_id=<?php 
            echo $app->app_id;
            ?>
">Admin Panel</a>
            <?php 
        }
        ?>
            </div>
        </div>

        </div>
        <?php 
        //        pr($app);
    }
开发者ID:CapsuleCorpIndonesia,项目名称:elang-combo,代码行数:74,代码来源:MyApp.php

示例9: editfolder


//.........这里部分代码省略.........
            event.preventDefault();
            var decodedUrl = encodeURIComponent(slc);
            $.get("<?php 
        echo _SPPATH;
        ?>
DMWeb/changeFolderName?t=<?php 
        echo $t;
        ?>
&newname="+decodedUrl+"&tid=<?php 
        echo $tid;
        ?>
",function(data){
                //loadfolder_<?php 
        echo $t;
        ?>
(<?php 
        echo $tid;
        ?>
);
                $('#foldernameedit_<?php 
        echo $tid;
        ?>
_<?php 
        echo $t;
        ?>
').empty().html(slc);
                $('#myModal').modal('hide');
            });
        });
        
    </script>
 <?php 
        //kalau master admin
        if (in_array("master_admin", Account::getMyRoles())) {
            //bisa ganti apakah isi dari folder bisa di save...
            /*
             ?>
            <form class="form-inline" id="editfolder_save_<?=$tid;?>_<?=$ti;?>">
                 <div style="float:left; height: 30px; line-height: 30px; padding: 5px;">
                <label for="editfoldername_save_<?=$tid;?>_<?=$ti;?>"><?=Lang::t('Is it saveable');?></label>
              </div>
              <div style="float:left;height: 30px; line-height: 30px; padding: 5px;">   
                  <select id="editfoldername_save_<?=$tid;?>_<?=$ti;?>" class="form-control">
                      <option value="0"><?=Lang::t("No");?></option>
                      <option <? if($dc->folder_saveable==1){?>selected="true"<?}?> value="1"><?=Lang::t("Yes");?></option>
                  </select>
              </div> 
                 <div style="float:left;height: 30px; line-height: 30px; padding: 5px;">
                 <button id="editfolderbutton_save_<?=$tid;?>_<?=$ti;?>"  class="btn btn-default"><?=Lang::t('Update');?></button>
                 </div>
            </form>
                <div class="clearfix" style="padding: 10px;"></div>
                <script>       
                    $("#editfolderbutton_save_<?=$tid;?>_<?=$ti;?>").click(function(event){
                        var slc = $("#editfoldername_save_<?=$tid;?>_<?=$ti;?>").val();
                        event.preventDefault();
                        
                        $.post("<?=_SPPATH;?>DMWeb/changeSaveable?t=<?=$t;?>&tid=<?=$tid;?>",{s:slc},function(data){
                            //loadfolder_<?=$t;?>(<?=$tid;?>);
                            //$('#foldernameedit_<?=$tid;?>_<?=$t;?>').empty().html(slc);
                            //$('#myModal').modal('hide');
                            if(data.bool){
                                alert("<?=Lang::t('Success');?>");
                            }
                            else{
                                alert("<?=Lang::t('Failed');?>");
开发者ID:CapsuleCorpIndonesia,项目名称:es-teler-baru-suka,代码行数:67,代码来源:DMWeb.php

示例10: mydashboard

    function mydashboard()
    {
        $acc = Account::getAccountObject();
        ?>
        <style>
            #attratas{
                text-align: right;
            }
        </style>
        <div class="container attop"  >
            <div class="col-md-10 col-md-offset-1">
                <h1>Dashboard</h1>
                <div id="attratas">
                   <button onclick="document.location='<?php 
        echo _SPPATH;
        ?>
MyApp/newApp';" class="btn btn-success" style="margin: 0px;">Create New Apps</button>
                    <button onclick="document.location='<?php 
        echo _SPPATH;
        ?>
editAcc';" class="btn btn-info" style=" margin: 0px;">Edit Account</button>
                    <button onclick="document.location='<?php 
        echo _SPPATH;
        ?>
myOrders';" class="btn btn-warning" style=" margin: 0px;">Order History</button>
                </div>

<?php 
        if (in_array("master_admin", Account::getMyRoles())) {
            $acc = new AppAccount();
            $apps = $acc->getAll();
            //
        } else {
            $acc = new App2Acc();
            //AND app_active = 1
            $apps = $acc->getWhereFromMultipleTable("ac_admin_id = '" . Account::getMyID() . "' AND ac_app_id = app_id ", array("AppAccount"));
        }
        if (count($apps) > 0) {
            ?>

            <div class="table-responsive" style="margin-top: 20px;">
                <table class="table table-striped table-bordered">
                    <thead>
                    <tr>
                        <th>
                            No.
                        </th>
                        <th>App Name</th>
                        <th>Package</th>
                        <th>Status</th>
                        <th>Expired Date</th>
                        <th>Action</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
            foreach ($apps as $num => $ap) {
                $paket = new Paket();
                $paket->getByID($ap->app_paket_id);
                ?>
                        <tr>
                            <td><?php 
                echo $num + 1;
                ?>
</td>
                            <td><?php 
                echo $ap->app_name;
                ?>
</td>
                            <td><?php 
                echo $paket->paket_name;
                ?>
</td>
                            <td><?php 
                echo $ap->app_active;
                ?>
</td>
                            <td><?php 
                if ($ap->app_active == 1) {
                    echo indonesian_date($ap->app_contract_end);
                }
                ?>
</td>
                            <td>
<!--                                <a href='--><?php 
                //=_SPPATH;
                ?>
<!--MyApp/appView?id=--><?php 
                //=$ap->app_id;
                ?>
<!--'  class="btn btn-info">Edit</a>-->
                                <?php 
                if ($ap->app_active == 1) {
                    ?>

                                    <a href='<?php 
                    echo _SPPATH;
                    ?>
PushHome/setID?app_id=<?php 
                    echo $ap->app_id;
//.........这里部分代码省略.........
开发者ID:CapsuleCorpIndonesia,项目名称:elang-combo,代码行数:101,代码来源:Goo.php

示例11: search

    function search()
    {
        $q = addslashes($_GET['q']);
        ?>
        <div class="row">
            <div class="col-md-12">
        <h1>Search Results for "<?php 
        echo $q;
        ?>
"</h1>
        <?php 
        $allowed = Registor::getAllAdminMenuByRoles(Account::getMyRoles());
        //        pr($allowed);
        $allows = array();
        foreach ($allowed as $alls) {
            foreach ($alls as $key => $c) {
                $allows[] = $key;
            }
        }
        //        echo $q;
        //        pr(Registor::getAllAdminMenuFromSession());
        $allAdmin = Registor::getAllAdminMenuSearch();
        //        pr($allAdmin);
        foreach ($allAdmin as $all) {
            foreach ($all as $key => $value) {
                $save[$key] = $value;
            }
        }
        $stored = $save;
        foreach ($stored as $key => $store) {
            if (stripos($store, $q) !== false) {
                //                echo "Key: " . $key . "<br />Found: " . $q . "<br />";
                $keys[] = $key;
            }
        }
        $regs = Registor::getAllAdminMenu();
        //        pr($regs);
        $cnt = 0;
        foreach ($regs as $domain => $arre) {
            foreach ($arre as $key => $re) {
                if (in_array($key, $keys)) {
                    if (in_array($key, $allows)) {
                        $cnt++;
                        ?>
                        <div class="menuicon" style="background: white; padding: 10px; margin: 10px; margin-left: 0px;">
                            <h3 style="margin: 0; padding: 0; margin-bottom: 10px;">
                                <a href="javascript:openLw('<?php 
                        echo $key;
                        ?>
','<?php 
                        echo _SPPATH . $re;
                        ?>
','fade');activkanMenuKiri('<?php 
                        echo $key;
                        ?>
');"><?php 
                        echo Lang::t($key);
                        ?>
</a>
                            </h3>

                            <p>
                                <?php 
                        echo $save[$key];
                        ?>
                            </p>
                        </div>
                    <?php 
                    }
                }
            }
        }
        if ($cnt < 1) {
            ?>
            <h3>
                <?php 
            echo Lang::t('Cannot Find Any Matching Features');
            ?>
            </h3>
            <?php 
        }
        //        pr(Registor::getAllAdminMenuSearch());
        ?>
</div>
        </div><?php 
    }
开发者ID:CapsuleCorpIndonesia,项目名称:elang-combo,代码行数:86,代码来源:SearchAdminMenu.php

示例12: getMyApps


//.........这里部分代码省略.........
        <div id="attratas">
            <button id="list" onclick="$('#list').hide();$('#icons').show();$('#app_icons').hide();$('#app_lists').show();" class="btn btn-success btn-abu" style="margin: 0px;display: none;"><i class="glyphicon glyphicon-th-list"></i></button>
            <button id="icons" onclick="$('#list').show();$('#icons').hide();$('#app_icons').show();$('#app_lists').hide();" class="btn btn-success btn-abu" style="margin: 0px;"><i class="glyphicon glyphicon-th"></i></button>
            <button onclick="document.location='<?php 
        echo _SPPATH;
        ?>
mydashboard';" class="btn btn-success btn-abu" style="margin: 0px;">Dashboard</button>
            <button onclick="document.location='<?php 
        echo _SPPATH;
        ?>
apps/makenew';" class="btn btn-success btn-abu" style="margin: 0px;">Create New Apps</button>
        </div>
        <?php 
        if (ZAppFeature::checkRemainingSession()) {
            $link = _SPPATH . "apps/make";
            if ($_SESSION['ZAppFeature']['app_id'] > 0) {
                $link = _SPPATH . "apps/make?id=" . $_SESSION['ZAppFeature']['app_id'];
            }
            ?>

    <div id="session" class="alert alert-warning" role="alert" >
        You have unsaved edit Sessions. Click <a href="<?php 
            echo $link;
            ?>
">here</a> to continue work on your app
        </div>



        <?php 
        }
        ?>
        <?php 
        if (in_array("master_admin", Account::getMyRoles())) {
            $acc = new AppAccount();
            $apps = $acc->getAll();
            //http://localhost:8888/appear/PushHome/home?st=Balance
        } else {
            $acc = new App2Acc();
            //AND app_active = 1
            $apps = $acc->getWhereFromMultipleTable("ac_admin_id = '" . Account::getMyID() . "' AND ac_app_id = app_id ", array("AppAccount"));
        }
        if (count($apps) > 0) {
            ?>
<div id="app_icons" style="display: none;">
            <?php 
            foreach ($apps as $num => $ap) {
                ?>
                <div class="col-md-3 col-sm-12 col-xs-12 myapp">
                    <div id="detail_<?php 
                echo $num;
                ?>
" class="app_detail" style="display: none;" onclick="openDetails('<?php 
                echo $num;
                ?>
');">
                        <div style="padding: 20px;">
                            <h3><?php 
                echo $ap->app_name;
                ?>
</h3>
                            <?php 
                $paket = new Paket();
                if ($ap->app_paket_id > 0) {
                    $paket->getByID($ap->app_paket_id);
                    echo '<div class="app_paket">' . $paket->paket_name . '</div>';
开发者ID:CapsuleCorpIndonesia,项目名称:apel-enak,代码行数:67,代码来源:MyApps.php


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