This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var myModule = (function(){ | |
| var _inArtem = 'Вызов метода из публичных!'; | |
| var init = function() { | |
| _setUpListners(); | |
| }; | |
| var _setUpListners = function() { | |
| //прослушка событий | |
| /* | |
| Здесь пишут то, что должно произойти сразу! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <VirtualHost *:80> | |
| ServerAlias namesite.ru www.namesite.ru | |
| DocumentRoot /home/artem/public_html/namesite.ru | |
| <Directory home/artem/public_html/namesite.ru/> | |
| AllowOverride All | |
| </Directory> | |
| </VirtualHost> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo a2ensite mysite.zz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Активируем модуль mod-rewrite (необходим для реализации ЧПУ): | |
| sudo a2enmod rewrite | |
| //и перезапускаем сервер: | |
| sudo /etc/init.d/apache2 restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (isset($_GET['categories']) ){ | |
| $categories = $_GET['categories']; | |
| } | |
| function getCatArticle($param,$categories) { | |
| $param = ORM::for_table('articles')->where('id_category', $categories)->find_many(); | |
| return $param; | |
| } | |
| $dataArticle = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getCategories($param) { | |
| $param = ORM::for_table('categories')->find_many(); | |
| return $param; | |
| } | |
| $getCat = array(); | |
| $resultCat = getCategories($getCat); | |
| echo '<ul>'; | |
| foreach($resultCat as $itemCat) { | |
| echo '<li><a href =templates/getcatart.php?categories='.$itemCat['id_category'].'>'.$itemCat['cat_name'].'</a></li>'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (isset($_GET['article']) ){ | |
| $article = $_GET['article']; | |
| } | |
| function getArticle($param,$article) { | |
| $param = ORM::for_table('articles')->where('id_articles', $article)->find_one(); | |
| return $param; | |
| } | |
| $result = null; | |
| $resultArticle = getArticle($result,$article); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function validateEmail($emailParam) { | |
| return filter_input(INPUT_POST,$emailParam,FILTER_VALIDATE_EMAIL); | |
| } | |
| function validateInt($var) { | |
| return filter_input(INPUT_POST, $var, FILTER_VALIDATE_INT); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var viewUserData = (function(){ | |
| //Инициализация. Инициализирует модуль | |
| var init = function() { | |
| _setUpListners(); | |
| }; | |
| //прослушивает события | |
| var _setUpListners = function() { | |
| //прослушка событий | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| php artisan make:migration create_name_table --create ="name_table" |
OlderNewer