public function executeIndex(sfWebRequest $request)
 {
     $this->menu = MenuPeer::doSelect(new Criteria());
     $this->photos_list = PhotosPeer::doSelect(new Criteria());
     $this->id = $request->getParameter('id');
     $c = new Criteria();
     $c->add(PhotosPeer::ID, $this->id);
     $this->item = PhotosPeer::doSelect($c);
     $this->item = $this->item[0];
     unset($c);
     $part_id = $this->item->getPartId();
     $c2 = new Criteria();
     $c2->add(PartsPeer::IS_ACTIVE, 1);
     $c2->add(PartsPeer::ID, $part_id);
     $this->part = PartsPeer::doSelect($c2);
     unset($c2);
     $this->partName = $this->part[0]->getName();
     $c0 = new Criteria();
     $c0->add(PartsPeer::IS_ACTIVE, 1);
     $this->parts = PartsPeer::doSelect($c0);
     unset($c0);
     $c1 = new Criteria();
     $c1->add(PartsPeer::ID, $this->item->getPartId());
     $this->part = PartsPeer::doSelect($c1);
     $this->part = $this->part[0];
     unset($c1);
     $response = $this->getResponse();
     $response->setTitle("Фото постеры. Купить фото постер. Каталог. " . $this->partName . ". " . $this->item->getName());
     $response->addMeta("robots", "Фото постеры. Купить фото постер. Каталог. " . $this->partName . ". " . $this->item->getName());
     $response->addMeta("keywords", "Фото постеры. Купить фото постер. Каталог. " . $this->partName . ". " . $this->item->getName());
 }
 public function executeIndex(sfWebRequest $request)
 {
     $response = $this->getResponse();
     $response->setTitle('Коллекция авторских фото постеров. Контакты');
     $response->addMeta('robots', 'Коллекция авторских фото постеров. Контакты');
     $response->addMeta('keywords', 'Коллекция авторских фото постеров. Контакты');
     $this->menu = MenuPeer::doSelect(new Criteria());
     $c = new Criteria();
     $c->add(PartsPeer::IS_ACTIVE, 1);
     $this->parts = PartsPeer::doSelect($c);
 }
 public function executeNew(sfWebRequest $request)
 {
     $this->menu = MenuPeer::doSelect(new Criteria());
     $c = new Criteria();
     $c->add(PartsPeer::IS_ACTIVE, 1);
     $this->parts = PartsPeer::doSelect($c);
     unset($c);
     $id = $request->getParameter('id');
     $c0 = new Criteria();
     $c0->add(ArticlesPeer::IS_ACTIVE, 1);
     $c0->add(ArticlesPeer::ID, $id);
     $this->new = ArticlesPeer::doSelect($c0);
     $this->new = $this->new[0];
     unset($c0);
 }
 public function executeIndex(sfWebRequest $request)
 {
     $this->menu = MenuPeer::doSelect(new Criteria());
     $c0 = new Criteria();
     $c0->add(PartsPeer::IS_ACTIVE, 1);
     $this->parts = PartsPeer::doSelect($c0);
     unset($c0);
     $params = $request->getpathInfoArray();
     $url = $params["REQUEST_URI"];
     $url = str_replace("/", "", $url);
     $c = new Criteria();
     $c->add(PagesPeer::IS_ACTIVE, 1);
     $c->add(PagesPeer::URL, $url);
     $this->item = PagesPeer::doSelect($c);
     $this->item = $this->item[0];
     unset($c);
 }
 public function executeIndex(sfWebRequest $request)
 {
     $response = $this->getResponse();
     $response->setTitle('Фото постеры. Купить фото постер. Главная');
     $response->addMeta('robots', 'Фото постеры. Купить фото постер. Главная');
     $response->addMeta('keywords', 'Фото постеры. Купить фото постер. Главная');
     $this->menu = MenuPeer::doSelect(new Criteria());
     $c = new Criteria();
     $c->add(PartsPeer::IS_ACTIVE, 1);
     $this->parts = PartsPeer::doSelect($c);
     unset($c);
     $c1 = new Criteria();
     $c1->add(ConfigPeer::PARAM, maintext);
     $text = ConfigPeer::doSelect($c1);
     $this->text = $text[0]->getValue();
     unset($c1);
 }
 /**
  * Gets an array of Parts objects which contain a foreign key that references this object.
  *
  * If this collection has already been initialized with an identical Criteria, it returns the collection.
  * Otherwise if this Meta has previously been saved, it will retrieve
  * related Partss from storage. If this Meta is new, it will return
  * an empty collection or the current collection, the criteria is ignored on a new object.
  *
  * @param      PropelPDO $con
  * @param      Criteria $criteria
  * @return     array Parts[]
  * @throws     PropelException
  */
 public function getPartss($criteria = null, PropelPDO $con = null)
 {
     if ($criteria === null) {
         $criteria = new Criteria(MetaPeer::DATABASE_NAME);
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collPartss === null) {
         if ($this->isNew()) {
             $this->collPartss = array();
         } else {
             $criteria->add(PartsPeer::META_ID, $this->id);
             PartsPeer::addSelectColumns($criteria);
             $this->collPartss = PartsPeer::doSelect($criteria, $con);
         }
     } else {
         // criteria has no effect for a new object
         if (!$this->isNew()) {
             // the following code is to determine if a new query is
             // called for.  If the criteria is the same as the last
             // one, just return the collection.
             $criteria->add(PartsPeer::META_ID, $this->id);
             PartsPeer::addSelectColumns($criteria);
             if (!isset($this->lastPartsCriteria) || !$this->lastPartsCriteria->equals($criteria)) {
                 $this->collPartss = PartsPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastPartsCriteria = $criteria;
     return $this->collPartss;
 }
 public function executeParts(sfWebRequest $request)
 {
     $response = $this->getResponse();
     $response->setTitle('Фото постеры. Купить фото постер. Каталог');
     $response->addMeta('robots', 'Фото постеры. Купить фото постер. Каталог');
     $response->addMeta('keywords', 'Фото постеры. Купить фото постер. Каталог');
     $part_id = $request->getParameter('id');
     $this->p = $part_id;
     $this->menu = MenuPeer::doSelect(new Criteria());
     $c = new Criteria();
     $c->add(PartsPeer::IS_ACTIVE, 1);
     $this->parts = PartsPeer::doSelect($c);
     $c1 = new Criteria();
     $this->items = PhotosPeer::doSelect($c1);
     if ($part_id) {
         $c1 = new Criteria();
         $c1->add(PhotosPeer::PART_ID, $part_id);
         $pager = new sfPropelPager('Photos', 5);
         $pager->setCriteria($c1);
         $pager->setPage($this->getRequestParameter('page', 1));
         $pager->init();
         $this->pager = $pager;
         $c2 = new Criteria();
         $c2->add(PartsPeer::ID, $part_id);
         $this->part = PartsPeer::doSelect($c2);
     }
 }
 public function executeOrder(sfWebRequest $request)
 {
     $c = new Criteria();
     $c->add(PartsPeer::IS_ACTIVE, 1);
     $this->parts = PartsPeer::doSelect($c);
     $this->menu = MenuPeer::doSelect(new Criteria());
     if ($this->getRequest()->getMethod() === sfRequest::POST) {
         $this->param0 = $this->getRequestParameter('param0');
         $this->param1 = $this->getRequestParameter('param1');
         $this->param2 = $this->getRequestParameter('param2');
         $this->param3 = $this->getRequestParameter('param3');
         $this->param4 = $this->getRequestParameter('param4');
         $this->param5 = $this->getRequestParameter('param5');
         $this->param6 = $this->getRequestParameter('param6');
         $this->param7 = $this->getRequestParameter('param7');
         $this->param8 = $this->getRequestParameter('param8');
         $this->param9 = $this->getRequestParameter('param9');
         $this->param10 = $this->getRequestParameter('param10');
         $this->param11 = $this->getRequestParameter('param11');
         $this->param12 = $this->getRequestParameter('param12');
         $this->message = "";
         if (!$this->param1) {
             $this->message = "Вы не заполнили поле Фамилия.";
         }
         if (!$this->param2) {
             $this->message = "Вы не заполнили поле Имя.";
         }
         if (!$this->param3) {
             $this->message = "Вы не заполнили поле Отчество.";
         }
         if (!$this->param4) {
             $this->message = "Вы не заполнили поле Индекс.";
         }
         if (!$this->param6) {
             $this->message = "Вы не заполнили поле Область.";
         }
         if (!$this->param7) {
             $this->message = "Вы не заполнили поле Город.";
         }
         if (!$this->param8) {
             $this->message = "Вы не заполнили поле Улица.";
         }
         if (!$this->param9) {
             $this->message = "Вы не заполнили поле Дом.";
         }
         if (!$this->param11) {
             $this->message = "Вы не заполнили поле Квартира.";
         }
         if (!$this->param12) {
             $this->message = "Вы не заполнили поле Контактный телефон.";
         }
         if ($this->message == "") {
             $subject = "Заказ с сайта P-POSTER.COM";
             $message = "Фамилия: " . $this->param1 . "\nИмя: " . $this->param2 . "\nОтчество: " . $this->param3 . "\nИндекс: " . $this->param4 . "\nСтрана: " . $this->param5 . "\nОбласть: " . $this->param6 . "\nГород: " . $this->param7 . "\nУлица: " . $this->param8 . "\nДом: " . $this->param9 . "\nКорпус: " . $this->param10 . "\nКвартира: " . $this->param11 . "\nТелефон: " . $this->param12 . "\nЗаказ (Список ID по БД): " . $this->param0;
             $headers = "MIME-Version: 1.0\r\n";
             $headers .= "Content-Type: text/plain; charset=utf-8\r\n";
             $headers .= "Content-Transfer-Encoding: 8bit\r\n";
             $headers .= "From: info@p-poster.com{$SERVER_NAME}\r\n" . "Reply-To: info@p-poster.com\r\n" . "X-Mailer: PHP/";
             mail("*****@*****.**", $subject, $message, $headers . phpversion());
             $this->redirect('/cart/orderok');
         }
     }
 }
 /**
  * Retrieve multiple objects by pkey.
  *
  * @param      array $pks List of primary keys
  * @param      PropelPDO $con the connection to use
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function retrieveByPKs($pks, PropelPDO $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(PartsPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(PartsPeer::DATABASE_NAME);
         $criteria->add(PartsPeer::ID, $pks, Criteria::IN);
         $objs = PartsPeer::doSelect($criteria, $con);
     }
     return $objs;
 }