Advertisement
Guest User

Untitled

a guest
Jul 31st, 2016
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.04 KB | None | 0 0
  1. <head>
  2. <title> Upload </title>
  3. <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
  4. <link href="/css/fireshell.css" rel="stylesheet" />
  5. <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" />
  6. <link href="https://fonts.googleapis.com/css?family=Merriweather|Domine|Roboto|PT+Sans" rel="stylesheet" type="text/css" />
  7. <link rel="icon" href="http://i.imgur.com/Hm7oHfv.gif" type="image/gif" sizes="16x16">
  8. </head>
  9. <body>
  10.  
  11.  
  12. <nav class="navbar-inverse navbar-default navbar-fixed-top" role="navigation">
  13. <div class="navbar-header"><button class="navbar-toggle" data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" type="button"><span class="sr-only">Toggle navigation</span><i class="fa fa-arrow-circle-down" aria-hidden="true"></i></button><a class="navbar-brand" href="..">Firaga</a></div>
  14.  
  15. <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
  16. <ul class="nav navbar-nav">
  17. <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-home" aria-hidden="true"></i> Menu</a>
  18. <ul class="dropdown-menu">
  19. <li><a href="#"><i class="fa fa-home" aria-hidden="true"></i> Home</a></li>
  20. <li><a href="#"><i class="fa fa-user" aria-hidden="true"></i> My Channel</a></li>
  21. <li><a href="#"><i class="fa fa-history" aria-hidden="true"></i> History</a></li>
  22. <li class="divider"></li>
  23. <li><a href="#"><i class="fa fa-cog" aria-hidden="true"></i> Settings</a></li>
  24. <li><a href="about#helpSection"><i class="fa fa-question-circle" aria-hidden="true"></i> Help</a></li>
  25. </ul>
  26. </li>
  27. </ul>
  28.  
  29. <form class="navbar-form navbar-left" role="search">
  30. <div class="form-group"><input class="form-control" placeholder="search" type="text" /></div>
  31. <button class="btn btn-default" type="submit"><i class="fa fa-search" aria-hidden="true"></i></button></form>
  32.  
  33. <ul class="nav navbar-nav navbar-right">
  34. <li><a href="/upload/">Upload</a></li>
  35. <li class="dropdown"><a class="dropdown-toggle accountDropdown" data-toggle="dropdown" href="#"><i class="fa fa-user" aria-hidden="true"></i> Account</a>
  36. <ul class="dropdown-menu">
  37. <li><a href="#">Bio</a></li>
  38. <li><a href="#">Video Manager</a></li>
  39. <li><a href="#">Notifications</a></li>
  40. <li class="divider"></li>
  41. <li><a href="#">Logout</a></li>
  42. </ul>
  43. </li>
  44. </ul>
  45. </div>
  46. </nav>
  47. //this ends navigation, everything between here needs to be php leading up to the form area
  48. <?php
  49. if($_POST['Submit'] == "Submit")
  50. {
  51. $errorMessage = "";
  52.  
  53. if(empty($_POST['docs']))
  54. {
  55. $errorMessage .= "<li>You can't leave the Video field blank!</li>";
  56. }
  57. if(empty($_POST['title']))
  58. {
  59. $errorMessage .= "<li>You forgot to enter a title!</li>";
  60. }
  61.  
  62. if(empty($_POST['password']))
  63. {
  64. $errorMessage .= "<li>Please enter a password! You'll need it to edit later!</li>";
  65. }
  66. }
  67.  
  68.  
  69.  
  70. $varDocs = $_POST['docs'];
  71. $varTitle = $_POST['title'];
  72. $varDescription = $_POST['description'];
  73. $varUser = $_POST['user'];
  74. $varThumbnail = $_POST['thumbnail'];
  75. $varPassword = $_POST['password'];
  76. $varSubs1 = $_POST['subs1'];
  77. $varLabel1 = $_POST['label1'];
  78. $varSubs2 = $_POST['subs2'];
  79. $varLabel2 = $_POST['label2'];
  80. $varSubs3 = $_POST['subs3'];
  81. $varLabel3 = $_POST['label3'];
  82. $varSubs4 = $_POST['subs4'];
  83. $varLabel4 = $_POST['label4'];
  84. $varSubs5 = $_POST['subs5'];
  85. $varLabel5 = $_POST['label5'];
  86. $varSubs6 = $_POST['subs6'];
  87. $varLabel6 = $_POST['label6'];
  88. $varSubs7 = $_POST['subs7'];
  89. $varLabel7 = $_POST['label7'];
  90. $varSubs8 = $_POST['subs8'];
  91. $varLabel8 = $_POST['label8'];
  92. $varSubs9 = $_POST['subs9'];
  93. $varLabel9 = $_POST['label9'];
  94. $varSubs10 = $_POST['subs10'];
  95. $varLabel10 = $_POST['label10'];
  96.  
  97.  
  98. //don't lose
  99. if(empty($errorMessage))
  100. {
  101. $db = mysql_connect("localhost","taylor","tAyl0r");
  102. if(!$db) die("Error connecting to MySQL database.");
  103. mysql_select_db("taylor_firaga" ,$db);
  104.  
  105. $sql = "INSERT INTO Videos (docs, title, description, user, thumbnail, password, subs1, label1, subs2, label2, subs3, label3, subs4, label4, subs5, label5, subs6, label6, subs7, label7, subs8, label8, subs9, label9, subs10, label10) VALUES (".
  106. PrepSQL($varDocs) . ", " .
  107. PrepSQL($varTitle) . ", " .
  108. PrepSQL($varDescription) . ", " .
  109. PrepSQL($varUser) . ", " .
  110. PrepSQL($varThumbnail) . ", " .
  111. PrepSQL($varPassword) . ", " .
  112. PrepSQL($varSubs1) . ", " .
  113. PrepSQL($varLabel1) . ", " .
  114. PrepSQL($varSubs2) . ", " .
  115. PrepSQL($varLabel2) . ", " .
  116. PrepSQL($varSubs3) . ", " .
  117. PrepSQL($varLabel3) . ", " .
  118. PrepSQL($varSubs4) . ", " .
  119. PrepSQL($varLabel4) . ", " .
  120. PrepSQL($varSubs5) . ", " .
  121. PrepSQL($varLabel5) . ", " .
  122. PrepSQL($varSubs6) . ", " .
  123. PrepSQL($varLabel6) . ", " .
  124. PrepSQL($varSubs7) . ", " .
  125. PrepSQL($varLabel7) . ", " .
  126. PrepSQL($varSubs8) . ", " .
  127. PrepSQL($varLabel8) . ", " .
  128. PrepSQL($varSubs9) . ", " .
  129. PrepSQL($varLabel9) . ", " .
  130. PrepSQL($varSubs10) . ", " .
  131. PrepSQL($varLabel10) . ")";
  132. mysql_query($sql);
  133.  
  134. header("Location: thankyou.html");
  135. exit();
  136. }
  137. }
  138.  
  139. function PrepSQL($value)
  140. {
  141. // Stripslashes
  142. if(get_magic_quotes_gpc())
  143. {
  144. $value = stripslashes($value);
  145. }
  146.  
  147. // Quote
  148. $value = "'" . mysql_real_escape_string($value) . "'";
  149.  
  150. return($value);
  151. }
  152.  
  153. ?>
  154.  
  155.  
  156. //this starts the form area
  157. <div class="container">
  158. <form action="#" method="POST" enctype="multipart/form-data" class="movedown">
  159. Video: <input type="text" name="docs" placeholder="https://docs.google.com/file/d/RANDOMURL/edit" value="<?=$varDocs;?>">
  160. <br>
  161. Title:<input type="text" name="title" placeholder="My video!" value="<?=$varTitle;?>">
  162. <br>
  163. Description: <input type="text" name="description" placeholder="a video about love." value="<?=$varDescription;?>">
  164. <br>
  165. User: <input type="text" name="user" placeholder="Anonymous" value="<?=$varUser;?>">
  166. <br>
  167. Thumbnail: <input type="text" name="thumbnail" placeholder="http://i.imgur.com/FPuHdHq.jpg" value="<?=$varThumbnail;?>">
  168. <br>
  169. Password (for editing video later - stored in plaintext so becareful)
  170. <br>
  171. <input type="text" name="password" placeholder="password1234" value="<?=$varPassword;?>">
  172. <br><br>
  173. Subtitles-
  174. <br>
  175. Subs: <input type="text" name="subs1" placeholder="http://pastebin.com/raw/y2nTydKC"> Label: <input type="text" name="sublabel1" placeholder="English" value="<?=$varSubs1;?>">
  176. <br>
  177. Subs: <input type="text" name="subs2" placeholder="Another subtitle link.vtt"> Label: <input type="text" name="sublabel2" placeholder="Spanish" value="<?=$varSubs2;?>">
  178. <br>
  179. Subs: <input type="text" name="subs3"> Label: <input type="text" name="sublabel3" value="<?=$varSubs3;?>">
  180. <br>
  181. Subs: <input type="text" name="subs4"> Label: <input type="text" name="sublabel4" value="<?=$varSubs4;?>">
  182. <br>
  183. Subs: <input type="text" name="subs5"> Label: <input type="text" name="sublabel5" value="<?=$varSubs5;?>">
  184. <br>
  185. Subs: <input type="text" name="subs6"> Label: <input type="text" name="sublabel6" value="<?=$varSubs6;?>">
  186. <br>
  187. Subs: <input type="text" name="subs7"> Label: <input type="text" name="sublabel7" value="<?=$varSubs7;?>">
  188. <br>
  189. Subs: <input type="text" name="subs8"> Label: <input type="text" name="sublabel8" value="<?=$varSubs8;?>">
  190. <br>
  191. Subs: <input type="text" name="subs9"> Label: <input type="text" name="sublabel9" value="<?=$varSubs9;?>">
  192. <br>
  193. Subs: <input type="text" name="subs10"> Label: <input type="text" name="sublabel10" value="<?=$varSubs10;?>">
  194.  
  195. <br>
  196. <input type="submit" name="submit" value="Submit" class="btn">
  197. </form>
  198. </container>
  199. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  200. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  201. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement