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


PHP Filter::getFilter方法代码示例

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


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

示例1: testShortcutFilter

 public function testShortcutFilter()
 {
     $config = ['coverage' => ['include' => ['tests/*'], 'exclude' => ['tests/unit/CodeGuy.php']]];
     $this->filter->whiteList($config);
     $fileFilter = $this->filter->getFilter();
     $this->assertFalse($fileFilter->isFiltered(codecept_root_dir('tests/unit/c3Test.php')));
     $this->assertTrue($fileFilter->isFiltered(codecept_root_dir('tests/unit/CodeGuy.php')));
 }
开发者ID:hitechdk,项目名称:Codeception,代码行数:8,代码来源:FilterTest.php

示例2: parseParams

 /**
  * Method description
  *
  * More detailed method description
  * @param    array $params
  * @return void
  */
 function parseParams(SimpleXMLElement $elem)
 {
     $i = 0;
     foreach ($elem as $c) {
         if ($c->getName() == "check") {
             if (!isset($c['rule'])) {
                 continue;
             }
             $this->rules[$i] = (string) $c['rule'];
             if (isset($c['value'])) {
                 $this->values[$i] = (string) $c['value'];
             }
             if (isset($c['message'])) {
                 $this->messages[$i] = (string) $c['message'];
             } else {
                 $this->messages[$i] = null;
             }
             //else $this->messages[$i] = self::def_message;
             $i++;
         } elseif ($c->getName() == 'filter') {
             if (Filter::getFilter((string) $c) == Filter::NONE) {
                 throw new FilterException('Filter ' . (string) $c . ' doesn\'t exists');
             }
             $this->filter = (string) $c;
         }
     }
     $controller = Controller::getInstance();
     $controller->addScript("jquery.validate.js");
     $controller->addScript("jquery.validate.messages_" . Language::currentName() . ".js");
 }
开发者ID:point,项目名称:cassea,代码行数:37,代码来源:WValueChecker.php

示例3: indexation

 public function indexation()
 {
     $filter = new Filter();
     $page = $filter->getFilter('page');
     $action = $filter->getFilter('action');
     $step = $filter->getFilter('s');
     if (!isset($page) && !isset($action)) {
         include 'template/bord/bord_bord.php';
     }
     if (isset($page) && !isset($action) && !isset($step)) {
         include 'template/' . $page . '/' . $page . '_' . $page . '.php';
     }
     if (isset($page) && isset($action) && !isset($step)) {
         include 'template/' . $page . '/' . $page . '_' . $action . '.php';
     }
     if (isset($page) && isset($action) && isset($step)) {
         include 'template/' . $page . '/' . $page . '_' . $action . '_' . $step . '.php';
     }
 }
开发者ID:emilev90,项目名称:intekenbord,代码行数:19,代码来源:index.class.php

示例4: Database

<?php 
$db = new Database();
$filter = new Filter();
$index = new Index();
$getMonth = $filter->getFilter('m');
$getDay = $filter->getFilter('d');
$getYear = $filter->getFilter('y');
if ($getMonth || $getYear) {
    $month = $getMonth;
    $year = $getYear;
    $day = $getDay;
} else {
    $month = date("m");
    $year = date("y");
    $day = date("d");
}
$date = new DateTime($year . '-' . $month . '-' . $day);
$dbDate = $date->format('m/d/Y');
$displayDate = $date->format('d-M-Y');
$sessionUserId = $_SESSION[user_id];
$querySelectBalans = "SELECT * FROM `balans` WHERE user_id={$sessionUserId} AND  isDeleted=0 HAVING debet > 0 ORDER BY date DESC LIMIT 30";
$selectUsersBalans = $db->select($querySelectBalans);
?>
<div class='container-full'>

    <div class='panel panel-default'><div class='panel-heading'><b>Betalingen:</b></div>
        <div class='panel-body'>

            <table border="0" class="table table-striped margin: 0px;">
                <tr><td>
开发者ID:emilev90,项目名称:intekenbord,代码行数:30,代码来源:balans_deposits.php

示例5: Database

<div class='container-full'>

    <?php 
