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


PHP Base::input方法代码示例

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


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

示例1: input

 protected function input($param = array())
 {
     parent::input();
     // TODO: Change the autogenerated stub
     $this->title .= 'Каталог статей';
     $this->recent = $this->ob_model->recent_posts();
     $this->categories = $this->ob_model->get_categories();
     //если выбрана категория выводятся соответствующие статьи, иначе все
     if (isset($param['num'])) {
         $article = $this->clear_int($param['num']);
         if ($article) {
             $this->article = $this->ob_model->get_article(false, $article);
             $this->get_comment = $this->ob_user->get_comments($article);
             if (isset($_POST['send_comment'])) {
                 $text = $this->clear_str($_POST['text_comment']);
                 $this->ob_user->insert_comment($article, $this->i_user[0]['id_user'], $text);
                 $this->redirect();
             }
             if (isset($_POST['reply_submit'])) {
                 $info = explode('/', $_POST['info']);
                 $text = $this->clear_str($_POST['reply_text']);
                 $this->ob_user->reply($info[1], $article, $this->i_user[0]['id_user'], $text, $info[3]);
                 $this->redirect();
             }
         }
     }
     $this->artcicle_right = $this->render(TEMPLATE . 'inc/article_right', array('recent' => $this->recent, 'categories' => $this->categories));
     $this->comments = $this->render(TEMPLATE . 'inc/comment', array('get_comment' => $this->get_comment));
 }
开发者ID:AlexKFU,项目名称:massage,代码行数:29,代码来源:Article_Controller.php

示例2: input

 protected function input($param = array())
 {
     parent::input();
     if (isset($param['page'])) {
         $page = $this->clear_int($param['page']);
         if ($page == 0) {
             $page = 1;
         }
     } else {
         $page = 1;
     }
     if (isset($param['str'])) {
         $this->str = rawurldecode($this->clear_str($param['str']));
     } elseif ($this->is_post()) {
         $this->str = $this->clear_str($_POST['txt1']);
     }
     $this->title .= "Որոնման արդյունքները - " . $this->str;
     $this->keywords .= "Որոնում, Արմ-Շին Էներգո";
     $this->discription .= "Որոնման արդյունքները - " . $this->str;
     $pager = new Pager($page, 'products', array('public' => 1), 'product_id', 'ASC', QUANTITY, QUANTITY_LINKS, array("="), array('product_title,product_content' => $this->str));
     if (is_object($pager)) {
         $this->navigation = $pager->get_navigation();
         $this->search = $pager->get_posts();
         $this->str = rawurlencode($this->str);
     }
     //print_r($this->search);
     $this->need_right_side = FALSE;
 }
开发者ID:romanmilov,项目名称:corp-project,代码行数:28,代码来源:Search_Controller.php

示例3: input

    protected function input()
    {
        parent::input();
        // TODO: Change the autogenerated stub
        $this->title .= 'Редактирование профиля';
        $this->profile = $this->ob_m->profile($_COOKIE['id_user']);
        $this->country = $this->ob_m->get_all_country();
        if (isset($_POST['proof_city'])) {
            $this->city = $this->ob_m->get_city($_POST['id_country']);
        }
        if (isset($_POST['start'])) {
            $this->city = $this->ob_m->get_city($_POST['id_country']);
        }
        if (isset($_POST['submit'])) {
            $this->ob_m->updateProfile($_COOKIE['id_user'], $_POST['want']);
            if ($_SESSION['update']['error']) {
                ?>
                <script>
                    var error = '<?php 
                echo $_SESSION['update']['error'];
                ?>
';
                    alert(error);
                </script>
                <?php 
            } else {
                $this->ob_m->redirect();
            }
            unset($_SESSION['update']['error'], $_SESSION['avatar']);
        }
    }
开发者ID:AlexKFU,项目名称:TieMoreAh-OOP,代码行数:31,代码来源:Update_Controller.php

示例4: input

 protected function input($params)
 {
     parent::input();
     $this->title .= 'Пользователь';
     $this->params = $params;
     if (isset($params['id'])) {
         $id = $this->clear_int($params['id']);
     }
     if ($id) {
         $this->profile = $this->ob_m->profile($params['id']);
     }
     if (isset($_COOKIE['id_user'])) {
         $this->ban = $this->ob_m->banned($params['id'], $_COOKIE['id_user']);
         $this->iban = $this->ob_m->banned($_COOKIE['id_user'], $params['id']);
         $this->myprofile = $this->ob_m->profile($_COOKIE['id_user']);
         if (isset($_POST['ban'])) {
             $this->ob_m->inban($_COOKIE['id_user'], $params['id']);
             $this->ob_m->redirect();
         }
         if (isset($_POST['unban'])) {
             $this->ob_m->unban($_COOKIE['id_user'], $params['id']);
             $this->ob_m->redirect();
         }
         if (isset($_POST['send_msg'])) {
             $this->ob_m->insertMsg($_COOKIE['id_user'], $params['id'], $_POST['message']);
         }
         $this->msg = $this->ob_m->msg($_COOKIE['id_user'], $params['id']);
         if (isset($_POST['message_proof'])) {
             $this->msg = $this->ob_m->msg($_COOKIE['id_user'], $params['id']);
         }
     }
     if (isset($this->profile[0]['want'])) {
         $this->want = $this->ob_m->want($this->profile[0]['want']);
     }
 }
