Example #1
0
<?php

require 'lfl.php';
if (lfl_user_is_of_type()) {
    $listId = filter_input(INPUT_GET, 'listId');
    $listData = null;
    $userOwnsList = false;
    if ($listId) {
        $listData = lfl_get_list($listId);
        $userOwnsList = lfl_user_owns_list($_SESSION['user']['userId'], $listId);
    }
}
?>
<!DOCTYPE html>
<!--
TODO:
- Pagina's toevoegen
- Content home toevoegen
- DB spul?
-->
<html>
    <head>
        <title><?php 
echo '';
?>
 - POST it</title>
        <meta charset="UTF-8">
        <!-- Mobile phone 'support' -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" type="text/css" href="style.css">
        <script src="jquery-1.11.3.min.js"></script>
Example #2
0
function lfl_toggle_list_fav($listId)
{
    $link = lfl_connect();
    if ($link) {
        $lst = lfl_get_list($listId);
        if ($lst) {
            $f = $f > 0 ? 0 : 1;
            $sql = "UPDATE list SET isFav=" . $f . " WHERE listId=" . $listId;
            return mysqli_query($link, $sql);
        }
    }
    return null;
}