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)); }
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; }
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']); } }
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']); } }
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); } } }
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']; }
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(); } }
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']; } }
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']); } } }
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>"; }
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(); } } }
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 = "Արմ-Շին Էներգո Կայքի Քարտեզ"; }
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']; } }
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)); }
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']); } }
protected function input() { parent::input(); $this->title .= 'Все пользователи'; $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['country']) || isset($_POST['pol'])) { //отсортированные пользователи $this->all_users = $this->ob_m->userFilter($_POST['country'], $_POST['city'], $_POST['pol'], $_POST['min'], $_POST['max']); } else { //получение всех пользователей $this->all_users = $this->ob_m->get_all_users(); } }
protected function input($param = array()) { parent::input(); // TODO: Change the autogenerated stub $this->title .= 'Премиум уроки'; $this->categories = $this->ob_model->get_categories(); //если выбрана категория выводятся соответствующие статьи, иначе все $this->artcicle_right = $this->render(TEMPLATE . 'inc/premium_article_right', array('categories' => $this->categories)); if (isset($param['category'])) { $cat = $this->clear_int($param['category']); if ($cat) { $this->articles = $this->ob_model->get_courses($cat); } } else { $this->articles = $this->ob_model->get_courses(false); } }
protected function input($param = array()) { parent::input(); if (isset($param['id'])) { $id = $this->clear_int($param['id']); if ($id) { $this->product = $this->ob_m->get_product($id); $this->title .= $this->product['product_title']; $this->keywords = $this->product['meta_k']; $this->discription = $this->product['meta_d']; $this->krohi[0]['product_title'] = $this->product['product_title']; //echo "<pre>"; //print_r($this->product); //echo "</pre>"; } } }
protected function input($param = array()) { parent::input(); // TODO: Change the autogenerated stub $this->title .= 'Регистрация'; if (isset($_POST['reg_submit'])) { $login = $this->clear_str($_POST['reg_login']); $mail = $this->clear_str($_POST['reg_mail']); $pass = $this->clear_str($_POST['reg_pass']); $pass2 = $this->clear_str($_POST['reg_pass2']); $name = $this->clear_str($_POST['reg_name']); $lastname = $this->clear_str($_POST['reg_lastname']); try { $this->ob_user->registration($login, $mail, $pass, $pass2, $name, $lastname); } catch (RegException $e) { $e->getMessage(); } } }
protected function input() { parent::input(); // TODO: Change the autogenerated stub $this->title .= 'Регистрация'; $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['reg'])) { $this->ob_m->registration(); if ($_SESSION['error']) { ?> <script> var error = "<ul id='errors'>" + '<?php echo $_SESSION['error']; ?> ' + "</ul>"; $('#for_errors').html(error); </script> <?php } else { ?> <script> var result = "<?php echo $_SESSION['reg']['res']; ?> "; var path = "<?php echo PATH; ?> "; alert(result); window.location = path; </script> <?php } unset($_SESSION['error']); } }
protected function input($param = array()) { parent::input(); // TODO: Change the autogenerated stub if (isset($param['page'])) { if ($param['page'] == 0) { $page = 1; } else { $page = (int) $param['page']; } } else { $page = 1; } $pager = new Pager($page, 'article', 1, 2); // $this->page_array = ($pager->get_navigation()); $this->title .= 'Каталог статей'; $this->recent = $this->ob_model->recent_posts(); $this->categories = $this->ob_model->get_categories(); /////////////// $this->article_right = $this->render(TEMPLATE . 'inc/article_right', array('recent' => $this->recent, 'categories' => $this->categories)); //если выбрана категория выводятся соответствующие статьи, иначе все if (isset($param['category'])) { $cat = $this->clear_int($param['category']); if ($cat) { $this->page_array = $pager->get_navigation($cat); $start = $pager->start($cat); // print_r($pager->get_article($start,$cat)); // $this->articles = $this->ob_model->get_article($cat,false); $this->articles = $pager->get_article($start, $cat); } } else { $this->page_array = $pager->get_navigation(false); $start = $pager->start(false); // print_r($pager->get_article($start)); // $this->articles = $this->ob_model->get_article(false); $this->articles = $pager->get_article($start, false); } $this->page = $this->render(TEMPLATE . 'inc/page', array('page_array' => $this->page_array)); }
public function input($param = array()) { parent::input(); if ($param['page']) { $page = $this->clear_int($param['page']); if ($page == 0) { $page = 1; } } else { $page = 1; } $this->title .= "Նորությունների արխիվ"; $this->keywords = "Արմ-Շին, Էներգո, Նորություններ"; $this->discription = "Արմ-Շին Էներգո Կայքի Նորությունների արխիվ"; $pager = new Pager($page, 'news', array(), 'news_date', 'DESC', QUANTITY, QUANTITY_LINKS); $this->archive = $pager->get_posts(); $this->navigation = $pager->get_navigation(); //echo "<pre>"; //print_r($this->archive); //print_r($this->navigation); //echo "</pre>"; //echo $page; }
protected function input($param = array()) { parent::input(); // TODO: Change the autogenerated stub // if(isset($param['page'])) { // if($param['page']==0) { // $page = 1; // } // else { // $page = (int)$param['page']; // } // // } // else { // $page = 1; // } // $pager = new Pager($page,'goods',1,2); // $this->page_array = ($pager->get_navigation()); $this->title .= 'Каталог товаров'; $this->categories = $this->ob_model->get_category_goods(); if (isset($param['category'])) { $cat = $this->clear_int($param['category']); if ($cat) { $this->goods = $this->ob_model->get_goods($cat); // $this->goods = $this->ob_model->get_goods($cat); // $this->goods = $pager->get_posts($cat); } } else { $this->goods = $this->ob_model->get_goods(); // $this->goods = $this->ob_model->get_goods(false); // $this->goods = $pager->get_posts(false); } $this->artcicle_right = $this->render(TEMPLATE . 'inc/goods_right', array('categories' => $this->categories)); // $this->page = $this->render(TEMPLATE.'inc/page',array( // 'page_array'=>$this->page_array // )); }
protected function input($param = array()) { parent::input(); // TODO: Change the autogenerated stub $this->title .= 'О нас'; }