Esempio n. 1
0
 /**
  * Получение значений
  */
 protected function getAllValue()
 {
     parent::getAllValue();
     $this->insertValue['alias'] = parent::getPostValue('alias');
     $this->insertValue['created'] = parent::getPostValue('created');
     $this->insertValue['lastChange'] = parent::getPostValue('lastChange');
     $this->insertValue['showTitle'] = parent::getPostValue('showTitle');
     $this->insertValue['showCreated'] = parent::getPostValue('showCreated');
     $this->insertValue['showChange'] = parent::getPostValue('showChange');
     $this->insertValue['imageOld'] = parent::getPostValue('imageOld');
     if (isset($_POST['title']) && $_POST['title'] != null && $_POST['title'] != "") {
         foreach ($_POST['title'] as $key => $value) {
             $this->insertValue['title'][$key] = parent::getMysqlText($value);
         }
     }
     if (isset($_POST['text']) && $_POST['text'] != null && $_POST['text'] != "") {
         foreach ($_POST['text'] as $key => $value) {
             $this->insertValue['text'][$key] = parent::getMysqlText($value);
         }
     }
     if (isset($_POST['categories']) && $_POST['categories'] != null && $_POST['categories'] != "") {
         $this->insertValue['categories'] = $_POST['categories'];
     } else {
         $this->insertValue['categories'] = array();
     }
 }
 protected function getAllValue()
 {
     parent::getAllValue();
     $this->insertValue['alias'] = parent::getPostValue('worker');
     $this->insertValue['email1'] = parent::getPostValue('email1');
     $this->insertValue['email2'] = parent::getPostValue('email2');
     $this->insertValue['phone1'] = parent::getPostValue('phone1');
     $this->insertValue['phone2'] = parent::getPostValue('phone2');
     $this->insertValue['phoneText1'] = parent::getPostValue('phoneText1');
     $this->insertValue['phoneText2'] = parent::getPostValue('phoneText2');
     $this->insertValue['additional1'] = parent::getPostValue('additional1');
     $this->insertValue['additional2'] = parent::getPostValue('additional2');
     if (isset($_POST['fio']) && $_POST['fio'] != null && $_POST['fio'] != "") {
         foreach ($_POST['fio'] as $key => $value) {
             $this->insertValue['fio'][$key] = parent::getMysqlText($value);
         }
     }
     if (isset($_POST['info']) && $_POST['info'] != null && $_POST['info'] != "") {
         foreach ($_POST['info'] as $key => $value) {
             $this->insertValue['info'][$key] = parent::getMysqlText($value);
         }
     }
     $this->insertValue['post'] = parent::getPostValue('post');
     if (isset($_POST['units']) && $_POST['units'] != null && $_POST['units'] != "") {
         $this->insertValue['units'] = $_POST['units'];
     } else {
         $this->insertValue['units'] = array();
     }
 }
 /**
  * Получение значений
  */
 protected function getAllValue()
 {
     parent::getAllValue();
     $this->insertValue['alias'] = parent::getPostValue('alias');
     $this->insertValue['showFullMaterialsText'] = parent::getPostValue('showFullMaterialsText');
     $this->insertValue['showShortMaterialsText'] = parent::getPostValue('showShortMaterialsText');
     $this->insertValue['showCategories'] = parent::getPostValue('showCategories');
     $this->insertValue['showCreated'] = parent::getPostValue('showCreated');
     $this->insertValue['showChange'] = parent::getPostValue('showChange');
     $this->insertValue['categorialsAsURL'] = parent::getPostValue('categorialsAsURL');
     $this->insertValue['titleAsURL'] = parent::getPostValue('titleAsURL');
     $this->insertValue['showAllOnPage'] = parent::getPostValue('showAllOnPage');
     $this->insertValue['onPage'] = parent::getPostValue('onPage');
     $this->insertValue['maxPages'] = parent::getPostValue('maxPages');
     $this->insertValue['categories'] = parent::getOriginalPostValue('categories');
     if (isset($_POST['name']) && $_POST['name'] != null && $_POST['name'] != "") {
         foreach ($_POST['name'] as $key => $value) {
             $this->insertValue['name'][$key] = parent::getMysqlText($value);
         }
     }
     if (isset($_POST['description']) && $_POST['description'] != null && $_POST['description'] != "") {
         foreach ($_POST['description'] as $key => $value) {
             $this->insertValue['description'][$key] = parent::getMysqlText($value);
         }
     }
     if (isset($_POST['categories']) && $_POST['categories'] != null && $_POST['categories'] != "") {
         foreach ($_POST['categories'] as $category => $sequence) {
             if ($sequence != null && $sequence != '') {
                 $key = parent::getMysqlText($category);
                 $this->insertValue['categories'][$key] = parent::getMysqlText($sequence);
             }
         }
     }
 }
 protected function getAllValue()
 {
     parent::getAllValue();
     $this->insertValue['alias'] = parent::getPostValue('post');
     $this->insertValue['sequence'] = parent::getPostValue('sequence');
     //lang
     if (isset($_POST['postName']) && $_POST['postName'] != null && $_POST['postName'] != "") {
         foreach ($_POST['postName'] as $key => $value) {
             $this->insertValue['postName'][$key] = parent::getMysqlText($value);
         }
     }
 }
