© Сделано на LiveStreet
Дизайн - ©2009 MODx RED Group
<table width="70%" border="0">
<tr>
<td rowspan="2">Сотрудник</td>
<td colspan="3">Балы</td>
</tr>
<tr>
<td>+</td>
<td>-</td>
<td>Итого</td>
</tr>
<tr>
<td>Лида</td>
<form>
<td>5<input type="text" id="plusfield7" onKeyUp="recalc7()" value="5"></td>
<td>2<input type="text" id="minusfield7" onKeyUp="recalc7()" value="2"></td>
<td><span id="fieldRes7">0</span></td>
</form>
<script language="JavaScript">
function recalc7()
{
document.getElementById('fieldRes7').innerHTML=parseInt(document.getElementById('plusfield7').value)-parseInt(document.getElementById('minusfield7').value);
}
window.onload = function() {
setTimeout(recalc7(), 1000);
};
</script>
</tr><tr>
<td>Марина</td>
<form>
<td>4<input type="text" id="plusfield3" onKeyUp="recalc3()" value="4"></td>
<td>3<input type="text" id="minusfield3" onKeyUp="recalc3()" value="3"></td>
<td><span id="fieldRes3">0</span></td>
</form>
<script language="JavaScript">
function recalc3()
{
document.getElementById('fieldRes3').innerHTML=parseInt(document.getElementById('plusfield3').value)-parseInt(document.getElementById('minusfield3').value);
}
window.onload = function() {
setTimeout(recalc3(), 1000);
};
</script>
</tr>
</table><tr>
<td>[+pagetitle+]</td>
<form>
<td>[+plus+]<input type="text" id="plusfield[+id+]" onKeyUp="recalc[+id+]()" value="[+plus+]"></td>
<td>[+minus+]<input type="text" id="minusfield[+id+]" onKeyUp="recalc[+id+]()" value="[+minus+]"></td>
<td><span id="fieldRes[+id+]">0</span></td>
</form>
<script language="JavaScript">
function recalc[+id+]()
{
document.getElementById('fieldRes[+id+]').innerHTML=parseInt(document.getElementById('plusfield[+id+]').value)-parseInt(document.getElementById('minusfield[+id+]').value);
}
window.onload = function() {
setTimeout(recalc[+id+](), 1000);
};
</script>
</tr><?php
function CreateNewAnnouncement(&$fields){
require_once('assets/libs/docmanager/document.class.inc.php');
$doc = new Document(); // создаем документ
$doc->Set('parent',4); // определяем в какую папку положить
$doc->Set('template',''); // задаем шаблон
$doc->Set('pagetitle',$fields['pagetitle']); // название
$doc->Set('content',$fields['content']); // основное содержимое
// Далее пойдут TV-параметры
$doc->Set('tvAvtor',$fields['avtor']); // автор
$doc->Set('tvEmail',$fields['email']); // e-mail
$doc->Set('tvPhone',$fields['phone']); // Телефон
$doc->Set('tvSection',$fields['section']); // Раздел
$doc->Set('tvCategory',$fields['category']); // Категория
$doc->Set('tvPrice',$fields['price']); // Цена
$doc->Save(); // сохраняем
return true; // Говорим eForm, что все в порядке.
}
?><p class="error"></p>
<form action="[~[*id*]~]" method="post" enctype="multipart/form-data">
<input type="hidden" name="formid" value="newAnnouncement" />
<p><label>Автор *</label>
<input class="field" type="text" name="avtor" maxlength="60" eform="Имя автора:string:0!"/></p>
<p><label>Email *</label>
<input class="field" type="text" name="email" size="40" maxlength="40" eform="Адрес почты:email:0" /></p>
<p><label>Телефон для связи *</label>
<input class="field" type="text" name="phone" size="40" maxlength="40" eform="Телефон:string:0" /></p>
<p><label>Раздел объявления</label>
<input class="field" type="text" name="section" size="40" maxlength="40" eform="Категория:string:0" />
</p>
<p><label>Категория объявления</label>
<input class="field" type="text" name="category" size="40" maxlength="40" eform="Категория:string:0" />
</p>
<p>Название объявления *
<input class="field" type="text" name="pagetitle" size="40" maxlength="40" eform="Название объявления:string:0" />
</p>
<p><label>Цена *</label>
<input class="field" type="text" name="price" size="40" maxlength="40" eform="Цена:string:0" />
</p>
Текст объявления *
<textarea name="content" cols="40" rows="10" eform="Текст объявления:string:0"></textarea>
<p><input type="submit" name="frmGo" value="Сохранить" /></p>
</form>[!NewAnnouncementEvent!]
[!eForm? &formid=`newAnnouncement` &to=`example@example.ru` &subject=`Новый вопрос с сайта` &tpl=`tpl_Announcement` &eFormOnBeforeMailSent=`CreateNewAnnouncement` &thankyou=`thankyou`!]<?php
$output = "";
if ($_GET["print"]==1) {
$output = '<a href="[*DownloadLink*]">Скачать</a>';
}
else {
$output = '';
}
return $output;
?>[[Reflect? &config=`wordpress` &targetID=`145` &id=`wp` ¶ms=`startdID:142,15,35` &showItems=`0` &groupByYears=`0` &dateSource=`pub_date` &monthSortDir=`DESC`]][!Ditto? &id=`wp` &startID=`142,15,35` &tpl=`ARTICLE_ANONS` &dateSource=`pub_date` &summarize=`15` &dateFormat=`%d.%m.%Y` &extenders=`dateFilter` &paginate=1!]