开发者ID:AlexKFU,项目名称:TieMoreAh-OOP,代码行数:35,代码来源:Profile_Controller.php

示例5: input

 protected function input($param = array())
 {
     parent::input();
     // TODO: Change the autogenerated stub
     $this->title .= 'Просмотр товара';
     $this->categories = $this->ob_model->get_category_goods();
     if (isset($param['id'])) {
         $id = $this->clear_int($param['id']);
         if ($id) {
             $this->goods = $this->ob_model->get_goods(false, $id);
         }
     }
     $this->artcicle_right = $this->render(TEMPLATE . 'inc/goods_right', array('categories' => $this->categories));
     if (isset($_POST['submit_request'])) {
         $tel = $this->clear_str($_POST['request_tel']);
         $link = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
         if (!isset($_COOKIE['NOU'])) {
             $mail = $this->clear_str($_POST['request_mail']);
             $this->ob_user->send_mail($mail, "Заказ товара MassagePractice", $tel, $this->goods[0]['goods_name'], $link);
         } else {
             $mail = $this->i_user[0]['email'];
             $this->ob_user->send_mail($mail, "Заказ товара MassagePractice", $tel, $this->goods[0]['goods_name'], $link);
         }
     }
 }
开发者ID:AlexKFU,项目名称:massage,代码行数:25,代码来源:Goods_Controller.php

示例6: input

 protected function input($param = array())
 {
     parent::input();
     $this->title .= "Հետադարձ կապ";
     $this->contacts = $this->ob_m->get_contacts();
     $this->keywords = $this->contacts['meta_k'];
     $this->keywords = $this->contacts['meta_d'];
 }
开发者ID:romanmilov,项目名称:corp-project,代码行数:8,代码来源:Contacts_Controller.php

示例7: input

 protected function input($param = array())
 {
     parent::input();
     $this->title .= "Ապրանքների կատալոգ";
     $this->need_right_side = FALSE;
     if (isset($param['brand'])) {
         $this->type = "brand";
         $this->id = $this->clear_int($param['brand']);
     } elseif (isset($param['type'])) {
         $this->type = "type";
         $this->id = $this->clear_int($param['type']);
     } elseif (isset($param['parent'])) {
         $this->parent = TRUE;
         $this->id = $this->clear_int($param['parent']);
     }
     if (isset($param['page'])) {
         $page = $this->clear_int($param['page']);
         if ($page == 0) {
             $page = 1;
         }
     } else {
         $page = 1;
     }
     if ($this->type) {
         if (!$this->id) {
             return;
         }
         $pager = new Pager($page, 'products', array($this->type . '_id' => $this->id, 'public' => 1), 'product_id', 'ASC', QUANTITY, QUANTITY_LINKS);
         $this->krohi = $this->ob_m->get_krohi($this->type, $this->id);
         $this->keywords = $this->krohi[0][$this->type . '_name'] . ',' . $this->krohi[1]['brand_name'];
         $this->discription = $this->krohi[0][$this->type . '_name'] . ',' . $this->krohi[1]['brand_name'];
     } elseif ($this->parent) {
         if (!$this->id) {
             return;
         }
         $ids = $this->ob_m->get_child($this->id);
         if (!$ids) {
             return;
         }
         $pager = new Pager($page, 'products', array('brand_id' => $ids, 'public' => 1), 'product_id', 'ASC', QUANTITY, QUANTITY_LINKS, array("IN", "="));
         $this->type = "parent";
         $this->krohi = $this->ob_m->get_krohi('brand', $this->id);
         $this->keywords = $this->krohi[0]['brand_name'];
         $this->discription = $this->krohi[0]['brand_name'];
     } elseif (!$this->type && !$this->parent) {
         $pager = new Pager($page, 'products', array('public' => 1), 'product_id', 'ASC', QUANTITY, QUANTITY_LINKS);
         $this->krohi[0]['brand_name'] = "Ապրանքների կատալոգ";
         $this->keywords = "Արմ-Շին, Ապրանքների կատալոգ";
         $this->discription = "Արմ-Շին, Ապրանքների կատալոգ";
     }
     if (is_object($pager)) {
         $this->navigation = $pager->get_navigation();
         $this->catalog = $pager->get_posts();
     }
 }
