├── .bowerrc ├── .gitignore ├── .gitmodules ├── .scrutinizer.yml ├── Gruntfile.js ├── LICENSE ├── README.md ├── app ├── .htaccess ├── AppCache.php ├── AppKernel.php ├── Resources │ ├── TwigBundle │ │ └── views │ │ │ └── Exception │ │ │ └── error.html.twig │ └── views │ │ ├── base.html.twig │ │ ├── flashes.html.twig │ │ ├── navbar.html.twig │ │ └── sidebar.html.twig ├── SymfonyRequirements.php ├── autoload.php ├── bootstrap.php.cache ├── check.php ├── config │ ├── config.yml │ ├── config_dev.yml │ ├── config_prod.yml │ ├── config_test.yml │ ├── parameters_example.yml │ ├── purifier.yml │ ├── routing.yml │ ├── routing_dev.yml │ └── security.yml ├── console ├── phpunit.xml.dist └── upgrade.php ├── bin ├── cache-clear ├── doctrine └── doctrine.php ├── component.json ├── composer.json ├── composer.lock ├── package.json ├── src ├── .htaccess └── Hyper │ └── AdsBundle │ ├── Api │ ├── AnnouncementArrayConverter.php │ ├── ArrayConverterInterface.php │ ├── EntitySerializer.php │ ├── EntitySerializerInterface.php │ ├── Json.php │ └── SerializerFactory.php │ ├── Console │ └── Command │ │ ├── ExpireAnnouncements.php │ │ └── RemoveExpiredOrders.php │ ├── Controller │ ├── Admin │ │ ├── AdvertiserController.php │ │ ├── AnnouncementController.php │ │ ├── BannerConfigController.php │ │ ├── BannerController.php │ │ ├── PageController.php │ │ └── ZoneController.php │ ├── ApiController.php │ ├── Controller.php │ ├── DefaultController.php │ ├── OmnipayController.php │ ├── PaymentsController.php │ ├── RestController.php │ └── User │ │ ├── AnnouncementController.php │ │ └── BannerController.php │ ├── DBAL │ ├── AnnouncementPaymentType.php │ ├── BannerType.php │ ├── PayModelType.php │ └── ZoneType.php │ ├── DependencyInjection │ ├── CompilerPass │ │ ├── PaymentGatewayCompilerPass.php │ │ └── PaymentParamsProviderCompilerPass.php │ ├── Configuration.php │ └── HyperAdsExtension.php │ ├── Entity │ ├── Advertisement.php │ ├── AdvertisementReport.php │ ├── AdvertisementRepository.php │ ├── Advertiser.php │ ├── Announcement.php │ ├── ApiToken.php │ ├── Banner.php │ ├── BannerZoneReference.php │ ├── BannerZoneReferenceRepository.php │ ├── Order.php │ ├── OrderRepository.php │ ├── Page.php │ ├── Zone.php │ └── ZoneRepository.php │ ├── EventListener │ ├── AnnouncementFlowEventListener.php │ ├── RestViewEventListener.php │ └── SessionFlushListener.php │ ├── Exception │ ├── InvalidArgumentException.php │ ├── InvalidIpnRequestException.php │ ├── NoReferenceException.php │ └── PaymentException.php │ ├── Form │ ├── AdvertiserType.php │ ├── AnnouncementFullType.php │ ├── AnnouncementType.php │ ├── BannerType.php │ ├── EditProfileType.php │ ├── OrderType.php │ ├── PageType.php │ ├── PaymentType.php │ ├── RegistrationType.php │ ├── Type │ │ └── PurifiedCkeditorType.php │ └── ZoneType.php │ ├── Helper │ ├── BannerTypeDeterminer.php │ ├── BannerZoneCalendar.php │ ├── DatePeriod.php │ ├── DatePeriodCreator.php │ ├── OrderNumberGenerator.php │ ├── PaymentDaysCalculator.php │ ├── PricesCalculator.php │ ├── ReferencesUpdater.php │ └── StatsCollector.php │ ├── HyperAdsBundle.php │ ├── Payment │ ├── BitPay │ │ ├── BitPayParamsProvider.php │ │ ├── Gateway.php │ │ └── InvoiceRequest.php │ ├── BitPayStatus.php │ ├── GatewayBuilders │ │ └── BitPayGatewayBuilder.php │ ├── InvoiceAddressRetriever.php │ ├── OmnipayBitPayPaymentPlugin.php │ ├── OmnipayGatewayFactory.php │ ├── OrderInterface.php │ ├── OrderRepositoryInterface.php │ ├── ParamsProviderInterface.php │ ├── ParamsProviders.php │ ├── PaymentGatewayBuilderInterface.php │ ├── PaymentGatewayFactoryInterface.php │ ├── Processors │ │ └── BitPayIpnRequestProcessor.php │ ├── Requests │ │ ├── AbstractOmnipayRequest.php │ │ └── BitPayIpnRequest.php │ └── Util │ │ ├── BitPayOrderApprovalDeterminer.php │ │ ├── HmacOrderHashGenerator.php │ │ ├── OrderApprovalDeterminerInterface.php │ │ └── OrderHashGeneratorInterface.php │ ├── Resources │ ├── config │ │ ├── payments │ │ │ ├── bitpay.xml │ │ │ └── services.xml │ │ └── services.xml │ ├── doc │ │ └── index.rst │ ├── public │ │ ├── css │ │ │ ├── main.css │ │ │ └── main.min.css │ │ ├── images │ │ │ ├── bitcurex-adres-wyplat-bitcoin-M.png │ │ │ ├── bitcurex-adres-wyplat-bitcoin.png │ │ │ ├── bitcurex-adres-zwrotny-M.png │ │ │ ├── bitcurex-adres-zwrotny.png │ │ │ ├── bitcurex-wyplata-btc-M.png │ │ │ ├── bitcurex-wyplata-btc.png │ │ │ ├── bitpay-invoice-paid-M.png │ │ │ ├── bitpay-invoice-paid.png │ │ │ ├── bitpay-invoice-to-be-paid-M.png │ │ │ ├── bitpay-invoice-to-be-paid.png │ │ │ ├── bitxurex-dane-konta-do-wplat-pln-M.png │ │ │ ├── bitxurex-dane-konta-do-wplat-pln.png │ │ │ ├── bitxurex-dane-konta-do-wyplat-btc-M.png │ │ │ ├── bitxurex-dane-konta-do-wyplat-btc.png │ │ │ ├── bitxurex-edycja-danych-konta-do-wyplat-btc-M.png │ │ │ ├── bitxurex-edycja-danych-konta-do-wyplat-btc.png │ │ │ ├── hyperreal.png │ │ │ ├── mak-informacje-o-strefach-M.png │ │ │ ├── mak-informacje-o-strefach.png │ │ │ ├── mak-oplac-banner-M.png │ │ │ ├── mak-oplac-banner.png │ │ │ ├── mak-potwierdzenie-rejestracji-M.png │ │ │ ├── mak-potwierdzenie-rejestracji.png │ │ │ ├── mak-rejestracja-M.png │ │ │ ├── mak-rejestracja.png │ │ │ ├── mak-strefy-dla-bannera-M.png │ │ │ ├── mak-strefy-dla-bannera.png │ │ │ ├── mak-strona-glowna-informacje-o-strefach-M.png │ │ │ ├── mak-strona-glowna-informacje-o-strefach.png │ │ │ ├── mak-twoje-bannery-M.png │ │ │ ├── mak-twoje-bannery.png │ │ │ ├── mak-wgrywanie-bannera-M.png │ │ │ ├── mak-wgrywanie-bannera.png │ │ │ ├── mak-zarejestruj-M.png │ │ │ ├── mak-zarejestruj.png │ │ │ ├── mtgox-payment-initial-screen-M.png │ │ │ ├── mtgox-payment-initial-screen.png │ │ │ ├── mtgox-payment-received-waiting-for-validation-M.png │ │ │ ├── mtgox-payment-received-waiting-for-validation.png │ │ │ ├── mtgox-payment-return-address-M.png │ │ │ ├── mtgox-payment-return-address.png │ │ │ ├── mtgox-payment-sending-address-M.png │ │ │ ├── mtgox-payment-sending-address.png │ │ │ ├── mtgox-payment-successful-M.png │ │ │ ├── mtgox-payment-successful.png │ │ │ └── resize-to-miniature.sh │ │ ├── js │ │ │ └── payment.js │ │ └── less │ │ │ ├── bootswatch-flatly.less │ │ │ ├── bootswatch-retro.less │ │ │ ├── global.less │ │ │ ├── global.less-fajkaorg │ │ │ ├── main.less │ │ │ ├── main.less-flatly │ │ │ ├── main.less-retro │ │ │ ├── variables-flatly.less │ │ │ └── variables-retro.less │ ├── translations │ │ ├── HyperAdsBundle.en.yml │ │ └── HyperAdsBundle.pl.yml │ └── views │ │ ├── Admin │ │ ├── Advertiser │ │ │ ├── edit.html.twig │ │ │ ├── index.html.twig │ │ │ ├── new.html.twig │ │ │ └── show.html.twig │ │ ├── Announcement │ │ │ ├── edit.html.twig │ │ │ ├── index.html.twig │ │ │ └── new.html.twig │ │ ├── Banner │ │ │ ├── edit.html.twig │ │ │ ├── index.html.twig │ │ │ ├── new.html.twig │ │ │ └── show.html.twig │ │ ├── BannerConfig │ │ │ └── zone.html.twig │ │ ├── Page │ │ │ ├── edit.html.twig │ │ │ ├── index.html.twig │ │ │ ├── new.html.twig │ │ │ └── show.html.twig │ │ └── Zone │ │ │ ├── edit.html.twig │ │ │ ├── index.html.twig │ │ │ ├── new.html.twig │ │ │ └── show.html.twig │ │ ├── ChangePassword │ │ ├── changePassword.html.twig │ │ └── changePassword_content.html.twig │ │ ├── Default │ │ ├── demo.html.twig │ │ ├── frame.html.twig │ │ ├── head.js.twig │ │ ├── heroUnit.html.twig │ │ ├── index.html.twig │ │ ├── rules.html.twig │ │ ├── tutorial.html.twig │ │ ├── tutorial.html.twig-mtgox │ │ └── zonesInfo.html.twig │ │ ├── Group │ │ ├── edit.html.twig │ │ ├── edit_content.html.twig │ │ ├── list.html.twig │ │ ├── list_content.html.twig │ │ ├── new.html.twig │ │ ├── new_content.html.twig │ │ ├── show.html.twig │ │ └── show_content.html.twig │ │ ├── Mailing │ │ └── postPersistAnnouncement.html.twig │ │ ├── Payments │ │ ├── canceledPayment.html.twig │ │ └── successfulPayment.html.twig │ │ ├── Profile │ │ ├── edit.html.twig │ │ ├── edit_content.html.twig │ │ ├── show.html.twig │ │ └── show_content.html.twig │ │ ├── Registration │ │ ├── checkEmail.html.twig │ │ ├── confirmed.html.twig │ │ ├── email.txt.twig │ │ └── register.html.twig │ │ ├── Resetting │ │ ├── checkEmail.html.twig │ │ ├── email.txt.twig │ │ ├── passwordAlreadyRequested.html.twig │ │ ├── request.html.twig │ │ ├── request_content.html.twig │ │ ├── reset.html.twig │ │ └── reset_content.html.twig │ │ ├── Security │ │ └── login.html.twig │ │ ├── User │ │ ├── Announcement │ │ │ ├── edit.html.twig │ │ │ ├── index.html.twig │ │ │ ├── new.html.twig │ │ │ └── show.html.twig │ │ └── Banner │ │ │ ├── add.html.twig │ │ │ ├── edit.html.twig │ │ │ ├── list.html.twig │ │ │ ├── pay.html.twig │ │ │ ├── payInZone.html.twig │ │ │ ├── payInZoneFormTheme.html.twig │ │ │ ├── payInZoneSave.html.twig │ │ │ ├── payments.html.twig │ │ │ └── zones.html.twig │ │ └── acidFormTheme.html.twig │ ├── Tests │ ├── Entity │ │ ├── AnnouncementTest.php │ │ └── BannerTest.php │ └── Helper │ │ ├── DatePeriodCreatorTest.php │ │ ├── PaymentDaysCalculatorTest.php │ │ └── ReferencesUpdaterTest.php │ ├── Twig │ └── AcidExtension.php │ └── Util │ └── StandardInputReader.php └── web ├── .htaccess ├── app.php ├── app_dev.php ├── apple-touch-icon.png ├── components └── .gitkeep ├── config.php ├── error503.html. ├── favicon.ico ├── fonts ├── odblokuj ├── robots.txt ├── uploads └── .gitkeep └── zablokuj /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory" : "web/components", 3 | "json" : "component.json", 4 | "endpoint" : "https://bower.herokuapp.com" 5 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | /app/cache/* 3 | /web/bundles/* 4 | /app/logs/* 5 | /vendor/ 6 | composer.phar 7 | web/uploads/* 8 | web/components/* 9 | node_modules/ 10 | !web/components/.gitkeep 11 | !web/uploads/.gitkeep 12 | app/config/parameters.yml 13 | *.iml 14 | *.ipr 15 | *.iws 16 | *.swp 17 | web/error503.html 18 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "master"] 2 | path = master 3 | url = https://github.com/Stereobit/dragend.git 4 | [submodule "web/git/dragend"] 5 | path = web/git/dragend 6 | url = https://github.com/Stereobit/dragend.git 7 | -------------------------------------------------------------------------------- /.scrutinizer.yml: -------------------------------------------------------------------------------- 1 | #before_commands: 2 | # - "composer install --prefer-dist" 3 | tools: 4 | php_analyzer: 5 | enabled: true 6 | filter: 7 | excluded_paths: 8 | - vendor 9 | - web 10 | - app/cache 11 | config: 12 | checkstyle: 13 | enabled: true 14 | verify_php_doc_comments: 15 | enabled: true 16 | loops_must_use_braces: 17 | enabled: true 18 | php_code_coverage: 19 | enabled: false 20 | test_command: phpunit -c app/phpunit.xml.dist 21 | filter: 22 | excluded_paths: 23 | - vendor 24 | - web 25 | - app 26 | - bin 27 | php_code_sniffer: 28 | enabled: true 29 | config: 30 | standard: PSR2 31 | filter: 32 | excluded_paths: 33 | - vendor 34 | - web 35 | - app 36 | - bin 37 | php_cpd: 38 | enabled: true 39 | excluded_dirs: 40 | - vendor 41 | - web 42 | - app 43 | - bin 44 | php_loc: 45 | enabled: true 46 | excluded_dirs: 47 | - vendor 48 | - web 49 | - app 50 | - bin 51 | php_mess_detector: 52 | enabled: true 53 | filter: 54 | excluded_paths: 55 | - vendor 56 | - web 57 | - app 58 | - bin 59 | php_pdepend: 60 | enabled: true 61 | sensiolabs_security_checker: false 62 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | grunt.initConfig({ 3 | pkg: grunt.file.readJSON('package.json'), 4 | less: { 5 | development: { 6 | options: { 7 | paths: ["src/Hyper/AdsBundle/Resources/public/css"] 8 | }, 9 | files: { 10 | "src/Hyper/AdsBundle/Resources/public/css/main.css": "src/Hyper/AdsBundle/Resources/public/less/main.less" 11 | } 12 | }, 13 | production: { 14 | options: { 15 | paths: ["src/Hyper/AdsBundle/Resources/public/css"], 16 | cleancss: true 17 | }, 18 | files: { 19 | "src/Hyper/AdsBundle/Resources/public/css/main.min.css": "src/Hyper/AdsBundle/Resources/public/less/main.less" 20 | } 21 | } 22 | }, 23 | watch: { 24 | scripts: { 25 | files: ['src/Hyper/AdsBundle/Resources/public/less/*.less'], 26 | tasks: ['less'], 27 | options: { 28 | nospawn: true 29 | } 30 | } 31 | } 32 | }); 33 | 34 | grunt.loadNpmTasks('grunt-contrib-less'); 35 | grunt.loadNpmTasks('grunt-contrib-watch'); 36 | grunt.registerTask('default', ['less', 'watch']); 37 | } 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2012 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /app/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /app/AppCache.php: -------------------------------------------------------------------------------- 1 | getEnvironment(), array('dev', 'test'))) { 29 | $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); 30 | $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); 31 | $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); 32 | } 33 | 34 | return $bundles; 35 | } 36 | 37 | public function registerContainerConfiguration(LoaderInterface $loader) 38 | { 39 | $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Resources/TwigBundle/views/Exception/error.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ status_code }} 4 | 5 | 6 | {{ status_code }} 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/Resources/views/base.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block title %}Welcome!{% endblock %} - {{ page_title|babel }} 6 | {% block stylesheets %}{% endblock %} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {% include "::navbar.html.twig" %} 19 | 20 |
21 |
22 | 23 | {% if is_granted("ROLE_USER") %} 24 | 27 | {% endif %} 28 | 29 |
30 | {% include "::flashes.html.twig" %} 31 | {% block body %}{% endblock %} 32 |
33 |
34 |
35 | 36 |
37 | 38 | 46 | 47 | {##} 48 | {% block javascripts %}{% endblock %} 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /app/Resources/views/flashes.html.twig: -------------------------------------------------------------------------------- 1 | {% for error in app.session.flashbag.get('error') %} 2 |
3 | {{ error }} 4 |
5 | {% endfor %} 6 | 7 | {% for notice in app.session.flashbag.get('notice') %} 8 |
9 | {{ notice }} 10 |
11 | {% endfor %} 12 | 13 | {% for info in app.session.flashbag.get('info') %} 14 |
15 | {{ info }} 16 |
17 | {% endfor %} 18 | 19 | {% for success in app.session.flashbag.get('success') %} 20 |
21 | {{ success }} 22 |
23 | {% endfor %} -------------------------------------------------------------------------------- /app/Resources/views/navbar.html.twig: -------------------------------------------------------------------------------- 1 | 42 | -------------------------------------------------------------------------------- /app/autoload.php: -------------------------------------------------------------------------------- 1 | add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs'); 12 | } 13 | 14 | AnnotationRegistry::registerLoader(array($loader, 'loadClass')); 15 | 16 | return $loader; 17 | -------------------------------------------------------------------------------- /app/check.php: -------------------------------------------------------------------------------- 1 | getPhpIniConfigPath(); 8 | 9 | echo "********************************\n"; 10 | echo "* *\n"; 11 | echo "* Symfony requirements check *\n"; 12 | echo "* *\n"; 13 | echo "********************************\n\n"; 14 | 15 | echo $iniPath ? sprintf("* Configuration file used by PHP: %s\n\n", $iniPath) : "* WARNING: No configuration file (php.ini) used by PHP!\n\n"; 16 | 17 | echo "** ATTENTION **\n"; 18 | echo "* The PHP CLI can use a different php.ini file\n"; 19 | echo "* than the one used with your web server.\n"; 20 | if ('\\' == DIRECTORY_SEPARATOR) { 21 | echo "* (especially on the Windows platform)\n"; 22 | } 23 | echo "* To be on the safe side, please also launch the requirements check\n"; 24 | echo "* from your web server using the web/config.php script.\n"; 25 | 26 | echo_title('Mandatory requirements'); 27 | 28 | $checkPassed = true; 29 | foreach ($symfonyRequirements->getRequirements() as $req) { 30 | /** @var $req Requirement */ 31 | echo_requirement($req); 32 | if (!$req->isFulfilled()) { 33 | $checkPassed = false; 34 | } 35 | } 36 | 37 | echo_title('Optional recommendations'); 38 | 39 | foreach ($symfonyRequirements->getRecommendations() as $req) { 40 | echo_requirement($req); 41 | } 42 | 43 | exit($checkPassed ? 0 : 1); 44 | 45 | /** 46 | * Prints a Requirement instance 47 | */ 48 | function echo_requirement(Requirement $requirement) 49 | { 50 | $result = $requirement->isFulfilled() ? 'OK' : ($requirement->isOptional() ? 'WARNING' : 'ERROR'); 51 | echo ' ' . str_pad($result, 9); 52 | echo $requirement->getTestMessage() . "\n"; 53 | 54 | if (!$requirement->isFulfilled()) { 55 | echo sprintf(" %s\n\n", $requirement->getHelpText()); 56 | } 57 | } 58 | 59 | function echo_title($title) 60 | { 61 | echo "\n** $title **\n\n"; 62 | } 63 | -------------------------------------------------------------------------------- /app/config/config_dev.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config.yml } 3 | 4 | framework: 5 | router: { resource: "%kernel.root_dir%/config/routing_dev.yml" } 6 | profiler: { only_exceptions: false } 7 | 8 | web_profiler: 9 | toolbar: true 10 | intercept_redirects: false 11 | 12 | monolog: 13 | handlers: 14 | main: 15 | type: stream 16 | path: %kernel.logs_dir%/%kernel.environment%.log 17 | level: debug 18 | channels: ["!security"] 19 | excluded_404s: 20 | - ^/frame 21 | security: 22 | type: stream 23 | path: %kernel.logs_dir%/%kernel.environment%.security.log 24 | level: warning 25 | channels: ["security"] 26 | firephp: 27 | type: firephp 28 | level: info 29 | 30 | -------------------------------------------------------------------------------- /app/config/config_prod.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config.yml } 3 | 4 | monolog: 5 | handlers: 6 | main: 7 | type: fingers_crossed 8 | action_level: error 9 | handler: nested 10 | channels: ["!security"] 11 | excluded_404s: 12 | - ^/frame 13 | security: 14 | type: stream 15 | path: %kernel.logs_dir%/%kernel.environment%.security.log 16 | level: warning 17 | channels: ["security"] 18 | nested: 19 | type: stream 20 | path: %kernel.logs_dir%/%kernel.environment%.log 21 | level: debug 22 | -------------------------------------------------------------------------------- /app/config/config_test.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config_dev.yml } 3 | 4 | framework: 5 | test: ~ 6 | session: 7 | storage_id: session.storage.mock_file 8 | 9 | web_profiler: 10 | toolbar: false 11 | intercept_redirects: false 12 | 13 | swiftmailer: 14 | disable_delivery: true 15 | -------------------------------------------------------------------------------- /app/config/parameters_example.yml: -------------------------------------------------------------------------------- 1 | parameters: 2 | database_driver: pdo_mysql 3 | database_host: localhost 4 | database_port: ~ 5 | database_name: albert 6 | database_user: hofmann 7 | database_password: bicycle1943 8 | 9 | mailer_transport: smtp 10 | mailer_host: localhost 11 | mailer_user: ~ 12 | mailer_password: ~ 13 | mailer_delivery: me@example.com 14 | mailer_from: me@example.com 15 | mailer_sender: me@example.com 16 | 17 | payments_secret: som3S3cr37P4ssw0rd 18 | mtgox_api_key: apiKey 19 | mtgox_api_secret: "apiSecret" 20 | 21 | ads_default_currency: EUR 22 | page_title: "acid.name.long" 23 | 24 | locale: pl 25 | secret: 0724ebb222af8866b7d7a2524451219b 26 | 27 | session_memcache_host: 127.0.0.1 28 | session_memcache_port: 11211 29 | session_memcache_prefix: "acid_" 30 | session_memcache_expire: 3600 31 | 32 | application_memcache_host: 127.0.0.1 33 | application_memcache_port: 11211 34 | application_memcache_prefix: "acid_" 35 | 36 | max_one_banner_days: 365 37 | announcement_expire_days: 10 # if announcement is not edited for {announcement_expire_days}, it will be marked as expired by acid:task:expire-announcements 38 | announcement_edit_cost: 0.01 39 | announcement_edit_currency: PLN 40 | 41 | payment_hash_algorithm: sha224 42 | payment_hash_key: sAf3HaShK3Y 43 | 44 | bitpay_api_key: sAf3Ap1K3Y 45 | bitpay_transaction_speed: medium 46 | bitpay_full_notifications: false #if true bitpay will inform about every status change 47 | bitpay_notifications_email: name@example.com 48 | 49 | # currently valid value is "omnipay_bitpay" only 50 | banner_payment_methods: 51 | - omnipay_bitpay 52 | 53 | announcement_payment_methods: ~ 54 | 55 | banner_price_factor: 10 # % 56 | max_banners_in_zone: 5 57 | 58 | announcement_flow_mail_recipients: 59 | - "mail@example.com" 60 | - "another-mail@example.com" -------------------------------------------------------------------------------- /app/config/purifier.yml: -------------------------------------------------------------------------------- 1 | exercise_html_purifier: 2 | default: 3 | HTML.ForbiddenElements: [ "script", "style" ] 4 | Cache.SerializerPath: '%kernel.cache_dir%/htmlpurifier-default' 5 | premium: 6 | Cache.SerializerPath: '%kernel.cache_dir%/htmlpurifier-premium' 7 | -------------------------------------------------------------------------------- /app/config/routing.yml: -------------------------------------------------------------------------------- 1 | # Internal routing configuration to handle ESI 2 | #_internal: 3 | # resource: "@FrameworkBundle/Resources/config/routing/internal.xml" 4 | # prefix: /_internal 5 | 6 | _welcome: 7 | pattern: / 8 | defaults: { _controller: HyperAdsBundle:Default:index } 9 | 10 | fos_user_security: 11 | resource: "@FOSUserBundle/Resources/config/routing/security.xml" 12 | 13 | fos_user_profile: 14 | resource: "@FOSUserBundle/Resources/config/routing/profile.xml" 15 | prefix: /profile 16 | 17 | fos_user_register: 18 | resource: "@FOSUserBundle/Resources/config/routing/registration.xml" 19 | prefix: /register 20 | 21 | fos_user_resetting: 22 | resource: "@FOSUserBundle/Resources/config/routing/resetting.xml" 23 | prefix: /resetting 24 | 25 | fos_user_change_password: 26 | resource: "@FOSUserBundle/Resources/config/routing/change_password.xml" 27 | prefix: /profile 28 | 29 | default: 30 | resource: "@HyperAdsBundle/Controller/DefaultController.php" 31 | type: annotation 32 | 33 | admin_advertiser: 34 | resource: "@HyperAdsBundle/Controller/Admin/AdvertiserController.php" 35 | prefix: /admin/advertiser 36 | type: annotation 37 | 38 | admin_page: 39 | resource: "@HyperAdsBundle/Controller/Admin/PageController.php" 40 | prefix: /admin/page 41 | type: annotation 42 | 43 | admin_zone: 44 | resource: "@HyperAdsBundle/Controller/Admin/ZoneController.php" 45 | prefix: /admin/zone 46 | type: annotation 47 | 48 | admin_banner_config: 49 | resource: "@HyperAdsBundle/Controller/Admin/BannerConfigController.php" 50 | prefix: /admin/banner-config 51 | type: annotation 52 | 53 | admin_banner: 54 | resource: "@HyperAdsBundle/Controller/Admin/BannerController.php" 55 | prefix: /admin/banner 56 | type: annotation 57 | 58 | admin_announcement: 59 | resource: "@HyperAdsBundle/Controller/Admin/AnnouncementController.php" 60 | prefix: /admin/announcement 61 | type: annotation 62 | 63 | user_banner: 64 | resource: "@HyperAdsBundle/Controller/User/BannerController.php" 65 | prefix: /user/banner 66 | type: annotation 67 | 68 | user_announcement: 69 | resource: "@HyperAdsBundle/Controller/User/AnnouncementController.php" 70 | prefix: /user/announcement 71 | type: annotation 72 | 73 | acid_api: 74 | resource: "@HyperAdsBundle/Controller/ApiController.php" 75 | prefix: /api 76 | type: annotation 77 | 78 | payments: 79 | resource: "@HyperAdsBundle/Controller/PaymentsController.php" 80 | prefix: /payments 81 | type: annotation 82 | 83 | omnipay: 84 | resource: "@HyperAdsBundle/Controller/OmnipayController.php" 85 | prefix: /omnipay 86 | type: annotation -------------------------------------------------------------------------------- /app/config/routing_dev.yml: -------------------------------------------------------------------------------- 1 | _wdt: 2 | resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" 3 | prefix: /_wdt 4 | 5 | _profiler: 6 | resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" 7 | prefix: /_profiler 8 | 9 | _configurator: 10 | resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml" 11 | prefix: /_configurator 12 | 13 | _main: 14 | resource: routing.yml 15 | -------------------------------------------------------------------------------- /app/config/security.yml: -------------------------------------------------------------------------------- 1 | jms_security_extra: 2 | secure_all_services: false 3 | expressions: true 4 | 5 | security: 6 | encoders: 7 | FOS\UserBundle\Model\UserInterface: sha512 8 | 9 | role_hierarchy: 10 | ROLE_ADMIN: ROLE_USER 11 | ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] 12 | 13 | providers: 14 | fos_userbundle: 15 | id: fos_user.user_provider.username 16 | 17 | firewalls: 18 | ads: 19 | pattern: ^/(head|click|frame|mtgox) 20 | stateless: true 21 | anonymous: true 22 | 23 | main: 24 | pattern: ^/ 25 | form_login: 26 | provider: fos_userbundle 27 | csrf_provider: form.csrf_provider 28 | logout: true 29 | anonymous: true 30 | 31 | role_hierarchy: 32 | ROLE_ADMIN: ROLE_USER 33 | ROLE_SUPER_ADMIN: ROLE_ADMIN 34 | 35 | access_control: 36 | - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } 37 | - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } 38 | - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } 39 | - { path: ^/mtgox/ipn$, role: IS_AUTHENTICATED_ANONYMOUSLY } 40 | - { path: ^/user/, role: ROLE_USER } 41 | - { path: ^/zones-info, role: ROLE_USER } 42 | - { path: ^/admin/, role: ROLE_ADMIN } 43 | -------------------------------------------------------------------------------- /app/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev'); 18 | $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod'; 19 | 20 | $kernel = new AppKernel($env, $debug); 21 | $application = new Application($kernel); 22 | $application->add(new \Hyper\AdsBundle\Console\Command\ExpireAnnouncements()); 23 | $application->add(new \Hyper\AdsBundle\Console\Command\RemoveExpiredOrders()); 24 | $application->run($input); 25 | -------------------------------------------------------------------------------- /app/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | 17 | 18 | ../src/*/*Bundle/Tests 19 | ../src/*/Bundle/*Bundle/Tests 20 | 21 | 22 | 23 | 28 | 29 | 30 | 31 | ../src 32 | 33 | ../src/*/*Bundle/Resources 34 | ../src/*/*Bundle/Tests 35 | ../src/*/Bundle/*Bundle/Resources 36 | ../src/*/Bundle/*Bundle/Tests 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app/upgrade.php: -------------------------------------------------------------------------------- 1 | $skeletonDir.'/app/console', 18 | __DIR__.'/autoload.php' => $skeletonDir.'/app/autoload.php', 19 | ); 20 | 21 | foreach ($files as $file => $skeleton) { 22 | $upgrade->outputConsoleDiff($output, $file, $skeleton); 23 | } 24 | -------------------------------------------------------------------------------- /bin/cache-clear: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | DIR=`dirname $DIR` 5 | 6 | HOST=`hostname` 7 | 8 | function sudoClear() { 9 | sudo rm -fR $DIR/app/cache/* 10 | sudo -u www-data /usr/bin/php $DIR/app/console cache:clear --env=prod 11 | sudo -u www-data /usr/bin/php $DIR/app/console cache:clear --env=dev 12 | } 13 | 14 | function userClear() { 15 | rm -fR $DIR/app/cache/* 16 | /usr/bin/php $DIR/app/console cache:clear --env=prod 17 | /usr/bin/php $DIR/app/console cache:clear --env=dev 18 | } 19 | 20 | if [ "$HOST" = "thorn" ]; then 21 | userClear 22 | elif [ "$HOST" = "air" ]; then 23 | userClear 24 | else 25 | sudoClear 26 | fi 27 | 28 | -------------------------------------------------------------------------------- /bin/doctrine: -------------------------------------------------------------------------------- 1 | ../vendor/doctrine/orm/bin/doctrine -------------------------------------------------------------------------------- /bin/doctrine.php: -------------------------------------------------------------------------------- 1 | ../vendor/doctrine/orm/bin/doctrine.php -------------------------------------------------------------------------------- /component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "acidadserver", 3 | "main": "web/css/main.css", 4 | "version": "1.0.0", 5 | "dependencies": { 6 | "ckeditor-colorbutton": "http://download.ckeditor.com/colorbutton/releases/colorbutton_4.0.1.zip", 7 | "ckeditor-panelbutton": "http://download.ckeditor.com/panelbutton/releases/panelbutton_4.0.1.zip", 8 | "mustache": "0.7.2", 9 | "jquery": "1.10.2", 10 | "fancybox": "2.1.4", 11 | "bootstrap": "3.*", 12 | "swfobject": "*", 13 | "bootstrap-datepicker": "*", 14 | "angular-ui": "*", 15 | "font-awesome": "*", 16 | "icomoon": "*", 17 | "ionicons": "*", 18 | "impress.js": "*" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Acid Ad Server", 3 | "type": "library", 4 | "keywords": ["ads", "adserver"], 5 | "authors": [ 6 | { 7 | "name": "fajka", 8 | "email": "fajka@hyperreal.info", 9 | "homepage": "http://hyperreal.info/" 10 | } 11 | ], 12 | "support": { 13 | "email": "fajka@hyperreal.info" 14 | }, 15 | "autoload": { 16 | "psr-0": { 17 | "Hyper": "src/" 18 | } 19 | }, 20 | "require": { 21 | "php": ">=5.3.3", 22 | "ext-memcache": "*", 23 | 24 | "symfony/symfony": "~2.4", 25 | "doctrine/orm": "~2.2,>=2.2.3", 26 | "doctrine/doctrine-bundle": "~1.2", 27 | "twig/extensions": "~1.0", 28 | "symfony/assetic-bundle": "~2.3", 29 | "symfony/swiftmailer-bundle": "~2.3", 30 | "symfony/monolog-bundle": "~2.4", 31 | "sensio/distribution-bundle": "~2.3", 32 | "sensio/framework-extra-bundle": "~3.0", 33 | "sensio/generator-bundle": "~2.3", 34 | "incenteev/composer-parameter-handler": "~2.0", 35 | 36 | "jms/security-extra-bundle": "1.5.*", 37 | "jms/payment-core-bundle": "1.0.*@dev", 38 | "friendsofsymfony/user-bundle": "2.0.*@dev", 39 | "exercise/htmlpurifier-bundle": "1.0.*@dev", 40 | "trsteel/ckeditor-bundle": "1.4.*@dev", 41 | "omnipay/bitpay": "2.0.*@dev" 42 | }, 43 | "require-dev": { 44 | }, 45 | "scripts": { 46 | "post-install-cmd": [ 47 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 48 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 49 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 50 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" 51 | ], 52 | "post-update-cmd": [ 53 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 54 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 55 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 56 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" 57 | ] 58 | }, 59 | "config": { 60 | "bin-dir": "bin" 61 | }, 62 | "minimum-stability": "dev", 63 | "extra": { 64 | "symfony-app-dir": "app", 65 | "symfony-web-dir": "web" 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hyperads", 3 | "version": "0.0.0", 4 | "description": "acid ad server", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/hyperreal/AcidAdServer.git" 12 | }, 13 | "keywords": [ 14 | "ad", 15 | "server" 16 | ], 17 | "license": "BSD", 18 | "author": "fajka", 19 | "readmeFilename": "README.md", 20 | "devDependencies": { 21 | "grunt": "~0.4.3", 22 | "grunt-contrib-less": "~0.10.0", 23 | "grunt-contrib-watch": "~0.6.0" 24 | }, 25 | "dependencies": { 26 | "clean-css": "~2.1.6" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Api/AnnouncementArrayConverter.php: -------------------------------------------------------------------------------- 1 | $announcement->getId(), 19 | 'userName' => $announcement->getAdvertiser()->getUsername(), 20 | 'uid' => $announcement->getAdvertiser()->getId(), 21 | 'title' => $announcement->getTitle(), 22 | 'addDate' => $announcement->getAddDate()->getTimestamp(), 23 | 'type' => $announcement->getAnnouncementPaymentType(), 24 | 'content' => $announcement->getDescription(), 25 | 'navigation' => array() 26 | ); 27 | 28 | if ($full) { 29 | $serialized['navigation']['list'] = $this->router->generate('api_announcement_list', array(), true); 30 | } else { 31 | unset($serialized['content']); 32 | $serialized['navigation']['full'] = $this->router->generate( 33 | 'api_announcement', 34 | array('announcement' => $announcement->getId()), 35 | true 36 | ); 37 | } 38 | 39 | return $serialized; 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Api/ArrayConverterInterface.php: -------------------------------------------------------------------------------- 1 | router = $router; 17 | } 18 | 19 | public function toJsonArray(array $objects) 20 | { 21 | $serialized = array(); 22 | 23 | foreach ($objects as $object) { 24 | $serialized[] = $this->toJson($object); 25 | } 26 | 27 | return $serialized; 28 | } 29 | 30 | public function toJson($object, $full = false) 31 | { 32 | if (!is_object($object)) { 33 | throw new InvalidArgumentException('Only object can be serialized'); 34 | } 35 | 36 | $class = new \ReflectionClass($object); 37 | $methodName = 'convert' . ucfirst($class->getShortName()); 38 | 39 | if (!method_exists($this, $methodName)) { 40 | throw new InvalidArgumentException("Serializer for class $class was not found."); 41 | } 42 | 43 | return $this->$methodName($object, !!$full); 44 | } 45 | 46 | private function convertAnnouncement(Announcement $announcement, $full) 47 | { 48 | $serialized = array( 49 | 'id' => $announcement->getId(), 50 | 'userName' => $announcement->getAdvertiser()->getUsername(), 51 | 'uid' => $announcement->getAdvertiser()->getId(), 52 | 'title' => $announcement->getTitle(), 53 | 'hasImage' => false, 54 | 'imageUrl' => '', 55 | 'addDate' => $announcement->getAddDate()->getTimestamp(), 56 | 'type' => $announcement->getAnnouncementPaymentType(), 57 | 'content' => $announcement->getDescription(), 58 | 'navigation' => array() 59 | ); 60 | 61 | if ($full) { 62 | $serialized['navigation']['list'] = $this->router->generate('api_announcement_list', array(), true); 63 | } else { 64 | unset($serialized['content']); 65 | $serialized['navigation']['full'] = $this->router->generate( 66 | 'api_announcement', 67 | array('announcement' => $announcement->getId()), 68 | true 69 | ); 70 | } 71 | 72 | return $serialized; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Api/EntitySerializerInterface.php: -------------------------------------------------------------------------------- 1 | setName('acid:task:expire-announcements') 24 | ->setDescription( 25 | 'Mark announcements as expired if they are not edited for at least number of days defined' 26 | . ' in configuration' 27 | ); 28 | } 29 | 30 | protected function execute(InputInterface $input, OutputInterface $output) 31 | { 32 | $this->setUp($input); 33 | $announcements = $this->repository->getExpiredAnnouncements($this->numberOfDaysAgo); 34 | 35 | if (empty($announcements)) { 36 | $this->verboseWrite($output, 'There are no expired announcements'); 37 | return; 38 | } 39 | 40 | foreach ($announcements as $announcement) { 41 | $this->markAsExpiredAndPersist($output, $announcement); 42 | } 43 | 44 | $this->entityManager->flush(); 45 | } 46 | 47 | private function verboseWrite(OutputInterface $output, $message) 48 | { 49 | if ($this->verbose) { 50 | $output->writeln($message); 51 | } 52 | } 53 | 54 | private function markAsExpiredAndPersist(OutputInterface $output, Advertisement $announcement) 55 | { 56 | $announcement->setExpired(true); 57 | $this->entityManager->persist($announcement); 58 | $this->verboseWrite( 59 | $output, 60 | sprintf( 61 | 'Announcement with id %d (%s) marked as expired', 62 | $announcement->getId(), 63 | $announcement->getTitle() 64 | ) 65 | ); 66 | } 67 | 68 | private function setUp(InputInterface $input) 69 | { 70 | $this->verbose = $input->getOption('verbose'); 71 | $this->entityManager = $this->getContainer()->get('doctrine.orm.entity_manager'); 72 | 73 | $this->numberOfDaysAgo = $numberOfDaysAgo = new \DateTime( 74 | sprintf('now - %d days', $this->getContainer()->getParameter('announcement_expire_days')) 75 | ); 76 | 77 | $this->repository = $this->entityManager->getRepository('HyperAdsBundle:Advertisement'); 78 | } 79 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Console/Command/RemoveExpiredOrders.php: -------------------------------------------------------------------------------- 1 | setName('acid:task:remove-expired-orders') 15 | ->setDescription('Removes orders that have not been paid within specific amount of time') 16 | ->addOption( 17 | 'time', 18 | null, 19 | InputOption::VALUE_REQUIRED, 20 | 'Time in minutes. Non-paid orders created earlier than NOW - {time} will be removed.', 21 | 1440 22 | ); 23 | } 24 | 25 | protected function execute(InputInterface $input, OutputInterface $output) 26 | { 27 | $time = $input->getOption('time'); 28 | if (!is_numeric($time) || $time < 1) { 29 | $output->writeln('Time should be a positive integer.'); 30 | return; 31 | } 32 | 33 | $count = $this->getContainer() 34 | ->get('doctrine.orm.entity_manager') 35 | ->getRepository('HyperAdsBundle:Order') 36 | ->removeExpiredOrders(intval($time)); 37 | 38 | $output->writeln("$count was marked as not paid"); 39 | $this->getContainer()->get('hyper_ads.payments_logger')->info("$count orders was marked as not paid"); 40 | } 41 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Controller/Controller.php: -------------------------------------------------------------------------------- 1 | get('translator')->trans($word, $params, 'HyperAdsBundle'); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Controller/PaymentsController.php: -------------------------------------------------------------------------------- 1 | paymentRender($order); 20 | } 21 | 22 | /** 23 | * @Route("/cancel/{order}", name="payment_canceled") 24 | * @Template() 25 | */ 26 | public function canceledPaymentAction(Order $order) 27 | { 28 | return $this->paymentRender($order); 29 | } 30 | 31 | private function paymentRender(Order $order) 32 | { 33 | $currentUser = $this->getUser(); 34 | 35 | 36 | if ($order->getAnnouncement()->getAdvertiser()->getId() != $currentUser->getId()) { 37 | return $this->redirect($this->generateUrl('_welcome')); 38 | } 39 | 40 | return array( 41 | 'order' => $order 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Controller/RestController.php: -------------------------------------------------------------------------------- 1 | getJsonErrorResponse('Invalid token', 401); 12 | } 13 | 14 | protected function getJsonErrorResponse($message, $statusCode) 15 | { 16 | return $this->getJsonResponse( 17 | array( 18 | 's' => false, 19 | 'm' => $message 20 | ), 21 | $statusCode 22 | ); 23 | } 24 | 25 | protected function getJsonResponse($content, $statusCode = 200) 26 | { 27 | return new Response( 28 | json_encode($content), 29 | $statusCode, 30 | array( 31 | 'Content-type' => 'application/json; charset=utf-8', 32 | ) 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/DBAL/AnnouncementPaymentType.php: -------------------------------------------------------------------------------- 1 | 'announcement.premium', 55 | self::ANNOUNCEMENT_PAYMENT_TYPE_STANDARD => 'announcement.standard', 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/DBAL/BannerType.php: -------------------------------------------------------------------------------- 1 | 4 | * @see https://github.com/fajka 5 | */ 6 | 7 | namespace Hyper\AdsBundle\DBAL; 8 | 9 | use Doctrine\DBAL\Types\Type; 10 | use Doctrine\DBAL\Platforms\AbstractPlatform; 11 | 12 | class BannerType extends Type 13 | { 14 | const BANNER_TYPE = 'bannertype'; 15 | 16 | const BANNER_TYPE_TEXT = 'text'; 17 | const BANNER_TYPE_IMAGE = 'image'; 18 | const BANNER_TYPE_FLASH = 'flash'; 19 | 20 | public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) 21 | { 22 | return "ENUM('text', 'image', 'flash') COMMENT '(DC2Type:bannertype)'"; 23 | } 24 | 25 | public function convertToPHPValue($value, AbstractPlatform $platform) 26 | { 27 | return $value; 28 | } 29 | 30 | public function convertToDatabaseValue($value, AbstractPlatform $platform) 31 | { 32 | if (!in_array($value, self::getValidTypes())) { 33 | throw new \InvalidArgumentException('Invalid banner type'); 34 | } 35 | 36 | return $value; 37 | } 38 | 39 | public function getName() 40 | { 41 | return self::BANNER_TYPE; 42 | } 43 | 44 | public static function getValidTypes() 45 | { 46 | return array( 47 | self::BANNER_TYPE_FLASH, 48 | self::BANNER_TYPE_IMAGE, 49 | self::BANNER_TYPE_TEXT, 50 | ); 51 | } 52 | 53 | public static function getValidTypesWithLabels() 54 | { 55 | return array( 56 | self::BANNER_TYPE_FLASH => 'flash.movie', 57 | self::BANNER_TYPE_IMAGE => 'image', 58 | self::BANNER_TYPE_TEXT => 'text', 59 | ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/DBAL/PayModelType.php: -------------------------------------------------------------------------------- 1 | 4 | * @see https://github.com/fajka 5 | */ 6 | 7 | namespace Hyper\AdsBundle\DBAL; 8 | 9 | use Doctrine\DBAL\Types\Type; 10 | use Doctrine\DBAL\Platforms\AbstractPlatform; 11 | 12 | class PayModelType extends Type 13 | { 14 | const BANNER_TYPE = 'paymodeltype'; 15 | 16 | const PAY_MODEL_DAILY = 'daily'; 17 | const PAY_MODEL_PPV = 'ppv'; 18 | const PAY_MODEL_PPC = 'ppc'; 19 | 20 | public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) 21 | { 22 | return "ENUM('daily', 'ppc', 'ppv') COMMENT '(DC2Type:paymodeltype)'"; 23 | } 24 | 25 | public function convertToPHPValue($value, AbstractPlatform $platform) 26 | { 27 | return $value; 28 | } 29 | 30 | public function convertToDatabaseValue($value, AbstractPlatform $platform) 31 | { 32 | if (!in_array($value, self::getValidTypes())) { 33 | throw new \InvalidArgumentException('Invalid pay model type'); 34 | } 35 | 36 | return $value; 37 | } 38 | 39 | public function getName() 40 | { 41 | return self::BANNER_TYPE; 42 | } 43 | 44 | public static function getValidTypes() 45 | { 46 | return array( 47 | self::PAY_MODEL_DAILY, 48 | self::PAY_MODEL_PPC, 49 | self::PAY_MODEL_PPV, 50 | ); 51 | } 52 | 53 | public static function getValidTypesWithLabels() 54 | { 55 | return array( 56 | self::PAY_MODEL_DAILY => 'pay.for.day.of.emission', 57 | self::PAY_MODEL_PPC => 'pay.per.click', 58 | self::PAY_MODEL_PPV => 'pay.per.view', 59 | ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/DBAL/ZoneType.php: -------------------------------------------------------------------------------- 1 | 4 | * @see https://github.com/fajka 5 | */ 6 | 7 | namespace Hyper\AdsBundle\DBAL; 8 | 9 | use Doctrine\DBAL\Types\Type; 10 | use Doctrine\DBAL\Platforms\AbstractPlatform; 11 | 12 | class ZoneType extends Type 13 | { 14 | const ZONE_TYPE = 'zonetype'; 15 | 16 | const ZONE_TYPE_MOBILE = 'mobile'; 17 | const ZONE_TYPE_DESKTOP = 'desktop'; 18 | 19 | public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) 20 | { 21 | return "ENUM('mobile', 'desktop') COMMENT '(DC2Type:zonetype)'"; 22 | } 23 | 24 | public function convertToPHPValue($value, AbstractPlatform $platform) 25 | { 26 | return $value; 27 | } 28 | 29 | public function convertToDatabaseValue($value, AbstractPlatform $platform) 30 | { 31 | if (!in_array($value, array(self::ZONE_TYPE_DESKTOP, self::ZONE_TYPE_MOBILE))) { 32 | throw new \InvalidArgumentException('Invalid zone type'); 33 | } 34 | 35 | return $value; 36 | } 37 | 38 | public function getName() 39 | { 40 | return self::ZONE_TYPE; 41 | } 42 | 43 | public static function getValidTypes() 44 | { 45 | return array( 46 | self::ZONE_TYPE_DESKTOP, 47 | self::ZONE_TYPE_MOBILE, 48 | ); 49 | } 50 | 51 | public static function getValidTypesWithLabels() 52 | { 53 | return array( 54 | self::ZONE_TYPE_DESKTOP => 'desktop', 55 | self::ZONE_TYPE_MOBILE => 'mobile', 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/DependencyInjection/CompilerPass/PaymentGatewayCompilerPass.php: -------------------------------------------------------------------------------- 1 | hasDefinition('hyper_ads.payment.gateway_factory')) { 14 | return; 15 | } 16 | 17 | $definition = $container->getDefinition('hyper_ads.payment.gateway_factory'); 18 | $taggedServices = $container->findTaggedServiceIds('hyper_ads.payment_gateway_builder'); 19 | 20 | foreach ($taggedServices as $id => $tagAttributes) { 21 | foreach ($tagAttributes as $attributes) { 22 | $definition->addMethodCall( 23 | 'addGatewayBuilder', 24 | array(new Reference($id), $attributes['gateway']) 25 | ); 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/DependencyInjection/CompilerPass/PaymentParamsProviderCompilerPass.php: -------------------------------------------------------------------------------- 1 | hasDefinition('hyper_ads.payment.params_providers')) { 14 | return; 15 | } 16 | 17 | $definition = $container->getDefinition('hyper_ads.payment.params_providers'); 18 | $taggedServices = $container->findTaggedServiceIds('hyper_ads.payment.params_provider'); 19 | 20 | foreach ($taggedServices as $id => $tagAttributes) { 21 | foreach ($tagAttributes as $attributes) { 22 | $definition->addMethodCall( 23 | 'addProvider', 24 | array(new Reference($id), $attributes['system_name']) 25 | ); 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/DependencyInjection/HyperAdsExtension.php: -------------------------------------------------------------------------------- 1 | processConfiguration($configuration, $configs); 25 | 26 | $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); 27 | 28 | foreach ($config['payment_gateways'] as $gateway => $values) { 29 | $definitionId = sprintf('hyper_ads.payment.gateway.' . $gateway); 30 | $container->setDefinition( 31 | $definitionId, 32 | new DefinitionDecorator('hyper_ads.payment.gateways') 33 | )->setArguments(array($values)); 34 | } 35 | 36 | if (isset($config['payment_gateways']['bitpay'])) { 37 | $bitpay = &$config['payment_gateways']['bitpay']; 38 | $container->setParameter('hyper_ads.bitpay_transaction_speed', $bitpay['transaction_speed']); 39 | $container->setParameter('hyper_ads.bitpay_full_notifications', $bitpay['full_notifications']); 40 | $container->setParameter('hyper_ads.bitpay_notifications_email', $bitpay['notifications_email']); 41 | } 42 | $container->setParameter('hyper_ads.payment_hash_algorithm', $config['order_hash_algorithm']); 43 | $container->setParameter('hyper_ads.payment_hash_key', $config['order_hash_key']); 44 | $container->setParameter('hyper_ads.large_price_factor', $config['large_price_factor']); 45 | $container->setParameter('hyper_ads.max_banners_in_zone', $config['max_banners_in_zone']); 46 | 47 | $loader->load('services.xml'); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Entity/AdvertisementReport.php: -------------------------------------------------------------------------------- 1 | id = $id; 30 | } 31 | 32 | public function getId() 33 | { 34 | return $this->id; 35 | } 36 | 37 | public function setAdvertisement(Advertisement $advertisement) 38 | { 39 | $this->advertisement = $advertisement; 40 | } 41 | 42 | /** 43 | * @return Advertisement 44 | */ 45 | public function getAdvertisement() 46 | { 47 | return $this->advertisement; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Entity/Advertiser.php: -------------------------------------------------------------------------------- 1 | 4 | * @see https://github.com/fajka 5 | */ 6 | 7 | namespace Hyper\AdsBundle\Entity; 8 | 9 | use Doctrine\ORM\Mapping as ORM; 10 | use Doctrine\Common\Collections\ArrayCollection; 11 | use Symfony\Component\Validator\Constraints as Assert; 12 | use FOS\UserBundle\Entity\User as BaseUser; 13 | 14 | /** 15 | * @ORM\Entity 16 | * @ORM\Table(name="advertiser") 17 | */ 18 | class Advertiser extends BaseUser 19 | { 20 | /** 21 | * @ORM\Id 22 | * @ORM\Column(type="integer") 23 | * @ORM\GeneratedValue(strategy="AUTO") 24 | */ 25 | protected $id; 26 | 27 | /** 28 | * @ORM\Column(type="string", name="first_name", nullable=true) 29 | */ 30 | protected $firstName; 31 | 32 | /** 33 | * @ORM\Column(type="string", name="last_name", nullable=true) 34 | */ 35 | protected $lastName; 36 | 37 | /** 38 | * @var \Hyper\AdsBundle\Entity\Advertisement[] 39 | * 40 | * @ORM\OneToMany(targetEntity="Advertisement", mappedBy="advertiser", cascade={"persist", "remove"}) 41 | */ 42 | protected $advertisements; 43 | 44 | public function __construct() 45 | { 46 | parent::__construct(); 47 | $this->advertisements = new ArrayCollection(); 48 | } 49 | 50 | public function setId($id) 51 | { 52 | $this->id = $id; 53 | } 54 | 55 | public function getId() 56 | { 57 | return $this->id; 58 | } 59 | 60 | public function setEmail($email) 61 | { 62 | $this->email = $email; 63 | } 64 | 65 | public function getEmail() 66 | { 67 | return $this->email; 68 | } 69 | 70 | public function setFirstName($firstName) 71 | { 72 | $this->firstName = $firstName; 73 | } 74 | 75 | public function getFirstName() 76 | { 77 | return $this->firstName; 78 | } 79 | 80 | public function setLastName($lastName) 81 | { 82 | $this->lastName = $lastName; 83 | } 84 | 85 | public function getLastName() 86 | { 87 | return $this->lastName; 88 | } 89 | 90 | public function getBanners() 91 | { 92 | return $this->advertisements; 93 | } 94 | 95 | public function addBanner(Advertisement $announcement) 96 | { 97 | $this->advertisements->add($announcement); 98 | } 99 | 100 | public function getAdvertisements() 101 | { 102 | return $this->advertisements; 103 | } 104 | 105 | public function addAdvertisement(Advertisement $announcement) 106 | { 107 | $this->advertisements->add($announcement); 108 | } 109 | 110 | public function __toString() 111 | { 112 | return $this->getName() . ' (' . $this->getId() . ')'; 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Entity/Announcement.php: -------------------------------------------------------------------------------- 1 | paid = AnnouncementPaymentType::ANNOUNCEMENT_PAYMENT_TYPE_STANDARD != $this->announcementPaymentType; 36 | $this->adminDisabled = false; 37 | $this->disabled = false; 38 | } 39 | 40 | public function setAnnouncementPaymentType($announcementPaymentType) 41 | { 42 | if (!in_array($announcementPaymentType, AnnouncementPaymentType::getValidTypes())) { 43 | throw new \InvalidArgumentException('Given announcement payment type is invalid'); 44 | } 45 | 46 | $this->announcementPaymentType = $announcementPaymentType; 47 | } 48 | 49 | public function getAnnouncementPaymentType() 50 | { 51 | return $this->announcementPaymentType; 52 | } 53 | 54 | public function isActive() 55 | { 56 | if (AnnouncementPaymentType::ANNOUNCEMENT_PAYMENT_TYPE_STANDARD == $this->announcementPaymentType) { 57 | return true; 58 | } else { 59 | return parent::isActive(); 60 | } 61 | } 62 | 63 | public function isDisabled() 64 | { 65 | return $this->disabled; 66 | } 67 | 68 | public function setDisabled($disabled) 69 | { 70 | $this->disabled = !!$disabled; 71 | } 72 | 73 | public function isAdminDisabled() 74 | { 75 | return $this->adminDisabled; 76 | } 77 | 78 | public function setAdminDisabled($adminDisabled) 79 | { 80 | $this->adminDisabled = !!$adminDisabled; 81 | } 82 | 83 | public static function getAnnouncementPaymentTypes() 84 | { 85 | return AnnouncementPaymentType::getValidTypes(); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Entity/ApiToken.php: -------------------------------------------------------------------------------- 1 | token = $token; 28 | } 29 | 30 | public function getToken() 31 | { 32 | return $this->token; 33 | } 34 | 35 | public function setAdvertiser(Advertiser $advertiser) 36 | { 37 | $this->advertiser = $advertiser; 38 | } 39 | 40 | public function getAdvertiser() 41 | { 42 | return $this->advertiser; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Entity/BannerZoneReferenceRepository.php: -------------------------------------------------------------------------------- 1 | getEntityManager()->createQuery( 17 | 'SELECT bzr, b 18 | FROM Hyper\AdsBundle\Entity\BannerZoneReference bzr 19 | JOIN bzr.banner b 20 | WHERE bzr.zone = ?1' 21 | ); 22 | 23 | $query->setParameter(1, $zone); 24 | 25 | return $query->getResult(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Entity/OrderRepository.php: -------------------------------------------------------------------------------- 1 | find($id); 13 | } 14 | 15 | /** 16 | * @param Zone $zone 17 | * 18 | * @return \Hyper\AdsBundle\Entity\Order[] 19 | */ 20 | public function getOrdersForZone(Zone $zone) 21 | { 22 | $query = $this->getEntityManager()->createQuery( 23 | 'SELECT o 24 | FROM Hyper\AdsBundle\Entity\Order o 25 | JOIN o.bannerZone bzr 26 | WHERE bzr.zone = ?1 AND (o.status = ?2 OR o.status = ?3)' 27 | ); 28 | 29 | $query->setParameter(1, $zone); 30 | $query->setParameter(2, Order::STATUS_FINISHED); 31 | $query->setParameter(3, Order::STATUS_NEW); 32 | 33 | return $query->getResult(); 34 | } 35 | 36 | public function removeExpiredOrders($time) 37 | { 38 | $query = $this->getEntityManager()->createQuery( 39 | 'UPDATE Hyper\AdsBundle\Entity\Order o 40 | SET o.status = ?1 41 | WHERE o.status = 0 AND o.creationDate < ?2' 42 | ); 43 | $query->setParameter(1, Order::STATUS_NOT_PAID); 44 | $query->setParameter(2, new \DateTime("now - $time minutes")); 45 | 46 | return $query->execute(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Entity/Page.php: -------------------------------------------------------------------------------- 1 | 4 | * @see https://github.com/fajka 5 | */ 6 | 7 | namespace Hyper\AdsBundle\Entity; 8 | 9 | use Doctrine\ORM\Mapping as ORM; 10 | use Doctrine\ORM\Mapping\OneToMany; 11 | use Doctrine\Common\Collections\ArrayCollection; 12 | use Symfony\Component\Validator\Constraints as Assert; 13 | 14 | /** 15 | * @ORM\Entity 16 | * @ORM\Table(name="page") 17 | */ 18 | class Page 19 | { 20 | 21 | /** 22 | * @ORM\Id 23 | * @ORM\Column(type="integer") 24 | * @ORM\GeneratedValue(strategy="AUTO") 25 | */ 26 | protected $id; 27 | 28 | /** 29 | * @ORM\Column(type="string") 30 | * @Assert\NotBlank() 31 | */ 32 | protected $name; 33 | 34 | /** 35 | * @ORM\Column(type="string", nullable=true) 36 | * @Assert\Url(message="URL {{ url }} is not a valid URL.") 37 | */ 38 | protected $url; 39 | 40 | /** 41 | * @OneToMany(targetEntity="Zone", mappedBy="page", cascade={"persist", "remove"}) 42 | */ 43 | protected $zones; 44 | 45 | public function setId($id) 46 | { 47 | $this->id = $id; 48 | } 49 | 50 | public function getId() 51 | { 52 | return $this->id; 53 | } 54 | 55 | public function setName($name) 56 | { 57 | $this->name = $name; 58 | } 59 | 60 | public function getName() 61 | { 62 | return $this->name; 63 | } 64 | 65 | public function setUrl($url) 66 | { 67 | $this->url = $url; 68 | } 69 | 70 | public function getUrl() 71 | { 72 | return $this->url; 73 | } 74 | 75 | public function setZones($zones) 76 | { 77 | $this->zones = $zones; 78 | } 79 | 80 | /** 81 | * @return Zone[] 82 | */ 83 | public function getZones() 84 | { 85 | return $this->zones; 86 | } 87 | 88 | public function __toString() 89 | { 90 | return $this->getName() . ' (' . $this->getId() . ')'; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/EventListener/SessionFlushListener.php: -------------------------------------------------------------------------------- 1 | session = $session; 21 | } 22 | 23 | public static function getSubscribedEvents() 24 | { 25 | return array( 26 | KernelEvents::RESPONSE => 'saveSession' , 27 | ); 28 | } 29 | 30 | public function saveSession() 31 | { 32 | if ($this->session->isStarted()) { 33 | $this->session->save(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Exception/InvalidArgumentException.php: -------------------------------------------------------------------------------- 1 | add('username', 'text', array('label' => 'name', 'translation_domain' => 'HyperAdsBundle')) 15 | ->add('email', 'email', array('label' => 'email', 'translation_domain' => 'HyperAdsBundle')) 16 | ->add('password', 'password', array('label' => 'password', 'translation_domain' => 'HyperAdsBundle')) 17 | ->add('firstName', 'text', array('label' => 'name.first', 'translation_domain' => 'HyperAdsBundle')) 18 | ->add('lastName', 'text', array('label' => 'name.last', 'translation_domain' => 'HyperAdsBundle')); 19 | } 20 | 21 | public function setDefaultOptions(OptionsResolverInterface $resolver) 22 | { 23 | $resolver->setDefaults( 24 | array( 25 | 'data_class' => 'Hyper\AdsBundle\Entity\Advertiser' 26 | ) 27 | ); 28 | } 29 | 30 | public function getName() 31 | { 32 | return 'hyper_adsbundle_advertisertype'; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Form/AnnouncementFullType.php: -------------------------------------------------------------------------------- 1 | add('title', 'text', array('label' => 'title', 'translation_domain' => 'HyperAdsBundle')); 18 | $builder->add('adminDisabled', 'checkbox', $this->getStandardOptions('check.to.disable')); 19 | $builder->add( 20 | 'advertiser', 21 | 'entity', 22 | array( 23 | 'class' => 'HyperAdsBundle:Advertiser', 24 | 'property' => 'username', 25 | 'required' => true, 26 | 'label' => 'advertiser', 27 | 'translation_domain' => 'HyperAdsBundle' 28 | ) 29 | ); 30 | $builder->add('paid', 'checkbox', $this->getStandardOptions('is.paid')); 31 | $builder->add('paidTo', 'date', $this->getStandardOptions('paid.to')); 32 | $builder->add( 33 | 'announcementPaymentType', 34 | 'choice', 35 | array( 36 | 'label' => 'payment.type', 37 | 'translation_domain' => 'HyperAdsBundle', 38 | 'choices' => $choices, 39 | ) 40 | ); 41 | $builder->add( 42 | 'description', 43 | 'purified_ckeditor', 44 | array( 45 | 'attr' => array('id' => "description"), 46 | 'label' => 'description', 47 | 'translation_domain' => 'HyperAdsBundle' 48 | ) 49 | ); 50 | } 51 | 52 | public function getName() 53 | { 54 | return self::FORM_NAME; 55 | } 56 | 57 | private function getStandardOptions($label) 58 | { 59 | return array('required' => false, 'label' => $label, 'translation_domain' => 'HyperAdsBundle'); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Form/AnnouncementType.php: -------------------------------------------------------------------------------- 1 | add('title', 'text', array('label' => 'title', 'translation_domain' => 'HyperAdsBundle')); 19 | $builder->add( 20 | 'disabled', 21 | 'checkbox', 22 | array('required' => false, 'label' => 'check.to.disable', 'translation_domain' => 'HyperAdsBundle') 23 | ); 24 | $builder->add( 25 | 'announcementPaymentType', 26 | 'choice', 27 | array( 28 | 'label' => 'payment.type', 29 | 'translation_domain' => 'HyperAdsBundle', 30 | 'choices' => $choices, 31 | ) 32 | ); 33 | $builder->add( 34 | 'description', 35 | 'purified_ckeditor', 36 | array( 37 | 'attr' => array('id' => "description"), 38 | 'label' => 'description', 39 | 'translation_domain' => 'HyperAdsBundle' 40 | ) 41 | ); 42 | } 43 | 44 | public function getName() 45 | { 46 | return self::FORM_NAME; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Form/BannerType.php: -------------------------------------------------------------------------------- 1 | addFileInput = false; 18 | } 19 | 20 | public function disableDescriptionInput() 21 | { 22 | $this->addDescriptionInput = false; 23 | } 24 | 25 | public function buildForm(FormBuilderInterface $builder, array $options) 26 | { 27 | if ($this->addFileInput) { 28 | $builder 29 | ->add('file', 'file', array('label' => 'file', 'translation_domain' => 'HyperAdsBundle')); 30 | } 31 | 32 | $builder 33 | ->add('title', 'text', array('label' => 'title', 'translation_domain' => 'HyperAdsBundle')); 34 | 35 | $builder 36 | ->add('linkTitle', 'text', array('label' => 'linktitle', 'translation_domain' => 'HyperAdsBundle')) 37 | ->add('url', 'url', array('label' => 'url', 'translation_domain' => 'HyperAdsBundle')); 38 | 39 | if ($this->addDescriptionInput) { 40 | $builder->add( 41 | 'description', 42 | 'textarea', 43 | array( 44 | 'attr' => array('id' => "description"), 45 | 'label' => 'description', 46 | 'translation_domain' => 'HyperAdsBundle' 47 | ) 48 | ); 49 | } 50 | } 51 | 52 | public function setDefaultOptions(OptionsResolverInterface $resolver) 53 | { 54 | $resolver->setDefaults( 55 | array( 56 | 'data_class' => 'Hyper\AdsBundle\Entity\Banner' 57 | ) 58 | ); 59 | } 60 | 61 | public function getName() 62 | { 63 | return 'hyper_adsbundle_bannertype'; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Form/EditProfileType.php: -------------------------------------------------------------------------------- 1 | announcement = $announcement; 21 | } 22 | 23 | public function buildForm(FormBuilderInterface $builder, array $options) 24 | { 25 | if (empty($this->announcement)) { 26 | throw new \LogicException('Advertisement has to be provided'); 27 | } 28 | 29 | $announcementId = $this->announcement->getId(); 30 | 31 | $builder->add( 32 | 'announcement', 33 | 'entity', 34 | array( 35 | 'query_builder' => function (EntityRepository $repository) use ($announcementId) { 36 | return $repository->createQueryBuilder('an') 37 | ->where('an.id = ?1') 38 | ->setParameter(1, $announcementId); 39 | }, 40 | 'class' => 'Hyper\AdsBundle\Entity\Advertisement', 41 | 'data' => $this->announcement, 42 | 'read_only' => true, 43 | 'label' => 'announcement', 44 | 'translation_domain' => 'HyperAdsBundle', 45 | ) 46 | ); 47 | 48 | $builder->add( 49 | 'zone', 50 | 'entity', 51 | array( 52 | 'query_builder' => function (EntityRepository $repository) { 53 | return $repository->createQueryBuilder('z') 54 | ->where('z.enabled = ?1') 55 | ->setParameter(1, true); 56 | }, 57 | 'class' => 'Hyper\AdsBundle\Entity\Zone', 58 | 'mapped' => false, 59 | 'label' => 'zone', 60 | 'translation_domain' => 'HyperAdsBundle', 61 | ) 62 | ); 63 | 64 | $builder->add( 65 | 'payment_to', 66 | 'date', 67 | array( 68 | 'label' => 'pay.to', 69 | 'data' => $this->announcement->getExpireDate(), 70 | 'translation_domain' => 'HyperAdsBundle', 71 | ) 72 | ); 73 | } 74 | 75 | public function setDefaultOptions(OptionsResolverInterface $resolver) 76 | { 77 | $resolver->setDefaults( 78 | array( 79 | 'data_class' => 'Hyper\AdsBundle\Entity\Order', 80 | ) 81 | ); 82 | } 83 | 84 | public function getName() 85 | { 86 | return 'order_type'; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Form/PageType.php: -------------------------------------------------------------------------------- 1 | add('name', 'text', array('label' => 'name', 'translation_domain' => 'HyperAdsBundle')) 15 | ->add('url', 'url', array('label' => 'url', 'translation_domain' => 'HyperAdsBundle')); 16 | } 17 | 18 | public function setDefaultOptions(OptionsResolverInterface $resolver) 19 | { 20 | $resolver->setDefaults( 21 | array( 22 | 'data_class' => 'Hyper\AdsBundle\Entity\Page' 23 | ) 24 | ); 25 | } 26 | 27 | public function getName() 28 | { 29 | return 'hyper_adsbundle_pagetype'; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Form/RegistrationType.php: -------------------------------------------------------------------------------- 1 | translator = $translator; 21 | $this->router = $router; 22 | } 23 | 24 | public function buildForm(FormBuilderInterface $builder, array $options) 25 | { 26 | parent::buildForm($builder, $options); 27 | $label = $this->translator->trans( 28 | 'rules.accept', 29 | array( 30 | '%rules_url%' => $this->router->generate('default_rules', array(), true) 31 | ), 32 | 'HyperAdsBundle' 33 | ); 34 | $builder->add( 35 | 'acceptRules', 36 | 'checkbox', 37 | array( 38 | 'label' => $label, 39 | 'required' => true, 40 | 'mapped' => false 41 | ) 42 | ); 43 | } 44 | 45 | public function getName() 46 | { 47 | return 'hyper_user_register'; 48 | } 49 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Form/Type/PurifiedCkeditorType.php: -------------------------------------------------------------------------------- 1 | purifierTransformer = $purifierTransformer; 17 | } 18 | 19 | public function buildForm(FormBuilderInterface $builder, array $options) 20 | { 21 | $builder->addViewTransformer($this->purifierTransformer); 22 | } 23 | 24 | public function getParent() 25 | { 26 | return 'ckeditor'; 27 | } 28 | 29 | public function setDefaultOptions(OptionsResolverInterface $resolver) 30 | { 31 | $resolver->setDefaults( 32 | array( 33 | 'compound' => false, 34 | ) 35 | ); 36 | } 37 | 38 | public function getName() 39 | { 40 | return 'purified_ckeditor'; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Form/ZoneType.php: -------------------------------------------------------------------------------- 1 | add('name', 'text', array('label' => 'name', 'translation_domain' => 'HyperAdsBundle')) 17 | ->add( 18 | 'enabled', 19 | 'choice', 20 | array( 21 | 'choices' => array( 22 | 1 => 'yes', 23 | 0 => 'no' 24 | ), 25 | 'label' => 'enabled', 26 | 'translation_domain' => 'HyperAdsBundle', 27 | ) 28 | ) 29 | ->add('dailyPrice', 'money', array('label' => 'daily.price', 'translation_domain' => 'HyperAdsBundle')) 30 | ->add('maxBanners', 'integer', array('label' => 'max.banners', 'translation_domain' => 'HyperAdsBundle')) 31 | ->add('maxWidth', 'integer', array('label' => 'max.width', 'translation_domain' => 'HyperAdsBundle')) 32 | ->add('maxHeight', 'integer', array('label' => 'max.height', 'translation_domain' => 'HyperAdsBundle')) 33 | ->add( 34 | 'type', 35 | 'choice', 36 | array( 37 | 'label' => 'type', 38 | 'translation_domain' => 'HyperAdsBundle', 39 | 'choices' => Ztype::getValidTypesWithLabels() 40 | ) 41 | ) 42 | ->add( 43 | 'page', 44 | 'entity', 45 | array( 46 | 'class' => 'HyperAdsBundle:Page', 47 | 'query_builder' => function (EntityRepository $er) { 48 | return $er->createQueryBuilder('p') 49 | ->orderBy('p.name', 'ASC'); 50 | }, 51 | 'label' => 'page', 52 | 'translation_domain' => 'HyperAdsBundle' 53 | ) 54 | ); 55 | } 56 | 57 | public function setDefaultOptions(OptionsResolverInterface $resolver) 58 | { 59 | $resolver->setDefaults( 60 | array( 61 | 'data_class' => 'Hyper\AdsBundle\Entity\Zone' 62 | ) 63 | ); 64 | } 65 | 66 | public function getName() 67 | { 68 | return 'hyper_adsbundle_zonetype'; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Helper/BannerTypeDeterminer.php: -------------------------------------------------------------------------------- 1 | banner = $banner; 18 | } 19 | 20 | public function getType() 21 | { 22 | $extension = strtolower(pathinfo($this->banner->getOriginalFileName(), PATHINFO_EXTENSION)); 23 | 24 | if (self::EXTENSION_SWF === $extension) { 25 | return BannerType::BANNER_TYPE_FLASH; 26 | } elseif (in_array($extension, self::$validImageExtensions)) { 27 | return BannerType::BANNER_TYPE_IMAGE; 28 | } 29 | 30 | return BannerType::BANNER_TYPE_TEXT; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Helper/DatePeriod.php: -------------------------------------------------------------------------------- 1 | start = $start; 19 | $this->end = $end; 20 | } 21 | 22 | /** 23 | * @return \DateTime 24 | */ 25 | public function getStart() 26 | { 27 | return $this->start; 28 | } 29 | 30 | /** 31 | * @return \DateTime 32 | */ 33 | public function getEnd() 34 | { 35 | return $this->end; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Helper/OrderNumberGenerator.php: -------------------------------------------------------------------------------- 1 | getId(); 19 | $items[] = $advertiser->getId(); 20 | 21 | if (null !== $zone) { 22 | $items[] = $zone->getId(); 23 | } 24 | 25 | $items[] = (int)mt_rand(0, 1000); 26 | 27 | return implode('-', $items); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Helper/StatsCollector.php: -------------------------------------------------------------------------------- 1 | entityManager = $em; 21 | } 22 | 23 | public function collectView(BannerZoneReference $bannerZone) 24 | { 25 | $bannerZone->setViews($bannerZone->getViews() + 1); 26 | $this->flushEntityManager($bannerZone); 27 | } 28 | 29 | public function collectClick(BannerZoneReference $bannerZone) 30 | { 31 | $bannerZone->setClicks($bannerZone->getClicks() + 1); 32 | $this->flushEntityManager($bannerZone); 33 | } 34 | 35 | public function getEntityManager() 36 | { 37 | return $this->entityManager; 38 | } 39 | 40 | private function flushEntityManager($bannerZone) 41 | { 42 | $this->getEntityManager()->persist($bannerZone); 43 | $this->getEntityManager()->flush(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/HyperAdsBundle.php: -------------------------------------------------------------------------------- 1 | container->get('doctrine.orm.entity_manager'); 15 | $platform = $em->getConnection()->getDatabasePlatform(); 16 | $platform->registerDoctrineTypeMapping('enum', 'string'); 17 | } 18 | 19 | public function build(ContainerBuilder $container) 20 | { 21 | parent::build($container); 22 | $container->addCompilerPass(new PaymentGatewayCompilerPass()); 23 | $container->addCompilerPass(new PaymentParamsProviderCompilerPass()); 24 | } 25 | 26 | 27 | public function getParent() 28 | { 29 | return 'FOSUserBundle'; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Payment/BitPay/Gateway.php: -------------------------------------------------------------------------------- 1 | createRequest('Hyper\AdsBundle\Payment\BitPay\InvoiceRequest', $parameters); 17 | } 18 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Payment/BitPay/InvoiceRequest.php: -------------------------------------------------------------------------------- 1 | getParameter('transactionSpeed'); 12 | } 13 | 14 | public function getFullNotifications() 15 | { 16 | return $this->getParameter('fullNotifications'); 17 | } 18 | 19 | public function getNotifyEmail() 20 | { 21 | return $this->getParameter('notifyEmail'); 22 | } 23 | 24 | public function getOrderId() 25 | { 26 | return $this->getParameter('orderId'); 27 | } 28 | 29 | public function setTransactionSpeed($speed) 30 | { 31 | return $this->setParameter('transactionSpeed', $speed); 32 | } 33 | 34 | public function setNotifyEmail($email) 35 | { 36 | return $this->setParameter('notifyEmail', $email); 37 | } 38 | 39 | public function setFullNotifications($full) 40 | { 41 | return $this->setParameter('fullNotifications', !!$full); 42 | } 43 | 44 | public function setOrderId($orderId) 45 | { 46 | return $this->setParameter('orderId', $orderId); 47 | } 48 | 49 | public function getData() 50 | { 51 | $data = parent::getData(); 52 | $data['transactionSpeed'] = $this->getTransactionSpeed(); 53 | $data['fullNotifications'] = $this->getFullNotifications(); 54 | $data['notificationEmail'] = $this->getNotifyEmail(); 55 | $data['orderID'] = $this->getOrderId(); 56 | 57 | return $data; 58 | } 59 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Payment/BitPayStatus.php: -------------------------------------------------------------------------------- 1 | setApiKey($parameters['api_key']); 20 | 21 | return $gateway; 22 | } 23 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Payment/InvoiceAddressRetriever.php: -------------------------------------------------------------------------------- 1 | container = $container; 16 | } 17 | 18 | public function retrieveUrlForOrder(OrderInterface $order) 19 | { 20 | $paymentMethod = $this->getPaymentMethodFromSystemName($order->getPaymentInstruction()->getPaymentSystemName()); 21 | /** @var $gateway \Omnipay\Common\AbstractGateway */ 22 | $gateway = $this->container->get('hyper_ads.payment.gateway.' . $paymentMethod); 23 | 24 | /** @var $response \Omnipay\BitPay\Message\PurchaseResponse */ 25 | $response = $gateway->purchase($this->getParameters($order))->send(); 26 | if ($response->isRedirect()) { 27 | return $response->getRedirectUrl(); 28 | } elseif (!$response->isSuccessful()) { 29 | throw new PaymentException('Problem with getting payment URL. Cause: ' . $response->getMessage()); 30 | } else { 31 | throw new PaymentException('Payment that does not return redirects to the payment page are not supported'); 32 | } 33 | } 34 | 35 | private function getParameters(OrderInterface $order) 36 | { 37 | /** @var $paramsProvider \Hyper\AdsBundle\Payment\ParamsProviders */ 38 | $paramsProvider = $this->container->get('hyper_ads.payment.params_providers'); 39 | $params = $paramsProvider->getParametersFromOrder($order); 40 | 41 | $this->container->get('hyper_ads.payments_logger')->info(var_export($params, true)); 42 | 43 | return $params; 44 | } 45 | 46 | private function getPaymentMethodFromSystemName($paymentSystemName) 47 | { 48 | if (strpos($paymentSystemName, 'omnipay_') === false) { 49 | throw new PaymentException('Payment method cannot be obtained from system name: ' . $paymentSystemName); 50 | } 51 | 52 | return substr($paymentSystemName, 8); 53 | } 54 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Payment/OmnipayBitPayPaymentPlugin.php: -------------------------------------------------------------------------------- 1 | setState(FinancialTransactionInterface::STATE_SUCCESS); 21 | } 22 | 23 | public function approveAndDeposit(FinancialTransactionInterface $transaction, $retry) 24 | { 25 | /** @var $payment \Jms\Payment\CoreBundle\Model\PaymentInterface */ 26 | $payment = $transaction->getPayment(); 27 | $transaction->setProcessedAmount($payment->getTargetAmount()); 28 | $transaction->setState(FinancialTransactionInterface::STATE_SUCCESS); 29 | $transaction->setResponseCode(PluginInterface::RESPONSE_CODE_SUCCESS); 30 | $transaction->setReasonCode(PluginInterface::REASON_CODE_SUCCESS); 31 | } 32 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Payment/OmnipayGatewayFactory.php: -------------------------------------------------------------------------------- 1 | gatewayBuilders = array(); 18 | $this->gateways = array(); 19 | } 20 | 21 | public function addGatewayBuilder(PaymentGatewayBuilderInterface $builder, $gatewayName) 22 | { 23 | $this->gatewayBuilders[$gatewayName] = $builder; 24 | } 25 | 26 | public function createGateway(array $parameters) 27 | { 28 | if (array_key_exists($parameters['name'], $this->gateways)) { 29 | return $this->gateways[$parameters['name']]; 30 | } 31 | 32 | /** @var $gateway \Omnipay\Common\AbstractGateway */ 33 | $gateway = Omnipay::getFactory()->create($parameters['name']); 34 | $this->gatewayBuilders[$parameters['name']]->build($gateway, $parameters); 35 | 36 | $this->gateways[$parameters['name']] = $gateway; 37 | 38 | return $gateway; 39 | } 40 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Payment/OrderInterface.php: -------------------------------------------------------------------------------- 1 | providers[$systemName] = $paramsProvider; 13 | } 14 | 15 | /** 16 | * @param OrderInterface $order 17 | * @return array 18 | */ 19 | public function getParametersFromOrder(OrderInterface $order) 20 | { 21 | return $this->providers[$order->getPaymentInstruction()->getPaymentSystemName()] 22 | ->getParametersFromOrder($order); 23 | } 24 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Payment/PaymentGatewayBuilderInterface.php: -------------------------------------------------------------------------------- 1 | inputReader = $inputReader; 18 | $this->decodedInput = json_decode($inputReader->getStandardInput(), true); 19 | if (isset($this->decodedInput['posData'])) { 20 | $this->decodedInput['posData'] = json_decode($this->decodedInput['posData'], true); 21 | } 22 | } 23 | 24 | public function isNew() 25 | { 26 | return BitPayStatus::STATUS_NEW == $this->getStatus(); 27 | } 28 | 29 | public function getHash() 30 | { 31 | return $this->decodedInput['posData']['hash']; 32 | } 33 | 34 | public function getOrderId() 35 | { 36 | return $this->decodedInput['posData']['posData']['order']; 37 | } 38 | 39 | public function getStatus() 40 | { 41 | return $this->decodedInput['status']; 42 | } 43 | 44 | public function getPrice() 45 | { 46 | return $this->decodedInput['price']; 47 | } 48 | 49 | public function getId() 50 | { 51 | return $this->decodedInput['id']; 52 | } 53 | 54 | public function hasOrderId() 55 | { 56 | return array_key_exists('posData', $this->decodedInput) 57 | && array_key_exists('posData', $this->decodedInput['posData']) 58 | && array_key_exists('order', $this->decodedInput['posData']['posData']); 59 | } 60 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Payment/Util/BitPayOrderApprovalDeterminer.php: -------------------------------------------------------------------------------- 1 | getStatus(), BitPayStatus::getCompletedStatuses()); 13 | } 14 | 15 | public function shouldCancel(AbstractOmnipayRequest $request) 16 | { 17 | return in_array($request->getStatus(), BitPayStatus::getNonCompletedStatuses()); 18 | } 19 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Payment/Util/HmacOrderHashGenerator.php: -------------------------------------------------------------------------------- 1 | hashAlgorithm = $hashAlgorithm; 15 | $this->hashKey = $hashKey; 16 | } 17 | 18 | public function hashOrder(OrderInterface $order) 19 | { 20 | return hash_hmac($this->hashAlgorithm, $this->getHash($order), $this->hashKey); 21 | } 22 | 23 | private function getHash(OrderInterface $order) 24 | { 25 | return $order->getId() . '_' . $order->getPaymentInstruction()->getId(); 26 | } 27 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Payment/Util/OrderApprovalDeterminerInterface.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Hyper\AdsBundle\Payment\OmnipayGatewayFactory 13 | Symfony\Bridge\Monolog\Logger 14 | Monolog\Handler\StreamHandler 15 | Hyper\AdsBundle\Util\StandardInputReader 16 | Hyper\AdsBundle\Payment\InvoiceAddressRetriever 17 | Hyper\AdsBundle\Payment\ParamsProviders 18 | Hyper\AdsBundle\Payment\Util\HmacOrderHashGenerator 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | pay 29 | 30 | 31 | 32 | 33 | 34 | 35 | %kernel.logs_dir%/%kernel.environment%.payments.log 36 | 200 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | %hyper_ads.payment_hash_algorithm% 49 | %hyper_ads.payment_hash_key% 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/doc/index.rst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/doc/index.rst -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitcurex-adres-wyplat-bitcoin-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitcurex-adres-wyplat-bitcoin-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitcurex-adres-wyplat-bitcoin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitcurex-adres-wyplat-bitcoin.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitcurex-adres-zwrotny-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitcurex-adres-zwrotny-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitcurex-adres-zwrotny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitcurex-adres-zwrotny.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitcurex-wyplata-btc-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitcurex-wyplata-btc-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitcurex-wyplata-btc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitcurex-wyplata-btc.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitpay-invoice-paid-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitpay-invoice-paid-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitpay-invoice-paid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitpay-invoice-paid.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitpay-invoice-to-be-paid-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitpay-invoice-to-be-paid-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitpay-invoice-to-be-paid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitpay-invoice-to-be-paid.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitxurex-dane-konta-do-wplat-pln-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitxurex-dane-konta-do-wplat-pln-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitxurex-dane-konta-do-wplat-pln.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitxurex-dane-konta-do-wplat-pln.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitxurex-dane-konta-do-wyplat-btc-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitxurex-dane-konta-do-wyplat-btc-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitxurex-dane-konta-do-wyplat-btc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitxurex-dane-konta-do-wyplat-btc.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitxurex-edycja-danych-konta-do-wyplat-btc-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitxurex-edycja-danych-konta-do-wyplat-btc-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/bitxurex-edycja-danych-konta-do-wyplat-btc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/bitxurex-edycja-danych-konta-do-wyplat-btc.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/hyperreal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/hyperreal.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-informacje-o-strefach-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-informacje-o-strefach-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-informacje-o-strefach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-informacje-o-strefach.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-oplac-banner-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-oplac-banner-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-oplac-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-oplac-banner.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-potwierdzenie-rejestracji-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-potwierdzenie-rejestracji-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-potwierdzenie-rejestracji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-potwierdzenie-rejestracji.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-rejestracja-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-rejestracja-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-rejestracja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-rejestracja.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-strefy-dla-bannera-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-strefy-dla-bannera-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-strefy-dla-bannera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-strefy-dla-bannera.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-strona-glowna-informacje-o-strefach-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-strona-glowna-informacje-o-strefach-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-strona-glowna-informacje-o-strefach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-strona-glowna-informacje-o-strefach.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-twoje-bannery-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-twoje-bannery-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-twoje-bannery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-twoje-bannery.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-wgrywanie-bannera-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-wgrywanie-bannera-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-wgrywanie-bannera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-wgrywanie-bannera.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-zarejestruj-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-zarejestruj-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mak-zarejestruj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mak-zarejestruj.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-initial-screen-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-initial-screen-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-initial-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-initial-screen.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-received-waiting-for-validation-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-received-waiting-for-validation-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-received-waiting-for-validation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-received-waiting-for-validation.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-return-address-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-return-address-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-return-address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-return-address.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-sending-address-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-sending-address-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-sending-address.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-sending-address.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-successful-M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-successful-M.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-successful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/src/Hyper/AdsBundle/Resources/public/images/mtgox-payment-successful.png -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/images/resize-to-miniature.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | convert -resize 200x135 $1 $2 3 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/js/payment.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready(function() { 3 | $("select").change(getPrices); 4 | getPrices(); 5 | }); 6 | })(jQuery); 7 | 8 | function getPrices() { 9 | var from = getForm('from', 'year') + '-' + getForm('from', 'month') + '-' + getForm('from', 'day'); 10 | var to = getForm('to', 'year') + '-' + getForm('to', 'month') + '-' + getForm('to', 'day'); 11 | 12 | $.post('./calculate', {"from": from, "to": to}, function(data) { 13 | $("#days-info").html(Mustache.render($("#price-tpl").html(), data)).show(); 14 | }, 'json'); 15 | } 16 | 17 | function getForm(dir, per) { 18 | return $('#hyper_payment_form_pay_' + dir + '_' + per).val(); 19 | } -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/less/global.less: -------------------------------------------------------------------------------- 1 | /* (C) hyperreal.info 2014 */ 2 | 3 | @icon-font-path: "/components/bootstrap/fonts/"; 4 | @fa-font-path: "/components/font-awesome/fonts/"; 5 | 6 | body { 7 | padding: 60px 0 20px 0; 8 | } 9 | 10 | ul.nav { 11 | padding-right: 15px; 12 | } 13 | 14 | li.nav-header { 15 | padding-top:1px; 16 | padding-bottom:5px; 17 | padding-right:0px; 18 | padding-left:0px; 19 | } 20 | 21 | .navbar { 22 | zoom: 1; 23 | filter: alpha(opacity=50); 24 | opacity: 0.5; 25 | background: green; 26 | color: white; 27 | } 28 | 29 | html > body > nav.navbar.navbar-fixed-top > div.container > ul.nav.navbar-nav > li > a { 30 | color: white; 31 | } 32 | 33 | html > body > nav.navbar.navbar-fixed-top > div.navbar-header > a.navbar-brand { 34 | color: white; 35 | } 36 | 37 | a.fancybox img { 38 | border: 5px solid transparent; 39 | } 40 | 41 | ul.no-buttons { 42 | list-style-type: none; 43 | } 44 | 45 | menu, ul.no-buttons { 46 | margin: 0; 47 | padding: 0; 48 | } 49 | 50 | form { 51 | label { 52 | float: left; 53 | width: 150px; 54 | text-align: right; 55 | padding: 7px 5px 0 0; 56 | } 57 | div.with-file > div > div:nth-child(2) { 58 | margin-top: 8px; 59 | } 60 | 61 | } 62 | 63 | .spanned-column { 64 | background: #d5edf8; 65 | } 66 | 67 | form div > ul { 68 | list-style: none; 69 | float: right; 70 | } 71 | 72 | #tutorial { 73 | p, ul { 74 | font-family: 'Headland One', serif; 75 | } 76 | } 77 | 78 | .no-payment-possible { 79 | margin: 0; 80 | padding: 0; 81 | } 82 | 83 | #tutorial tbody tr:nth-child(2n) td, .cke_dialog_contents tbody tr:nth-child(2n) td { 84 | background: #fff; 85 | } 86 | 87 | table label.table { 88 | float: none; 89 | margin-left: 9px; 90 | font-weight: normal; 91 | padding: 0; 92 | } 93 | 94 | #annoucement_full_type { 95 | > div { 96 | clear: both; 97 | padding: 5px 0; 98 | } 99 | } 100 | 101 | #hyper_payment_form { 102 | 103 | .input-group > .col-lg-3 { 104 | padding: 0; 105 | &:first-child { 106 | padding-left: 15px; 107 | } 108 | &:last-child { 109 | padding-right: 15px; 110 | } 111 | } 112 | 113 | select.form-control { 114 | float: left; 115 | } 116 | } 117 | 118 | .cke { 119 | clear: both; 120 | } 121 | 122 | .payment-info { 123 | margin-top: 15px; 124 | } 125 | .panel-heading .accordion-toggle:after { 126 | /* symbol for "opening" panels */ 127 | font-family: 'Glyphicons Halflings'; /* essential for enabling glyphicon */ 128 | content: "\e114"; /* adjust as needed, taken from bootstrap.css */ 129 | float: right; /* adjust as needed */ 130 | color: grey; /* adjust as needed */ 131 | } 132 | .panel-heading .accordion-toggle.collapsed:after { 133 | /* symbol for "collapsed" panels */ 134 | content: "\e080"; /* adjust as needed, taken from bootstrap.css */ 135 | } 136 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/less/global.less-fajkaorg: -------------------------------------------------------------------------------- 1 | @icon-font-path: "/fonts/"; 2 | 3 | body { 4 | padding: 60px 0 20px 0; 5 | } 6 | 7 | ul.nav { 8 | padding-right: 15px; 9 | } 10 | 11 | ul.no-buttons { 12 | list-style-type: none; 13 | } 14 | 15 | menu, ul.no-buttons { 16 | margin: 0; 17 | padding: 0; 18 | } 19 | 20 | form { 21 | label { 22 | float: left; 23 | width: 150px; 24 | text-align: right; 25 | padding: 7px 5px 0 0; 26 | } 27 | div.with-file > div > div:nth-child(2) { 28 | margin-top: 8px; 29 | } 30 | 31 | } 32 | 33 | .spanned-column { 34 | background: #d5edf8; 35 | } 36 | 37 | form div > ul { 38 | list-style: none; 39 | float: right; 40 | } 41 | 42 | #tutorial { 43 | p, ul { 44 | font-family: 'Headland One', serif; 45 | } 46 | } 47 | 48 | .no-payment-possible { 49 | margin: 0; 50 | padding: 0; 51 | } 52 | 53 | #tutorial tbody tr:nth-child(2n) td, .cke_dialog_contents tbody tr:nth-child(2n) td { 54 | background: #fff; 55 | } 56 | 57 | table label.table { 58 | float: none; 59 | margin-left: 9px; 60 | font-weight: normal; 61 | padding: 0; 62 | } 63 | 64 | #annoucement_full_type { 65 | > div { 66 | clear: both; 67 | padding: 5px 0; 68 | } 69 | } 70 | 71 | #hyper_payment_form { 72 | 73 | .input-group > .col-lg-3 { 74 | padding: 0; 75 | &:first-child { 76 | padding-left: 15px; 77 | } 78 | &:last-child { 79 | padding-right: 15px; 80 | } 81 | } 82 | 83 | select.form-control { 84 | float: left; 85 | } 86 | } 87 | 88 | .cke { 89 | clear: both; 90 | } 91 | 92 | .payment-info { 93 | margin-top: 15px; 94 | } 95 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/less/main.less: -------------------------------------------------------------------------------- 1 | 2 | @import "web/components/bootstrap/less/bootstrap.less"; 3 | @import "web/components/font-awesome/less/font-awesome.less"; 4 | @import "src/Hyper/AdsBundle/Resources/public/less/variables-flatly.less"; 5 | @import "src/Hyper/AdsBundle/Resources/public/less/bootswatch-flatly.less"; 6 | @import "src/Hyper/AdsBundle/Resources/public/less/global.less"; 7 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/less/main.less-flatly: -------------------------------------------------------------------------------- 1 | 2 | @import "web/components/bootstrap/less/bootstrap.less"; 3 | @import "web/components/font-awesome/less/font-awesome.less"; 4 | @import "src/Hyper/AdsBundle/Resources/public/less/variables-flatly.less"; 5 | @import "src/Hyper/AdsBundle/Resources/public/less/bootswatch-flatly.less"; 6 | @import "src/Hyper/AdsBundle/Resources/public/less/global.less"; 7 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/public/less/main.less-retro: -------------------------------------------------------------------------------- 1 | 2 | @import "web/components/bootstrap/less/bootstrap.less"; 3 | @import "web/components/font-awesome/less/font-awesome.less"; 4 | @import "src/Hyper/AdsBundle/Resources/public/less/variables-retro.less"; 5 | @import "src/Hyper/AdsBundle/Resources/public/less/bootswatch-retro.less"; 6 | @import "src/Hyper/AdsBundle/Resources/public/less/global.less"; 7 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Advertiser/edit.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme edit_form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %} 5 | {{ 'edit.advertiser'|babel({'advertiserName': entity.username}) }} 6 | {% endblock %} 7 | {% block body %} 8 |

