8ef685ab3f11f63fc93fbc7125794c95c05262d0
[atutor.git] / mods / atutor_opencaps / opencaps / settings.php
1 <?php 
2 /*
3  * OpenCaps
4  * http://opencaps.atrc.utoronto.ca
5  * 
6  * Copyright 2009 Heidi Hazelton
7  * Adaptive Technology Resource Centre, University of Toronto
8  * 
9  * Licensed under the Educational Community License (ECL), Version 2.0. 
10  * You may not use this file except in compliance with this License.
11  * http://www.opensource.org/licenses/ecl2.php
12  * 
13  */
14
15 define('INCLUDE_PATH', 'include/');
16 require(INCLUDE_PATH.'vitals.inc.php');
17
18 if (isset($_POST['submit-name'])) {
19         $this_proj->editName($_POST['name']);
20 } if (isset($_POST['submit-caps'])) {
21         $this_proj->importCaptions($_FILES['caption_file']);
22 }
23
24
25 require(INCLUDE_PATH.'header.inc.php'); 
26
27 ?>
28
29 <script language="javascript" type="text/javascript" src="js/settings.js"></script>
30
31 <div id="content">
32
33         <h3>Project Settings</h3>
34         <p>Edit your project's settings here.</p>
35         
36         <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" id="form" enctype="multipart/form-data">
37
38                 <h4>Project Name</h4>
39                 <p><?php echo $this_proj->name; ?> 
40                 <?php if (!isset($_SESSION['rid'])) { ?> (<a href="#" onclick="javascript:hide_all();$('#edit-name').show();">Edit</a>)</p> <?php } ?>
41                  
42                 <div id="edit-name">
43                         New project name: <input type="input" name="name" value="" /> <input type="submit" class='button' style='width:6em;' name="submit-name" value="Submit" />
44                 </div>
45                 
46                 <h4>Captions</h4> 
47                 <p><a href="#" onclick="javascript:hide_all();$('#edit-caps').show();">Import caption file</a></p>
48                 
49                 <div id="edit-caps">
50                         <p>Uploading a new caption file will delete all existing captions. Make sure to backup your project (<a href="export.php">Export</a> Json file) before doing this.</p>
51                         Caption File: <input type="file" name="caption_file" /> <input type="submit" name="submit-caps" class='button' style='width:6em;' value="Submit" />
52                 </div>
53         
54                 <!-- h4>Media File</h4> 
55                 <p><?php if (substr($this_proj->media_loc,0, 7) == "http://") echo $this_proj->media_loc; else echo end(explode("/", $this_proj->media_loc)); ?> (<a href="#" onclick="javascript:hide_all();$('#edit-media').show();">Edit</a>)</p -->
56                 
57                 <div id="edit-media">
58                         <p>Coming soon.<br />
59                         Upload a new version of your media. The duration of the new media file must match that of the existing media.</p>
60                         <!--  input type="file" name="media_file" /> <input type="submit" name="submit-media" class='button' style='width:6em;' value="Submit" / -->                    
61                 </div>
62                         
63                 <!-- h4>Permissions</h4> 
64                 
65                 <p>People who can edit this project: You (<a href="#" onclick="javascript:hide_all();$('#edit-perms').show();">Edit</a>) </p>
66                 
67                 <div id="edit-perms">
68                         <p>Coming soon.<br />
69                         Permissions will allow for collaborative editing by letting you give other users access to your project.</p>
70                         
71                         <select name="collab" size="4" multiple="multiple">
72                         </select>
73                         <input type="submit" name="submit-perms" class='button' style='width:6em;' value="Submit" />    
74                 </div -->
75                 
76         
77         </form>
78 </div>
79 <?php require(INCLUDE_PATH.'footer.inc.php'); ?>