removed mods directory from the ATutor codebase
[atutor.git] / mods / photo_album / my_comment.php
diff --git a/mods/photo_album/my_comment.php b/mods/photo_album/my_comment.php
deleted file mode 100644 (file)
index 226fb21..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 comment 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_mycomment.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 Mycomment();\r
-\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_comment.tpl.php");\r
-               \r
-       switch ($my->getVariable('mode')){\r
-               case POSTED_NEW:\r
-                       $template->setVariable("TITLE", _AT('pa_title_my_comment_new'));\r
-               break;\r
-               case APPROVED:\r
-                       $template->setVariable("TITLE", _AT('pa_title_my_comment_approved'));\r
-               break;\r
-               case DISAPPROVED:\r
-                       $template->setVariable("TITLE", _AT('pa_title_my_comment_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_comment.php?mode='.POSTED_NEW.SEP.'current_page='.$my->getVariable('current_page'));\r
-       $template->setVariable("LINK_TEXT", _AT('pa_tag_new_comment').' | ');\r
-       $template->parseCurrentBlock("SELECT_PART");\r
-       \r
-       $template->setCurrentBlock("SELECT_PART");\r
-       $template->setVariable("DESTINATION", BASE_PATH.'my_comment.php?mode='.APPROVED.SEP.'current_page='.$my->getVariable('current_page'));\r
-       $template->setVariable("LINK_TEXT", _AT('pa_tag_approved_comment').' | ');\r
-       $template->parseCurrentBlock("SELECT_PART");\r
-       \r
-       $template->setCurrentBlock("SELECT_PART");\r
-       $template->setVariable("DESTINATION", BASE_PATH.'my_comment.php?mode='.DISAPPROVED.SEP.'current_page='.$my->getVariable('current_page'));\r
-       $template->setVariable("LINK_TEXT", _AT('pa_tag_disapproved_comment'));\r
-       $template->parseCurrentBlock("SELECT_PART");\r
-       \r
-       \r
-               \r
-       /* start display comments */\r
-       $comment_array=$my->comment_array;\r
-       for ($i=0; $i<count($comment_array); $i++){\r
-               $template->setCurrentBlock("COMMENT_TABLE_DATA");\r
-               $template->setVariable("CHECK_NAME", "commentId".$i);\r
-               $template->setVariable("CHECK_VALUE", $comment_array[$i]['comment_id']);\r
-               $template->setVariable("COMMENT_TABLE_DATA1", $comment_array[$i]['comment']);\r
-               $img_data=get_single_data(IMAGE, $comment_array[$i]['image_id'], $comment_array[$i]['course_id']);\r
-               $template->setVariable("COMMENT_TABLE_DATA2", _AT('title').": ".$img_data['title']);\r
-               $template->setVariable("COMMENT_TABLE_DATA3", _AT('date').": ".$comment_array[$i]['date']);\r
-               if ($img_data['status']==APPROVED){\r
-                       $template->setVariable("COMMENT_TABLE_DATA4", "<a href=\"".BASE_PATH."view.php?image_id=".$img_data['image_id']."\">"._AT('pa_tag_view_comment_link')."</a>");\r
-               } else {\r
-                       $template->setVariable("COMMENT_TABLE_DATA4", _AT('pa_tag_image_not_approved'));\r
-               }\r
-               $template->parseCurrentBlock("COMMENT_TABLE_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_comment.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_comment.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_comment.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_comment.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_comment.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