Advertisement
Guest User

Test

a guest
Oct 22nd, 2015
681
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 10.65 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.   <head>
  4.     <meta charset="utf-8">
  5.     <title>Save Web Files to Dropbox, Google Drive and OneDrive</title>
  6.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.     <meta name="author" content="Amit Agarwal">
  8.     <meta name="description" content="With Save, you can upload web files directly to your Dropbox, Google Drive or One Drive accounts without downloading them to the computer.">
  9.     <link rel="alternate" type="application/rss+xml" title="Digital Inspiration" href="http://feeds.labnol.org/labnol" />
  10.     <link href="http://ctrlq.org/common/css/bootstrap.min.css" rel="stylesheet">
  11.     <link href="http://ctrlq.org/common/css/bootstrap-responsive.min.css" rel="stylesheet">
  12.     <link href='http://fonts.googleapis.com/css?family=Mate+SC' rel='stylesheet' type='text/css'>
  13.     <link rel="shortcut icon" href="http://ctrlq.org/common/ico/favicon.ico">
  14.     <script async type="text/javascript" src="//cdn.fancybar.net/ac/fancybar.js?zoneid=1502&serve=C6ADVKE&placement=ctrlq" id="_fancybar_js"></script>
  15.     <!--[if lt IE 9]>
  16.        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  17.    <![endif]-->
  18.  
  19.     <style type="text/css">
  20.  
  21. .error {
  22.     font-size: 1.2em;
  23.     color: red;
  24.     margin: 1em 1em 2em 1em;
  25. }
  26. .error p {
  27.     margin-bottom: 20px;
  28. }
  29.  
  30. .success {
  31.     color: red;
  32.     font-size: 1.2em;
  33. }
  34. .restrict {
  35.     display: none;
  36. }
  37. .about {
  38.     font-style: normal;
  39. }
  40. body {
  41.     background-color: #3498db;
  42.     padding: 20px 0;
  43.     font-family: arial;
  44. }
  45. .container {
  46.     background-color: #fdfdfd;
  47.     margin: 2em auto;
  48.     padding: 20px 10px 0 10px;
  49.     max-width: 360px;
  50.     border-radius: 5px;
  51. }
  52.  
  53. .form-horizontal .control-group {
  54.     margin-bottom: 24px;
  55.     width: 100%;
  56. }
  57.  
  58. .well {
  59.     padding: 5px 10px;
  60.     border: none;
  61.     background-color: #fdfdfd;
  62.     box-shadow: none;
  63.     -webkit-box-shadow: none;
  64.     margin: 0;
  65. }
  66. h1 {
  67.     font-size: 19px;
  68. }
  69. h2 {
  70.     color: #333;
  71.     font-family: 'Mate SC', serif;
  72.     font-size: 3.5em;
  73.     line-height: 2em;
  74.     font-weight: 400;
  75.     text-align: center;
  76. }
  77. h2 a {
  78.     color: #333;
  79. }
  80. .control-group {
  81.     display: inline-block;
  82.     vertical-align: top;
  83. }
  84. input.dd {
  85.     background-color: #ECF0F1 !important;
  86.     border: 2px solid transparent;
  87.     border-radius: 0px;
  88.     font-size: 15px !important;
  89.     font-weight: 200 !important;
  90.     padding: 10px 5px 10px 10px !important;
  91.     width: 250px;
  92.     transition: border .5s !important;
  93.     margin-right: 1em;
  94. }
  95. input:focus {
  96.     border: 2px solid #3498DB;
  97.     box-shadow: none;
  98. }
  99. .btn {
  100.     border: 2px solid transparent;
  101.     background: #3498DB;
  102.     color: #ffffff;
  103.     padding: 10px 0;
  104.     text-decoration: none;
  105.     text-shadow: none;
  106.     border-radius: 3px;
  107.     box-shadow: none;
  108.     transition: 0.25s;
  109.     width: 42%;
  110.     margin: 0 5px 0 2px;
  111. }
  112. .btn:hover {
  113.     background-color: #2980B9;
  114. }
  115. .help {
  116.     font-family: georgia, arial;
  117.     font-size: 1.2em;
  118.     color: #444;
  119.     line-height: 1.5em;
  120.     padding: 15px;
  121. }
  122. label {
  123.     font-size: 1.2em;
  124.     font-variant: small-caps;
  125.     padding-left: 5px;
  126. }
  127. .social-share {
  128.     display: inline;
  129.     margin-top: 18px;
  130.     padding-right: 20px;
  131. }
  132. .social {
  133.     margin: 2em auto 0;
  134.     width: 160px;
  135. }
  136. .navbar {
  137.     background: #fff;
  138.     box-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
  139. }
  140. #Output {
  141.     height: 4px;
  142.     position: relative;
  143. }
  144. @media (min-width:480px) {
  145.     .form-horizontal .controls {
  146.         margin-left: 120px;
  147.     }
  148. }
  149. .form-horizontal .control-label {
  150.     width: 100px;
  151. }
  152. .social-share {
  153.     margin-top: 18px;
  154.     display: inline;
  155.     padding-right: 20px;
  156. }
  157. .ads {
  158.     margin: 2.5em auto;
  159.     width: 300px;
  160. }
  161. .animate {
  162.     margin: 4em auto;
  163.     width: 300px;
  164. }
  165. .results .btn {
  166.     width: 132px !important;
  167.     display: inline-block;
  168.     font-size: 14px;
  169. }
  170. .platforms {
  171.     margin: 15px 0 0;
  172.     font-size: 10px;
  173.     color: white;
  174.     text-align: center;
  175. }
  176. .platforms a, .platforms a:link {
  177.     color: white;
  178.     text-decoration: none;
  179. }
  180. .modal-body p {
  181.     font-size: 1.1em;
  182.     font-family: georgia;
  183.     line-height: 1.4em;
  184. }
  185. .control-group.signin {
  186.     text-align: center;
  187.     display: block;
  188.     margin: 1em 0 3em;
  189. }
  190.       </style>
  191.  
  192.     </head>
  193.  
  194.     <body>
  195. <center>
  196.         <div id="info" class="modal hide fade">
  197.             <div class="modal-header">
  198.                 <button class="close" data-dismiss="modal">&times;</button>
  199.                 <h1>Save Web Files Instantly to your Online Drives</h1>
  200.             </div>
  201.             <div class="modal-body">
  202.  
  203.             <p>With Save, you can <a href="http://www.labnol.org/internet/download-files-directly/28049/">download any file</a> from the web directly to your <a href="http://www.labnol.org/software/compare-google-drive-skydrive-dropbox/21214/">Dropbox, Google Drive or OneDrive</a> accounts without having to download that file to your computer.</p>
  204. <p>Just enter the file's web address (or URL), pick a cloud service and, within seconds, the file will become available in your online account. The download is from cloud to cloud and therefore much faster.</p>
  205. <p>Save is also useful for mobile users as you can remotely download files, including file types that aren't supported by your mobile phone or tablet, to your mobile devices via Dropbox or Google Drive.</p>
  206.                 <hr>
  207.                  
  208.                  
  209.             </div>
  210.             <div class="modal-footer">
  211.                 <a href="#" class="btn" data-dismiss="modal">Close</a>
  212.             </div>
  213.         </div>
  214.  
  215.         <div class="container">
  216.  
  217.             <h2><a href="/save/">save web files</a></h2>
  218.             <div class="control-group help">You can save any file from the Internet directly to Dropbox, Google Drive, Box or Microsoft OneDrive. There's no need to download the file to your computer and the app works on mobile too..
  219.                 <a href="#info" data-toggle="modal">learn more &rarr;</a>
  220.             </div>
  221.  
  222.  
  223.    
  224.         <script>
  225.  
  226.             function validate(url) {
  227.                var urlregex = /^((ftp|https?)\:\/\/)?[\w-]+(\.[\w-]+)+\.?(\:\d+)?(\/\S*)?$/gi;
  228.                return url.match(urlregex);
  229.             }
  230.  
  231.             function validate2(url) {
  232.                var urlregex = new RegExp("^(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&amp;%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&amp;%\$#\=~_\-]+))*$");
  233.                return urlregex.test(url);
  234.             }
  235.  
  236.             function success() {
  237.                 document.getElementsByTagName("form")[0].innerHTML = "<p class='success'>Your file was successfully uploaded. Would you like to <a href='.'>upload another file</a>?</p>";
  238.             }
  239.  
  240.  
  241.             function showError(msg, url, where) {
  242.                 document.getElementsByTagName("form")[0].innerHTML = "<p class='success'>We were unable to upload the file. Please send the following error message to mubbyashraf@gmail.com for support.<br><br><em>"
  243.                 + msg + " " + where + " " + url + "</em><br><br>Would you like to <a href='.'>try again</a>?</p>";
  244.             }
  245.  
  246.             function logout() {
  247.                 window.location.href = "?logout";
  248.             }
  249.  
  250.             function save() {
  251.                 var url     = document.getElementById("url").value;
  252.                 var where   = document.getElementById("service").value;
  253.                 if (validate(url)) {
  254.                     ga('send', 'event', 'upload', where, url);
  255.                     filepicker.setKey("AVUfw5rVeSkeGAFb7OlNuz");
  256.                     filepicker.exportFile(url, {
  257.                         service: where
  258.                     }, function(FPFile) {
  259.                         success();
  260.                     }, function(FPError) {
  261.                         showError(FPError.message, url, where);
  262.                     });
  263.                 } else {
  264.                     alert("Please enter a valid URL starting with http://");
  265.                 }
  266.             }
  267.         </script>
  268.  
  269.         <form class="form-horizontal well">
  270.  
  271.            
  272.        
  273.  
  274.  
  275.             <div class="control-group">
  276.                 <label class="control-label-new" for="inputURL"> a. enter file url</label>
  277.                 <div class="controls2">
  278.                     <input type="text" id="url" placeholder="e.g., http://img.labnol.org/logo.png" class="input-xlarge" autocorrect="off" spellcheck="false" required type="url" pattern="https?://.+">
  279.                 </div>
  280.             </div>
  281.  
  282.                 <div class="control-group ">
  283.                 <label class="control-label-new" for="inputURL"> b. select destination</label>
  284.                     <div class="controls2 send">
  285.                         <select name="service" id="service" style="width:90%" required>
  286.                           <option value="DROPBOX">Dropbox</option>
  287.                           <option value="GOOGLE_DRIVE">Google Drive</option>
  288.                           <option value="SKYDRIVE">Microsoft OneDrive</option>
  289.                           <option value="BOX">Box.net</option>
  290.                           <option value="EVERNOTE">Evernote</option>
  291.                           <option value="FTP">FTP Server</option>
  292.                         </select>
  293.                     </div>
  294.                 </div>
  295.  
  296.             <div class="control-group">
  297.                     <a href="#" onclick="save();return false;" class="btn btn-inverse"><i class="icon-white icon-upload"></i> Upload File</a>
  298.                     <a href="#" onclick="logout();return false;" class="btn btn-inverse"><i class="icon-white icon-eject"></i> Logout</a>
  299.             </div>
  300.  
  301.         </form>
  302.  
  303.    <h3>
  304. <center>
  305. Help us bring you more features and more amazing apps by donating to PayPal: mubbyashraf@gmail.com
  306. </center>
  307. </h3>
  308.    
  309.  
  310. </div>
  311.  
  312.        
  313.  
  314.        
  315.         <script type="text/javascript" src="//api.filepicker.io/v2/filepicker.js"></script>
  316.         <script src="http://ctrlq.org/common/js/jquery.min.js"></script>
  317.         <script sync src="https://api.filepicker.io/v1/filepicker_debug.js"></script>
  318.         <script src="http://ctrlq.org/common/js/bootstrap.min.js"></script>
  319.         <script src="http://ctrlq.org/common/js/ga.js"></script>
  320.         <script src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=labnol"></script>
  321. </center>
  322.     </body>
  323.  
  324. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement