Nats tour report (NATS3)
From TMM Wiki
Jump to navigationJump to searchThe printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
nats_tour_report
Get tour statistics.
Alias: tour_report
Parameters
(Required parameters in bold)
Parameter | Description | Possible Values | Default Value | Example |
---|---|---|---|---|
siteid | The site number | Any valid site number. | The default site ID number | siteid="123" |
tourid | The tour number | Any valid site number | No tour number | tourid="123" |
period | Display stats for this period | Any valid period number | None. | period="1" |
period_start | Start of the period | Any date | Beginning of current period | period_start="26 August 2008" |
period_end | End of the period | Any date | End of current period | period_end="10 September 2008" |
Output
Puts tour statistics in the {$tour_data} Smarty variable.
Example
You may need to modify this to produce the exact results you are looking for. Make this your members_tour_report template. Reference the page at yoursite.com/internal.php?page=tour_report
<table width="100%" border=0 cellpadding=5 cellspacing=0> <form action="internal.php" method="get"> <input type="hidden" name="page" value="tour_report"> <tr valign="top" bgcolor="#4776A4"> <td ><font size=2 face="verdana,arial" color="#FFFFFF"><B> <b>Date Range:</b> <select name="period" onchange="period_start.value='';period_end.value='';"><option label="This Period" value="0" {if $smarty.request.period==0}selected{/if}>This Period</option> <option label="Last Period" value="1" {if $smarty.request.period==1}selected{/if}>Last Period</option> <option label="This Week" value="2" {if $smarty.request.period==2}selected{/if}>This Week</option> <option label="This Month" value="3" {if $smarty.request.period==3}selected{/if}>This Month</option> <option label="This Year" value="4" {if $smarty.request.period==4}selected{/if}>This Year</option> <option label="Today" value="5" {if $smarty.request.period==5}selected{/if}>Today</option> <option label="Yesterday" value="6" {if $smarty.request.period==6}selected{/if}>Yesterday</option> <option label="All Time" value="7" {if $smarty.request.period==7}selected{/if}>All Time</option> <option label="Freeform:" value="8" {if $smarty.request.period==8}selected{/if}>Freeform:</option> </select> : <input type="text" size=10 value="{$smarty.request.period_start|date_format:"%D"}" name="period_start" onChange="period.value=8;"> - <input type="text" size=10 value="{$smarty.request.period_end|date_format:"%D"}" name="period_end" onChange="period.value=8;"> </td> {list_sites} <td><B>Site:</b> <select name="siteid"> {foreach from=$sites item=item} <option label="{$item.name}" value="{$item.id}" {if $smarty.request.siteid==$item.id}selected{/if}>{$item.name}</option> {/foreach} </selecT></td> <td><input type="submit"></td> </tr> </table> {tour_report siteid=$smarty.request.siteid period=$smarty.request.period period_start=$smarty.request.period_start period_end=$smarty.request.period_end} <table> <tr> <td> Tour </td> <td> Raw </td> <td> Qualified </td> <td> Unique </td> <td> Signup </td> <td> Initial </td> <td> Conversion </td> <td> Rebill </td> <td> Active </td> <td> Credit </td> <td> Chargeback </td> <td> Raw Ratio </td> <td> Unique Ratio </td> </tr> {foreach from=$tour_data item=data} <tr> <td> {if $data.tourid==0}Default{else}{$sites[$smarty.request.siteid].tours[$data.tourid].name} {foreach from=$sites item=site} {if $site.id==$data.siteid} {foreach from=$site.tours item=tour} { if $tour.tourid == $data.tourid} {$tour.name} {/if} {/foreach} {/if} {/foreach} {/if}</td> <td> {$data.raw} </td> <td> {$data.qualified} </td> <td> {$data.unq} </td> <td> {$data.signup} </td> <td> {$data.initial} </td> <td> {$data.conversion} </td> <td> {$data.rebill} </td> <td> {$data.active} </td> <td> {$data.credit} </td> <td> {$data.chargeback} </td> <td> {$data.ratio_raw} </td> <td> {$data.ratio_unq} </td> </tr> {foreachelse} <tr> <td colspan="13"> Sorry there is no matching data</td> </tr> {/foreach} </table>