<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-475012634280913499</id><updated>2024-08-28T15:05:20.431+03:00</updated><category term="Opencart"/><category term="Портфолио"/><category term="PHP"/><category term="CMS"/><category term="Yii2"/><category term="CSS"/><category term="Codeigniter"/><title type='text'>serg2012</title><subtitle type='html'>PHP,CSS,MySQL,CMS,Opencart,Framework</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-2036891049569404287</id><published>2017-03-01T14:50:00.000+02:00</published><updated>2017-03-01T14:50:44.814+02:00</updated><title type='text'>Nexus 5x Как продлить жизнь аккумулятора</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
LG Nexus 5x изначально жил 1 - 1.5 дня от батареи, что не сильно вдохновляло.&lt;br /&gt;
В этом посте расскажу все свои действия по оптимизации энергопотребления.&lt;br /&gt;
&lt;br /&gt;
Список того, что было сделано&lt;br /&gt;
&lt;br /&gt;
1.Отключил просыпание телефона когда берешь в руки&lt;br /&gt;
2.Отключил OK Google при выключенном телефоне&lt;br /&gt;
3.Отключил подсказки Google Now&lt;br /&gt;
4.Сократил время отключения дисплея на максиму&lt;br /&gt;
5.Удалил privat24, в android 7.1.1 писало потребление энергии 11% что не мало&lt;br /&gt;
&lt;br /&gt;
Итого Nexus 5x при постоянно включенном wi-fi работает вторые сутки. Если верить статистике проживет 2 дня 8 часов.&lt;br /&gt;
&lt;br /&gt;
Точных скриншотов не предоставлю, долго бегал по настройкам девайса и уже точно не помню где все эти настройки.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/2036891049569404287/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2017/03/nexus-5x.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/2036891049569404287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/2036891049569404287'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2017/03/nexus-5x.html' title='Nexus 5x Как продлить жизнь аккумулятора'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-6488217439109223611</id><published>2016-07-15T14:22:00.000+03:00</published><updated>2016-07-18T17:41:44.456+03:00</updated><title type='text'>PHP сортировка по значениям условия WHERE IN </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Была задача вывести результаты запроса с условиям WHERE IN (5,3,6) в том же порядке, как и в условии 5,3,6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SELECT * FROM articles WHERE id IN (5,3,6) ORDER BY FIELD(id, &quot;5&quot;,&quot;3&quot;,&quot;6&quot;);&lt;br /&gt;
&lt;br /&gt;
для codeigniter пишем так&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: ghostwhite; color: #333333; font-family: &#39;Courier New&#39;; font-size: 11,3pt;&quot;&gt;&lt;span style=&quot;background-color: #f7faff; color: teal;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #660e7a; font-weight: bold;&quot;&gt;db&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #660e7a; font-weight: bold;&quot;&gt;_protect_identifiers &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; font-weight: bold;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: teal; font-weight: bold;&quot;&gt;FALSE&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: ghostwhite; color: #333333; font-family: &#39;Courier New&#39;; font-size: 11,3pt;&quot;&gt;&lt;span style=&quot;background-color: #f7faff; color: teal;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #660e7a; font-weight: bold;&quot;&gt;db&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: black;&quot;&gt;order_by&lt;/span&gt;(&lt;span style=&quot;background-color: #f7faff; color: #dd1144;&quot;&gt;&#39;FIELD(id, &quot;&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; font-weight: bold;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #0086b3;&quot;&gt;implode&lt;/span&gt;(&lt;span style=&quot;background-color: #f7faff; color: #dd1144;&quot;&gt;&#39;&quot;,&quot;&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #660000;&quot;&gt;$term&lt;/span&gt;)&lt;span style=&quot;background-color: #f7faff; font-weight: bold;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #dd1144;&quot;&gt;&#39;&quot;)&#39;&lt;/span&gt;)&lt;span style=&quot;background-color: #f7faff;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: ghostwhite; color: #333333; font-family: &#39;Courier New&#39;; font-size: 11,3pt;&quot;&gt;&lt;span style=&quot;background-color: #f7faff; color: teal;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #660e7a; font-weight: bold;&quot;&gt;db&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #660e7a; font-weight: bold;&quot;&gt;_protect_identifiers &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; font-weight: bold;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: teal; font-weight: bold;&quot;&gt;TRUE&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/6488217439109223611/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2016/07/php-where-in.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/6488217439109223611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/6488217439109223611'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2016/07/php-where-in.html' title='PHP сортировка по значениям условия WHERE IN '/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-5839968658820547632</id><published>2016-06-29T14:44:00.003+03:00</published><updated>2016-06-30T09:41:24.761+03:00</updated><title type='text'>Транслит кириллицы на PHP (slug)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;function&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;default&quot; style=&quot;background-color: white; color: #336699; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;slugify&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;default&quot; style=&quot;background-color: white; color: #336699; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;$string&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;) {&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;default&quot; style=&quot;background-color: white; color: #336699; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;$string&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;default&quot; style=&quot;background-color: white; color: #336699; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;transliterator_transliterate&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;background-color: white; color: #cc3333; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;&quot;Any-Latin; NFD; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove; Lower();&quot;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;default&quot; style=&quot;background-color: white; color: #336699; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;$string&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;);&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;default&quot; style=&quot;background-color: white; color: #336699; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;$string&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;default&quot; style=&quot;background-color: white; color: #336699; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;preg_replace&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;background-color: white; color: #cc3333; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;&#39;/[-\s]+/&#39;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;background-color: white; color: #cc3333; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;&#39;-&#39;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;default&quot; style=&quot;background-color: white; color: #336699; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;$string&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;);&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;default&quot; style=&quot;background-color: white; color: #336699; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;$string&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;default&quot; style=&quot;background-color: white; color: #336699; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;trim&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;default&quot; style=&quot;background-color: white; color: #336699; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;$string&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;background-color: white; color: #cc3333; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;&#39;-&#39;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: ghostwhite; color: #333333; font-family: &#39;Courier New&#39;; font-size: 11,3pt;&quot;&gt;&lt;span style=&quot;background-color: #f7faff; font-weight: bold;&quot;&gt;   return &lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #0086b3;&quot;&gt;preg_replace&lt;/span&gt;(&lt;span style=&quot;background-color: #f7faff; color: #dd1144;&quot;&gt;&#39;/[^-\s\d\w]/&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: #dd1144;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background-color: #f7faff; color: teal;&quot;&gt;$string&lt;/span&gt;)&lt;span style=&quot;background-color: #f7faff;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;}&lt;br /&gt;&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;default&quot; style=&quot;background-color: white; color: #336699; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;slugify&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;background-color: white; color: #cc3333; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;&quot;Я люблю PHP!&quot;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: white; color: #669933; font-family: &amp;quot;fira mono&amp;quot; , &amp;quot;source code pro&amp;quot; , monospace; font-size: 14px; line-height: 24px;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/5839968658820547632/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2016/06/php-slug.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/5839968658820547632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/5839968658820547632'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2016/06/php-slug.html' title='Транслит кириллицы на PHP (slug)'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-3847323344044596314</id><published>2016-05-11T17:30:00.001+03:00</published><updated>2016-05-11T17:30:51.589+03:00</updated><title type='text'>Как заменить “сломанное” изображение?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h1 style=&quot;background-color: white; color: #333333; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 16px; line-height: 18px; margin: 40px 0px 20px; padding: 0px; text-align: center;&quot;&gt;
Как заменить “сломанное” изображение?&lt;/h1&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 10px; margin-top: 10px; padding: 0px;&quot;&gt;
Случается так, что на странице по различного рода причинам могут не загрузиться те или иные изображения. Это негативно сказывается на восприятии контента. Средствами JavaScript мы можем заменить такие изображения, какими-то заглушками.&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 10px; margin-top: 10px; padding: 0px;&quot;&gt;
Напишем функцию обработчик события&amp;nbsp;&lt;code style=&quot;background: transparent; border: 0px; font-family: Consolas, &#39;Lucida Console&#39;, &#39;Courier New&#39;, Courier, mono-space; line-height: inherit; margin: 0px; outline: 0px; overflow: auto; padding: 0px 2px; vertical-align: baseline; width: inherit;&quot;&gt;onError&lt;/code&gt;:&lt;/div&gt;
&lt;div style=&quot;background: rgb(255, 255, 255); border: 0px; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;font-family: Consolas, &#39;Lucida Console&#39;, &#39;Courier New&#39;, Courier, mono-space; line-height: inherit; margin-bottom: 1em; padding: 0px;&quot;&gt;function imgError(image) {
    image.onerror = &quot;&quot;;
    image.src = &quot;/images/noimage.gif&quot;;
    return true;
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 10px; margin-top: 10px; padding: 0px;&quot;&gt;
Воспользуемся нашей функцией, указав её в атрибуте onerror элементов img.&lt;/div&gt;
&lt;div style=&quot;background: rgb(255, 255, 255); border: 0px; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;font-family: Consolas, &#39;Lucida Console&#39;, &#39;Courier New&#39;, Courier, mono-space; line-height: inherit; margin-bottom: 1em; padding: 0px;&quot;&gt;&amp;lt;img src=&quot;image.png&quot; onerror=&quot;imgError(this);&quot;/&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; margin-bottom: 10px; margin-top: 10px; padding: 0px;&quot;&gt;
Или вариант без использования целой функции:&lt;/div&gt;
&lt;div style=&quot;background: rgb(255, 255, 255); border: 0px; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;font-family: Consolas, &#39;Lucida Console&#39;, &#39;Courier New&#39;, Courier, mono-space; line-height: inherit; margin-bottom: 1em; padding: 0px;&quot;&gt;&amp;lt;img src=&quot;image.png&quot; onError=&quot;this.onerror=null;this.src=&#39;/images/noimage.gif&#39;;&quot; /&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/3847323344044596314/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2016/05/blog-post.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/3847323344044596314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/3847323344044596314'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2016/05/blog-post.html' title='Как заменить “сломанное” изображение?'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-1019009995548088110</id><published>2016-02-27T18:23:00.000+02:00</published><updated>2016-02-27T18:23:00.180+02:00</updated><title type='text'>Общая база или черный список покупателей</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;http://scamdb.info/images/logo.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;база мошенников&quot; border=&quot;0&quot; src=&quot;http://scamdb.info/images/logo.png&quot; title=&quot;база мошенников&quot; /&gt;&lt;/a&gt;http://scamdb.info/&lt;br /&gt;
Добрый день.&lt;br /&gt;
Уже многие интернет магазины подключились к базе мошенников и недобросовестных покупателей. Проверка данных клиента через API scamdb.info в реальном времени.&lt;br /&gt;
Защити себя и своего друга!!! поделись ссылкой )&lt;br /&gt;
http://scamdb.info/&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/1019009995548088110/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2016/02/blog-post.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/1019009995548088110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/1019009995548088110'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2016/02/blog-post.html' title='Общая база или черный список покупателей'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-949622196030419872</id><published>2016-01-13T13:31:00.002+02:00</published><updated>2016-01-13T13:31:42.048+02:00</updated><title type='text'>Codeigniter мультиязычность, смена языка по ссылке</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;application/config/routes.php&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;highlight highlight-text-html-php&quot; style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;//route example: http://domain.tld/en/controller =&amp;gt; http://domain.tld/controller&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$route&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;(\w{2})/(.*)&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;] &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;$2&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$route&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;(\w{2})&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;] &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$route&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;default_controller&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;];&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;application/config/config.php&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;highlight highlight-text-html-php&quot; style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/*&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;|--------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;| Default Language&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;|--------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;|&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;| This determines which set of language files should be used. Make sure&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;| there is an available translation if you intend to use something other&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;| than english.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;|&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;*/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;language&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;] &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;spanish&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* default language abbreviation */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;language_abbr&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;] &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;es&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* set available language abbreviations */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;lang_uri_abbr&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;] &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;array&lt;/span&gt;(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;es&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;spanish&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;en&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;english&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;ja&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;japanese&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* hide the language segment (use cookie) */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;lang_ignore&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;] &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;TRUE&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;application/core/MY_Lang.php&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;highlight highlight-text-html-php&quot; style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;
&lt;pre style=&quot;background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 13.6px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;&quot;&gt;&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;lt&lt;/span&gt;;?php (&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;defined&lt;/span&gt;(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;BASEPATH&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;)) &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;OR&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;exit&lt;/span&gt;(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;No direct script access allowed&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/**&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* Language Identifier&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* Adds a language identifier prefix to all site_url links&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;@copyright&lt;/span&gt;     Copyright (c) 2011 Wiredesignz&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;@version&lt;/span&gt;         0.29&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* Permission is hereby granted, free of charge, to any person obtaining a copy&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* of this software and associated documentation files (the &quot;Software&quot;), to deal&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* in the Software without restriction, including without limitation the rights&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* copies of the Software, and to permit persons to whom the Software is&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* furnished to do so, subject to the following conditions:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* The above copyright notice and this permission notice shall be included in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* all copies or substantial portions of the Software.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;* THE SOFTWARE.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;*/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;pl-en&quot; style=&quot;box-sizing: border-box; color: #795da3;&quot;&gt;MY_Lang&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;pl-e&quot; style=&quot;box-sizing: border-box; color: #795da3;&quot;&gt;CI_Lang&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;    &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;__construct&lt;/span&gt;() {&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;global&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;, &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$CFG&lt;/span&gt;, &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$IN&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$CFG&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;config&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$index_page&lt;/span&gt;    &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;index_page&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;];&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_ignore&lt;/span&gt;   &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;lang_ignore&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;];&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$default_abbr&lt;/span&gt;  &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;language_abbr&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;];&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_uri_abbr&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;lang_uri_abbr&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;];&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* get the language abbreviation from uri */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$uri_abbr&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;segment(&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;1&lt;/span&gt;);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* adjust the uri string leading slash */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;uri_string&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;preg_replace&lt;/span&gt;(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;|^\/?|&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;/&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;uri_string&lt;/span&gt;);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_ignore&lt;/span&gt;) {&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;            &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;isset&lt;/span&gt;(&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_uri_abbr&lt;/span&gt;[&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$uri_abbr&lt;/span&gt;])) {&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* set the language_abbreviation cookie */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$IN&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;set_cookie(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;user_lang&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$uri_abbr&lt;/span&gt;, &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;sess_expiration&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;]);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;            } &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;else&lt;/span&gt; {&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* get the language_abbreviation from cookie */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_abbr&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$IN&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;cookie(&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;cookie_prefix&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;]&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;user_lang&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;            }&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;            &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;strlen&lt;/span&gt;(&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$uri_abbr&lt;/span&gt;) &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;2&lt;/span&gt;) {&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* reset the uri identifier */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$index_page&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;empty&lt;/span&gt;(&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$index_page&lt;/span&gt;) ? &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt; : &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;/&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* remove the invalid abbreviation */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;uri_string&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;preg_replace&lt;/span&gt;(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;|^\/?&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;$uri_abbr&lt;/span&gt;\/?|&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;uri_string&lt;/span&gt;);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* redirect */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;header&lt;/span&gt;(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;Location: &lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;base_url&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;]&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$index_page&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;uri_string&lt;/span&gt;);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;exit&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;            }&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        } &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;else&lt;/span&gt; {&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;            &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* set the language abbreviation */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;            &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_abbr&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$uri_abbr&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        }&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* check validity against config array */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;isset&lt;/span&gt;(&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_uri_abbr&lt;/span&gt;[&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_abbr&lt;/span&gt;])) {&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;           &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* reset uri segments and uri string */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;           &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;segment(&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;array_shift&lt;/span&gt;(&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;segments&lt;/span&gt;));&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;           &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;uri_string&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;preg_replace&lt;/span&gt;(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;|^\/?&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;$lang_abbr&lt;/span&gt;|&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;uri_string&lt;/span&gt;);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;           &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* set config language values to match the user language */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;           &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;language&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;] &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_uri_abbr&lt;/span&gt;[&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_abbr&lt;/span&gt;];&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;           &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;language_abbr&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;] &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_abbr&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;           &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* if abbreviation is not ignored */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;           &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;if&lt;/span&gt; ( &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_ignore&lt;/span&gt;) {&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                   &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* check and set the uri identifier */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                   &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$index_page&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;empty&lt;/span&gt;(&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$index_page&lt;/span&gt;) ? &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_abbr&lt;/span&gt; : &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;/&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;$lang_abbr&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* reset the index_page value */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;index_page&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;] &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$index_page&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;           }&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;           &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* set the language_abbreviation cookie */&lt;/span&gt;               &lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;           &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$IN&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;set_cookie(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;user_lang&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_abbr&lt;/span&gt;, &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;sess_expiration&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;]);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        } &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;else&lt;/span&gt; {&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;            &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* if abbreviation is not ignored */&lt;/span&gt;   &lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;            &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;if&lt;/span&gt; ( &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_ignore&lt;/span&gt;) {                   &lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                   &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* check and set the uri identifier to the default value */&lt;/span&gt;    &lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$index_page&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;empty&lt;/span&gt;(&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$index_page&lt;/span&gt;) ? &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$default_abbr&lt;/span&gt; : &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;/&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;$default_abbr&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;strlen&lt;/span&gt;(&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$lang_abbr&lt;/span&gt;) &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;2&lt;/span&gt;) {&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                    &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* remove invalid abbreviation */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                    &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;uri_string&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;preg_replace&lt;/span&gt;(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;|^\/?&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box; color: #333333;&quot;&gt;$lang_abbr&lt;/span&gt;|&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;uri_string&lt;/span&gt;);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                }&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* redirect */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-c1&quot; style=&quot;box-sizing: border-box; color: #0086b3;&quot;&gt;header&lt;/span&gt;(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;Location: &lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;base_url&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;]&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$index_page&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$URI&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;uri_string&lt;/span&gt;);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;                &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;exit&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;            }&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;            &lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* set the language_abbreviation cookie */&lt;/span&gt;                &lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;            &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$IN&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;set_cookie(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;user_lang&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$default_abbr&lt;/span&gt;, &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$config&lt;/span&gt;[&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;sess_expiration&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;]);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        }&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;        log_message(&lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;debug&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;pl-s&quot; style=&quot;box-sizing: border-box; color: #183691;&quot;&gt;&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;Language_Identifier Class Initialized&lt;span class=&quot;pl-pds&quot; style=&quot;box-sizing: border-box;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;);&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;    }&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-c&quot; style=&quot;box-sizing: border-box; color: #969896;&quot;&gt;/* translate helper */&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;pl-en&quot; style=&quot;box-sizing: border-box; color: #795da3;&quot;&gt;t&lt;/span&gt;(&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$line&lt;/span&gt;) {&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;    &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;global&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$LANG&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;    &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;return&lt;/span&gt; (&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$t&lt;/span&gt; &lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$LANG&lt;/span&gt;&lt;span class=&quot;pl-k&quot; style=&quot;box-sizing: border-box; color: #a71d5d;&quot;&gt;-&amp;gt;&lt;/span&gt;line(&lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$line&lt;/span&gt;)) ? &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$t&lt;/span&gt; : &lt;span class=&quot;pl-smi&quot; style=&quot;box-sizing: border-box;&quot;&gt;$line&lt;/span&gt;;&lt;/span&gt;
&lt;span class=&quot;pl-s1&quot; style=&quot;box-sizing: border-box;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/949622196030419872/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2016/01/codeigniter.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/949622196030419872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/949622196030419872'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2016/01/codeigniter.html' title='Codeigniter мультиязычность, смена языка по ссылке'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-8050117373992428890</id><published>2015-05-04T14:52:00.002+03:00</published><updated>2015-05-04T14:52:52.480+03:00</updated><title type='text'>База мошенников расширение для chrome</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Мы часто покупаем и продаем на сайте olx.ua и часто попадаем на мошенников или недобросовестных покупателей, я думаю что это расширение для chrome поможет нам подстраховаться в неблагополучных сделках.&lt;br /&gt;
Это первая версия расширения, которое помогает в реальном времени проверить продавца или покупателя (клиента) по ФИО, телефону, email ну и других данных на знак недобросовестности, а так же быстро и просто добавить его в базу мошенников и недобросовестных покупателей (коротко черный список).&lt;br /&gt;
&lt;a href=&quot;https://chrome.google.com/webstore/detail/fraudb-%D0%B1%D0%B0%D0%B7%D0%B0-%D0%BC%D0%BE%D1%88%D0%B5%D0%BD%D0%BD%D0%B8%D0%BA%D0%BE%D0%B2/nbkbiljfhpdgfpckjhfbajhlpkbfbdmn?hl=ru&amp;amp;gl=UA&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Ссылка на расширение&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/8050117373992428890/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2015/05/chrome.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/8050117373992428890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/8050117373992428890'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2015/05/chrome.html' title='База мошенников расширение для chrome'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-8223788018750585276</id><published>2015-04-27T18:29:00.000+03:00</published><updated>2015-04-27T18:29:04.607+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Opencart"/><title type='text'>Модуль проверки покупателя (телефона) opencart</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Предлагаю Вам модуль для проверки на совесть Ваших покупателей.&lt;br /&gt;
Давайте вместе развивать базу мошенников и недобросовестных покупателей&amp;nbsp;http://fraudb.pp.ua/ . Каждый из нас часто сталкивается с ситуацией когда клиент заказывает товар новой почтой но потом не забирает, так вот, этот модуль нам поможет. Он проверяет по номеру телефона заказчика в базе мошенников / недобросовестных покупателей fraudb.pp.ua и выводи напротив &amp;nbsp;в заказе сообщение. Модуль написан на VQmod и не заменяет системные файлы. Ссылка для скачивания&amp;nbsp;&lt;a href=&quot;http://fraudb.pp.ua/uploads/modules/fraudb.xml&quot;&gt;http://fraudb.pp.ua/uploads/modules/fraudb.xml&lt;/a&gt;&lt;br /&gt;
Так же на сайте есть API которое вы можете подключит и настроить под свой вкус.&lt;br /&gt;
Все вопросы пишите в контактной форме сайта http://fraudb.pp.ua.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/8223788018750585276/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2015/04/opencart.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/8223788018750585276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/8223788018750585276'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2015/04/opencart.html' title='Модуль проверки покупателя (телефона) opencart'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-3404011844947379487</id><published>2015-03-25T17:14:00.001+02:00</published><updated>2015-03-25T17:14:40.257+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Yii2"/><title type='text'>YII2 checkboxList checked serialize</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
YII2 checkboxList checked serialize&lt;br /&gt;
Пишу сюда, может кому будет полезно.&lt;br /&gt;
Суть вопроса такая, пишу сайт, на котором есть способы доставки с привязкой к методам оплаты.&lt;br /&gt;
В модели добавил метод&amp;nbsp;&lt;span style=&quot;background-color: white; color: teal; font-family: &#39;Courier New&#39;;&quot;&gt;beforeSave()&amp;nbsp;&lt;/span&gt;для записи массива&lt;span style=&quot;background-color: white; color: teal; font-family: &#39;Courier New&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: teal; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre style=&quot;background-color: white; color: #333333; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;public function &lt;/span&gt;&lt;span style=&quot;background-color: #e4e4ff; color: teal;&quot;&gt;beforeSave&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;$insert&lt;/span&gt;)
{
    &lt;span style=&quot;font-weight: bold;&quot;&gt;if &lt;/span&gt;(&lt;span style=&quot;color: teal; font-weight: bold;&quot;&gt;parent&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;beforeSave&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;$insert&lt;/span&gt;)) {
            &lt;span style=&quot;color: teal;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;payment_methods &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;serialize&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;payment_methods&lt;/span&gt;);
        &lt;span style=&quot;font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: teal; font-weight: bold;&quot;&gt;true&lt;/span&gt;;
    } &lt;span style=&quot;font-weight: bold;&quot;&gt;else &lt;/span&gt;{
        &lt;span style=&quot;font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: teal; font-weight: bold;&quot;&gt;false&lt;/span&gt;;
    }
}&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;в отображении делаем так&lt;br /&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; color: #333333; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: #999999; font-weight: bold;&quot;&gt;&amp;lt;?= &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;$form&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;field&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;$model&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;&#39;payment_methods&#39;&lt;/span&gt;)&lt;span style=&quot;font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;checkboxList&lt;/span&gt;(
    &lt;span style=&quot;color: teal;&quot;&gt;ArrayHelper&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;map&lt;/span&gt;(
        &lt;span style=&quot;color: teal;&quot;&gt;PaymentMethods&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;find&lt;/span&gt;()&lt;span style=&quot;font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;all&lt;/span&gt;(),&lt;span style=&quot;color: #dd1144;&quot;&gt;&#39;id&#39;&lt;/span&gt;,&lt;span style=&quot;color: #dd1144;&quot;&gt;&#39;name&#39;&lt;/span&gt;&lt;span style=&quot;color: #dd1144;&quot;&gt;    &lt;/span&gt;)
)&lt;span style=&quot;color: #999999; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #333333; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;color: #999999; font-weight: bold;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
а вот главный вопрос, как сделать чекбоксы отмеченными при редактировании записи, если они ранее были отмечены. Я решил этот вопрос добавив метод в модель&lt;div&gt;
&lt;br /&gt;&lt;div&gt;
&lt;pre style=&quot;background-color: white; color: #333333; font-family: &#39;Courier New&#39;;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;public function &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;afterFind&lt;/span&gt;(){
    &lt;span style=&quot;color: teal;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;payment_methods &lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0086b3;&quot;&gt;unserialize&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;payment_methods&lt;/span&gt;);
}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/3404011844947379487/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2015/03/yii2-checkboxlist-checked-serialize.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/3404011844947379487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/3404011844947379487'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2015/03/yii2-checkboxlist-checked-serialize.html' title='YII2 checkboxList checked serialize'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-2638783042648278372</id><published>2015-02-12T10:38:00.000+02:00</published><updated>2015-02-12T10:38:37.206+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Портфолио"/><title type='text'>Мелкие правки ad-parts.com.ua</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-vaWbFD1n108/VNxmDlpiJ3I/AAAAAAAAKHI/WwuBnvFfp2o/s1600/screenshot-ad-parts.com.ua%2B2015-02-12%2B10-35-16.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-vaWbFD1n108/VNxmDlpiJ3I/AAAAAAAAKHI/WwuBnvFfp2o/s1600/screenshot-ad-parts.com.ua%2B2015-02-12%2B10-35-16.png&quot; height=&quot;448&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Вывод popup, при нажатии на крестик пишется кука и больше не выводится.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/2638783042648278372/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2015/02/ad-partscomua.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/2638783042648278372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/2638783042648278372'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2015/02/ad-partscomua.html' title='Мелкие правки ad-parts.com.ua'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-vaWbFD1n108/VNxmDlpiJ3I/AAAAAAAAKHI/WwuBnvFfp2o/s72-c/screenshot-ad-parts.com.ua%2B2015-02-12%2B10-35-16.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-107423771031011193</id><published>2015-01-25T00:53:00.000+02:00</published><updated>2015-01-25T00:53:48.316+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="Yii2"/><title type='text'>Yii2 SluggableBehavior кириллица intl</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Для того чтобы класс SluggableBehavior работал с кириллицей, php должен быть собран с intl&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/107423771031011193/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2015/01/yii2-sluggablebehavior-intl.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/107423771031011193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/107423771031011193'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2015/01/yii2-sluggablebehavior-intl.html' title='Yii2 SluggableBehavior кириллица intl'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-4407733740429977684</id><published>2014-09-25T15:12:00.000+03:00</published><updated>2014-09-25T15:13:55.335+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CMS"/><category scheme="http://www.blogger.com/atom/ns#" term="Opencart"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Opencart Сортировка изображений в &quot;Управление изображениями&quot;</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Для сортировки в менеджере изображений opencart по дате добавления, нужно добавить одну строчку в файл /admin/controller/common/filemanager.php&lt;br /&gt;
&lt;br /&gt;
После строки&lt;br /&gt;
&lt;br /&gt;
if ($files) {&lt;br /&gt;
&lt;br /&gt;
Вставить&lt;br /&gt;
&lt;br /&gt;
usort($files, create_function(&#39;$a,$b&#39;, &#39;return filemtime($b) - filemtime($a);&#39;));&lt;br /&gt;
&lt;br /&gt;
Итого вид такой&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;http://c2n.me/iYqldV&quot;&gt;&lt;img alt=&quot;phpDesigner 8 - [ftp:// :21/raspberry.co.ua/www/admin/controller/common/filemanager.php]&quot; src=&quot;http://c2n.me/iYqldV.png&quot; height=&quot;576&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/4407733740429977684/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2014/09/opencart.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/4407733740429977684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/4407733740429977684'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2014/09/opencart.html' title='Opencart Сортировка изображений в &quot;Управление изображениями&quot;'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-4870669636730919212</id><published>2014-09-17T14:32:00.002+03:00</published><updated>2014-09-17T14:32:33.810+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Очистка тегов от атрибутов style class id и др.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;При копировании описания товаров с других сайтов и дальнейшая его обработка в текстовых редакторах, не спасает от появления стилей в атрибутах. Так же могут встречаться атрибуты которые вообще не нужны, для этого можно воспользоваться функцией ниже. &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Если переменная strip_tags = true, наш текст будет чиститься от всех атрибутов, а если мы укажем &lt;span style=&quot;color: #0b5394;&quot;&gt;allowable_tags&lt;/span&gt; =&lt;span style=&quot;color: #cc0000;&quot;&gt; &#39;&amp;lt;p&amp;gt;&amp;lt;a&amp;gt;&amp;lt;b&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&amp;lt;strong&amp;gt;&#39;&lt;/span&gt;, тогда эти теги останутся, но в них могут быть атрибуты style class id и др, для это используем&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;b&gt;$content = preg_replace(&quot;#(&amp;lt;/?\w+)(?:\s(?:[^&amp;lt;&amp;gt;/]|/[^&amp;lt;&amp;gt;])*)?(/?&amp;gt;)#ui&quot;, &#39;$1$2&#39;, $content);&lt;/b&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;b&gt;
&lt;/b&gt;&lt;/pre&gt;
&lt;a href=&quot;http://c2n.me/iVtIsu&quot;&gt;&lt;img alt=&quot;phpDesigner 8 - [D:\OpenServer\domains\projectskazka\protected\models\Goods.php]&quot; src=&quot;http://c2n.me/iVtIsu.png&quot; height=&quot;153&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;
&lt;/b&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;b&gt;Ниже тоже самое только в тексте.&lt;/b&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;b&gt;
&lt;/b&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;b&gt;public function getContent($strip_tags = false, $allowable_tags = false) {
        $content = CHtml::decode($this-&amp;gt;content-&amp;gt;VAL);
        if($strip_tags) {
            if($allowable_tags){
                $content = strip_tags($content,$allowable_tags);
            } else {
                $content = strip_tags($content);
            }
            $content = preg_replace(&quot;#(&amp;lt;/?\w+)(?:\s(?:[^&amp;lt;&amp;gt;/]|/[^&amp;lt;&amp;gt;])*)?(/?&amp;gt;)#ui&quot;, &#39;$1$2&#39;, $content);
            
        }
        return $content;
    }&lt;/b&gt;
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/4870669636730919212/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2014/09/style-class-id.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/4870669636730919212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/4870669636730919212'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2014/09/style-class-id.html' title='Очистка тегов от атрибутов style class id и др.'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-809979855979587065</id><published>2014-09-03T14:58:00.001+03:00</published><updated>2014-09-03T15:10:47.420+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>CSV импорт больших (огромных) файлов (построчное считывание)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Так как лимит памяти на обычном хостинге не вилки и время исполнения скрипта ограничено, стоит задача обработки огромных прайс листов в формате csv (1млн, 2млн, 3млн ...) не на стороне сервера, а на &amp;nbsp;стороне клиента посредством js.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
Ранее я все делал на стороне сервера, читал файл построчно, перегружал страницу и продолжал дальше бегать по файлу и так до конца. Но сейчас этот способ перестал устраивать:&lt;br /&gt;
1. Не у всех мощный интернет, загрузка самого в 60-100мб файла на сервер занимает более 5 мин, при медленном соединении, что в свою очередь выходит за рамки max_execution_time.&lt;br /&gt;
2. Выделяемой памяти на обычном хостинге, не хватает для обработки такого файла.&lt;br /&gt;
&lt;br /&gt;
На просторах интернета нашел js библиотеку, которая поможет нам справится с этой задачей&lt;br /&gt;
оф сайт - http://papaparse.com/&lt;br /&gt;
&lt;br /&gt;
Буду отталкиваться от этого&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://c2n.me/iQx6on&quot;&gt;&lt;img alt=&quot;Парсим CSV непосредственно с помощью JavaScript - Google Chrome&quot; src=&quot;http://c2n.me/iQx6on.png&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/809979855979587065/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2014/09/csv.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/809979855979587065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/809979855979587065'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2014/09/csv.html' title='CSV импорт больших (огромных) файлов (построчное считывание)'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-6036561607051807198</id><published>2014-09-02T10:57:00.001+03:00</published><updated>2014-09-02T10:57:03.656+03:00</updated><title type='text'>Бесплатно каталог TECDOC для сайта</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Каталог ТекДок для сайта бесплатно&amp;nbsp;&lt;/h3&gt;
&lt;div&gt;
http://www.autoxcatalog.com/catalog_neoriginal - пример&lt;/div&gt;
&lt;div&gt;
http://cms.autoxcatalog.com/catalog_tecdoc - подробнее&lt;/div&gt;
&lt;div&gt;
admin@autoxcatalog.com - все вопросы сюда&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;http://c2n.me/iQ2xyO&quot;&gt;&lt;img alt=&quot;Каталог неогригинальных запчастей - Google Chrome&quot; src=&quot;http://c2n.me/iQ2xyO.jpg&quot; height=&quot;436&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/6036561607051807198/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2014/09/tecdoc.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/6036561607051807198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/6036561607051807198'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2014/09/tecdoc.html' title='Бесплатно каталог TECDOC для сайта'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-9127120388050439669</id><published>2014-08-26T11:16:00.002+03:00</published><updated>2014-08-26T11:17:35.251+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Портфолио"/><title type='text'>Прайс агрегатор автозапчастей xparts.kiev.ua</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Бесплатный прайс агрегатор автозапчастей &lt;a href=&quot;http://xparts.kiev.ua/&quot;&gt;xparts.kiev.ua&lt;/a&gt;, каталог магазинов, сервис поиска и продажи автозапчастей.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe9eXVj9yRzglQBVoaJQjmny_Q_4zD33HsC18JGWREtuiwHfePhtBTK5fi9zVfYR3tXt-Fbb5fd2At6gja66z2nDOvGf9ZMbJt01-MaM10yP0sljihMqQY2j6Kndh8B7x42ilWE-tYsjXe/s1600/%D0%9F%D1%80%D0%B0%D0%B9%D1%81+%D0%B0%D0%B3%D1%80%D0%B5%D0%B3%D0%B0%D1%82%D0%BE%D1%80+%D0%B0%D0%B2%D1%82%D0%BE%D0%B7%D0%B0%D0%BF%D1%87%D0%B0%D1%81%D1%82%D0%B5%D0%B9,+%D0%B2%D1%81%D0%B5+%D0%B7%D0%B0%D0%BF%D1%87%D0%B0%D1%81%D1%82%D0%B8,+%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D1%89%D0%B8%D0%BA%D0%B8,+%D1%81%D0%BA%D0%BB%D0%B0%D0%B4%D1%8B,+%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82-%D0%BC%D0%B0%D0%B3%D0%B0%D0%B7%D0%B8%D0%BD%D1%8B+%D0%B7%D0%B0%D0%BF%D1%87%D0%B0%D1%81%D1%82%D0%B5%D0%B9+-+Google+Chrome.jpg.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe9eXVj9yRzglQBVoaJQjmny_Q_4zD33HsC18JGWREtuiwHfePhtBTK5fi9zVfYR3tXt-Fbb5fd2At6gja66z2nDOvGf9ZMbJt01-MaM10yP0sljihMqQY2j6Kndh8B7x42ilWE-tYsjXe/s1600/%D0%9F%D1%80%D0%B0%D0%B9%D1%81+%D0%B0%D0%B3%D1%80%D0%B5%D0%B3%D0%B0%D1%82%D0%BE%D1%80+%D0%B0%D0%B2%D1%82%D0%BE%D0%B7%D0%B0%D0%BF%D1%87%D0%B0%D1%81%D1%82%D0%B5%D0%B9,+%D0%B2%D1%81%D0%B5+%D0%B7%D0%B0%D0%BF%D1%87%D0%B0%D1%81%D1%82%D0%B8,+%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D1%89%D0%B8%D0%BA%D0%B8,+%D1%81%D0%BA%D0%BB%D0%B0%D0%B4%D1%8B,+%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82-%D0%BC%D0%B0%D0%B3%D0%B0%D0%B7%D0%B8%D0%BD%D1%8B+%D0%B7%D0%B0%D0%BF%D1%87%D0%B0%D1%81%D1%82%D0%B5%D0%B9+-+Google+Chrome.jpg.jpg&quot; height=&quot;454&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/9127120388050439669/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2014/08/xpartskievua.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/9127120388050439669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/9127120388050439669'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2014/08/xpartskievua.html' title='Прайс агрегатор автозапчастей xparts.kiev.ua'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe9eXVj9yRzglQBVoaJQjmny_Q_4zD33HsC18JGWREtuiwHfePhtBTK5fi9zVfYR3tXt-Fbb5fd2At6gja66z2nDOvGf9ZMbJt01-MaM10yP0sljihMqQY2j6Kndh8B7x42ilWE-tYsjXe/s72-c/%D0%9F%D1%80%D0%B0%D0%B9%D1%81+%D0%B0%D0%B3%D1%80%D0%B5%D0%B3%D0%B0%D1%82%D0%BE%D1%80+%D0%B0%D0%B2%D1%82%D0%BE%D0%B7%D0%B0%D0%BF%D1%87%D0%B0%D1%81%D1%82%D0%B5%D0%B9,+%D0%B2%D1%81%D0%B5+%D0%B7%D0%B0%D0%BF%D1%87%D0%B0%D1%81%D1%82%D0%B8,+%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D1%89%D0%B8%D0%BA%D0%B8,+%D1%81%D0%BA%D0%BB%D0%B0%D0%B4%D1%8B,+%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82-%D0%BC%D0%B0%D0%B3%D0%B0%D0%B7%D0%B8%D0%BD%D1%8B+%D0%B7%D0%B0%D0%BF%D1%87%D0%B0%D1%81%D1%82%D0%B5%D0%B9+-+Google+Chrome.jpg.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-161583846060873996</id><published>2014-05-12T12:54:00.002+03:00</published><updated>2014-05-13T15:52:38.622+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Портфолио"/><title type='text'>Интернет магазин женской, мужской, детской одежды raspberry.co.ua</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Интернет магазин женской, мужской, детской одежды и аксессуаров &lt;a href=&quot;http://raspberry.co.ua/&quot;&gt;raspberry.co.ua&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_N-64_UkncMiKyBWTX1oqGdiC1XM_WzSRTJ6IqLR9KswdBAboyf_GFUEPjXrZm7rYPVnWTUKaXhp0vJYgiVhMhmojfF_3MsRXwyvvvTv38kr9rJxTAUXUf3L6zyCBsTIOSh89PKyX5Ucz/s1600/%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82+%D0%BC%D0%B0%D0%B3%D0%B0%D0%B7%D0%B8%D0%BD,+%D0%B6%D0%B5%D0%BD%D1%81%D0%BA%D0%B0%D1%8F,+%D0%BC%D1%83%D0%B6%D1%81%D0%BA%D0%B0%D1%8F,+%D0%B4%D0%B5%D1%82%D1%81%D0%BA%D0%B0%D1%8F+%D0%BE%D0%B4%D0%B5%D0%B6%D0%B4%D0%B0,+%D0%B0%D0%BA%D1%81%D0%B5%D1%81%D1%81%D1%83%D0%B0%D1%80%D1%8B+%D1%84%D0%B0%D0%B1%D1%80%D0%B8%D0%BA%D0%B0+-+Google+Chrome.jpg.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_N-64_UkncMiKyBWTX1oqGdiC1XM_WzSRTJ6IqLR9KswdBAboyf_GFUEPjXrZm7rYPVnWTUKaXhp0vJYgiVhMhmojfF_3MsRXwyvvvTv38kr9rJxTAUXUf3L6zyCBsTIOSh89PKyX5Ucz/s1600/%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82+%D0%BC%D0%B0%D0%B3%D0%B0%D0%B7%D0%B8%D0%BD,+%D0%B6%D0%B5%D0%BD%D1%81%D0%BA%D0%B0%D1%8F,+%D0%BC%D1%83%D0%B6%D1%81%D0%BA%D0%B0%D1%8F,+%D0%B4%D0%B5%D1%82%D1%81%D0%BA%D0%B0%D1%8F+%D0%BE%D0%B4%D0%B5%D0%B6%D0%B4%D0%B0,+%D0%B0%D0%BA%D1%81%D0%B5%D1%81%D1%81%D1%83%D0%B0%D1%80%D1%8B+%D1%84%D0%B0%D0%B1%D1%80%D0%B8%D0%BA%D0%B0+-+Google+Chrome.jpg.jpg&quot; height=&quot;449&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/161583846060873996/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2014/05/raspberrycoua.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/161583846060873996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/161583846060873996'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2014/05/raspberrycoua.html' title='Интернет магазин женской, мужской, детской одежды raspberry.co.ua'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_N-64_UkncMiKyBWTX1oqGdiC1XM_WzSRTJ6IqLR9KswdBAboyf_GFUEPjXrZm7rYPVnWTUKaXhp0vJYgiVhMhmojfF_3MsRXwyvvvTv38kr9rJxTAUXUf3L6zyCBsTIOSh89PKyX5Ucz/s72-c/%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82+%D0%BC%D0%B0%D0%B3%D0%B0%D0%B7%D0%B8%D0%BD,+%D0%B6%D0%B5%D0%BD%D1%81%D0%BA%D0%B0%D1%8F,+%D0%BC%D1%83%D0%B6%D1%81%D0%BA%D0%B0%D1%8F,+%D0%B4%D0%B5%D1%82%D1%81%D0%BA%D0%B0%D1%8F+%D0%BE%D0%B4%D0%B5%D0%B6%D0%B4%D0%B0,+%D0%B0%D0%BA%D1%81%D0%B5%D1%81%D1%81%D1%83%D0%B0%D1%80%D1%8B+%D1%84%D0%B0%D0%B1%D1%80%D0%B8%D0%BA%D0%B0+-+Google+Chrome.jpg.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-2338643434346767376</id><published>2013-10-16T13:38:00.003+03:00</published><updated>2013-10-16T13:38:51.714+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Портфолио"/><title type='text'>Магазин запчастей с подключенной базой TecDoc</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;http://demo2.autoxcatalog.com/&quot; target=&quot;_blank&quot;&gt;Магазин запчастей с подключенной базой TecDoc&lt;/a&gt;&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-V6e5gAhwuQ8/Ul5sN26kOCI/AAAAAAAAG28/eWgHt2v5vY0/s1600/8846b5afb992a3b80cfd96d10db26bfb0441be29.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;450&quot; src=&quot;http://2.bp.blogspot.com/-V6e5gAhwuQ8/Ul5sN26kOCI/AAAAAAAAG28/eWgHt2v5vY0/s640/8846b5afb992a3b80cfd96d10db26bfb0441be29.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
Интернет магазин запчастей с базой кросов ТекДок, каталогом неоригинальных запчастей на фреймворке codeigniter (CMS AutoX) &amp;nbsp;в аренду. Условия и стоимость аренды &lt;a href=&quot;http://www.autoxcatalog.com/cms_autox_tecdoc/&quot; target=&quot;_blank&quot;&gt;здесь&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/2338643434346767376/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/10/tecdoc.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/2338643434346767376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/2338643434346767376'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/10/tecdoc.html' title='Магазин запчастей с подключенной базой TecDoc'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-V6e5gAhwuQ8/Ul5sN26kOCI/AAAAAAAAG28/eWgHt2v5vY0/s72-c/8846b5afb992a3b80cfd96d10db26bfb0441be29.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-194524228645121085</id><published>2013-06-12T23:50:00.005+03:00</published><updated>2013-06-12T23:50:59.032+03:00</updated><title type='text'>Opencart 1.5.5.1 и autoxcatalog.com часть 2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 class=&quot;post-title entry-title&quot; itemprop=&quot;name&quot; style=&quot;background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 22px; margin: 0px; position: relative;&quot;&gt;
Opencart 1.5.5.1 и autoxcatalog.com&lt;/h3&gt;
&lt;div&gt;
Реализовал SOAP &amp;nbsp;сервер от partmaster &amp;nbsp;на своем сайте&amp;nbsp;&lt;a href=&quot;http://demo.autoxcatalog.com/&quot;&gt;http://demo.autoxcatalog.com&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
Пока проходит бете тестирование.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
Логика работы такая:&lt;/div&gt;
&lt;div&gt;
Когда клиент вбивает в поиске код запчасти, происходит подключение к partmaster, потом идет проверка есть ли товары партмастера в нашей базе, если нет то записывается в базу и помечается поставщик partmaster, если запчасть уже есть в нашей базе , то обновляется цена закупки и цена продажи.&lt;/div&gt;
&lt;div&gt;
Плюс еще реализовал настройки в админке, где можно отключить синхронизацию и установить наценку на цены от партмастера.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
В следующих версиях&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
-Установка доп модулей&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
-Подключение базы AutoXcatalog.com&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
-Тонкая настройка под продажи авто запчастей&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
-Бесплатные шаблоны&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/194524228645121085/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/06/opencart-1551-autoxcatalogcom-2.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/194524228645121085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/194524228645121085'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/06/opencart-1551-autoxcatalogcom-2.html' title='Opencart 1.5.5.1 и autoxcatalog.com часть 2'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-5178059846943262570</id><published>2013-06-05T17:24:00.002+03:00</published><updated>2013-06-05T17:24:27.302+03:00</updated><title type='text'>Принудительный вывод 404 или редирект на 404 Opencart</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Допустим, при каком то условии Вам нужно вывести 404 страницу в Opencart, для это используете такой код в контроллере:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;//отправляем заголовок 404&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$this-&amp;gt;response-&amp;gt;addHeader($this-&amp;gt;request-&amp;gt;server[&#39;SERVER_PROTOCOL&#39;] . &#39;/1.1 404 Not Found&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;//перенаправляем на страницу 404&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;return $this-&amp;gt;forward(&#39;error/not_found&#39;);&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/5178059846943262570/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/06/404-404-opencart.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/5178059846943262570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/5178059846943262570'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/06/404-404-opencart.html' title='Принудительный вывод 404 или редирект на 404 Opencart'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-432600458135408046</id><published>2013-05-26T22:28:00.000+03:00</published><updated>2013-05-26T22:30:42.808+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Opencart"/><title type='text'>Подсветка строк заказов в зависимости от статуса Opencart</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Специально, ответ на вопрос одного из посетителей моего блога&lt;br /&gt;
В файле admin/view/template/sale/order_list.tpl&lt;br /&gt;
Ищем такую строчку:&lt;br /&gt;
&amp;lt;?php foreach ($orders as $order) { ?&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
и меняем так:&lt;br /&gt;
&amp;lt;tr&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;? if($order[&#39;status&#39;] === &#39;Canceled&#39;):?&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; style=&quot;border: 2px solid red;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;? elseif($order[&#39;status&#39;]==&#39;Выполнен&#39;):?&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; style=&quot;border: 1px solid green;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;?endif;?&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Думаю по примеру сделаете под свои нужды.&lt;br /&gt;
Должно получится такое http://joxi.ru/O2GiUdg5CbC6MoLlobo&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/432600458135408046/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/05/blog-post.html#comment-form' title='Комментарии: 3'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/432600458135408046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/432600458135408046'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/05/blog-post.html' title='Подсветка строк заказов в зависимости от статуса Opencart'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-1552144674574373463</id><published>2013-04-30T18:19:00.000+03:00</published><updated>2013-05-05T21:14:52.699+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Codeigniter"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Функция напоминания пользователям с проверкой даты PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Стала задача &amp;nbsp;выбрать пользователей которые не заходили на сайт более 1-го месяца и сделать рассылку писем&lt;br /&gt;
&lt;b&gt;Я решил этот вопрос так (пример на codeigniter):&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;public function&lt;/span&gt; &lt;span style=&quot;color: #6aa84f;&quot;&gt;user_activ&lt;/span&gt;()&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;$this-&amp;gt;load-&amp;gt;model&lt;/span&gt;(&lt;span style=&quot;color: red;&quot;&gt;&#39;model&#39;&lt;/span&gt;);&lt;span style=&quot;color: #999999;&quot;&gt;//загружаем модель&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;$date&lt;/span&gt;=&lt;span style=&quot;background-color: blue;&quot;&gt;date&lt;/span&gt;(&lt;span style=&quot;color: red;&quot;&gt;&#39;Y-m-d&#39;&lt;/span&gt;, &lt;span style=&quot;color: #274e13;&quot;&gt;&lt;b&gt;strtotime&lt;/b&gt;&lt;/span&gt;(&lt;span style=&quot;color: red;&quot;&gt;&#39;- 1 month&#39;&lt;/span&gt;));&lt;span style=&quot;color: #999999;&quot;&gt;//отнимаем от текущей даты 1 месяц&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;$array_users&lt;/span&gt;=$this-&amp;gt;model-&amp;gt;get_users($date);&lt;span style=&quot;color: #999999;&quot;&gt;//выбираем с базы пользователей у которых поле data меньше $date&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!&lt;span style=&quot;color: blue;&quot;&gt;empty&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;$array_users&lt;/span&gt;)) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;foreach&lt;/span&gt; ($array_users as $user) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #999999;&quot;&gt;//здесь по циклу отправляем email&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span style=&quot;color: blue;&quot;&gt;else&lt;/span&gt; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &lt;span style=&quot;color: #cc0000;&quot;&gt;&#39;Нет пользователей у которых дата последнего визита больше месяца&#39;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/1552144674574373463/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/04/php.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/1552144674574373463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/1552144674574373463'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/04/php.html' title='Функция напоминания пользователям с проверкой даты PHP'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-8558335442178426604</id><published>2013-04-21T21:12:00.000+03:00</published><updated>2013-04-21T21:12:14.294+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Портфолио"/><title type='text'>Мелкие и средние доработки по сайту tairoom.ru</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiODW5RGIIc-Vyv9VbBCjEYTbohV7J72XbgldsILn3mFHa6CnO0iiOYgTOhFixB6djq9pLnT371Q4XYLvU8R5o4Kej6IkOzqdkqUvE-9vtSWZl3BzHpcLmDvpin6PFZ0SrVUraQxtgOMkTW/s1600/%D0%9C%D0%B5%D1%81%D1%82%D0%B5%D1%87%D0%BA%D0%BE+%D0%A2%D0%B0%D0%B9%D1%86%D0%B7%D0%B8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;337&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiODW5RGIIc-Vyv9VbBCjEYTbohV7J72XbgldsILn3mFHa6CnO0iiOYgTOhFixB6djq9pLnT371Q4XYLvU8R5o4Kej6IkOzqdkqUvE-9vtSWZl3BzHpcLmDvpin6PFZ0SrVUraQxtgOMkTW/s640/%D0%9C%D0%B5%D1%81%D1%82%D0%B5%D1%87%D0%BA%D0%BE+%D0%A2%D0%B0%D0%B9%D1%86%D0%B7%D0%B8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Было проведено пару мелких доработок по сайту&amp;nbsp;&lt;a href=&quot;http://tairoom.ru/&quot;&gt;http://tairoom.ru/&lt;/a&gt;.&lt;br /&gt;
1.Вывод сообщения &quot;Бесплатная доставка в зависимости от цены&quot;.&lt;br /&gt;
2.Установка модулей&lt;br /&gt;
3.Произведена доработка функционала сайта, а именно:&lt;br /&gt;
&amp;nbsp;-Добавление дополнительной картинки к товару, которая отображается в карточке товара под производителями.&lt;br /&gt;
&amp;nbsp;-Добавлено доп поле , с&amp;nbsp;возможностью&amp;nbsp;размещения доп. текста к товара&lt;br /&gt;
4.Много мелких правок.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/8558335442178426604/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/04/tairoomru.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/8558335442178426604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/8558335442178426604'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/04/tairoomru.html' title='Мелкие и средние доработки по сайту tairoom.ru'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiODW5RGIIc-Vyv9VbBCjEYTbohV7J72XbgldsILn3mFHa6CnO0iiOYgTOhFixB6djq9pLnT371Q4XYLvU8R5o4Kej6IkOzqdkqUvE-9vtSWZl3BzHpcLmDvpin6PFZ0SrVUraQxtgOMkTW/s72-c/%D0%9C%D0%B5%D1%81%D1%82%D0%B5%D1%87%D0%BA%D0%BE+%D0%A2%D0%B0%D0%B9%D1%86%D0%B7%D0%B8.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-8553751348104192760</id><published>2013-03-14T11:53:00.002+02:00</published><updated>2013-03-14T11:53:27.041+02:00</updated><title type='text'>Товар которого нет в наличии делаем в конце opencart</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Товар которого нет в наличии делаем в конце&amp;nbsp;&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.opencart.com/opencart/application/view/image/logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.opencart.com/opencart/application/view/image/logo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Делаем, товар которого нет в наличии в конце списка при просмотре в категориях. На основе этого можете сделать отображение в поиске, в производителях и т.д&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Для того чтобы товар которого нет в наличии был в конце списка, нам нужно поменять сортировку по умолчанию. Я отталкивался от значения &quot;количество&quot; и делал сортировку по этому полю.&lt;/div&gt;
&lt;div&gt;
Открываем &lt;b&gt;catalog/controller/product/category.php&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Ищем строки и делаем как ниже указано:&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;if (isset($this-&amp;gt;request-&amp;gt;get[&#39;sort&#39;])) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;$sort = $this-&amp;gt;request-&amp;gt;get[&#39;sort&#39;];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;} else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;//$sort = &#39;p.sort_order&#39;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;$sort = &#39;p.quantity&#39;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;if (isset($this-&amp;gt;request-&amp;gt;get[&#39;order&#39;])) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;$order = $this-&amp;gt;request-&amp;gt;get[&#39;order&#39;];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;} else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: red; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;//$order = &#39;ASC&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #6aa84f; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; $order = &#39;DESC&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;После этих&amp;nbsp;изменений&amp;nbsp;товар будет сортироваться по полю количество по убыванию, самое меньшее в конце.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Так же можно сменить или спрятать кнопку &quot;Купить&quot;, но это позже опишу.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/8553751348104192760/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/03/opencart.html#comment-form' title='Комментарии: 10'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/8553751348104192760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/8553751348104192760'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/03/opencart.html' title='Товар которого нет в наличии делаем в конце opencart'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-475012634280913499.post-2520116405661951076</id><published>2013-03-01T18:07:00.000+02:00</published><updated>2013-03-21T13:03:28.102+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Opencart"/><category scheme="http://www.blogger.com/atom/ns#" term="Портфолио"/><title type='text'>nyx.in.ua фриланс</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;http://nyx.in.ua/&quot;&gt;nyx.in.ua&lt;/a&gt;&amp;nbsp;вывод наличия в зависимости от опции opencart 1.5.3.1&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqO4bM1ye4PZGE9lmhZKzfQ88-7QCuOrhG_qJv-AWFq7n3tlMvFOw1-CXeuxCjJtyY3eirQkWPYd3TkzzUfT66r4gf1Fy6hWmfYq-9zQ4ueJ4wD4jectlaFYWz7hov5mWv6WsXmGgdF8JC/s1600/Matte+Lipstick,+NYX,+MLS.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;497&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqO4bM1ye4PZGE9lmhZKzfQ88-7QCuOrhG_qJv-AWFq7n3tlMvFOw1-CXeuxCjJtyY3eirQkWPYd3TkzzUfT66r4gf1Fy6hWmfYq-9zQ4ueJ4wD4jectlaFYWz7hov5mWv6WsXmGgdF8JC/s640/Matte+Lipstick,+NYX,+MLS.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Задача была вывести статус на складе в зависимости от опции. В админ панели, при добавлении товара, добавляются опции где указываем количество наличия и ставим вычитать со склада. На странице товара, в зависимости от наличия будет выводится статус на складе. При смене опции обновляется наличие вверху.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sergey-rasputniy.blogspot.com/feeds/2520116405661951076/comments/default' title='Комментарии к сообщению'/><link rel='replies' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/03/nyxinua.html#comment-form' title='Комментарии: 0'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/2520116405661951076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/475012634280913499/posts/default/2520116405661951076'/><link rel='alternate' type='text/html' href='http://sergey-rasputniy.blogspot.com/2013/03/nyxinua.html' title='nyx.in.ua фриланс'/><author><name>autox</name><uri>http://www.blogger.com/profile/02747106226769550264</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqO4bM1ye4PZGE9lmhZKzfQ88-7QCuOrhG_qJv-AWFq7n3tlMvFOw1-CXeuxCjJtyY3eirQkWPYd3TkzzUfT66r4gf1Fy6hWmfYq-9zQ4ueJ4wD4jectlaFYWz7hov5mWv6WsXmGgdF8JC/s72-c/Matte+Lipstick,+NYX,+MLS.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>