Beispiel #1
0
function is_csrf_proper($csrf_token)
{
    if ($csrf_token == get_csrf()) {
        return true;
    }
    return false;
}
Beispiel #2
0
<?php

use Kanti\HubUpdater;
$CSRF = get_csrf();
$updater = new HubUpdater(array('name' => 'danpros/htmly', 'prerelease' => !!config("prerelease")));
if ($updater->able()) {
    $info = $updater->getNewestInfo();
    echo '<h3>Update Available</h3>';
    echo '<p><a href="' . site_url() . 'admin/update/now/' . $CSRF . '" alt="' . $info['name'] . '">Update to ' . $info['tag_name'] . '</a></p>';
} else {
    echo '<h3>No Available Update</h3>';
    echo '<p>You are using the latest HTMLy version.</p>';
}
Beispiel #3
0
        <br>

        <div id="wmd-button-bar" class="wmd-button-bar"></div>
        <textarea id="wmd-input" class="wmd-input <?php 
if (isset($postContent)) {
    if (empty($postContent)) {
        echo 'error';
    }
}
?>
" name="content" cols="20" rows="10"><?php 
echo $oldcontent;
?>
</textarea><br>
        <input type="hidden" name="csrf_token" value="<?php 
echo get_csrf();
?>
">
        <input type="submit" name="submit" class="submit" value="Save"/>
    </form>
</div>
<div id="insertImageDialog" title="Insert Image">
    <h4>URL</h4>
    <input type="text" placeholder="Enter image URL" />
    <h4>Upload</h4>
    <form method="post" action="" enctype="multipart/form-data">
        <input type="file" name="file" id="file" />
    </form>
<style>
#insertImageDialog { display:none; padding: 10px; font-size:12px;}
.wmd-prompt-background {z-index:10!important;}
Beispiel #4
0
                        </li>
                        <li <?php 
    echo $id_nav == 3 ? 'class="active"' : '';
    ?>
>
                            <a href="<?php 
    echo site_url('mon-panier');
    ?>
" title="Mon panier">
                                 <i class="glyphicon glyphicon-shopping-cart"></i> Mon panier
                            </a>
                        </li>

                        <li>
                            <a id="btn_deconnexion" href="<?php 
    echo site_url('deconnexion/' . get_csrf());
    ?>
" title="Deconnexion">
                                 <i class="glyphicon glyphicon-off"></i> Deconnexion
                            </a>
                        </li>

                    <?php 
} else {
    ?>
                        <li>
                            <a href="<?php 
    echo site_url('connexion');
    ?>
" title="Connectez-vous">
                                <i class="glyphicon glyphicon-user"></i> Connexion