Location: PHPKode > projects > Simple PHP Shopping cart - asaancart > asaancart v-0.9/templates/create_banner_form.tpl
<form method="post" action="manage_banners.php" name="add_banner_form" enctype="multipart/form-data" id="irForm">
{if $action=="edit"}
{section name=selected_banner loop=$selected_banner}
<table border="0" cellspacing="0" cellpadding="0">
 <tr>
    <td colspan="2">{if $msg==""}{else}
        <div id="msg_small">{$msg}</div><br />
        {/if}
</td>
  <tr>
    <td width="151">Banner Name</td>
    <td ><input id="banner_name" name="banner_name" type="text" class="irInput" value="{$selected_banner[selected_banner].banner_name}" /> <input id="banner_id" name="banner_id" type="hidden" value="{$selected_banner[selected_banner].banner_id}" />(This is for system use only, please don't use space or any special charactors.)</td>
  </tr>
  <tr>
    <td>Link banner to this product</td>
    <td><select id="banner_link" name="banner_link" class="irInput">
    <option value="0">Please select product</option>
    {section name=all_products loop=$all_products}
    <option value="{$all_products[all_products].product_id}" {if $selected_banner[selected_banner].banner_link==$all_products[all_products].product_id}selected{/if}>{$all_products[all_products].product_code}, {$all_products[all_products].product_name}, ${$all_products[all_products].product_price}</option>
    {/section}
    </select></td>
  </tr>
  <tr>
    <td width="151">Size in pixel</td>
    <td>Width <input name="width" type="text" class="irInput" value="{$selected_banner[selected_banner].width}" size="5" /> Height <input name="height" type="text" class="irInput" value="{$selected_banner[selected_banner].height}" size="5" /> (e.g. 400 x 30)</td>
  </tr>
  <tr>
    <td width="151">Publish</td>
    <td><input name="show_banner" type="radio" class="irInput" value="no" {if $selected_banner[selected_banner].show_banner=="no"} checked="checked" {/if}/> No <input name="show_banner" type="radio" class="irInput" value="yes" {if $selected_banner[selected_banner].show_banner=="yes"} checked="checked" {/if} /> Yes 
  </tr>
 <tr>
    <td width="151">External URL</td>
    <td><input name="external_url" type="text" class="irInput" value="{$selected_banner[selected_banner].external_url}" size="70" />
  </tr>  
  <tr>
    <td width="151">Banner Image</td>
    <td><img src="../banner_images/{$selected_banner[selected_banner].banner_image}" width="300" /><br />
<input name="banner_image_new" type="file" class="irInput" />
<input name="banner_image" type="hidden" value="{$selected_banner[selected_banner].banner_image}" /> (If you want the same banner, please do not select any file.)</td>
  </tr>
 
</table>
<input name="btn_submit" id="btn_submit" type="submit" value="Save" class="irBtnSave" />
{/section}
{else}
<table border="0" cellspacing="0" cellpadding="0">
 <tr>
    <td colspan="2">{if $msg==""}{else}
        <div id="msg_small">{$msg}</div><br />
        {/if}
</td>
  <tr>
    <td width="151">Banner Name</td>
    <td ><input id="banner_name" name="banner_name" type="text" class="irInput" /> (This is for system use only, please don't use space or any special charactors.)</td>
  </tr>
  <tr>
    <td>Link banner to this product</td>
    <td><select id="banner_link" name="banner_link" class="irInput">
    <option value="0">Please select product</option>
    {section name=all_products loop=$all_products}
    <option value="{$all_products[all_products].product_id}">{$all_products[all_products].product_code}, {$all_products[all_products].product_name}, ${$all_products[all_products].product_price}</option>
    {/section}
    </select></td>
  </tr>
  <tr>
    <td width="151">Size in pixel</td>
    <td>Width <input name="width" type="text" class="irInput" size="5" /> Height <input name="height" type="text" class="irInput" size="5" />
    (e.g. 400 x 30)</td>
  </tr>
  <tr>
    <td width="151">Publish</td>
    <td><input name="show_banner" type="radio" class="irInput" value="no" /> No <input name="show_banner" type="radio" class="irInput" value="yes" checked="checked" /> Yes 
  </tr>
 <tr>
    <td width="151">External URL</td>
    <td><input name="external_url" type="text" class="irInput" size="70" />
  </tr> 
  <tr>
    <td width="151">Banner Image</td>
    <td><input name="banner_image" type="file" class="irInput" /></td>
  </tr>
    
</table>
<input name="btn_submit" id="btn_submit" type="submit" value="Create" class="irBtnCreate" />
{/if}
</form>
Return current item: Simple PHP Shopping cart - asaancart