/home/kalakunj/htdocs/kalakunj.co/themes/kalakunj/views/view/category.php
<div class="row grid">
<?php
foreach ($products['p'] as $p) {
if (!empty($p['image'])) {
$image = HOME . 'uploads/products/' . $p['image'];
$image_600 = HOME . 'uploads/products/600_' . $p['image'];
$image_300 = HOME . 'uploads/products/300_' . $p['image'];
} else {
$image = HOME . 'themes/' . CONFIG_THEME . '/public/images/p-dummy.jpg';
$image_600 = HOME . 'themes/' . CONFIG_THEME . '/public/images/p-dummy.jpg';
$image_300 = HOME . 'themes/' . CONFIG_THEME . '/public/images/p-dummy.jpg';
}
$wa_text = urldecode("I'm interested in " . $p['name'] . " - " . HOME . 'view/product/' . $p['slug'] . '/');
$wa_link = "https://api.whatsapp.com/send?text=" . $wa_text;
if (defined('CONFIG_WA_NUMBER')) {
if (!empty(CONFIG_WA_NUMBER)) {
$wa_link .= "&phone=" . CONFIG_WA_NUMBER;
}
}
echo '<div itemscope itemtype="http://schema.org/Enumeration" class="product ' . $col . ' col-lg-3 col-6">
<div class="product-card mb-4">
<div class="product-image">
<a href="' . HOME . 'view/product/' . $p['slug'] . '/" target="_blank">
<div class="thumbnail position-relative">
' . ($p['enquiry'] == 1 ? '<div class="sold"><span>Sold</span></div>' : '') . '
<picture>';
if (NEXT_GEN_IMAGES == 1) {
echo '<source type="image/webp" data-srcset="' . $image_300 . '.webp 300w, ' . $image_600 . '.webp 600w, ' . $image . '.webp 900w">';
}
echo '<img src="' . $image . '" data-srcset="' . $image_300 . ' 300w, ' . $image_600 . ' 600w, ' . $image . ' 900w" alt="' . $p['name'] . '">
</picture>
</div>
</a>
</div>
<div class="product-meta text-left">
<div class="product-title" itemprop="name">' . $p['name'] . '</div>';
if ($p['discounted_price'] != 0) {
echo '<div class="old_price">₹ ' . $p['price'] . '</div><div class="new_price">₹ ' . $p['discounted_price'] . '</div>';
} else {
/home/kalakunj/htdocs/kalakunj.co/themes/kalakunj/views/view/category.php
<div class="row grid">
<?php
foreach ($products['p'] as $p) {
if (!empty($p['image'])) {
$image = HOME . 'uploads/products/' . $p['image'];
$image_600 = HOME . 'uploads/products/600_' . $p['image'];
$image_300 = HOME . 'uploads/products/300_' . $p['image'];
} else {
$image = HOME . 'themes/' . CONFIG_THEME . '/public/images/p-dummy.jpg';
$image_600 = HOME . 'themes/' . CONFIG_THEME . '/public/images/p-dummy.jpg';
$image_300 = HOME . 'themes/' . CONFIG_THEME . '/public/images/p-dummy.jpg';
}
$wa_text = urldecode("I'm interested in " . $p['name'] . " - " . HOME . 'view/product/' . $p['slug'] . '/');
$wa_link = "https://api.whatsapp.com/send?text=" . $wa_text;
if (defined('CONFIG_WA_NUMBER')) {
if (!empty(CONFIG_WA_NUMBER)) {
$wa_link .= "&phone=" . CONFIG_WA_NUMBER;
}
}
echo '<div itemscope itemtype="http://schema.org/Enumeration" class="product ' . $col . ' col-lg-3 col-6">
<div class="product-card mb-4">
<div class="product-image">
<a href="' . HOME . 'view/product/' . $p['slug'] . '/" target="_blank">
<div class="thumbnail position-relative">
' . ($p['enquiry'] == 1 ? '<div class="sold"><span>Sold</span></div>' : '') . '
<picture>';
if (NEXT_GEN_IMAGES == 1) {
echo '<source type="image/webp" data-srcset="' . $image_300 . '.webp 300w, ' . $image_600 . '.webp 600w, ' . $image . '.webp 900w">';
}
echo '<img src="' . $image . '" data-srcset="' . $image_300 . ' 300w, ' . $image_600 . ' 600w, ' . $image . ' 900w" alt="' . $p['name'] . '">
</picture>
</div>
</a>
</div>
<div class="product-meta text-left">
<div class="product-title" itemprop="name">' . $p['name'] . '</div>';
if ($p['discounted_price'] != 0) {
echo '<div class="old_price">₹ ' . $p['price'] . '</div><div class="new_price">₹ ' . $p['discounted_price'] . '</div>';
} else {
/home/kalakunj/htdocs/kalakunj.co/src/main/controller.php
}
function render($name, $data, $_mode = null) {
extract($data);
if(isset($_container)) { $_container = $_container; } else { $_container = ''; }
if($_mode != 1 ) {
$_cmn = $this->loadData();
}
#HEADER
if($_mode != 1 ) {
if (file_exists(ROOT . DS . 'themes' . DS . CONFIG_THEME . DS . 'views' . DS . 'common/header.php') ) {
require_once (ROOT . DS . 'themes' . DS . CONFIG_THEME . DS . 'views' . DS . 'common/header.php');
}
}
#VIEW
if (file_exists(ROOT . DS . 'themes' . DS . CONFIG_THEME . DS . 'views' . DS . $name . '.php') ) {
require_once (ROOT . DS . 'themes' . DS . CONFIG_THEME . DS . 'views' . DS . $name . '.php');
}
#FOOTER
if($_mode != 1 ) {
if (file_exists(ROOT . DS . 'themes' . DS . CONFIG_THEME . DS . 'views' . DS . 'common/footer.php') ) {
require_once (ROOT . DS . 'themes' . DS . CONFIG_THEME . DS . 'views' . DS . 'common/footer.php');
}
}
}
function __destruct() {
}
}
/home/kalakunj/htdocs/kalakunj.co/src/app/controllers/View.php
$data['title'] = $data['data'][0]['name'];
}
if (!empty($data['data'][0]['seo_keywords'])) {
$data['seo_keywords'] = $data['data'][0]['seo_keywords'];
}
if (!empty($data['data'][0]['seo_description'])) {
$data['seo_description'] = $data['data'][0]['seo_description'];
}
if (!empty($data['data'][0]['seo_image'])) {
$data['seo_image'] = HOME . 'uploads/categories/' . $data['data'][0]['seo_image'];
}
$data['menu'] = $mdl->menu();
$data['data'] = $data['data'][0];
$data['products'] = $mdl->categoryProducts($data['data']['id'], $slug, $page);
// $data['counts'] = $mdl->productCounts($data['data']['id']);
$data['filters'] = $mdl->filters($data['data']['id']);
// if(!isset($_GET['filters'])) {
// $data['pagination'] = $cmn->pagination("view/category/".$slug, "products WHERE category =".$data['data']['id'], $page);
// }
$this->render('view/category', $data);
} else {
header("Location: " . HOME . "404/");
exit();
}
}
function collections($slug, $page)
{
if ($page == null) {
$page = 1;
}
$mdl = $this->model('View');
$cmn = $this->model('Common');
$data['data'] = $mdl->collections($slug);
if (isset($data['data'][0])) {
if (!empty($data['data'][0]['seo_title'])) {
$data['title'] = $data['data'][0]['seo_title'];
} else {
$data['title'] = $data['data'][0]['name'];
}
/home/kalakunj/htdocs/kalakunj.co/src/main/Router.php
if(!empty($output)) {
$segments = explode('@', $output['callback']);
$controller = $segments[0];
if(ENABLE_LOGIN) {
if($output['mode']==1) {
if(isset($_SESSION[APP."_login"])) {
$controller = new $controller();
if($controller) {
call_user_func_array( array( $controller, $segments[1] ), $output['params'] );
}
} else {
header("Location: ".HOME."account/login/");
exit();
}
} elseif($output['mode'] == 0) {
$controller = new $controller();
if($controller) {
call_user_func_array( array( $controller, $segments[1] ), $output['params'] );
}
}
} else {
$controller = new $controller();
if($controller) {
call_user_func_array( array( $controller, $segments[1] ), $output['params'] );
}
}
} else {
echo '404';
}
}
}
/home/kalakunj/htdocs/kalakunj.co/src/main/Router.php
if(!empty($output)) {
$segments = explode('@', $output['callback']);
$controller = $segments[0];
if(ENABLE_LOGIN) {
if($output['mode']==1) {
if(isset($_SESSION[APP."_login"])) {
$controller = new $controller();
if($controller) {
call_user_func_array( array( $controller, $segments[1] ), $output['params'] );
}
} else {
header("Location: ".HOME."account/login/");
exit();
}
} elseif($output['mode'] == 0) {
$controller = new $controller();
if($controller) {
call_user_func_array( array( $controller, $segments[1] ), $output['params'] );
}
}
} else {
$controller = new $controller();
if($controller) {
call_user_func_array( array( $controller, $segments[1] ), $output['params'] );
}
}
} else {
echo '404';
}
}
}
/home/kalakunj/htdocs/kalakunj.co/index.php
transform: translate(-50%, -50%);
}
</style>
</head>
<body>
<div class="container">
<div class="content">
<p><strong>Under Maintenance.</strong><br>We'll be live soon. Stay tuned!</p>
</div>
</div>
</body>
</html>
<?php }
} else {
$router = new src\main\Router();
include "src/config/routes.php";
$router->dispatch();
}