removed mods directory from the ATutor codebase
[atutor.git] / mods / photo_album / my_photo.php
diff --git a/mods/photo_album/my_photo.php b/mods/photo_album/my_photo.php
deleted file mode 100644 (file)
index c629994..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-<?php\r
-/*==============================================================\r
-  Photo Album\r
- ==============================================================\r
-  Copyright (c) 2006 by Dylan Cheon & Kelvin Wong\r
-  Institute for Assistive Technology / University of Victoria\r
-  http://www.canassist.ca/                                    \r
-                                                               \r
-  This program is free software. You can redistribute it and/or\r
-  modify it under the terms of the GNU General Public License  \r
-  as published by the Free Software Foundation.                \r
- ==============================================================\r
- */\r
-// $Id:\r
-\r
-/**\r
- * @desc       This file displays the my photo page\r
- * @author     Dylan Cheon & Kelvin Wong\r
- * @copyright  2006, Institute for Assistive Technology / University of Victoria \r
- * @link       http://www.canassist.ca/                                    \r
- * @license GNU\r
- */\r
-\r
-define('AT_INCLUDE_PATH', '../../include/');\r
-require_once(AT_INCLUDE_PATH.'vitals.inc.php');\r
-$_custom_css = $_base_path . 'mods/photo_album/module.css'; // use a custom stylesheet\r
-require_once (AT_INCLUDE_PATH.'header.inc.php');\r
-?>\r
-\r
-<?php\r
-require_once ('define.php');\r
-require_once ('classes/pa_mypic.class.php');\r
-require_once ('include/general_func.php');\r
-require_once ('HTML/Template/ITX.php');\r
-\r
-if ($_SESSION['enroll']!=true){\r
-       $msg->addError('pa_var_unauthorized');\r
-       redirect('index.php');\r
-}\r
-$my=new Mypic();\r
-if ($my->isError()!=true){     //no error is occured\r
-       $course_id=$_SESSION['pa']['course_id'];        //store course_id temporarily\r
-       unset($_SESSION['pa']);                                         //clear pa session variables\r
-       $_SESSION['pa']['course_id']=$course_id;\r
-       $_SESSION['pa']['my_pic_mode']=true;\r
-       \r
-       $template=new HTML_Template_ITX("./Template");\r
-       $template->loadTemplateFile("my_photo.tpl.php");\r
-       \r
-       switch ($my->getVariable('mode')){\r
-               case POSTED_NEW:\r
-                       $template->setVariable("TITLE", _AT('pa_title_my_photo_new'));\r
-               break;\r
-               case APPROVED:\r
-                       $template->setVariable("TITLE", _AT('pa_title_my_photo_approved'));\r
-               break;\r
-               case DISAPPROVED:\r
-                       $template->setVariable("TITLE", _AT('pa_title_my_photo_disapproved'));\r
-               break;\r
-       }\r
-       \r
-       $template->setVariable("MAIN_URL", BASE_PATH.'index.php');\r
-       $template->setVariable("MAIN_TITLE", _AT('pa_tag_course_photo_alt'));\r
-       \r
-       $template->setVariable("MY_PHOTO_URL", BASE_PATH.'my_photo.php');\r
-       $template->setVariable("MY_PHOTO_TITLE", _AT('pa_tag_my_photo_alt'));\r
-       \r
-       $template->setVariable("MY_COMMENT_URL", BASE_PATH.'my_comment.php');\r
-       $template->setVariable("MY_COMMENT_TITLE", _AT('pa_tag_my_comment_alt'));\r
-       \r
-       \r
-       $template->setCurrentBlock("SELECT_PART");\r
-       $template->setVariable("DESTINATION", BASE_PATH.'my_photo.php?mode='.POSTED_NEW.SEP.'current_page='.$my->getVariable('current_page'));\r
-       $template->setVariable("LINK_TEXT", _AT('pa_tag_new_pic').' | ');\r
-       $template->parseCurrentBlock("SELECT_PART");\r
-       \r
-       $template->setCurrentBlock("SELECT_PART");\r
-       $template->setVariable("DESTINATION", BASE_PATH.'my_photo.php?mode='.APPROVED.SEP.'current_page='.$my->getVariable('current_page'));\r
-       $template->setVariable("LINK_TEXT", _AT('pa_tag_approved_pic').' | ');\r
-       $template->parseCurrentBlock("SELECT_PART");\r
-       \r
-       $template->setCurrentBlock("SELECT_PART");\r
-       $template->setVariable("DESTINATION", BASE_PATH.'my_photo.php?mode='.DISAPPROVED.SEP.'current_page='.$my->getVariable('current_page'));\r
-       $template->setVariable("LINK_TEXT", _AT('pa_tag_disapproved_pic'));\r
-       $template->parseCurrentBlock("SELECT_PART");\r
-       \r
-       \r
-               \r
-       /* start display images */\r
-       $image_array=$my->image_array;\r
-       for ($i=0; $i<count($image_array); $i++){\r
-               $template->setCurrentBlock("IMAGE_DATA");\r
-               $template->setVariable("CHECK_NAME", "imageId".$i);\r
-               $template->setVariable("CHECK_VALUE", $image_array[$i]['image_id']);\r
-               $img_src=$get_file.$image_array[$i]['location'].urlencode($image_array[$i]['thumb_image_name']);\r
-               $template->setVariable("IMAGE_DATA1", $image_array[$i]['title']);\r
-               $template->setVariable("IMAGE_DATA2", "<img src=\"".$img_src."\" alt=\"".$image_array[$i]['alt']."\"/>");\r
-               $template->setVariable("IMAGE_DATA3", _AT('date').": ".$image_array[$i]['date']);\r
-       \r
-               $template->setVariable("FORM_NAME", "edit_button");\r
-               $template->setVariable("ACTION", UPLOAD_ACTION);\r
-               $template->setVariable("CHOOSE_VALUE", IMAGE);\r
-               $template->setVariable("IMAGE_ID", $image_array[$i]['image_id']);\r
-               $template->setVariable("EDIT_VALUE", _AT('pa_button_edit_image'));\r
-               $template->parseCurrentBlock("IMAGE_DATA");\r
-       }\r
-       \r
-       // Display page table \r
-       $page_array=$my->getVariable('page_array');\r
-       $current=$my->getVariable('current_page');\r
-       $template->setCurrentBlock("PAGE_TABLE_PART");\r
-       if ($my->getVariable('show_page_left_buttons')==true){\r
-               $first_button=_AT('pa_tag_first_page_button');\r
-               $previous_button=_AT('pa_tag_previous_page_button');\r
-               $template->setCurrentBlock("B_DATA_PART");\r
-               $template->setVariable("B_DATA", '<li><a href=\''.BASE_PATH.'my_photo.php?current_page=1&amp;mode='.$my->getVariable('mode').'\'><img src=\''.FIRST_PAGE_IMAGE.'\' alt=\''.$first_button.'\' width=\'30\' height=\'20\'/></a></li>');\r
-               $template->parseCurrentBlock("B_DATA_PART");\r
-               $template->setCurrentBlock("B_DATA_PART");\r
-               $template->setVariable("B_DATA", '<li><a href=\''.BASE_PATH.'my_photo.php?current_page='.($current-1).SEP.'mode='.$my->getVariable('mode').'\'><img src=\''.PRE_IMAGE.'\' alt=\''.$previous_button.'\' width=\'30\' height=\'20\'/></a></li>');\r
-               $template->parseCurrentBlock("B_DATA_PART");\r
-       }\r
-       \r
-       for ($i=$page_array['start']; $i<=$page_array['end']; $i++){\r
-               if ($i==$current){\r
-                       $template->setCurrentBlock("B_DATA_PART");\r
-                       $template->setVariable("B_DATA", '<li class=\'current\'>'.$i.'</li>');\r
-                       $template->parseCurrentBlock("B_DATA_PART");\r
-               } else {\r
-                       $template->setCurrentBlock("B_DATA_PART");\r
-                       $template->setVariable("B_DATA", '<li><a href=\''.BASE_PATH.'my_photo.php?current_page='.$i.SEP.'mode='.$my->getVariable('mode').'\'>'.$i.'</a></li>');\r
-                       $template->parseCurrentBlock("B_DATA_PART");\r
-               }\r
-       }\r
-               \r
-       if ($my->getVariable('show_page_right_buttons')==true){\r
-               $next_button=_AT('pa_tag_next_page_button');\r
-               $last_button=_AT('pa_tag_last_page_button');\r
-               $template->setCurrentBlock("B_DATA_PART");\r
-               $template->setVariable("B_DATA", '<li><a href=\''.BASE_PATH.'my_photo.php?current_page='.($current+1).SEP.'mode='.$my->getVariable('mode').'\'><img src=\''.NEXT_IMAGE.'\' alt=\''.$next_button.'\' width=\'30\' height=\'20\'/></a></li>');\r
-               $template->parseCurrentBlock("B_DATA_PART");\r
-               $template->setCurrentBlock("B_DATA_PART");\r
-               $template->setVariable("B_DATA", '<li><a href=\''.BASE_PATH.'my_photo.php?current_page='.$page_array['last_page'].SEP.'mode='.$my->getVariable('mode').'\'><img src=\''.LAST_PAGE_IMAGE.'\' alt=\''.$last_button.'\' width=\'30\' height=\'20\'/></a></li>');\r
-               $template->parseCurrentBlock("B_DATA_PART");\r
-       }\r
-               \r
-       $template->parseCurrentBlock("PAGE_TABLE_PART");\r
-       $template->parseCurrentBlock();\r
-       $template->show();\r
-} else {\r
-       $msg->addError('pa_obj_mypic');\r
-       redirect('index.php');\r
-}\r
-\r
-?>\r
-\r
-<?php require_once(AT_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file