From 6dfce20d7f2b12e996dce0cbf8e284308907b7ed Mon Sep 17 00:00:00 2001 From: "Alfonso Saavedra \"Son Link" Date: Sun, 7 Apr 2024 22:40:57 +0200 Subject: [PATCH] Many changes due to the CodeIgniter update, as well as fixes and optimizations. --- app/Controllers/BaseController.php | 4 + app/Controllers/Cars.php | 10 +- app/Controllers/Dashboard.php | 59 ++++ app/Controllers/Home.php | 172 +++++---- app/Controllers/Install.php | 155 ++++++++ app/Controllers/Races.php | 18 +- app/Controllers/Register.php | 28 +- app/Controllers/Tracks.php | 9 +- app/Controllers/Users.php | 44 ++- app/Controllers/Webserver.php | 5 +- app/Libraries/Users.php | 6 +- app/Views/car.php | 2 +- app/Views/login.php | 13 + app/Views/main.php | 54 +-- app/Views/race.php | 6 +- app/Views/track.php | 11 +- app/Views/user.php | 31 +- app/Views/users.php | 4 +- public/css/style.css | 44 ++- public/img/404.png | Bin 0 -> 4553 bytes public/img/404.svg | 544 +++++++++++++++++++++++++++++ 21 files changed, 1037 insertions(+), 182 deletions(-) create mode 100644 app/Controllers/Dashboard.php create mode 100644 app/Controllers/Install.php create mode 100644 app/Views/login.php create mode 100644 public/img/404.png create mode 100644 public/img/404.svg diff --git a/app/Controllers/BaseController.php b/app/Controllers/BaseController.php index b1fe58e..51f1d9b 100644 --- a/app/Controllers/BaseController.php +++ b/app/Controllers/BaseController.php @@ -27,6 +27,9 @@ class BaseController extends Controller * @var CLIRequest|IncomingRequest */ protected $request; + protected $db; + + protected $session; /** * An array of helpers to be loaded automatically upon @@ -50,5 +53,6 @@ class BaseController extends Controller // E.g.: $this->session = \Config\Services::session(); $this->db = \Config\Database::connect(); $this->request = \Config\Services::request(); + $this->session = session(); } } diff --git a/app/Controllers/Cars.php b/app/Controllers/Cars.php index cdba395..62a33f4 100644 --- a/app/Controllers/Cars.php +++ b/app/Controllers/Cars.php @@ -5,11 +5,17 @@ use App\Models\CarsModel; class Cars extends BaseController { + private object $carsModel; + + public function __construct() + { + $this->carsModel = new CarsModel(); + } function index($id) { - //$this->cachePage(3600); - $car = getCar($id); + $this->cachePage(3600); + $car = $this->carsModel->data($id); echo get_header('Car: ' . $car->name); echo view('car', ['car' => $car]); echo get_footer(); diff --git a/app/Controllers/Dashboard.php b/app/Controllers/Dashboard.php new file mode 100644 index 0000000..4dc539e --- /dev/null +++ b/app/Controllers/Dashboard.php @@ -0,0 +1,59 @@ +usersModel = new UsersModel(); + $uri = new URI(); + $session = session(); + + /* + if ($uri->getSegment(1) != 'login' && !$session->has('logged_in')) + { + header('Location: '.base_url().'/login'); + die(); + } + */ + } + + public function index() + { + //$users = $this->users->getUsers(); + $tplData = []; + //$tplData['users'] = $users; + echo get_header('Dashboard', [], true); + echo view('dashboard/main.php', $tplData); + echo get_footer(); + } + + public function login() + { + $data = $this->request->getVar(); + $compUser = $this->usersModel->login($data); + return $this->respond(['ok' => $compUser]); + } + + public function user() + { + //$userid = $this->session->userid; + $user = $this->usersModel->find($this->session->userid); + + echo get_header("My User", [], true); + echo view('dashboard/user', ['user' => $user]); + echo get_footer(); + } + + public function users() { + $users = $this->usersModel->findAll(); + return $this->respond($users); + } +} \ No newline at end of file diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php index 27f2e66..20e0576 100644 --- a/app/Controllers/Home.php +++ b/app/Controllers/Home.php @@ -1,15 +1,18 @@ request->getGet('period')) { - setcookie( "period", $_GET['period'], time()+(60*60*24*30) ); - $period = $_GET['period']; - } - else - { - $period = 'year'; + $period = $this->request->getGet('period'); + setcookie( "period", $period, time()+(60*60*24*30) ); } + else $period = 'today'; $tplData['period'] = $period; @@ -51,49 +51,53 @@ class Home extends BaseController $backto = time()-$datediff; $tplData['periodString'] = 'In the last year'; break; - /* - case 'date'://from this date - $datediff=(7*24*60*60); - $backto=time()-$datediff; - $periodString ='From '.date('d-m-Y', $backto); - break; - */ - case 'allTime'://always - $datediff = (50000*24*60*60); - $backto = time() - $datediff; - $tplData['periodString'] = 'all time'; - break; + case 'allTime'://always + $datediff = (50000*24*60*60); + $backto = time() - $datediff; + $tplData['periodString'] = 'all time'; + break; + default: + throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound(); } //select the category to display - if (array_key_exists('cat', $_GET)) + $catId = $this->request->getGet('cat'); + if ($catId) { - $carCatId = $_GET['cat']; - $tplData['carCatId'] = $carCatId; + // Check if the cat exists + $exists = $carCatModel->find($catId); + if (!$exists) throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound(); + + $carCatId = $catId; + } + else + { + $first = $carCatModel->select('id')->findAll(1); + $carCatId = $first[0]->id; } - //reorder the cetegories by name - $carCategories = getCarCats(); - $carCategoriesList = get_object_vars($carCategories); - ksort($carCategoriesList); + $tplData['carCatId'] = $carCatId; - $tplData['carCategories'] = $carCategories; - $tplData['carCategoriesList'] = $carCategoriesList; + // Get cars categories + $categoriesList = $carCatModel->select('id, name, count(carId) as totalCars')->groupBy('id')->findAll(); + $currCat = $carCatModel->find($carCatId); - if (!isset($carCatId)) $carCatId = array_key_first($carCategoriesList); + $carsCatList = $carCatModel->select('carId')->where('id', $carCatId)->findAll(); - $carsql = ''; - foreach ($carCategories->$carCatId->cars as $car){ - $carsql.=" OR B.car_id='$car'"; - } + $tplData['currCat'] = $currCat; + $tplData['carCategoriesList'] = $categoriesList; - $carsql = substr($carsql, 4); //remove the first " OR " + $carsCatIds = []; + foreach ($carsCatList as $car) $carsCatIds[] = $car->carId; //UGLY: there is some category that have no car assigned so create a fake $carsql for them //to prevent errors in the generated queries + /* + $carsql = '0'; if($carsql == ''){ $carsql = " B.car_id='NonExistentCarIdFindThisIfYouCan'"; } + */ /* ################################ @@ -102,16 +106,17 @@ class Home extends BaseController ################################ */ - $builder = $this->db->table('races B'); - $builder->select('B.user_id, COUNT(*) as count'); - $builder->where('UNIX_TIMESTAMP(B.timestamp) >', $backto); - $builder->where("($carsql)"); - $builder->groupBy('B.user_id'); + $builder = $this->db->table('races r'); + $builder->select('r.user_id, COUNT(*) AS count, u.username'); + $builder->join('users u', 'u.id = r.user_id'); + $builder->where('UNIX_TIMESTAMP(r.timestamp) >', $backto); + $builder->whereIn('r.car_id', $carsCatIds); + $builder->groupBy('r.user_id'); $builder->orderBy('count DESC'); $tplData['users'] = []; $query = $builder->get(); - if ($query || $query->getNumRows() > 0) $tplData['users'] = $query->getResult(); + if ($query && $query->getNumRows() > 0) $tplData['users'] = $query->getResult(); /* ################################ @@ -120,59 +125,72 @@ class Home extends BaseController ################################ */ - $builder = $this->db->table('laps A'); - $builder->select('A.race_id, B.track_id, B.car_id, B.user_id, B.timestamp, A.wettness, min(A.laptime) as bestlap'); - $builder->join('races B', 'A.race_id = B.id'); - $builder->where('UNIX_TIMESTAMP(B.timestamp) >', $backto); - $builder->where("($carsql)"); - $builder->groupBy(['B.track_id', 'A.wettness']); + $builder = $this->db->table('laps l'); + $builder->select('l.race_id, r.track_id, r.car_id, r.user_id, r.timestamp, l.wettness, min(l.laptime) as bestlap, c.name AS car_name, t.name AS track_name, u.username'); + $builder->join('races r', 'l.race_id = r.id'); + $builder->join('cars c', 'c.id = r.car_id'); + $builder->join('tracks t', 't.id = r.track_id'); + $builder->join('users u', 'u.id = r.user_id'); + $builder->where('UNIX_TIMESTAMP(r.timestamp) >', $backto); + $builder->whereIn('r.car_id', $carsCatIds); + $builder->groupBy(['r.track_id', 'l.wettness']); $tplData['mylaps'] = []; $query = $builder->get(); - if ($query || $query->getNumRows() > 0) $tplData['mylaps'] = $query->getResult(); - - $query = " - SELECT track_id, COUNT(*) as count - FROM races B - WHERE UNIX_TIMESTAMP(timestamp) > $backto - AND ($carsql) - GROUP BY B.track_id - ORDER BY COUNT(*) DESC"; - + if ($query && $query->getNumRows() > 0) $tplData['mylaps'] = $query->getResult(); + $tplData['tracks'] = []; - $builder = $this->db->table('races B'); - $builder->select('B.track_id, COUNT(*) as count'); - $builder->where('UNIX_TIMESTAMP(B.timestamp) >', $backto); - $builder->where("($carsql)"); - $builder->groupBy('B.track_id'); + $builder = $this->db->table('races'); + $builder->select('track_id, COUNT(*) AS count'); + $builder->where('UNIX_TIMESTAMP(timestamp) >', $backto); + $builder->whereIn('car_id', $carsCatIds); + $builder->groupBy('track_id'); $builder->orderBy('count DESC'); $query = $builder->get(); - if ($query || $query->getNumRows() > 0) $tplData['tracks'] = $query->getResult(); - $query=" - SELECT car_id, COUNT(*) as count - FROM races B - WHERE UNIX_TIMESTAMP(timestamp) > $backto - AND ($carsql) - GROUP BY B.car_id - ORDER BY COUNT(*) DESC"; + if ($query && $query->getNumRows() > 0) + { + $tracks = $query->getResult(); + + $tracksIds = []; + foreach($tracks as $track) $tracksIds[] = $track->track_id; + + $tracksModel = new TracksModel(); + $tracksNames = []; + $tracksNamesList = $tracksModel->select('id, name')->whereIn('id', $tracksIds)->findAll(); + + foreach($tracksNamesList as $name) $tracksNames[$name->id] = $name->name; + foreach($tracksIds as $id) + { + if (!key_exists($id, $tracksNames)) $tracksNames[$id] = "$id (Modded)"; + } + + $tplData['tracks'] = $tracks; + $tplData['tracksNames'] = $tracksNames; + } $tplData['cars'] = []; - $builder = $this->db->table('races B'); - $builder->select('car_id, COUNT(*) as count'); - $builder->where('UNIX_TIMESTAMP(B.timestamp) >', $backto); - $builder->where("($carsql)"); - $builder->groupBy('B.car_id'); + $builder = $this->db->table('races r'); + $builder->join('cars c', 'c.id = r.car_id'); + $builder->select('r.car_id, COUNT(r.car_id) as count, c.name'); + $builder->where('UNIX_TIMESTAMP(r.timestamp) >', $backto); + $builder->whereIn('r.car_id', $carsCatIds); + $builder->groupBy('r.car_id'); $builder->orderBy('count DESC'); $query = $builder->get(); - if ($query || $query->getNumRows() > 0) $tplData['cars'] = $query->getResult(); + if ($query && $query->getNumRows() > 0) $tplData['cars'] = $query->getResult(); echo get_header('Home'); echo view('main', $tplData); echo get_footer(); } + + public function error404() + { + return view('404'); + } } diff --git a/app/Controllers/Install.php b/app/Controllers/Install.php new file mode 100644 index 0000000..6d58ca5 --- /dev/null +++ b/app/Controllers/Install.php @@ -0,0 +1,155 @@ +db->query("SET FOREIGN_KEY_CHECKS = 0"); + $this->db->query($query); + $this->db->query("SET FOREIGN_KEY_CHECKS = 1"); + } + } + } + + public function update() + { + //$sql = "ALTER TABLE `users` ADD `level` TINYINT(1) NOT NULL DEFAULT '3' AFTER `id`;"; + + $this->db->query(" + CREATE TABLE IF NOT EXISTS `cars` ( + `id` varchar(50) DEFAULT NULL, + `name` varchar(50) DEFAULT NULL, + `img` varchar(100) DEFAULT NULL, + `category` varchar(50) DEFAULT NULL, + `width` varchar(10) DEFAULT NULL, + `length` varchar(10) DEFAULT NULL, + `mass` varchar(12) DEFAULT NULL, + `fueltank` varchar(10) DEFAULT NULL, + `engine` varchar(30) DEFAULT NULL, + `drivetrain` varchar(5) DEFAULT NULL + ) ENGINE=InnoDB; + "); + + $this->db->query("CREATE TABLE IF NOT EXISTS `cars_cats` ( + `id` varchar(20) DEFAULT NULL, + `name` varchar(50) DEFAULT NULL, + `carID` varchar(50) DEFAULT NULL + ) ENGINE=InnoDB; + "); + + $this->db->query("CREATE TABLE IF NOT EXISTS `tracks` ( + `id` varchar(20) NOT NULL, + `name` varchar(30) DEFAULT NULL, + `img` varchar(100) DEFAULT NULL, + `category` varchar(30) DEFAULT NULL, + `author` varchar(50) DEFAULT NULL, + `description` varchar(100) DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB; + "); + + $this->db->query("CREATE TABLE IF NOT EXISTS `tracks_cats` ( + `id` varchar(20) DEFAULT NULL, + `name` varchar(50) DEFAULT NULL, + `trackID` varchar(50) DEFAULT NULL + ) ENGINE=InnoDB; + "); + + $this->respond(true); + } + + /** + * Update cars, tracks, etc, data from the files + */ + public function updateData() + { + $carsFile = file_get_contents(WRITEPATH . '/data/cars.json'); + $cars = json_decode($carsFile, true); + $add = []; + + foreach($cars as $id => $car) $add[] = $car; + + if (count($add) > 0) + { + $this->db->query('TRUNCATE cars'); + $builder = $this->db->table('cars'); + $insert = $builder->insertBatch($add); + } + + // Now the tracks + + $tracksFile = file_get_contents(WRITEPATH . '/data/tracks.json'); + $tracks = json_decode($tracksFile, true); + $add = []; + + foreach($tracks as $id => $track) + { + $track['description'] = $track['description']['val']; + $add[] = $track; + } + + if (count($add) > 0) + { + $this->db->query('TRUNCATE tracks'); + $builder = $this->db->table('tracks'); + $insert = $builder->insertBatch($add); + } + + $carsCatsFile = file_get_contents(WRITEPATH . '/data/carCategories.json'); + $carCats = json_decode($carsCatsFile, true); + $add = []; + + foreach($carCats as $id => $cat) + { + foreach($cat['cars'] as $car) + $add[] = [ + 'id' => $id, + 'name' => $cat['name'], + 'carId' => $car + ]; + } + + if (count($add) > 0) + { + $this->db->query('TRUNCATE cars_cats'); + $builder = $this->db->table('cars_cats'); + $insert = $builder->insertBatch($add); + } + + $trackCatsFile = file_get_contents(WRITEPATH . '/data/trackCategories.json'); + $trackCats = json_decode($trackCatsFile, true); + $add = []; + + foreach($trackCats as $id => $cat) + { + foreach($cat['tracks'] as $track) + $add[] = [ + 'id' => $id, + 'name' => $cat['name'], + 'trackId' => $track + ]; + } + + if (count($add) > 0) + { + $this->db->query('TRUNCATE tracks_cats'); + $builder = $this->db->table('tracks_cats'); + $insert = $builder->insertBatch($add); + } + } +} \ No newline at end of file diff --git a/app/Controllers/Races.php b/app/Controllers/Races.php index 41f4ee5..f4d5214 100644 --- a/app/Controllers/Races.php +++ b/app/Controllers/Races.php @@ -7,18 +7,26 @@ use App\Models\TracksModel; class Races extends BaseController { - protected $users; + protected object $users; + protected object $carsModel; + protected object $tracksModel; public function __construct() { $this->users = new UsersModel(); + $this->carsModel = new CarsModel(); + $this->tracksModel = new TracksModel(); } public function index($race) { //$this->cachePage(360); - $builder = $this->db->table('races'); - $builder->where('id', $race); + $builder = $this->db->table('races r'); + $builder->join('cars c', 'c.id = r.car_id'); + $builder->join('tracks t', 't.id = r.track_id'); + $builder->join('users u', 'u.id = r.user_id'); + $builder->select('r.id, r.type, r.timestamp, r.car_id, c.name AS car_name, c.img as car_img, r.track_id, t.name AS track_name, t.img AS track_img, u.username'); + $builder->where('r.id', $race); $query = $builder->get(1); $tplData = []; @@ -36,10 +44,6 @@ class Races extends BaseController $tplData['laps'] = json_encode($query->getResult()); $tplData['race']->n_laps = $query->getNumRows(); } - - $tplData['user'] = new UsersModel($tplData['race']->user_id); - $tplData['car'] = new CarsModel(getCar($tplData['race']->car_id)); - $tplData['track'] = new TracksModel(getTrack($tplData['race']->track_id)); } echo get_header('Races'); diff --git a/app/Controllers/Register.php b/app/Controllers/Register.php index 0e9d1f0..7d26aee 100644 --- a/app/Controllers/Register.php +++ b/app/Controllers/Register.php @@ -8,26 +8,27 @@ use CodeIgniter\API\ResponseTrait; class Register extends BaseController { - protected $users; - protected $captcha; + protected object $users; + protected object $captcha; + use ResponseTrait; public function __construct() { $this->captcha = new CaptchaBuilder; - session_start(); + $this->users = new UsersModel; } public function index() { $this->captcha->build(); - $_SESSION['phrase'] = $this->captcha->getPhrase(); + $this->session->set('phrase', $this->captcha->getPhrase()); echo get_header('Register'); echo view('register', ['captcha' => $this->captcha->inline()]); echo get_footer(['register.js']); } - public function newuser() + public function newUser() { $data = $this->request->getVar(); $response = [ @@ -36,21 +37,24 @@ class Register extends BaseController ]; // First verify the captcha - if (isset($_SESSION['phrase']) && PhraseBuilder::comparePhrases($_SESSION['phrase'], $data['phrase'])) { + if ( + $this->session->has('phrase') && + PhraseBuilder::comparePhrases($this->session->phrase, $data['phrase']) + ) { // Move the image $file = $this->request->getFile('imginput'); - if ($file) { + if ($file) + { // Verify is the file is correct and not, for example, a .exe renamed to .jpg $ext = $file->guessExtension(); if ($ext != $file->getExtension()) $response['msg'] = 'The image is not valid'; else { - $users = new UsersModel(); // Now we check if the user and/or email is already in use. - if ($users->compUser($data['username'], $data['email'])) + if ($this->users->compUser($data['username'], $data['email'])) $response['msg'] = 'Username and/or email is already in use'; - else $response = $users->addUser($data, $file); + else $response = $this->users->addUser($data, $file); } } } @@ -61,10 +65,10 @@ class Register extends BaseController return $this->respond($response); } - public function new_captcha() + public function newCaptcha() { $this->captcha->build(); - $_SESSION['phrase'] = $this->captcha->getPhrase(); + $this->session->phrase = $this->captcha->getPhrase(); return $this->captcha->inline(); } diff --git a/app/Controllers/Tracks.php b/app/Controllers/Tracks.php index 1a42f77..a8a542d 100644 --- a/app/Controllers/Tracks.php +++ b/app/Controllers/Tracks.php @@ -2,15 +2,20 @@ namespace App\Controllers; use App\Models\TracksModel; -use App\Models\CarsModel; class Tracks extends BaseController { + private object $tracksModel; + + public function __construct() + { + $this->tracksModel = new TracksModel(); + } function index($id) { $this->cachePage(3600); - $track = getTrack($id); + $track = $this->tracksModel->data($id); $bestLaps = getBestTimesTrack($id); echo get_header('Track: ' . $track->name); echo view('track', ['track' => $track, 'bestLaps' => $bestLaps]); diff --git a/app/Controllers/Users.php b/app/Controllers/Users.php index d5ed430..703a58e 100644 --- a/app/Controllers/Users.php +++ b/app/Controllers/Users.php @@ -5,16 +5,16 @@ use App\Models\UsersModel; class Users extends BaseController { - protected $users; + protected object $usersModel; public function __construct() { - $this->users = new UsersModel(); + $this->usersModel = new UsersModel(); } public function index() { - $users = $this->users->getUsers(); + $users = $this->usersModel->findAll(); $tplData = []; $tplData['users'] = $users; echo get_header('Users'); @@ -25,17 +25,15 @@ class Users extends BaseController public function user($username) { //$this->cachePage(3600); - $userid = $this->users->getUser($username); - $user = new UsersModel($userid); - unset($user->addUser); - $userraces = $user->getRaces(); - $raceswon = $user->getWon(); - $racespodiums = $user->getPodiums(); - $racesretired = $user->getUnfinisced(); - $practices = $user->getPractices(); - $qualifies = $user->getQualifies(); + $user = $this->usersModel->getUser($username); + $userraces = $this->usersModel->getRaces(); + $raceswon = $this->usersModel->getWon(); + $racespodiums = $this->usersModel->getPodiums(); + $racesretired = $this->usersModel->getUnfinisced(); + $practices = $this->usersModel->getPractices(); + $qualifies = $this->usersModel->getQualifies(); $tplData = [ - 'raceSessions' => $user->getRaceSessions(), + 'raceSessions' => $this->usersModel->getRaceSessions(), 'userRaces' => $userraces, 'racesWon' => $raceswon, 'raceswonpercent' => percentStr($raceswon, count($userraces)), @@ -45,16 +43,24 @@ class Users extends BaseController 'qualifiescount' => $qualifies, 'racesretired' => $racesretired, 'racesretiredpercent' => percentStr($racesretired, count($userraces)), - 'mostusedcar' => $user->getMostUsedCar(), - 'mostusedtrack' => $user->getMostUsedTrack(), - 'timeontrackPractice' => $user->getTimePractice(), - 'timeontrackQualify' => $user->getTimeQualify(), - 'timeontrackRace' => $user->getTimeOnRace(), - 'timeontrack' => $user->getTimeOnTracks(), + 'mostusedcar' => $this->usersModel->getMostUsedCar(), + 'mostusedtrack' => $this->usersModel->getMostUsedTrack(), + 'timeontrackPractice' => $this->usersModel->getTimePractice(), + 'timeontrackQualify' => $this->usersModel->getTimeQualify(), + 'timeontrackRace' => $this->usersModel->getTimeOnRace(), + 'timeontrack' => $this->usersModel->getTimeOnTracks(), 'user' => $user ]; + log_message('debug', json_encode($tplData['raceSessions'])); echo get_header("User: $username"); echo view('user', $tplData); echo get_footer(); } + + public function login() + { + echo get_header("Log In"); + echo view('login'); + echo get_footer(['dashboard.js']); + } } \ No newline at end of file diff --git a/app/Controllers/Webserver.php b/app/Controllers/Webserver.php index cac94a0..b16276e 100644 --- a/app/Controllers/Webserver.php +++ b/app/Controllers/Webserver.php @@ -14,9 +14,12 @@ class Webserver extends BaseController public function index() { + // Log connection + log_message('debug', 'New connection'); + $so = getOS(); $data = $this->request->getPost('data'); - if (!$data) return $this->failValidationError('No data received'); + if (!$data) return $this->failValidationErrors('No data received'); $xml = xmlObj($data); diff --git a/app/Libraries/Users.php b/app/Libraries/Users.php index 9e26402..233f24c 100644 --- a/app/Libraries/Users.php +++ b/app/Libraries/Users.php @@ -12,11 +12,6 @@ class Users const HASH = PASSWORD_DEFAULT; const COST = 16; - public function __construct() - { - $this->db = \Config\Database::connect(); - } - /** * Add new to the database */ @@ -29,6 +24,7 @@ class Users unset($data['passwordcheck']); unset($data['phrase']); + unset($data['PHPSESSID']); // First verify if the user or email $sql = $this->db->table('users'); diff --git a/app/Views/car.php b/app/Views/car.php index 3feebc0..ff07bac 100644 --- a/app/Views/car.php +++ b/app/Views/car.php @@ -4,7 +4,7 @@
- imgTagFull() ?> + img, 'car', $car->name) ?>
diff --git a/app/Views/login.php b/app/Views/login.php new file mode 100644 index 0000000..37e67ee --- /dev/null +++ b/app/Views/login.php @@ -0,0 +1,13 @@ +
+

Log In

+
+ + + + + +
+
+ Usuario y/o contraseƱa incorrecto. +
+
\ No newline at end of file diff --git a/app/Views/main.php b/app/Views/main.php index 614c43e..b078b11 100644 --- a/app/Views/main.php +++ b/app/Views/main.php @@ -1,30 +1,32 @@ '; $menuSelect = '