clipbucket/upload/admin_area/styles/clipbucketblue/layout/ads_manager.html
2009-08-25 12:16:42 +00:00

178 lines
No EOL
6.5 KiB
HTML

<script type="text/javascript" src="{$js}/popup_image.js"></script>
<script src="{$js}/switch_content.js"></script>
{if $edit_ad != "show"}
<form action="?" method="post" enctype="multipart/form-data" name="add_adv" id="Add Category">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td colspan="2" class="tr_head">Add Advertisement</td>
</tr>
<tr>
<td class="td_body">&nbsp;</td>
<td align="right" class="td_body">* are required fields</td>
</tr>
<tr>
<td valign="top" class="td_body">Advertisement Name*</td>
<td class="td_body"><label>
<input name="name" type="text" id="name" size="45" />
<br>
e.g Home Banner</label></td>
</tr>
<tr>
<td valign="top" class="td_body">Advertisement Placement </td>
<td class="td_body"><label>
<select name="type" id="type">
{assign var=select value='selected="selected"'}
{section name=a_list loop=$ads_placements}
<option value="{$ads_placements[a_list].placement}" {$select} >{$ads_placements[a_list].placement_name}</option>
{assign var=select value=''}
{/section}
</select>
<a href="ads_add_placements.php">Add More Placements</a>
<br />
<img src="{$imageurl}/placements.png" /></label></td>
</tr>
<tr>
<td valign="top" class="td_body">Advertisement Code*</td>
<td class="td_body"><label>
<textarea name="code" id="code" cols="45" rows="5"></textarea>
</label></td>
</tr>
<tr>
<td class="td_body">Status</td>
<td class="td_body"><p>
<label>
<input name="status" type="radio" value="1" checked="checked" />
Active</label>
<label>
<input type="radio" name="status" value="0" />
Inactive</label>
<br />
</p></td>
</tr>
<tr>
<td class="td_body">&nbsp;</td>
<td class="td_body"><label></label></td>
</tr>
<tr>
<td colspan="2" align="right" class="tr_head"><label>
<input type="submit" name="add_ad" id="button" value="Add Advertisement" onClick="return validate_ad_form(add_adv)"/>
</label></td>
</tr>
</table>
</form>
{/if}
{if $edit_ad == "show"}
{section name=list loop=$ad_data}
<form action="" method="post" enctype="multipart/form-data" name="edit_category" id="Edit Category">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td colspan="2" class="tr_head">Edit Advertisement</td>
</tr>
<tr>
<td class="td_body">&nbsp;</td>
<td align="right" class="td_body">* are required fields</td>
</tr>
<tr>
<td valign="top" class="td_body">Advertisement Name*</td>
<td class="td_body"><label>
<input name="name" type="text" id="name" value="{$ad_data[list].ad_name}" size="45" />
</label></td>
</tr>
<tr>
<td valign="top" class="td_body">Advertisement Placement*</td>
<td class="td_body"><select name="type" id="type">
{section name=a_list loop=$ads_placements}
{if $ads_placements[a_list].placement == $ad_data[list].ad_placement}
{assign var=select value='selected="selected"'}
{/if}
<option value="{$ads_placements[a_list].placement}" {$select} >{$ads_placements[a_list].placement_name}</option>
{assign var=select value=''}
{/section}
</select></td>
</tr>
<tr>
<td valign="top" class="td_body">Advertisement Code*</td>
<td class="td_body"><label>
<textarea name="code" id="code" cols="45" rows="5">{$ad_data[list].ad_code}</textarea>
</label></td>
</tr>
<tr>
<td class="td_body">&nbsp;</td>
<td class="td_body"><input name="status" type="radio" value="1"{if $ad_data[list].ad_status==1} checked="checked"{/if}/>
Active</label>
<label>
<input type="radio" name="status" value="0"{if $ad_data[list].ad_status==0} checked="checked"{/if} />
Inactive</label> </td>
</tr>
<tr>
<td colspan="2" align="right" class="tr_head"><label>
<input type="submit" name="update_ad" id="button" value="Update Advertisement" onclick="return validate_category_form(edit_category)"/>
</label></td>
</tr>
</table>
</form>
{/section}
{/if}
<br />
<div class="setting_title">Advertisement Manager</div>
{if $total != 0}
<table width="950" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td colspan="5" class="tr_head">&nbsp;</td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>
</tr>
<tr>
<td width="19%" class="tr_head">Advertisement Name</td>
<td width="23%" class="tr_head">Date Added</td>
<td width="18%" align="left" class="tr_head">Impressions</td>
<td width="27%" align="left" class="tr_head">Placement</td>
<td width="13%" align="left" class="tr_head">Action</td>
</tr>
{assign var = bgcolor value = ""}
{section name=list loop=$ads}
<tr bgcolor="{$bgcolor}">
<td valign="top">{$ads[list].ad_name}</td>
<td valign="top">{$ads[list].date_added|date_format}</td>
<td valign="top">{$ads[list].ad_impressions}</td>
<td valign="top">{$ads[list].placement}</td>
<td>
<li><a href="?ad={$ads[list].ad_id}">Edit</a></li>
<li>
{if $ads[list].ad_status == 0 }
<a href="?change_status={$ads[list].ad_id}&amp;status=1">Activate It</a>
{else}
<a href="?change_status={$ads[list].ad_id}&amp;status=0">Deactivate it</a>
{/if} </li>
<li><a href="javascript:Confirm_Delete('?delete_ad={$ads[list].ad_id}')">Delete</a></li> </td>
</tr>
<tr bgcolor="{$bgcolor}">
<td colspan="5" align="center" valign="top"><h3><a id="share_form{$ads[list].ad_id}-title" onmouseover="this.style.cursor='pointer'">Click Here To Preview</a>
</h3>
<div id="share_form{$ads[list].ad_id}" class="show_form" style="padding-bottom:4px">{$ads[list].ad_code}</div></td>
</tr>
{if $bgcolor == ""}
{assign var = bgcolor value = "#EEEEEE"}
{else}
{assign var = bgcolor value = ""}
{/if}
{/section}
</table>
{else}
No Advertisement Has Been Created Yet
{/if}
<br />
<br />
<script type="text/javascript">
var Decription=new switchcontent("show_form", "div") //Limit scanning of switch contents to just "div" elements
Decription.setStatus('', '')
Decription.setColor('#333333', '#333333')
Decription.setPersist(0)
Decription.collapsePrevious(true) //Only one content open at any given time
Decription.init()
</script>