{{ 'edit.advertiser'|babel({'advertiserName': entity.username}) }}

9 | 10 |
11 | {{ form_widget(edit_form) }} 12 |
13 | {{ 'back.to.the.list'|babel }} 14 |
15 | 16 | 17 |
18 |
19 |
20 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Advertiser/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'list.advertiser'|babel }} 4 | {% endblock %} 5 | {% block body %} 6 |

{{ 'list.advertiser'|babel }}

7 | 8 | {% if entities|length > 0 %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {% for entity in entities %} 20 | 21 | 22 | 23 | 24 | 38 | 39 | {% endfor %} 40 | 41 |
{{ 'id'|babel }}{{ 'name'|babel }}{{ 'email'|babel }}{{ 'actions'|babel }}
{{ entity.id }}{{ entity.username }}{{ entity.email }} 25 | 37 |
42 | {% else %} 43 |
{{ 'no.entities'|babel }}
44 | {% endif %} 45 | 46 |
47 | {{ 'create.new.entry'|babel }} 48 |
49 | 50 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Advertiser/new.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %} 5 | {{ 'new.advertiser'|babel }} 6 | {% endblock %} 7 | {% block body %} 8 |

{{ 'new.advertiser'|babel }}

9 | 10 |
11 | {{ form_widget(form) }} 12 |
13 | 14 | {{ 'back.to.the.list'|babel }} 15 | 16 |
17 | 18 |
19 |
20 |
21 | 22 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Advertiser/show.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block body %} 3 | {% block title %} 4 | {{ 'show.advertiser'|babel({'advertiserName': entity.username}) }} 5 | {% endblock %} 6 |

