Skip to content

Commit

Permalink
template
Browse files Browse the repository at this point in the history
  • Loading branch information
aniskchaou committed Feb 7, 2021
1 parent 3c9243c commit 0ecba13
Show file tree
Hide file tree
Showing 234 changed files with 34,494 additions and 1,837 deletions.
107 changes: 21 additions & 86 deletions controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,113 +5,48 @@ var client=require('../db/db.js')

router.get('/',(req,res)=>{
//res.redirect('/list')
res.render("elements/index", { viewTitle: 'SmartLab' });
res.render("elements/index", { viewTitle: 'FilmWire' });
})

router.get('/about', (req, res) => {
router.get('/detail', (req, res) => {
//res.redirect('/list')
res.render("elements/about", { viewTitle: 'About' });
res.render("elements/detail", { viewTitle: 'FilmWire' });
})


router.get('/blog', (req, res) => {
router.get('/favourite', (req, res) => {
//res.redirect('/list')
res.render("elements/blog", { viewTitle: 'Blog' });
res.render("elements/favourite", { viewTitle: 'FilmWire' });
})

router.get('/contact',(req,res)=>{
router.get('/celebrities', (req, res) => {
//res.redirect('/list')
res.render("elements/contact", { viewTitle: 'Contact' });
res.render("elements/celebrities", { viewTitle: 'FilmWire' });
})

router.get('/location', (req, res) => {
router.get('/movies', (req, res) => {
//res.redirect('/list')
res.render("elements/location", { viewTitle: 'Location' });
res.render("elements/movies", { viewTitle: 'FilmWire' });
})

router.get('/service', (req, res) => {
router.get('/news', (req, res) => {
//res.redirect('/list')
res.render("elements/service", { viewTitle: 'Service' });
res.render("elements/news", { viewTitle: 'FilmWire' });
})

/*
// /add
router.get('/add',(req,res)=>{
res.render("employee/add",{
viewTitle:'Add Employee'
});
})
router.post('/add',(req,res)=>{
addEmployee(req,res);
router.get('/profile', (req, res) => {
//res.redirect('/list')
res.render("elements/profile", { viewTitle: 'FilmWire' });
})

router.get('/list',(req,res)=>{
const sql = "SELECT * FROM employees"
client.query(sql, [], (err, result) => {
if (err) {
return console.error(err.message);
}
res.render("employee/list", { model: result.rows,viewTitle:'Employees List' });
});
router.get('/viewcelebrity', (req, res) => {
//res.redirect('/list')
res.render("elements/view_celebrity", { viewTitle: 'FilmWire' });
})


// /edit
router.get("/edit/:id", (req, res) => {
const id = req.params.id;
const sql = "SELECT * FROM employees WHERE id = $1 ";
console.log(sql);
client.query(sql, [id], (err, result) => {
if (err) {
return console.error(err.message);
}
res.render("employee/edit", { viewTitle:'Edit Employee',model: result.rows[0] });
});
});
router.post("/edit/:id", (req, res) => {
const id = req.params.id;
const employeees = [req.body.email, req.body.city, req.body.mobile,req.body.name, id];
const sql = "UPDATE employees SET email = $1, city = $2, mobile = $3 ,firstname= $4 WHERE (id = $5)";
console.log(sql)
client.query(sql, employeees, (err, result) => {
res.redirect("/list");
});
});
// /list
// /delete
router.get("/delete/:id", (req, res) => {
const id = req.params.id;
const sql = "DELETE FROM employees WHERE id = $1";
client.query(sql, [id], (err, result) => {
res.redirect("/list");
});
});
function addEmployee(req,res)
{
var email=req.body.email
var city=req.body.city
var name=req.body.name
var mobile=req.body.mobile
queryInsertDb="INSERT INTO employees (email, firstname,mobile,city)VALUES ('"+email+"','"+name+"','"+mobile+"','"+city+"');";
client.query(queryInsertDb).catch(err => {
console.error(err);
}).finally(() => {
res.redirect("/list");
});;
}
*/
router.get('/viewfilm', (req, res) => {
//res.redirect('/list')
res.render("elements/view_film", { viewTitle: 'FilmWire' });
})
module.exports=router;
9 changes: 9 additions & 0 deletions views/assets/css/ajax-loader.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /demo/html/bustter/css/ajax-loader.gif was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
9 changes: 9 additions & 0 deletions views/assets/css/fonts/slick-2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /demo/html/bustter/css/fonts/slick.woff was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
9 changes: 9 additions & 0 deletions views/assets/css/fonts/slick-3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /demo/html/bustter/css/fonts/slick.ttf was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
9 changes: 9 additions & 0 deletions views/assets/css/fonts/slick-4.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /demo/html/bustter/css/fonts/slick.svg was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
9 changes: 9 additions & 0 deletions views/assets/css/fonts/slick.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /demo/html/bustter/css/fonts/slick.eot was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
9 changes: 9 additions & 0 deletions views/assets/css/fonts/slickd41d.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /demo/html/bustter/css/fonts/slick.eot was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
Loading

0 comments on commit 0ecba13

Please sign in to comment.