2009-08-03 04:10:16 +00:00
{ assign var = meth value = ':' | explode : $VAR._page }
<!-- { $meth.0 } : { $meth.1 } -->
2008-11-26 22:50:40 +00:00
2009-08-03 04:10:16 +00:00
{ $method - > exe ( $meth.0 , $meth.1 ) }
{ if ( $method - > result = = false ) }
{ $block - > display ( 'core:method_error' ) }
{ else }
{ include file = 'file:../core/view_pre.tpl' }
2008-11-26 22:50:40 +00:00
2009-08-03 04:10:16 +00:00
<!-- Display the field validation -->
{ if $form_validation }
{ $block - > display ( 'core:alert_fields' ) }
{ /if }
2008-11-26 22:50:40 +00:00
2009-08-03 04:10:16 +00:00
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="3">
<tr valign="middle" align="right" class="table_heading">
<td class="table_heading"> </td>
<td class="table_heading" style="text-align: right;"><b> { t } Impressions { /t } </b></td>
<td class="table_heading" style="text-align: right;"><b> { t } Clicks { /t } </b></td>
<td class="table_heading" style="text-align: right;"><b> { t } Cost { /t } </b></td>
<td class="table_heading" style="text-align: right;"><b> { t } Conversion { /t } </b></td>
</tr>
<!-- LOOP THROUGH EACH RECORD -->
{ foreach from = $record.results key = key item = results }
{ if $results.show }
<tr class=" { cycle values = "row1,row2" } ">
<td><b><a href="#1"> { t 1 = $key } Advertisement %1 { /t } </a></b></td>
<td style="text-align: right;"> { $results.served | number_format } { $results.impressions_percentage } </td>
<td style="text-align: right;"> { $results.clicked | number_format } { $results.clicks_percentage } </td>
<td style="text-align: right;"> { $list - > format_currency_num ( $results.cost , "" ) } </td>
<td style="text-align: right;"> { $results.ctr } </td>
</tr>
{ /if }
{ /foreach }
<tr class="table_heading">
<td> </td>
<td style="text-align: right;"> <b> { $record.impressions_total | number_format } </b></td>
<td style="text-align: right;"><b> { $record.clicks_total | number_format } { $record.clicks_percentage3 } </b></td>
<td style="text-align: right;"><b> { $list - > format_currency_num ( $record.budget , "" ) } </b></td>
<td style="text-align: right;"><b> { $record.ctr_avg } </b></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="background-color: #ffffff;"> </td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="3" class="table_background">
<tr class="row1">
<td style="width: 35%;"><a href="?_page=core:search&module=invoice&invoice_campaign_id= { $record.id } "> { t } Invoices Referred { /t } </a></td>
<td style="width: 15%;"> { $record.invoices_referred } </td>
<td style="width: 35%;"><a href="?_page=core:search&module=account&account_campaign_id= { $record.id } "> { t } Accounts Referred { /t } </a> </td>
<td style="width: 15%;"> { $record.accounts_referred } </td>
</tr>
<tr class="row2">
<td style="width: 35%;"> { t } Revenue Generated { /t } </td>
<td style="width: 15%;" class="row1"> { $list - > format_currency_num ( $record.invoices_revenue , '' ) } </td>
<td style="width: 35%;"> { t } Avg. CPI (Cost Per Impression) { /t } </td>
<td style="width: 15%;" class="row1"> { $list - > format_currency_num ( $record.cpi_avg , '' ) } </td>
</tr>
<tr class="row1">
<td style="width: 35%;"> { t } Average Cost Per Conversion { /t } </td>
<td style="width: 15%;"> { $list - > format_currency_num ( $record.conversion_cost , '' ) } </td>
<td style="width: 35%;"> { t } Avg CPC (Cost Per Click) { /t } </td>
<td style="width: 15%;"> { $list - > format_currency_num ( $record.cpc_avg , '' ) } </td>
</tr>
<tr class="row2">
<td style="width: 35%;"> { t } Average Sale Amount { /t } </td>
<td style="width: 15%;" class="row1"> { $list - > format_currency_num ( $record.invoice_avg , '' ) } </td>
<td style="width: 35%;"> { t } Impression to Buy Ratio { /t } </td>
<td style="width: 15%;" class="row1"> { $record.impr_to_buy } </td>
</tr>
<tr class="row1">
<td style="width: 35%;"> { t } Return on Investment (ROI) { /t } </td>
<td style="width: 15%;"> { $record.roi } </td>
<td style="width: 35%;"> { t } Click to Buy Ratio { /t } </td>
<td style="width: 15%;"> { $record.click_to_buy } </td>
</tr>
</table>
</td>
</tr>
</table>
2008-11-26 22:50:40 +00:00
2009-08-03 04:10:16 +00:00
<div><br/></div>
<form id="view" method="post" action="" enctype="multipart/form-data">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr valign="top">
<td class="table_heading"> { osb f = tt } </td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td style="width: 35%;"> { translate module = campaign } field_date_orig { /translate } </td>
<td style="width: 65%;"> { $list - > date_time ( $record.date_orig ) } </td>
</tr>
<tr valign="top">
<td style="width: 35%;"> { translate module = campaign } field_date_last { /translate } </td>
<td style="width: 65%;"> { $list - > date_time ( $record.date_last ) } </td>
</tr>
<tr valign="top">
<td style="width: 35%;"> { translate module = campaign } field_date_start { /translate } </td>
<td style="width: 65%;"> { $list - > calender_view ( 'campaign_date_start' , $record.date_start , 'form_field' ) } </td>
</tr>
<tr valign="top">
<td style="width: 35%;"> { translate module = campaign } field_date_expire { /translate } </td>
<td style="width: 65%;"> { $list - > calender_view ( 'campaign_date_expire' , $record.date_expire , 'form_field' ) } </td>
</tr>
<tr valign="top">
<td style="width: 35%;"> { translate module = campaign } field_status { /translate } </td>
<td style="width: 65%;"> { $list - > bool ( 'campaign_status' , $record.status , 'form_menu' ) } </td>
</tr>
<tr valign="top">
<td style="width: 35%;"> { translate module = campaign } field_name { /translate } </td>
<td style="width: 65%;"><input type="text" name="campaign_name" value=" { $record.name } " size="32"/></td>
</tr>
<tr valign="top">
<td style="width: 35%;"> { translate module = campaign } field_description { /translate } </td>
<td style="width: 65%;"><textarea name="campaign_description" cols="40" rows="5" > { $record.description } </textarea></td>
</tr>
<tr valign="top">
<td style="width: 35%;"> { translate module = campaign } field_budget { /translate } </td>
<td style="width: 65%;"><input type="text" name="campaign_budget" value=" { $record.budget } " size="10"/></td>
</tr>
<tr valign="top">
<td style="width: 35%;"> { translate module = campaign } field_url { /translate } </td>
<td style="width: 65%;"><input type="text" name="campaign_url" value=" { $record.url } " size="48"/></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
{ include file = 'file:../core/view_tr_submit_delete.tpl' }
</table>
</td>
</tr>
{ counter start = 0 skip = 1 assign = counter }
{ foreach from = $record.results key = key item = results }
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellpadding="5">
<tr class="row2">
<td class=" { cycle values = "row1,row2" } ">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="row2">
<tr>
<td style="width: 35%;"><b> { t 1 = $key } Advertisement %1 { /t } </b></td>
<td style="width: 65%; text-align: right;">
{ if $key = = 1 } <input type="hidden" name="campaign_file { $key } " value=" { $results.file } "/> { /if }
<input type="file" name="upload_file { $key } " size="38"/>
</td>
</tr>
</table>
</td>
</tr>
{ if $results.file ! = '' }
{ counter }
<tr>
<td style="text-align: center;"><a href=" { $URL } ?_page=campaign:click&caid= { $record.id } &file= { $key } &_log=no" style="border: 0px;" onclick="target='_blank';"><img src=" { $URL } modules/campaign/?id= { $record.id } &file= { $key } &_log=no" alt="" style="border: 0px"/></a></td>
</tr>
<tr>
<td style="text-align: center;">
{ capture name = 'code' } <a href=" { $URL } ?_page=campaign:click&caid= { $record.id } &file= { $key } "><img src=" { $URL } modules/campaign/?id= { $record.id } &file= { $key } " alt=""></a> { /capture }
<textarea name="code" cols="85" rows="2" readonly="readonly"> { $smarty.capture.code | htmlspecialchars } </textarea>
{ if $key > 1 }
<br/>
<a href="?_page=campaign:view&file= { $key } &id= { $VAR.id } &campaign_id= { $record.id } &do[]=campaign:delete_add"> { t } Delete this file from rotation { /t } </a>
{ /if }
</td>
</tr>
{ /if }
</table>
</td>
</tr>
{ /foreach }
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="1">
{ include file = 'file:../core/view_tr_submit_delete.tpl' }
</table>
</td>
</tr>
<tr>
<td style="background-color: #ffffff;"> </td>
</tr>
<tr valign="top">
<td class="row1" style="text-align: center;"><b> { t } Insert the random code below into your html file(s) where you would like the above in your html instead. { /t } </b></td>
</tr>
<tr> <td style="background-color: #ffffff;"> </td>
</tr>
<tr valign="top">
<td class="row1" align="center">
{ capture name = 'code' } { literal } <script type="text/javascript">
<!--
var currentdate = 0;
var core = 0;
function StringArray (n) {
this.length = n;
for (var i = 1; i <= n; i++) {
this[i] = ' ';
}
}
{ /literal }
image = new StringArray( { $counter } );
{ counter start = 0 skip = 1 assign = counter } { foreach from = $record.results key = key item = results } { if $results.file ! = '' }
image[ { $counter } ] = ' { $key } ';
{ counter } { /if } { /foreach }
var ran = 60/image.length
{ literal }
function ranimage() {
currentdate = new Date()
core = currentdate.getSeconds()
core = Math.floor(core/ran)
return(image[core])
}
{ /literal }
var fileId = ranimage();
var write1 = '<a href=" { $URL } ?_page=campaign:click&caid= { $record.id } &file='+fileId+'&_escape">';
var write2 = '<img src=" { $URL } modules/campaign/?id= { $record.id } &file='+fileId+'" style="border: 0px"></a>';
document.write(write1+''+write2);
//-->
</script> { /capture }
<textarea name="textarea4" cols="85" rows="25"> { $smarty.capture.code | htmlspecialchars } </textarea>
</td>
</tr>
</table>
2008-11-26 22:50:40 +00:00
2009-08-03 04:10:16 +00:00
{ include file = 'file:../core/view_post.tpl' }
</form>
2008-11-26 22:50:40 +00:00
{ /if }