djvavik
Местный житель
- Регистрация
- 27 Авг 2013
- Сообщения
- 170
- Реакции
- 21
- Автор темы
- #11
А вот как отображается в HTML
HTML:
{literal}
<script type="text/javascript" src="include/jqplot/jquery.jqplot.min.js"></script>
<script type="text/javascript" src="include/jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script type="text/javascript" src="include/jqplot/plugins/jqplot.pointLabels.min.js"></script>
<script type="text/javascript" src="include/jqplot/plugins/jqplot.dateAxisRenderer.min.js"></script>
<script type="text/javascript" src="include/jqplot/plugins/jqplot.cursor.min.js"></script>
<script type="text/javascript" src="include/jqplot/plugins/jqplot.enhancedLegendRenderer.js"></script>
<link rel="stylesheet" type="text/css" href="include/jqplot/jquery.jqplot.css"/>
<script type="text/javascript">
$(function () {
$('.datepicker').datepicker({
showOn: "button",
showAlways: true,
buttonImage: "images/calbtn.png",
buttonImageOnly: true,
buttonText: "Calendar",
showAnim: (('\v' == 'v') ? "" : "show"), // в ie не включаем анимацию, тормозит
})
});
</script>
<script type="text/javascript">
function highlightTr(trId, hlMode) {
if (hlMode) hlColor = "{/literal}{$color3}{literal}";
else hlColor = "#ffffff";
document.getElementById('submain_td' + trId).style.background = hlColor;
}
</script>
<style type="text/css">
.title {
margin: 20px 0px;
font-size: 23px;
font-weight: bold;
}
.top {
border-top: 1px solid #E3E3E3;
border-bottom: 1px solid #E3E3E3;
background-color: #F5F5F5;
text-align: center;
padding: 15px 52px;
}
.top table {
margin: 0px;
padding: 0px;
border: none;
border-collapse: collapse;
}
.top td {
border: none;
padding: 0px;
margin: 0px;
}
span.input_element {
white-space: nowrap;
padding: 0px 35px 0px 0px;
line-height: 32px;
float: left;
}
.main {
margin-top: 35px;
margin-bottom: 25px;
}
.mainTable {
border-collapse: collapse;
border: none;
text-align: center;
width: 100%;
}
.mainTable td {
padding: 10px 20px;
vertical-align: middle;
border-top: 1px solid #B3BFC9;
border-bottom: 1px solid #B3BFC9;
border-left: 1px dashed #B3BFC9;
border-right: 1px dashed #B3BFC9;
text-align: center;
}
</style>
<script type="text/javascript">
function go_table(manager, type, dates) {
document.getElementById('_manager').value = manager;
document.getElementById('_type').value = type;
document.getElementById('_dates').value = dates;
document.getElementById('report_form').submit();
}
</script>
{/literal}
{if $smarty.get.act=='settings'}
<style type="text/css">
.sub_title {
margin: 20px 0px 10px;
font-size: 16px;
font-weight: bold;
}
.edit_link {
font-size: 15px;
}
</style>
<div class="title">Настройки отчета</div>
<div class="sub_title">Отображать пользователей из групп:</div>
{foreach from=$groups item=group}
<input type="checkbox" name="sel_groups[]" value={$group.id} {if $group.sel}checked{/if} /> {$group.name}<br>
{/foreach}
<br><br>
<input type=submit value="Сохранить">
<input type=button value="Отмена" onclick="location.href='report.php?id={$smarty.get.id}'">
<br><br><br>
<a href="edit_field.php?table=62&field=773" class="edit_link">Редактировать типы</a>
{else}
<div class="title">
<span style="float: right; font-size: 12px; margin-top: 5px;" class="no_print">
<a href="#"
onclick="document.getElementById('xsl_ex').value='1'; document.getElementById('report_form').submit(); return false"><img
src="images/xsl.gif" style="vertical-align: bottom; border: none; margin-right: 3px;">Экспорт в Excel</a>
<a href="javascript:window.print()"><img src="images/print.gif"
style="vertical-align: bottom; border: none; margin-right: 3px;">Печать
отчёта</a>
</span>
Холодные звонки
{if $adm_rules}<a href="report.php?id={$smarty.get.id}&act=settings" title="Перейти в настройки отчета"
class="no_print" style="text-decoration: none"><img class="settings_t"
style="margin:0 0 -3px 0px;"
src="images/settings_b.gif" border="0"/></a>{/if}
</div>
<div class="top">
<table style="margin: 0px auto;">
<tr>
<td>
<span class="input_element">
Период с <input type="text" name="date1" id="date1" value="{$date1}" size="10" class="datepicker"/>
по <input type="text" name="date2" id="date2" value="{$date2}" size="10" class="datepicker"/>
</span>
{if $user_group==1}
<span class="input_element">
Менеджеры: <select name="manager">{$sel_manager}</select>
</span>
{/if}
<div style="clear: both"></div>
</td>
<td>
<input type="submit" value="Обновить" class="no_print"
onclick="document.getElementById('xsl_ex').value='0'; document.getElementById('report_form').submit(); return false"/>
</td>
</tr>
</table>
</div>
<div class="main" style="color:white">
<table class="mainTable" cellspacing="0" cellpadding="0">
<tr>
<td style="border-right: 1px solid #B3BFC9; border-left: 0px; border-top: 0px;"> </td>
{foreach from=$h_pos item=s_pos name=table_header}
<td style="border-top-color: #fff;{if $smarty.foreach.table_header.first}border-left: none{/if}{if $smarty.foreach.table_header.last}border-right: none{/if}">
{$s_pos}
</td>
{/foreach}
</tr>
{foreach from=$data key=m_id item=m_data name=m_rows}
<tr id="submain_td{$smarty.foreach.m_rows.iteration}"
onmouseover="highlightTr({$smarty.foreach.m_rows.iteration}, 1)"
onmouseout="highlightTr({$smarty.foreach.m_rows.iteration}, 0)">
{foreach from=$m_data key=type item=value name=m_values}
{if $smarty.foreach.m_values.first || $smarty.foreach.m_values.last}
<td style={if
$smarty.foreach.m_values.last}"border-right: none;border-left: 0px;"{else}"border-right: 1px solid
#B3BFC9;border-left: 0px;"{/if}>{if !$smarty.foreach.m_values.first}<a
href="javascript:go_table({$m_id},'',1)"><b>{$value}</b></a>{else}<b>{$value}</b>{/if}</td>
{else}
<td
{if $smarty.foreach.m_values.iteration eq 2} style="border-left: none"{/if}{if
$smarty.foreach.m_values.last} style="border-right: none"{/if}><a
href="javascript:go_table({$m_id},'{$type}',1)">{$value}</a></td>
{/if}
{/foreach}
</tr>
{/foreach}
<tr id="submain_td9999" onmouseover="highlightTr(9999, 1)" onmouseout="highlightTr(9999, 0)">
{foreach from=$data_total key=type item=value name=m_values}
{if $smarty.foreach.m_values.first}
<td style="border-right: 1px solid #B3BFC9; border-left: 0px;"><b>{$value}</b></td>
{else}
<td
{if $smarty.foreach.m_values.iteration eq 2} style="border-left: none"{/if}{if
$smarty.foreach.m_values.last} style="border-right: none"><a
href="javascript:go_table('','',1)"><b>{$value}</b></a>{else}><a
href="javascript:go_table('','{$type}',1)"><b>{$value}</b></a>{/if}</td>
{/if}
{/foreach}
</tr>
</table>
</div>
<input type=hidden name="_dates" id="_dates">
<input type=hidden name="_date1" value="{$date1}">
<input type=hidden name="_date2" value="{$date2}">
<input type=hidden name="_manager" id="_manager">
<input type=hidden name="xsl" id="xsl_ex" value="0"/>
<input type=hidden name="_type" id="_type">
{if $is_graph}
<table align="center">
<tr>
<td align="center">
<div id="chart1" style="margin-top:20px; margin-left:20px; width:1000px; max-height:300px;"></div>
</td>
</tr>
</table>
{$graph}{/if}
{/if}