<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Условие выбора экстраполя в php</title>
		<link>https://www.cotonti.com</link>
		<description>Neueste Themenbeiträge</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Mon, 13 Apr 2026 23:51:19 -0000</pubDate>

		<item>
			<title>Kopusha</title>
			<description><![CDATA[<p>Пиши всюду<span style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;"> по php коду</span> //пояснение что делает эта строка - потом будет проще. Я в свое время в бирже отловил кучу багов но у себя, в инстале они есть. Точно помню что в folio/projects.add/edit какая то проверка была не на месте в исходном.</p>
]]></description>
			<pubDate>Mi, 29 Apr 2020 16:22:33 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44671]]></link>
		</item>
		<item>
			<title>ed.moriarti</title>
			<description><![CDATA[<blockquote class="fp"><a href="https://www.cotonti.com/ru/forums?m=posts&amp;q=8942&amp;d=2#44669">#44669</a> <strong>Kopusha: </strong>
<p>Два письма с тайтлом projects_deleted_mail_hideerror1? Точно где то выше еще уловие не срабатывает?</p>
</blockquote>

<p>Ты знаешь, походу глюк какой-то был, сейчас по одному приходит. Чертовщина какая-то.</p>
]]></description>
			<pubDate>Mi, 29 Apr 2020 12:49:34 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44670]]></link>
		</item>
		<item>
			<title>Kopusha</title>
			<description><![CDATA[<p>Два письма с тайтлом projects_deleted_mail_hideerror1? Точно где то выше еще уловие не срабатывает?</p>
]]></description>
			<pubDate>Mi, 29 Apr 2020 12:34:14 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44669]]></link>
		</item>
		<item>
			<title>ed.moriarti</title>
			<description><![CDATA[<blockquote class="fp"><a href="https://www.cotonti.com/ru/forums?m=posts&amp;q=8942&amp;d=2#44641">#44641</a> <strong>Dayver: </strong>
<p>В файле <span style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;text-align:justify;background-color:rgb(255,255,255);">projects.edit.php где то сверху, можно сразу после строки</span></p>

<p><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">list(</code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$usr</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'auth_read'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">], </code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$usr</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'auth_write'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">], </code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$usr</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'isadmin'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">]) = cot_auth(</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'projects'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">, </code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'any'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">, </code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'RWA'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">);</code></p>

<p><span style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;text-align:justify;background-color:rgb(255,255,255);">вставте строчку </span></p>

<pre class="brush:php;gutter:false;toolbar:false;">
require_once cot_incfile('pm', 'module');</pre>

<p>и будет вам счастье.</p>
</blockquote>

<p>Помогло!</p>

<p class="updated"><strong>Добавлено 1 день спустя:</strong></p>

<p>Друзья, спасибо вам огромное!</p>

<p>Я даже уже начал понимать как работать с БД. ТОлько опять с проблемой столкнулся.</p>

<p>В projects.edit.php я прописал такой код, который срабатывает если нажать кнопку "скрыть проект" при этом если передан определенный параметр ?a=</p>

<pre class="brush:php;gutter:false;toolbar:false;">
if ($a == 'hideerror1')

{
            // Сообщение автору истории от редактора что она скрыта(не администратором а модератором не из админки)       
			$text .= $L['deletestory_pm_hideerror1text1'];
            $text .= $item['item_title'] .' ';
            $text .= $L['deletestory_pm_hideerror1text2'];
            $pm['pm_title'] = $L['projects_deleted_mail_hideerror1'];
            $pm['pm_date'] = (int)$sys['now'];
            $pm['pm_text'] = $text;
            $pm['pm_fromstate'] = 0;
            $pm['pm_fromuserid'] = $usr['id'];
            $pm['pm_fromuser'] = $usr['name'];
            $pm['pm_touserid'] = $item['item_userid'];
            $pmsql = $db-&gt;insert($db_pm, $pm);
            $pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");      
			$projectssql = $db-&gt;update($db_projects, array('item_HIDEERROR' =&gt; '2'), "item_id = ".$item['item_id']."");
			
	$ritem = array();
	$ritem['item_state'] = 1;
	$db-&gt;update($db_projects, $ritem, 'item_id = ?', $id);
	
	cot_projects_sync($item['item_cat']);
	
	$urlparams = empty($item['item_alias']) ?
		array('c' =&gt; $item['item_cat'], 'id' =&gt; $id) :
		array('c' =&gt; $item['item_cat'], 'al' =&gt; $item['item_alias']);
	$r_url = cot_url('projects', $urlparams, '', true);
	
	/* === Hook === */
	foreach (cot_getextplugins('projects.edit.hide') as $pl)
	{
		include $pl;
	}
	/* ===== */
	
	cot_redirect($r_url);
	exit;
}</pre>

<p>Все работает, проект скрывается, в БД обнавляется нужная мне таблица item_HIDEERROR и создателю проекта уходит в ПМ письмо что проект скрыт, вот только проблема в том что ему в ПМ приходит сразу два одинаковых письма, а должно одно. Почему? Не пойму!</p>
]]></description>
			<pubDate>Mo, 27 Apr 2020 13:33:11 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44657]]></link>
		</item>
		<item>
			<title>Dayver</title>
			<description><![CDATA[<blockquote class="fp"><a href="https://www.cotonti.com/forums?m=posts&amp;q=8942&amp;d=2#44651">#44651</a> <strong>Kopusha: </strong>
<p>странно я нигде не подключал в старых модулях-плагинах ничего, работало. <br />
Думаю скорее у него другая - проблема - судя по его коду - отрабатывает только последнее else а там 2 инжекта в БД.</p>
</blockquote>

<p>Зачем гадать на кофейной гуще если есть текст ошибки в котором чётко видно что в переменной с именем таблицы - пустая .... а значит модуль не знает её а значит нужно познакомить их друг с другом и все срастётся и  полетят детишки ЛСки в мир ...</p>
]]></description>
			<pubDate>So, 26 Apr 2020 19:02:06 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44656]]></link>
		</item>
		<item>
			<title>Kopusha</title>
			<description><![CDATA[<p>странно я нигде не подключал в старых модулях-плагинах ничего, работало. <br />
Думаю скорее у него другая - проблема - судя по его коду - отрабатывает только последнее else а там 2 инжекта в БД.</p>
]]></description>
			<pubDate>So, 26 Apr 2020 06:54:53 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44651]]></link>
		</item>
		<item>
			<title>Dayver</title>
			<description><![CDATA[<p>В файле <span style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;text-align:justify;background-color:rgb(255,255,255);">projects.edit.php где то сверху, можно сразу после строки</span></p>

<p><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">list(</code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$usr</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'auth_read'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">], </code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$usr</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'auth_write'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">], </code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$usr</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'isadmin'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">]) = cot_auth(</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'projects'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">, </code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'any'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">, </code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'RWA'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">);</code></p>

<p><span style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;text-align:justify;background-color:rgb(255,255,255);">вставте строчку </span></p>

<pre class="brush:php;gutter:false;toolbar:false;">
require_once cot_incfile('pm', 'module');</pre>

<p>и будет вам счастье.</p>
]]></description>
			<pubDate>So, 26 Apr 2020 01:45:51 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44641]]></link>
		</item>
		<item>
			<title>ed.moriarti</title>
			<description><![CDATA[<p>Так и сделано, экстраполе <span style="font-size:15px;">селект</span><span style="font-size:15px;"> </span><span style="font-size:15px;">я создал в модуле проджектс. Захожу с админского только профиля (или модераторский это обязательное условие) захожу в проект, редактировать, выбираю селект и галочку удалить, нажимаю кнопку. я уже вспотел, хз че не так</span></p>
<p class="updated"><strong>Added 2 minutes later:</strong></p><p>Под модераторским юзером с правами категории таже самая ошбка с БД</p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 13:45:00 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44636]]></link>
		</item>
		<item>
			<title>Kopusha</title>
			<description><![CDATA[<blockquote class="fp"><a href="https://www.cotonti.com/forums?m=posts&amp;q=8942&amp;d=2#44620">#44620</a> <strong>Kopusha: </strong>
<p>Надо при удалении Project указывать причину. ё</p>

<p>- создаем экрполе селект с причинами</p>

<p>- даем возможность модератору удалять проекты редактированием проектов (не в админке а зайдя в проект и удалить его)</p>

<p>- ищем в модуле проектов момент удаления-редактирования (скорее всего projects.edit.php в inc)</p>

<p>там для <code class="php keyword" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(167,29,93);float:none;height:auto;line-height:1.3em;width:auto;font-weight:bold;">if</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">(</code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$rdelete</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">) проверяем кто удаляет - если не автор проекта - значит модератор</code></p>

<p><code class="php keyword" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(167,29,93);float:none;height:auto;line-height:1.3em;width:auto;font-weight:bold;">if</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">(</code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$usr</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'id'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">] != </code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$item</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'item_userid'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">]) </code><code class="php comments" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(139,139,139);float:none;height:auto;line-height:1.3em;width:auto;">//Если не сам юзер удаляет значит это модератор</code></p>

<p>там пишем "письма счастья" <code class="php keyword" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(167,29,93);float:none;height:auto;line-height:1.3em;width:auto;font-weight:bold;">if</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">(</code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$ritem</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'item_delete_reason'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">] = </code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'poorphoto'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">) и тд - это отправит письмо тому у кого удалили проект</code></p>

<p><font color="#333333" face="Monaco, Menlo, Consolas, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, Courier, monospace"><span style="font-size:13.5px;white-space:pre;background-color:rgb(250,250,250);">- идем в тему в projects.edit.tpl</span></font></p>

<p>там по условию какому то (например &lt;!-- IF {PHP.c|cot_auth('projets', 'this', 'A')} --&gt;) показываем этот селект<br />
{PRJEDIT_FORM_DELETE_REASON}<br />
то есть если юзер может админить эту категорию проектов то он выбирает селект и удаляет проект. в зависимости от выбранного селект php файл вышлет письмо.</p>
</blockquote>

<p>Тут же написано</p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 13:20:19 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44635]]></link>
		</item>
		<item>
			<title>ed.moriarti</title>
			<description><![CDATA[<p>В базе значение в таблице <span style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;text-align:justify;background-color:rgb(255,255,255);">delete_reason (тоесть экстраполе) в указанном посте числится как NULL может из-за этого?</span></p>

<blockquote>
<p><span style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;text-align:justify;background-color:rgb(255,255,255);">if ($ritem['item_delete_reason'] == 'poorphoto') //Если выбрана причина poorphoto (тут я бы сильно проверил если ли там эти переменные на стр удаления проекта)</span></p>
</blockquote>

<p> </p>

<p>как эти переменные поместить на страницу удаления?</p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 13:08:45 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44634]]></link>
		</item>
		<item>
			<title>Kopusha</title>
			<description><![CDATA[<p><a href="https://www.cotonti.com/datas/users/123431_495.jpg"><img alt="" src="https://www.cotonti.com/datas/users/123431_495.jpg" /></a></p>

<p>То есть тут разница 1 строчка?<br />
Пройдемся по коду</p>

<div>if ($usr['id'] != $item['item_userid']) //Если текущее ID не совпадает с id автора элемента</div>

<div>{</div>

<div>if ($ritem['item_delete_reason'] == 'poorphoto') //Если выбрана причина poorphoto (тут я бы сильно проверил если ли там эти переменные на стр удаления проекта)</div>

<div>{</div>

<div>$text .= $L['folio_deleted_text'] . ' "'; //Текст folio_deleted_text из языкового файла (лучше $text .= $L['folio_deleted_text'] . ' «';)</div>

<div>$text .= $item['item_title'] .'" '; //Название элемента</div>

<div>$text .= $L['folio_deleted_text_poorphoto'] . ' '; //Текст </div>

<div>$text .= $L['if_a_mistake1'] . ' '; //Текст </div>

<div>$text .= $L['go_faq_folio']; //Текст </div>

<div>$pm['pm_title'] = $L['folio_deleted_title_1'] . ' «' . $item['item_title'] . '» ' . $L['folio_deleted_title_2']; //Заголовок письма (Текст+Название элемента+Текст) </div>

<div>$pm['pm_date'] = (int)$sys['now'];//Когда выслао письмо</div>

<div>$pm['pm_text'] = $text;//Суммарный текст письма</div>

<div>$pm['pm_fromstate'] = 0; // Из состояния непрчитанного</div>

<div>$pm['pm_fromuserid'] = $usr['id']; // От текущего пользователя кто совершает операцию</div>

<div>$pm['pm_fromuser'] = $usr['name'];// Имя текущего пользователя кто совершает операцию (на самом деле тут можно написать Трамп, все равно PM модуль возьмет имя из  $usr['id'])</div>

<div>$pm['pm_touserid'] = $item['item_userid']; // Кому - владельцу $item['item_userid']</div>

<div>$pm['pm_tostate'] = 0;// В состояние непрчитанного</div>

<div>$pmsql = $db-&gt;insert($db_pm, $pm); // Куда делаем инсерт</div>

<div>$pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");//Какие строки туда передаем</div>

<div>}</div>

<div>}</div>

<div> </div>

<div>cot_folio_delete($id, $item);//Удаляем элемент</div>
<p class="updated"><strong>Added 1 minute later:</strong></p><p>Что такое <br />
 </p>

<pre class="brush:php;gutter:false;toolbar:false;">
            $pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");     
            $pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = $userid");         
</pre>

<p>из вашего кода? Кто такой </p>

<pre class="brush:php;gutter:false;toolbar:false;" style="font-size:15px;background-image:url(&quot;../img/code-blueprint.png&quot;);">
"user_id = $userid"?</pre>
<p class="updated"><strong>Added 2 minutes later:</strong></p><p>Я бы советовал без всяких условий <span style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;text-align:justify;background-color:rgb(255,255,255);">/Если текущее ID не совпадает с id автора элемента и //Если выбрана причина poorphoto<br />
просто при удалении выслать письмо</span><br />
 </p>

<pre class="brush:php;gutter:false;toolbar:false;">
					$pm['pm_title'] = 'Title';
					$pm['pm_date'] = (int)$sys['now'];
					$pm['pm_text'] = 'TEXT';
					$pm['pm_fromstate'] = 0; 
					$pm['pm_fromuserid'] = 1; 
					$pm['pm_fromuser'] = 'Trump';
					$pm['pm_touserid'] = 1; 
					$pm['pm_tostate'] = 0;
					$pmsql = $db-&gt;insert($db_pm, $pm); 
					$pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");			
</pre>

<p>и посмотреть придет ли письмо юзеру 1 от юзера 1</p>
<p class="updated"><strong>Added 56 seconds later:</strong></p><p>потом пробовать туда ДОБАВЛЯТЬ какие то реальные id и другие переменные и только когда все будет работать - ставить выше разные условия. Поймете как работает котонти заодно.</p>
<p class="updated"><strong>Added 50 seconds later:</strong></p><p>Даже больше - еще сделать <br /><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$pmsql</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">= </code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$db</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">-&gt;update(</code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$db_users</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">, </code><code class="php keyword" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(167,29,93);float:none;height:auto;line-height:1.3em;width:auto;font-weight:bold;">array</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">(</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'user_newpm'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">=&gt; </code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'1'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">), </code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">"user_id = 1"</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">); для начала</code></p>
<p class="updated"><strong>Added 43 seconds later:</strong></p><p>Умываю руки (Пилат (с))<br />
Я сделал все что мог (Путин (с))<br />
Я мухожук (БНЕ (с))</p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 13:00:42 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44632]]></link>
		</item>
		<item>
			<title>ed.moriarti</title>
			<description><![CDATA[<p>Вот код из файла pm.send.php</p>

<pre class="brush:php;gutter:false;toolbar:false;">
			foreach ($touser_ids as $k =&gt; $userid)
			{
				$pm['pm_title'] = $newpmtitle;
				$pm['pm_date'] = (int)$sys['now'];
				$pm['pm_text'] = $newpmtext;
				$pm['pm_fromstate'] = $fromstate;
				$pm['pm_fromuserid'] = (int)$usr['id'];
				$pm['pm_fromuser'] = $usr['name'];
				$pm['pm_touserid'] = $userid;
				$pm['pm_tostate'] = 0;
				$pmsql = $db-&gt;insert($db_pm, $pm);
				$pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = $userid");</pre>

<p>Разница только в последней строке </p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 12:42:09 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44631]]></link>
		</item>
		<item>
			<title>Kopusha</title>
			<description><![CDATA[<p>как я могу помочь если я вижу только ошибку?<br />
CotDB-&gt; insert (<span style="color:#FF0000;">вот тут куда <span style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;">insert</span></span>, Array этого не существует.<br />
Это - Неверное имя таблицы <br />
Надо посмотреть по сайту как другие стандартные письма уходят через <code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$db</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">-&gt;insert(</code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$db_pm</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">, </code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$pm</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">); и чем оно все отличается.</code></p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 12:40:24 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44630]]></link>
		</item>
		<item>
			<title>ed.moriarti</title>
			<description><![CDATA[<p>db_ это в данном случае как префикс ?</p>

<p>У меня в базе есть pm только префикс другой</p>
<p class="updated"><strong>Added 2 minutes later:</strong></p><p>для переписки стандартный в сборке PM используется</p>
<p class="updated"><strong>Added 16 minutes later:</strong></p><blockquote class="fp"><a href="https://www.cotonti.com/forums?m=posts&amp;q=8942&amp;d=1#44628">#44628</a> <strong>Kopusha: </strong>
<p><span style="color:rgb(0,134,179);font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:13.5px;white-space:pre;background-color:rgb(250,250,250);">$db_pm есть вообще? Что для переписки используется?</span></p>

<p class="updated"><strong>Added 26 seconds later:</strong></p>

<p>Там же все написано - Неверное имя таблицы</p>

<p>Значит - Неверное имя таблицы</p>
</blockquote>

<p>Бро, ну помоги мне! Я уже молюсь на тебя <img alt="laugh" height="23" src="https://www.cotonti.com/plugins/ckeditor/lib/plugins/smiley/images/teeth_smile.png" title="laugh" width="23" /> ну я каюсь, что в этой области у меня провал знаний</p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 11:59:55 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44629]]></link>
		</item>
		<item>
			<title>Kopusha</title>
			<description><![CDATA[<p><span style="color:rgb(0,134,179);font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:13.5px;white-space:pre;background-color:rgb(250,250,250);">$db_pm есть вообще? Что для переписки используется?</span></p>
<p class="updated"><strong>Added 26 seconds later:</strong></p><p>Там же все написано - Неверное имя таблицы</p>

<p>Значит - Неверное имя таблицы</p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 11:42:21 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44628]]></link>
		</item>
		<item>
			<title>ed.moriarti</title>
			<description><![CDATA[<pre class="brush:php;gutter:false;toolbar:false;">
if ($rdelete)
{
      
    if ($usr['id'] != $item['item_userid']) //Если не сам юзер удаляет значит это модератор
    {
        if ($ritem['item_delete_reason'] = 'poorphoto')
            {   
            // Сообщение автору истории от редактора что она удалена (не администратором а модератором не из админки)       
            $text .= $L['deletestory_pm_newtext1'];
            $text .= $item['item_title'] .' ';
            $text .= $L['deletestory_pm_newtext2'];
            $text .= $usr['name'] .' ';
            $pm['pm_title'] = $L['projects_deleted_mail_subjpoorphoto'];
            $pm['pm_date'] = (int)$sys['now'];
            $pm['pm_text'] = $text;
            $pm['pm_fromstate'] = 0;
            $pm['pm_fromuserid'] = $usr['id'];
            $pm['pm_fromuser'] = $usr['name'];
            $pm['pm_touserid'] = $item['item_userid'];
            $pm['pm_tostate'] = 0;
            $pmsql = $db-&gt;insert($db_pm, $pm);
            $pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");                
        }
          
        else if ($ritem['item_delete_reason'] = 'lowphoto')
            {   
            // Сообщение автору истории от редактора что она удалена (не администратором а модератором не из админки)       
            $text .= $L['deletestory_pm_newtext1'];
            $text .= $item['item_title'] .' ';
            $text .= $L['deletestory_pm_newtext2'];
            $text .= $usr['name'] .' ';
            $pm['pm_title'] = $L['projects_deleted_mail_subjlowphoto'];
            $pm['pm_date'] = (int)$sys['now'];
            $pm['pm_text'] = $text;
            $pm['pm_fromstate'] = 0;
            $pm['pm_fromuserid'] = $usr['id'];
            $pm['pm_fromuser'] = $usr['name'];
            $pm['pm_touserid'] = $item['item_userid'];
            $pm['pm_tostate'] = 0;
            $pmsql = $db-&gt;insert($db_pm, $pm);
            $pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");                
        }
        else
            {   
            // Сообщение автору истории от редактора что она удалена (не администратором а модератором не из админки)       
            $text .= $L['deletestory_pm_newtext1'];
            $text .= $item['item_title'] .' ';
            $text .= $L['deletestory_pm_newtext2'];
            $text .= $usr['name'] .' ';
            $pm['pm_title'] = $L['projects_deleted_mail_subj'];
            $pm['pm_date'] = (int)$sys['now'];
            $pm['pm_text'] = $text;
            $pm['pm_fromstate'] = 0;
            $pm['pm_fromuserid'] = $usr['id'];
            $pm['pm_fromuser'] = $usr['name'];
            $pm['pm_touserid'] = $item['item_userid'];
            $pm['pm_tostate'] = 0;
            $pmsql = $db-&gt;insert($db_pm, $pm);
            $pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");     
			$pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = $userid");			
        }
    }
    cot_projects_delete($id, $item);
    cot_redirect(cot_url('projects', "c=" . $item['item_cat'], '', true));
}	</pre>

<p>Все равно ругается на 86 строку в projects.edit.php:</p>

<pre class="brush:php;gutter:false;toolbar:false;">
$pmsql = $db-&gt;insert($db_pm, $pm);</pre>

<p>При этом когда я пытаюсь удалить проект я выбираю из селекта строку "lowphoto"</p>

<p>В результате получаю это:</p>

<pre class="brush:php;gutter:false;toolbar:false;">
Фатальная ошибка
2020-04-25 11:25

Ошибка SQL 42000: синтаксическая ошибка или нарушение прав доступа: 1103 Неверное имя таблицы ''

# 0 cot_diefatal (ошибка SQL 42000: синтаксическая ошибка или нарушение прав доступа: 1103 Неверное имя таблицы '') вызывается по адресу [/var/www//public_html/system/database.php:451]
# 1 CotDB-&gt; insert (, Array ([pm_title] =&gt; Ваше задание удалено subjpoorphoto, [pm_date] =&gt; 1587813941, [pm_text] =&gt; ArrayЗаголовок задания Arrayadmin, [pm_fromstate] =&gt; 0, [pm_fromuserid] =&gt; 1, [pm_fromuser] =&gt; admin, [pm_touserid] =&gt; 5, [pm_tostate] =&gt; 0)) вызывается по адресу [/var/www//public_html/modules/projects/inc/projects.edit.php:86]
# 2 require_once (/var/www//public_html/modules/projects/inc/projects.edit.php) вызывается по адресу [/var/www//public_html/modules/projects/projects.php:33]
# 3 require_once (/var/www//public_html/modules/projects/projects.php) вызывается по адресу [/var/www//public_html/index.php:176]</pre>

<p> </p>
<p class="updated"><strong>Added 54 seconds later:</strong></p><p>Языковые переменные я добавил в файл projects.ru.lang.php</p>

<pre class="brush:php;gutter:false;toolbar:false;">
$L['projects_deleted_mail_subjpoorphoto'] = 'Ваше задание удалено subjpoorphoto';
$L['projects_deleted_mail_subjlowphoto'] = 'Ваше задание удалено lowphoto';
$L['projects_deleted_mail_subj'] = 'Ваше задание удалено mail_subj';
$L['deletestory_pm_newtext1'] = array('Текст №1');
$L['deletestory_pm_newtext2'] = array('Текст №2');</pre>

<p> </p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 11:28:48 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44627]]></link>
		</item>
		<item>
			<title>Kopusha</title>
			<description><![CDATA[<p>Все что <span style="color:rgb(0,134,179);font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;font-size:13.5px;white-space:pre;background-color:rgb(250,250,250);">$L это языковые файлы. </span></p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 11:10:30 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44626]]></link>
		</item>
		<item>
			<title>ed.moriarti</title>
			<description><![CDATA[<p>85 строка:</p>

<p>$pmsql = $db-&gt;insert($db_pm, $pm);</p>
<p class="updated"><strong>Added 2 minutes later:</strong></p><p>А вот их, эти переменные, <span style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;text-align:justify;background-color:rgb(255,255,255);">folio_deleted_mail_subj и т.д. куда добавить надо?</span></p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 10:32:55 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44625]]></link>
		</item>
		<item>
			<title>Kopusha</title>
			<description><![CDATA[<p>так на что ругается?</p>

<p>все переменные есть? folio_deleted_mail_subj и тд? 85 строка то какая?</p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 10:31:38 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44624]]></link>
		</item>
		<item>
			<title>ed.moriarti</title>
			<description><![CDATA[<blockquote class="fp"><a href="https://www.cotonti.com/forums?m=posts&amp;q=8942&amp;d=1#44622">#44622</a> <strong>Kopusha: </strong>
<p>projects.edit.php в студию</p>

<p class="updated"><strong>Added 53 seconds later:</strong></p>

<p>85 строка там левая. мой код не для проектов тот что вверху, нельзя так просто взять и вставить (боромир (с))</p>
</blockquote>

<p>тупанул! щас исправлюсь</p>
<p class="updated"><strong>Added 6 minutes later:</strong></p><p>Блин, чет для меня сложно php осиливается )) это мой projects.edit.php с изменениями</p>

<pre class="brush:php;gutter:false;toolbar:false;">
&lt;?php

/**
 * projects module
 *
 * @package projects
 * @version 2.5.2
 * @author CMSWorks Team
 * @copyright Copyright (c) CMSWorks.ru, littledev.ru
 * @license BSD
 */

defined('COT_CODE') or die('Wrong URL');

$id = cot_import('id', 'G', 'INT');
$c = cot_import('c', 'G', 'TXT');

list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = cot_auth('projects', 'any', 'RWA');

/* === Hook === */
foreach (cot_getextplugins('projects.edit.first') as $pl)
{
	include $pl;
}
/* ===== */

cot_block($usr['auth_read']);

if (!$id || $id &lt; 0)
{
	cot_die_message(404);
}

$sql = $db-&gt;query("SELECT * FROM $db_projects WHERE item_id='$id' LIMIT 1");
cot_die($sql-&gt;rowCount() == 0);
$item = $sql-&gt;fetch();

list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = cot_auth('projects', $item['item_cat']);
cot_block($usr['isadmin'] || $usr['auth_write'] &amp;&amp; $usr['id'] == $item['item_userid']);

$sys['parser'] = $item['item_parser'];
$parser_list = cot_get_parsers();

if ($a == 'update')
{
	/* === Hook === */
	foreach (cot_getextplugins('projects.edit.update.first') as $pl)
	{
		include $pl;
	}
	/* ===== */

	$ritem = cot_projects_import('POST', $item, $usr);
	
	if ($_SERVER['REQUEST_METHOD'] == 'POST')
	{
		$rdelete = cot_import('rdelete', 'P', 'BOL');
	}
	else
	{
		$rdelete = cot_import('delete', 'G', 'BOL');
		cot_check_xg();
	}

	
if ($rdelete)
{
      
    if ($usr['id'] != $item['item_userid']) //Если не сам юзер удаляет значит это модератор
    {
        if ($ritem['item_delete_reason'] == 'poorphoto')
            {   
            // Сообщение автору истории от редактора что она удалена (не администратором а модератором не из админки)       
            $text .= $L['deletestory_pm_newtext1'];
            $text .= $item['item_title'] .' ';
            $text .= $L['deletestory_pm_newtext2'];
            $text .= $usr['name'] .' ';
            $pm['pm_title'] = $L['folio_deleted_mail_subjpoorphoto'];
            $pm['pm_date'] = (int)$sys['now'];
            $pm['pm_text'] = $text;
            $pm['pm_fromstate'] = 0;
            $pm['pm_fromuserid'] = $usr['id'];
            $pm['pm_fromuser'] = $usr['name'];
            $pm['pm_touserid'] = $item['item_userid'];
            $pm['pm_tostate'] = 0;
            $pmsql = $db-&gt;insert($db_pm, $pm);
            $pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");                
        }
          
        else if ($ritem['item_delete_reason'] == 'lowphoto')
            {   
            // Сообщение автору истории от редактора что она удалена (не администратором а модератором не из админки)       
            $text .= $L['deletestory_pm_newtext1'];
            $text .= $item['item_title'] .' ';
            $text .= $L['deletestory_pm_newtext2'];
            $text .= $usr['name'] .' ';
            $pm['pm_title'] = $L['folio_deleted_mail_subjlowphoto'];
            $pm['pm_date'] = (int)$sys['now'];
            $pm['pm_text'] = $text;
            $pm['pm_fromstate'] = 0;
            $pm['pm_fromuserid'] = $usr['id'];
            $pm['pm_fromuser'] = $usr['name'];
            $pm['pm_touserid'] = $item['item_userid'];
            $pm['pm_tostate'] = 0;
            $pmsql = $db-&gt;insert($db_pm, $pm);
            $pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");                
        }
        else
            {   
            // Сообщение автору истории от редактора что она удалена (не администратором а модератором не из админки)       
            $text .= $L['deletestory_pm_newtext1'];
            $text .= $item['item_title'] .' ';
            $text .= $L['deletestory_pm_newtext2'];
            $text .= $usr['name'] .' ';
            $pm['pm_title'] = $L['folio_deleted_mail_subj'];
            $pm['pm_date'] = (int)$sys['now'];
            $pm['pm_text'] = $text;
            $pm['pm_fromstate'] = 0;
            $pm['pm_fromuserid'] = $usr['id'];
            $pm['pm_fromuser'] = $usr['name'];
            $pm['pm_touserid'] = $item['item_userid'];
            $pm['pm_tostate'] = 0;
            $pmsql = $db-&gt;insert($db_pm, $pm);
            $pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");                
        }
    }
    cot_projects_delete($id, $item);
    cot_redirect(cot_url('projects', "c=" . $item['item_cat'], '', true));
}	
	

	
	/* === Hook === */
	foreach (cot_getextplugins('projects.edit.update.import') as $pl)
	{
		include $pl;
	}
	/* ===== */

	cot_projects_validate($ritem);

	/* === Hook === */
	foreach (cot_getextplugins('projects.edit.update.error') as $pl)
	{
		include $pl;
	}
	/* ===== */

	if (!cot_error_found())
	{
		cot_projects_update($id, $ritem, $usr);

		switch ($ritem['item_state'])
		{
			case 0:
				$urlparams = empty($ritem['item_alias']) ?
					array('c' =&gt; $ritem['item_cat'], 'id' =&gt; $id) :
					array('c' =&gt; $ritem['item_cat'], 'al' =&gt; $ritem['item_alias']);
				$r_url = cot_url('projects', $urlparams, '', true);
				
				if (!$usr['isadmin'])
				{
					$rbody = cot_rc($L['project_added_mail_body'], array(
						'user_name' =&gt; $usr['profile']['user_name'],
						'prj_name' =&gt; $item['item_title'],
						'sitename' =&gt; $cfg['maintitle'],
						'link' =&gt; COT_ABSOLUTE_URL . $r_url
					));
					cot_mail($usr['profile']['user_email'], $L['project_added_mail_subj'], $rbody);
				}
				break;
			case 1:
				$r_url = cot_url('projects', 'm=preview&amp;id=' . $id, '', true);
				break;
			case 2:
				$urlparams = empty($ritem['item_alias']) ?
					array('c' =&gt; $ritem['item_cat'], 'id' =&gt; $id) :
					array('c' =&gt; $ritem['item_cat'], 'al' =&gt; $ritem['item_alias']);
				$r_url = cot_url('projects', $urlparams, '', true);
				
				if (!$usr['isadmin'])
				{
					$rbody = cot_rc($L['project_senttovalidation_mail_body'], array( 
						'user_name' =&gt; $usr['profile']['user_name'],
						'prj_name' =&gt; $item['item_title'],
						'sitename' =&gt; $cfg['maintitle'],
						'link' =&gt; COT_ABSOLUTE_URL . $r_url
					));
					cot_mail($usr['profile']['user_email'], $L['project_senttovalidation_mail_subj'], $rbody);
				}

				if ($cfg['projects']['notif_admin_moderate'])
				{					
					$nbody = cot_rc($L['project_notif_admin_moderate_mail_body'], array( 
						'user_name' =&gt; $usr['profile']['user_name'],
						'prj_name' =&gt; $ritem['item_title'],
						'sitename' =&gt; $cfg['maintitle'],
						'link' =&gt; COT_ABSOLUTE_URL . $r_url
					));
					cot_mail($cfg['adminemail'], $L['project_notif_admin_moderate_mail_subj'], $nbody);
				}
				break;
		}
		cot_redirect($r_url);
	}
	else
	{
		cot_redirect(cot_url('projects', "m=edit&amp;id=$id", '', true));
	}
}

if ($a == 'public')
{
	$ritem = array();
	if($cfg['projects']['prevalidate'])
	{
		$ritem['item_state'] = ($usr['isadmin']) ? 0 : 2;
	}
	else
	{
		$ritem['item_state'] = 0;
	}
	
	$urlparams = empty($item['item_alias']) ?
		array('c' =&gt; $item['item_cat'], 'id' =&gt; $id) :
		array('c' =&gt; $item['item_cat'], 'al' =&gt; $item['item_alias']);
	$r_url = cot_url('projects', $urlparams, '', true);
	
	if(!$usr['isadmin'])
	{
		if($ritem['item_state'] == 2)
		{
			$rbody = cot_rc($L['project_senttovalidation_mail_body'], array( 
				'user_name' =&gt; $usr['profile']['user_name'],
				'prj_name' =&gt; $item['item_title'],
				'sitename' =&gt; $cfg['maintitle'],
				'link' =&gt; COT_ABSOLUTE_URL . $r_url
			));
			cot_mail($usr['profile']['user_email'], $L['project_senttovalidation_mail_subj'], $rbody);
		}
		else
		{
			$rbody = cot_rc($L['project_added_mail_body'], array(
				'user_name' =&gt; $usr['profile']['user_name'],
				'prj_name' =&gt; $item['item_title'],
				'sitename' =&gt; $cfg['maintitle'],
				'link' =&gt; COT_ABSOLUTE_URL . $r_url
			));
			cot_mail($usr['profile']['user_email'], $L['project_added_mail_subj'], $rbody);
		}
	}
	
	$db-&gt;update($db_projects, $ritem, 'item_id = ?', $id);
	
	cot_projects_sync($item['item_cat']);
	
	/* === Hook === */
	foreach (cot_getextplugins('projects.edit.public') as $pl)
	{
		include $pl;
	}
	/* ===== */
	
	cot_redirect($r_url);
	exit;
}

if ($a == 'hide')
{
	$ritem = array();
	$ritem['item_state'] = 1;
	$db-&gt;update($db_projects, $ritem, 'item_id = ?', $id);
	
	cot_projects_sync($item['item_cat']);
	
	$urlparams = empty($item['item_alias']) ?
		array('c' =&gt; $item['item_cat'], 'id' =&gt; $id) :
		array('c' =&gt; $item['item_cat'], 'al' =&gt; $item['item_alias']);
	$r_url = cot_url('projects', $urlparams, '', true);
	
	/* === Hook === */
	foreach (cot_getextplugins('projects.edit.hide') as $pl)
	{
		include $pl;
	}
	/* ===== */
	
	cot_redirect($r_url);
	exit;
}

if ($a == 'unrealized')
{
	$ritem = array();
	$ritem['item_realized'] = 0;
	$db-&gt;update($db_projects, $ritem, 'item_id = ?', $id);
	
	$urlparams = empty($item['item_alias']) ?
		array('c' =&gt; $item['item_cat'], 'id' =&gt; $id) :
		array('c' =&gt; $item['item_cat'], 'al' =&gt; $item['item_alias']);
	$r_url = cot_url('projects', $urlparams, '', true);
	
	/* === Hook === */
	foreach (cot_getextplugins('projects.edit.unrealized') as $pl)
	{
		include $pl;
	}
	/* ===== */
	
	cot_redirect($r_url);
	exit;
}

if ($a == 'realized')
{
	$ritem = array();
	$ritem['item_realized'] = 1;
	$db-&gt;update($db_projects, $ritem, 'item_id = ?', $id);
	
	$urlparams = empty($ritem['item_alias']) ?
		array('c' =&gt; $ritem['item_cat'], 'id' =&gt; $id) :
		array('c' =&gt; $ritem['item_cat'], 'al' =&gt; $ritem['item_alias']);
	$r_url = cot_url('projects', $urlparams, '', true);
	
	/* === Hook === */
	foreach (cot_getextplugins('projects.edit.realized') as $pl)
	{
		include $pl;
	}
	/* ===== */
	
	cot_redirect($r_url);
	exit;
}

$out['subtitle'] = $L['projects_edit_project_title'];
$out['head'] .= $R['code_noindex'];
$sys['sublocation'] = $structure['projects'][$item['item_cat']]['title'];

$mskin = cot_tplfile(array('projects', 'edit', $structure['projects'][$item['item_cat']]['tpl']));

/* === Hook === */
foreach (cot_getextplugins('projects.edit.main') as $pl)
{
	include $pl;
}
/* ===== */

$t = new XTemplate($mskin);

// Error and message handling
cot_display_messages($t);


$t-&gt;assign(array(
	"PRJEDIT_FORM_SEND" =&gt; cot_url('projects', "m=edit&amp;a=update&amp;id=" . $item['item_id'] . "&amp;r=" . $r),
	"PRJEDIT_FORM_ID" =&gt; $item['item_id'],
	"PRJEDIT_FORM_CAT" =&gt; cot_selectbox_structure('projects', $item['item_cat'], 'rcat'),
	"PRJEDIT_FORM_CATTITLE" =&gt; $structure['projects'][$item['item_cat']]['title'],
	"PRJEDIT_FORM_TYPETITLE" =&gt; (is_array($projects_types) &amp;&amp; !empty($item['item_type'])) ? $projects_types[$item['item_type']] : '',
	"PRJEDIT_FORM_TYPE" =&gt; (is_array($projects_types)) ? cot_selectbox(($item['item_type']) ? $item['item_type'] : $cfg['projects']['default_type'], 'rtype', array_keys($projects_types), array_values($projects_types)) : 'empty',
	"PRJEDIT_FORM_TITLE" =&gt; cot_inputbox('text', 'rtitle', $item['item_title'], 'size="56"'),
	"PRJEDIT_FORM_ALIAS" =&gt; cot_inputbox('text', 'ralias', $item['item_alias'], array('size' =&gt; '32', 'maxlength' =&gt; '255')),
	"PRJEDIT_FORM_TEXT" =&gt; cot_textarea('rtext', $item['item_text'], 10, 60, 'id="formtext"'),
	"PRJEDIT_FORM_COST" =&gt; cot_inputbox('text', 'rcost', $item['item_cost'], 'size="10"'),
	"PRJEDIT_FORM_STATE" =&gt; $item['item_state'],
	"PRJEDIT_FORM_PARSER" =&gt; cot_selectbox($item['item_parser'], 'rparser', cot_get_parsers(), cot_get_parsers(), false),
	"PRJEDIT_FORM_DELETE" =&gt; cot_radiobox(0, 'rdelete', array(1,0), array($L['Yes'], $L['No']))
)); 

// Extra fields
foreach($cot_extrafields[$db_projects] as $exfld)
{
	$uname = strtoupper($exfld['field_name']);
	$exfld_val = cot_build_extrafields('ritem'.$exfld['field_name'], $exfld, $item['item_'.$exfld['field_name']]);
	$exfld_title = isset($L['projects_'.$exfld['field_name'].'_title']) ?  $L['projects_'.$exfld['field_name'].'_title'] : $exfld['field_description'];

	$t-&gt;assign(array(
		'PRJEDIT_FORM_'.$uname =&gt; $exfld_val,
		'PRJEDIT_FORM_'.$uname.'_TITLE' =&gt; $exfld_title,
		'PRJEDIT_FORM_EXTRAFLD' =&gt; $exfld_val,
		'PRJEDIT_FORM_EXTRAFLD_TITLE' =&gt; $exfld_title
	));
	$t-&gt;parse('MAIN.EXTRAFLD');
}

/* === Hook === */
foreach (cot_getextplugins('projects.edit.tags') as $pl)
{
	include $pl;
}
/* ===== */
$t-&gt;parse('MAIN');
$module_body = $t-&gt;text('MAIN');</pre>

<p> </p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 08:24:24 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44623]]></link>
		</item>
		<item>
			<title>Kopusha</title>
			<description><![CDATA[<p>projects.edit.php в студию</p>
<p class="updated"><strong>Added 53 seconds later:</strong></p><p>85 строка там левая. мой код не для проектов тот что вверху, нельзя так просто взять и вставить (боромир (с))</p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 08:22:53 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44622]]></link>
		</item>
		<item>
			<title>ed.moriarti</title>
			<description><![CDATA[<p><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">В файле inc / project.edit.php</font></font></font></font></font></font></p>

<p><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">вставил ваш бок в проджект.едит.пхп</font></font></font></font></font></font></p>

<p><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">создал экстраполе в модуле проджектс: </font></font></font></font></font></font></p>

<p><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">в итоге при редактировании проекта выбираем проект и ставим галочку удалить проект, жмакаю на кнопку и получаю это:</font></font></font></font></font></font></p>

<div class="mboxHD warning" style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;">
<pre class="brush:php;gutter:false;toolbar:false;">
Фатальная ошибка
2020-04-25 08:16

Ошибка SQL 42000: синтаксическая ошибка или нарушение прав доступа: 1103 Неверное имя таблицы ''

# 0 cot_diefatal (ошибка SQL 42000: синтаксическая ошибка или нарушение прав доступа: 1103 Неверное имя таблицы '') вызывается по адресу [/var/www//public_html/system/database.php:451]
# 1 CotDB-&gt; insert (, Array ([pm_title] =&gt;, [pm_date] =&gt; 1587802568, [pm_text] =&gt; Сделать общую уборку в офисе администратора, [pm_fromstate] =&gt; 0, [pm_fromuserid] =&gt; 1, [ pm_fromuser] =&gt; admin, [pm_touserid] =&gt; 5, [pm_tostate] =&gt; 0)) вызывается по адресу [/var/www//public_html/modules/projects/inc/projects.edit.php:85]
# 2 require_once (/var/www//public_html/modules/projects/inc/projects.edit.php) вызывается по адресу [/var/www//public_html/modules/projects/projects.php:33]
# 3 require_once (/var/www//public_html/modules/projects/projects.php) вызывается по адресу [/var/www//public_html/index.php:176]</pre>
</div>

<p><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">че не так то? </font></font></font></font></font><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;"><font style="vertical-align:inherit;">))</font></font></font></font></font></font></p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 08:19:36 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44621]]></link>
		</item>
		<item>
			<title>Kopusha</title>
			<description><![CDATA[<p>Надо при удалении Project указывать причину. ё</p>

<p>- создаем экрполе селект с причинами</p>

<p>- даем возможность модератору удалять проекты редактированием проектов (не в админке а зайдя в проект и удалить его)</p>

<p>- ищем в модуле проектов момент удаления-редактирования (скорее всего projects.edit.php в inc)</p>

<p>там для <code class="php keyword" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(167,29,93);float:none;height:auto;line-height:1.3em;width:auto;font-weight:bold;">if</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">(</code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$rdelete</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">) проверяем кто удаляет - если не автор проекта - значит модератор</code></p>

<p><code class="php keyword" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(167,29,93);float:none;height:auto;line-height:1.3em;width:auto;font-weight:bold;">if</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">(</code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$usr</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'id'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">] != </code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$item</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'item_userid'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">]) </code><code class="php comments" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(139,139,139);float:none;height:auto;line-height:1.3em;width:auto;">//Если не сам юзер удаляет значит это модератор</code></p>

<p>там пишем "письма счастья" <code class="php keyword" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(167,29,93);float:none;height:auto;line-height:1.3em;width:auto;font-weight:bold;">if</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">(</code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$ritem</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'item_delete_reason'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">] = </code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'poorphoto'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">) и тд - это отправит письмо тому у кого удалили проект</code></p>

<p><font color="#333333" face="Monaco, Menlo, Consolas, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, Courier, monospace"><span style="font-size:13.5px;white-space:pre;background-color:rgb(250,250,250);">- идем в тему в projects.edit.tpl</span></font></p>

<p>там по условию какому то (например &lt;!-- IF {PHP.c|cot_auth('projets', 'this', 'A')} --&gt;) показываем этот селект<br />
{PRJEDIT_FORM_DELETE_REASON}<br />
то есть если юзер может админить эту категорию проектов то он выбирает селект и удаляет проект. в зависимости от выбранного селект php файл вышлет письмо.</p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 07:40:09 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44620]]></link>
		</item>
		<item>
			<title>ed.moriarti</title>
			<description><![CDATA[<pre class="brush:php;gutter:false;toolbar:false;">
if ($rdelete)
{
     
    if ($usr['id'] != $item['item_userid']) //Если не сам юзер удаляет значит это модератор
    {
        if ($ritem['item_delete_reason'] = 'poorphoto')
            {   
            // Сообщение автору истории от редактора что она удалена (не администратором а модератором не из админки)       
            $text .= $L['deletestory_pm_newtext1'];
            $text .= $item['item_title'] .' ';
            $text .= $L['deletestory_pm_newtext2'];
            $text .= $usr['name'] .' ';
            $pm['pm_title'] = $L['folio_deleted_mail_subjpoorphoto'];
            $pm['pm_date'] = (int)$sys['now'];
            $pm['pm_text'] = $text;
            $pm['pm_fromstate'] = 0;
            $pm['pm_fromuserid'] = $usr['id'];
            $pm['pm_fromuser'] = $usr['name'];
            $pm['pm_touserid'] = $item['item_userid'];
            $pm['pm_tostate'] = 0;
            $pmsql = $db-&gt;insert($db_pm, $pm);
            $pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");                
        }
         
        else if ($ritem['item_delete_reason'] = 'lowphoto')
            {   
            // Сообщение автору истории от редактора что она удалена (не администратором а модератором не из админки)       
            $text .= $L['deletestory_pm_newtext1'];
            $text .= $item['item_title'] .' ';
            $text .= $L['deletestory_pm_newtext2'];
            $text .= $usr['name'] .' ';
            $pm['pm_title'] = $L['folio_deleted_mail_subjlowphoto'];
            $pm['pm_date'] = (int)$sys['now'];
            $pm['pm_text'] = $text;
            $pm['pm_fromstate'] = 0;
            $pm['pm_fromuserid'] = $usr['id'];
            $pm['pm_fromuser'] = $usr['name'];
            $pm['pm_touserid'] = $item['item_userid'];
            $pm['pm_tostate'] = 0;
            $pmsql = $db-&gt;insert($db_pm, $pm);
            $pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");                
        }
        else
            {   
            // Сообщение автору истории от редактора что она удалена (не администратором а модератором не из админки)       
            $text .= $L['deletestory_pm_newtext1'];
            $text .= $item['item_title'] .' ';
            $text .= $L['deletestory_pm_newtext2'];
            $text .= $usr['name'] .' ';
            $pm['pm_title'] = $L['folio_deleted_mail_subj'];
            $pm['pm_date'] = (int)$sys['now'];
            $pm['pm_text'] = $text;
            $pm['pm_fromstate'] = 0;
            $pm['pm_fromuserid'] = $usr['id'];
            $pm['pm_fromuser'] = $usr['name'];
            $pm['pm_touserid'] = $item['item_userid'];
            $pm['pm_tostate'] = 0;
            $pmsql = $db-&gt;insert($db_pm, $pm);
            $pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");                
        }
    }
    cot_folio_delete($id, $item);
    cot_redirect(cot_url('folio', "c=" . $item['item_cat'], '', true));
}</pre>

<p>тоесть я создаю экстраполе<span style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;text-align:justify;background-color:rgb(255,255,255);"> item_delete_reason (в формате select )</span>? а к какому плагину добавлять это экстраполе?</p>

<p>И куда вставлять этот код?</p>

<p>и каким тегом его потом вывести для работы и в каком месте?</p>
]]></description>
			<pubDate>Sa, 25 Apr 2020 07:13:54 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44619]]></link>
		</item>
		<item>
			<title>Kopusha</title>
			<description><![CDATA[<p>Для модуля создано экстраполе select - item_delete_reason, в нем варианты (poorphoto,lowphoto,notformat,duplicate).<br />
При удалении созданного объекта у меня сейчас так:<br />
 </p>

<pre class="brush:php;gutter:false;toolbar:false;">
	if ($rdelete)
	{  
   if ($usr['id'] != $item['item_userid']) //Если не сам юзер удаляет значит это модератор
		{
		// Сообщение автору истории от редактора что она удалена (не администратором а модератором не из админки)		
		$text .= $L['deletestory_pm_newtext1'];
		$text .= $item['item_title'] .' ';
		$text .= $L['deletestory_pm_newtext2'];
		$text .= $usr['name'] .' ';
		$pm['pm_title'] = $L['folio_deleted_mail_subj'];
		$pm['pm_date'] = (int)$sys['now'];
		$pm['pm_text'] = $text;
		$pm['pm_fromstate'] = 0;
		$pm['pm_fromuserid'] = $usr['id'];
		$pm['pm_fromuser'] = $usr['name'];
		$pm['pm_touserid'] = $item['item_userid'];
		$pm['pm_tostate'] = 0;
		$pmsql = $db-&gt;insert($db_pm, $pm);
		$pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");				
		}
		</pre>

<pre class="brush:php;gutter:false;toolbar:false;" style="font-size:15px;background-image:url(&quot;../img/code-blueprint.png&quot;);">
cot_folio_delete($id, $item);
</pre>

<pre class="brush:php;gutter:false;toolbar:false;">

		cot_redirect(cot_url('folio', "c=" . $item['item_cat'], '', true));
	}
</pre>

<p>Как тут сделать разные тексты писем в зависимости от выбранного select? Вроде просто а не могу осилить никак. Оно НЕ успевает это все проверить до удаления что ли?)</p>
<p class="updated"><strong>Added 9 minutes later:</strong></p><pre class="brush:php;gutter:false;toolbar:false;">
	if ($rdelete)
	{
		
		if ($usr['id'] != $item['item_userid']) //Если не сам юзер удаляет значит это модератор
		{
			if ($ritem['item_delete_reason'] = 'poorphoto')
				{	
				// Сообщение автору истории от редактора что она удалена (не администратором а модератором не из админки)		
				$text .= $L['deletestory_pm_newtext1'];
				$text .= $item['item_title'] .' ';
				$text .= $L['deletestory_pm_newtext2'];
				$text .= $usr['name'] .' ';
				$pm['pm_title'] = $L['folio_deleted_mail_subjpoorphoto'];
				$pm['pm_date'] = (int)$sys['now'];
				$pm['pm_text'] = $text;
				$pm['pm_fromstate'] = 0;
				$pm['pm_fromuserid'] = $usr['id'];
				$pm['pm_fromuser'] = $usr['name'];
				$pm['pm_touserid'] = $item['item_userid'];
				$pm['pm_tostate'] = 0;
				$pmsql = $db-&gt;insert($db_pm, $pm);
				$pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");				
			}
			
			else if ($ritem['item_delete_reason'] = 'lowphoto')
				{	
				// Сообщение автору истории от редактора что она удалена (не администратором а модератором не из админки)		
				$text .= $L['deletestory_pm_newtext1'];
				$text .= $item['item_title'] .' ';
				$text .= $L['deletestory_pm_newtext2'];
				$text .= $usr['name'] .' ';
				$pm['pm_title'] = $L['folio_deleted_mail_subjlowphoto'];
				$pm['pm_date'] = (int)$sys['now'];
				$pm['pm_text'] = $text;
				$pm['pm_fromstate'] = 0;
				$pm['pm_fromuserid'] = $usr['id'];
				$pm['pm_fromuser'] = $usr['name'];
				$pm['pm_touserid'] = $item['item_userid'];
				$pm['pm_tostate'] = 0;
				$pmsql = $db-&gt;insert($db_pm, $pm);
				$pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");				
			}
			else 
				{	
				// Сообщение автору истории от редактора что она удалена (не администратором а модератором не из админки)		
				$text .= $L['deletestory_pm_newtext1'];
				$text .= $item['item_title'] .' ';
				$text .= $L['deletestory_pm_newtext2'];
				$text .= $usr['name'] .' ';
				$pm['pm_title'] = $L['folio_deleted_mail_subj'];
				$pm['pm_date'] = (int)$sys['now'];
				$pm['pm_text'] = $text;
				$pm['pm_fromstate'] = 0;
				$pm['pm_fromuserid'] = $usr['id'];
				$pm['pm_fromuser'] = $usr['name'];
				$pm['pm_touserid'] = $item['item_userid'];
				$pm['pm_tostate'] = 0;
				$pmsql = $db-&gt;insert($db_pm, $pm);
				$pmsql = $db-&gt;update($db_users, array('user_newpm' =&gt; '1'), "user_id = ".$item['item_userid']."");				
			}
		}
		cot_folio_delete($id, $item);
		cot_redirect(cot_url('folio', "c=" . $item['item_cat'], '', true));
	}
</pre>

<p>Всяко пробую и явно где то просто туплю</p>
<p class="updated"><strong>Added 56 minutes later:</strong></p><p>та да, <code class="php keyword" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(167,29,93);float:none;height:auto;line-height:1.3em;width:auto;font-weight:bold;">if</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">(</code><code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$ritem</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'item_delete_reason'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">] <span style="background-color:#FF0000;">==</span> </code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'poorphoto'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">)<br />
заработался</code></p>
]]></description>
			<pubDate>Di, 21 Apr 2020 08:49:07 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/de/forums?m=posts&q=8942&d=0#post44584]]></link>
		</item>
	</channel>
</rss>