示例#1
0
文件: f_common.php 项目: VSG24/ccms
function getPostCategories($post_id)
{
    $conn = MySQL::open_conn();
    $query = "SELECT cat_id FROM c_posts_cats WHERE post_id = {$post_id}";
    $res = $conn->query($query);
    $conn->close();
    if (!$res) {
        goTo404();
    }
    return $res->fetch_row();
}
示例#2
0
文件: activate.php 项目: VSG24/ccms
    $res = $conn->query($query);
    if (!$res) {
        ob_end_clean();
        goTo404();
    }
    $num_rows = $res->num_rows;
    if ($num_rows > 0) {
        $id = $res->fetch_assoc()['ID'];
        $query = "UPDATE c_users SET activate = NULL WHERE ID = {$id}";
        $res = $conn->query($query);
        if (!$res) {
            ob_end_clean();
            goTo404();
        }
    } else {
        ob_end_clean();
        goTo404();
    }
} else {
    ob_end_clean();
    goTo404();
}
?>

    <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 col-md-offset-1 col-lg-offset-1 div_white_left">
        <article class="post">
            <div align="center">Your account has been activated. You can now log in.</div>
        </article>
    </div>
<?php 
getFooter();