removed mods directory from the ATutor codebase
[atutor.git] / mods / photo_album / admin_comment_list.php
diff --git a/mods/photo_album/admin_comment_list.php b/mods/photo_album/admin_comment_list.php
deleted file mode 100644 (file)
index 5ef312c..0000000
+++ /dev/null
@@ -1,173 +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 generates the administrator comment list 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 (AT_INCLUDE_PATH.'vitals.inc.php');\r
-$_custom_css = $_base_path . 'mods/photo_album/module.css'; // use a custom stylesheet\r
-require (AT_INCLUDE_PATH.'header.inc.php');\r
-admin_authenticate(AT_ADMIN_PRIV_PHOTO_ALBUM);\r
-?>\r
-\r
-<?php\r
-require_once ('classes/pa_admin_comment.class.php');\r
-require_once ('HTML/Template/ITX.php');\r
-\r
-$admin=new Pa_Admin_Comment();\r
-\r
-if ($admin->isError()!=true){  //no error found, display the page\r
-       $template=new HTML_Template_ITX("./Template");\r
-       $template->loadTemplateFile("admin_comment_list.tpl.php");\r
-       $template->setVariable("ADMIN_NUMBER_OF_COMMENT", ADMIN_NUMBER_OF_COMMENT);\r
-       $course_name=get_course_title($admin->getVariable('course_id'));        \r
-       switch ($admin->getVariable('mode')){\r
-               case POSTED_NEW:\r
-                       $template->setVariable("TITLE", _AT('pa_title_administrator_new_comment')." (".$course_name.")");\r
-               break;\r
-               case APPROVED:\r
-                       $template->setVariable("TITLE", _AT('pa_title_administrator_approved_comment')." (".$course_name.")");\r
-               break;\r
-               case DISAPPROVED:\r
-                       $template->setVariable("TITLE", _AT('pa_title_administrator_disapproved_comment')." (".$course_name.")");\r
-               break;\r
-       }\r
-       \r
-       $mode=get_config_mode($admin->getVariable('course_id'));\r
-       $template->setVariable("CONFIG_STRING", _AT('pa_tag_config_string'));\r
-       if ($mode==CONFIG_ENABLED){\r
-               $template->setVariable("CONFIG_VALUE", _AT('pa_tag_config_enabled'));\r
-       } else {\r
-               $template->setVariable("CONFIG_VALUE", _AT('pa_tag_config_disabled'));\r
-       }\r
-       \r
-       $template->setCurrentBlock("SELECT_PART");\r
-       $template->setVariable("SELECT_FORM_NAME", "select_form");\r
-       $template->setVariable("SELECT_ACTION", $_SERVER['PHP_SELF']);\r
-       $template->setVariable("SELECT_NAME", "mode");\r
-       $template->setVariable("SELECT_LABEL", _AT('pa_tag_view'));\r
-       \r
-       $template->setCurrentBlock("OPTION_PART");\r
-       $template->setVariable("OPTION_VALUE", POSTED_NEW);\r
-       $template->setVariable("OPTION_STRING", _AT('pa_tag_new_comment'));\r
-       $template->parseCurrentBlock("OPTION_PART");\r
-       \r
-       $template->setCurrentBlock("OPTION_PART");\r
-       $template->setVariable("OPTION_VALUE", APPROVED);\r
-       $template->setVariable("OPTION_STRING", _AT('pa_tag_approved_comment'));\r
-       $template->parseCurrentBlock("OPTION_PART");\r
-       \r
-       $template->setCurrentBlock("OPTION_PART");\r
-       $template->setVariable("OPTION_VALUE", DISAPPROVED);\r
-       $template->setVariable("OPTION_STRING", _AT('pa_tag_disapproved_comment'));\r
-       $template->parseCurrentBlock("OPTION_PART");\r
-       \r
-       $template->setVariable("SELECT_SUBMIT", "select_submit");\r
-       $template->setVariable("SELECT_SUBMIT_VALUE", _AT('pa_tag_go'));\r
-       $template->parseCurrentBlock("SELECT_PART");\r
-       \r
-       $template->setCurrentBlock("COMMENT_TABLE_PART");\r
-       $template->setVariable("COMMENT_TABLE_FORM_NAME", "table_form");\r
-       $action_string=$_SERVER['PHP_SELF']."?mode=".$admin->getVariable('mode')."&amp;current_page=".$admin->getVariable('current_page');\r
-       $template->setVariable("COMMENT_TABLE_ACTION", $action_string);\r
-               \r
-       /* start display comments */\r
-       $comment_array=$admin->comment_array;\r
-       //      print_r($comment_array);\r
-       //exit;\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
-               $template->setVariable("COMMENT_TABLE_DATA2", _AT('login').": ".$comment_array[$i]['login']);           \r
-               $template->setVariable("COMMENT_TABLE_DATA3", _AT('date').": ".$comment_array[$i]['date']);\r
-               $template->setVariable("COMMENT_TABLE_DATA4", "<a href=\"".BASE_PATH."view.php?image_id=".$comment_array[$i]['image_id']."\">"._AT('pa_tag_view_comment_link')."</a>");\r
-               $template->parseCurrentBlock("COMMENT_TABLE_DATA");\r
-       }\r
-       $template->setCurrentBlock("COMMENT_BUTTON");\r
-       $template->setVariable("COMMENT_BUTTON_NAME", "button_disapprove");\r
-       $template->setVariable("COMMENT_BUTTON_VALUE", _AT('pa_button_set_disapproved_comment'));\r
-       $template->parseCurrentBlock("COMMENT_BUTTON");\r
-       \r
-       $template->setCurrentBlock("COMMENT_BUTTON");\r
-       $template->setVariable("COMMENT_BUTTON_NAME", "button_approve");\r
-       $template->setVariable("COMMENT_BUTTON_VALUE", _AT('pa_button_set_approved_comment'));\r
-       $template->parseCurrentBlock("COMMENT_BUTTON");\r
-       \r
-       $template->setCurrentBlock("COMMENT_BUTTON");\r
-       $template->setVariable("COMMENT_BUTTON_NAME", "button_post_new");\r
-       $template->setVariable("COMMENT_BUTTON_VALUE", _AT('pa_button_set_new_comment'));\r
-       $template->parseCurrentBlock("COMMENT_BUTTON");\r
-       \r
-       $template->setVariable("CHECK_ALL_MSG", _AT('pa_tag_check_all_comment'));\r
-       \r
-       $template->parseCurrentBlock("COMMENT_TABLE_PART");\r
-       \r
-       // Display page table \r
-       $page_array=$admin->getVariable('page_array');\r
-       $current=$admin->getVariable('current_page');\r
-       if ($admin->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.'admin_comment_list.php?current_page=1&amp;mode='.$admin->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.'admin_comment_list.php?current_page='.($current-1).SEP.'mode='.$admin->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.'admin_comment_list.php?current_page='.$i.SEP.'mode='.$admin->getVariable('mode').'\'>'.$i.'</a></li>');\r
-                       $template->parseCurrentBlock("B_DATA_PART");\r
-               }\r
-       }\r
-               \r
-       if ($admin->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.'admin_comment_list.php?current_page='.($current+1).SEP.'mode='.$admin->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.'admin_comment_list.php?current_page='.$page_array['last_page'].SEP.'mode='.$admin->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();\r
-       $template->show();\r
-       unset($_SESSION['pa']);\r
-       $_SESSION['pa']['course_id']=$admin->getVariable('course_id');\r
-       $_SESSION['pa']['administrator_mode']=true;\r
-} else {\r
-       $msg->addError('pa_obj_pa_admin_comment');\r
-       redirect('index.php');\r
-}\r
-\r
-?>\r
-<?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>
\ No newline at end of file