refactoring

optimize imports
reformat source code
remove unused cpu and memory log functionality
This commit is contained in:
Milan
2018-08-29 00:10:15 +02:00
parent c37c71f29e
commit 05b1251c1a
81 changed files with 9242 additions and 9962 deletions

View File

@@ -1 +0,0 @@
Deny from all

View File

@@ -1,378 +0,0 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>edit event</title>
<link href="css/event.css" type="text/css" rel="stylesheet"/>
<link href="css/jquery-ui-timepicker.css" type="text/css" rel="stylesheet" />
<!-- for edit series-->
<script src="js/series.js" type="text/javascript"></script>
<script src="js/edit_event.js" type="text/javascript"></script>
<script src="js/image.js" type="text/javascript"></script>
<script src="js/jquery-ui-timepicker.js" type="text/javascript"></script>
<script>
var event_id='<TMPL_VAR event_id>';
var selectImageId='';
/*
$(document).ready(function(){
$('textarea').each(function() {
$(this).height($(this).prop('scrollHeight'));
});
$('textarea').on('change', function() {
$(this).height($(this).prop('scrollHeight'));
});
});
*/
</script>
</head>
<body>
<TMPL_UNLESS new_event>
<TMPL_IF .allow_create_download>
<form>
<TMPL_IF download>
<textarea type="hidden" name="event_id" style="width:100%;height:10em;"><TMPL_VAR download></textarea>
</TMPL_IF>
<input type="hidden" name="event_id" value="<TMPL_VAR event_id>">
<input type="hidden" name="series_id" value="<TMPL_VAR series_id>">
<input type="submit" name="action" value="download">
</form>
</TMPL_IF>
</TMPL_UNLESS>
<!-- edit -->
<TMPL_IF .allow_update_event>
<div class="editor">
<div class="buttons" id="back_to_calendar">
<button onclick="cancel_edit_event();return false;">back to calendar</button>
</div>
<!-- series -->
<TMPL_UNLESS .hide_series>
<TMPL_IF series_id>
<table class="series">
<tr><td>
<!-- header -->
<div class="header">
<TMPL_VAR series_name> <TMPL_IF title>- <TMPL_VAR title></TMPL_IF>
<!--<aTMPL_UNLESS new_event>-->
<TMPL_IF .allow_read_series>
<button onclick="view_series_details('<TMPL_VAR series_id>','<TMPL_VAR .studio_id>')" style="float:right">
edit series
</button>
</TMPL_IF>
<!--</aTMPL_UNLESS>-->
</div>
</td></tr>
<tr class="series_details_<TMPL_VAR series_id>" style="display:none">
<td>
<div id="series_details_<TMPL_VAR series_id>">
</div>
</td>
</tr>
</table>
</TMPL_IF>
</TMPL_UNLESS>
<div>
<div class="header">Event</div>
<!-- edit event -->
<form method="post" action="event.cgi" id="event_<TMPL_VAR event_id>">
<input type="hidden" name="studio_id" value="<TMPL_VAR .studio_id>">
<input type="hidden" name="series_id" value="<TMPL_VAR series_id>">
<TMPL_UNLESS new_event>
<input type="hidden" name="event_id" value="<TMPL_VAR event_id>">
</TMPL_UNLESS>
<input type="hidden" name="debug" value="sql">
<!-- buttons -->
<!--
<TMPL_IF .allow_update_event>
<button class="edit_time_<TMPL_VAR event_id>" onclick="editEventTime('<TMPL_VAR event_id>');return false;">edit</button>
</TMPL_IF>
-->
<!-- show event event summary -->
<!-- <TMPL_IF new_event>style="display:none"</TMPL_IF> -->
<!--
<TMPL_IF .allow_read_event>
<table id="event_summary_<TMPL_VAR event_id>" >
<TMPL_UNLESS new_event>
<tr>
<td class="label">when</td>
<td><TMPL_VAR weekday_short_name>, <TMPL_VAR start_date_name>, <TMPL_VAR start_time_name> - <TMPL_VAR end_time>
</td>
</tr>
</TMPL_UNLESS>
<tr>
<td class="label">title</td>
<td><TMPL_VAR series_name> <TMPL_IF title>- <TMPL_VAR title></TMPL_IF> <TMPL_VAR user_title></td>
</tr>
<tr>
<td class="label">status</td>
<td>
<TMPL_IF live>live</TMPL_IF>
<TMPL_IF published>published</TMPL_IF>
<TMPL_IF preproduced>preproduced</TMPL_IF>
<TMPL_IF archived>archived</TMPL_IF>
<TMPL_IF rerun>rerun</TMPL_IF>
<TMPL_IF disable_event_sync>no sync</TMPL_IF>
</td>
</tr>
<tr>
<td class="label">episode</td>
<td><TMPL_VAR episode></td>
</tr>
</table>
</TMPL_IF>
-->
<!-- edit event time -->
<!-- <TMPL_UNLESS new_event>style="display:none"</TMPL_UNLESS> -->
<table id="edit_time_<TMPL_VAR event_id>" class="edit_event" >
<TMPL_IF .allow_update_event_time>
<tr>
<td class="label">when</td>
<td>
<TMPL_UNLESS new_event>
<TMPL_VAR weekday_short_name>, <TMPL_VAR start_date_name>, <TMPL_VAR start_time_name> - <TMPL_VAR end_time><br>
</TMPL_UNLESS>
start
<span id="start_date_weekday"></span>
<input id="start_date" class="date" name="start_date" value="<TMPL_VAR start>" onchange="onDateModified()">
duration <select id="duration" name="duration" onchange="onDateModified()"> minutes
<TMPL_LOOP durations>
<option value="<TMPL_VAR value>" <TMPL_IF selected>selected="selected"</TMPL_IF>><TMPL_VAR name></option>
</TMPL_LOOP>
</select>
end
<input id="end_date" class="date" name="end_date" value="<TMPL_VAR end>" disabled><br>
</td>
</tr>
</TMPL_IF>
<tr>
<td class="label">status</td>
<td>
<TMPL_IF .allow_update_event_live>
<input type="checkbox" name="live" <TMPL_IF live>checked="checked"</TMPL_IF> value="1"> live
</TMPL_IF>
<TMPL_IF .allow_update_event_published>
<input type="checkbox" name="published" <TMPL_IF published>checked="checked"</TMPL_IF> value="1"> published
</TMPL_IF>
<TMPL_IF .allow_update_event_preproduced>
<input type="checkbox" name="preproduced" <TMPL_IF preproduced>checked="checked"</TMPL_IF> value="1"> preproduced
</TMPL_IF>
<TMPL_IF .allow_update_event_archived>
<input type="checkbox" name="archived" <TMPL_IF archived>checked="checked"</TMPL_IF> value="1"> archived
</TMPL_IF>
<TMPL_IF .allow_update_event_rerun>
<input type="checkbox" name="rerun" <TMPL_IF rerun>checked="checked"</TMPL_IF> value="1"> rerun
</TMPL_IF>
<TMPL_IF .allow_disable_event_sync>
<input type="checkbox" name="disable_event_sync" <TMPL_IF rerun>checked="checked"</TMPL_IF> value="1"> no sync
</TMPL_IF>
</td>
</tr>
<TMPL_IF .allow_update_event_episode>
<tr>
<td class="label">episode</td>
<td><input name="episode" value="<TMPL_VAR episode>" class="episode"></td>
</tr>
</TMPL_IF>
</table>
<div class="header">content</div>
<!--
<TMPL_IF .allow_update_event>
<button class="edit_content_<TMPL_VAR event_id>" onclick="editEventContent('<TMPL_VAR event_id>');return false;">edit</button>
</TMPL_IF>
-->
<!-- show event content -->
<TMPL_IF read_event>
<table id="show_content_<TMPL_VAR event_id>" <TMPL_IF new_event>style="display:none"</TMPL_IF> >
<tr>
<td class="label">excerpt</td>
<td><TMPL_VAR excerpt><TMPL_VAR user_excerpt></td>
</tr>
<tr>
<td class="label">description</td>
<td>
<img src="<TMPL_VAR image>" style="float:right;padding-left:1em">
<div><TMPL_VAR user_content_prefix></div>
<div><TMPL_VAR html_content escape=0></div>
<div><TMPL_VAR user_content_suffix></div>
</td>
</tr>
</table>
</TMPL_IF>
<!-- <TMPL_UNLESS new_event>style="display:none"</TMPL_UNLESS> -->
<!-- edit event content -->
<table id="edit_content_<TMPL_VAR event_id>" class="edit_event" >
<!--
<TMPL_IF .allow_update_event_user_content>
<tr>
<td colspan="2">
<button class="edit_content_<TMPL_VAR event_id>" onclick="editUserContent('<TMPL_VAR event_id>');return false;">extra content</button>
</td>
</tr>
</TMPL_IF>
-->
<tr>
<td class="label">title</td>
<td>
<TMPL_VAR series_name> -
<TMPL_IF .allow_update_event_content>
<input name="title" value="<TMPL_VAR title>">
<TMPL_ELSE>
<TMPL_VAR title>
</TMPL_IF>
<TMPL_IF .allow_update_event_title_extension>
<input name="user_title" value="<TMPL_VAR user_title>" id="user_title_<TMPL_VAR event_id>">
<TMPL_ELSE>
<TMPL_VAR user_title>
</TMPL_IF>
</td>
</tr>
<tr>
<td class="label">excerpt</td>
<td>
<TMPL_IF .allow_update_event_content>
<textarea name="excerpt" class="excerpt"><TMPL_VAR excerpt></textarea>
<TMPL_ELSE>
<TMPL_VAR excerpt>
</TMPL_IF>
</td>
</tr>
<tr id="user_excerpt_<TMPL_VAR event_id>">
<td class="label">user excerpt</td>
<td>
<TMPL_IF .allow_update_event_user_excerpt_extension>
<textarea class="excerpt" name="user_excerpt" ><TMPL_VAR user_excerpt></textarea>
<TMPL_ELSE>
<TMPL_VAR user_excerpt>
</TMPL_IF>
</td>
</tr>
<tr id="user_content_prefix_<TMPL_VAR event_id>">
<td class="label">current topics</td>
<td class="edit_user_content_prefix">
<TMPL_IF .allow_update_event_user_content>
<textarea name="user_content_prefix"><TMPL_VAR user_content_prefix></textarea>
<TMPL_ELSE>
<TMPL_VAR html_user_content_prefix escape=0>
</TMPL_IF>
</td>
</tr>
<tr>
<td class="label">content</td>
<td class="edit_content">
<TMPL_IF .allow_update_event_topic>
<textarea name="content"><TMPL_VAR content></textarea>
<TMPL_ELSE>
<TMPL_VAR html_content escape=0>
</TMPL_IF>
</td>
</tr>
<!--
<tr id="user_content_suffix_<TMPL_VAR event_id>">
<td class="label">user content</td>
<td class="edit_user_content_suffix">
<TMPL_IF .allow_update_event_user_content>
<textarea name="user_content_suffix"><TMPL_VAR user_content_suffix></textarea>
<TMPL_ELSE>
<TMPL_VAR html_user_content_prefix escape=0>
</TMPL_IF>
</td>
</tr>
-->
<tr>
<td class="label">
image
</td>
<td>
<TMPL_IF .allow_update_event_content>
<button onclick="selectImage(<TMPL_VAR .studio_id>,'image_<TMPL_VAR event_id>','<TMPL_VAR series_name escape=HTML>');return false;"
style="padding:0;"
>
<img id="imagePreview" src="<TMPL_VAR image>">
</button>
<input id="image_<TMPL_VAR event_id>" name="image" value="<TMPL_VAR image>" class="image" style="float:right">
<TMPL_ELSE>
<img src="<TMPL_VAR image>">
</TMPL_IF>
</td>
</tr>
</table>
<table>
<tr>
<td colspan="2">
<div class="buttons" style="text-align:center">
<TMPL_IF show_new_event_from_schedule>
<TMPL_IF .allow_create_event_from_schedule>
<button type="submit" name="action" value="create_event_from_schedule">create</button>
</TMPL_IF>
<TMPL_ELSIF show_new_event>
<TMPL_IF .allow_create_event>
<button type="submit" name="action" value="create_event">create</button>
</TMPL_IF>
<TMPL_ELSE>
<TMPL_IF .allow_update_event>
<input type="submit" name="action" value="save">
</TMPL_IF>
</TMPL_IF>
<TMPL_IF .allow_delete_event>
<TMPL_UNLESS new_event>
<input type="submit" name="action" value="delete"
onclick="commitForm('event_<TMPL_VAR event_id>','delete','delete event');return false;"
>
</TMPL_UNLESS>
</TMPL_IF>
</div>
</td>
</tr>
</table>
</form>
</div>
<TMPL_IF modified_at>
<div class="label right">last modified at <TMPL_VAR modified_at> by <TMPL_VAR modified_by>.</div>
</TMPL_IF>
<div id="selectImage"></div>
</div>
</TMPL_IF>
</body>
</html>

View File

@@ -1,152 +0,0 @@
<TMPL_INCLUDE header.html>
<h1><a href="event_manager.cgi">Sendungen verwalten</a></h1>
<TMPL_INCLUDE menu.html>
<style>
td,th,input {
font-size:10px;
line-height:100%
}
table{
wwidth:1000px;
}
</style>
projects:
<TMPL_LOOP projects>
<TMPL_LOOP months>
<a href="event_manager.cgi?from_date=<TMPL_VAR start>&till_date=<TMPL_VAR end>"><TMPL_VAR title> <TMPL_VAR month_name></a> |
</TMPL_LOOP>
</TMPL_LOOP>
<div id="print_header">
<TMPL_IF event_count><TMPL_VAR event_count> Treffer:</TMPL_IF>
</div>
<TMPL_VAR is_empty>
<div style="text-align:right">
<form action="event_manager.cgi">
<input name="search">
<input type="submit" value="suchen">
</form>
</div>
<table border="1">
<tr>
<th>Progamm</th>
<th>Wochentag</th>
<th>Datum</th>
<th>Start</th>
<th>Ende</th>
<th>Bild</th>
<th>Sendereihe</th>
<th>Titel</th>
<th>Auszug</th>
</tr>
<TMPL_LOOP events>
<tr>
<td>
<TMPL_VAR program>
</td>
<td>
<TMPL_VAR weekday_name>
</td>
<td>
<TMPL_VAR start_date>
</td>
<td style="background-color:<TMPL_IF same_time_alert_old>ffa</TMPL_IF><TMPL_IF same_time_alert_new>faa</TMPL_IF>">
<TMPL_VAR start_time_name>
</td>
<td>
<TMPL_VAR end_time_name>
</td>
<td>
<a href="<TMPL_VAR image>"><img src="<TMPL_VAR image>" width="75" height="75"></a>
</td>
<td>
<TMPL_VAR series_name>
</td>
<td>
<TMPL_VAR title>
</td>
<td>
<TMPL_VAR excerpt >
<a href="#event_<TMPL_VAR event_id>" onclick="showEventComments('<TMPL_VAR event_id>','event_<TMPL_VAR event_id>_comments_container');return false;" >
<p><TMPL_VAR comment_count> Kommentare ,
<a href="#" onclick="toggle('event_<TMPL_VAR event_id>_options');return false;">mehr...</a>
</a>
</td>
</tr>
<tr id="event_<TMPL_VAR event_id>_comments_container" style="display:none">
<td colspan="20">
<div id="event_<TMPL_VAR event_id>_comments">
</div>
</td>
</tr>
<tr id="event_<TMPL_VAR event_id>_options" style="display:none">
<td colspan="20">
<div >
<table>
<tr>
<th colspan=7> </th>
<th>erstellt</th>
<th>ge&auml;ndert</th>
<th>Referenz</th>
<th>ID</th>
<TMPL_IF delete_events>
<th>L&ouml;schen</th>
</TMPL_IF>
</tr>
<tr>
<td colspan=7> </td>
<td>
<TMPL_VAR created_at >
</td>
<td>
<TMPL_VAR modified_at >
</td>
<td>
<TMPL_VAR reference >
</td>
<td>
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR controller_event>/<TMPL_VAR event_id>.html"><TMPL_VAR event_id></a>
</td>
<TMPL_IF delete_event>
<td>
<form action="event_manager.cgi" method="post">
<input type="hidden" name="delete_event" value="<TMPL_VAR event_id>">
<input type="hidden" name="from_date" value="<TMPL_VAR from_date>">
<input type="hidden" name="till_date" value="<TMPL_VAR till_date>">
<input type="submit" value="loeschen">
</form>
</td>
</TMPL_IF>
</td></tr></table>
</div>
</td>
</tr>
</TMPL_LOOP>
</table>

View File

@@ -1,283 +0,0 @@
<script type="text/javascript">
function run(menu_id){
var url=$("#"+menu_id).val();
//alert(url);
if (url!='' && url!='undefined'){
load(url);
}
}
function getParentDiv(elem,type,level){
if (level==null || level=='') level=0;
//alert(level)
if (level>5) return null;
elem=elem.parent();
if (elem=='') return null;
if (elem.is(type)){
//if (elem.parent().parent().attr('id')=='#calcms_admin_menu')
return elem;
//return null;
}
return getParentDiv(elem,type,level+1);
}
$(document).ready(
function() {
if ($('#calcms_admin_menu').length == 0) return;
var menus=new Array("event_submenu","comment_submenu", "pic_submenu", "update_agenda_submenu","system_submenu");
//$("#calcms_admin_menu").height($(document).height());
for (var index in menus){
var menu_id="#"+menus[index];
$(menu_id).hide();
}
/*
$('#calcms_admin_menu li li').hover(
function() {
jQuery(this).stop(true, true).animate({
fontSize: '+=3'
});
}, function() {
jQuery(this).stop(true, true).animate({
fontSize: '-=3'
});
}
);
*/
var url=getController();
url=url.replace("&amp;","&");
//hide menus on index or /admin/
if (url==null || url=='')return;
$("select[id$='_select'] option").each(
function(){
if ($(this).val()==url){
//get option
$(this).attr('selected','true');
// select
var elem=$(this).parent();
if (elem==null)return;
elem.css("opacity","1.0");
//menu
var menu=getParentDiv(elem,'div');
menu.show();
//menu point
elem=getParentDiv(elem,'li');
if (elem!=null)elem.css("opacity","1.0");
}
}
)
$("a[id$='_menupoint']").each(
function(){
if ($(this).attr('href')==url){
//a
$(this).css("opacity","1.0");
//menu
var elem=getParentDiv($(this),'div');
elem.show();
//menu point
elem=getParentDiv($(this),'li');
if (elem!=null)elem.css("opacity","1.0");
}
}
)
}
);
</script>
<!--
<table style="border:0;margin:0;position:absolute;left:-5px;top:118px;;height:100%">
<tr><td>
-->
<center>
<div id="calcms_admin_menu">
<ul>
<li>
<a href="/"><img width="20px" height="20px" src="<TMPL_VAR static_files_url>/style/logo.jpg" alt="Hauptseite"/> </a>
</li>
<li>
<a href="/agenda/programm.html">Programmplan</a>
</li>
<TMPL_IF access_events>
<li>
<a href="#" onclick="toggle('event_submenu');return false;">Sendungen</a>
<div id="event_submenu">
<ul>
<li>
<select id="event_manager_select" onchange="run('event_manager_select')">
<option value="">w&auml;hlen</option>
<TMPL_UNLESS read_event_all>
<TMPL_LOOP projects>
<TMPL_LOOP months>
<option value="event_manager.cgi?from_date=<TMPL_VAR start>&amp;till_date=<TMPL_VAR end>&amp;location=<TMPL_VAR user escape=url>"><TMPL_VAR year>-<TMPL_VAR month> <TMPL_VAR title></option>
</TMPL_LOOP>
</TMPL_LOOP>
<TMPL_ELSE>
<TMPL_LOOP projects>
<TMPL_LOOP months>
<option value="event_manager.cgi?from_date=<TMPL_VAR start>&amp;till_date=<TMPL_VAR end>"><TMPL_VAR year>-<TMPL_VAR month> <TMPL_VAR title></option>
</TMPL_LOOP>
</TMPL_LOOP>
</TMPL_UNLESS>
</select>
</li>
<TMPL_IF create_event>
<li>
<a id="wiki_editor_menupoint" href="wiki_editor.cgi">Editor</a>
</li>
</TMPL_IF>
</ul>
</div>
</li>
</TMPL_IF>
<!-- pic manager -->
<TMPL_IF access_images>
<li>
<a href="#" onclick="toggle('pic_submenu');return false;">Bilder</a><br/>
<div id="pic_submenu">
<ul>
<li>
<select id="pic_manager_select" onchange="run('pic_manager_select')">
<option value="">w&auml;hlen</option>
<TMPL_LOOP projects>
<TMPL_LOOP months>
<option value="image_manager.cgi?from=<TMPL_VAR start>&amp;till=<TMPL_VAR end>"><TMPL_VAR year>-<TMPL_VAR month> <TMPL_VAR title></option>
</TMPL_LOOP>
</TMPL_LOOP>
<option value="image_manager.cgi?search=neu">nicht zugeordnet</option>
<option value="image_manager.cgi">alle</option>
</select>
</li>
<!-- pic upload -->
<TMPL_IF create_image>
<li>
<a id="pic_upload_menupoint" href="image_upload.cgi">neues Bild</a>
</li>
</TMPL_IF>
</ul>
</div>
</li>
</TMPL_IF>
<!-- comment manager -->
<TMPL_IF access_comments>
<li>
<a href="#" onclick="toggle('comment_submenu');return false;">Kommentare</a>
<div id="comment_submenu">
<ul>
<li>Aktualit&auml;t<br/>
<select id="comment_by_age_select" onchange="run('comment_by_age_select')">
<option value="">w&auml;hlen</option>
<option value="comment_manager.cgi?age=1">Stunde </option>
<option value="comment_manager.cgi?age=6">6 Stunden</option>
<option value="comment_manager.cgi?age=24">24 Stunden</option>
<option value="comment_manager.cgi?age=168">Woche</option>
<option value="comment_manager.cgi?age=720">Monat</option>
<option value="comment_manager.cgi?age=2160">3 Monate</option>
<option value="comment_manager.cgi?age=4360">6 Monate</option>
<option value="comment_manager.cgi">alle</option>
</select>
</li>
<li>Sendungen<br/>
<select id="comment_by_date_select" onchange="run('comment_by_date_select')">
<option value="">w&auml;hlen</option>
<TMPL_LOOP projects>
<TMPL_LOOP months>
<option value="comment_manager.cgi?from=<TMPL_VAR start>&amp;till=<TMPL_VAR end>"><TMPL_VAR year>-<TMPL_VAR month> <TMPL_VAR title></option>
</TMPL_LOOP>
</TMPL_LOOP>
</select>
</li>
</ul>
</div>
</li>
</TMPL_IF>
<!-- update agenda -->
<TMPL_IF access_sync>
<li id="update_agenda_menu">
<a href="#" onclick="toggle('update_agenda_submenu');return false;">Synchronisierung</a>
<div id="update_agenda_submenu">
<ul>
<!--
<TMPL_IF sync_all>
<li>
<select id="update_agenda_select" onchange="run('update_agenda_select')">
<option value="">w&auml;hlen</option>
<option value="update_agenda.cgi">ge&auml;ndert</option>
<TMPL_LOOP projects>
<TMPL_LOOP months>
<option value="update_agenda.cgi?update=all&amp;from=<TMPL_VAR start>&amp;till=<TMPL_VAR end>"><TMPL_VAR year>-<TMPL_VAR month> <TMPL_VAR title></option>
</TMPL_LOOP>
</TMPL_LOOP>
<option value="update_agenda.cgi?update=all">alles</option>
</select>
</li>
</TMPL_IF>
-->
<TMPL_IF sync_own>
<li>
<a id="jobs_menupoint" href="jobs.cgi">Jobs</a>
</li>
</TMPL_IF>
</ul>
</div>
</li>
</TMPL_IF>
<!-- admin -->
<TMPL_IF access_system>
<li id="system_menu">
<a href="#" onclick="toggle('system_submenu');return false;">System</a>
<div id="system_submenu">
<ul>
<li>
<a id="clear_cache_menupoint" href="clear_cache.cgi">Cache l&ouml;schen</a>
</li>
<li>
<a id="compress_menupoint" href="compress_templates.cgi">compress templates</a>
<li>
<a id="pic_scan_menupoint" href="pic_scan.cgi">Bilder Update</a>
</li>
<li>
<a id="log_menupoint" href="error_log.cgi">Error-Log</a>
</li>
<li>
<a id="stats_menupoint" href="/webstat">Statistik</a>
</li>
</ul>
</div>
</li>
</TMPL_IF>
<li class="login" >Willkommen, <TMPL_VAR user>!</li>
</ul>
</div>
<!--
</td><td>
-->
<div style="height:3em"></div>
<div id="content">

View File

@@ -1,24 +0,0 @@
<script type="text/javascript">
function set_studio(id){
var url=window.location.href;
url=url.replace(/[\?\&]+studio_id=[0-9]+/g,'');
if (url.indexOf('?')==-1)url+='?';
url+='&studio_id='+id;
url=url.replace(/\&\&+/g,'&');
url=url.replace(/\?\&+/g,'?');
//$('#select_studio').attr('href',url);
//alert(url);
load(url);
}
</script>
<div style="text-align:right">
<select name="studio_id" onchange="set_studio($(this).val())">
<option value="-1">Studio</option>
<TMPL_LOOP studios>
<option value="<TMPL_VAR id>"<TMPL_VAR selected>><TMPL_VAR name></option>
</TMPL_LOOP>
</select>
<TMPL_VAR user> <a href="<TMPL_VAR logout_url>?action=logout">logout</a>
</div>