コード例 #1
0
ファイル: backend.php プロジェクト: ratmir-by/icms-calendar
    if (!isset($_SESSION['editlist']) || @sizeof($_SESSION['editlist']) == 0) {
        $inCore->redirect('?view=components&do=config&id=' . $_REQUEST['id'] . '&opt=list_photos');
    } else {
        $inCore->redirect('?view=components&do=config&id=' . $_REQUEST['id'] . '&opt=edit_photo');
    }
}
//=================================================================================================//
//=================================================================================================//
if ($opt == 'delete_photo') {
    if (!isset($_REQUEST['item'])) {
        $id = (int) $_REQUEST['item_id'];
        if ($id >= 0) {
            $model->deletePhoto($id);
        }
    } else {
        $model->deletePhotos($_REQUEST['item']);
    }
    $inCore->redirect('?view=components&do=config&id=' . $_REQUEST['id'] . '&opt=list_photos');
}
//=================================================================================================//
//=================================================================================================//
if ($opt == 'config') {
    cpAddPathway('Настройки', '?view=components&do=config&id=' . $_REQUEST['id'] . '&opt=config');
    if (@$msg) {
        echo '<p class="success">' . $msg . '</p>';
    }
    if (!isset($cfg['showlat'])) {
        $cfg['showlat'] = 1;
    }
    if (!isset($cfg['orderto'])) {
        $cfg['orderto'] = 'title';