$limit ) { $n_events = $limit; } $pages = (int)ceil($n_events/ZM_WEB_EVENTS_PER_PAGE); if ( $pages > 1 ) { if ( $page ) { if ( $page < 0 ) $page = 1; if ( $page > $pages ) $page = $pages; } } if ( $page ) { $limit_start = (($page-1)*ZM_WEB_EVENTS_PER_PAGE); if ( empty( $limit ) ) { $limit_amount = ZM_WEB_EVENTS_PER_PAGE; } else { $limit_left = $limit - $limit_start; $limit_amount = ($limit_left>ZM_WEB_EVENTS_PER_PAGE)?ZM_WEB_EVENTS_PER_PAGE:$limit_left; } $events_sql .= " limit $limit_start, $limit_amount"; } elseif ( !empty( $limit ) ) { $events_sql .= " limit 0, $limit"; } if ( !($result = mysql_query( $events_sql )) ) die( mysql_error() ); $max_width = 0; $max_height = 0; $archived = false; $unarchived = false; $events = array(); while( $event = mysql_fetch_assoc( $result ) ) { $events[] = $event; $scale = max( reScale( SCALE_BASE, $event['DefaultScale'], ZM_WEB_DEFAULT_SCALE ), SCALE_BASE ); $event_width = reScale( $event['Width'], $scale ); $event_height = reScale( $event['Height'], $scale ); if ( $max_width < $event_width ) $max_width = $event_width; if ( $max_height < $event_height ) $max_height = $event_height; if ( $event['Archived'] ) $archived = true; else $unarchived = true; } mysql_free_result( $result ); ?> function toggleCheck(element,name) { var form = element.form; var checked = element.checked; for (var i = 0; i < form.elements.length; i++) if (form.elements[i].name.indexOf(name) == 0) form.elements[i].checked = checked; form.view_btn.disabled = !checked; form.edit_btn.disabled = !checked; form.archive_btn.disabled = ; form.unarchive_btn.disabled = ; form.export_btn.disabled = !checked; form.delete_btn.disabled = !checked; form.learn_btn.disabled = !checked; form.learn_state.disabled = !checked; } function configureButton(element,name) { var form = element.form; var checked = element.checked; if ( !checked ) { for (var i = 0; i < form.elements.length; i++) { if ( form.elements[i].name.indexOf(name) == 0) { if ( form.elements[i].checked ) { checked = true; break; } } } } if ( !element.checked ) form.toggle_check.checked = false; form.view_btn.disabled = !checked; form.edit_btn.disabled = !checked; form.archive_btn.disabled = (!checked)||; form.unarchive_btn.disabled = (!checked)||; form.export_btn.disabled = !checked; form.delete_btn.disabled = !checked; form.learn_btn.disabled = !checked; form.learn_state.disabled = !checked; } function deleteEvents( form, name ) { var count = 0; for (var i = 0; i < form.elements.length; i++) { if (form.elements[i].name.indexOf(name) == 0) { if ( form.elements[i].checked ) { count++; break; } } } if ( count > 0 ) { if ( confirm( "" ) ) { form.action.value = 'delete'; form.submit(); } } } function editEvents( form, name ) { var eids = new Array(); for (var i = 0; i < form.elements.length; i++) { if (form.elements[i].name.indexOf(name) == 0) { if ( form.elements[i].checked ) { eids[eids.length] = 'eids[]='+form.elements[i].value; } } } var Win = newWindow( '?view=eventdetail&'+eids.join( '&' ), 'zmEventDetail', , ); } function exportEvents( form, name ) { var eids = new Array(); for (var i = 0; i < form.elements.length; i++) { if (form.elements[i].name.indexOf(name) == 0) { if ( form.elements[i].checked ) { eids[eids.length] = 'eids[]='+form.elements[i].value; } } } var Win = newWindow( '?view=export&'+eids.join( '&' ), 'zmExport', , ); } function viewEvents( form, name ) { var events = new Array(); for (var i = 0; i < form.elements.length; i++) { if ( form.elements[i].name.indexOf(name) == 0) { if ( form.elements[i].checked ) { events[events.length] = form.elements[i].value; } } } if ( events.length > 0 ) { eventWindow( '?view=event&eid='+events[0]+'&trms=1&attr1=Id&op1=%3D%5B%5D&val1='+events.join('%2C')+'&page=1&play=1', 'zmEvent', , ); } }
    $pages ) $page = $pages; if ( $page > 1 ) { if ( false && $page > 2 ) { ?> << <    - $pages ) break; $pages_used[$new_page] = true; array_push( $new_pages, $new_page ); } if ( !isset($pages_used[$pages]) ) array_push( $new_pages, $pages ); foreach ( $new_pages as $new_page ) { ?>   > >>  
 
 
>
disabled>
<?= $thumb_data['FrameId'] ?>/<?= $event['MaxScore'] ?> disabled>