Esempio n. 1
0
<?php

if (isset($_SESSION['user']) && isset($_GET['param'])) {
    $pageId = filter_input(INPUT_GET, 'param', FILTER_VALIDATE_INT);
    if ($pageId && pp_can_edit_page($pageId, $_SESSION['user']['userId'])) {
        echo '<p><a href="?page=pagelist">Back to page list</a></p>';
        if (pp_delete_page($pageId)) {
            echo '<h2>Page was removed</h2>';
        } else {
            echo '<h2>Page could not be removed</h2>';
        }
    } else {
        echo '<h2>You are not authorized to remove this page!</h2>';
        echo '<p>Your behaviour has been logged!</p>';
        pp_write_log('NOTICE: User ' . $_SESSION['user']['userName'] . ' tried to remove page with ID ' . $pageId . ' but was not authorized!');
    }
}
Esempio n. 2
0
        if ($displayMode === 2 && $userPage['pageId'] === $pageId) {
            echo '<li><a class="menubar_a_selected" href="?pageId=' . $userPage['pageId'] . '">' . pp_get_page($userPage['pageId'])['pageName'] . '</a></li>';
        } else {
            echo '<li><a class="menubar_a" href="?pageId=' . $userPage['pageId'] . '">' . pp_get_page($userPage['pageId'])['pageName'] . '</a></li>';
        }
    }
}
?>
                </ul>
            </div>
            <div id="content">
                <?php 
echo $pageBody;
?>
            </div>
            <div id="footer">
                <pre>
                    <?php 
$_dvtc = pp_get_connected_thread_count()['Value'];
if ($_dvtc > 1) {
    pp_write_log("WARNING: Connections greater than 1: " . $_dvtc);
}
//Trust me, this makes sense
mysqli_close(pp_connect());
?>
                </pre>                
            </div>
        </div>
    </body>
</html>