当前位置: 首页>>代码示例>>PHP>>正文


PHP A::REQUEST方法代码示例

本文整理汇总了PHP中A::REQUEST方法的典型用法代码示例。如果您正苦于以下问题:PHP A::REQUEST方法的具体用法?PHP A::REQUEST怎么用?PHP A::REQUEST使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在A的用法示例。


在下文中一共展示了A::REQUEST方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getAddURLForm

        $form->data = A::$DB->getRowById($_POST['id'], STRUCTURE);
        $this->RESULT['html'] = $form->getContent();
    }
    function getAddURLForm()
    {
        $form = new A_Form("plugin_vars_addurl.tpl");
        $form->data['items'] = A::$DB->getAll("SELECT * FROM " . STRUCTURE . (!empty($_POST['id']) ? " WHERE id=" . (int) $_POST['id'] : ""));
        $this->RESULT['html'] = $form->getContent();
    }
    function getEditURLForm()
    {
        $form = new A_Form("plugin_vars_editurl.tpl");
        $form->data['url'] = $_POST['url'];
        $form->data['items'] = A::$DB->getAll("SELECT * FROM " . STRUCTURE . (!empty($_POST['id']) ? " WHERE id=" . (int) $_POST['id'] : ""));
        foreach ($form->data['items'] as $i => $row) {
            $data = !empty($row['data']) ? unserialize($row['data']) : array();
            $form->data['items'][$i]['value'] = isset($data[$_POST['url']]) ? $data[$_POST['url']] : "";
        }
        $this->RESULT['html'] = $form->getContent();
    }
    function setSort()
    {
        $sort = !empty($_POST['sort']) ? explode(",", $_POST['sort']) : array();
        $i = 1;
        foreach ($sort as $id) {
            A::$DB->Update(STRUCTURE, array('sort' => $i++), "id=" . (int) $id);
        }
    }
}
A::$REQUEST = new Vars_Request();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例2: switch

    {
        switch ($action) {
            case "add":
                $this->Add();
                break;
            case "edit":
                $this->Edit();
                break;
        }
    }
    /**
     * Обработчик действия: Отдает форму добавления.
     */
    function Add()
    {
        $form = new A_Form("block_html_add.tpl");
        $this->RESULT['html'] = $form->getContent();
    }
    /**
     * Обработчик действия: Отдает форму редактирования.
     */
    function Edit()
    {
        $form = new A_Form("block_html_edit.tpl");
        $block = A::$DB->getRowById($_POST['id'], DOMAIN . "_blocks");
        $form->data = !empty($block['params']) ? unserialize($block['params']) : array();
        $this->RESULT['html'] = $form->getContent();
    }
}
A::$REQUEST = new html_BlockRequest();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例3: AddLabel

        $form->data['items'] = array_values($_POST['items']);
        $form->data['categories'] = A::$DB->getAll("SELECT id,idker,name FROM " . SECTION . "_categories ORDER BY level,sort");
        if (count($form->data['categories']) > 0) {
            $this->RESULT['html'] = $form->getContent();
        } else {
            $this->RESULT['html'] = AddLabel("Нет вариантов перемещения.");
        }
    }
    /**
     * Обработчик действия: Отдает форму добавления фото.
     */
    function getAddImageForm()
    {
        $form = new A_Form("module_gallery_addimage.tpl");
        $form->data['idalb'] = (int) $_POST['idalb'];
        $this->RESULT['html'] = $form->getContent();
    }
    /**
     * Обработчик действия: Сортировка.
     */
    function setSort()
    {
        $sort = !empty($_POST['sort']) ? explode(",", $_POST['sort']) : array();
        $i = 1;
        foreach ($sort as $id) {
            A::$DB->Update(DOMAIN . "_images", array('sort' => $i++), "id=" . (int) $id);
        }
    }
}
A::$REQUEST = new GalleryModule_Request();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例4: getTreeList2

                $name = "";
                for ($i = 0; $i < $row['level']; $i++) {
                    $name .= " > ";
                }
                $values[$row['id']] = $name . $row['name'];
                $this->getTreeList1($table, $values, $row['id']);
            }
        }
        A::$DB->free();
    }
    private function getTreeList2($table, &$values, $id)
    {
        A::$DB->query("SELECT * FROM {$table} WHERE idker={$id} ORDER BY sort");
        if (A::$DB->numRows()) {
            while ($row = A::$DB->fetchRow()) {
                $childs = A::$DB->getOne("SELECT COUNT(*) FROM {$table} WHERE idker=" . $row['id']);
                if ($childs > 0) {
                    $name = "";
                    for ($i = 0; $i < $row['level']; $i++) {
                        $name .= " > ";
                    }
                    $values[$row['id']] = $name . $row['name'];
                    $this->getTreeList2($table, $values, $row['id']);
                }
            }
        }
        A::$DB->free();
    }
}
A::$REQUEST = new categories_BlockRequest();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例5: Edit

    /**
     * Обработчик действия: Отдает форму редактирования.
     */
    function Edit()
    {
        $form = new A_Form("block_shoplite_items_edit.tpl");
        $block = A::$DB->getRowById($_POST['id'], DOMAIN . "_blocks");
        $form->data = !empty($block['params']) ? unserialize($block['params']) : array();
        $form->data['sections'] = A::$DB->getAssoc("SELECT id,caption FROM " . DOMAIN . "_sections WHERE module='shoplite' ORDER BY sort");
        $section = getSectionById($form->data['idsec']);
        $form->data['categories'] = array();
        $this->getCategories($section, $form->data['categories'], 0);
        $this->RESULT['html'] = $form->getContent();
    }
    function getCategories($section, &$values, $id, $owner = "")
    {
        A::$DB->query("SELECT * FROM {$section}_categories WHERE idker={$id} ORDER BY sort");
        if (A::$DB->numRows()) {
            if (!empty($owner)) {
                $owner .= " > ";
            }
            while ($row = A::$DB->fetchRow()) {
                $values[$row['id']] = $owner . $row['name'];
                $this->getCategories($section, $values, $row['id'], $owner . $row['name']);
            }
        }
        A::$DB->free();
    }
}
A::$REQUEST = new shoplite_items_BlockRequest();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例6: empty

        $form->data['showall'] = empty($form->data['show']) && empty($form->data['showurl']);
        $show = !empty($form->data['show']) ? unserialize($form->data['show']) : array();
        $form->data['sections'] = array();
        A::$DB->query("SELECT * FROM " . DOMAIN . "_sections ORDER BY sort");
        while ($row = A::$DB->fetchRow()) {
            $form->data['sections'][] = array('id' => $row['id'], 'caption' => $row['caption'], 'checked' => in_array($row['id'], $show));
        }
        A::$DB->free();
        $this->RESULT['html'] = $form->getContent();
    }
    function setCategorySort()
    {
        $sort = !empty($_POST['sort']) ? explode(",", $_POST['sort']) : array();
        $i = 1;
        foreach ($sort as $id) {
            A::$DB->Update(STRUCTURE . "_categories", array('sort' => $i++), "id=" . (int) $id);
        }
    }
    function setBannerSort()
    {
        $rows = (int) A_Session::get(STRUCTURE . "_rows", isset($_COOKIE[STRUCTURE . '_rows']) ? $_COOKIE[STRUCTURE . '_rows'] : 10);
        $page = !empty($_POST['page']) ? (int) $_POST['page'] : 0;
        $sort = !empty($_POST['sort']) ? explode(",", $_POST['sort']) : array();
        $i = $rows * $page + 1;
        foreach ($sort as $id) {
            A::$DB->Update(STRUCTURE, array('sort' => $i++), "id=" . (int) $id);
        }
    }
}
A::$REQUEST = new Banners_Request();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例7: getAddForm

    function getAddForm()
    {
        $form = new A_Form("plugin_courier_add.tpl");
        $form->data['data'] = array_pad(array(), 6, array());
        if ($section = getSectionByModule('shoplite')) {
            $form->data['valute'] = getOption($section, 'valute');
        }
        $this->RESULT['html'] = $form->getContent();
    }
    function getEditForm()
    {
        $form = new A_Form("plugin_courier_edit.tpl");
        $form->data = A::$DB->getRowById($_POST['id'], STRUCTURE);
        $form->data['data'] = !empty($form->data['data']) ? unserialize($form->data['data']) : array();
        $form->data['data'] = array_pad($form->data['data'], 6, array());
        if ($section = getSectionByModule('shoplite')) {
            $form->data['valute'] = getOption($section, 'valute');
        }
        $this->RESULT['html'] = $form->getContent();
    }
    function setSort()
    {
        $sort = !empty($_POST['sort']) ? explode(",", $_POST['sort']) : array();
        $i = 1;
        foreach ($sort as $id) {
            A::$DB->Update(STRUCTURE, array('sort' => $i++), "id=" . (int) $id);
        }
    }
}
A::$REQUEST = new Courier_Request();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例8: saveUrl

        if ($_POST['url']) {
            $form->data = A::$DB->getRow("SELECT * FROM " . STRUCTURE . " WHERE url=?", $_POST['url']);
        }
        $form->data['url'] = $_POST['url'];
        $this->RESULT['html'] = $form->getContent();
    }
    function saveUrl()
    {
        $data = array();
        $PURL = parse_url(trim($_POST['url']));
        if ($data['url'] = urldecode($PURL['path'])) {
            $data['title'] = strip_tags(trim($_POST['title']));
            $data['keywords'] = strip_tags(trim($_POST['keywords']));
            $data['description'] = strip_tags(trim($_POST['description']));
            $MURL = parse_url(trim($_POST['move']));
            $data['move'] = !empty($MURL['host']) ? "http://" . $MURL['host'] : "";
            if (!empty($MURL['path'])) {
                $data['move'] .= urldecode($MURL['path']);
            }
            $data['notfound'] = isset($_POST['notfound']) ? 'Y' : 'N';
            if ($id = A::$DB->getOne("SELECT id FROM " . STRUCTURE . " WHERE url=?", $data['url'])) {
                A::$DB->Update(STRUCTURE, $data, "id={$id}");
            } else {
                A::$DB->Insert(STRUCTURE, $data);
            }
        }
        $this->RESULT['result'] = true;
    }
}
A::$REQUEST = new Seo_Request();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例9: foreach

        $form->data['idsec'] = A::$DB->getOne("SELECT id FROM " . DOMAIN . "_sections WHERE module='search'");
        $form->data['sections'] = A_SearchEngine::getInstance()->getSections();
        foreach ($form->data['sections'] as $idsec => $caption) {
            if (!getOption(getSectionById($idsec), 'usetags')) {
                unset($form->data['sections'][$idsec]);
            }
        }
        $this->RESULT['html'] = $form->getContent();
    }
    /**
     * Обработчик действия: Отдает форму редактирования.
     */
    function Edit()
    {
        $form = new A_Form("block_cloud_edit.tpl");
        $block = A::$DB->getRowById($_POST['id'], DOMAIN . "_blocks");
        $form->data = !empty($block['params']) ? unserialize($block['params']) : array();
        if (!isset($form->data['count'])) {
            $form->data['count'] = 50;
        }
        $form->data['sections'] = A_SearchEngine::getInstance()->getSections();
        foreach ($form->data['sections'] as $idsec => $caption) {
            if (!getOption(getSectionById($idsec), 'usetags')) {
                unset($form->data['sections'][$idsec]);
            }
        }
        $this->RESULT['html'] = $form->getContent();
    }
}
A::$REQUEST = new cloud_BlockRequest();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例10: getCategories

    /**
     * Обработчик действия: Отдает форму редактирования.
     */
    function Edit()
    {
        $form = new A_Form("block_albums_edit.tpl");
        $block = A::$DB->getRowById($_POST['id'], DOMAIN . "_blocks");
        $form->data = !empty($block['params']) ? unserialize($block['params']) : array();
        $form->data['sections'] = A::$DB->getAssoc("SELECT id,caption FROM " . DOMAIN . "_sections WHERE module='gallery' ORDER BY sort");
        $section = getSectionById($form->data['idsec']);
        $form->data['categories'] = array();
        $this->getCategories($section, $form->data['categories'], 0);
        $this->RESULT['html'] = $form->getContent();
    }
    private function getCategories($section, &$values, $id, $owner = "")
    {
        A::$DB->query("SELECT * FROM {$section}_categories WHERE idker={$id} ORDER BY sort");
        if (A::$DB->numRows()) {
            if (!empty($owner)) {
                $owner .= " > ";
            }
            while ($row = A::$DB->fetchRow()) {
                $values[$row['id']] = $owner . $row['name'];
                $this->getCategories($section, $values, $row['id'], $owner . $row['name']);
            }
        }
        A::$DB->free();
    }
}
A::$REQUEST = new albums_BlockRequest();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例11: getLists

    {
        $form = new A_Form("module_feedback_edit.tpl");
        $form->data = A::$DB->getRowById($_POST['id'], DOMAIN . "_fields");
        $form->data['vars'] = getLists();
        $form->data['name'] = $form->data['name_' . LANG];
        $form->data['full'] = is_dir('plugins');
        $this->RESULT['html'] = $form->getContent();
    }
    /**
     * Обработчик действия: Отдает форму с тестом архивного сообщения.
     */
    function getmessageform()
    {
        $form = new A_Form("module_feedback_message.tpl");
        $form->data = A::$DB->getRowById($_POST['id'], SECTION . "_arch");
        $this->RESULT['html'] = $form->getContent();
    }
    /**
     * Обработчик действия: Сортировка.
     */
    function setSort()
    {
        $sort = !empty($_POST['sort']) ? explode(",", $_POST['sort']) : array();
        $i = 1;
        foreach ($sort as $id) {
            A::$DB->Update(DOMAIN . "_fields", array('sort' => $i++), "id=" . (int) $id);
        }
    }
}
A::$REQUEST = new FeedbackModule_Request();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例12: Add

            case "add":
                $this->Add();
                break;
            case "edit":
                $this->Edit();
                break;
        }
    }
    /**
     * Обработчик действия: Отдает форму добавления.
     */
    function Add()
    {
        $form = new A_Form("block_shoplite_basket_add.tpl");
        $form->data['sections'] = A::$DB->getAssoc("SELECT id,caption FROM " . DOMAIN . "_sections WHERE module='shoplite'");
        $this->RESULT['html'] = $form->getContent();
    }
    /**
     * Обработчик действия: Отдает форму редактирования.
     */
    function Edit()
    {
        $form = new A_Form("block_shoplite_basket_edit.tpl");
        $block = A::$DB->getRowById($_POST['id'], DOMAIN . "_blocks");
        $form->data = !empty($block['params']) ? unserialize($block['params']) : array();
        $form->data['sections'] = A::$DB->getAssoc("SELECT id,caption FROM " . DOMAIN . "_sections WHERE module='shoplite'");
        $this->RESULT['html'] = $form->getContent();
    }
}
A::$REQUEST = new shoplite_basket_BlockRequest();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例13: Action

{
    /**
     * Маршрутизатор действий.
     */
    function Action($action)
    {
        switch ($action) {
            case "getindexform":
                $this->getIndexForm();
                break;
        }
    }
    /**
     * Обработчик действия: Отдает форму переиндексирования.
     */
    function getIndexForm()
    {
        $form = new A_Form("module_search_index.tpl");
        $form->data['sections'] = array();
        A::$DB->query("SELECT * FROM " . DOMAIN . "_sections WHERE lang='" . LANG . "' OR lang='all' ORDER BY sort");
        while ($row = A::$DB->fetchRow()) {
            if (function_exists($row['module'] . '_searchIndexAll')) {
                $form->data['sections'][] = $row;
            }
        }
        A::$DB->free();
        $this->RESULT['html'] = $form->getContent();
    }
}
A::$REQUEST = new SearchModule_Request();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例14: AddImageButtonLink

                $grow[4] = $row['date'];
                $grow[5] = "&nbsp;";
                $grow[6] = AddImageButtonLink("/templates/admin/images/browse.gif", $grow['link'], "Просмотр на сайте", 16, 16, ' target="_blank"');
            }
            $grow[7] = AddImageButton("/templates/admin/images/move.gif", "getmoveform({$row['id']})", "Переместить", 16, 16);
            $grow[8] = AddImageButton("/templates/admin/images/del.gif", "delitem({$row['id']},'{$row['urlname']}')", "Удалить", 16, 16);
            $grow['id'] = $row['id'];
            $grow['active'] = $row['active'];
            $form->data['pages'][] = $grow;
            $crows++;
        }
        $pager->free();
        $form->data['pager'] = $pager;
        $this->RESULT['html'] = $form->getContent();
    }
    /**
     * Обработчик действия: Сортировка.
     */
    function setSort()
    {
        $sort = !empty($_POST['sort']) ? explode(",", $_POST['sort']) : array();
        $page = !empty($_POST['page']) ? (int) $_POST['page'] : 0;
        $rows = (int) A_Session::get(SECTION . "_rows", isset($_COOKIE[SECTION . '_rows']) ? $_COOKIE[SECTION . '_rows'] : 20);
        $i = $page * $rows + 1;
        foreach ($sort as $id) {
            A::$DB->Update(SECTION, array('sort' => $i++), "id=" . (int) $id);
        }
    }
}
A::$REQUEST = new PagesModule_Request();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php

示例15: _getDirs

    function getDirs()
    {
        $dirs = array();
        $section = getSectionById($_POST['idsec']);
        $this->_getDirs($section, $dirs, 0);
        $this->RESULT['ids'] = array();
        $this->RESULT['names'] = array();
        foreach ($dirs as $id => $name) {
            $this->RESULT['ids'][] = $id;
            $this->RESULT['names'][] = $name;
        }
    }
    private function _getDirs($section, &$values, $id = 0)
    {
        A::$DB->query("SELECT * FROM {$section} WHERE idker={$id} AND type='dir' ORDER BY sort");
        while ($row = A::$DB->fetchRow()) {
            $childs = A::$DB->getOne("SELECT COUNT(*) FROM {$section} WHERE idker=" . $row['id']);
            if ($childs > 0) {
                $name = "";
                for ($i = 0; $i < $row['level']; $i++) {
                    $name .= " > ";
                }
                $values[$row['id']] = $name . $row['name'];
                $this->_getDirs($section, $values, $row['id']);
            }
        }
        A::$DB->free();
    }
}
A::$REQUEST = new pages_BlockRequest();
开发者ID:procivam,项目名称:s-mir-new,代码行数:30,代码来源:request.php


注:本文中的A::REQUEST方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。