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


PHP Filter::postFilter方法代码示例

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


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

示例1: 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

示例2: date

$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];
$submitBtn = $filter->postFilter('submitBtn');
$totaalBedrag[$sessionUserId] = str_replace(',', '.', $filter->postFilter('totaalBedrag'));
if ($submitBtn) {
    echo "<form method='post' action=''";
    echo "<div class='panel panel-info'><div class='panel-heading'><b>Controle</b></div>";
    echo "<div class='panel-body'><table class='table table-striped'>";
    echo "<tr><td><b>Personen:</b></td><td><b>Gasten:</b></td><td><b>Kosten</b></td></tr>";
    $postedCheckBoxCount = 0;
    $postedGuestCount = 0;
    $queryUsers = "SELECT * FROM user ORDER BY user.ancenniteit ASC";
    $db->connect();
    $results = $db->select($queryUsers);
    foreach ($results as $result) {
        $db_user_id = $result[id];
        $postedCheckBox[$db_user_id] = $filter->postFilter($result[naam] . '_check');
        $postedGuestBox[$db_user_id] = $filter->postFilter($result[naam] . '_option');
开发者ID:emilev90,项目名称:intekenbord,代码行数:31,代码来源:balans_edit.php

示例3: Account

<div class="container-fluid">
    <div class="row col-lg-3">

        <?php 
$acc = new Account();
$filter = new Filter();
$submit = $filter->postFilter('submitBtn');
$oldPass = $filter->postFilter('oldPass');
$newPass1 = $filter->postFilter('pass1');
$newPass2 = $filter->postFilter('pass2');
if ($submit) {
    $acc->changePassCheck($oldPass, $newPass1, $newPass2);
    echo "</div></div>";
} else {
    ?>

            Stel een nieuw wachtwoord in<br><Br>
        </div>    
        <div class="row spacer">                  
        </div>
        <form method='post' action=''>
            <div class="row">
                <div class="form-group col-lg-3">
                    <label for="oldPass">Oud wachtwoord:</label>
                    <input type="password" class="form-control" id="oldPass" name="oldPass" required="required">
                </div>
            </div>
            <div class="row">
                <div class="form-group col-lg-3">
                    <label for="pass1">Nieuw wachtwoord:</label>
                    <input type="password" class="form-control" id="pass1" name="pass1" required="required">
开发者ID:emilev90,项目名称:intekenbord,代码行数:31,代码来源:account_changepass.php

示例4: 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

示例5: Filter

<div class="container-fluid">
    <div class="row col-lg-9">

        <?php 
$filter = new Filter();
$account = new Account();
$submit = $filter->postFilter('submitBtn');
$eMail = $filter->postFilter('eMail');
if ($submit) {
    $account->checkMail($eMail);
} else {
    ?>
        
        
            Vul je email in om je wachtwoord te resetten.
            <br><br>
            <form method="post" action="">
                <div class="row">
                    <div class="form-group col-lg-3">
                        <label for="eMail">Email:</label>
                        <input type="email" class="form-control" id="eMail" name="eMail" required="required">
                    </div>
                </div>

                <div class="row">
                    <div class="form-group col-lg-3">
                        <input type="submit" id="submitBtn" name="submitBtn" class="btn btn-default btn-block">
                    </div>
                </div>
            </form>
        </div>
开发者ID:emilev90,项目名称:intekenbord,代码行数:31,代码来源:login_forgotpass.php

示例6: Database

<div class='container-fluid'>

    <?php 
$db = new Database();
$filter = new Filter();
$submitBtn = $filter->postFilter('submitBtn');
$totaalBedrag = str_replace(',', '.', $filter->postFilter('totaalBedrag'));
if ($submitBtn) {
    $postedCheckBoxCount = 0;
    $query = "SELECT * FROM user ORDER BY user.ancenniteit ASC";
    $db->connect();
    $results = $db->select($query);
    foreach ($results as $result) {
        $postedCheckBox[$checkCount] = $_POST[$result[naam] . '_check'];
        $postedGuestBox[$checkCount] = $_POST[$result[naam] . '_option'];
        if ($postedCheckBox[$checkCount] == 1) {
            $postedCheckBoxCount++;
        }
        $queryInsBalans = "INSERT INTO balans ";
        $queryInsSaldo = "UPDATE user SET saldo = + '{$totaalBedrag}' WHERE id='{$_SESSION['user_id']}'";
    }
    //Berekening kosten
    $averageKosten = round($totaalBedrag / $postedCheckBoxCount, 2);
    echo $totaalBedrag . "<br>";
    echo $postedCheckBoxCount . "<br>";
    echo $averageKosten;
} else {
    $query = "SELECT * FROM user ORDER BY user.ancenniteit ASC";
    $db->connect();
    $results = $db->select($query);
    $getMonth = $filter->getFilter('m');
开发者ID:emilev90,项目名称:intekenbord,代码行数:31,代码来源:balans_afrekenen2.php

示例7: date

$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));
        $query = "SELECT * FROM entry WHERE user_id={$user_id} AND date='{$date}'";
        $result = $db->select($query);
        if (count($result) > 0) {
            $queryUpdate = "UPDATE entry SET status={$insertStatus[$day]}, guest={$insertGuests[$day]} WHERE user_id={$user_id} AND date='{$date}'";
            $db->update($queryUpdate);
        } else {
            $queryInsert = "INSERT INTO entry (user_id, status, date, guest) VALUES ('{$user_id}', '{$insertStatus[$day]}', '{$date}', '{$insertGuests[$day]}')";
            $db->insert($queryInsert);
        }
    }
    echo "<div class='alert alert-success' role='alert'>Ingetekend!</div>";
开发者ID:emilev90,项目名称:intekenbord,代码行数:31,代码来源:bord_inteken.php

示例8: Account

<div class="container-fluid">
    <div class="row col-lg-3">

        <?php 
$acc = new Account();
$filter = new Filter();
$db = new Database();
$query = "SELECT * FROM user WHERE id={$_SESSION['user_id']}";
$result = $db->select($query);
foreach ($result as $results) {
    $eMail = $results['eMail'];
}
$submit = $filter->postFilter('submitBtn');
$oldMail = $filter->postFilter('oldMail');
$newMail1 = $filter->postFilter('newMail1');
$newMail2 = $filter->postFilter('newMail2');
if ($submit) {
    $acc->changeMailcheck($newMail1, $newMail2);
    echo "</div></div>";
} else {
    ?>

            Stel een nieuw emailadres in<br><Br>
        </div>    
        <div class="row spacer">                  
        </div>
        <form method='post' action=''>
            <div class="row">
                <div class="form-group col-lg-3">
                    <label for="oldMail">Huidig email:</label>
                    <input type="email" class="form-control" id="oldMail" name="oldMail" value="<?php 
开发者ID:emilev90,项目名称:intekenbord,代码行数:31,代码来源:account_changemail.php

示例9: date

$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);
        $date = date('m/d/Y', strtotime($year . "W" . $weeknr . $day));
        $query = "SELECT * FROM entry WHERE user_id={$user_id} AND date='{$date}'";
        $result = $db->select($query);
        if (count($result) > 0) {
            $queryUpdate = "UPDATE entry SET status={$insertStatus[$day]} WHERE user_id={$user_id} AND date='{$date}'";
            $db->update($queryUpdate);
        } else {
            $queryInsert = "INSERT INTO entry (user_id, status, date) VALUES ('{$user_id}', '{$insertStatus[$day]}', '{$date}')";
            $db->insert($queryInsert);
        }
    }
    echo "<div class='alert alert-success' role='alert'>Ingetekend!</div>";
    $index->redirect('index.php?page=bord');
开发者ID:emilev90,项目名称:intekenbord,代码行数:31,代码来源:bord_inteken2.php


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