This commit is contained in:
Joey Kimsey
2025-01-23 20:42:16 -05:00
parent 48e385af94
commit 3fcc5aee52
17 changed files with 265 additions and 375 deletions

View File

@ -0,0 +1,64 @@
<?php
/**
* app/controllers/hermes.php
*
* This is the hermes controller.
*
* @version 3.0
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Controllers;
use TheTempusProject\Hermes\Functions\Redirect;
use TheTempusProject\Bedrock\Functions\Session;
use TheTempusProject\Bedrock\Functions\Check;
use TheTempusProject\Bedrock\Functions\Input;
use TheTempusProject\Hermes\Functions\Route as Routes;
use TheTempusProject\Houdini\Classes\Issues;
use TheTempusProject\Houdini\Classes\Views;
use TheTempusProject\Houdini\Classes\Components;
use TheTempusProject\Houdini\Classes\Template;
use TheTempusProject\Classes\Controller;
use TheTempusProject\Classes\Forms;
use TheTempusProject\TheTempusProject as App;
class Downloads extends Controller {
public function index() {
Session::flash( 'success', 'Unknown download.' );
return Redirect::to( 'home/index' );
}
public function resume( $extension = 'none' ) {
if ( ! in_array( $extension, ['docx','pdf','md','txt'] ) ) {
Session::flash( 'success', 'Unknown download.' );
return Redirect::to( 'home/index' );
}
$file = APP_ROOT_DIRECTORY . 'downloads' . DIRECTORY_SEPARATOR . 'JoeyKimsey-resume-2025.' . $extension;
// Check if the file exists
if (file_exists($file)) {
// Set headers to force the download
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . basename($file) . '"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
// Clear the output buffer
ob_clean();
flush();
// Read and output the file
readfile($file);
exit;
} else {
Session::flash( 'success', 'Unknown download.' );
return Redirect::to( 'home/index' );
}
}
}

View File

@ -29,22 +29,19 @@ class Home extends Controller {
self::$title = '{SITENAME}';
self::$pageDescription = 'This is the homepage of your new Tempus Project Installation. Thank you for installing. find more info at https://thetempusproject.com';
$optionValues = [
(object) [ "post" => "XXXXXXXX", "option" => "Full-Stack Developer" ],
(object) [ "post" => "XXXXXXXX", "option" => "DevOps Engineer" ],
(object) [ "post" => "XXXXXXXX", "option" => "Web Developer" ],
(object) [ "post" => "XXXXXXXX", "option" => "App Developer" ],
(object) [ "post" => "XXXXXXXX", "option" => "Senior PHP Developer" ],
(object) [ "post" => "XXXXXXXX", "option" => "Server/Waiter" ],
(object) [ "post" => "XXXXXXXX", "option" => "Cook" ],
(object) [ "post" => "XXXXXXXX", "option" => "Farm-Hand" ],
(object) [ "post" => "XXXXXXXX", "option" => "Dish-Boy" ],
(object) [ "post" => "XXXXXXXX", "option" => "Brother" ],
(object) [ "post" => "XXXXXXXX", "option" => "Son" ],
(object) [ "post" => "XXXXXXXX", "option" => "Friend" ],
(object) [ "post" => "XXXXXXXX", "option" => "Student" ],
(object) [ "post" => "XXXXXXXX", "option" => "Polymath" ],
(object) [ "post" => "XXXXXXXX", "option" => "Geek" ],
(object) [ "post" => "XXXXXXXX", "option" => "Nerd" ],
(object) [ "post" => "python-dev", "option" => "Python Developer" ],
(object) [ "post" => "ecommerce-coder", "option" => "eCommerce Coder" ],
(object) [ "post" => "php-experience", "option" => "PHP Developer" ],
(object) [ "post" => "ai-experience", "option" => "GPT-Agent" ],
(object) [ "post" => "operations-experience", "option" => "DevOps Engineer" ],
(object) [ "post" => "lua-dev", "option" => "Lua Developer" ],
(object) [ "post" => "version-control", "option" => "Git Goblin" ],
(object) [ "post" => "laravel-experience", "option" => "Laravel Developer" ],
(object) [ "post" => "database-experience", "option" => "Database Admin" ],
(object) [ "post" => "education", "option" => "Student" ],
(object) [ "post" => "full-stack-developer", "option" => "Full-Stack Developer" ],
(object) [ "post" => "stripe-certified-developer", "option" => "Stripe Certified Developer" ],
];
shuffle($optionValues);
Views::view( 'index', $optionValues );

View File

@ -1,3 +0,0 @@
<?php
// the idea is that this will be info pages for the plugin various/info
?>