<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2874298</guid>
        <pubDate>Tue, 12 Apr 2011 13:04:45 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2874298</link>
        <description><![CDATA[vicis: Проблема: В RadPhp XE не получается подключится к MSSQL 2000 с помощью DataExplorer <br>Решение: Качаем новый клиент MSSQL отсюда<br>http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c6c3e9ef-ba29-4a43-8d69-a2bed18fe73c<br>а конкретно этот: http://go.microsoft.com/fwlink/?LinkId=123717&clcid=0x409]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2873292</guid>
        <pubDate>Mon, 11 Apr 2011 12:30:09 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2873292</link>
        <description><![CDATA[vicis: Проблема: QDBGrid1 на QWindow1 не работает, работает когда оба просто на форме<br>
Решение:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; function QWindow1BeforeShow($sender, $params)</div><div class="code_line">&nbsp;&nbsp; {</div><div class="code_line">&nbsp;&nbsp; $this-&#62;QDBGrid1-&#62;dumpRPC();</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; }</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2850288</guid>
        <pubDate>Thu, 10 Mar 2011 15:33:34 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2850288</link>
        <description><![CDATA[vicis: Проблема: Deployment Wizard не всегда копирует нужные файлы в папку rpcl<br>
Решение: <br>
<br>
делает это самостоятельно<br>
1. выполняем Deployment Wizard<br>
2. создаём файл copy_rpcl.bat<br>
кидаем его в ту директорию, в которую экспортировали проект<br>
3. выполняем <br>
<br>
содержимое copy_rpcl.bat<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">@echo off</div><div class="code_line">&nbsp;</div><div class="code_line">rem кидаем файл в нужную папку и запускаем, файлы будут скопированы в подпапку этой папки</div><div class="code_line">&nbsp;</div><div class="code_line">set folderRPCLsource=C:\Program Files\Embarcadero\RadPHP.0\rpcl</div><div class="code_line">&nbsp;</div><div class="code_line">rem папка куда копировать (если rpcl, то скопирует в текущую папку, в подпапку rpcl)</div><div class="code_line">set folderRPCLdest=rpcl</div><div class="code_line">&nbsp;</div><div class="code_line">cls;</div><div class="code_line">echo 1 - копировать всю папку RPCL (не включая svn)</div><div class="code_line">echo 2 - копировать только необходимый минимум папок RPCL (не включая svn)</div><div class="code_line">echo 0 - прекратить это безобразие :)</div><div class="code_line">echo;</div><div class="code_line">&nbsp;</div><div class="code_line">set /P variantcopy=&quot;Введите вариант копирования: &quot; </div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if &quot;%variantcopy%&quot; == &quot;1&quot; &nbsp;goto all &nbsp;ELSE goto minimum</div><div class="code_line">&nbsp;&nbsp; &nbsp;if &quot;%variantcopy%&quot; == &quot;0&quot; &nbsp;goto end1</div><div class="code_line">:minimum</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;rem здесь сами себе задаём минимум необходимых папок</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;mkdir &quot;%folderRPCLdest%&quot;</div><div class="code_line">&nbsp;&nbsp;xcopy &quot;%folderRPCLsource%&quot; &quot;%folderRPCLdest%\*.php&quot; /Y</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;mkdir &quot;%folderRPCLdest%\qooxdoo&quot;</div><div class="code_line">&nbsp;&nbsp;xcopy &quot;%folderRPCLsource%\qooxdoo&quot; &quot;%folderRPCLdest%\qooxdoo&quot; /R/E/K/Y</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;mkdir &quot;%folderRPCLdest%\adodb&quot;</div><div class="code_line">&nbsp;&nbsp;xcopy &quot;%folderRPCLsource%\adodb&quot; &quot;%folderRPCLdest%\adodb&quot; /R/E/K/Y</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;mkdir &quot;%folderRPCLdest%\js&quot;</div><div class="code_line">&nbsp;&nbsp;xcopy &quot;%folderRPCLsource%\js&quot; &quot;%folderRPCLdest%\js&quot; /R/E/K/Y</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;mkdir &quot;%folderRPCLdest%\xajax&quot;</div><div class="code_line">&nbsp;&nbsp;xcopy &quot;%folderRPCLsource%\xajax&quot; &quot;%folderRPCLdest%\xajax&quot; /R/E/K/Y</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;mkdir &quot;%folderRPCLdest%\language&quot;</div><div class="code_line">&nbsp;&nbsp;xcopy &quot;%folderRPCLsource%\language&quot; &quot;%folderRPCLdest%\language&quot; /R/E/K/Y</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;mkdir &quot;%folderRPCLdest%\smarty&quot;</div><div class="code_line">&nbsp;&nbsp;xcopy &quot;%folderRPCLsource%\smarty&quot; &quot;%folderRPCLdest%\smarty&quot; /R/E/K/Y</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;echo &#39;Скопирован необходимый МИНИМУМ&#39;;</div><div class="code_line">&nbsp;&nbsp;goto end;</div><div class="code_line">&nbsp;</div><div class="code_line">:all</div><div class="code_line">&nbsp;&nbsp;mkdir &quot;%folderRPCLdest%&quot;</div><div class="code_line">&nbsp;&nbsp;xcopy &quot;%folderRPCLsource%&quot; &quot;%folderRPCLdest%&quot; /R/E/K/Y</div><div class="code_line">&nbsp;&nbsp;echo &#39;Скопировано ВСЁ&#39;;</div><div class="code_line">&nbsp;&nbsp;goto end;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">:end</div><div class="code_line">pause</div><div class="code_line">:end1</div></ol></div></div></div></div><br>
<br>
теперь в папке экспорта находятся нужные файлы для переноса на сервер]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2832108</guid>
        <pubDate>Thu, 17 Feb 2011 10:46:21 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2832108</link>
        <description><![CDATA[vicis: Задача: Получить список методов объекта JS<br>
Решение: используем функцию<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp;function Page1BeforeShow($sender, $params)</div><div class="code_line">&nbsp;&nbsp; {</div><div class="code_line">echo &#39;</div><div class="code_line">&#60;script type=&quot;text/javascript&quot;&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">function fnShowProps(obj, objName){</div><div class="code_line">&nbsp;&nbsp;var result = &quot;&quot;;</div><div class="code_line">&nbsp;&nbsp;for (var i in obj)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;result += objName + &quot;.&quot; + i + &quot; = &quot; + obj[i] + &quot;&#60;br /&#62;\n&quot;;</div><div class="code_line">&nbsp;&nbsp;document.write(result);</div><div class="code_line">}</div><div class="code_line">&#60;/script&#62;</div><div class="code_line">&#39;;</div><div class="code_line">&nbsp;&nbsp; }</div><div class="code_line">&nbsp;&nbsp; function Label1JSClick($sender, $params)</div><div class="code_line">&nbsp;&nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; ?&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; //begin js</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; // &nbsp;fnShowProps(window.location, &quot;location&quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; // &nbsp;fnShowProps(Label1, &quot;Label1&quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; fnShowProps(LabeledEdit1, &quot;LabeledEdit1&quot;);</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; //end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &#60;?php</div><div class="code_line">&nbsp;&nbsp; }</div></ol></div></div></div></div><br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Сообщения были разделены в тему &quot;<a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=326400' target='_blank'>пытаюсь разместить пробную страничку на хостинге</a>&quot;</span></span>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2775153</guid>
        <pubDate>Fri, 10 Dec 2010 16:31:51 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2775153</link>
        <description><![CDATA[vicis: Задача: выполнить цепочку AJAX процедур, когда одна вызывает выполнение другой<br>
Решение:<br>
<br>
Рассмотрим на примере двух DBGrid работающих по принципу Master-Detail<br>
При изменении строки в первом гриде вызываем ajax процедуру на фильтрацию данных во втором гриде.<br>
А после перечитывания и отрисовки данных второго грида автоматически вызываем ajax процедуру для вывода сообщений или выполнения других функций на JS.<br>
<br>
На форме: <br>
DBGrid1, DBGrid2, Edit1, AjaxScripter1<br>
Оба грида подключены к одной и той же таблице (через соответствующие компоненты), у которой ключевое поле TEST_ID.<br>
При выборе записи в первой таблице возьмём значение TEST_ID этой записи, пропишем его в Edit1 и отфильтруем по нему DBGrid2 (через компонент Table2, к которому подключен грид).<br>
После этого установим фокус на первую строку во второй таблице и выведем сообщение.<br>
<br>
  <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp;function DBGrid1JSRowChanged($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;?&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;params = DBGrid1.getTableModel().getValue(0, DBGrid1.getFocusedRow());</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;&#60;?php</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;echo $this-&#62;DBGrid1-&#62;ajaxCall(&quot;xxx&quot;, &nbsp;array(&quot;DBGrid1&quot;));</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;?&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;&#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;function xxx($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;$this-&#62;Edit1-&#62;Text = $params[0];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;$this-&#62;Table2-&#62;Filter = &quot;TEST_ID=$params[0]&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;$this-&#62;Table2-&#62;refresh();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;$this-&#62;AjaxScripter1-&#62;Script = &#39;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//DBGrid1.getTableColumnModel().setColumnVisible(0, false); &nbsp;- здесь мы могли бы установить видимость колонки в гриде или сделать другие установки</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var xx =document.getElementById(&quot;Edit1&quot;).value;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DBGrid2.getSelectionModel().setSelectionInterval(0, 0);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;function Page10AfterShow($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &#39;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;script type=&quot;text/JavaScript&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DBGrid1.getTableColumnModel().setColumnVisible(0, false);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DBGrid2.getTableColumnModel().setColumnVisible(0, false);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;/script&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;function DBGrid2JSRowChanged($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;?&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;params = DBGrid2.getTableModel().getValue(0, DBGrid2.getFocusedRow());</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;&#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;echo $this-&#62;DBGrid1-&#62;ajaxCall(&quot;yyy&quot;, &nbsp;array(&quot;DBGrid2&quot;));</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;?&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;&#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;function yyy($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;$this-&#62;AjaxScripter1-&#62;Script = &#39;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;alert(\&#39;Я сработал после обновления грида 2\&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;}</div></ol></div></div></div></div><br>
<br>
компонент AjaxScripter не входит в стандартную поставку, но давно описан здесь<br>
<a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=280269&view=findpost&p=2410953' target='_blank'>Delphi for PHP (RAD PHP XE): Компоненты (сообщение #2410953)</a><br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Сообщения были разделены в тему &quot;<a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=323929' target='_blank'>Пустая вкладка при старте проекта</a>&quot;</span></span>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2772905</guid>
        <pubDate>Wed, 08 Dec 2010 11:55:23 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2772905</link>
        <description><![CDATA[vicis: Задача: выполнить хранимую процедуру MySQL и получить результат в DbGrid <br>
Решение: <a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=320113&view=findpost&p=2772214' target='_blank'>Хранимая процедура не работает (сообщение #2772214)</a>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2743945</guid>
        <pubDate>Wed, 03 Nov 2010 13:15:11 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2743945</link>
        <description><![CDATA[vicis: Задача: Динамически создать объекты на форме и прописать им события<br>
Решение: вариант на примере динамического создания 10 чекбоксов с событием на JS<br>
Примечание: проверено в RadPHP XE, версия rpcl=289<br>
На 2-й версии не сработало, но думаю что если обновить vcl до rpcl должно работать (во накрутили названий...:) )<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;?php</div><div class="code_line">require_once(&quot;rpcl/rpcl.inc.php&quot;);</div><div class="code_line">//Includes</div><div class="code_line">use_unit(&quot;forms.inc.php&quot;);</div><div class="code_line">use_unit(&quot;extctrls.inc.php&quot;);</div><div class="code_line">use_unit(&quot;stdctrls.inc.php&quot;);</div><div class="code_line">&nbsp;</div><div class="code_line">//Class definition</div><div class="code_line">class Page2 extends Page</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp; &nbsp;public $Panel1 = null;</div><div class="code_line">&nbsp;&nbsp; &nbsp;function Page2StartBody($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;for($i = 1; $i &#60;= 10; $i++)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; $xch = new Checkbox($this);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; $xch-&#62;Left = 10;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; $xch-&#62;Top = $i * 20;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; $xch-&#62;Name = &#39;chb_&#39; . $i;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; $xch-&#62;Caption = $xch-&#62;Name;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; $xch-&#62;setjsOnClick(&quot;ChbJSClick($xch-&#62;Name)&quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; $xch-&#62;Parent = $this-&#62;Panel1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;// $xch-&#62;show();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;function Page2BeforeShow($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp;echo&quot;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &#60;script type=\&quot;text/JavaScript\&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; function ChbJSClick(thisobject)</div><div class="code_line">&nbsp;&nbsp; &nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; alert(thisobject.name+&#39; отмечено: &#39;+thisobject.checked);</div><div class="code_line">&nbsp;&nbsp; &nbsp; }</div><div class="code_line">&nbsp;&nbsp; &nbsp; &#60;/script&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">global $application;</div><div class="code_line">&nbsp;</div><div class="code_line">global $Page2;</div><div class="code_line">&nbsp;</div><div class="code_line">//Creates the form</div><div class="code_line">$Page2 = new Page2($application);</div><div class="code_line">&nbsp;</div><div class="code_line">//Read from resource file</div><div class="code_line">$Page2-&#62;loadResource(__FILE__);</div><div class="code_line">&nbsp;</div><div class="code_line">//Shows the form</div><div class="code_line">$Page2-&#62;show();</div><div class="code_line">&nbsp;</div><div class="code_line">?&#62;</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2702217</guid>
        <pubDate>Tue, 21 Sep 2010 07:29:06 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2702217</link>
        <description><![CDATA[vicis: Проблема: не работает SimpleChart - не показывает график после добавления данных<br>
Решение: после добавления компонента на форму проверить:<br>
порядок подключения модулей<br>
<br>
нужно так (закоментированное - это неправильно)<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">/*</div><div class="code_line">require_once(&quot;rpcl/rpcl.inc.php&quot;);</div><div class="code_line">use_unit(&quot;forms.inc.php&quot;);</div><div class="code_line">use_unit(&quot;extctrls.inc.php&quot;);</div><div class="code_line">use_unit(&quot;stdctrls.inc.php&quot;);</div><div class="code_line">use_unit(&quot;chart.inc.php&quot;); &nbsp;// &#60;= это неправильно</div><div class="code_line">*/</div><div class="code_line">require_once(&quot;rpcl/rpcl.inc.php&quot;);</div><div class="code_line">use_unit(&quot;chart.inc.php&quot;); &nbsp;// &#60;= это правильно</div><div class="code_line">use_unit(&quot;forms.inc.php&quot;);</div><div class="code_line">use_unit(&quot;extctrls.inc.php&quot;);</div><div class="code_line">use_unit(&quot;stdctrls.inc.php&quot;);</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2639483</guid>
        <pubDate>Wed, 07 Jul 2010 19:14:11 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2639483</link>
        <description><![CDATA[vicis: Прблема: при переносе на провайдер проект н работает с компонентами ExtJS<br>
Решение: на провайдере обычно нужнот учитывать регистр букв, в отличии от Windows<br>
<br>
меняем Ext на ext здесь:<br>
файл vcl/ext/functions.inc.php <br>
<br>
было так<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&#60;?php echo VCL_HTTP_PATH; ?&#62;/Ext/library/resources/css/ext-all.css&quot; /&#62;</div><div class="code_line">&#60;script type=&quot;text/javascript&quot; src=&quot;&#60;?php echo VCL_HTTP_PATH; ?&#62;/Ext/library/adapter/ext/ext-base.js&quot;&#62;&#60;/script&#62;</div><div class="code_line">&#60;script type=&quot;text/javascript&quot; src=&quot;&#60;?php echo VCL_HTTP_PATH; ?&#62;/Ext/library/ext-all.js&quot;&#62;&#60;/script&#62;</div><div class="code_line">&#60;script type=&quot;text/javascript&quot; src=&quot;&#60;?php echo VCL_HTTP_PATH; ?&#62;/Ext/library/examples/examples.js&quot;&#62;&#60;/script&#62;</div><div class="code_line">&#60;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&#60;?php echo VCL_HTTP_PATH; ?&#62;/Ext/library/examples/examples.css&quot; /&#62;</div></ol></div></div></div></div><br>
<br>
стало так<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&#60;?php echo VCL_HTTP_PATH; ?&#62;/ext/library/resources/css/ext-all.css&quot; /&#62;</div><div class="code_line">&#60;script type=&quot;text/javascript&quot; src=&quot;&#60;?php echo VCL_HTTP_PATH; ?&#62;/ext/library/adapter/ext/ext-base.js&quot;&#62;&#60;/script&#62;</div><div class="code_line">&#60;script type=&quot;text/javascript&quot; src=&quot;&#60;?php echo VCL_HTTP_PATH; ?&#62;/ext/library/ext-all.js&quot;&#62;&#60;/script&#62;</div><div class="code_line">&#60;script type=&quot;text/javascript&quot; src=&quot;&#60;?php echo VCL_HTTP_PATH; ?&#62;/ext/library/examples/examples.js&quot;&#62;&#60;/script&#62;</div><div class="code_line">&#60;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&#60;?php echo VCL_HTTP_PATH; ?&#62;/ext/library/examples/examples.css&quot; /&#62;</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2631992</guid>
        <pubDate>Mon, 28 Jun 2010 13:55:10 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2631992</link>
        <description><![CDATA[vicis: Задача: добавить ссылку на файл .js в форму<br>
Рещение:<br>
В событие OnShowHeader добавить<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">echo “&#60;script language=\”javascript\” src=\”../_lib/js/validate.js\”&#62;&#60;/script&#62;”;</div></ol></div></div></div></div><br>
<br>
Кроме того если у вас есть php библиотека функций, которую вы всегда включаете в страницы формы, добавьте туда следующую функцию:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function JSInclude($js_path_and_filename) {</div><div class="code_line">echo “&#60;script language=\”javascript\” src=\”{$js_path_and_filename}\”&#62;&#60;/script&#62;\n”;</div><div class="code_line">}</div></ol></div></div></div></div><br>
<br>
вызываем так<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">JSInclude(”../lib/js/validate.js”);</div></ol></div></div></div></div> <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2010-06-28T14:11:14+00:00">28.06.10, 14:11</time></span></span><br>
Проблема: на одной кнопке висит два обработчика один php, а второй javascript<br>
          Событие Javascript срабатывает, но до события php никода не доходим<br>
Решение:<br>
в конец обработчика javascript добавить return true;<br>
<br>
неправильно:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function Button2Click($sender, $params) </div><div class="code_line">{ </div><div class="code_line">echo “Мы никогда сюда не попадаем.”;</div><div class="code_line">}</div><div class="code_line">function Button2JSClick($sender, $params) </div><div class="code_line">{</div><div class="code_line">?&#62;</div><div class="code_line">//Add your javascript code here</div><div class="code_line">alert(”Это видим всегда”);</div><div class="code_line">&#60;?php</div><div class="code_line">}</div></ol></div></div></div></div><br>
<br>
правильно<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function Button2Click($sender, $params)</div><div class="code_line">{</div><div class="code_line">echo “И это теперь видим.”;</div><div class="code_line">}</div><div class="code_line">function Button2JSClick($sender, $params)</div><div class="code_line">{</div><div class="code_line">?&#62;</div><div class="code_line">//Add your javascript code here</div><div class="code_line">alert(”return true;”);</div><div class="code_line">return true;</div><div class="code_line">&#60;?php</div><div class="code_line">}</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2630145</guid>
        <pubDate>Fri, 25 Jun 2010 16:24:20 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2630145</link>
        <description><![CDATA[vicis: Задача: очистить свойство Text у всех компонент на форме<br>
Решение: http://blog.onenerd.net/?p=69<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function ClearAllTextBoxes ()</div><div class="code_line">{</div><div class="code_line">try { </div><div class="code_line">foreach($this as $obj) { </div><div class="code_line">if(substr($obj-&#62;name,0,3)==”txt”) { </div><div class="code_line">$obj-&#62;Text = “”; </div><div class="code_line">} </div><div class="code_line">} </div><div class="code_line">} catch (Exception $e) {} </div><div class="code_line">}</div></ol></div></div></div></div><br>
<br>
или<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function ClearAllTextBoxes ()</div><div class="code_line">{</div><div class="code_line">reset($this-&#62;controls-&#62;items); </div><div class="code_line">while(list($key, $obj)=each($this-&#62;controls-&#62;items)) { </div><div class="code_line">if ($obj-&#62;inheritsFrom(”Edit”)) { </div><div class="code_line">$obj-&#62;Text = “”;</div><div class="code_line">} </div><div class="code_line">} </div><div class="code_line">}</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2603250</guid>
        <pubDate>Tue, 25 May 2010 04:08:38 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2603250</link>
        <description><![CDATA[vicis: <span class='tag-u'>Задача:</span> сформировать список в Combobox<br>
<span class='tag-u'>Решение:</span><div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">public function GetList($TempQuery,$ComboBox,$DataField)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;$TempQuery-&#62;close();</div><div class="code_line">&nbsp;&nbsp;$TempQuery-&#62;open();</div><div class="code_line">&nbsp;&nbsp;$TempQuery-&#62;first();</div><div class="code_line">&nbsp;&nbsp;$ComboBox-&#62;Clear();</div><div class="code_line">&nbsp;&nbsp;while (!$TempQuery-&#62;eof)</div><div class="code_line">&nbsp;&nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; $ComboBox-&#62;AddItem($TempQuery-&#62;$DataField);</div><div class="code_line">&nbsp;&nbsp; &nbsp; $TempQuery-&#62;next();</div><div class="code_line">&nbsp;&nbsp; }</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">//вызываем так</div><div class="code_line">&nbsp;</div><div class="code_line">$this-&#62;TempQuery-&#62;SQL = &#39;select Car_RegNum as xName from car order by Car_RegNum&#39;;</div><div class="code_line">GetListAuto($this-&#62;TempQuery,$this-&#62;ComboBox1, Car_RegNum );</div></ol></div></div></div></div><br>
<br>
Тема решения: <a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=294539&view=findpost&p=2500264' target='_blank'>ComboBox</a>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2559242</guid>
        <pubDate>Tue, 06 Apr 2010 09:14:27 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2559242</link>
        <description><![CDATA[vicis: <span class='tag-u'>Задача:</span> Нужно в окне Windows1 открыть страницу с другого сайта (или со своего сайта другую форму)<br>
<span class='tag-u'>Решение:</span><br>
нужно поместить на форму окно Window1, на него панель Panel1, а к панели привязать событие<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">.....</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;class Unit2 extends Page</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public $Panel1 = null;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public $Window1 = null;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function Panel1Show($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &#39;&#60;iframe src =&quot;http://forums.delphi-php.net/&quot; height=&quot;100%&quot; width=&quot;100%&quot;&#62;&#60;/iframe&#62;&#39;;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // а так грузиш свою другую форму</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //echo &#39;&#60;iframe src =&quot;Unit3.php&quot; height=&quot;100%&quot; width=&quot;100%&quot;&#62;&#60;/iframe&#62;&#39;;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">.....</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2558270</guid>
        <pubDate>Mon, 05 Apr 2010 12:19:14 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2558270</link>
        <description><![CDATA[vicis: <span class='tag-u'>Задача:</span> Как сделать что бы при открытии модального окна информация основной страницы затенялась или скрывалась<br>
<span class='tag-u'>Решение:</span> (проверялось в IE,  в остальных проверяем сами)<br>
1.на форме unit1 компонент Window1 и кнопка Button1<br>
и ещё чего нибудь для демонстрации работы накидай, ну там вторую кнопку, мемо...<br>
<br>
2. в инспекторе Winow1-&gt;Modal = true;<br>
                Button1-&gt;ButtonType = btNormal;<br>
<br>
3. в коде<br>
<span class='tag-u'>вариант с затемнением</span><br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function Button1JSClick($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ?&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Add your javascript code here</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.getElementById(&#39;unit1&#39;).style.background = &#39;gray&#39;; // перекрашиваем форму</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Window1.show(); // открывем модальное окно (всё остальное блокируется пока окно открыто)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function Window1JSClose($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ?&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Add your javascript code here</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.getElementById(&#39;unit1&#39;).style.background = &#39;&#39;; // перекрашиваем форму назад</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// здесь возможно нужно восстанавличать цвет, а ранее его запоминать в какой то переменной, но в простом случае работает и так</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div></ol></div></div></div></div><br>
<br>
<br>
<span class='tag-u'>вариант где скрываем основную страницу пока отображаем модальное окно</span><br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function Button1JSClick($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ?&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Add your javascript code here</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.getElementById(&#39;unit1&#39;).style.display = &#39;none&#39;; &nbsp;//block - отображает страницу или элемент, а none прячет</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Window1.show(); // открывем модальное окно (всё остальное блокируется пока окно открыто)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function Window1JSClose($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ?&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Add your javascript code here</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;document.getElementById(&#39;unit9&#39;).style.display = &#39;block&#39;; &nbsp;//block - отображает страницу или элемент, а none прячет</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2549110</guid>
        <pubDate>Sat, 27 Mar 2010 13:49:00 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2549110</link>
        <description><![CDATA[vicis: <span class='tag-u'>Задача</span>: Как сделать чтобы данные в ячейки переносились т.е. высота ячейки менялась в зависимости от длинны данных OpenGrid<br>
<span class='tag-u'>Решение</span>: смотрим здесь <a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=286620&view=findpost&p=2549108' target='_blank'>OpenGrid ,вставка новой записи в Detail Grid (сообщение #2549108)</a>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2546988</guid>
        <pubDate>Thu, 25 Mar 2010 13:01:24 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2546988</link>
        <description><![CDATA[vicis: <span class='tag-u'>Задача:</span> Доступ к свойствам компонента OpenGrid<br>
<span class='tag-u'>Решение:</span><br>
1.Получить значение 1-й колонки в текущей строке грида OpenGrid2 при выборе ячейки<br>
если у грида свойство readonly=1<br>
<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function OpenGrid2JSCellSelect($sender, $params)</div><div class="code_line">{</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;?&#62;</div><div class="code_line">&nbsp;&nbsp;//Add your javascript code here</div><div class="code_line">&nbsp;&nbsp;alert(jQuery(&#39;#OpenGrid2&#39;).getGridParam(&#39;selrow&#39;));</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;&#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">}</div></ol></div></div></div></div><br>
<br>
<br>
2. Получить значения указанных колонок в текущей (выбранной) строке грида OpenGrid2 при выборе ячейки<br>
Работает это если у гида свойство readonly=1<br>
Здесь вытаскиваются колонки с названием полей PR_ID,PR_DATE<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function OpenGrid2JSCellSelect($sender, $params)</div><div class="code_line">{</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;?&#62;</div><div class="code_line">&nbsp;&nbsp;//Add your javascript code here</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;var id = jQuery(&quot;#OpenGrid2&quot;).getGridParam(&#39;selrow&#39;);</div><div class="code_line">&nbsp;&nbsp;if (id) </div><div class="code_line">&nbsp;&nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp;var ret = jQuery(&quot;#OpenGrid2&quot;).getRowData(id);</div><div class="code_line">&nbsp;&nbsp; &nbsp;alert(&quot;column pr_id=&quot;+ret.PR_ID+&quot; column pr_date=&quot;+ret.PR_DATE+&quot;...&quot;);</div><div class="code_line">&nbsp;&nbsp;} </div><div class="code_line">&nbsp;&nbsp;else { alert(&quot;Please select row&quot;);}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;&#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">}</div></ol></div></div></div></div><br>
<br>
<br>
3. Ещё несколько функций для доступу к параметрам грида<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;function Button2JSClick($sender, $params)</div><div class="code_line">{</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;?&#62;</div><div class="code_line">&nbsp;&nbsp;//Add your javascript code here</div><div class="code_line">&nbsp;&nbsp;alert(jQuery(&#39;#OpenGrid2&#39;).getGridParam(&#39;url&#39;)); &nbsp;// зачем это не понял пока</div><div class="code_line">&nbsp;&nbsp;alert(jQuery(&#39;#OpenGrid2&#39;).getGridParam(&#39;sortname&#39;)); // имя колонки в гриде по которой сейчас отсортированы данные</div><div class="code_line">&nbsp;&nbsp;alert(jQuery(&#39;#OpenGrid2&#39;).getGridParam(&#39;sortorder&#39;)); // порядок сортировки</div><div class="code_line">&nbsp;&nbsp;alert(jQuery(&#39;#OpenGrid2&#39;).getGridParam(&#39;selrow&#39;)); &nbsp;// значение первой колонки в строке</div><div class="code_line">&nbsp;&nbsp;alert(jQuery(&#39;#OpenGrid2&#39;).getGridParam(&#39;page&#39;)); &nbsp;// номер отображаемой страницы</div><div class="code_line">&nbsp;&nbsp;alert(jQuery(&#39;#OpenGrid2&#39;).getGridParam(&#39;rowNum&#39;)); // по сколько записей выводится на странице</div><div class="code_line">&nbsp;&nbsp;alert(jQuery(&#39;#OpenGrid2&#39;).getGridParam(&#39;datatype&#39;)); &nbsp;// тип данных</div><div class="code_line">&nbsp;&nbsp;alert(jQuery(&#39;#OpenGrid2&#39;).getGridParam(&#39;records&#39;)); &nbsp; // количесто записей в таблице базы данных</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;&#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">}</div></ol></div></div></div></div><br>
<br>
4. Реализовать связку master-detail<br>
Описано здесь <a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=283924&view=findpost&p=2399428' target='_blank'>установить easyGrid, OpenGrid (сообщение #2399428)</a><br>
<br>
5. Раскраска грида по значениям ячеек<br>
<br>
исходные данные для примера: таблица с полями TEST_ID (integer), TEST_NAME (varchar(20))<br>
заполнена всякими тестовыми значениями<br>
<br>
<strong class='tag-b'>Раскрашиваем выбранную запись в гриде</strong><br>
<br>
<br>
 <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function Button1JSClick($sender, $params)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;?&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;//Add your javascript code here</div><div class="code_line">&nbsp;&nbsp;var id = jQuery(&#39;#OpenGrid1&#39;).getGridParam(&#39;selrow&#39;);</div><div class="code_line">&nbsp;&nbsp;var ret = jQuery(&#39;#OpenGrid1&#39;).getRowData(id);</div><div class="code_line">&nbsp;&nbsp;//alert(&quot;TEST_ID=&quot;+ret.TEST_ID+&quot; TEST_NAME=&quot;+ret.TEST_NAME+&quot;...&quot;);</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;//тут надо вставить анализ данных и в зависимости от них окрашивать строку другим цветом</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;// шрифт в выбранной ячейке красим в нужный цвет</div><div class="code_line">&nbsp;&nbsp;jQuery(&quot;#OpenGrid1&quot;).setCell(id,&#39;TEST_NAME&#39;,&#39;&#39;,{&#39;color&#39;:&#39;#FF00FF&#39;}); &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp;// фон в выбранной ячейке красим в нужный цвет</div><div class="code_line">&nbsp;&nbsp;jQuery(&quot;#OpenGrid1&quot;).setCell(id,&#39;TEST_ID&#39;,&#39;&#39;,{&#39;background-color&#39;: &#39;#999999&#39;}); &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp;// меняем атрибуты шрифта в выбранной ячейке</div><div class="code_line">&nbsp;&nbsp;jQuery(&quot;#OpenGrid1&quot;).setCell(id,&#39;TEST_ID&#39;,&#39;&#39;,{&#39;color&#39;:&#39;#FF00FF&#39;, &#39;font-weight&#39;:&#39;bold&#39;},{&#39;title&#39;: &#39;это не меняет ничего!&#39;}); &nbsp; &nbsp; </div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;&#60;?php</div><div class="code_line">}</div></ol></div></div></div></div><br>
<br>
<br>
<strong class='tag-b'>Пробежать по всем отображаемым строкам в гриде и раскрасить их по нужным критериям</strong> можно так<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function Button3JSClick($sender, $params)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;?&#62;</div><div class="code_line">&nbsp;&nbsp;//Add your javascript code here</div><div class="code_line">&nbsp;&nbsp;var ids = jQuery(&quot;#OpenGrid1&quot;).getDataIDs(); // получаем массив ID</div><div class="code_line">&nbsp;&nbsp;for(var i=0;i &#60; ids.length;i++) &nbsp; //бежим по всем отображаемым строкам грида</div><div class="code_line">&nbsp;&nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp;var id_value = ids[i]; &nbsp; &nbsp;// получаем значение перво колонки очередной строки</div><div class="code_line">&nbsp;&nbsp; &nbsp;var ret = jQuery(&quot;#OpenGrid1&quot;).getRowData(id_value); &nbsp; &nbsp;// получаем объект со значениями полей</div><div class="code_line">&nbsp;&nbsp; &nbsp;// &nbsp;alert(&#39;Строка№ &#39;+i+&#39;, значение перовой колонки=&#39;+ id_value+&#39; поле TEST_ID=&#39;+ret.TEST_ID+&#39; поле TEST_NAME=&#39;+ret.TEST_NAME);</div><div class="code_line">&nbsp;&nbsp; &nbsp;if (ret.TEST_NAME==&#39;eee&#39;) // проверяем на значение = eee</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;// фон в выбранной ячейке красим в нужный цвет</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;jQuery(&quot;#OpenGrid1&quot;).setCell(id_value,&#39;TEST_NAME&#39;,&#39;&#39;,{&#39;background-color&#39;: &#39;#999999&#39;}); &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;if (ret.TEST_ID in [1,5]) // проверяем на значения 1 и 5</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;// фон в выбранной ячейке красим в нужный цвет</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;jQuery(&quot;#OpenGrid1&quot;).setCell(id_value,&#39;TEST_NAME&#39;,&#39;&#39;,{&#39;background-color&#39;: &#39;#999999&#39;}); &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;&#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">}</div></ol></div></div></div></div><br>
<br>
<br>
<strong class='tag-b'>Пробежать по всем отображаемым строкам в гриде и раскрасить их по нужным критериям сразу при отображении грида</strong> <br>
можно если предыдущий код вставить в событие OpenGrid1JSGridComplete<br>
<br>
6. Получить получить значение ячейки из указанной по имени колонки и строки с указанным значением<br>
описано здесь <a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=305351&view=findpost&p=2613574' target='_blank'>плучить значение ячейки в OpenGrid (сообщение #2613574)</a>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2521824</guid>
        <pubDate>Wed, 03 Mar 2010 06:22:22 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2521824</link>
        <description><![CDATA[Gluckodrom: <span class='tag-u'>Проблема:</span><br>
Как связать D4php и Firebird?<br>
<br>
<span class='tag-u'>Решение:</span><br>
Хоть и официально D4php поддерживает FB, но у многих подключиться с помощью компонента Database не получается. Поэтому был применен следующий подход.<br>
0. Если установлен Interbase или иная программа, которая юзает библиотеку GDS32.DLL, то останавливаем ее.<br>
1. Устанавливаем FB с отмеченной галочкой о библиотеке GDS32.DLL<br>
2. Идем по пути %systemroot%&#092;system32&#092; и копируем библиотеку GDS32.DLL в<br>
2.1 C:&#092;Program Files&#092;CodeGear&#092;Delphi for PHP&#092;2.0&#092;apache2&#092;bin&#092;<br>
2.2 C:&#092;Program Files&#092;CodeGear&#092;Delphi for PHP&#092;2.0&#092;<br>
2.3 C:&#092;Program Files&#092;CodeGear&#092;Delphi for PHP&#092;2.0&#092;packages&#092;<br>
2.4 C:&#092;Program Files&#092;CodeGear&#092;Delphi for PHP&#092;2.0&#092;php&#092;<br>
3. Все готово. Для связки D4php и Firebird используем Interbase компоненты.<br>
<br>
Примечание: Решения для использования ролей пока не найдено.<br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Это сообщение было перенесено сюда или объединено из темы &quot;<a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=294422' target='_blank'>Firebird + D4php</a>&quot;</span></span><br>
<br>
Примечание 2: В 3-й версии пишут что Firebird поддерживается]]></description>
        <author>Gluckodrom</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2507943</guid>
        <pubDate>Wed, 17 Feb 2010 09:38:31 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2507943</link>
        <description><![CDATA[vicis: <span class='tag-u'>Задача:</span> Открыть из одного окна другое (модально) и вернуть значения из него только по закрытию окна.<br>
Раз модальное окно, то соответственно первое в этот момент будет недоступно.<br>
<span class='tag-u'>Решение:</span><br>
(Проверено в IE) делаем в первом окне<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function Unit12AfterShow($sender, $params)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;echo &quot;&#60;script type=\&quot;text/JavaScript\&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;function returnInfo1(p_obr,p_name,p_fam,p_adr,p_city,p_country,p_tlf,p_tlf2)</div><div class="code_line">&nbsp;&nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; document.getElementById(&#39;p_obr&#39;).value = p_obr;</div><div class="code_line">&nbsp;&nbsp; &nbsp; document.getElementById(&#39;p_name&#39;).value = p_name;</div><div class="code_line">&nbsp;&nbsp; &nbsp; document.getElementById(&#39;p_fam&#39;).value = p_fam;</div><div class="code_line">&nbsp;&nbsp; &nbsp; document.getElementById(&#39;p_adr&#39;).value = p_adr;</div><div class="code_line">&nbsp;&nbsp; &nbsp; document.getElementById(&#39;p_city&#39;).value = p_city;</div><div class="code_line">&nbsp;&nbsp; &nbsp; document.getElementById(&#39;p_country&#39;).value = p_country;</div><div class="code_line">&nbsp;&nbsp; &nbsp; document.getElementById(&#39;p_tlf&#39;).value = p_tlf;</div><div class="code_line">&nbsp;&nbsp; &nbsp; document.getElementById(&#39;p_tlf2&#39;).value = p_tlf2;</div><div class="code_line">&nbsp;&nbsp;}</div><div class="code_line">&nbsp;&nbsp;&#60;/script&#62;&quot;;</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">function Label3JSClick($sender, $params)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;?&#62;</div><div class="code_line">&nbsp;&nbsp;res = window.showModalDialog(&quot;clientinfoz.php&quot;,&quot;&quot;,&quot;dialogHeight:576px; dialogWidth:616px;status=no&quot;);</div><div class="code_line">&nbsp;&nbsp;if(res!=null)</div><div class="code_line">&nbsp;&nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; returnInfo1(res[0],res[1],res[2],res[3],res[4],res[5],res[6],res[7]);</div><div class="code_line">&nbsp;&nbsp;}</div><div class="code_line">&nbsp;&nbsp;&#60;?php</div><div class="code_line">}</div></ol></div></div></div></div><br>
<br>
Возвращаем из второго окна (при этом закрываем его)<br>
1)вариант с обычным html:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&#60;input type=&quot;button&quot; value=&quot;добавить эту информацию о получателе в новый заказ&quot; &nbsp;</div><div class="code_line">&nbsp;&nbsp; onClick=&quot;window.returnValue = [&#39;555&#39;,&#39;666&#39;,&#39;777&#39;,&#39;888&#39;,&#39;999&#39;,&#39;000&#39;,&#39;111&#39;,&#39;222&#39;];window.close();&quot;&#62;&#39;</div></ol></div></div></div></div><br>
2)вариант формы delphiforphp:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function Button4JSClick($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ?&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; window.returnValue = [&#39;555&#39;,&#39;666&#39;,&#39;777&#39;,&#39;888&#39;,&#39;999&#39;,&#39;000&#39;,&#39;111&#39;,&#39;222&#39;];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; window.close();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#60;?php</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2502832</guid>
        <pubDate>Thu, 11 Feb 2010 12:35:18 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2502832</link>
        <description><![CDATA[vicis: <strong class='tag-b'><span class="tag-color tag-color-named" data-value="blue" style="color: blue">Проблемы переноса проекта на хостинг проайдера</span></strong><br>
<br>
После создания проекта и его успешной отладки на локальном компьютере могут быть проблемы с переносом этого проета к провайдеру<br>
Приведу некоторые проблемы с которыми столкнулся я и их решения<br>
в основном эти проблемы из за не одинаковой настройки php или apache<br>
<br>
1) у провайдера не была подключена <a class='tag-url' href='http://www.php.net/manual/en/ref.filter.php' target='_blank'>библиотека с функциями фильтрации</a> в php<br>
Проявлялось в виде сообщения типа: &quot;The Input Filter PHP extension is not setup on this PHP installation, so the contents returned by Input is *not* filtered&quot;<br>
удалось заставить подключить библиотеку путём предоставления примера, который не работал<br>
По phpinfo это не было видно (вроде бы), а программа выполненная на провайдере говорила, что функции не доступны<br>
на локальной же машине работало<br>
<br>
Пример в двух файлах:<br>
example04.php<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;?php</div><div class="code_line">if (!filter_has_var(INPUT_POST, &#39;submit&#39;)) {</div><div class="code_line">&nbsp;&nbsp; &nbsp;echo &quot;form&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;// include the form.</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">$age = filter_input(INPUT_POST, &#39;age&#39;, FILTER_VALIDATE_INT);</div><div class="code_line">if (is_null($age)) </div><div class="code_line">&nbsp;&nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp;echo &quot;Вы не ввели ничего(пустая переменная).&#60;br /&#62;&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;require_once(&#39;index.php&#39;);</div><div class="code_line">&nbsp;&nbsp;} </div><div class="code_line">&nbsp;&nbsp;elseif ($age === FALSE) </div><div class="code_line">&nbsp;&nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp;echo &quot;Введите число.&#60;br /&#62;&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;require_once(&#39;index.php);</div><div class="code_line">&nbsp;&nbsp;} </div><div class="code_line">&nbsp;&nbsp;else </div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp;echo &quot;Привет.&#60;br/&#62;&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;echo &quot;&#60;a href=&#39;test1.php&#39;&#62;В начало&#60;/a&#62;.&#60;br/&#62;&quot;;</div><div class="code_line">&nbsp;&nbsp;}</div><div class="code_line">?&#62;</div></ol></div></div></div></div><br>
<br>
index.php<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;html&#62;</div><div class="code_line">&#60;head&#62;&#60;/head&#62;</div><div class="code_line">&#60;body &#62;</div><div class="code_line">Проверка ввода числа</div><div class="code_line">&nbsp;</div><div class="code_line">&#60;form action=&quot;example04.php&quot; method=&quot;post&quot; &#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Enter your age: &#60;input name=&quot;age&quot; size=&quot;2&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Go&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;/form&#62;</div><div class="code_line">&#60;/body&#62;</div><div class="code_line">&#60;/html&#62;</div></ol></div></div></div></div><br>
<br>
2)У провайдера небыла установлена переменная output_buffering<br>
Проявлялось сообщением об ошибке в связи с тем что header уже послан<br>
это решили созданием в корне папки проекта файла .htaccess и занесением в него следующих строк:<br>
<span class="tag-color tag-color-named" data-value="red" style="color: red">php_flag output_buffering On<br>
php_value output_buffering 4096</span>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2480688</guid>
        <pubDate>Wed, 20 Jan 2010 18:10:17 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2480688</link>
        <description><![CDATA[ViktorXP: Если нужно создать простую таблицу с данными то можно воспользоваться компонентом HTML_Table который описан в vcl/PEAR/HTML/Table.php<br>
простой пример использования:<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;require_once (&#39;HTML/Table.php&#39;);</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;$table = new HTML_Table();</div><div class="code_line">&nbsp;$table-&#62;setAttribute(&#39;border&#39;, 1);</div><div class="code_line">&nbsp;for ($x = 1; $x &#60;= 9; $x++) </div><div class="code_line">&nbsp;{</div><div class="code_line">&nbsp;&nbsp; for ($y = 1; $y &#60;= 9; $y++) </div><div class="code_line">&nbsp;&nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;$table-&#62;setCellContents($x-1, $y-1, $x*$y);</div><div class="code_line">&nbsp;&nbsp; }</div><div class="code_line">&nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;echo $table-&#62;toHtml();</div><div class="code_line">&nbsp;</div><div class="code_line">?&#62;</div></ol></div></div></div></div>]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2426568</guid>
        <pubDate>Fri, 20 Nov 2009 08:41:31 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2426568</link>
        <description><![CDATA[vicis: <span class='tag-u'>Проблема:</span><br>
При подключении к SmartyTemplate некоторых компонент (решение не для всех компонент), например Panel,Label...<br>
нужно что бы они растягивались по контейнеру в который входят, например по размеру тега &lt;td&gt;, <br>
однако, они туда вставляются с шириной и высотой которую имеют на форме в дизайнере форм. <br>
Установка ширины или высоты в инспекторе объектов разрешается только в виде целых чисел, т.е. 100% не проходит. <br>
Как сделать 100% ?<br>
<span class='tag-u'>Решения:</span><br>
<strong class='tag-b'>1.Решение 1</strong><br>
- форме на которой находятся компоненты установить Layout.Type = FLOW_LAYOUT<br>
- дать команду конкретному компоненту writeAdjustToLayout(True) (по умолчанию там значение False)<br>
в этом случае при генерации компонента подставляются не установленные у него на форме высота и ширина, а height:100%;width:100%;<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function Unit9BeforeShow($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&#62;Label1-&#62;writeAdjustToLayout(True);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&#62;Panel1-&#62;writeAdjustToLayout(True);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&#62;Button1-&#62;writeAdjustToLayout(True);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div></ol></div></div></div></div><br>
<br>
при этом панель растягивается по тегу в котором находится<br>
а Label1 и Button по ширине тега, высота подстраивается под содержимое<br>
<br>
файл unit1.tpl<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;html&#62;</div><div class="code_line">.....</div><div class="code_line">&#60;body&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; {%$StartForm%}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;table width=100% border=1&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;tr&#62;&#60;td width=&quot;150&quot; height=&quot;200&quot;&#62;{$Panel1}&#60;/td&#62;&#60;td&#62;&#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;tr&#62;&#60;td width=&quot;150&quot;&#62;&#60;/td&#62;&#60;td&#62;&#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;tr&#62;&#60;td width=&quot;150&quot; height=&quot;200&quot;&#62;{$Label1}&#60;/td&#62;&#60;td height=&quot;200&quot;&#62;{$Button1}&#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; {%$EndForm%}</div><div class="code_line">&#60;/body&#62;</div><div class="code_line">&#60;/html&#62;</div></ol></div></div></div></div><br>
<br>
если посмотреть код html полученной страницы, то видим следующее:<br>
(для вышеприведённого шаблона)<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;html&#62;</div><div class="code_line">&#60;body&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &#60;form style=&quot;margin-bottom: 0&quot; id=&quot;Unit9&quot; name=&quot;Unit9&quot; method=&quot;post&quot; &nbsp;action=&quot;/unit9.php&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;table width=100% border=1&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;tr&#62;&#60;td width=&quot;150&quot; height=&quot;200&quot;&#62;&#60;div id=&quot;Panel1_outer&quot;&#62;</div><div class="code_line">&#60;table id=&quot;Panel1_table&quot; &nbsp;width=&quot;100%&quot; &nbsp; height=&quot;100%&quot; &nbsp;border=&quot;0&quot; &nbsp;cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; &nbsp; </div><div class="code_line">bgcolor=&quot;#00FF00&quot; &nbsp; &nbsp;style=&quot; border: 0px solid ; &quot; &nbsp; &#62;</div><div class="code_line">&#60;tr&#62;</div><div class="code_line">&#60;td style=&quot; font-family: Verdana; font-size: 10px; &nbsp;&quot;&#62;&#60;span style=&quot; font-family: Verdana; font-size: 10px; &nbsp;&quot;&#62;Panel1&#60;/span&#62;</div><div class="code_line">&#60;/td&#62;</div><div class="code_line">&#60;/tr&#62;</div><div class="code_line">&#60;/table&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">&#60;/div&#62;</div><div class="code_line">&#60;/td&#62;&#60;td&#62;&#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;tr&#62;&#60;td width=&quot;150&quot;&#62;&#60;/td&#62;&#60;td&#62;&#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;tr&#62;&#60;td width=&quot;150&quot; height=&quot;200&quot;&#62;&#60;div id=&quot;Label1_outer&quot;&#62;</div><div class="code_line">&#60;div id=&quot;Label1&quot; style=&quot; font-family: Verdana; font-size: 10px; &nbsp;background-color: #FF0000;height:100%;width:100%;&quot; &#62;</div><div class="code_line">Label1 seefwse we we twer twer twe wer we rwer w&#60;/div&#62;</div><div class="code_line">&#60;/div&#62;</div><div class="code_line">&#60;/td&#62;&#60;td height=&quot;200&quot;&#62;&#60;div id=&quot;Button1_outer&quot;&#62;</div><div class="code_line">&#60;input type=&quot;submit&quot; id=&quot;Button1&quot; name=&quot;Button1&quot; value=&quot;Button1&quot; &nbsp;</div><div class="code_line">onclick=&quot;return Button1ClickWrapper(event, document.forms[0].Button1SubmitEvent, &#39;Button1_Button1Click&#39;)&quot; &nbsp;</div><div class="code_line">style=&quot; font-family: Verdana; font-size: 10px; &nbsp;height:100%;width:100%;&quot; &nbsp; tabindex=&quot;0&quot; &nbsp; &nbsp;/&#62;</div><div class="code_line">&#60;input type=&quot;hidden&quot; id=&quot;Button1SubmitEvent&quot; name=&quot;Button1SubmitEvent&quot; value=&quot;&quot; /&#62;</div><div class="code_line">&#60;/div&#62;</div><div class="code_line">&#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &#60;/form&#62;</div><div class="code_line">&#60;/body&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">&#60;/html&#62;</div></ol></div></div></div></div><br>
<br>
<strong class='tag-b'>2.Решение 2</strong><br>
используем стили<br>
<br>
файл style.css<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">.xx {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;width: 100%;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;height: 100%;</div><div class="code_line">}</div></ol></div></div></div></div><br>
<br>
файл unit1.tpl<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;html&#62;</div><div class="code_line">&#60;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&#62;</div><div class="code_line">&#60;body&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; {%$StartForm%}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;table width=100% border=1&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;tr&#62;&#60;td width=&quot;150&quot; height=&quot;200&quot;&#62;{$Panel1}&#60;/td&#62;&#60;td&#62;&#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;tr&#62;&#60;td width=&quot;150&quot;&#62;&#60;/td&#62;&#60;td&#62;&#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;tr&#62;&#60;td width=&quot;150&quot; height=&quot;200&quot;&#62;{$Label1}&#60;/td&#62;&#60;td height=&quot;200&quot;&#62;{$Button1}&#60;/td&#62;&#60;/tr&#62;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; {%$EndForm%}</div><div class="code_line">&#60;/body&#62;</div><div class="code_line">&#60;/html&#62;</div></ol></div></div></div></div><br>
<br>
форма в файл Unit10.php <br>
на ней <br>
Label1, Panel1, Button1<br>
<br>
ставим маленьких размеров (что бы видно было масштабиравание)<br>
в инспекторе:<br>
Label1-&gt;Caption = &#39;Лучше нету того свету, Лучше нету того свету, Лучше нету того свету&#39;;<br>
Button1-&gt;Style = .xx<br>
Unit10-&gt;TemplateEngine=SmartyTemplate<br>
Unit10-&gt;TemplateFileName=unit1.tpl]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2426537</guid>
        <pubDate>Fri, 20 Nov 2009 08:16:16 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2426537</link>
        <description><![CDATA[vicis: <span class='tag-u'>Задача:</span><br>
В шаблон SmartyTemplate добавить переменную, которая отсутствует как компонент на форме<br>
но которую нужно заполнить каким либо значением<br>
<span class='tag-u'>Решение:</span><br>
<br>
вариант шаблона:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;html&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;head&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;title&#62;{%$xCaption%}&#60;/title&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;&#60;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/head&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;body&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;table id=&quot;mytab&quot; cellspacing=&quot;1&quot; cellpadding=&quot;1&quot; width=&quot;100%&quot; border=&quot;1&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;&#60;tbody&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;tr height=&quot;66&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;td&#62;&nbsp;5678&#60;/td&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;td&#62;&nbsp;{%$xtemp%}&#60;/td&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;td&#62;&nbsp;&#60;/td&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;/tr&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;tr height=&quot;15&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;td&#62;&nbsp;&#60;/td&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;td&#62;&nbsp;&#60;/td&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;td&#62;&nbsp;&#60;/td&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;/tr&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;&#60;/tbody&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;/table&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/body&#62;</div><div class="code_line">&#60;/html&#62;</div></ol></div></div></div></div><br>
<br>
<br>
код модуля php (событие onTemplate):<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; function Unit5Template($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; $template=$params[&#39;template&#39;];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; $template-&#62;_smarty-&#62;assign(&#39;xtemp&#39;,&#39;1234567890&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; $template-&#62;_smarty-&#62;assign(&#39;xCaption&#39;,&#39;MyTitle&#39;);</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; }</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2426524</guid>
        <pubDate>Fri, 20 Nov 2009 08:09:55 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2426524</link>
        <description><![CDATA[vicis: в дополнение к <a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=279937&view=findpost&p=2344473' target='_blank'>FAQ (сообщение #2344473)</a><br>
<span class='tag-u'>Проблема:</span><br>
При добавлении в шаблон SmartyTemplate компонент, которые построены на qx<br>
например: TreeView<br>
скролл пропадает и не появляется даже с кодом указанным в сообщении <a class='tag-url' href='http://forum.sources.ru/index.php?showtopic=279937&view=findpost&p=2344473' target='_blank'>FAQ (сообщение #2344473)</a><br>
<span class='tag-u'>Решение:</span><br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; function mainAfterShow($sender, $params)</div><div class="code_line">&nbsp;&nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;// FIX for Qadram&#39;s Scrollbar cockup!!</div><div class="code_line">?&#62;</div><div class="code_line">&nbsp;&nbsp; &#60;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;var d = qx.ui.core.ClientDocument.getInstance();</div><div class="code_line">&nbsp;&nbsp; &nbsp;d.setOverflow(&quot;auto&quot;);</div><div class="code_line">&nbsp;&nbsp; &#60;/script&#62;</div><div class="code_line">&#60;?php</div><div class="code_line">&nbsp;&nbsp; }</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2347158</guid>
        <pubDate>Tue, 25 Aug 2009 13:27:32 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2347158</link>
        <description><![CDATA[vicis: <span class='tag-u'>Проблема:</span><br>
В 1-й версии DelphiForPhp у компонента Query в редакторе колонок нет кнопок переместить колонки вверх, вниз.<br>
Это неудобно т.к. если нужно поменять их порядок то приходится перенабирать всё по новой.<br>
<span class='tag-u'>Решение:</span><br>
Взять 2-й DelphiForPhp (можно демо)<br>
и заменить у первого папку Program Files&#092;CodeGear&#092;Delphi for PHP&#092;1.0&#092;plugins<br>
на аналогичную от второго<br>
(там эти кнопки есть)<br>
IDE перезапустить<br>
<br>
здесь хранятся плагины редакторов свойств компонент,<br>
которые можно писать самостоятельно в Delphi (не на Delphi 7, а нужна версия выше)]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2347117</guid>
        <pubDate>Tue, 25 Aug 2009 13:03:05 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2347117</link>
        <description><![CDATA[vicis: <span class='tag-u'>Задача:</span> <br>
Передать содержимое панели(или другого элемента) в другую (копировать)<br>
<span class='tag-u'>Решение:</span><br>
- ставим на форму панель с чем то<br>
- ставим компонент Window1<br>
- на Window1 ставим другую панель<br>
и кнопкой в javascripte передаём содержимое в окно Window1<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">document.getElementById(&quot;PanelBig_outer&quot;).innerHTML = document.getElementById(&quot;PanelPowerShow_outer&quot;).innerHTML</div><div class="code_line">Window1.open();</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2347104</guid>
        <pubDate>Tue, 25 Aug 2009 12:56:10 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2347104</link>
        <description><![CDATA[vicis: <span class='tag-u'>Задача:</span><br>
Нужно управлять DBGrid (или ListView)<br>
<br>
<span class='tag-u'>Решение:</span><br>
<br>
1. установка ширины колонок (JavaScript)<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ListView1.getTableColumnModel().setColumnWidth(0,250);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ListView1.getTableColumnModel().setColumnWidth(1,250);</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DBGrid1.getTableColumnModel().setColumnWidth(0,1); // скрывема колонку путём установки ширины=1</div></ol></div></div></div></div><br>
<br>
2. добавить значения в ListView <br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var rowData = [];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rowData = tableModel.getData();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rowData.push([&#39;111&#39;, &#39;222&#39;,&#39;333&#39;]);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tableModel.setData(rowData);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ListView1.getTableModel().setColumnEditable(0, true); &nbsp;// сделать колонку редактируемой</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ListView1.getTableModel().setColumnEditable(1, true);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ListView1.getTableModel().setColumnEditable(2, true);</div></ol></div></div></div></div><br>
3. ПОСЧИТАТЬ СУММУ некоторой колонки<br>
 <br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var totcases=1*0 ,totsale=1*0</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var model = dbgrid.getTableModel();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var rowCount = model.getRowCount();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(var row = 0; row &#60; rowCount; row ++ )</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var order=parseInt(model.getValue(5,row));</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (order != model.getValue(5,row)) order=0;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var multi=parseInt(model.getValue(10,row));</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (multi != model.getValue(10,row)) multi=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var price=parseFloat(model.getValue(6,row));</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (price != model.getValue(6,row)) price=0;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; totcases+=order;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; totsale+=parseInt(order*multi*price*100)/100;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div></ol></div></div></div></div><br>
 <br>
4. ПОЛУЧИТЬ ЗНАЧЕНИЕ ЯЧЕЙКИ<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">var row = dbgrid1.getFocusedRow();</div><div class="code_line">var col = dbgrid1.getFocusedColumn();</div><div class="code_line">var value=dbgrid1.getTableModel().getValue(col,row);</div><div class="code_line">alert(&#39;col = &#39;+col+&#39; row = &#39;+row+&#39; cell = &#39;+value);</div></ol></div></div></div></div><br>
<br>
5. ДИНАМИЧЕСКИ ПРОПИСАТЬ КОЛОНКИ<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function Unit306BeforeShow($sender, $params)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;$prop=array();</div><div class="code_line">&nbsp;&nbsp;$prop[&#39;products&#39;][&#39;products_id&#39;]=array(&#39;displaylabel&#39;=&#62;array(&#39;ID&#39;));</div><div class="code_line">&nbsp;&nbsp;$prop[&#39;products&#39;][&#39;products_quantity&#39;]=array(&#39;displaylabel&#39;=&#62;array(&#39;Quantity&#39;));</div><div class="code_line">&nbsp;&nbsp;$this-&#62;dboscommerce1-&#62;DictionaryProperties=$prop;</div><div class="code_line">}</div></ol></div></div></div></div><br>
6. ЧАСТО ИСПОЛЬЗУЕМЫЕ МЕТОЫ<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">var row = dbgrid.getFocusedRow();</div><div class="code_line">var column = dbgrid.getFocusedColumn(); </div><div class="code_line">var value=dbgrid.getTableModel().getValue(col,row);</div><div class="code_line">dbgrid.getTableModel().setValue(col,row,value);</div><div class="code_line">dbgrid.sortByColumn (col, true);</div><div class="code_line">dbgrid.setFocusedCell(col, row, true);</div><div class="code_line">dbgrid.getSelectionModel().setSelectionInterval(row, row);</div></ol></div></div></div></div><br>
<br>
7. ПРИМЕР ПРОГРАММЫ КОТОРАЯ ДЕЛАЕТ ПОИСК ПО DBGRID<br>
(проверено, работает)<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function &nbsp;jsDBGfindtext(model,thetext,startingRow,column)</div><div class="code_line">&nbsp;&nbsp;{ &nbsp;//zips thru a dbgrid to find something</div><div class="code_line">&nbsp;&nbsp; &nbsp; var rowCount = model.getRowCount();</div><div class="code_line">&nbsp;&nbsp; &nbsp; for(var row = startingRow; row &#60; rowCount; row ++ )</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var desc = model.getValue(column,row);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (typeof(desc)==&quot;number&quot;) desc=desc.toString();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (typeof(thetext)==&quot;number&quot;) thetext=thetext.toString();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;desc = desc.toUpperCase();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;thetext = thetext.toUpperCase();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ( desc.indexOf(thetext)&#62;=0) return (row);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;return (-1);</div><div class="code_line">&nbsp;&nbsp; }</div><div class="code_line">//the calling routine from a basic edit</div><div class="code_line">&nbsp;&nbsp; function EsearchdbgridJSKeyUp($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ?&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var lookfor = findObj(&#39;Esearchdbgrid&#39;).value;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (lookfor.length &#60; 2) startRow = 0;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (lookfor.indexOf(&#39; &#39;,0)) //use space bar as a look for next occurrence.</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var look = lookfor.split(&#39; &#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lookfor=look[0];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (typeof(startRow)==&#39;undefined&#39;) startRow=-1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;startRow++;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;startRow=jsDBGfindtext(dbgrid.getTableModel(),lookfor,startRow,4);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (startRow&#62;-1)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbgrid.setFocusedCell(5, startRow, true);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbgrid.getSelectionModel().setSelectionInterval(startRow, startRow);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#60;?php</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2347063</guid>
        <pubDate>Tue, 25 Aug 2009 12:42:55 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2347063</link>
        <description><![CDATA[vicis: <span class='tag-u'>Задача:</span><br>
Передать параметры из формы в форму<br>
Например: значение первой колонки из выбранной записи DBGrid1<br>
<span class='tag-u'>Решение:</span><br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function BitBtn4JSClick($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ?&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (confirm(&quot;Вы уверены, что хотите удалить этого сотрудника?&quot;))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t_id=DBGrid1.getTableModel().getValue(0, DBGrid1.getFocusedRow());</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; location.href=&quot;/formdelete.php?act=delete&amp;id=&quot;+t_id;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#60;?php</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div></ol></div></div></div></div><br>
<br>
   в форме formdelete.php получаем в событии BeforeShow(&#036;sender, &#036;params)<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$action=$this-&#62;input-&#62;act;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (is_object($action))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$del_id=$this-&#62;input-&#62;id;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ...</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2347023</guid>
        <pubDate>Tue, 25 Aug 2009 12:29:57 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2347023</link>
        <description><![CDATA[vicis: <span class='tag-u'>Задача:</span><br>
Если нужно использовать панель с набором компонентов на ней не в том месте где она<br>
установлена на форме, а в произвольном, определяемом неким порядком генерации страницы<br>
которым мы должны управлять, то есть использовать эту панель как шаблон<br>
<span class='tag-u'>Решение:</span><br>
нужно сделать так<br>
         - ставим панель на форму (например с именем PanelNewCode)<br>
         - панели устанавливаем в режиме редактирования :<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&#62;PanelNewCode-&#62;Visible = false;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&#62;PanelNewCode-&#62;Layout-&#62;Type = &#39;REL_XY_LAYOUT&#39;;</div></ol></div></div></div></div><br>
         - прописываем в то место где хотим вставить панель такой код (например встроить панель в таблицу):<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; $mycodetable = &#39;&#60;table&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;tr&#62;&#60;td&#62;здесь встроена моя панель 1-й раз &#39;.$this-&#62;PanelNewCode-&#62;show(true).&#39;&#60;/td&#62;&#60;/tr&#62; &nbsp;// вставляем панель первый раз</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;tr&#62;&#60;td&#62;здесь встроена моя панель 2-й раз &#39;.$this-&#62;PanelNewCode-&#62;show(true).&#39;&#60;/td&#62;&#60;/tr&#62; &nbsp;// вставляем панель второй раз</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#60;/table&#62;&#39;;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; echo $mycodetable;</div></ol></div></div></div></div><br>
         - однако т.к.  PanelNewCode невидимая, то есть проблема<br>
           если на этой панели есть компоненты у которых прописаны обработчики событий (например кнопка)<br>
           то vcl не сгенерирует их в страницу, т.к. родитель не видимый<br>
           решение здесь такое:<br>
           прописываем сгенерировать код события принудительно<br>
           (например для кнопки Button1, которая находится на невидимой панели и имеет обработчик события)<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function zakazinfoAfterShow($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&#60;script type=\&quot;text/JavaScript\&quot;&#62;&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$this-&#62;Button1-&#62;dumpJsEvents();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&#60;/script&#62;&quot;;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div></ol></div></div></div></div><br>
           это событие здесь для формы с названием zakazinfo]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2347002</guid>
        <pubDate>Tue, 25 Aug 2009 12:22:32 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2347002</link>
        <description><![CDATA[vicis: <span class='tag-u'>Проблема:</span><br>
Если нужно закрыть компонент  Window при запуске формы, а потом его по кнопке отобразить с помощью JavaScript<br>
то при установке свойства невидимости оно вообще не генерируется в код<br>
и соотвественно потом не вызывается из JavaScript<br>
<span class='tag-u'>Решение:</span><br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function PageInfoAfterShow($sender, $params)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&#60;script type=\&quot;text/JavaScript\&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Window1.close();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#60;/script&#62;&quot;;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div></ol></div></div></div></div>]]></description>
        <author>vicis</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344533</guid>
        <pubDate>Sat, 22 Aug 2009 18:05:14 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344533</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
Проект в кодировке <span class='tag-u'>windows-1251</span>. Использую ajax. Вместо кириллицы получаю корокзяблы<br>
<span class='tag-u'>Решение:</span><br>
Открываем модуль xajax.inc.php  и подправляем строку <br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">define (&#39;XAJAX_DEFAULT_CHAR_ENCODING&#39;, &#39;utf-8&#39;); // ставим нужную нам кодировку (в данном случаи windows-1251)</div></ol></div></div></div></div>]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344520</guid>
        <pubDate>Sat, 22 Aug 2009 17:41:53 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344520</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
Где dbgrid хранит текстовые константы? (1 of 9 rows selected)<br>
<span class='tag-u'>Решение:</span><br>
в файле %Program Files%&#092;CodeGear&#092;Delphi for PHP&#092;1.0&#092;vcl&#092;qooxdoo&#092;framework&#092;script&#092;qx.js в масиве &#036;=[....] лежит каждое слово по отдельности]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344515</guid>
        <pubDate>Sat, 22 Aug 2009 17:35:32 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344515</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
DBGrid показывает все колонки, хотя в некоторых стоит свойство Visible=false<br>
<br>
<span class='tag-u'>Решение:</span><br>
1)<br>
Открываем модуль dbgrids.inc.php и ищем там такой код:<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$dwidth=$value[&#39;Width&#39;];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$color=$value[&#39;Color&#39;];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$fontcolor=$value[&#39;FontColor&#39;];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$alignment=$value[&#39;Alignment&#39;];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$fname=$value[&#39;Fieldname&#39;];</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$props=$this-&#62;_datasource-&#62;DataSet-&#62;readFieldProperties($fname);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ($props)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (array_key_exists(&#39;displaywidth&#39;,$props))</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$dwidth=$props[&#39;displaywidth&#39;][0];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot; &nbsp; &nbsp; &nbsp; &nbsp;$this-&#62;Name.getTableColumnModel().setColumnWidth($i,$dwidth);\n&quot;;</div></ol></div></div></div></div><br>
Добавляем две строки перед или после той строки что я указал последней<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; $_Visible=$value[&#39;Visible&#39;]; //Эту</div><div class="code_line">&nbsp;&nbsp; echo &quot; &nbsp; &nbsp; &nbsp; &nbsp;$this-&#62;Name.getTableColumnModel().setColumnVisible($i,$_Visible);\n&quot;; //и эту</div><div class="code_line">&nbsp;&nbsp; echo &quot; &nbsp; &nbsp; &nbsp; &nbsp;$this-&#62;Name.getTableColumnModel().setColumnWidth($i,$dwidth);\n&quot;; //Я поставил перед этой</div></ol></div></div></div></div>Теперь грид будет реагировать на параметр Visible в свойсве Columns <br>
2)<br>
Ну если вручную менять то можно так<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">?&#62;</div><div class="code_line">&nbsp;&nbsp;DBGrid1.getTableColumnModel().setColumnWidth(1,50) // размер</div><div class="code_line">&nbsp;&nbsp;DBGrid1.getTableColumnModel().setColumnVisible(1, false) // видимость</div><div class="code_line">&#60;?php</div></ol></div></div></div></div> <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2009-08-22T17:38:45+00:00">22.08.09, 17:38</time></span></span><br>
в компоненте нет свойства Visible для колонок поэтому там пока через JS<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">ListViewBank.getTableColumnModel().setColumnVisible(0, false);</div></ol></div></div></div></div>]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344510</guid>
        <pubDate>Sat, 22 Aug 2009 17:25:30 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344510</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
Как центрировать форму с компонентами?<br>
<br>
<span class='tag-u'>Решение:</span><br>
выставляется параметр &quot;Layout.Type&quot; у формы отличающийся от &quot;ABS_XY_LAYOUT&quot;( например &quot;XY_LAYOUT&quot;) <br>
и присваиваем свойству Alignment значение agCenter]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344508</guid>
        <pubDate>Sat, 22 Aug 2009 17:17:14 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344508</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
Никак не пойму, какой метод или свойство у BDGrid содержит текущую выделенную строку и поле. <br>
<br>
<span class='tag-u'>Решение:</span><br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">document.getElementById(&#39;Edit1&#39;).value = DBGrid1.getTableModel().getValue(1, DBGrid1.getFocusedRow())</div></ol></div></div></div></div>Присваивает едиту значение второго столбца выбранной строки грида.]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344507</guid>
        <pubDate>Sat, 22 Aug 2009 17:13:56 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344507</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
Есть проблема с combobox. Не получалось программно определить текущее значение выбранного элемента. <br>
<br>
<span class='tag-u'>Решение:</span><br>
Можно воспользоватся такой функцией<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function GetComboSelectKey($Combo,$TypeValue=0)</div><div class="code_line">/* возвращает значение ключа(key) или текст выбранной записив Combobox $TypeValue=0 - key, =1 - текст*/</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;if ($Combo-&#62;Count&#60;1) return &#39;&#39;; &nbsp; </div><div class="code_line">&nbsp;&nbsp;$items=$Combo-&#62;Items; &nbsp; </div><div class="code_line">&nbsp;&nbsp;reset($items); &nbsp; </div><div class="code_line">&nbsp;&nbsp;while(list($key, $val)=each($items)) &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp;{ &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;if ($Combo-&#62;readSelected($key))</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if ($TypeValue==0) &nbsp;{ return $key; }</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;else &nbsp;{ return $val; }</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp;}</div><div class="code_line">}</div></ol></div></div></div></div>]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344505</guid>
        <pubDate>Sat, 22 Aug 2009 17:08:07 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344505</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
Хочу чтобы календать, находящийся в VCL, был по русски.  <br>
<br>
<span class='tag-u'>Решение:</span><br>
В моделе comctrls.inc.php в класах  MonthCalendar  и  DateTimePicker  есть строка<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;$this-&#62;_calendar = new DHTML_Calendar(VCL_HTTP_PATH.&quot;/jscalendar/&quot;, &quot;en&quot;, &#39;calendar-win2k-2&#39;, false);</div></ol></div></div></div></div>                         <br>
Вот тут и меняй язык &#39;en&#39; на &#39;ru&#39;]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344488</guid>
        <pubDate>Sat, 22 Aug 2009 16:50:43 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344488</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
Где ide хранить php.ini?<br>
<span class='tag-u'>Решение:</span><br>
Файл лежит тут:<br>
%Documents and Settings%&#092;{user}&#092;Application Data&#092;CodeGear&#092;Delphi for PHP&#092;2.0&#092;php&#092;php.ini<br>
Но изменять его бесполезно так как среда его изменяет самостоятельно. Правильнее настройки вносить <br>
<br>
через саму ide. Если этого мало то тогда можно внести настройки в сам шаблон по которому среда <br>
<br>
формирует файл<br>
%Delphi for PHP%&#092;2.0&#092;php&#092;php.ini.template]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344487</guid>
        <pubDate>Sat, 22 Aug 2009 16:50:22 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344487</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
Как изменить кодировку файла?<br>
<span class='tag-u'>Решение:</span><br>
в окне редактирования тыкаеш правую кнопку мыши <strong class='tag-b'>File Encoding</strong> с подпунктами.]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344486</guid>
        <pubDate>Sat, 22 Aug 2009 16:49:42 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344486</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
настройки <br>
Unit1-&gt;Encoding = Unicode (UTF-8) |utf-8 <br>
Unit2-&gt;Encoding = Unicode (UTF-8) |utf-8 <br>
IDE/Tools/Options/Default Charset = utf-8 (Language = &quot;utf-8&quot;) <br>
IDE/Tools/Options/Editor options/Text encoding = utf-8<br>
<br>
- ставим panel1 на форму unit1 <br>
- в инспекторе пишем panel1-&gt;caption = &#39;Тра-та-та&#39; <br>
- ставим panel2 на форму unit2 <br>
- в инспекторе пишем panel2-&gt;include = unit1 <br>
<br>
видим в редакторе краказяблы <br>
а запускаем - нормально <br>
<span class='tag-u'>Решение:</span><br>
добавляется в модуль extctrls.inc.php две процедуры <br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function get_include_contents($filename) </div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;if (is_file($filename)) </div><div class="code_line">&nbsp;&nbsp;{ &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ob_start(); &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;include $filename; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;$contents = ob_get_contents();</div><div class="code_line">&nbsp;&nbsp; &nbsp;ob_end_clean(); &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;return $contents; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp;} &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp;return false;</div><div class="code_line">}</div><div class="code_line">function GetANSI($str)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;$charset = &#39;windows-1251&#39;;</div><div class="code_line">&nbsp;&nbsp;$_encoding = mb_detect_encoding($str, &quot;UTF-8, $charset&quot;);</div><div class="code_line">&nbsp;&nbsp;if (strcasecmp($_encoding, &#39;UTF-8&#39;)==0)</div><div class="code_line">&nbsp;&nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp;return mb_convert_encoding($str, $charset, $_encoding);</div><div class="code_line">&nbsp;&nbsp;} </div><div class="code_line">&nbsp;&nbsp;else &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp;return $str;</div><div class="code_line">&nbsp;&nbsp;}</div><div class="code_line">}</div></ol></div></div></div></div><br>
Потом переписываем кусок<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">if ($this-&#62;_include!=&quot;&quot;)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;include($this-&#62;_include);</div><div class="code_line">}</div></ol></div></div></div></div><br>
На<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">if ($this-&#62;_include!=&quot;&quot;)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;if (($this-&#62;ControlState &amp; csDesigning) != csDesigning)</div><div class="code_line">&nbsp;&nbsp;{ &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;include($this-&#62;_include);</div><div class="code_line">&nbsp;&nbsp;}</div><div class="code_line">&nbsp;&nbsp;else</div><div class="code_line">&nbsp;&nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp;$string = get_include_contents($this-&#62;_include);</div><div class="code_line">&nbsp;&nbsp; &nbsp;echo GetANSI($string);</div><div class="code_line">&nbsp;&nbsp;}</div><div class="code_line">}</div></ol></div></div></div></div>                         <br>
тоесть когда код будет в дизайн тайме выводится то наша процедура будет его перекодировать в анси, <br>
а когда на сервере как сайт то будет выводится без переделки.]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344485</guid>
        <pubDate>Sat, 22 Aug 2009 16:49:11 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344485</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
Какие настройки отвечают за кодировку?<br>
<br>
<span class='tag-u'>Решение:</span><br>
IDE/Tools/Options/Default Charset <br>
IDE/Tools/Options/Editor options/Text encoding <br>
Unit1-&gt;Encoding<br>
(Unit1 -  это имя редактируемого модуля)]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344484</guid>
        <pubDate>Sat, 22 Aug 2009 16:48:40 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344484</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
А каким образом без мышки можно перемещаться по элементам формы?<br>
<br>
<span class='tag-u'>Решение:</span><br>
1)<br>
У каждого контрола, который имеет фокус, есть свойства TabOrder (параметр порядка предоставления <br>
<br>
фокуса), TabStop (Давать фокус по табу или нет)<br>
2)<br>
Или можно решить это через JavaScript<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function Edit2JSKeyUp($sender, $params)</div><div class="code_line">{</div><div class="code_line">?&#62;</div><div class="code_line">&nbsp;&nbsp;//if (event.keyCode == 13|| event.keyCode == 9)</div><div class="code_line">&nbsp;&nbsp;if (event.keyCode == 40) // если нажата клавиша &quot;стрелка вниз&quot;</div><div class="code_line">&nbsp;&nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp;findObj(&quot;Edit1&quot; ).focus();</div><div class="code_line">&nbsp;&nbsp;} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp;if (event.keyCode == 38) // если нажата клавиша &quot;стрелка вверх&quot;</div><div class="code_line">&nbsp;&nbsp;{ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;findObj(&quot;Edit3&quot;).focus(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp;}</div><div class="code_line">&#60;?php</div><div class="code_line">}</div></ol></div></div></div></div>]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344483</guid>
        <pubDate>Sat, 22 Aug 2009 16:48:15 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344483</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
Пустой проект выдает ошибку <br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Warning: Unknown: Failed opening &#39;C:/Documents and Settings/User/Мои документы/Delphi for PHP Projects/unit1.php&#39; <br>
  for inclusion (include_path=&#39;.;C:&#092;Program Files&#092;Programming&#092;Delphi for PHP 1.0&#092;&#39; ) in Unknown on line 0</div></div>    <br>
<span class='tag-u'>Решение:</span><br>
Delphi for PHP не любит русские пути. Поэтому сохраняй проект в другом месте.<br>
<br>
Кроме этого стоит проверить что:<br>
- имя пользователя под которым Вы установили и используете Delphi For Php содержит только английские буквы и не содержит пробелов<br>
- после создания нового проекта сохраните его в папку, которая содержит только английские буквы и не содержит пробелов<br>
- если проект не запускается и находится на диске отличном от C: попробуйте сохранить его на диск C:]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344481</guid>
        <pubDate>Sat, 22 Aug 2009 16:47:40 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344481</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
как узнать программно что страница/компонент отображается в редакторе форм <br>
<br>
<span class='tag-u'>Решение:</span><br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">if &nbsp; (($this-&#62;ControlState &amp; csDesigning) != csDesigning) ...</div></ol></div></div></div></div>]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344479</guid>
        <pubDate>Sat, 22 Aug 2009 16:45:52 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344479</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
Как изменить размер шрифта у ListView ?<br>
<br>
<span class='tag-u'>Решение:</span><br>
1)<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function Button1JSClick($sender, $params) </div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp;?&#62; </div><div class="code_line">&nbsp;&nbsp;//Add your javascript code here </div><div class="code_line">&nbsp;&nbsp;document.getElementById(&#39;ListView1&#39;).style.font = &quot;bold small-caps 12pt/14pt sans-serif&quot;; </div><div class="code_line">// document.getElementById(&#39;ListView1&#39;).style.font = &quot; 12pt/14pt sans-serif top&quot;; </div><div class="code_line">&nbsp;&nbsp;&#60;?php </div><div class="code_line">}</div></ol></div></div></div></div> 2)<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">document.all[&#39;ListView1&#39;].style.left = 0; </div><div class="code_line">document.all[&#39;ListView1&#39;].style.position = &#39;relative&#39;; </div><div class="code_line">document.all[&#39;ListView1&#39;].style.font = &#39;20px verdana,arial,helvetica&#39;; </div><div class="code_line">document.all[&#39;ListView1&#39;].style.textAlign = &#39;right&#39;; </div><div class="code_line">document.all[&#39;ListView1&#39;].style[&#39;color&#39;] = &#39;blue&#39;; </div><div class="code_line">document.all[&#39;ListView1&#39;].style[&#39;size&#39;] = &#39;18px&#39;; </div><div class="code_line">document.all[&#39;ListView1&#39;].style.fontSize = &#39;22px&#39;;</div></ol></div></div></div></div>]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344478</guid>
        <pubDate>Sat, 22 Aug 2009 16:44:39 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344478</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
В базу при помощи цикла записывал 100000 записей. При выполнении выдало ошибку<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Fatal error: Maximum execution time of 30 seconds exceeded in T:\home\localhost\ryterna\vcl\adodb\adodb.inc.php on line 831</div></ol></div></div></div></div><br>
<br>
<span class='tag-u'>Решение:</span><br>
В настройках по умолчанию стоит максимальное время выполнение скрипта  30 сикунд.  <br>
изменить его можно в файл в php.ini.template. В секции &quot;<span class='tag-u'>Resource Limits</span>&quot; есть параметр <strong class='tag-b'>max_execution_time</strong>]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344476</guid>
        <pubDate>Sat, 22 Aug 2009 16:44:02 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344476</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
  Как удалять из &quot;Welcome Page&quot; уже не существующие проекты?<br>
<br>
<span class='tag-u'>Решение:</span><br>
  Записи о проектах лежат в реестре<br>
  HKEY_CURRENT_USER&#092;Software&#092;CodeGear&#092;Delphi for PHP&#092;1.0&#092;mru {в первой версии}<br>
  HKEY_CURRENT_USER&#092;Software&#092;CodeGear&#092;Delphi for PHP&#092;2.0&#092;mru {во второй версии}]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344474</guid>
        <pubDate>Sat, 22 Aug 2009 16:43:07 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344474</link>
        <description><![CDATA[ViktorXP: Тут есть процентное соотношение но подано слегка не стандартным для нас способом. <br>
<br>
Каждай компонент-контейнер можно поделить виртуально сеткой на квадраты.  <br>
Для этого в компонента есть свойства  <strong class='tag-b'>Layout.Cols</strong> и <strong class='tag-b'>Layout.Rows</strong> <br>
Способ выравнивания определяется свойством <strong class='tag-b'>Layout.Type </strong><br>
После установки размера сетки растягиваем внутренний компонент на столько квадратов сколько нам <br>
<br>
нужно.  <br>
Когда будет компнент-контейнер менятся то он будет автоматически менать размер и внутренних <br>
<br>
компонентов в соответствии занятых квадратов.]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344473</guid>
        <pubDate>Sat, 22 Aug 2009 16:41:08 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344473</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Проблема:</span><br>
При использовании DBGrida и Smarty с формы исчезает скрол.<br>
<br>
<span class='tag-u'>Решение:</span><br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">function Unit1JSLoad($sender, $params) </div><div class="code_line">{ </div><div class="code_line">&nbsp;</div><div class="code_line">?&#62; </div><div class="code_line">//Add your javascript code here </div><div class="code_line">d.setOverflow(&quot;scroll&quot;); </div><div class="code_line">&#60;?php </div><div class="code_line">&nbsp;</div><div class="code_line">}</div></ol></div></div></div></div>]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344472</guid>
        <pubDate>Sat, 22 Aug 2009 16:38:46 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344472</link>
        <description><![CDATA[ViktorXP: <span class='tag-u'>Советы:</span><br>
При создании шаблона в теле документа нужно незабыть указать три параметра <strong class='tag-b'>{&#036;HeaderCode}</strong> (В это месте будут формироватся JavaScript вставки), <strong class='tag-b'>{&#036;StartForm}</strong> и <strong class='tag-b'>{&#036;EndForm}</strong> (в этих местах будет вставлены теги начала и конца формы соответственно)<br>
<br>
<br>
Чтобы заставить обновится какойто контрол достаточно нажать по нему правой кнопкой мыши и вызвать control-&gt;repain или нажать Shift+Ctrl+F12]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344471</guid>
        <pubDate>Sat, 22 Aug 2009 16:36:23 +0000</pubDate>
        <title>Delphi for PHP (RAD PHP XE, HTML5 Builder ): FAQ</title>
        <link>https://forum.sources.ru/index.php?showtopic=279937&amp;view=findpost&amp;p=2344471</link>
        <description><![CDATA[ViktorXP: <span class="tag-color tag-color-named" data-value="blue" style="color: blue"><strong class='tag-b'>Запуска проекта на удаленном сервере</strong></span><br>
Когда вы закончите разрабатывать свой проект нужно сформировать рабочий проект<br>
Для этого в делфи есть «Deployment Wizard» (вызвать можно Tools-&gt; Deployment Wizard или соответствующую кнопку в тулбаре)<br>
Мастер скопирует ваш проект в папку (которую вы ему укажите) и в ней папку vcl, в которой будут находится необходимые компоненты и файлы. <br>
Копируете это все на сервер с помощью <a class='tag-url' href='http://ru.wikipedia.org/wiki/%D0%A1%D1%80%D0%B0%D0%B2%D0%BD%D0%B5%D0%BD%D0%B8%D0%B5_FTP-%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D0%BE%D0%B2' target='_blank'>ftp клиента</a>. Заходим на сайт и смотрим результат. <br>
<br>
Бывает что мастер может не доложить какой-то файл. В этом случае его нужно поискать в vcl библиотеки<br>
<span class='tag-u'>%Program Files%&#092;CodeGear&#092;Delphi for PHP&#092;2.0&#092;vcl&#092;</span><br>
<span class='tag-u'>%Program Files%&#092;Embarcadero&#092;RadPHP&#092;3.0&#092;rpcl</span><br>
и положить в соответствующую папку в своем сформированном проекте. <br>
Для 3-й версии актуально не vcl, а папка rcpl<br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2009-08-22T16:37:03+00:00">22.08.09, 16:37</time></span></span><br>
<span class='tag-u'>Проблема: </span><br>
 Иногда возникает ошибка при использовании шаблона Smart<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Fatal error: Smarty error: the &#036;compile_dir &#39;/tmp&#39; does not exist....</div></div><br>
<span class='tag-u'>Решение:</span><br>
 Открываем файл smartytemplate.inc.php<br>
 Находим строчку <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">$this-&#62;_smarty-&#62;compile_dir = &#39;/tmp&#39;;</div></ol></div></div></div></div>                        <br>
 И указываем полный путь к темповой папке <br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">$this-&#62;_smarty-&#62;compile_dir = &#39;C:/WINDOWS/Temp&#39;; //&#39;C:/tmp&#39;</div></ol></div></div></div></div>]]></description>
        <author>ViktorXP</author>
        <category>Delphi for PHP</category>
      </item>
	
      </channel>
      </rss>
	