Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{HTTP_HOST} tvtshop.ru$
RewriteRule ^robots.txt$ web/robots.txt [L]
RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule ^assets/(.*)$ /web/assets/$1 [L]
RewriteRule ^css/(.*)$ web/css/$1 [L]
RewriteRule ^fonts/(.*)$ web/fonts/$1 [L]
RewriteRule ^js/(.*)$ web/js/$1 [L]
RewriteRule ^images/(.*)$ web/images/$1 [L]
RewriteRule ^upload/(.*)$ web/upload/$1 [L]
RewriteRule (.*) /web/$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /web/index.php
# кеширование в браузере на стороне пользователя
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access 7 days"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType text/html "access plus 7 day"
ExpiresByType text/x-javascript "access 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType application/x-shockwave-flash "access 1 year"
</IfModule>
# Cache-Control
<ifModule mod_headers.c>
# 30 дней
<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
# 30 дней
<filesMatch "\.(css|js)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
# 2 дня
<filesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=172800, public, must-revalidate"
</filesMatch>
# 1 день
<filesMatch "\.(html|htm|php)$">
Header set Cache-Control "max-age=172800, private, must-revalidate"
</filesMatch>
</ifModule>
# использование кеша браузеров
FileETag MTime Size
<ifmodule mod_expires.c>
<filesmatch ".(jpg|jpeg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 year"
</filesmatch>
</ifmodule>
#Запрет отдачи HTTP-заголовков Vary браузерам семейства MSIE
<IfModule mod_setenvif.c>
BrowserMatch "MSIE" force-no-vary
BrowserMatch "Mozilla/4.[0-9]{2}" force-no-vary
</IfModule>
#RewriteCond %{HTTP_HOST} !^www\.tvtshop\.ru$ [NC]
#RewriteRule ^(.*)$ http://www.tvtshop.ru/$1 [R=301,L]
Private Sub ObjectComboBox1_Enter()
Dim ПутьКФайлу As String
ПутьКФайлу = ActiveWorkbook.Path & "\db_beton.accdb"
Dim connDB As Object
Set connDB = CreateObject("ADODB.Connection")
Dim rs As Object
Set rs = CreateObject("ADODB.Recordset")
// Подключаемся к базе access
connDB.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; data source=" & ПутьКФайлу
connDB.Open
// Получаем все столбцы "id" и "name"
Set rs = connDB.Execute("SELECT `id`, `name` from `object`")
// И выводим в выпадающем списке полученные результаты
Do While Not rs.EOF
AddInvoice.ObjectComboBox1.AddItem rs(1) // В rs(1) хранятся все "name"
rs.MoveNext
Loop
connDB.Close
Set connDB = Nothing
End Sub
/** пагинация */
$countQuery = clone $query;
$pages = new \loveorigami\pagination\ReversePagination(
[
'totalCount' => $countQuery->distinct()->count(),
'pageSize' => 30, // or in config Yii::$app->params['pageSize']
]
);
$pages->pageSizeParam = false;
$products = $query->distinct()->offset($pages->offset)->limit($pages->limit)->all();
/** пагинация */