$db = new Database();
$index = new Index();
$filter = new Filter();
$id = $filter->getFilter('id');
$querySelectSjaars = "SELECT * FROM sjaarspunt WHERE id='{$id}'";
$selectSjaarsResult = $db->select($querySelectSjaars);
foreach ($selectSjaarsResult as $sjaars) {
    $displayTime = date("H:i", strtotime($sjaars[time]));
    $displayDate = date("d M", strtotime($sjaars[date]));
    $punten = $sjaars[punten];
    $comment = $sjaars[comment];
    $querySelectUser = "SELECT * FROM user WHERE id='{$sjaars['uitdeler_id']}'";
    $selectUserResult = $db->select($querySelectUser);
    foreach ($selectUserResult as $user) {
        $uitdeler = $user[naam];
    }
}
?>

    <div class="container-fluid">
        <table class='table table-striped'>
            <tr>
                <td><b><a href='index.php?page=sjaars&action=sjaars'><button class='btn btn-default'><span class='glyphicon glyphicon glyphicon-list-alt' style="color:black"></span></button></b></a></td>
                <td><b><a href='index.php?page=sjaars&action=overview'><button class='btn btn-default'><span class='glyphicon glyphicon-stats' style="color:black"></span></button></b></a></td>
                <td><b><a href='index.php?page=sjaars&action=add'><button class='btn btn-default'><span class='glyphicon glyphicon-plus-sign' style="color:black"></span></button></b></a></td>
                <td><b><a href='index.php?page=sjaars&action=delete'><button class='btn btn-default'><span class='glyphicon glyphicon-minus-sign' style="color:black"></span></button></b></a></td>
            </tr>
开发者ID:emilev90,项目名称:intekenbord,代码行数:30,代码来源:sjaars_details.php

示例6: Database

<div class='container-fluid'>

    <?php 
$db = new Database();
$filter = new Filter();
$index = new Index();
$getId = $filter->getFilter('id');
$submitBtn = $filter->postFilter('submitBtn');
$query = "SELECT * FROM balans WHERE id={$getId}";
$results = $db->select($query);
if ($submitBtn) {
    foreach ($results as $result) {
        $transactionID = $result[transactionID];
    }
    $query = "UPDATE balans SET isDeleted=1 WHERE transactionID={$transactionID}";
    $result = $db->update($query);
    echo "<div class='alert alert-success' role='alert'>Betaling verwijderd!</div>";
    $index->redirect('index.php?page=bord');
} else {
    ?>
        <form action='' method='post'>    
            <div class='alert alert-warning' role='alert'><b>Weet je het zeker?</b></div>
            <div><input type='submit' value='Verwijder' name='submitBtn' class='btn btn-default btn-block'></div>

        </form>
    </div>

    <?php 
}
?>
</div>
开发者ID:emilev90,项目名称:intekenbord,代码行数:31,代码来源:balans_delete.php

示例7: Resource

require_once "lib/DB.class.php";
require_once "lib/Template.class.php";
require_once "lib/Report.class.php";
require_once "lib/Resource.class.php";
require_once "lib/Filter.class.php";
require_once "lib/php-ofc-library/open-flash-chart.php";
$rs = new Resource();
$RS = $rs->enum(array('LIST_CATEGORY'));
if ($_GET['graph_filter']) {
    $plist = explode(";", $_GET['graph_filter']);
    for ($i = 0; $i <= count($plist); $i++) {
        list($k, $v) = explode("=", $plist[$i]);
        $param[$k] = $v;
    }
}
list($filter, $fwhere) = Filter::getFilter($param, '');
foreach ($fwhere as $w) {
    $where .= $w;
}
$categories =& Report::getCategoryDistribution($where);
$category = array();
foreach (array_keys($RS['LIST_CATEGORY']) as $s) {
    if ($categories[$s] && $s) {
        $category[] = new pie_value(intval($categories[$s]), $RS['LIST_CATEGORY'][intval($s)] . " ({$categories[$s]})");
    }
}
#$title = new title('Category Distribution');
$pie = new pie();
$pie->set_alpha(0.7);
$pie->set_start_angle(35);
$pie->add_animation(new pie_fade());
开发者ID:AviMoto,项目名称:webekci,代码行数:31,代码来源:category_dist.php

示例8: date

<?php

$date = date("d M, Y");
$year = date("Y");
$filter = new Filter();
$week = $filter->getFilter('week');
$getYear = $filter->getFilter('year');
if ($week) {
    $weeknr = $week;
    if ($getYear) {
        $year = $getYear;
    }
} else {
    $weeknr = date("W");
    $year = date("Y");
}
$countStatus[1] = 0;
$countStatus[2] = 0;
$countStatus[3] = 0;
$countStatus[4] = 0;
$countStatus[5] = 0;
$countStatus[6] = 0;
$countStatus[7] = 0;
$prevweek = $weeknr - 1;
$nextweek = $weeknr + 1;
$query1 = "SELECT * FROM user ORDER BY ancenniteit ASC";
$db = new Database();
$results = $db->select($query1);
?>