{{ 'show.advertiser'|babel({'advertiserName': entity.username}) }}

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
{{ 'id'|babel }}{{ entity.id }}
{{ 'name'|babel }}{{ entity.username }}
{{ 'email'|babel }}{{ entity.email }}
{{ 'firstname'|babel }}{{ entity.firstName }}
{{ 'lastname'|babel }}{{ entity.lastName }}
32 | 33 | 45 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Announcement/edit.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %} 5 | {{ 'announcement.edit'|babel({'announcementTitle': announcement.title}) }} 6 | {% endblock %} 7 | {% block body %} 8 |

{{ 'announcement.edit'|babel({'announcementTitle': announcement.title}) }}

9 | 10 |
11 | {{ form_widget(form) }} 12 |
13 | {{ 'back.to.the.list'|babel }} 14 |
15 | 16 | 17 |
18 |
19 |
20 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Announcement/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block title %} 4 | {{ 'announcement.plural.yours'|babel }} 5 | {% endblock %} 6 | 7 | {% block body %} 8 |

{{ 'announcement.plural.yours'|babel }}

9 | 10 | {% if announcements|length > 0 %} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {% for announcement in announcements %} 21 | 22 | 23 | 24 | 27 | 28 | {% endfor %} 29 | 30 |
{{ 'id'|babel }}{{ 'title'|babel }}{{ 'actions'|babel }}
{{ announcement.id }}{{ announcement.title }} 25 | Edytuj 26 |
31 | {% else %} 32 |
{{ 'announcements.list.empty'|babel }}
33 | {% endif %} 34 | 35 | 38 | 39 | {% endblock %} 40 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Announcement/new.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %} 5 | {{ 'announcement.new'|babel }} 6 | {% endblock %} 7 | 8 | {% block body %} 9 | 10 |
11 | {{ form_widget(form) }} 12 |
13 | {{ 'back.to.the.list'|babel }} 14 |
15 | 16 |
17 |
18 |
19 | 20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Banner/edit.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme edit_form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %} 5 | {{ 'edit.banner'|babel }} 6 | {% endblock %} 7 | {% block body %} 8 |

{{ 'edit.banner'|babel }}

9 | 10 |
11 | {{ form_widget(edit_form) }} 12 |
13 | 14 | {{ 'back.to.the.list'|babel }} 15 | 16 |
17 | 18 |
19 |
20 |
21 | 22 |
23 |
24 | {{ form_widget(delete_form) }} 25 | 26 |
27 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Banner/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'list.banner'|babel }} 4 | {% endblock %} 5 | {% block body %} 6 |

{{ 'list.banner'|babel }}

7 | 8 | {% if entities|length > 0 %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | {% for entity in entities %} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 44 | 45 | {% endfor %} 46 | 47 |
{{ 'id'|babel }}{{ 'file'|babel }}{{ 'extension'|babel }}{{ 'width'|babel }}{{ 'height'|babel }}{{ 'type'|babel }}{{ 'actions'|babel }}
{{ entity.id }}{{ entity.file }}{{ entity.extension }}{{ entity.width }}{{ entity.height }}{{ entity.type }} 31 | 43 |
48 | {% else %} 49 |
{{ 'no.entities'|babel }}
50 | {% endif %} 51 |
52 | 53 | {{ 'create.new.entry'|babel }} 54 | 55 |
56 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Banner/new.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme edit_form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %} 5 | {{ 'new.banner'|babel }} 6 | {% endblock %} 7 | 8 | {% block body %} 9 |