Esempio n. 5
0
 protected function checkAllValue()
 {
     parent::checkAllValue();
     $error = false;
     if (!$this->checkValue('ip', "/^[0-9]{1,3}+[\\.]+[0-9]{1,3}+[\\.]+[0-9]{1,3}+[\\.][0-9]{1,3}\$/")) {
         $error = true;
         $this->checkAllValueErrors[] = "Разрешено четыре группы цифр, разделённых точкой. Группа цифр может включать от одной до трёх цифр в диапазоне от 0 до 9.";
     }
     if (!$this->checkAlias()) {
         $error = true;
         $this->checkAllValueErrors[] = "Такой IP уже используется";
     }
     if (!$this->checkValue('status')) {
         $error = true;
         $this->checkAllValueErrors[] = "Выберите cтатус";
     }
     $this->insertValue['comment'] = parent::getPostValue('comment');
     return !$error;
 }
 /**
  * Получение значений
  */
 protected function getAllValue()
 {
     parent::getAllValue();
     $this->insertValue['alias'] = parent::getPostValue('alias');
     $this->insertValue['created'] = parent::getPostValue('created');
     $this->insertValue['lastChange'] = parent::getPostValue('lastChange');
     if (isset($_POST['name']) && $_POST['name'] != null && $_POST['name'] != "") {
         foreach ($_POST['name'] as $key => $value) {
             $this->insertValue['name'][$key] = parent::getMysqlText($value);
         }
     }
     if (isset($_POST['description']) && $_POST['description'] != null && $_POST['description'] != "") {
         foreach ($_POST['description'] as $key => $value) {
             $this->insertValue['description'][$key] = parent::getMysqlText($value);
         }
     }
     if (isset($_POST['list']) && $_POST['list'] != null && $_POST['list'] != "") {
         $this->insertValue['list'] = $_POST['list'];
     } else {
         $this->insertValue['list'] = array();
     }
 }
Esempio n. 7
0
 protected function getAllValue()
 {
     parent::getAllValue();
     $this->insertValue = array();
     $this->insertValue['ip'] = parent::getPostValue('ip');
     $this->insertValue['fio'] = parent::getPostValue('fio');
     $this->insertValue['date'] = parent::getPostValue('date');
     $this->insertValue['phone'] = parent::getPostValue('phone');
     $this->insertValue['email'] = parent::getPostValue('email');
     $this->insertValue['title'] = parent::getPostValue('title');
     $this->insertValue['text'] = parent::getPostValue('text');
     if (isset($_POST['like']) && $_POST['like'] != null && $_POST['like'] != "") {
         $this->insertValue['like'] = parent::getPostValue('like');
     } else {
         $this->insertValue['like'] = '0';
     }
     if (isset($_POST['dislike']) && $_POST['dislike'] != null && $_POST['dislike'] != "") {
         $this->insertValue['dislike'] = parent::getPostValue('dislike');
     } else {
         $this->insertValue['dislike'] = '0';
     }
     $this->insertValue['parentFeedback'] = parent::getPostValue('parentFeedback');
 }
 protected function getAllValue()
 {
     parent::getAllValue();
     $this->insertValue['alias'] = parent::getPostValue('type');
     $this->insertValue['show'] = parent::getPostValue('show');
     $this->insertValue['sequence'] = parent::getPostValue('sequence');
     if (isset($_POST['typeName']) && $_POST['typeName'] != null && $_POST['typeName'] != "") {
         foreach ($_POST['typeName'] as $key => $value) {
             $this->insertValue['typeName'][$key] = parent::getMysqlText($value);
         }
     }
     if (isset($_POST['topText']) && $_POST['topText'] != null && $_POST['topText'] != "") {
         foreach ($_POST['topText'] as $key => $value) {
             $this->insertValue['topText'][$key] = parent::getMysqlText($value);
         }
     }
     if (isset($_POST['bottomText']) && $_POST['bottomText'] != null && $_POST['bottomText'] != "") {
         foreach ($_POST['bottomText'] as $key => $value) {
             $this->insertValue['bottomText'][$key] = parent::getMysqlText($value);
         }
     }
 }
 private function setDayTime($day)
 {
     $keyHS = $day . 'H_s';
     $keyMS = $day . 'M_s';
     $keyHE = $day . 'H_e';
     $keyME = $day . 'M_e';
     $this->insertValue[$keyHS] = parent::getPostValue($keyHS);
     $this->insertValue[$keyMS] = parent::getPostValue($keyMS);
     $this->insertValue[$keyHE] = parent::getPostValue($keyHE);
     $this->insertValue[$keyME] = parent::getPostValue($keyME);
     if ($this->insertValue[$keyHS] != null && $this->insertValue[$keyHE] != null) {
         $this->insertValue[$keyMS] = "0";
         $this->insertValue[$keyME] = "0";
     }
 }