2 /*==============================================================
\r
4 ==============================================================
\r
5 Copyright (c) 2006 by Dylan Cheon & Kelvin Wong
\r
6 Institute for Assistive Technology / University of Victoria
\r
7 http://www.canassist.ca/
\r
9 This program is free software. You can redistribute it and/or
\r
10 modify it under the terms of the GNU General Public License
\r
11 as published by the Free Software Foundation.
\r
12 ==============================================================
\r
17 * @desc This file defines all constants
\r
18 * @author Dylan Cheon & Kelvin Wong
\r
19 * @copyright 2006, Institute for Assistive Technology / University of Victoria
\r
20 * @link http://www.canassist.ca/
\r
24 define('ATUTOR_PREFIX', $_base_path);
\r
25 define('BASE_PATH', 'mods/photo_album/');
\r
27 define('ALBUM_IMAGE_STORE', 'photo_album/'); //album images folder
\r
28 define('TEMP_FOLDER_NAME', 'temp/');
\r
30 define('INDEX_PAGE', 1);
\r
31 define('VIEW_PAGE', 2);
\r
34 define('COMMENT', 4);
\r
35 define('CONFIG', 5);
\r
37 define('ADMIN_SHOW_APPROVED', 5);
\r
38 define('ADMIN_SHOW_DISAPPROVED', 6);
\r
39 define('ADMIN_SHOW_NEW', 7);
\r
41 define('POSTED_NEW', 1); //image status is new
\r
42 define('APPROVED', 2); //image status is approved
\r
43 define('DISAPPROVED', 3); //image status is disapproved
\r
45 define('CONFIG_ENABLED', 1);
\r
46 define('CONFIG_DISABLED', 2);
\r
48 define('THUMB_NUMBER_OF_IMAGE',10); //number of images to display in the album image thumbnail
\r
49 define('THUMB_NUMBER_OF_IMAGE_PAGE', 10); //number of page numbers to display in the album image thumbnail
\r
51 define('MYPIC_NUMBER_OF_IMAGE', 10);
\r
52 define('MYPIC_NUMBER_OF_IMAGE_PAGE', 10);
\r
54 define('MYCOMMENT_NUMBER_OF_COMMENT', 10);
\r
55 define('MYCOMMENT_NUMBER_OF_COMMENT_PAGE', 10);
\r
57 define('ADMIN_NUMBER_OF_IMAGE', 10); //number of images to display in the admin/instructor thumbnail
\r
58 define('ADMIN_NUMBER_OF_IMAGE_PAGE', 10); //number of page numbers to display in the admin/instructor thumbnail
\r
60 define('ADMIN_NUMBER_OF_COMMENT', 10);
\r
61 define('ADMIN_NUMBER_OF_COMMENT_PAGE', 10);
\r
63 define('FIRST_PAGE', 1); //first page
\r
64 define('NOT_SET', -1);
\r
65 define('NORMAL_USER', 0);
\r
68 define('ADMIN_PANEL', 1); //admin or instructor is looking at the panel page
\r
69 define('ADMIN_VIEW', 2); //admin or instructor is looking at the view page
\r
70 define('MY_PIC', 3); //the picture owner state
\r
71 define('MY_COMMENT', 4); //the comment owner state
\r
72 define('STUDENT', 5); //normal student user is looking at the view page
\r
75 define('SKINS_PATH', BASE_PATH.'skins/');
\r
76 define('FIRST_PAGE_IMAGE', SKINS_PATH.'pa_first.gif');
\r
77 define('NEXT_IMAGE', SKINS_PATH.'pa_next.gif');
\r
78 define('PRE_IMAGE', SKINS_PATH.'pa_prev.gif');
\r
79 define('LAST_PAGE_IMAGE', SKINS_PATH.'pa_last.gif');
\r
81 define('THUMB_IMAGE_HEIGHT', 130);
\r
82 define('THUMB_IMAGE_WIDTH', 130);
\r
83 define('MAX_IMAGE_WIDTH', 550); //the max image width for view image
\r
84 //define('MAX_IMAGE_HEIGHT', 550); //uncheck this line if you want to set maximum height for view page
\r
85 define('INVALID_ESCAPE', '[!@#^&*+=~`\%\$]'); //invalid escape for image file name
\r
86 define('THUMB_EXT', 'thumb'); //the thumb extention string which will be concatenated to the original image file name
\r
87 define('MAX_FILENAME_LENGTH', 200); //the maximum image filename length
\r
89 define('GO_BACK_TO_THUMBNAIL_ACTION', BASE_PATH.'index.php');
\r
90 define('UPLOAD_ACTION', BASE_PATH.'handler/file_upload.php');
\r
91 define('DELETE_CONFIRM_ACTION', BASE_PATH.'handler/delete_begin.php');
\r
92 define('DELETE_ACTION', BASE_PATH.'handler/delete.php');
\r
93 define('EDIT_ACTION', BASE_PATH.'handler/edit_begin.php');
\r
94 define('ADD_ACTION', BASE_PATH.'handler/add_begin.php');
\r
95 define('STORE_ACTION', BASE_PATH.'handler/store.php');
\r
97 $IMAGE_TYPE=array('image/jpeg', 'image/pjpeg', 'image/png', 'image/bmp', 'image/gif');
\r
99 if (defined('AT_FORCE_GET_FILE') && AT_FORCE_GET_FILE){
\r
100 $get_file=BASE_PATH.'get_pa.php/';
\r
102 $get_file='content/';
\r