Location: PHPKode > projects > StreamOnTheFly > node/code/templates/editStation.htm
<h3>{#edit_station#}</h3>

{if hasPerm($STATION_DATA, 'change') }
<table class="tab">
  <tr> 
    <td nowrap class="tab">{#general_data#}</td>
  </tr>
</table>
<table class="tabarea">
<tr> 
  <td class="tabarea"> 
        <table width="100%">
          <tr><td>
              <form method="post">
                <table>
                  <tr>
                    <td>{#station_name#}:</td>
                    <td><b><a href="showStation.php/{$STATION_ID}">{$STATION}</a></b></td>
                  </tr>
                  <tr>
                    <td>{#languages#}:</td>
                    <td>                
                      <select name="language1">
                        <option value="0">{#no_lang#}</option>
                        {html_options values=$LANG_CODES output=$LANG_NAMES selected=$PRG_LANG1}
                      </select>
                      <select name="language2">
                        <option value="0">{#no_second_lang#}</option>
                        {html_options values=$LANG_CODES output=$LANG_NAMES selected=$PRG_LANG2}
                      </select>
                      <select name="language3">
                        <option value="0">{#no_third_lang#}</option>
                        {html_options values=$LANG_CODES output=$LANG_NAMES selected=$PRG_LANG3}
                      </select>
                    </td>
                  </tr>
                  <tr>
                    <td>{#url#}:</td>
                    <td><input name="url" onChange="if(value != defaultValue) data_changed++;" value="{$STATION_DATA.url|default:"http://"}" size="50" /></td>
                  </tr>
                  <tr>
                    <td>{#description#}:</td>
                    <td><textarea onChange="if(value != defaultValue) data_changed++;" cols="50" rows="10" name="desc">{$STATION_DATA.description}</textarea></td>
                  </tr>
                </table>
                <input type="submit" name="save" value="{#save#}">
              </form>
            </td></tr>
        </table>
  </td>
</tr>
</table>

<p></p>

<form>
<table class="tab">
  <tr> 
    <td nowrap class="tab">{#Roles#}</td>
  </tr>
</table>
<table class="tabarea">
<tr> 
  <td class="tabarea"> 
        {if $ROLES}
        <table>
          <tr class="listhead"><th>{#Role#}</th><th>{#Contact#}</th><th>{#actions#}</th></tr>
          {cycle name="roles" values="list1,list2" print=false advance=false}
          {foreach item=item from=$ROLES}
          <tr class="{cycle name=roles}">
            <td>
              {$item.role_name}
            </td>
            <td>
              {$item.contact_data.name}
            </td>
            <td nowrap>
              <input class="action" type="button" name="b1" value="{#change#}" onClick="popup('editRole.php?roleid={$item.id}&objectid={$STATION_ID}','EditRole',300,550,false)" />
             {if $item.change_contact }
              <input class="action" type="button" name="b1" value="{#edit_contact#}" onClick="popup('editContact.php?id={$item.contact_id}','EditContact',500,500,true)" />
             {/if}
              <input class="action" type="button" name="b1" value="{#delete#}" onClick="redir(this.form, 'editStation.php?delrole=1&roleid={$item.id}&stationid={$STATION_ID}')" />
            </td>
          </tr>
          {/foreach}
        </table>
        {else}
        <p>{#no_roles#}</p>
        {/if}
        <p>
            <input class="action" type="button" name="b1" value="{#add_new_role#}" onClick="popup('editRole.php?new=1&objectid={$STATION_ID}','EditRole',300,550,false)" />
        </p>
      </td>
    </tr>
</table>
</form>

{else}

  <table>
    <tr>
      <td>{#station_name#}:</td>
      <td><b><a href="showStation.php/{$STATION_ID}">{$STATION}</a></b></td>
    </tr>
  </table>
{/if}

<p></p>

{if hasPerm($STATION_DATA, 'authorize') }
<a name="perms"></a>

<form>
<table class="tab">
  <tr> 
    <td nowrap class="tab">{#access_permissions#}</td>
  </tr>
</table>
<table class="tabarea">
<tr> 
  <td class="tabarea"> 
        {if $PERMISSIONS}
        <table>
          <tr class="listhead"><th>{#username#}</th><th>{#permissions#}</th><th>{#actions#}</th></tr>
          {cycle name="perms" values="list1,list2" print=false advance=false}
          {foreach item=user key=userid from=$PERMISSIONS}
          <tr class="{cycle name=perms}">
            <td>{$user.name}</td>
            <td>
              {section name=i loop=$user.permissions}
              {$user.permissions[i]}{if ! $smarty.section.i.last}, {/if}
              {/section}
            </td>
            <td nowrap>
                {if $USERNAME ne $user.name}
                <input class="action" type="button" name="b1" value="{#change#}" onClick="popup('editPermissions.php?context=station&objectid={$STATION_ID}&objectname={$STATION}&userid={$userid}','Permissions',350,400,false)" />
                <input class="action" type="button" name="b1" value="{#delete#}" onClick="redir(this.form, 'editStation.php?delperm=1&userid={$userid}&stationid={$STATION_ID}')" />              
                {/if}
            </td>
          </tr>
          {/foreach}
          <tr class="{cycle name=perms}">
            <td colspan="3">{#inherited_perms#}</td>
          </tr>
        </table>
        {else}
        <p>{#inherited_perms#}</p>
        {/if}
        <input type="button" name="addperm" value="{#change_perm#}" onClick="popup('editPermissions.php?context=station&objectid={$STATION_ID}&objectname={$STATION}','Permissions',450,450, false)">
      </td>
    </tr>
</table>
</form>
{/if}

<p></p>

{if hasPerm($STATION_DATA, 'change') }
<a name="series"></a>

<form>
<table class="tab">
  <tr> 
    <td nowrap class="tab">{#series#}</td>
  </tr>
</table>
<table class="tabarea">
<tr> 
  <td class="tabarea"> 
        {if $SERIES}
        <table>
          <tr class="listhead"><th>{#series_title#}</th><th>{#actions#}</th></tr>
          {cycle name="perms" values="list1,list2" print=false advance=false}
          {foreach item=item from=$SERIES}
          <tr class="{cycle name=perms}">
            <td><a href="showSeries.php/{$item.id}">{$item.name}</a></td>
            <td nowrap>
                {if hasPerm($item, 'change') }
              <input class="action" type="button" name="b1" value="{#change#}" onClick="popup('editSeries.php?seriesid={$item.id}','EditSeries',550,550,true)" />
                {/if}
                {if hasPerm($STATION_DATA, 'delete') or hasPerm($item, 'admin') }
              <input class="action" type="button" name="b1" value="{#delete#}" onClick="redir(this.form, 'editStation.php?delseries=1&seriesid={$item.id}&stationid={$STATION_ID}')" />
                {/if}
            </td>
          </tr>
          {/foreach}
        </table>
        {else}
        <p>{#no_series#}</p>
        {/if}
          <input class="action" type="button" name="b1" value="{#add_series#}" onClick="popup('createSeries.php?stationid={$STATION_ID}','EditSeries',550,550,true)" />


      </td>
    </tr>
</table>
</form>

<p></p>

        <a name="icon"></a>
<table class="tab">
  <tr> 
    <td nowrap class="tab">{#icons_and_jingles#}</td>
  </tr>
</table>
<table class="tabarea">
<tr> 
   <td class="tabarea"> 
        <form>
     <table>
          <tr>
            <th>{#icon#}</th><th>{#jingle_list#}</th>
          </tr>
          <tr>
            <td>
              {if $ICON}
              <img src="{$CACHE_URL}/{$STATION_ID}.png" border="1">
              {else}
                {#no_icon#}
              {/if}
           </td><td>   
              <table>
                <tr class="listhead"><th>&nbsp;</th><th>{#format#}</th><th>{#bitrate#}</th><th>{#channels#}</th><th>{#samplerate#}</th><th></th></tr>
                {cycle values="list1,list2" print=false advance=false}
                {foreach item=item from=$JINGLE}
                <tr class="{cycle}">
                  <td>
                    {if $item.filename}
                    <a href="getJingle.php/{$STATION}_jingle.mp3?id={$STATION_ID}&file={$item.filename}">{#exists#}</a>
                    {else}
                    <font color="red">{#missing#}</font>
                    {/if}
                  </td>
                  <td>
                    {$item.format}
                  </td>
                  <td>
                    {$item.bitrate}
                  </td>
                  <td>
                    {$item.channels}
                  </td>
                  <td>
                    {$item.samplerate}
                  </td>
                  <td>
                      {if empty($item.filename) }
                        {if $HAS_JINGLE}
                        <input class="action" type="button" name="b1" value="{#convert#}" onClick="window.open('convert.php?jingle=1&id={$STATION_ID}&index={$item.index}','mp3progress','menubar=no, status=no, toolbar=no, width=350, height=80')" />
                        {/if}
                      {else}
                        <input class="action" type="button" name="b1" value="{#delete#}" onClick="redir(this.form, 'editStation.php?deljingle=1&filename={$item.filename}&index={$item.index}&stationid={$STATION_ID}')" />
                      {/if}
                  </td>
                </tr>
                {/foreach}
              </table>
            </td></tr>
        </table>
                       </form>

        {if $USERFILES}
{literal}
<script language="javascript">
function getSelected() {
     return document.userfiles['filename'].options[document.userfiles['filename'].selectedIndex].value;
}
</script>
{/literal}

        <form method="post" name="userfiles">
          <input type="hidden" name="okURL" value="{$OKURL}">
          <input type="hidden" name="stationid" value="{$STATION_ID}">
          <p>{#userfiles#}:	<select name="filename">{html_options values=$USERFILES output=$USERFILES}</select>
          <input type="button" name="view" value="{#view#}" onClick="var file=getSelected(); popup('getUserFile.php/'+escape(file)+'?filename='+escape(file),'UserFile',400,400,false)">
          <input type="submit" name="seticon" value="{#set_icon#}" onClick="return confirmUnsaved()" >
          <input type="submit" name="setjingle" value="{#set_jingle#}" onClick="return confirmUnsaved()" >
          <br \><small>{#userfiles_expl#}</small>
        </form>
        {else}
        <p>{#no_files#}</p>
        {/if}
        <small>
          <form enctype="multipart/form-data" method="post">
            <input type="hidden" name="MAX_FILE_SIZE" value="15000000" />
            <input type="hidden" name="stationid" value="{$STATION_ID}" />
            <input name="userfile" type="file" />
            <input type="submit" name="uploadicon" value="{#set_icon#}"  onClick="return checkIfEmpty(this.form.userfile,'{#select_file#}') && confirmUnsaved()" />
            <input type="submit" name="uploadjingle" value="{#set_jingle#}"  onClick="return checkIfEmpty(this.form.userfile,'{#select_file#}') && confirmUnsaved()" />
            <br />{#upload_expl#}
          </form>
        </small>
        
      </td>
    </tr>
  </table>
{/if}
Return current item: StreamOnTheFly