Пример #1
0
<? php ?>
<div class="row">
    <div class="col-md-4"></div>
    <div class="col-md-4">
        <h1>Регистрация</h1>
        <?php 
$arParams = array("template" => "form/MainFormChunk.php");
$authForm = new MainForm();
$authForm->addField(new Field("full_name", "Ваше ФИО", "text"));
$authForm->addField(new Field("login", "Ваш логин", "text", null, "text"));
$authForm->addField(new Field("email", "Ваш email", "text", null, "email"));
$authForm->addField(new Field("pass", "Ваш пароль", "password", null, "not_empty"));
$authForm->addField(new Field("confirm_pass", "Подтвердите пароль", "password", null, "confirm_pass", "pass"));
$authForm->addButton(new Field("send", "Зарегистрироваться", "submit"));
$authControl = new RegisterFormController($arParams, $authForm);
?>
    </div>
    <div class="col-md-4"></div>
</div>
Пример #2
0
$authForm->addField(new Field("login", "Ваш логин", "text", $_USER->getProperty("login"), "text"));
$authForm->addField(new Field("email", "Ваш email", "text", $_USER->getProperty("email"), "email"));
$authForm->addField(new Field("pass", "Ваш пароль", "password", null, "not_empty"));
$authForm->addField(new Field("confirm_pass", "Подтвердите пароль", "password", null, "confirm_pass", "pass"));
$authForm->addField(new Field("id", "", "hidden", $_USER->getProperty("id")));
$authForm->addButton(new Field("send", "Обновить", "button"));
$authControl = new UpdateFormController($arParams, $authForm);
?>
                </div>
            </div>
            <div id="panel2" class="tab-pane fade">
                <div style="margin-top:10px">
                    <?php 
$rss_controller = new RssController($_USER->getProperty("id"), "rss/RssUserChunk.php");
if ($rss_controller) {
    $rss_controller->PrintRssList();
}
$arParams = array("template" => "form/MainFormChunk.php");
$authForm = new MainForm("rss_add");
$authForm->addField(new Field("rss_url", "URL ленты", "text", null, "not_empty"));
$authForm->addField(new Field("id", "", "hidden", $_USER->getProperty("id")));
$authForm->addButton(new Field("add", "Добавить", "button"));
$authControl = new RssFormController($arParams, $authForm);
?>
                </div>
            </div>
        </div>
    </div>
</div>

Пример #3
0
<?php

global $_USER;
if (!$_USER) {
    ?>
    <div class="row">
        <div class="col-md-4"></div>
        <div class="col-md-4">
            <h1>Авторизация</h1>
            <?php 
    $arParams = array("template" => "form/MainFormChunk.php");
    $authForm = new MainForm();
    $authForm->addField(new Field("login", "Ваш логин", "text", null, "not_empty"));
    $authForm->addField(new Field("pass", "Ваш пароль", "password", null, "not_empty"));
    $authForm->addButton(new Field("send", "Отправить", "submit", null));
    $authControl = new AuthFormController($arParams, $authForm, "/");
    ?>
        </div>
        <div class="col-md-4"></div>
    </div>
<?php 
} else {
    ?>
<div class="row">
    <div class="col-md-12">
        <h1>Мои RSS-ленты
            <small><a class="refresh" onclick="RefreshRss();return false;" href="#"><i
                        class="glyphicon glyphicon-refresh"></i></a></small>
        </h1>
    </div>
</div>
Пример #4
0
<?php

require dirname(__FILE__) . '/../../includes/prepend.inc.php';
QApplication::Authenticate();
class MainForm extends ChmsForm
{
    protected $strPageTitle = 'Main Menu';
    protected $intNavSectionId = null;
    protected function Form_Create()
    {
    }
}
MainForm::Run('MainForm');