2 /****************************************************************/
4 /****************************************************************/
5 /* Copyright (c) 2002-2005 by Greg Gay */
6 /* Adaptive Technology Resource Centre / University of Toronto */
9 /* This program is free software. You can redistribute it and/or*/
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /****************************************************************/
13 // $Id: index.php 5123 2005-07-12 14:59:03Z greg$
14 $_user_location = 'public';
16 define('AT_INCLUDE_PATH', '../../include/');
17 require (AT_INCLUDE_PATH.'vitals.inc.php');
19 $_POST['textin'] = $addslashes(stripslashes($_POST['textin']));
20 $_POST['add'] = $addslashes(stripslashes($_POST['add']));
21 $_POST['type'] = $addslashes(stripslashes($_POST['type']));
22 $_POST['page'] = $addslashes(stripslashes($_POST['page']));
23 $_POST['popup'] = $addslashes(stripslashes($_POST['popup']));
24 $_POST['download'] = $addslashes(stripslashes($_POST['download']));
25 $_POST['read'] = $addslashes(stripslashes($_POST['read']));
26 $_POST['save'] = $addslashes(stripslashes($_POST['save']));
27 $_POST['file_type'] = $addslashes(stripslashes($_POST['file_type']));
28 $_POST['volumn'] = $addslashes(stripslashes($_POST['volumn']));
29 $_POST['duration'] = $addslashes(stripslashes($_POST['duration']));
30 $_POST['filename'] = $addslashes(stripslashes($_POST['filename']));
33 $_POST['export'] = $addslashes(stripslashes($_POST['export']));
34 $_POST['language'] = $addslashes(stripslashes($_POST['language']));
35 $_POST['speaker'] = $addslashes(stripslashes($_POST['speaker']));
36 $_POST['base'] = $addslashes(stripslashes($_POST['base']));
37 $_POST['middle'] = $addslashes(stripslashes($_POST['middle']));
38 $_POST['range'] = $addslashes(stripslashes($_POST['range']));
39 $_POST['rate'] = $addslashes(stripslashes($_POST['rate']));
42 require_once(AT_INCLUDE_PATH.'../mods/atalker/atalkerlib.inc.php');
44 $_pages['mods/atalker/index.php']['title_var'] = _AT('atalker');
46 $tabs = get_atalker_tabs();
47 $num_tabs = count($tabs);
48 if ($_REQUEST['tab']) {
49 $tab = $_REQUEST['tab'];
53 // when ATalker reader is submitted check to see if the require fields have content, then get the approriate reader
54 if($_POST['type'] && trim($_POST['textin']) == '' && !$_POST['create']){
55 $error = 'TTS_NO_TEXTIN';
56 $msg->addError($error);
58 }else if ($_POST['type'] == "text"){
59 require(AT_INCLUDE_PATH.'../mods/atalker/text_reader.php');
61 }else if ($_POST['type'] == "sable"){
62 require(AT_INCLUDE_PATH.'../mods/atalker/sable_reader.php');
67 require (AT_INCLUDE_PATH.'header.inc.php');
68 require ('reader.html.php');
70 require (AT_INCLUDE_PATH.'footer.inc.php');