function result = cisc106plot(lab,filename)
%cisc106URL return the URL where a file can be retrieved on the web
%
% consumes:
%     lab: a string containing lab number (e.g. 'lab08')
%     filename: a string with the file to put on the web (e.g. 'myplot.jpg');
%
% produces:
%     result: URL of the plot
%
% notes: (1) this function only works on strauss
%        (2) the userid portion of the result will vary from user
%     to user.  In the sample output, jsample is used as the userid 
%  
%
% examples:
%     >> cisc106plot('lab08','myplot.jpg');
%     ans = 'http://copland.udel.edu/~jsample/cisc106/lab08/myplot.jpg'  
%     >>
%     >> cisc106plot('lab09','temperature.jpg');
%     ans = 'http://copland.udel.edu/~jsample/cisc106/lab09/temperature.jpg'  
%     >>
%
  
  
  mkdirCommand = ['mkdir -p -m 755 ~/public_html/cisc106/' lab];
  system(mkdirCommand);
  
  fullFilename = ['~/public_html/cisc106/' lab '/'  filename];
  print('-djpeg',fullFilename);
  
  chmodCommand = ['chmod -R 755 ~/public_html/cisc106/' lab '/'];
  
  system(chmodCommand);
  
  result =cisc106URL(lab,filename);
  
  return;
  
end