hjkhjkjhkhjkgjghjhgjhgjghjhghjghjhgjjnbvnvbnvk
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
wjcvelqp
/
public_html
/
vc
/
Upload FileeE
HOME
<?php require_once __DIR__ . '/includes/bootstrap.php'; $id=(int)($_GET['id']??0);$row=null; try{ $st=db()->prepare("SELECT r.*, c.name AS category_name FROM learning_resources r LEFT JOIN learning_categories c ON c.id=r.category_id WHERE r.id=? AND r.status='published'"); $st->execute([$id]);$row=$st->fetch()?:null; }catch(Throwable $e){} if(!$row){flash('error','Resource not found.');redirect('learning.php');} $page_title=$row['title'].' — '.VC_APP_NAME;$nav='learning'; include __DIR__.'/includes/header.php'; ?> <div class="page"><div class="container"> <div class="breadcrumb"><a href="<?= e(url('learning.php')) ?>">Learning</a> / <?= e($row['title']) ?></div> <div class="detail"> <h1><?= e($row['title']) ?></h1> <p class="muted"><?= e($row['category_name']??'') ?> · <?= e(format_date($row['created_at'])) ?></p> <div style="white-space:pre-wrap"><?= e($row['description']) ?></div> <div class="inline-actions" style="margin-top:16px"> <?php if($row['external_url']):?><a class="btn btn-primary" href="<?= e($row['external_url']) ?>" target="_blank" rel="noopener">Open resource</a><?php endif;?> <?php if($row['file_path']):?><a class="btn btn-outline" href="<?= e(upload_url($row['file_path'])) ?>" target="_blank">Download file</a><?php endif;?> </div> </div></div></div> <?php include __DIR__.'/includes/footer.php'; ?>