Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to fix this project with the pacifications: This criterion is linked to a Learning OutcomeJavascript Library You must use a javascript library (jquery is

How to fix this project with the pacifications:

This criterion is linked to a Learning OutcomeJavascript Library

You must use a javascript library (jquery is a great choice)

10 pts

This criterion is linked to a Learning OutcomeCSS

Stylesheet present and used properly

10 pts

This criterion is linked to a Learning OutcomeDatabase

You must have a database with data, you will need to provide a creation script with instructions so I can run your final project on my local machine

10 pts

This criterion is linked to a Learning OutcomeAdmin

You must provide a login functionality with admin features

10 pts

This criterion is linked to a Learning OutcomeCookies

You will need to use cookies to manage state and visits and present a different page/message for returning users vs. new

10 pts

This criterion is linked to a Learning OutcomeLogging

You must implement logging and write logs to your database this will be used for error management and site usage and any thing else you deem neccesary

10 pts

This criterion is linked to a Learning OutcomeGit

You are required to use git and provide your repo info so I can view check in's etc

10 pts

This criterion is linked to a Learning OutcomeWriteup

a. initial goals written out, so what you want to accomplish b. milestones met and milestones not met, you should write out why anything was not met, for milestones met you need to provide lessons learned meaning what did you takeaway from accomplishing the milestone c. post mortem, if I had to do it all over again this is what I would do differently d. user guide for the website explaining features and how to use the different sections

This codes:

;

CREATE TABLE users(

id INT PRIMARY KEY AUTO_INCREMENT

username VARCHAR(50) NOT NULL,

password VARCHAR(50) NOT NULL,

email VARCHAR(50) NOT NULL

);

$('#login-form').submit(function(event) {

event.preventDefault();

var username = $('#username').val();

var password = $('#password').val();

$.ajax({

url: 'login.php',

type: 'POST',

data: {username: username, password: password},

success: function(response) {

if (response == 'success') {

window.location = 'admin.php';

} else {

$('#error-message').text('Invalid username or password.');

}

}

});

});

function setCookie(name, value, days) {

var expires = '';

if (days) {

var date = new Date();

date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));

expires = '; expires=' + date.toUTCString();

}

document.cookie = name + '=' + value + expires + '; path=/';

}

function getCookie(name) {

var nameEQ = name + '=';

var ca = document.cookie.split(';');

for (var i = 0; i < ca.length; i++) {

var c = ca[i];

while (c.charAt(0) == ' ') c = c.substring(1, c.length);

if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);

}

return null;

}

const winston = require('winston');

const mysql = require('mysql');

const connection = mysql.createConnection({

host: 'localhost',

user: 'user',

password: 'password',

database: 'mydb'

});

const transport = new winston.transports.Mysql({

connection: connection,

table: 'logs'

});

const logger = winston.createLogger({

transports: [transport]

});

logger.info('Hello, world!');

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions

Question

Describe a social audit.

Answered: 1 week ago

Question

Question Can any type of stock or securities be used in an ESOP?

Answered: 1 week ago

Question

Question Can a self-employed person adopt a money purchase plan?

Answered: 1 week ago