function get_adjust_disp($titleKey = 'new', $mvd_id = 'new') { global $mvgScriptPath; // $out = ''; if ($mvd_id == 'new' || $mvd_id == 'seq') { global $mvDefaultClipLength; $start_time = isset($this->start_context) ? $this->start_context : seconds2npt(0); $end_time = isset($this->end_context) ? seconds2npt(npt2seconds($this->start_context) + $mvDefaultClipLength) : seconds2npt($mvDefaultClipLength); } else { $mvTitle = new MV_Title($titleKey); if (!$mvTitle->validRequestTitle()) { return wfMsg('mvMVDFormat'); } $start_time = $mvTitle->getStartTime(); $end_time = $mvTitle->getEndTime(); } if ($start_time == "null") { $start_time = '0:00:00'; } /* * @@todo move some of this to CSS */ $mvd_id = htmlspecialchars($mvd_id); $mvgScriptPath = htmlspecialchars($mvgScriptPath); $out .= '<br /><div class="inOutSlider"></div><br />'; $out .= '<span style="float:left;"><label class="mv_css_form" for="mv_start_hr_' . $mvd_id . '"><i>' . wfMsg('mv_start_desc') . ':</i></label> ' . '<input class="mv_adj_hr" size="8" maxlength="8" value="' . htmlspecialchars($start_time) . '" id="mv_start_hr_' . $mvd_id . '" name="mv_start_hr_' . $mvd_id . '">' . '</span>'; $out .= '<span style="float:left;"><label class="mv_css_form" for="mv_end_hr_' . $mvd_id . '"><i>' . wfMsg('mv_end_desc') . ':</i></label> ' . '<input class="mv_adj_hr" size="8" maxlength="8" value="' . htmlspecialchars($end_time) . '" id="mv_end_hr_' . $mvd_id . '" name="mv_end_hr_' . $mvd_id . '">' . '</span>'; // output page text (if not "new") // if($mvd_id!='new') // $out.=$this->get_fd_mvd_request( $titleKey, $mvd_id); /*$out.='<table width="100%">'. '<tr><td>'.wfMsg('mv_start_desc').'</td>'. '<td><input name="mv_start_hr_'.$mvd_id.'" type="text" value=""></td>'. '</tr><tr>'. '<input type="text" value=""><br /> */ // clear any floats: $out .= '<div style="clear:both"></div>'; // $out.='</form>'; return $out; }
function get_adjust_disp($titleKey = 'new', $mvd_id = 'new', $disp_buttons = true) { global $mvgScriptPath; // $out = ''; //some good old fashioned variable overloading: if ($mvd_id == 'new' || $mvd_id == 'seq') { global $mvDefaultClipLength; //$out.='start context: ' .$this->start_context . '<br />'; //$out.='end context: ' .$this->end_context . '<br />'; $start_time = isset($this->start_context) ? $this->start_context : seconds2ntp(0); $end_time = isset($this->end_context) ? seconds2ntp(ntp2seconds($this->start_context) + $mvDefaultClipLength) : seconds2ntp($mvDefaultClipLength); //$mvd_type = ''; } else { $mvTitle = new MV_Title($titleKey); if (!$mvTitle->validRequestTitle()) { return wfMsg('mvMVDFormat'); } $start_time = $mvTitle->getStartTime(); $end_time = $mvTitle->getEndTime(); //$mvd_type = $mvTitle->getMvdTypeKey(); } /* * @@todo move some of this to CSS */ $out .= ' <span id="mv_adjust_msg_' . $mvd_id . '"></span> <table style="background:transparent;position:relative" width="94%" border="0"><tr><td width="40"> <span id="track_time_start_' . $mvd_id . '" style="font-size:small">0:00:00</span> </td><td>' . '<div id="container_track_' . $mvd_id . '" style="width:100%; height: 5px; background-color: rgb(170, 170, 170); border:1px solid black; position: relative">'; //add some overlays to make the track look like it ends/starts at 0+-7px $out .= '<div style="position:absolute;left:0px;width:7px;height: 5px;background-color: white;border-right:1px solid black;"></div>' . '<div style="position:absolute;right:0px;width:7px;height: 5px;background-color: white;border-left:1px solid black;"></div>'; //the reszie div structure: $out .= '<div id="resize_' . $mvd_id . '" style="height: 20px; position: absolute;"> <div id="handle1_' . $mvd_id . '" style="background:no-repeat url(\'' . $mvgScriptPath . '/skins/images/slider_handle_green.gif\')"; class="ui-resizable-w ui-resizable-handle"></div> <div id="handle2_' . $mvd_id . '" style="background:no-repeat url(\'' . $mvgScriptPath . '/skins/images/slider_handle_red.gif\')"; class="ui-resizable-e ui-resizable-handle"></div> <div id="dragSpan_' . $mvd_id . '" class="ui-dragSpan"></div> </div> </div>' . '</td><td width="50"> <span id="track_time_end_' . $mvd_id . '" style="font-size:small">0:00:00</span> </td></tr></table> <br />'; //output a dummy form /*$out.='<form class="mv_css_form" id="mvd_adj_form_'.$mvd_id.'" method="GET" action="" ' . 'onSubmit="mv_adjust_submit(\''.$mvd_id.'\');return false;">';*/ $out .= '<span style="float:left;"><label class="mv_css_form" for="mv_start_hr_' . $mvd_id . '"><i>' . wfMsg('mv_start_desc') . ':</i></label> ' . '<input class="mv_adj_hr" size="8" maxlength="8" value="' . $start_time . '" id="mv_start_hr_' . $mvd_id . '" name="mv_start_hr_' . $mvd_id . '">' . '</span>'; $out .= '<span style="float:left;"><label class="mv_css_form" for="mv_end_hr_' . $mvd_id . '"><i>' . wfMsg('mv_end_desc') . ':</i></label> ' . '<input class="mv_adj_hr" size="8" maxlength="8" value="' . $end_time . '" id="mv_end_hr_' . $mvd_id . '" name="mv_end_hr_' . $mvd_id . '">' . '</span>'; //output page text (if not "new") //if($mvd_id!='new') // $out.=$this->get_fd_mvd_request( $titleKey, $mvd_id); /*$out.='<table width="100%">'. '<tr><td>'.wfMsg('mv_start_desc').'</td>'. '<td><input name="mv_start_hr_'.$mvd_id.'" type="text" value=""></td>'. '</tr><tr>'. '<input type="text" value=""><br /> */ //clear any floats: $out .= '<div style="clear:both"></div>'; //not used now that adjust is integrated with edit: /*if($disp_buttons){ $out.='<input style="font-weight:bold;" type="submit" value="'.wfMsg('mv_adjust_submit').'"> '; $out.='<input id="mv_adjust_preview_'.$mvd_id.'" type="button" value="'.wfMsg('mv_adjust_preview').'" onClick="mv_adjust_preview(\''.$mvd_id.'\')"> '; $out.='<input type="hidden" id="mv_adjust_preview_stop_'.$mvd_id.'" value="'.wfMsg('mv_adjust_preview_stop').'">'; $out.= '<a href="javascript:mv_disp_mvd(\''.$titleKey. '\',\''. $mvd_id.'\');return false;">' . wfMsgExt('cancel', array('parseinline')).'</a>'; }*/ //$out.='</form>'; return $out; }