server_shokki
This commit is contained in:
parent
f8fa4ed915
commit
26132854d6
|
|
@ -0,0 +1,36 @@
|
|||
<?php namespace AhmadFatoni\ApiGenerator\Controllers\API;
|
||||
|
||||
use Cms\Classes\Controller;
|
||||
use BackendMenu;
|
||||
use DB;
|
||||
use Config;
|
||||
use Illuminate\Http\Request;
|
||||
use AhmadFatoni\ApiGenerator\Helpers\Helpers;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Tps\Reklama\Models\Reklama;
|
||||
class AdvertisementsController extends Controller
|
||||
{
|
||||
protected $Advertisement;
|
||||
|
||||
protected $helpers;
|
||||
|
||||
public function __construct(Reklama $Advertisement, Helpers $helpers)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->Reklama = $Advertisement;
|
||||
$this->helpers = $helpers;
|
||||
}
|
||||
|
||||
public function index(){
|
||||
$path = Config::get('app.cdn').Config::get('cms.storage.media.path');
|
||||
//categories list
|
||||
$data = $this->Reklama->select('id','title', 'url', DB::raw("IF(media_mobile<>'',concat('$path',media_mobile),media_mobile) as media_mobile"))
|
||||
->where('active',1)
|
||||
->paginate(5)
|
||||
->toArray();
|
||||
|
||||
return $this->helpers->apiArrayResponseBuilder(200, 'success', $data);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ Route::post('fatoni/update/api/{id}', array('as' => 'fatoni.update.api', 'uses'
|
|||
Route::get('fatoni/delete/api/{id}', array('as' => 'fatoni.delete.api', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\ApiGeneratorController@deleteApi'));
|
||||
//postlar bilen categorialar
|
||||
Route::resource('api/categories', 'AhmadFatoni\ApiGenerator\Controllers\API\CategoriesController', ['except' => ['destroy', 'create', 'edit']]);
|
||||
Route::resource('api/advetisements', 'AhmadFatoni\ApiGenerator\Controllers\API\AdvertisementsController', ['except' => ['destroy', 'create', 'edit']]);
|
||||
Route::resource('{locale}/api/posts', 'AhmadFatoni\ApiGenerator\Controllers\API\postsController', ['except' => ['destroy', 'create', 'edit']]);
|
||||
Route::get('api/version',function (){
|
||||
return '2.0.8';
|
||||
|
|
|
|||
|
|
@ -33,3 +33,9 @@ columns:
|
|||
media:
|
||||
label: media
|
||||
type: text
|
||||
searchable: true
|
||||
media_mobile:
|
||||
label: 'Application ADV'
|
||||
type: text
|
||||
searchable: true
|
||||
sortable: true
|
||||
|
|
|
|||
|
|
@ -60,7 +60,12 @@ fields:
|
|||
span: auto
|
||||
type: mediafinder
|
||||
media_mobile:
|
||||
label: 'Media for mobile'
|
||||
label: 'Application Reklama (600x140)'
|
||||
mode: image
|
||||
span: auto
|
||||
type: mediafinder
|
||||
web_media_mobile:
|
||||
label: 'Web Media Mobile Version'
|
||||
mode: image
|
||||
span: left
|
||||
type: mediafinder
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Tps\Reklama\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateTpsReklamaItem5 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('tps_reklama_item', function($table)
|
||||
{
|
||||
$table->boolean('is_banner')->default(true);
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('tps_reklama_item', function($table)
|
||||
{
|
||||
$table->dropColumn('is_banner');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Tps\Reklama\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateTpsReklamaItem6 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('tps_reklama_item', function($table)
|
||||
{
|
||||
$table->string('is_banner')->nullable(false)->unsigned(false)->default('true')->change();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('tps_reklama_item', function($table)
|
||||
{
|
||||
$table->boolean('is_banner')->nullable(false)->unsigned(false)->default(1)->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Tps\Reklama\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateTpsReklamaItem7 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('tps_reklama_item', function($table)
|
||||
{
|
||||
$table->boolean('is_banner')->nullable(false)->unsigned(false)->default(true)->change();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('tps_reklama_item', function($table)
|
||||
{
|
||||
$table->string('is_banner', 191)->nullable(false)->unsigned(false)->default('true')->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Tps\Reklama\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateTpsReklamaItem8 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('tps_reklama_item', function($table)
|
||||
{
|
||||
$table->dropColumn('is_banner');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('tps_reklama_item', function($table)
|
||||
{
|
||||
$table->boolean('is_banner')->default(1);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php namespace Tps\Reklama\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableUpdateTpsReklamaItem9 extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('tps_reklama_item', function($table)
|
||||
{
|
||||
$table->string('web_media_mobile')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('tps_reklama_item', function($table)
|
||||
{
|
||||
$table->dropColumn('web_media_mobile');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -27,3 +27,18 @@
|
|||
1.0.10:
|
||||
- 'Updated table tps_reklama_item'
|
||||
- builder_table_update_tps_reklama_item_4.php
|
||||
1.0.11:
|
||||
- 'Updated table tps_reklama_item'
|
||||
- builder_table_update_tps_reklama_item_5.php
|
||||
1.0.12:
|
||||
- 'Updated table tps_reklama_item'
|
||||
- builder_table_update_tps_reklama_item_6.php
|
||||
1.0.13:
|
||||
- 'Updated table tps_reklama_item'
|
||||
- builder_table_update_tps_reklama_item_7.php
|
||||
1.0.14:
|
||||
- 'Updated table tps_reklama_item'
|
||||
- builder_table_update_tps_reklama_item_8.php
|
||||
1.0.15:
|
||||
- 'Updated table tps_reklama_item'
|
||||
- builder_table_update_tps_reklama_item_9.php
|
||||
|
|
|
|||
|
|
@ -462,4 +462,5 @@
|
|||
'ToughDeveloper\\ImageResizer\\Classes\\Image' => 'plugins/toughdeveloper/imageresizer/classes/Image.php',
|
||||
'ToughDeveloper\\ImageResizer\\Models\\Settings' => 'plugins/toughdeveloper/imageresizer/models/Settings.php',
|
||||
'Rainlab\\Blog\\Models\\Category' => 'plugins/rainlab/blog/models/Category.php',
|
||||
'AhmadFatoni\\ApiGenerator\\Controllers\\API\\AdvertisementsController' => 'plugins/ahmadfatoni/apigenerator/controllers/api/AdvertisementsController.php',
|
||||
);
|
||||
|
|
@ -19,25 +19,16 @@ searchClose.onclick = function () {
|
|||
searchModal.classList.remove("active");
|
||||
};
|
||||
// =============================================
|
||||
function addLink() {
|
||||
//Get the selected text and append the extra info
|
||||
var selection = window.getSelection();
|
||||
pagelink = ". Orient: " + document.location.href;
|
||||
copytext = selection + pagelink;
|
||||
//Create a new div to hold the prepared text
|
||||
newdiv = document.createElement('div');
|
||||
const copyListener = (e) => {
|
||||
const range = window.getSelection().getRangeAt(0),
|
||||
rangeContents = range.cloneContents(),
|
||||
pageLink = `Orient Link: ${document.location.href}`,
|
||||
helper = document.createElement("div");
|
||||
|
||||
//hide the newly created container
|
||||
newdiv.style.position = 'absolute';
|
||||
newdiv.style.left = '-99999px';
|
||||
helper.appendChild(rangeContents);
|
||||
|
||||
//insert the container, fill it with the extended text, and define the new selection
|
||||
document.body.appendChild(newdiv);
|
||||
newdiv.innerHTML = copytext;
|
||||
selection.selectAllChildren(newdiv);
|
||||
|
||||
window.setTimeout(function () {
|
||||
document.body.removeChild(newdiv);
|
||||
}, 100);
|
||||
}
|
||||
document.addEventListener('copy', addLink);
|
||||
event.clipboardData.setData("text/plain", `${helper.innerText}\n${pageLink}`);
|
||||
event.clipboardData.setData("text/html", `${helper.innerHTML}<br>${pageLink}`);
|
||||
event.preventDefault();
|
||||
};
|
||||
document.addEventListener("copy", copyListener);
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ title = "Contact us"
|
|||
<div class="main__sidebar-title">Contacts</div>
|
||||
<div class="address">
|
||||
<div class="address__inner">Address: Turkmenistan, Ashgabat city, Makhtumkuli avenue, 72</div>
|
||||
<div class="address__inner"><span>Phone:</span> <a href="">(+99312) </a>211059</div>
|
||||
<div class="address__inner"><span>Phone:</span> <a href="">(+99312) </a>940786</div>
|
||||
<div class="address__inner"><span>Email:</span> <a href="#">info@orient.tm</a></div></div>
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
[viewBag]
|
||||
title = "Связаться с нами"
|
||||
title = "Контакты"
|
||||
url = "/habarlash"
|
||||
layout = "contacts"
|
||||
is_hidden = 0
|
||||
navigation_hidden = 0
|
||||
robot_index = "index"
|
||||
robot_follow = "follow"
|
||||
localeUrl[en] = "/habarlash"
|
||||
==
|
||||
{% put form %}
|
||||
<div class="form__title">Обратная связь</div>
|
||||
|
|
@ -17,5 +16,5 @@ localeUrl[en] = "/habarlash"
|
|||
<div class="main__sidebar-title">Наши контакты:</div>
|
||||
<div class="address">
|
||||
<div class="address__inner"><span>Наш адрес:</span> Туркменистан, г.Ашхабад, проспект Махтумкули, 72</div>
|
||||
<div class="address__inner"><span>Тел:</span> <a href="">(+99312) </a>211059</div>
|
||||
<div class="address__inner"><span>Тел:</span> <a href="">(+99312) </a>940786</div>
|
||||
<div class="address__inner"><span>Email:</span> <a href="#">info@orient.tm</a></div></div>
|
||||
|
|
@ -9,6 +9,8 @@ random = 0
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{activeLocale}}">
|
||||
<head>
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4375305456879458"
|
||||
crossorigin="anonymous"></script>
|
||||
{% component 'SeoBlogPost' %}
|
||||
{% partial 'head' %}
|
||||
</head>
|
||||
|
|
@ -47,4 +49,4 @@ random = 0
|
|||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ random = 0
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{activeLocale}}">
|
||||
<head>
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4375305456879458"
|
||||
crossorigin="anonymous"></script>
|
||||
{% component 'SeoCmsPage' %}
|
||||
|
||||
{% partial 'head' %}
|
||||
|
|
@ -51,4 +53,4 @@ random = 0
|
|||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ random = 0
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{activeLocale}}">
|
||||
<head>
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4375305456879458"
|
||||
crossorigin="anonymous"></script>
|
||||
{% component 'SeoStaticPage' %}
|
||||
{% partial 'head' %}
|
||||
</head>
|
||||
|
|
@ -51,4 +53,4 @@ $(document).ready(function(){
|
|||
gtag('config', 'G-HHRB3PCSBQ');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,21 +1,4 @@
|
|||
items:
|
||||
-
|
||||
title: Главная
|
||||
nesting: null
|
||||
type: url
|
||||
url: /
|
||||
code: ''
|
||||
reference: null
|
||||
cmsPage: null
|
||||
replace: null
|
||||
viewBag:
|
||||
locale:
|
||||
en:
|
||||
title: Home
|
||||
url: ''
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
isExternal: '0'
|
||||
-
|
||||
title: Разделы
|
||||
nesting: null
|
||||
|
|
@ -153,6 +136,22 @@ items:
|
|||
isHidden: '0'
|
||||
cssClass: ''
|
||||
isExternal: '0'
|
||||
-
|
||||
title: Выборы-2022
|
||||
nesting: 0
|
||||
type: blog-category
|
||||
code: ''
|
||||
reference: '797'
|
||||
cmsPage: category
|
||||
replace: 0
|
||||
viewBag:
|
||||
locale:
|
||||
en:
|
||||
title: Elections-2022
|
||||
url: ''
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
isExternal: '0'
|
||||
-
|
||||
title: Фото
|
||||
nesting: 0
|
||||
|
|
@ -208,6 +207,7 @@ items:
|
|||
title: Объявления
|
||||
nesting: 0
|
||||
type: blog-category
|
||||
url: null
|
||||
code: ''
|
||||
reference: '796'
|
||||
cmsPage: category
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ localeTitle[en] = "Post"
|
|||
[blogPost]
|
||||
slug = "{{ :slug }}"
|
||||
id = "{{ :id }}"
|
||||
categoryPage = "blog/category"
|
||||
categoryPage = 404
|
||||
|
||||
[views]
|
||||
slug = "{{ :slug }}"
|
||||
|
|
@ -134,4 +134,4 @@ post = "post"
|
|||
}
|
||||
});
|
||||
</script>
|
||||
{% endput %}
|
||||
{% endput %}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
[viewBag]
|
||||
==
|
||||
<meta charset="UTF-8">
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4375305456879458"
|
||||
crossorigin="anonymous"></script>
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Oswald:wght@600&family=Roboto:wght@300;400;500;700;900&display=swap"
|
||||
|
|
@ -16,4 +18,4 @@
|
|||
<meta name="msapplication-TileImage" content="{{'assets/images/icon/cropped-cropped-orienticon-270x270.png'|theme}}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="yandex-verification" content="9d83831cdb407bac" />
|
||||
<meta name="yandex-verification" content="9d83831cdb407bac" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue