PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Martin Latter   Noter   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Noter
Create and manage notes shared between users
Author: By
Last change: Update of index.php
Date: 1 year ago
Size: 986 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

#########################################
require('classes/sqlite.class.php');
require(
'classes/sqlitefunc.class.php');
require(
'classes/helpers.class.php');
#########################################

session_start();

require(
'includes/head.php');

?>

        <h1 id="indextitle">
            <a href="index.php" id="index"><?php echo CONFIG_APP_NAME; ?></a>
            <a href="<?php echo (isset($_SESSION['sVerifiedName'])) ? 'menu.php' : 'edit.php'; ?>" id="edit">&#9998;</a>
        </h1>

<?php
Helpers
::outputSearchForm();
?>

        <div id="notecont">

<?php

$oNote
= new SQLiteFunc();


if ( ! isset(
$_POST['search_flag']))
{
    echo
$oNote->lastNotesEntered();
}
else
{
   
$aResults = $oNote->search($_POST['term'], $_POST['choice']);

    if (
$aResults[0])
    {
        echo
$aResults[1];
    }
    else
    {
        echo
'<p class="error">' . $aResults[1] . '</p>';
    }
}

?>

        </div>

<?php

require('includes/foot.php');