{{ 'new.banner'|babel }}

10 | 11 |
12 | {{ form_widget(form) }} 13 |

14 | 15 |

16 |
17 | 18 | 25 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Banner/show.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'show.banner'|babel }} 4 | {% endblock %} 5 | {% block body %} 6 |

Banner

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
{{ 'id'|babel }}{{ entity.id }}
{{ 'file'|babel }}{{ entity.path }}
{{ 'extension'|babel }}{{ entity.extension }}
{{ 'width'|babel }}{{ entity.width }}
{{ 'height'|babel }}{{ entity.height }}
{{ 'type'|babel }}{{ entity.type }}
{{ 'title'|babel }}{{ entity.title }}
{{ 'linktitle'|babel }}{{ entity.linkTitle }}
{{ 'url'|babel }}{{ entity.url }}
{{ 'description'|babel }}{{ entity.description }}
52 | 53 | 71 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Page/edit.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme edit_form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %} 5 | {{ 'edit.page'|babel({'pageName': entity.name}) }} 6 | {% endblock %} 7 | 8 | {% block body %} 9 |

{{ 'edit.page'|babel({'pageName': entity.name}) }}

10 | 11 |
12 | {{ form_widget(edit_form) }} 13 |
14 | {{ 'back.to.the.list'|babel }} 15 |
16 | 17 | 18 |
19 |
20 |
21 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Page/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'list.page'|babel }} 4 | {% endblock %} 5 | {% block body %} 6 |