<div class='container-fluid'>
开发者ID:emilev90,项目名称:intekenbord,代码行数:31,代码来源:bord_bord.php

示例9: Filter

<div class='container-fluid'>
    <?php 
$filter = new Filter();
$title = "Log in";
if ($filter->getFilter('action') == 'forgotpass') {
    include 'template/login_forgotpass.php';
} else {
    $user = $filter->postFilter('user');
    $pass = $filter->postFilter('pass');
    $submit = $filter->postFilter('submit');
    if ($_SESSION['loggedin'] == 1) {
        echo 'Al ingelogd';
    } else {
        if ($submit) {
            $login = new Login();
            $login->checklogIn($user, $pass);
            $url = 'index.php?page=bord';
            $index = new Index();
            $index->redirect($url);
            echo "</div>";
        } else {
            ?>
                <body class="login-bg">

                    <div class="login-card" >
                        <h1>Log-in</h1><br>
                        <form method='post' action=''>
                            <input type="text" required='required' name="user" placeholder="Username">
                            <input type="password" required='required' name="pass" placeholder="Password">
                            <input type="submit" name="submit" class='btn btn-default' value="Login">
                        </form>
开发者ID:emilev90,项目名称:intekenbord,代码行数:31,代码来源:login_login.php

示例10: rule_report

function rule_report($tmp, $page)
{
    global $RS;
    list($filter, $fwhere) = Filter::getFilter($_POST, $_GET);
    $filters = Filter::getFilters();
    foreach ($fwhere as $w) {
        $where .= $w;
    }
    $total_row =& Report::countRuleRecords($where);
    $navigation = new Navigation($_POST['start'], $_POST['rows'], $_POST['begin'], $_POST['first'], $total_row);
    $start = $navigation->getNavigationStart();
    $rows = $navigation->getNavigationRows();
    $begin = $navigation->getNavigationBegin();
    $first = $navigation->getNavigationFirst();
    $wlimit .= $navigation->getNavigationWhere();
    $audits_a =& Report::getRuleRecords($where, $wlimit);
    $audit_logs = array();
    $total_rows = 0;
    foreach ($audits_a as $alog) {
        $audit_logs[] = array('rule_id' => $alog->getRuleID(), 'rule_id_count' => $alog->getRuleIDCount());
        $total_rows++;
    }
    $tmp->assign('rows', $rows);
    $tmp->assign('ceil', ceil($total_row / $rows));
    $tmp->assign('total_row', $total_row);
    $tmp->assign('begin', $begin);
    $tmp->assign('start', $start);
    $tmp->assign('filters', $filters);
    $tmp->assign('filter', $filter);
    $tmp->assign('data', $audit_logs);
    $tmp->assign('tab_page', $page);
    $tmp->assign('tab', 'rule');
    $tmp->display('reports.tpl');
}
开发者ID:AviMoto,项目名称:webekci,代码行数:34,代码来源:reports.php

示例11: bindFilter

 /**
  * Binds filter to the value with given key. 
  * All stored data, snapped to the key will be immediately filtered
  * upon specified type of filter.
  *
  * @param string name of the value to filter
  * @param mixed string or numeric, representing type of the filter
  * @see Filter
  */
 function bindFilter($var_name, $type)
 {
     if (!isset($this->checked_vars[$var_name])) {
         return;
     }
     $this->checked_vars[$var_name] = Filter::apply($this->checked_vars[$var_name], Filter::getFilter($type));
 }
开发者ID:point,项目名称:cassea,代码行数:16,代码来源:HTTPParamHolder.php

示例12: Filter

<?php

$filter = new Filter();
if ($_SESSION['loggedin'] == 1) {
    $logBtn = '<li><a href="index.php?page=account&id=' . $_SESSION['user_id'] . '"><span class="glyphicon glyphicon-user"></span> ' . $_SESSION['naam'] . '</a></li>' . '<li class="divider"></li>' . '<li><a href="index.php?page=account"><span class="glyphicon glyphicon-wrench"></span> Instellingen</a></li>' . '<li><a href="index.php?page=login&action=logout"><span class="glyphicon glyphicon-log-out"></span> Log uit</a></li>';
} else {
    $logBtn = '<li class="divider"></li>' . '<li><a href="index.php?page=login"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>';
}
$activeBord = '<li><a href="index.php?page=bord"><span class="glyphicon glyphicon-cutlery"></span> Bord</a></li>';
$activeTeken = '<li><a href="index.php?page=bord&action=inteken"><span class="glyphicon glyphicon-pencil"></span> Intekenen</a></li>';
$activeBalans = '<li><a href="index.php?page=balans"><span class="glyphicon glyphicon-euro"></span> Balans</a></li>';
$activeSjaars = '<li><a href="index.php?page=sjaars"><span class="glyphicon glyphicon-thumbs-up"></span> Sjaarzenpunten</a></li>';
if ($filter->getFilter('page')) {
    $page = $filter->getFilter('page');
    $action = $filter->getFilter('action');
    if ($page == 'bord' && !isset($action)) {
        $activeBord = '<li class="active"><a href="index.php?page=bord"><span class="glyphicon glyphicon-cutlery"></span> Bord</a></li>';
    } else {
        $activeBord = '<li><a href="index.php?page=bord"><span class="glyphicon glyphicon-cutlery"></span> Bord</a></li>';
    }
    if ($page == 'bord' && $action == 'inteken') {
        $activeTeken = '<li class="active"><a href="index.php?page=bord&action=inteken"><span class="glyphicon glyphicon-pencil"></span> Intekenen</a></li>';
    } else {
        $activeTeken = '<li><a href="index.php?page=bord&action=inteken"><span class="glyphicon glyphicon-pencil"></span> Intekenen</a></li>';
    }
    if ($page == 'balans') {
        $activeBalans = '<li class="active"><a href="index.php?page=balans"><span class="glyphicon glyphicon-euro"></span> Balans</a></li>';
    } else {
        $activeBalans = '<li><a href="index.php?page=balans"><span class="glyphicon glyphicon-euro"></span> Balans</a></li>';
    }
    if ($page == 'sjaars') {
开发者ID:emilev90,项目名称:intekenbord,代码行数:31,代码来源:layout_menu.php

示例13: Index

<div class='container-fluid'>

    <?php 
$index = new Index();
$db = new Database();
$filter = new Filter();
$db->connect();
$days = array("Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag", "Zondag");
$days_abbr = array("M", "D", "W", "D", "V", "Z", "Z");
$date = date("d M, Y");
$user_id = $_SESSION['user_id'];
$user_naam = $_SESSION['naam'];
if ($filter->getFilter('week')) {
    $weeknr = $filter->getFilter('week');
    $year = date("Y");
} else {
    if ($filter->getFilter('year')) {
        $year = $filter->getFilter('year');
        $weeknr = date("W");
    } else {
        $weeknr = date("W");
        $year = date("Y");
    }
}
$prevweek = $weeknr - 1;
$nextweek = $weeknr + 1;
if ($filter->postFilter('submit')) {
    for ($day = 1; $day <= 7; $day++) {
        $insertStatus[$day] = $filter->postFilter('radio_' . $day);
        $insertGuests[$day] = $filter->postFilter('select_' . $day);
        $date = date('m/d/Y', strtotime($year . "W" . $weeknr . $day));
开发者ID:emilev90,项目名称:intekenbord,代码行数:31,代码来源:bord_inteken.php

示例14: Filter

<div class="container-full">

    <?php 
$filter = new Filter();
$db = new Database();
$date = date("d M, Y");
$year = date("Y");
$sessionUserId = $_SESSION['user_id'];
$balansId = $filter->getFilter('id');
$querySelectBalans = "SELECT * FROM balans WHERE id={$balansId}";
$results = $db->select($querySelectBalans);
foreach ($results as $result) {
    $transactionId = $result['transactionID'];
    $transactionDate = $result['date'];
}
$querySelectBalansCounts = "SELECT COUNT(user_id) as userCount FROM balans WHERE date='{$transactionDate}'";
$results3 = $db->select($querySelectBalansCounts);
foreach ($results3 as $result3) {
    $personCount = $result3['userCount'];
}
$querySelectEntryGuests = "SELECT SUM(guest) as guestCount FROM entry WHERE date='{$transactionDate}'";
$results4 = $db->select($querySelectEntryGuests);
foreach ($results4 as $result4) {
    $guestCount = $result4['guestCount'];
}
$totalCount = $personCount + $guestCount;
$time = strtotime($transactionDate);
$easyDate = date('j F Y', $time);
?>

    <table border ="0" class="table table-striped">
开发者ID:emilev90,项目名称:intekenbord,代码行数:31,代码来源:bord_view.php


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