Exemplo n.º 1
0
        $mod = cms_model_banners::getBanner($item_id);
        if (!$mod) {
            cmsCore::error404();
        }
        echo '<h3>' . $mod['title'] . ' ' . $ostatok . '</h3>';
        cpAddPathway($mod['title']);
    }
    ?>
    <?php 
    if ($opt == 'edit') {
        ?>
        <table width="625" border="0" cellspacing="5" class="proptable">
              <tr>
                <td align="center">
                    <?php 
        echo cms_model_banners::getBannerById($item_id);
        ?>
                </td>
             </tr>
        </table>
    <?php 
    }
    ?>

    <form action="index.php?view=components&amp;do=config&amp;id=<?php 
    echo $id;
    ?>
" method="post" enctype="multipart/form-data" name="addform" id="addform">
    <input type="hidden" name="csrf_token" value="<?php 
    echo cmsUser::getCsrfToken();
    ?>
Exemplo n.º 2
0
        if (isset($_REQUEST['multiple'])) {
            if (isset($_REQUEST['item'])) {
                $_SESSION['editlist'] = cmsCore::request('item', 'array_int', array());
            } else {
                cmsCore::addSessionMessage($_LANG['AD_NO_SELECT_OBJECTS'], 'error');
                cmsCore::redirectBack();
            }
        }
        $ostatok = '';
        if (isset($_SESSION['editlist'])) {
            $item_id = array_shift($_SESSION['editlist']);
            if (sizeof($_SESSION['editlist']) == 0) {
                unset($_SESSION['editlist']);
            } else {
                $ostatok = '(' . $_LANG['AD_NEXT_IN'] . sizeof($_SESSION['editlist']) . ')';
            }
        } else {
            $item_id = cmsCore::request('item_id', 'int', 0);
        }
        $mod = cms_model_banners::getBanner($item_id);
        if (!$mod) {
            cmsCore::error404();
        }
        cpAddPathway($mod['title']);
    }
    $tpl = cmsCore::c('page')->initTemplate('components', 'banners_add')->assign('id', $id)->assign('opt', $opt)->assign('mod', $mod);
    if ($opt == 'edit') {
        $tpl->assign('banner_html', cms_model_banners::getBannerById($item_id));
    }
    $tpl->display();
}