Advertisement
Guest User

Untitled

a guest
Sep 1st, 2010
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.16 KB | None | 0 0
  1. {
  2.         if( !(isset($args['ref']))) return "<span style='color:red;'>@reference missing</span>";
  3.         if( !(isset($args['start']))) return "<span style='color:red;'>@start missing</span>";
  4.         if( !(isset($args['end']))) return "<span style='color:red;'>@end missing</span>";
  5.         $ref=trim($args['ref']);
  6.         if(strlen($ref)==0)  return "<span style='color:red;'>bad @reference</span>";
  7.         $start=(int)trim(str_replace(',','',$args['start']));
  8.         $end=(int)trim(str_replace(',','',$args['end']));
  9.         if(!is_int($start)) return      "<span style='color:red;'>bad @start</span>";
  10.         if(!is_int($end)) return        "<span style='color:red;'>bad @end</span>";
  11.         $url="http://www.myip.com/cgi-bin/gbrowse/buildname/?name=".
  12.                 $ref."%3A".$start."..".$end;
  13.  
  14.         $html=  "<div style='text-align:center;margin:10pt;'>".
  15.                 "<a href='".$url."' target='_blank'>".$chrom.":".$start."-".$end."</a><br/>".
  16.                 "<iframe height='".(isset($args['height'])?$args['height']:"500px")."' width='90%' src ='".$url."' />".
  17.                 "</iframe></div>"
  18.                 ;
  19.         return $html;
  20.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement