Esempio n. 1
0
<?php

$Manufacturers = new Manufacturers();
// ---- center ----
unset($parsed_res);
if (isset($GLOBALS['REQAR'][1]) && is_numeric($GLOBALS['REQAR'][1])) {
    $manufacturer_id = $GLOBALS['REQAR'][1];
} else {
    header('Location: ' . $GLOBALS['URL_base'] . '404/');
    exit;
}
$tpl->Assign('h1', 'Удаление производителя');
$ii = count($GLOBALS['IERA_LINKS']);
$GLOBALS['IERA_LINKS'][$ii]['title'] = "Производители";
$GLOBALS['IERA_LINKS'][$ii++]['url'] = $GLOBALS['URL_base'] . 'adm/manufacturers/';
$GLOBALS['IERA_LINKS'][$ii]['title'] = "Удаление производителя";
if (!$Manufacturers->DelManufacturer($manufacturer_id)) {
    die('Ошибка при удалении производителя.');
}
$tpl->Assign('msg', 'Производитель удален.');
$parsed_res = array('issuccess' => TRUE, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_manufacturerdel.tpl'));
if (TRUE == $parsed_res['issuccess']) {
    $tpl_center .= $parsed_res['html'];
}
// ---- right ----