PHP Classes
elePHPant
Icontem

File: index-example.php

Recommend this page to a friend!
  Classes of Tony  >  twz PHP To Do List Project  >  index-example.php  >  Download  
File: index-example.php
Role: Example script
Content type: text/plain
Description: main page
Class: twz PHP To Do List Project
Manage to do tasks of project on a Web page
Author: By
Last change:
Date: 1 month ago
Size: 1,760 bytes
 

 

Contents

Class file image Download
<!DOCTYPE HTML>
<html lang="en">
<head>
    <title>twzToDoList</title>
    <meta charset="utf-8">
    <link rel="shortcut icon" href="favicon.ico">
    <meta name="viewport" content="initial-scale=1.0">
    <link rel="stylesheet" href="twzToDoList.css" type="text/css">
    <script src="twzToDoList.js"></script>
</head>
<body>
<noscript><div style="border:1px solid #f40;color:#f40;text-align:center;padding:10px;background:#fee;width:100%;max-width:800px;margin:auto;">This page requires Javascript!</div></noscript>
<?php

//------------------------------------------------------------------------------
// ENTER YOUR SETTINGS BELOW

// set your preferred timezone.. (eg 'Australia/Hobart')
date_default_timezone_set('UTC');

// set your database details..
$dbName = 'your_database_name';
$dbHostName = 'localhost'; // or your_db_host_name
$dbUsername = 'your_database_username';
$dbPassword = 'your_database_password';
$ConnectionDebug = true;
$UserId = 0; // twzToDoList records the current UserId with each database change
    // You might want to set this from elsewhere, and maybe set different options
    // depending on the user.

// use default options..
$Options = array();
// -- OR --
// set your preferred options..
$Options = array(
   
'canBackup' => true,
   
'progressType' => 'bartext',
    );

// ENTER YOUR SETTINGS ABOVE
//------------------------------------------------------------------------------

require 'database.class.min.php';
require
'twzToDoList.class.php';

$todo = new twzToDoList(array($dbHostName, $dbName, $dbUsername, $dbPassword), $UserId, $ConnectionDebug);

if(
$Options)
    {
$todo->setOptions($Options); }

$todo->go(); // do the thang

?>
</body>
</html>