-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
436 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<? | ||
# Destroy the call if this file called directly | ||
defined('SN_Start') or die('Access denied.'); | ||
|
||
class StartDashboardModel extends MyPanelModel { | ||
public function getApps() { | ||
$q = $this->pdo->query('SELECT IFNULL(app_icon_img, "ui/no-photo-lighter.png") AS app_icon_img, IFNULL(app_tech_path, false) AS fFlag, app_name FROM sanity_prop_apps ORDER BY sort DESC, app_name ASC'); | ||
$apps = []; | ||
while ($f = $q->fetch(2)) { | ||
$apps[] = $f; | ||
} | ||
return $apps; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
mypanel/view/start/dashboard.php → mypanel/view/start/index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?# Destroy the call if this file called directly | ||
defined('SN_Start') or die('Access denied.');?> | ||
|
||
<div class="breadcrumb-container"> | ||
<div class="Breadcrumbs"><?=$PageTitle?></div> | ||
</div> | ||
|
||
<div id="basket_items" class="shop-basket-list"> | ||
|
||
</div> | ||
|
||
<div class="shop-basket-control-buttons"> | ||
<button class="xver" id="basket-complete-btn" onclick="registerOrder();" disabled>Оформить</button> | ||
<button class="xver white" onclick="removeBasket()">Очистить</button> | ||
</div> | ||
|
||
<script> | ||
mr.Query('../get/ShopBasket/ConvertProducts', {items : sn.shop.orders.getItem('bin')}, function(response) { | ||
var r = JSON.parse(response); | ||
var a = {els:[]}; | ||
console.log(r); | ||
if (r.result.length > 0) { | ||
document.getElementById('basket-complete-btn').disabled = false; | ||
} | ||
for (var k in r.result) { | ||
let preparedModel = { | ||
attr:'shop-basket-item', | ||
inner:[ | ||
{attr:'product-title', inner:[{inner:r.result[k].product_name}]}, | ||
{attr:'product-single-cost', inner:[{inner:r.result[k].cost + ' ₽'}]}, | ||
{attr:'product-count', inner:[{inner:String(r.result[k].count + ' шт')}]}, | ||
{attr:'product-total-cost', inner:[{inner:String(r.result[k].total_cost + ' ₽')}]}, | ||
] | ||
} | ||
a.els.push(preparedModel); | ||
}; | ||
mr.Dom('#basket_items').CreateDOMbyRules(a); | ||
}); | ||
|
||
function registerOrder() { | ||
sn.shop.completeOrder(); | ||
location.href = '/orders/'; | ||
} | ||
|
||
function removeBasket() { | ||
sn.shop.clearOrder(); | ||
location.reload(); | ||
} | ||
</script> |
Oops, something went wrong.