{{ 'list.page'|babel }}

7 | 8 | {% if entities|length > 0 %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {% for entity in entities %} 20 | 21 | 22 | 23 | 24 | 38 | 39 | {% endfor %} 40 | 41 |
{{ 'id'|babel }}{{ 'name'|babel }}{{ 'url'|babel }}{{ 'actions'|babel }}
{{ entity.id }}{{ entity.name }}{{ entity.url }} 25 | 37 |
42 | {% else %} 43 |
{{ 'no.entities'|babel }}
44 | {% endif %} 45 |
46 | {{ 'create.new.entry'|babel }} 47 |
48 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Page/new.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %} 5 | {{ 'new.page'|babel }} 6 | {% endblock %} 7 | {% block body %} 8 |

{{ 'new.page'|babel }}

9 | 10 |
11 | {{ form_widget(form) }} 12 |
13 | {{ 'back.to.the.list'|babel }} 14 |
15 | 16 |
17 |
18 |
19 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Page/show.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'show.page'|babel({'pageName': entity.name}) }} 4 | {% endblock %} 5 | {% block body %} 6 |

{{ 'show.page'|babel({'pageName': entity.name}) }}

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
{{ 'id'|babel }}{{ entity.id }}
{{ 'name'|babel }}{{ entity.name }}
{{ 'url'|babel }}{{ entity.url }}
24 | 25 | 43 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Zone/edit.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme edit_form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %} 5 | {{ 'edit.zone'|babel({'zoneName': entity.name}) }} 6 | {% endblock %} 7 | {% block body %} 8 |

{{ 'edit.zone'|babel({'zoneName': entity.name}) }}

9 | 10 |
11 | {{ form_widget(edit_form) }} 12 |
13 | {{ 'back.to.the.list'|babel }} 14 |
15 | 16 |
17 |
18 |
19 | 20 |
21 |
22 | {{ form_widget(delete_form) }} 23 | 24 |
25 |
26 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Zone/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'list.zone'|babel }} 4 | {% endblock %} 5 | {% block body %} 6 |

{{ 'list.zone'|babel }}

7 | 8 | {% if entities|length > 0 %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | {% for entity in entities %} 24 | 25 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 52 | 53 | {% endfor %} 54 | 55 |
{{ 'id'|babel }}{{ 'name'|babel }}{{ 'page'|babel }}{{ 'enabled'|babel }}{{ 'max.width'|babel }}{{ 'max.height'|babel }}{{ 'type'|babel }}{{ 'actions'|babel }}
26 | {{ entity.id }} 27 | 29 | {{ entity.name }} 30 |
31 | {{ 'show.banners'|babel }} 32 |
{{ entity.page.name }}{{ entity.enabled }}{{ entity.maxWidth }}{{ entity.maxHeight }}{{ entity.type }} 39 | 51 |
56 | {% else %} 57 |
{{ 'no.entities'|babel }}
58 | {% endif %} 59 |
60 | {{ 'create.new.entry'|babel }} 61 |
62 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Zone/new.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %} 5 | {{ 'new.zone'|babel }} 6 | {% endblock %} 7 | {% block body %} 8 |

{{ 'new.zone'|babel }}

9 | 10 |
11 | {{ form_widget(form) }} 12 |
13 | {{ 'back.to.the.list'|babel }} 14 |
15 | 16 |
17 |
18 |
19 | 20 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Admin/Zone/show.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'show.zone'|babel({'zoneName': entity.name}) }} 4 | {% endblock %} 5 | {% block body %} 6 |

{{ 'show.zone'|babel({'zoneName': entity.name}) }}

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
{{ 'id'|babel }}{{ entity.id }}
{{ 'name'|babel }}{{ entity.name }}
{{ 'name'|babel }}{{ entity.enabled }}
{{ 'max.width'|babel }}{{ entity.maxWidth }}
{{ 'max.height'|babel }}{{ entity.maxHeight }}
{{ 'type'|babel }}{{ entity.type }}
36 | 37 | 55 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/ChangePassword/changePassword.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block title %}{{ 'change_password.submit'|trans({}, 'FOSUserBundle') }}{% endblock %} 4 | 5 | {% block body %} 6 |

{{ 'change_password.submit'|trans({}, 'FOSUserBundle') }}

7 | {% include "FOSUserBundle:ChangePassword:changePassword_content.html.twig" %} 8 | {% endblock body %} 9 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/ChangePassword/changePassword_content.html.twig: -------------------------------------------------------------------------------- 1 | {% form_theme form "HyperAdsBundle::acidFormTheme.html.twig" %} 2 | 3 |
4 | {{ form_widget(form) }} 5 |
6 | 7 |
8 |
9 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Default/demo.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Demo 5 | 6 | 11 | 12 | 13 | 18 | 19 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Default/frame.html.twig: -------------------------------------------------------------------------------- 1 | {% macro bannerWidget(bnr, z) %} 2 | {% if bnr.type == 'text' %} 3 | 4 | {% elseif bnr.type == 'image' %} 5 | 6 | {{ bnr.linkTitle }} 7 | 8 | {% endif %} 9 | {% endmacro %} 10 | 11 | 12 | 13 | 14 | {{ banner.title }} 15 | {% if banner.type == 'flash' %} 16 | 17 | 20 | {% endif %} 21 | 22 | 23 | 24 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Default/head.js.twig: -------------------------------------------------------------------------------- 1 | (function() { 2 | var root = this; 3 | var previousAcid = root.Acid; 4 | 5 | var Acid; 6 | Acid = root.Acid = {}; 7 | 8 | Acid.cookie = Math.round(Math.random() * 1000); 9 | Acid.flashEnabled = isFlashEnabled(); 10 | Acid.dataCollectors = new Array(); 11 | 12 | Acid.showZone = function(id, width, height) { 13 | var params = ''; 14 | params += 'sr=' + encodeURIComponent(document.referrer) + '&'; 15 | params += 'uf=' + encodeURIComponent(this.flashEnabled.toString()) + '&'; 16 | params += 'ref=' + encodeURIComponent(document.URL) + '&'; 17 | 18 | for (var col in Acid.dataCollectors) { 19 | var hash = Acid.dataCollectors[col](); 20 | for (var key in hash) { 21 | params += key + '=' + encodeURIComponent(hash[key]); 22 | } 23 | } 24 | 25 | var srv = "{{ server }}"; 26 | var path = 'http://' + srv + '/frame/' + id + '?' + params; 27 | var iframe = ''; 28 | document.write(iframe); 29 | }; 30 | 31 | Acid.addDataCollector = function(func) { 32 | if (typeof(func) == 'function') { 33 | Acid.dataCollectors.push(func); 34 | } 35 | } 36 | 37 | function isFlashEnabled() { 38 | if (navigator.plugins && navigator.plugins.length > 0) { 39 | if (navigator.plugins['Shockwave Flash'] || navigator.plugins['Shockwave Flash 2.0']) { 40 | return true; 41 | } 42 | } else if (navigator.mimeTypes && navigator.mimeTypes.length > 0) { 43 | var x = navigator.mimeTypes['application/x-shockwave-flash']; 44 | if (x && x.enabledPlugin) { 45 | return true; 46 | } 47 | } else if (navigator.userAgent && navigator.userAgent.indexOf('MSIE') >= 0 && navigator.appVersion.indexOf('Win') != -1) { 48 | try { 49 | for (i = 3; i <= 12; i++) { 50 | var x = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i.toString()); 51 | if (x) { 52 | return true; 53 | } 54 | } 55 | } catch (e) {} 56 | } 57 | 58 | return false; 59 | }; 60 | 61 | 62 | }).call(this); 63 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Default/heroUnit.html.twig: -------------------------------------------------------------------------------- 1 |
2 |

Acid Ad Server

3 |
Many a small thing has been made large by the right kind of advertising. 4 |
5 | Mark Twain 6 |
7 |

8 | Dowiedz się więcej 9 |

10 |
11 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Default/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'welcome'|babel }} 4 | {% endblock %} 5 | {% block body %} 6 | 7 | {% include "HyperAdsBundle:Default:heroUnit.html.twig" %} 8 | 9 | {% if is_granted("ROLE_USER") %} 10 | 19 |
20 |
21 |

{{ 'banners'|babel }}

22 |

23 | {{ 'banner.buy'|babel }} 24 |

25 |
26 | 27 |
28 |

{{ 'announcement.plural'|babel }}

29 |

30 | W przygotowaniu 31 |

32 |
33 | 34 |
35 |

{{ 'announcement.free'|babel }}

36 |

37 | W przygotowaniu 38 |

39 | 44 |
45 |
46 | {% endif %} 47 | 48 | {% endblock %} 49 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Default/rules.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'rules'|babel }} 4 | {% endblock %} 5 | {% block body %} 6 |

{{ 'rules'|babel }}

7 |
8 | 9 |
10 |

Regulamin ogłoszeń w serwisach hyperreala

11 | 12 |
    13 |
  1. Serwery hyperreal.info są ulokowane poza terytorium Polski. Jednakże używając ich, podlegasz prawu kraju, w którym fizycznie się znajdujesz.
  2. 14 |
  3. Za każdą reklamę zamieszczoną na hyperreal.info odpowiada wyłącznie ogłoszeniodawca. Publikacja reklam odbywa się automatycznie, bez wiedzy i akceptacji serwisu hyperreal.info.
  4. 15 |
  5. Hyperreal.info nie przechowuje logów serwerów, jedyną informacją jaką dysponujemy, jest adres email podany podczas zakładania konta. W przypadku pisemnego żądania organów upoważnionych (prokuratura lub sąd), nie zawahamy się przed podaniem tego adresu.
  6. 16 |
  7. Wszystkie transakcje przeprowadzane są za pomocą Bitcoinów (BTC), które zapewniają wysoki poziom anonimowości i nie podlegają instytucjom bankowym.
  8. 17 |
  9. Hyperreal.info gwarantuje sobie niepodważalne prawo do usunięcia dowolnej reklamy w dowolnym momencie, bez zwrotu BTC. Zobowiązujemy się jednakże do użycia tego prawa wyłącznie w drastycznych przypadkach.
  10. 18 |
  11. Hyperreal.info dokłada wszelkich starań, aby reklamy wyświetlane były 24 godziny na dobę, 365 dni w tygodniu, jednakże nie dajemy na to żadnych gwarancji.
  12. 19 |
  13. Reklamy opłacone w wersji forum dla przeglądarek na komputerach stacjonarnych, nie są wyświetlane w wersjach mobilnych na tablety i smartfony (i odwrotnie).
  14. 20 |
  15. Zakładając konto na serwerze reklamowym hyperreal.info, akceptujesz bez uwag niniejszy regulamin i zobowiązujesz się zapoznawać się regularnie z jego ewentualnymi zmianami. W przypadku braku akceptacji zmian w regulaminie, natychmiast skasuj wszystkie zamieszczone przez siebie reklamy i zaprzestań używania serwisu.
  16. 21 |
  17. Przyjmujesz do wiadomości, że używamy cookies.
  18. 22 |
  19. Najważniejszy dla nas jest zadowolony klient. Jeśli masz jakiekolwiek uwagi, napisz do nas niezwłocznie: reklama@hyperreal.biz.
  20. 23 |
24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Default/zonesInfo.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'zones.info'|babel }} 4 | {% endblock %} 5 | 6 | {% block body %} 7 |

{{ 'zones.info'|babel }}

8 | 9 | {% if pages|length > 0 %} 10 |
11 |

{{ 'zones.short.info'|babel }}

12 |
13 | 14 |
15 |

{{ 'zones.long.info'|babel }}

16 |
17 | 18 |
19 |
20 |
21 |

22 |
23 |
24 |

{{ 'zones.price.info'|babel }}

25 |
26 |
27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | {% for page in pages %} 41 | 42 | 43 | {% for zone in page.zones %} 44 | {% if not loop.first %} 45 | 46 | {% endif %} 47 | 48 | 49 | 50 | 51 | 52 | {% endfor %} 53 | {% endfor %} 54 | 55 |
{{ 'page'|babel }}{{ 'zone'|babel }}{{ 'sizes'|babel }}{{ 'base.price'|babel }}{{ 'daily.price'|babel }}
{{ page.name }}{{ zone.name }}{{ zone.maxWidth }} x {{ zone.maxHeight }}{{ zone.dailyRegularPrice|number_format(2, ',', '.') }} {{ default_currency }}{{ zone.dailyPrice|number_format(2, ',', '.') }} {{ default_currency }}
56 | 57 | {% else %} 58 |
59 | {{ 'no.zones.active'|babel }} 60 |
61 | {% endif %} 62 | 63 | {% endblock %} 64 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Group/edit.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block body %} 4 | {% include "FOSUserBundle:Group:edit_content.html.twig" %} 5 | {% endblock body %} 6 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Group/edit_content.html.twig: -------------------------------------------------------------------------------- 1 |
2 | {{ form_widget(form) }} 3 |
4 | 5 |
6 |
7 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Group/list.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block body %} 4 | {% include "FOSUserBundle:Group:list_content.html.twig" %} 5 | {% endblock body %} 6 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Group/list_content.html.twig: -------------------------------------------------------------------------------- 1 |
2 | 7 |
8 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Group/new.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block body %} 4 | {% include "FOSUserBundle:Group:new_content.html.twig" %} 5 | {% endblock body %} 6 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Group/new_content.html.twig: -------------------------------------------------------------------------------- 1 |
2 | {{ form_widget(form) }} 3 |
4 | 5 |
6 |
7 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Group/show.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block body %} 4 | {% include "FOSUserBundle:Group:show_content.html.twig" %} 5 | {% endblock body %} 6 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Group/show_content.html.twig: -------------------------------------------------------------------------------- 1 |
2 |

{{ 'group.show.name'|trans([], 'FOSUserBundle') }}: {{ group.getName() }}

3 |
4 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Mailing/postPersistAnnouncement.html.twig: -------------------------------------------------------------------------------- 1 |

{{ 'hello'|babel }}

2 | 3 |

4 | {{ 'edit.in.admin.mode'|babel }}: 5 | {{ announcement.title }} 6 |

7 | 8 |

{{ 'announcement.modified'|babel({'%title%': announcement.title}) }}

9 |
10 |

{{ announcement.description|raw }}

-------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Payments/canceledPayment.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'canceled.payment'|babel }} 4 | {% endblock %} 5 | {% block body %} 6 |

{{ 'canceled.payment'|babel }}

7 |
8 | {{ 'payment.was.canceled'|babel }} 9 |
10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Payments/successfulPayment.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'successful.payment'|babel }} 4 | {% endblock %} 5 | {% block body %} 6 |

{{ 'successful.payment'|babel }}

7 |
8 | {{ 'transaction.was.queued'|babel }} 9 |
10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Profile/edit.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block body %} 4 | {% include "FOSUserBundle:Profile:edit_content.html.twig" %} 5 | {% endblock body %} 6 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Profile/edit_content.html.twig: -------------------------------------------------------------------------------- 1 | {% form_theme form "HyperAdsBundle::acidFormTheme.html.twig" %} 2 | 3 |
4 | {{ form_widget(form) }} 5 | 9 |
10 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Profile/show.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block body %} 4 | {% include "FOSUserBundle:Profile:show_content.html.twig" %} 5 | {% endblock body %} 6 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Profile/show_content.html.twig: -------------------------------------------------------------------------------- 1 |
2 |

{{ 'profile.show.username'|trans({}, 'FOSUserBundle') }}: {{ user.username }}

3 |

{{ 'profile.show.email'|trans({}, 'FOSUserBundle') }}: {{ user.email }}

4 |
5 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Registration/checkEmail.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block body %} 4 |
5 | {{ 'registration.check_email'|trans({'%email%': user.email}, 'FOSUserBundle') }} 6 |
7 | {% endblock body %} 8 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Registration/confirmed.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block body %} 4 |
5 | {{ 'registration.confirmed'|trans({'%username%': user.username}, 'FOSUserBundle') }} 6 |
7 | {% if app.session is not empty %} 8 | {% set targetUrl = app.session.get('_security.target_path') %} 9 | {% if targetUrl is not empty %}

{{ 'registration.back'|trans({}, 'FOSUserBundle') }}

{% endif %} 10 | {% endif %} 11 | {% endblock body %} 12 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Registration/email.txt.twig: -------------------------------------------------------------------------------- 1 | {% block subject %} 2 | {% autoescape false %} 3 | {{ 'registration.email.subject'|trans({'%username%': user.username, '%confirmationUrl%': confirmationUrl}, 'FOSUserBundle') }} 4 | {% endautoescape %} 5 | {% endblock %} 6 | {% block body_text %} 7 | {% autoescape false %} 8 | {{ 'registration.email.message'|trans({'%username%': user.username, '%confirmationUrl%': confirmationUrl}, 'FOSUserBundle') }} 9 | {% endautoescape %} 10 | {% endblock %} 11 | {% block body_html %}{% endblock %} 12 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Registration/register.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %}{{ 'register'|babel }}{% endblock %} 5 | 6 | {% block body %} 7 |

