<?php /** * Created by PhpStorm. * User: elex * Date: 03.09.15 * Time: 11:41 */ require_once __DIR__ . "/bg-admin.class.php"; require_once __DIR__ . "/bg.class.php"; $list = new BGAdmin(); $list2 = new BG(); if ($_GET['action'] == "upload") { $list2->UploadProductsImg(); } if (isset($_POST['action']) and $_POST['action'] == 'update') { $list->ProductUpdate(); } else { $list->ProductEdit(); }
<?php global $modx; $managerId = mysql_escape_string($_GET['id']); $BGModel = new BG(); $tv = $BGModel->GetContentTV($managerId); $managerPage = $modx->getObject('modResource', $managerId); $parent = $managerPage->get('parent'); $officeList = $this->GetManagerOfficeList(); ?> <div class="w-container edit-container"> <h1 class="main-container-h1">Редактирование менеджера <a class="go-back" href="/bg-admin/manager-list">Вернуться</a></h1> <div class="w-form form-edit-add"> <form method="post"> <input type="hidden" name="action" value="update"/> <input type="hidden" name="page_id" value="<?php echo $managerId; ?> "/> <div class="w-row edit-add-row"> <div class="w-col w-col-6"><label for="last_name">Фамилия:</label> <input class="w-input" id="last_name" type="text" placeholder="Иванов" name="last_name" data-name="last_name" value="<?php echo htmlspecialchars($tv['last_name']); ?>
<?php /** * Created by PhpStorm. * User: elex * Date: 01.09.15 * Time: 11:05 */ include_once "bg.class.php"; $BG = new BG(); switch ($_GET['action']) { case "GetProductList": $BG->MainPage(); break; case "AddToCard": $BG->AddToCard(mysql_escape_string($_GET['product_id'])); break; case "Search": $BG->Search(); break; case "GetProductSingle": $BG->GetProductSingle(mysql_escape_string($_GET['product_id'])); break; case "GetSphereList": $BG->LeftMenu(); break; case "specList": $BG->GetFastList($_GET['parent']); break; case "GetProductListGotov": $BG->GetProductListGotov();