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 | |
| /** | |
| * @package Sape | |
| * @subpackage Base | |
| * @author JExtension {@link http://jextension.net} | |
| * @author Created on 14-Jan-2011 | |
| * @license GNU/GPL | |
| */ | |
| //-- No direct access | |
| defined('_JEXEC') or die('Restricted access'); |
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
| CREATE TABLE IF NOT EXISTS `stats` ( | |
| `user_id` int(10) unsigned NOT NULL, | |
| `date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, | |
| `type` varchar(10) NOT NULL, | |
| PRIMARY KEY (`date`,`type`,`user_id`), | |
| KEY `fk_user_id_1` (`user_id`) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
| INSERT INTO `stats` (`user_id`, `date`, `type`) VALUES | |
| (1, '2012-06-30 21:00:00', 'тип №1'), |
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
| class Cars | |
| { | |
| function createCar($brand) | |
| { | |
| $car_obj = 0; | |
| switch ($brand) { | |
| case 'toyota': $car_obj = new Toyota; | |
| case 'bmw': $car_obj = new Bmw; | |
| default: $car_obj = new Toyota; | |
| } |
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
| ### Structure | |
| CREATE TABLE IF NOT EXISTS `tube`.`film` ( | |
| `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT , | |
| `name` VARCHAR(45) NOT NULL , | |
| PRIMARY KEY (`id`) ) | |
| ENGINE = InnoDB | |
| DEFAULT CHARACTER SET = utf8 | |
| COLLATE = utf8_general_ci; |
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
| ... | |
| public function formAction(Request $request, $id) | |
| { | |
| $task = new Task(); | |
| if ($request->getMethod() == 'GET') | |
| { | |
| $task->setTask('Новая задача'); | |
| $task->setDueDate(new \DateTime('tomorrow')); |
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 | |
| namespace App\CommonBundle\Form\Type; | |
| use Symfony\Component\Form\AbstractType; | |
| use Symfony\Component\Form\FormBuilderInterface; | |
| use Symfony\Component\OptionsResolver\OptionsResolverInterface; | |
| class TaskType extends AbstractType | |
| { |
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
| {% block content %} | |
| {% if subscribe %} | |
| <p>{{ 'newsletter.title.subscribe_success'|trans }}</p> | |
| {% else %} | |
| <p>{{ 'newsletter.title.unsubscribe_success'|trans }}</p> | |
| {% endif %} | |
| <script type="text/javascript"> | |
| window.addEvent('domready', function() | |
| { | |
| location.href = '{{ back_url }}'; |
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
| window.routes['url_cities'] = {{ path('stepcart_city_list') }}; // сейвим текущий роут | |
| var w = new CcWidget({ | |
| widgets: [ | |
| {% for i in range(0, form.user.addresses|length-1) %} | |
| { | |
| ... | |
| }{% if not loop.last %},{% endif %} | |
| {% endfor %} | |
| ], |
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
| /* | |
| --- | |
| name: Router | |
| description: StepCart router manager | |
| license: MIT. | |
| copyright: Copyright (c) 2011 | |
| requires: [] | |
| provides: [Router] |
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
| public function addTag(Tag $tag) | |
| { | |
| if ($this->collTags === null) { | |
| $this->initTags(); | |
| } | |
| if (!$this->collTags->contains($tag)) | |
| { | |
| // ~~~ | |
| if ($tag->getId()) { | |
| $tag = TagQuery::create()->findOneById($tag->getId()); |
OlderNewer