{{ 'register'|babel }}

8 | 9 |
10 | {{ form_widget(form) }} 11 |
12 | 13 |
14 |
15 | 16 | {% endblock body %} 17 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Resetting/checkEmail.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block body %} 4 |
5 | {{ 'resetting.check_email'|trans({'%email%': email}, 'FOSUserBundle') }} 6 |
7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Resetting/email.txt.twig: -------------------------------------------------------------------------------- 1 | {% block subject %} 2 | {% autoescape false %} 3 | {{ 'resetting.email.subject'|trans({'%username%': user.username, '%confirmationUrl%': confirmationUrl}, 'FOSUserBundle') }} 4 | {% endautoescape %} 5 | {% endblock %} 6 | {% block body_text %} 7 | {% autoescape false %} 8 | {{ 'resetting.email.message'|trans({'%username%': user.username, '%confirmationUrl%': confirmationUrl}, 'FOSUserBundle') }} 9 | {% endautoescape %} 10 | {% endblock %} 11 | {% block body_html %}{% endblock %} 12 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Resetting/passwordAlreadyRequested.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block body %} 4 |
5 | {{ 'resetting.password_already_requested'|trans({}, 'FOSUserBundle') }} 6 |
7 | {% endblock body %} 8 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Resetting/request.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block title %}{{ 'resetting.request.submit'|trans({}, 'FOSUserBundle') }}{% endblock %} 4 | 5 | {% block body %} 6 |

{{ 'resetting.request.submit'|trans({}, 'FOSUserBundle') }}

7 | {% include "FOSUserBundle:Resetting:request_content.html.twig" %} 8 | {% endblock body %} 9 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Resetting/request_content.html.twig: -------------------------------------------------------------------------------- 1 |
2 |
3 | {% if invalid_username is defined %} 4 |
5 |

{{ 'resetting.request.invalid_username'|trans({'%username%': invalid_username}, 'FOSUserBundle') }}

6 |
7 | {% endif %} 8 |
9 | 10 |
11 | 12 |
13 |
14 |
15 | 16 |
17 | 18 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Resetting/reset.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block title %}{{ 'resetting.request.submit'|trans({}, 'FOSUserBundle') }}{% endblock %} 4 | 5 | {% block body %} 6 |

{{ 'resetting.request.submit'|trans({}, 'FOSUserBundle') }}

7 | {% include "FOSUserBundle:Resetting:reset_content.html.twig" %} 8 | {% endblock body %} 9 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Resetting/reset_content.html.twig: -------------------------------------------------------------------------------- 1 |
2 | {{ form_widget(form) }} 3 |
4 | 5 |
6 |
7 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/Security/login.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'login-form.html-title'|babel }} 4 | {% endblock %} 5 | {% block body %} 6 | {% if error %} 7 |
{{ error|trans({}, 'FOSUserBundle') }}
8 | {% endif %} 9 | 10 | 11 | 31 | {% endblock body %} 32 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/User/Announcement/edit.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %} 5 | {{ 'announcement.edit'|babel({'%announcement%': announcement}) }} 6 | {% endblock %} 7 | 8 | {% block body %} 9 | 10 |

{{ 'announcement.edit'|babel({'%announcement%': announcement}) }}

11 |
12 | {{ form_widget(form) }} 13 |
14 | {{ 'back.to.the.list'|babel }} 15 |
16 | 17 | 18 |
19 |
20 |
21 | 22 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/User/Announcement/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block title %} 4 | {{ 'announcement.plural.yours'|babel }} 5 | {% endblock %} 6 | 7 | {% block body %} 8 |

{{ 'announcement.plural.yours'|babel }}

9 | 10 | {% if announcements|length > 0 %} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {% for announcement in announcements %} 21 | 22 | 23 | 24 | 27 | 28 | {% endfor %} 29 | 30 |
{{ 'id'|babel }}{{ 'title'|babel }}{{ 'actions'|babel }}
{{ announcement.id }}{{ announcement.title }} 25 | Edytuj 26 |
31 | {% else %} 32 |
{{ 'announcements.list.empty'|babel }}
33 | {% endif %} 34 | 35 | 38 | 39 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/User/Announcement/new.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %} 5 | {{ 'announcement.new'|babel }} 6 | {% endblock %} 7 | 8 | {% block body %} 9 | 10 |
11 | {{ form_widget(form) }} 12 |
13 | {{ 'back.to.the.list'|babel }} 14 |
15 | 16 |
17 |
18 |
19 | 20 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/User/Announcement/show.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block title %} 4 | {{ 'announcement.edit'|babel({'%announcement%': announcement}) }} 5 | {% endblock %} 6 | 7 | {% block body %} 8 | 9 |

{{ 'announcement.edit'|babel({'%announcement%': announcement}) }}

10 |
11 |
12 | {{ form_label(form.title) }} 13 | {{ form_widget(form.title) }} 14 | {{ form_errors(form.title) }} 15 |
16 |
17 | {{ form_label(form.announcementPaymentType) }} 18 | {{ form_widget(form.announcementPaymentType) }} 19 | {{ form_errors(form.announcementPaymentType) }} 20 |
21 |
22 | {{ form_widget(form.description) }} 23 | {{ form_errors(form.description) }} 24 | {{ form_rest(form) }} 25 |
26 | 27 |
28 | 29 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/User/Banner/add.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme form "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | 4 | {% block title %} 5 | {{ 'banner.buy'|babel }} 6 | {% endblock %} 7 | {% block body %} 8 |
9 |
10 | {{ form_widget(form) }} 11 |
12 |
13 | {{ 'back.to.the.list'|babel }} 14 |
15 | 16 |
17 |
18 |
19 | 20 | {% endblock %} 21 | 22 | {% block javascripts %} 23 | {% if wysiwyg is defined and wysiwyg == 'enabled' %} 24 | 25 | 34 | {% endif %} 35 | {% endblock %} 36 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/User/Banner/edit.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% form_theme editForm "HyperAdsBundle::acidFormTheme.html.twig" %} 3 | {% block title %} 4 | {{ 'banner.buy'|babel }} 5 | {% endblock %} 6 | {% block body %} 7 | 10 |
11 | {{ form_widget(editForm) }} 12 |
13 | {{ 'back.to.the.list'|babel }} 14 |
15 | 16 | 17 |
18 |
19 |
20 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/User/Banner/list.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block title %} 4 | {{ 'your.banners'|babel }} 5 | {% endblock %} 6 | 7 | {% block body %} 8 |

{{ 'your.banners'|babel }}

9 | 10 | {% if banners|length > 0 %} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | {% for banner in banners %} 22 | 23 | 24 | 25 | 29 | 33 | 34 | {% endfor %} 35 | 36 |
{{ 'id'|babel }}{{ 'title'|babel }}{{ 'enabled.in.zones'|babel }}{{ 'actions'|babel }}
{{ banner.id }}{{ banner.title }} 26 | {{ banner.getActiveZonesCount() }} 27 |
{{ 'check.zones'|babel }} 28 |
30 | Edytuj 31 |
{{ 'payments.list'|babel }} 32 |
37 | {% else %} 38 |
{{ 'empty.banners.list'|babel }}
39 | {% endif %} 40 | 41 | 44 | 45 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/User/Banner/pay.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'banner.buy'|babel }} 4 | {% endblock %} 5 | {% block body %} 6 |
7 | {{ form_widget(orderForm) }} 8 | 9 |
10 | 11 | {% if zones|length > 0 %} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {% for zone in zones %} 21 | 22 | 23 | 24 | 25 | {% endfor %} 26 | 27 |
StrefaCena
{{ zone.page.name }} - {{ zone.name }}{{ zonesPrices[zone.id] }}
28 | {% else %} 29 |
Brak stref, w których można by umieścić banner.
30 | {% endif %} 31 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/User/Banner/payInZoneFormTheme.html.twig: -------------------------------------------------------------------------------- 1 | {% extends"HyperAdsBundle::acidFormTheme.html.twig" %} 2 | 3 | {% block choice_widget_collapsed %} 4 | {% spaceless %} 5 |
6 | 20 |
21 | {% endspaceless %} 22 | {% endblock choice_widget_collapsed %} 23 | 24 | {% block date_widget %} 25 | {% spaceless %} 26 | {% if widget == 'single_text' %} 27 | {{ block('form_widget_simple') }} 28 | {% else %} 29 |
30 | {{ date_pattern|replace({ 31 | '{{ year }}': form_widget(form.year), 32 | '{{ month }}': form_widget(form.month), 33 | '{{ day }}': form_widget(form.day), 34 | })|raw }} 35 |
36 | {% endif %} 37 | {% endspaceless %} 38 | {% endblock date_widget %} 39 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/User/Banner/payInZoneSave.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block title %} 4 | {{ 'pay.for.banner.in.zone'|babel({'%banner%': banner.title, '%zone%': zone}) }} 5 | {% endblock %} 6 | 7 | {% block body %} 8 |

9 | {{ 'pay.for.banner'|babel({'%banner%': banner.title}) }} 10 |

11 |
12 | {{ 'pay.for.banner.in.zone.info'|babel({'%banner%': banner.title, '%zone%': zone}) }} 13 |
14 | 15 |
16 | {{ form_widget(form) }} 17 |
18 | 19 |
20 |
21 | 22 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/User/Banner/payments.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | {% block title %} 3 | {{ 'payments.for.announcement'|babel({'%announcement%': announcement.title}) }} 4 | {% endblock %} 5 | {% block body %} 6 |

{{ 'payments.for.announcement'|babel({'%announcement%': announcement.title}) }}

7 | 8 | {% if announcement.orders|length > 0 %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | {% for order in announcement.orders %} 22 | 23 | 24 | 31 | 32 | 39 | 48 | 51 | 52 | {% endfor %} 53 | 54 |
{{ 'order.number'|babel }}{{ 'date.submission'|babel }}{{ 'pay.to'|babel }}{{ 'amount'|babel }}{{ 'is.paid'|babel }}{{ 'zone'|babel }}
{{ order.orderNumber }} 25 | {% if order.paymentInstruction %} 26 | {{ order.paymentInstruction.createdAt|date('d. m. Y') }}r. 27 | {% else %} 28 | {{ 'payment.instruction.not.found'|babel }} 29 | {% endif %} 30 | {{ order.paymentTo|date('d. m. Y') }}r. 33 | {% if order.paymentInstruction %} 34 | {{ order.amount }} {{ order.paymentInstruction.currency }} 35 | {% else %} 36 | {{ 'payment.instruction.not.found'|babel }} 37 | {% endif %} 38 | 40 | {% if order.status == constant('Hyper\\AdsBundle\\Entity\\Order::STATUS_FINISHED') %} 41 | {{ 'yes'|babel }} 42 | {% elseif order.status == constant('Hyper\\AdsBundle\\Entity\\Order::STATUS_CANCELLED') %} 43 | {{ 'cancelled'|babel }} 44 | {% else %} 45 | {{ 'no'|babel }} {{ 'pay'|babel }} 46 | {% endif %} 47 | 49 | {{ order.bannerZoneReference.zone }} 50 |
55 | {% else %} 56 |
{{ 'payments.empty'|babel }}
57 | {% endif %} 58 | 59 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Resources/views/User/Banner/zones.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "::base.html.twig" %} 2 | 3 | {% block title %} 4 | {{ 'zones.for.banner'|babel({'%banner%': banner.title}) }} 5 | {% endblock %} 6 | 7 | {% block body %} 8 |

{{ 'zones.for.banner'|babel({'%banner%': banner.title}) }}

9 | 10 | {% if zones|length > 0 %} 11 |
Poniżej wyświetlono listę stref, do których pasuje wybrany banner.
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | {% for zone in zones %} 24 | {% set reference = banner.getReferenceInZone(zone.id) %} 25 | {% if reference and reference.id in zone.bannerReferencesIds and reference.active %} 26 | {% set zoneActive = true %} 27 | {% else %} 28 | {% set zoneActive = false %} 29 | {% endif %} 30 | 31 | 32 | 36 | 37 | 52 | 53 | {% endfor %} 54 | 55 |
{{ 'id'|babel }}{{ 'banner.in.zone'|babel }}{{ 'page'|babel }}{{ 'paid.to'|babel }}
{{ zone.id }} 33 | 34 | {{ zone.name }} 35 | {{ zone.page.name }} 38 | {% set paidToInZone = banner.getPaidToInZone(zone) %} 39 | {% if banner.orders|length > 0 and paidToInZone %} 40 | {{ 'paid.to.date'|babel({'%date%': paidToInZone|date('d. m. Y')}) }}
41 | 42 | {{ 'extend.the.payment'|babel }} 43 | 44 | {% else %} 45 | {{ 'not.paid'|babel }} 46 |
47 | 48 | {{ 'pay.banner.here'|babel }} 49 | 50 | {% endif %} 51 |
56 |
57 | {{ 'back.to.the.list'|babel }} 58 |
59 | 60 |
61 |
62 |
63 | {% else %} 64 |
{{ 'no.zones.to.add.banner'|babel }}
65 | {% endif %} 66 | 67 | {% endblock %} -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Tests/Entity/BannerTest.php: -------------------------------------------------------------------------------- 1 | banner = new Banner(); 16 | } 17 | 18 | public function testValidInitialization() 19 | { 20 | $this->assertAttributeEquals( 21 | AnnouncementPaymentType::ANNOUNCEMENT_PAYMENT_TYPE_PREMIUM, 22 | 'announcementPaymentType', 23 | $this->banner 24 | ); 25 | 26 | $this->assertAttributeInstanceOf('Doctrine\Common\Collections\Collection', 'zones', $this->banner); 27 | $this->assertAttributeEquals('text', 'type', $this->banner); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Twig/AcidExtension.php: -------------------------------------------------------------------------------- 1 | translator = $translator; 15 | } 16 | 17 | public function getFilters() 18 | { 19 | return array( 20 | 'babel' => new \Twig_Filter_Method($this, 'babelFilter') 21 | ); 22 | } 23 | 24 | public function babelFilter($key, array $parameters = array(), $locale = null) 25 | { 26 | return $this->translator->trans($key, $parameters, 'HyperAdsBundle', $locale); 27 | } 28 | 29 | public function getName() 30 | { 31 | return 'acid_extension'; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Hyper/AdsBundle/Util/StandardInputReader.php: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | 4 | # 5 | # RewriteBase / 6 | # 7 | 8 | RewriteCond %{REQUEST_FILENAME} !-f 9 | RewriteRule ^(.*)$ app.php [QSA,L] 10 | 11 | -------------------------------------------------------------------------------- /web/app.php: -------------------------------------------------------------------------------- 1 | register(true); 14 | //} else { 15 | $loader = require_once __DIR__.'/../app/bootstrap.php.cache'; 16 | //} 17 | 18 | require_once __DIR__.'/../app/AppKernel.php'; 19 | require_once __DIR__.'/../app/AppCache.php'; 20 | 21 | $kernel = new AppKernel('prod', false); 22 | $kernel->loadClassCache(); 23 | $kernel = new AppCache($kernel); 24 | $request = Request::createFromGlobals(); 25 | $response = $kernel->handle($request); 26 | $response->send(); 27 | $kernel->terminate($request, $response); 28 | -------------------------------------------------------------------------------- /web/app_dev.php: -------------------------------------------------------------------------------- 1 | loadClassCache(); 30 | $request = Request::createFromGlobals(); 31 | $response = $kernel->handle($request); 32 | $response->send(); 33 | $kernel->terminate($request, $response); 34 | -------------------------------------------------------------------------------- /web/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/web/apple-touch-icon.png -------------------------------------------------------------------------------- /web/components/.gitkeep: -------------------------------------------------------------------------------- 1 | keep 2 | -------------------------------------------------------------------------------- /web/error503.html.: -------------------------------------------------------------------------------- 1 | 2 |
 3 |    _,---._
 4 |  ,' _____ `. ,--  Chyba cos sie popsulo, naprawiamy!
 5 |  '-( ? ? )-'           (mak.hyperreal.biz)
 6 |     \(_)/
 7 |      )o(
 8 |      """
 9 | 
10 | 11 | -------------------------------------------------------------------------------- /web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperreal/AcidAdServer/79e1ca089c4d012b33c2691007228e1486bd94aa/web/favicon.ico -------------------------------------------------------------------------------- /web/fonts: -------------------------------------------------------------------------------- 1 | components/bootstrap/fonts -------------------------------------------------------------------------------- /web/odblokuj: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -f error503.html 3 | -------------------------------------------------------------------------------- /web/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * 5 | -------------------------------------------------------------------------------- /web/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | keep 2 | -------------------------------------------------------------------------------- /web/zablokuj: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -f error503.html 3 | ln -s error503.html. error503.html 4 | --------------------------------------------------------------------------------