removed mods directory from the ATutor codebase
[atutor.git] / mods / atutor_opencaps / opencaps / start.php
diff --git a/mods/atutor_opencaps/opencaps/start.php b/mods/atutor_opencaps/opencaps/start.php
deleted file mode 100755 (executable)
index 9f9e2db..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-<?php \r
-/*\r
- * OpenCaps\r
- * http://opencaps.atrc.utoronto.ca\r
- * \r
- * Copyright 2009 Heidi Hazelton\r
- * Adaptive Technology Resource Centre, University of Toronto\r
- * \r
- * Licensed under the Educational Community License (ECL), Version 2.0. \r
- * You may not use this file except in compliance with this License.\r
- * http://www.opensource.org/licenses/ecl2.php\r
- * \r
- */\r
-\r
-define('INCLUDE_PATH', 'include/');\r
-require(INCLUDE_PATH.'vitals.inc.php');\r
-\r
-unset($_SESSION['pid']);\r
-\r
-if (DISABLE_LOCAL && isset($systems[0]['url'])) {\r
-       header("Location:start_remote.php?r=0");\r
-       exit;\r
-} else if (DISABLE_LOCAL) {\r
-       $_SESSION['errors'][] = "Your administrator has disabled local captioning and no remote systems have been configured.";\r
-       include(INCLUDE_PATH.'basic_header.inc.php'); \r
-       include(INCLUDE_PATH.'footer.inc.php'); \r
-       exit;\r
-}\r
-\r
-if (isset($_POST['submit_login'])) {   \r
-       $this_user->login($_POST['login'], $_POST['password']);\r
-} \r
-\r
-//valid post\r
-if (isset($_GET['submit']) && $_GET['submit'] && empty($_POST)) {\r
-       $_SESSION['errors'][] = "Can't create project. If you uploaded a file, it may be too large.";\r
-       \r
-//file size    \r
-} else if (isset($_POST['submit_new']) && ($_FILES["media_file"]["error"] == UPLOAD_ERR_INI_SIZE || $_FILES["media_file"]["error"] == UPLOAD_ERR_FORM_SIZE)) { \r
-    $_SESSION['errors'][] = "Can't create project. If you uploaded a file, it may be too large.";\r
-    \r
-} else if (isset($_POST['submit_new'])) {\r
-       $this_proj = new project();\r
-                               \r
-       //valid URL\r
-       if (isset($_POST['media_url']) && !empty($_POST['media_url']) && $_POST['media_url']!="http://") {\r
-               $this_ext = explode(".", $_POST['media_url']);\r
-               $this_ext = end($this_ext);\r
-               \r
-               if (!file_get_contents($_POST['media_url']) || !in_array($this_ext, $supported_ext) ) {\r
-                       $_SESSION['errors'][] = "Invalid URL. Make sure the URL is correct and that the media file is a supported format.";                     \r
-               } else {\r
-                       $this_proj->createNew($addslashes($_POST['projname']), $_POST['media_url'], $_FILES['caption_file']);\r
-               }\r
-       }\r
-       \r
-       //valid file upload\r
-       else if (!empty($_FILES['media_file'])) {\r
-               $this_ext = explode(".", $_FILES['media_file']['name']);\r
-               $this_ext = end($this_ext);             \r
-       \r
-               if (!in_array($this_ext, $supported_ext) ) {\r
-                       $_SESSION['errors'][] = "Incorrect upload format.";                     \r
-               } else {                                                \r
-                       $pid = $this_proj->createNew($addslashes($_POST['projname']), $_FILES['media_file'], $_FILES['caption_file']);\r
-               }\r
-       } \r
-       \r
-       if (empty($_SESSION['errors'])) \r
-               header("Location:editor.php");\r
-}\r
-\r
-if (intval(ini_get('upload_max_filesize')) < MAX_FILE_SIZE/1048576)\r
-       $max = intval(ini_get('upload_max_filesize'));\r
-else\r
-       $max = MAX_FILE_SIZE/1048576;\r
-\r
-include(INCLUDE_PATH.'basic_header.inc.php'); \r
-\r
-unset($_SESSION['rid']);\r
-\r
-if ($_SESSION['mid'] == "99999")\r
-       unset($_SESSION['mid']);\r
-       \r
-?>\r
-\r
-<script language="JavaScript" src="js/start.js" type="text/javascript"></script>\r
-\r
-<h1 style="margin-top:10px;"><img src="images/logo.png" alt="OpenCaps - a free, online caption editor" title="OpenCaps - a free, online caption editor" style="margin-top:7px;" /></h1>\r
-<p>Start Captioning!</p>\r
-\r
-<div id="start-tabs"></div>\r
-<div id="start-container">     \r
-       <?php if (!$_SESSION['mid'] || !isset($_SESSION['valid_user']) || !$_SESSION['valid_user']) { ?>\r
-       <h2>Login</h2>\r
-\r
-       <p>To start a new captioning project or to return to an ongoing project, please login below. If you are new here, quickly <a href="register.php">register</a> with us!</p>\r
-       \r
-       <form action="start.php" method="post" id="form" >      \r
-               <dl class="col-list" style="width:33%; margin-left:auto; margin-right:auto;">\r
-                       <dt><label for="login">Login:</label></dt> \r
-                               <dd><input name="login" type="text" id="login" value="" /></dd>\r
-                       <dt><label for="pswd">Password:</label></dt> \r
-                               <dd><input name="password" type="password" id="pswd" value="" /></dd>\r
-               </dl>\r
-               <div style="text-align:right">\r
-                       <input type="submit" name="submit_login" value="Submit" class="button" style="width:5em; margin-right:10px;" />\r
-               </div>\r
-       </form>\r
-       <?php } else {?>\r
-       <div>\r
-               <h2 style="font-weight:bold">New Project</h2>\r
-               <p>Begin adding captions to a new video.</p>\r
-               \r
-               <img src="images/asterisk_yellow.png" alt="asterisk" /> <a href="#" onclick="javascript:startNew();" style="margin-top:30px;">Start New Project</a>\r
-               <form action="start.php?submit=1" method="post" id="form_new" enctype="multipart/form-data" onsubmit="javascript: return validateNewForm();">\r
-                       <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo MAX_FILE_SIZE; ?>" />\r
-               \r
-                       <div id="start-entry">\r
-                       \r
-                       <em>Project Name</em><br /> <input type='text' name='projname' style="width:200px;" value="<?php echo $this_proj->name; ?>" /><br /><br />\r
-       \r
-                       <em>Video File</em><br />\r
-                       URL: <input type="text" name="media_url" value="<?php echo isset($_POST['media_url']) ? $_POST['media_url'] : 'http://'; ?>" style="width:200px;" /><br />\r
-                       <strong>or</strong><br />\r
-                       Upload: <input type='file' name='media_file' style="width:250px;" /><br /><br />  \r
-                       <span style="font-size:smaller;">Max upload size: <?php echo $max; ?>Mb.<br /> \r
-                       Supported formats: <?php echo implode(', ', $supported_ext); ?>.</span><br /><br />\r
-                       \r
-                       <em>Caption file (optional)</em><br />\r
-                       <input type="file" name="caption_file" style="width:200px;" /><br />\r
-                       <span style="font-size:smaller;">Supported formats: QTtext, DFXP, SubRip, OpenCaps-JSON.</span>\r
-       \r
-                       <div style='text-align:right;'><input type='submit' class='button' style='width:6em;margin-top:5px;' name='submit_new' value='Submit' /></div>          \r
-                       </div>          \r
-               </form>\r
-               <br style="clear:both" />\r
-       </div>\r
-       <div>\r
-               <h2 style="font-weight:bold">Open Existing Project</h2>\r
-               <p>Continue working on a project.</p>\r
-               <img src="images/asterisk_yellow.png" alt="asterisk" />  <a href="#" onclick="javascript:startOpen();" style="margin-top:30px;">Open Project</a>\r
-       \r
-               <form action="javascript:processOpen();" method="post" id="form_open" enctype="multipart/form-data" onsubmit="javascript: return validateOpenForm();">\r
-                       <div id="open-entry">\r
-                               <div id="projects"></div>                                       \r
-                       </div>\r
-               </form>\r
-       </div>\r
-       <?php } ?>\r
-       <br style="clear:both" />\r
-</div>\r
-\r
-</body>\r
-</html>\r