<?
function panel_media_content($media_content_data,$virt_status=0)
{     $virt_status=1 ;   $res_quiz=array() ;
      //$result=IO()->doPut_v2(_MAIN_PROTOCOL,_MAIN_DOMAIN,'/','operation=quiz&id='.$quiz_id,'',array('no_log_request'=>0)) ;
      //if ($result['status']==200) $res_quiz=json_decode($result['content'],true);
      ///damp_array($res_quiz,1,-1) ;
    ///
    ///
    ///
    ///
    ///
    ?><input type="hidden" name="media_content[pass_id]" value="<?echo $media_content_data['pass_id']?>"><?

     if (isset($media_content_data['after_auth']))
     {   ?><h3>Доведение контента после авторизации</h3><?
         if ($media_content_data['after_auth']['text']) echo '<div class="media_content">'.$media_content_data['after_auth']['text'].'</div>' ;
         else if ($media_content_data['after_auth']['frame_src']) echo '<iframe class=media_content width=1000 height=300  src="'.$media_content_data['after_auth']['frame_src'].'"></iframe>' ;
         ?><input type="hidden" name="media_content[][<?echo $media_content_data['after_auth']['media_id']?>]" value="<?echo $media_content_data['after_auth']['length']?>"><?
     }

     if (isset($media_content_data['during_systolic']))
     {   ?><h3>Доведение контента во время измерения давления</h3><?
         if ($media_content_data['during_systolic']['text']) echo '<div class="media_content">'.$media_content_data['during_systolic']['text'].'</div>' ;
         else if ($media_content_data['during_systolic']['frame_src']) echo '<iframe class=media_content width=1000 height=300  src="'.$media_content_data['during_systolic']['frame_src'].'"></iframe>' ;
         ?><input type="hidden" name="media_content[][<?echo $media_content_data['during_systolic']['media_id']?>]" value="<?echo $media_content_data['during_systolic']['length']?>"><?
     }

     if (isset($media_content_data['before_sign']))
     {   ?><h3>Доведение контента перед подписью</h3><?
         if ($media_content_data['before_sign']['text']) echo '<div class="media_content">'.$media_content_data['before_sign']['text'].'</div>' ;
         else if ($media_content_data['before_sign']['frame_src']) echo '<iframe class=media_content width=1000 height=300 src="'.$media_content_data['before_sign']['frame_src'].'"></iframe>' ;
         ?><input type="hidden" name="media_content[][<?echo $media_content_data['during_systolic']['media_id']?>]" value="<?echo $media_content_data['during_systolic']['length']?>"><?
     }
     ?><style type="text/css">
          div.media_content{width:500px;height:200px;border:1px solid green;text-align:center;padding:10px;}
          frame.media_content{width:1000px;height:200px;border:1px solid green;text-align:center;padding:10px;}

       </style>
       <script type="text/javascript">
           $j(document).ready(function()
           {   window.frames[0].postMessage({event: 'media-content-shown'});
           }) ;
       </script>
    <?
}

?>