开发者ID:romanmilov,项目名称:corp-project,代码行数:55,代码来源:Catalog_Controller.php

示例8: input

 protected function input($param)
 {
     parent::input();
     if (isset($param['page_id'])) {
         $page_id = $this->clear_int($param['page_id']);
         $this->page = $this->ob_m->get_page($page_id);
         $this->title .= $this->page['page_title'];
         $this->keywords = $this->page['meta_k'];
         $this->discription = $this->page['meta_d'];
     }
 }
开发者ID:romanmilov,项目名称:corp-project,代码行数:11,代码来源:Page_Controller.php

示例9: input

 protected function input()
 {
     parent::input();
     // TODO: Change the autogenerated stub
     if (isset($_COOKIE['id_user'])) {
         $this->profile = $this->ob_m->profile($_COOKIE['id_user']);
         if (isset($this->profile[0]['want'])) {
             $this->want = $this->ob_m->want($this->profile[0]['want']);
         }
     }
 }
开发者ID:AlexKFU,项目名称:TieMoreAh-OOP,代码行数:11,代码来源:Myprofile_Controller.php

示例10: input

 protected function input()
 {
     parent::input();
     $this->title .= "Գլխավոր";
     $this->text = $this->ob_m->get_home_page();
     $this->keywords = $this->text['meta_k'];
     $this->discription = $this->text['meta_d'];
     //Գլխավոր էջի տեքստի թեստավորում
     //echo "<pre>";
     //print_r($this->text);
     //echo "</pre>";
 }
开发者ID:romanmilov,项目名称:corp-project,代码行数:12,代码来源:Index_Controller.php

示例11: input

 protected function input($param = array())
 {
     parent::input();
     // TODO: Change the autogenerated stub
     $this->title .= 'Главная страница';
     if (isset($param['logout'])) {
         $logout = $this->clear_int($param['logout']);
         if ($logout) {
             $this->ob_user->logout();
         }
     }
 }
开发者ID:AlexKFU,项目名称:massage,代码行数:12,代码来源:Index_Controller.php

示例12: input

 protected function input()
 {
     parent::input();
     $this->title .= "Կայքի Քարտեզ";
     $this->pages = $this->ob_m->get_pages();
     $this->catalog = $this->ob_m->get_catalog_brands();
     //echo "<pre>";
     //print_r($this->pages);
     //print_r($this->catalog);
     //echo "</pre>";
     $this->keywords = "Կայքի Քարտեզ";
     $this->discription = "Արմ-Շին Էներգո Կայքի Քարտեզ";
 }
开发者ID:romanmilov,项目名称:corp-project,代码行数:13,代码来源:Map_Controller.php

示例13: input

 protected function input($params)
 {
     parent::input();
     $this->title .= "Նորություններ";
     if (isset($params['news_id'])) {
         $news_id = $this->clear_int($params['news_id']);
     }
     if ($news_id) {
         $this->news_text = $this->ob_m->get_news_text($news_id);
         $this->keywords = $this->news_text['meta_k'];
         $this->discription = $this->news_text['meta_d'];
     }
 }
开发者ID:romanmilov,项目名称:corp-project,代码行数:13,代码来源:News_Controller.php

示例14: input

 protected function input($param = array())
 {
     parent::input();
     // TODO: Change the autogenerated stub
     $this->title .= 'Премиум уроки';
     //если выбрана категория выводятся соответствующие статьи, иначе все
     if (isset($param['course'])) {
         $cat = $this->clear_int($param['course']);
         if ($cat) {
             $this->article = $this->ob_model->get_courses(false, $cat);
             $this->lessons = $this->ob_model->get_lessons($cat);
         }
     }
     $this->artcicle_right = $this->render(TEMPLATE . 'inc/cat_prem_right', array('lessons' => $this->lessons, 'i_user' => $this->i_user));
 }
开发者ID:AlexKFU,项目名称:massage,代码行数:15,代码来源:Catalogpremium_Controller.php

示例15: input

 protected function input()
 {
     parent::input();
     // TODO: Change the autogenerated stub
     $this->title .= ' Главная страница';
     $this->all_country = $this->ob_m->get_all_country();
     ///поиск по странам
     if (isset($_POST['text'])) {
         $this->country = $this->ob_m->get_one_country($_POST['text']);
         echo $this->country['0']['acronym'];
     }
     //клик по странам
     if (isset($_POST['map_proof'])) {
         $this->map = $this->ob_m->map($_POST['acronym']);
     }
 }
开发者ID:AlexKFU,项目名称:TieMoreAh-OOP,代码行数:16,代码来源:Index_Controller.php


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