From d0b9df6c6392dadaa3abc52d23efcf37c90afd4c Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Wed, 26 Apr 2017 10:34:58 +0000 Subject: [PATCH] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- main/admin/access_url_add_users_to_url.php | 16 +- main/admin/access_url_edit.php | 16 +- main/admin/add_sessions_to_usergroup.php | 36 +-- main/admin/event_type.php | 4 +- main/admin/settings.php | 4 +- main/admin/statistics.php | 4 +- .../admin/teachers_time_by_session_report.php | 12 +- main/admin/update_schema.php | 2 +- main/auth/set_temp_password.php | 2 +- main/cron/document/index_all_docs.php | 4 +- main/document/exit_pixlr.php | 6 +- main/exercise/question_pool.php | 42 ++-- main/gradebook/lib/fe/resulttable.class.php | 28 +-- .../lib/fe/scoredisplayform.class.php | 50 ++-- main/gradebook/lib/fe/userform.class.php | 16 +- .../lib/results_data_generator.class.php | 22 +- main/gradebook/lib/scoredisplay.class.php | 36 +-- main/inc/lib/app_view.php | 6 +- main/inc/lib/message.lib.php | 234 +++++++++--------- main/reports/reports.php | 40 +-- main/session/session_category_edit.php | 192 +++++++------- main/session/session_edit.php | 14 +- main/upload/form.document.php | 6 +- 23 files changed, 396 insertions(+), 396 deletions(-) diff --git a/main/admin/access_url_add_users_to_url.php b/main/admin/access_url_add_users_to_url.php index 99f5ee3f04..4fa1241ea2 100755 --- a/main/admin/access_url_add_users_to_url.php +++ b/main/admin/access_url_add_users_to_url.php @@ -30,8 +30,8 @@ $tbl_user = Database::get_main_table(TABLE_MAIN_USER); /* Header */ $tool_name = get_lang('AddUsersToURL'); -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); -$interbreadcrumb[] = array ('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs')); +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); +$interbreadcrumb[] = array('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs')); Display :: display_header($tool_name); @@ -46,8 +46,8 @@ api_display_tool_title($tool_name); if ($_POST['form_sent']) { $form_sent = $_POST['form_sent']; - $users = is_array($_POST['user_list']) ? $_POST['user_list'] : array() ; - $url_list = is_array($_POST['url_list']) ? $_POST['url_list'] : array() ; + $users = is_array($_POST['user_list']) ? $_POST['user_list'] : array(); + $url_list = is_array($_POST['url_list']) ? $_POST['url_list'] : array(); $first_letter_user = $_POST['first_letter_user']; foreach ($users as $key => $value) { $users[$key] = intval($value); @@ -70,7 +70,7 @@ if (empty($first_letter_user)) { $sql = "SELECT count(*) as nb_users FROM $tbl_user"; $result = Database::query($sql); $num_row = Database::fetch_array($result); - if ($num_row['nb_users']>1000) { + if ($num_row['nb_users'] > 1000) { //if there are too much users to gracefully handle with the HTML select list, // assign a default filter on users names $first_letter_user = 'A'; @@ -101,7 +101,7 @@ unset($result);

- + -
> +> '.$data['name'].': '.$tool_name.''; echo Display::input('hidden', 'id', $id); @@ -191,7 +191,7 @@ if (!empty($errorMsg)) { : - + : @@ -210,7 +210,7 @@ if (!empty($errorMsg)) {
@@ -218,7 +218,7 @@ if (!empty($errorMsg)) { } else { ?>
- 'width:360px', 'multiple'=>'multiple','id'=>'elements_not_in','size'=>'15px'),false); ?> + 'width:360px', 'multiple'=>'multiple', 'id'=>'elements_not_in', 'size'=>'15px'), false); ?>
'width:360px', 'multiple'=>'multiple','id'=>'elements_in','size'=>'15px'),false ); + echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_in', 'size'=>'15px'), false); unset($sessionUsersList); ?> diff --git a/main/admin/event_type.php b/main/admin/event_type.php index 2b9ea12c3e..1dbe8e2ec2 100755 --- a/main/admin/event_type.php +++ b/main/admin/event_type.php @@ -48,7 +48,7 @@ if ($action == 'modEventType') { $ets = Event::get_all_event_types(); $languages = api_get_languages(); -$ajaxPath = api_get_path(WEB_CODE_PATH) . 'inc/ajax/events.ajax.php'; +$ajaxPath = api_get_path(WEB_CODE_PATH).'inc/ajax/events.ajax.php'; $action_array = array( array( @@ -324,7 +324,7 @@ echo Display::actions($action_array); diff --git a/main/admin/settings.php b/main/admin/settings.php index ac619ebfc8..85fb6cf36b 100755 --- a/main/admin/settings.php +++ b/main/admin/settings.php @@ -67,7 +67,7 @@ if (isset($_GET['delete_watermark'])) { Display::addFlash(Display::return_message(get_lang('FileDeleted'))); } -if (isset($_GET['action']) && $_GET['action'] == 'delete_grading') { +if (isset($_GET['action']) && $_GET['action'] == 'delete_grading') { $id = intval($_GET['id']); api_delete_setting_option($id); } @@ -233,7 +233,7 @@ if (!empty($_GET['category']) && // Set true for allow_message_tool variable if social tool is actived foreach ($convert_byte_to_mega_list as $item) { if (isset($values[$item])) { - $values[$item] = round($values[$item]*1024*1024); + $values[$item] = round($values[$item] * 1024 * 1024); } } diff --git a/main/admin/statistics.php b/main/admin/statistics.php index c8cdd1bc0b..bec3c079fb 100755 --- a/main/admin/statistics.php +++ b/main/admin/statistics.php @@ -5,13 +5,13 @@ * @package chamilo.admin */ -$cidReset=true; +$cidReset = true; require_once __DIR__.'/../inc/global.inc.php'; $this_section = SECTION_PLATFORM_ADMIN; api_protect_admin_script(); -$interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin')); +$interbreadcrumb[] = array('url' => 'index.php', "name" => get_lang('PlatformAdmin')); $tool_name = get_lang('Statistics'); Display::display_header($tool_name); Display::display_footer(); diff --git a/main/admin/teachers_time_by_session_report.php b/main/admin/teachers_time_by_session_report.php index 6e3f76b9ef..f617831cf8 100644 --- a/main/admin/teachers_time_by_session_report.php +++ b/main/admin/teachers_time_by_session_report.php @@ -13,7 +13,7 @@ use Chamilo\CourseBundle\Entity\Repository\CStudentPublicationRepository; $cidReset = true; require_once __DIR__.'/../inc/global.inc.php'; -require_once api_get_path(SYS_CODE_PATH) . 'work/work.lib.php'; +require_once api_get_path(SYS_CODE_PATH).'work/work.lib.php'; if (!api_is_platform_admin(true) && !api_is_teacher()) { api_not_allowed(true); @@ -53,7 +53,7 @@ if ($session) { foreach ($sessionCourses as $sessionCourse) { $course = $sessionCourse->getCourse(); - $coursesInfo[$course->getId()] = $course->getCode(); + $coursesInfo[$course->getId()] = $course->getCode(); $criteria = Criteria::create()->where( Criteria::expr()->eq('status', Session::COACH) ); @@ -167,9 +167,9 @@ if (isset($_GET['export']) && $session && ($coursesInfo && $usersInfo)) { } $this_section = SECTION_PLATFORM_ADMIN; -$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH) . 'mySpace/', 'name' => get_lang('Reporting')]; +$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH).'mySpace/', 'name' => get_lang('Reporting')]; $interbreadcrumb[] = [ - 'url' => api_get_path(WEB_CODE_PATH) . 'mySpace/session.php', + 'url' => api_get_path(WEB_CODE_PATH).'mySpace/session.php', 'name' => get_lang('FollowedSessions') ]; @@ -183,11 +183,11 @@ if ($session) { $actions = Display::url( Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), [], ICON_SIZE_MEDIUM), - api_get_self() . '?' . http_build_query(['export' => 'csv', 'session' => $session->getId()]) + api_get_self().'?'.http_build_query(['export' => 'csv', 'session' => $session->getId()]) ); $actions .= Display::url( Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), [], ICON_SIZE_MEDIUM), - api_get_self() . '?' . http_build_query(['export' => 'xls', 'session' => $session->getId()]) + api_get_self().'?'.http_build_query(['export' => 'xls', 'session' => $session->getId()]) ); $view->assign( diff --git a/main/admin/update_schema.php b/main/admin/update_schema.php index c3a47c7699..69dc747cf3 100644 --- a/main/admin/update_schema.php +++ b/main/admin/update_schema.php @@ -60,5 +60,5 @@ if (!empty($sqlList)) { } Display::display_header(get_lang('SyncDatabaseWithSchema')); -echo $content ; +echo $content; Display::display_footer(); diff --git a/main/auth/set_temp_password.php b/main/auth/set_temp_password.php index 5801ee0b5f..22a23261f5 100755 --- a/main/auth/set_temp_password.php +++ b/main/auth/set_temp_password.php @@ -12,7 +12,7 @@ use ChamiloSession as Session; $cidReset = true; require_once __DIR__.'/../inc/global.inc.php'; $this_section = SECTION_COURSES; -$course_id = isset($_GET['course_id']) ? intval($_GET['course_id']) : null; +$course_id = isset($_GET['course_id']) ? intval($_GET['course_id']) : null; $session_id = isset($_GET['session_id']) ? intval($_GET['session_id']) : null; $user_id = api_get_user_id(); diff --git a/main/cron/document/index_all_docs.php b/main/cron/document/index_all_docs.php index d185fb02c0..f114df934b 100755 --- a/main/cron/document/index_all_docs.php +++ b/main/cron/document/index_all_docs.php @@ -33,7 +33,7 @@ $allowed_extensions = array( 'html', 'htm', ); -$courses_list = CourseManager::get_courses_list(); +$courses_list = CourseManager::get_courses_list(); // Simulating empty specific fields (this is necessary for indexing) require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; @@ -49,7 +49,7 @@ foreach ($courses_list as $course) { $title = Database::escape_string($_GET['doc']); $sql = "SELECT id, path, session_id FROM $td WHERE c_id = ".$course['id']." AND path LIKE '%$title%' or title LIKE '%$title%'"; $res = Database::query($sql); - if (Database::num_rows($res)>0) { + if (Database::num_rows($res) > 0) { while ($row = Database::fetch_array($res)) { $doc_path = api_get_path(SYS_COURSE_PATH).$course_dir.$row['path']; $extensions = preg_split("/[\/\\.]/", $doc_path); diff --git a/main/document/exit_pixlr.php b/main/document/exit_pixlr.php index 45d0e19c0a..72ca5a86c8 100755 --- a/main/document/exit_pixlr.php +++ b/main/document/exit_pixlr.php @@ -23,13 +23,13 @@ unset($_SESSION['paint_file']); unset($_SESSION['whereami']); unset($_SESSION['temp_realpath_image']); -if (!isset($_SESSION['exit_pixlr'])){ - $location=api_get_path(WEB_CODE_PATH).'document/document.php'; +if (!isset($_SESSION['exit_pixlr'])) { + $location = api_get_path(WEB_CODE_PATH).'document/document.php'; echo ''; api_not_allowed(true); } else { echo '
'.get_lang('PleaseStandBy').'
'; - $location=api_get_path(WEB_CODE_PATH).'document/document.php?id='.Security::remove_XSS($_SESSION['exit_pixlr']); + $location = api_get_path(WEB_CODE_PATH).'document/document.php?id='.Security::remove_XSS($_SESSION['exit_pixlr']); echo ''; unset($_SESSION['exit_pixlr']); } diff --git a/main/exercise/question_pool.php b/main/exercise/question_pool.php index 2cf7bd7973..24a8386f0a 100755 --- a/main/exercise/question_pool.php +++ b/main/exercise/question_pool.php @@ -48,7 +48,7 @@ if (empty($objExercise) && !empty($fromExercise)) { } $nameTools = get_lang('QuestionPool'); -$interbreadcrumb[] = array("url" => "exercise.php","name" => get_lang('Exercises')); +$interbreadcrumb[] = array("url" => "exercise.php", "name" => get_lang('Exercises')); if (!empty($objExercise)) { $interbreadcrumb[] = array( @@ -73,7 +73,7 @@ if ($is_allowedToEdit) { if ($old_question_obj) { $old_question_obj->updateTitle( - $old_question_obj->selectTitle() . ' - ' . get_lang('Copy') + $old_question_obj->selectTitle().' - '.get_lang('Copy') ); //Duplicating the source question, in the current course $new_id = $old_question_obj->duplicate($current_course); @@ -107,7 +107,7 @@ if ($is_allowedToEdit) { } // destruction of the Question object unset($objQuestionTmp); - } elseif($recup && $fromExercise) { + } elseif ($recup && $fromExercise) { // gets an existing question and copies it into a new exercise $objQuestionTmp = Question :: read($recup); // if the question exists @@ -139,7 +139,7 @@ if ($is_allowedToEdit) { $old_question_obj = Question::read($old_question_id, $origin_course_id); if ($old_question_obj) { $old_question_obj->updateTitle( - $old_question_obj->selectTitle() . ' - ' . get_lang('Copy') + $old_question_obj->selectTitle().' - '.get_lang('Copy') ); //Duplicating the source question, in the current course @@ -167,16 +167,16 @@ if ($is_allowedToEdit) { } } } - Session::write('objExercise',$objExercise); + Session::write('objExercise', $objExercise); } } -if (isset($_SESSION['gradebook'])){ - $gradebook= $_SESSION['gradebook']; +if (isset($_SESSION['gradebook'])) { + $gradebook = $_SESSION['gradebook']; } -if (!empty($gradebook) && $gradebook=='view') { - $interbreadcrumb[]= array ('url' => '../gradebook/'.Security::remove_XSS($_SESSION['gradebook_dest']),'name' => get_lang('ToolGradebook')); +if (!empty($gradebook) && $gradebook == 'view') { + $interbreadcrumb[] = array('url' => '../gradebook/'.Security::remove_XSS($_SESSION['gradebook_dest']), 'name' => get_lang('ToolGradebook')); } // if admin of course @@ -216,11 +216,11 @@ if (isset($type)) { } if (isset($fromExercise) && $fromExercise > 0) { echo ''. - Display::return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).''; + Display::return_icon('back.png', get_lang('GoBackToQuestionList'), '', ICON_SIZE_MEDIUM).''; $titleAdd = get_lang('AddQuestionToTest'); } else { echo ''. - Display::return_icon('back.png', get_lang('BackToExercisesList'),'',ICON_SIZE_MEDIUM).''; + Display::return_icon('back.png', get_lang('BackToExercisesList'), '', ICON_SIZE_MEDIUM).''; echo "".Display::return_icon('add_question.gif', get_lang('NewQu'), '', ICON_SIZE_MEDIUM).""; $titleAdd = get_lang('ManageAllQuestions'); } @@ -249,7 +249,7 @@ $session_select_list = array(); foreach ($sessionList as $item) { $session_select_list[$item['session_id']] = $item['session_name']; } -$select_session_html = Display::select('session_id', $session_select_list, $session_id, $tabAttrParam); +$select_session_html = Display::select('session_id', $session_select_list, $session_id, $tabAttrParam); echo Display::form_row($labelFormRow, $select_session_html); // Course list, get course list of session, or for course where user is admin @@ -290,7 +290,7 @@ foreach ($course_list as $item) { $course_select_list[$courseItemId] .= $courseInfo['title']; } -$select_course_html = Display::select( +$select_course_html = Display::select( 'selected_course', $course_select_list, $selected_course, @@ -346,9 +346,9 @@ $my_exercise_list = array(); $my_exercise_list['0'] = get_lang('AllExercises'); $my_exercise_list['-1'] = get_lang('OrphanQuestions'); if (is_array($exercise_list)) { - foreach($exercise_list as $row) { + foreach ($exercise_list as $row) { $my_exercise_list[$row['id']] = ""; - if ($row['id'] == $fromExercise && $selected_course == api_get_course_int_id()) { + if ($row['id'] == $fromExercise && $selected_course == api_get_course_int_id()) { $my_exercise_list[$row['id']] = ">    "; } $my_exercise_list[$row['id']] .= $row['title']; @@ -358,7 +358,7 @@ if (is_array($exercise_list)) { if ($exercise_id_changed == 1) { reset_menu_lvl_type(); } -$select_exercise_html = Display::select( +$select_exercise_html = Display::select( 'exerciseId', $my_exercise_list, $exerciseId, @@ -391,7 +391,7 @@ echo Display::form_row(get_lang('Difficulty'), $select_difficulty_html); $question_list = Question::get_question_type_list(); $new_question_list = array(); -$new_question_list['-1'] = get_lang('All'); +$new_question_list['-1'] = get_lang('All'); if (!empty($_course)) { $objExercise = new Exercise(); $objExercise->read($fromExercise); @@ -464,7 +464,7 @@ if ($exerciseId > 0) { ORDER BY question_order"; $result = Database::query($sql); - while($row = Database::fetch_array($result, 'ASSOC')) { + while ($row = Database::fetch_array($result, 'ASSOC')) { $mainQuestionList[] = $row; } } elseif ($exerciseId == -1) { @@ -477,11 +477,11 @@ if ($exerciseId > 0) { crc.c_id = $selected_course AND crc.category_id = $courseCategoryId"; } - if (isset($exerciseLevel) && $exerciseLevel!= -1 ) { + if (isset($exerciseLevel) && $exerciseLevel != -1) { $level_where = ' AND level='.$exerciseLevel; } $answer_where = ''; - if (isset($answerType) && $answerType >0 -1 ) { + if (isset($answerType) && $answerType > 0 - 1) { $answer_where = ' AND type='.$answerType; } @@ -521,7 +521,7 @@ if ($exerciseId > 0) { $level_where $answer_where )"; $result = Database::query($sql); - while($row = Database::fetch_array($result, 'ASSOC')) { + while ($row = Database::fetch_array($result, 'ASSOC')) { $mainQuestionList[] = $row; } } else { diff --git a/main/gradebook/lib/fe/resulttable.class.php b/main/gradebook/lib/fe/resulttable.class.php index a486ef1ca6..13f9e590f7 100755 --- a/main/gradebook/lib/fe/resulttable.class.php +++ b/main/gradebook/lib/fe/resulttable.class.php @@ -18,7 +18,7 @@ class ResultTable extends SortableTable /** * Constructor */ - public function __construct($evaluation, $results = array(), $iscourse, $addparams = null,$forprint = false) + public function __construct($evaluation, $results = array(), $iscourse, $addparams = null, $forprint = false) { parent:: __construct( 'resultlist', @@ -37,10 +37,10 @@ class ResultTable extends SortableTable $this->set_additional_parameters($addparams); } $scoredisplay = ScoreDisplay::instance(); - $column= 0; + $column = 0; if ($this->iscourse == '1') { $this->set_header($column++, '', false); - $this->set_form_actions(array ( + $this->set_form_actions(array( 'delete' => get_lang('Delete') )); } @@ -63,7 +63,7 @@ class ResultTable extends SortableTable /** * Function used by SortableTable to get total number of items in the table */ - public function get_total_number_of_items () + public function get_total_number_of_items() { return $this->datagen->get_total_results_count(); } @@ -116,7 +116,7 @@ class ResultTable extends SortableTable // generate the data to display $sortable_data = array(); foreach ($data_array as $item) { - $row = array (); + $row = array(); if ($this->iscourse == '1') { $row[] = $item['result_id']; } @@ -128,13 +128,13 @@ class ResultTable extends SortableTable $row[] = $item['firstname']; } - $row[] = Display::bar_progress($item['percentage_score'], false, $item['score']); + $row[] = Display::bar_progress($item['percentage_score'], false, $item['score']); //$row[] = Display::bar_progress($item['percentage_score'], true); if ($scoredisplay->is_custom()) { $row[] = $item['display']; } if (!$this->forprint) { - $row[] = $this->build_edit_column ($item); + $row[] = $this->build_edit_column($item); } $sortable_data[] = $row; } @@ -147,17 +147,17 @@ class ResultTable extends SortableTable $locked_status = $this->evaluation->get_locked(); if (api_is_allowed_to_edit(null, true) && $locked_status == 0) { //api_is_course_admin() - $edit_column = ''. - Display::return_icon('edit.png', get_lang('Modify'),'','22').''; - $edit_column .= ' '. - Display::return_icon('delete.png', get_lang('Delete'),'','22').''; + $edit_column = ''. + Display::return_icon('edit.png', get_lang('Modify'), '', '22').''; + $edit_column .= ' '. + Display::return_icon('delete.png', get_lang('Delete'), '', '22').''; } if ($this->evaluation->get_course_code() == null) { - $edit_column .= ' '; + $edit_column .= ' '; $edit_column .= Display::return_icon('delete.png', get_lang('Delete')); $edit_column .= ''; - $edit_column .= ' '; + $edit_column .= ' '; $edit_column .= Display::return_icon('statistics.gif', get_lang('Statistics')); $edit_column .= ''; } @@ -168,7 +168,7 @@ class ResultTable extends SortableTable $doc_url = $link->get_view_url($item['id']); if ($doc_url != null) { - $edit_column .= ' '; + $edit_column .= ' '; $edit_column .= Display::return_icon('link.gif', get_lang('OpenDocument')).''; } } diff --git a/main/gradebook/lib/fe/scoredisplayform.class.php b/main/gradebook/lib/fe/scoredisplayform.class.php index d3cefdd7bf..383681d265 100755 --- a/main/gradebook/lib/fe/scoredisplayform.class.php +++ b/main/gradebook/lib/fe/scoredisplayform.class.php @@ -14,28 +14,28 @@ class ScoreDisplayForm extends FormValidator * @param $form_name * @param null $action */ - public function __construct($form_name, $action= null) + public function __construct($form_name, $action = null) { parent::__construct($form_name, 'post', $action); $displayscore = ScoreDisplay::instance(); $customdisplays = $displayscore->get_custom_score_display_settings(); - $nr_items = (count($customdisplays)!='0') ? count($customdisplays) : '1'; - $this->setDefaults(array ( + $nr_items = (count($customdisplays) != '0') ? count($customdisplays) : '1'; + $this->setDefaults(array( 'scorecolpercent' => $displayscore->get_color_split_value() )); $this->addElement('hidden', 'maxvalue', '100'); $this->addElement('hidden', 'minvalue', '0'); - $counter= 1; + $counter = 1; //setting the default values if (is_array($customdisplays)) { foreach ($customdisplays as $customdisplay) { - $this->setDefaults(array ( - 'endscore[' . $counter . ']' => $customdisplay['score'], - 'displaytext[' . $counter . ']' => $customdisplay['display'] + $this->setDefaults(array( + 'endscore['.$counter.']' => $customdisplay['score'], + 'displaytext['.$counter.']' => $customdisplay['display'] )); $counter++; } @@ -46,7 +46,7 @@ class ScoreDisplayForm extends FormValidator $this->addElement('header', get_lang('ScoreEdit')); if ($displayscore->is_coloring_enabled()) { - $this->addElement('html', ''.get_lang('ScoreColor') . ''); + $this->addElement('html', ''.get_lang('ScoreColor').''); $this->addElement( 'text', 'scorecolpercent', @@ -63,14 +63,14 @@ class ScoreDisplayForm extends FormValidator } $this->addRule('scorecolpercent', get_lang('OnlyNumbers'), 'numeric'); - $this->addRule(array('scorecolpercent','maxvalue'), get_lang('Over100'), 'compare', '<='); - $this->addRule(array('scorecolpercent','minvalue'), get_lang('UnderMin'), 'compare', '>'); + $this->addRule(array('scorecolpercent', 'maxvalue'), get_lang('Over100'), 'compare', '<='); + $this->addRule(array('scorecolpercent', 'minvalue'), get_lang('UnderMin'), 'compare', '>'); } //Settings for the scoring system if ($displayscore->is_custom()) { - $this->addElement('html', '
' . get_lang('ScoringSystem') . ''); + $this->addElement('html', '
'.get_lang('ScoringSystem').''); $this->addElement('static', null, null, get_lang('ScoreInfo')); $this->setDefaults(array( 'beginscore' => '0' @@ -82,10 +82,10 @@ class ScoreDisplayForm extends FormValidator 'input-size' => 2 )); - for ($counter= 1; $counter <= 20; $counter++) { - $renderer =& $this->defaultRenderer(); + for ($counter = 1; $counter <= 20; $counter++) { + $renderer = & $this->defaultRenderer(); $elementTemplateTwoLabel = - '
+ '
* @@ -110,23 +110,23 @@ class ScoreDisplayForm extends FormValidator '; - $elementTemplateTwoLabel2 =' + $elementTemplateTwoLabel2 = '
{error} {element}
'; $scorebetw = array(); - $this->addElement('text', 'endscore[' . $counter . ']', null, array ( + $this->addElement('text', 'endscore['.$counter.']', null, array( 'size' => 5, 'maxlength' => 5, 'id' => 'txta-'.$counter, @@ -143,11 +143,11 @@ class ScoreDisplayForm extends FormValidator 'id' => 'txtb-'.$counter, ) ); - $renderer->setElementTemplate($elementTemplateTwoLabel, 'endscore[' . $counter . ']'); - $renderer->setElementTemplate($elementTemplateTwoLabel2, 'displaytext[' . $counter . ']'); - $this->addRule('endscore[' . $counter . ']', get_lang('OnlyNumbers'), 'numeric'); - $this->addRule(array ('endscore[' . $counter . ']', 'maxvalue'), get_lang('Over100'), 'compare', '<='); - $this->addRule(array ('endscore[' . $counter . ']', 'minvalue'), get_lang('UnderMin'), 'compare', '>'); + $renderer->setElementTemplate($elementTemplateTwoLabel, 'endscore['.$counter.']'); + $renderer->setElementTemplate($elementTemplateTwoLabel2, 'displaytext['.$counter.']'); + $this->addRule('endscore['.$counter.']', get_lang('OnlyNumbers'), 'numeric'); + $this->addRule(array('endscore['.$counter.']', 'maxvalue'), get_lang('Over100'), 'compare', '<='); + $this->addRule(array('endscore['.$counter.']', 'minvalue'), get_lang('UnderMin'), 'compare', '>'); } } diff --git a/main/gradebook/lib/fe/userform.class.php b/main/gradebook/lib/fe/userform.class.php index 03f10ff816..d93f4f9990 100755 --- a/main/gradebook/lib/fe/userform.class.php +++ b/main/gradebook/lib/fe/userform.class.php @@ -9,7 +9,7 @@ */ class UserForm extends FormValidator { - const TYPE_USER_INFO= 1; + const TYPE_USER_INFO = 1; const TYPE_SIMPLE_SEARCH = 3; /** @@ -20,15 +20,15 @@ class UserForm extends FormValidator * @param method * @param action */ - public function __construct($form_type, $user, $form_name, $method= 'post', $action= null) + public function __construct($form_type, $user, $form_name, $method = 'post', $action = null) { parent::__construct($form_name, $method, $action); - $this->form_type= $form_type; + $this->form_type = $form_type; if (isset ($user)) { - $this->user_info= $user; + $this->user_info = $user; } if (isset ($result_object)) { - $this->result_object= $result_object; + $this->result_object = $result_object; } if ($this->form_type == self::TYPE_USER_INFO) { $this->build_user_info_form(); @@ -46,7 +46,7 @@ class UserForm extends FormValidator 'keyword' => Security::remove_XSS($_GET['search']) )); } - $renderer =& $this->defaultRenderer(); + $renderer = & $this->defaultRenderer(); $renderer->setCustomElementTemplate('{element} '); $this->addElement('text', 'keyword', ''); $this->addButtonSearch(get_lang('Search'), 'submit'); @@ -62,7 +62,7 @@ class UserForm extends FormValidator $this->addElement('static', 'fname', get_lang('FirstName'), $this->user_info['firstname']); } $this->addElement('static', 'uname', get_lang('UserName'), $this->user_info['username']); - $this->addElement('static', 'email', get_lang('Email'), '' . $this->user_info['email'] . ''); + $this->addElement('static', 'email', get_lang('Email'), ''.$this->user_info['email'].''); $this->addElement('static', 'ofcode', get_lang('OfficialCode'), $this->user_info['official_code']); $this->addElement('static', 'phone', get_lang('Phone'), $this->user_info['phone']); $this->addButtonSave(get_lang('Back'), 'submit'); @@ -73,7 +73,7 @@ class UserForm extends FormValidator parent::display(); } - function setDefaults($defaults= array(), $filter = null) + function setDefaults($defaults = array(), $filter = null) { parent::setDefaults($defaults, $filter); } diff --git a/main/gradebook/lib/results_data_generator.class.php b/main/gradebook/lib/results_data_generator.class.php index 19dfae746c..79f7b37414 100755 --- a/main/gradebook/lib/results_data_generator.class.php +++ b/main/gradebook/lib/results_data_generator.class.php @@ -38,7 +38,7 @@ class ResultsDataGenerator /** * Get total number of results (rows) */ - public function get_total_results_count () + public function get_total_results_count() { return count($this->results); } @@ -54,12 +54,12 @@ class ResultsDataGenerator * 4 ['score'] : student's score * 5 ['display'] : custom score display (only if custom scoring enabled) */ - public function get_data ($sorting = 0, $start = 0, $count = null, $ignore_score_color = false, $pdf=false) + public function get_data($sorting = 0, $start = 0, $count = null, $ignore_score_color = false, $pdf = false) { // do some checks on count, redefine if invalid value $number_decimals = api_get_setting('gradebook_number_decimals'); if (!isset($count)) { - $count = count ($this->results) - $start; + $count = count($this->results) - $start; } if ($count < 0) { $count = 0; @@ -67,11 +67,11 @@ class ResultsDataGenerator $scoredisplay = ScoreDisplay::instance(); // generate actual data array $table = array(); - foreach($this->results as $result) { + foreach ($this->results as $result) { $user = array(); $info = api_get_user_info($result->get_user_id()); $user['id'] = $result->get_user_id(); - if ($pdf){ + if ($pdf) { $user['username'] = $info['username']; } $user['result_id'] = $result->get_id(); @@ -93,7 +93,7 @@ class ResultsDataGenerator true ) ); - if ($pdf && $number_decimals == null){ + if ($pdf && $number_decimals == null) { $user['scoreletter'] = $result->get_score(); } if ($scoredisplay->is_custom()) { @@ -134,13 +134,13 @@ class ResultsDataGenerator * @param boolean $realscore * @result string The score as we want to show it */ - private function get_score_display ($score, $realscore, $ignore_score_color = false) + private function get_score_display($score, $realscore, $ignore_score_color = false) { if ($score != null) { $scoredisplay = ScoreDisplay::instance(); $type = SCORE_CUSTOM; if ($realscore === true) { - $type = SCORE_DIV_PERCENT ; + $type = SCORE_DIV_PERCENT; } return $scoredisplay->display_score( @@ -174,10 +174,10 @@ class ResultsDataGenerator } } - function sort_by_mask ($item1, $item2) + function sort_by_mask($item1, $item2) { - $score1 = (isset($item1['score']) ? array($item1['score'],$this->evaluation->get_max()) : null); - $score2 = (isset($item2['score']) ? array($item2['score'],$this->evaluation->get_max()) : null); + $score1 = (isset($item1['score']) ? array($item1['score'], $this->evaluation->get_max()) : null); + $score2 = (isset($item2['score']) ? array($item2['score'], $this->evaluation->get_max()) : null); return ScoreDisplay::compare_scores_by_custom_display($score1, $score2); } } diff --git a/main/gradebook/lib/scoredisplay.class.php b/main/gradebook/lib/scoredisplay.class.php index a5718dd968..13e7401b44 100755 --- a/main/gradebook/lib/scoredisplay.class.php +++ b/main/gradebook/lib/scoredisplay.class.php @@ -34,7 +34,7 @@ class ScoreDisplay /** * Compare the custom display of 2 scores, can be useful in sorting */ - public static function compare_scores_by_custom_display ($score1, $score2) + public static function compare_scores_by_custom_display($score1, $score2) { if (!isset($score1)) { return (isset($score2) ? 1 : 0); @@ -47,7 +47,7 @@ class ScoreDisplay if ($custom1 == $custom2) { return 0; } else { - return (($score1[0]/$score1[1]) < ($score2[0]/$score2[1]) ? -1 : 1); + return (($score1[0] / $score1[1]) < ($score2[0] / $score2[1]) ? -1 : 1); } } } @@ -78,7 +78,7 @@ class ScoreDisplay //Setting custom enabled $value = api_get_setting('gradebook_score_display_custom'); $value = $value['my_display_custom']; - $this->custom_enabled = $value == 'true' ? true : false; + $this->custom_enabled = $value == 'true' ? true : false; if ($this->custom_enabled) { $params = array('category = ?' => array('Gradebook')); @@ -95,10 +95,10 @@ class ScoreDisplay sort($portal_displays); } $this->custom_display = $portal_displays; - if (count($this->custom_display)>0) { + if (count($this->custom_display) > 0) { $value = api_get_setting('gradebook_score_display_upperlimit'); $value = $value['my_display_upperlimit']; - $this->upperlimit_included = $value == 'true' ? true : false; + $this->upperlimit_included = $value == 'true' ? true : false; $this->custom_display_conv = $this->convert_displays($this->custom_display); } } @@ -109,7 +109,7 @@ class ScoreDisplay //Load course settings if ($this->custom_enabled) { $this->custom_display = $this->get_custom_displays(); - if (count($this->custom_display)> 0) { + if (count($this->custom_display) > 0) { $this->custom_display_conv = $this->convert_displays($this->custom_display); } } @@ -180,7 +180,7 @@ class ScoreDisplay } $sql = 'SELECT id FROM '.$tbl_gradebook_category.' - WHERE course_code = "'.$curr_course_code.'" '. $session_condition; + WHERE course_code = "'.$curr_course_code.'" '.$session_condition; $rs = Database::query($sql); $category_id = 0; if (Database::num_rows($rs) > 0) { @@ -249,7 +249,7 @@ class ScoreDisplay ); $tbl_display = Database::get_main_table(TABLE_MAIN_GRADEBOOK_SCORE_DISPLAY); - foreach($display as $value => $text) { + foreach ($display as $value => $text) { $params = array( 'score' => $value, 'display' => $text, @@ -305,7 +305,7 @@ class ScoreDisplay $my_score = $score == 0 ? 1 : $score; if ($type == SCORE_BAR) { - $percentage = $my_score[0]/$my_score[1]*100; + $percentage = $my_score[0] / $my_score[1] * 100; return Display::bar_progress($percentage); } @@ -346,7 +346,7 @@ class ScoreDisplay case SCORE_PERCENT: // XX % return $this->display_as_percent($score); case SCORE_DIV_PERCENT: // X / Y (XX %) - return $this->display_as_div($score).' (' . $this->display_as_percent($score) . ')'; + return $this->display_as_div($score).' ('.$this->display_as_percent($score).')'; case SCORE_AVERAGE: // XX % return $this->display_as_percent($score); case SCORE_DECIMAL: // 0.50 (X/Y) @@ -356,7 +356,7 @@ class ScoreDisplay if (!empty($custom)) { $custom = ' - '.$custom; } - return $this->display_as_div($score).' (' . $this->display_as_percent($score) . ')'.$custom; + return $this->display_as_div($score).' ('.$this->display_as_percent($score).')'.$custom; case SCORE_DIV_SIMPLE_WITH_CUSTOM: // X - Good! $custom = $this->display_custom($score); @@ -408,9 +408,9 @@ class ScoreDisplay */ private function display_as_decimal($score) { - $score_denom = ($score[1]==0) ? 1 : $score[1]; + $score_denom = ($score[1] == 0) ? 1 : $score[1]; - return $this->format_score($score[0]/$score_denom); + return $this->format_score($score[0] / $score_denom); } /** @@ -418,9 +418,9 @@ class ScoreDisplay */ private function display_as_percent($score) { - $score_denom = ($score[1]==0) ? 1 : $score[1]; + $score_denom = ($score[1] == 0) ? 1 : $score[1]; - return $this->format_score($score[0]/$score_denom*100) . ' %'; + return $this->format_score($score[0] / $score_denom * 100).' %'; } /** @@ -436,7 +436,7 @@ class ScoreDisplay } else { $score[0] = isset($score[0]) ? $this->format_score($score[0]) : 0; $score[1] = isset($score[1]) ? $this->format_score($score[1]) : 0; - return $score[0] . ' / ' . $score[1]; + return $score[0].' / '.$score[1]; } } @@ -446,7 +446,7 @@ class ScoreDisplay */ private function display_custom($score) { - $my_score_denom= ($score[1]==0) ? 1 : $score[1]; + $my_score_denom = ($score[1] == 0) ? 1 : $score[1]; $scaledscore = $score[0] / $my_score_denom; if ($this->upperlimit_included) { foreach ($this->custom_display_conv as $displayitem) { @@ -510,7 +510,7 @@ class ScoreDisplay ORDER BY score'; $result = Database::query($sql); - return Database::store_result($result,'ASSOC'); + return Database::store_result($result, 'ASSOC'); } /** diff --git a/main/inc/lib/app_view.php b/main/inc/lib/app_view.php index 25d4ff1f0e..699db68108 100755 --- a/main/inc/lib/app_view.php +++ b/main/inc/lib/app_view.php @@ -27,7 +27,7 @@ class View if (is_dir($path)) { $this->tool_path = $path; } else { - throw new Exception('View::__construct() $path directory does not exist ' . $path); + throw new Exception('View::__construct() $path directory does not exist '.$path); } } } @@ -39,7 +39,7 @@ class View public function set_data($data) { if (!is_array($data)) { - throw new Exception('View::set_data() $data must to be an array, you have sent a' . gettype( $data )); + throw new Exception('View::set_data() $data must to be an array, you have sent a'.gettype($data)); } $this->data = $data; } @@ -49,7 +49,7 @@ class View * @param string layout view * @param string $layout */ - public function set_layout( $layout ) + public function set_layout($layout) { $this->layout = $layout; } diff --git a/main/inc/lib/message.lib.php b/main/inc/lib/message.lib.php index 5cdb138894..01e75831a9 100755 --- a/main/inc/lib/message.lib.php +++ b/main/inc/lib/message.lib.php @@ -29,7 +29,7 @@ class MessageManager if (!isset($count)) { $cacheAvailable = api_get_configuration_value('apc'); if ($cacheAvailable === true) { - $var = api_get_configuration_value('apc_prefix') . 'social_messages_unread_u_' . $userId; + $var = api_get_configuration_value('apc_prefix').'social_messages_unread_u_'.$userId; if (apcu_exists($var)) { $count = apcu_fetch($var); } else { @@ -57,7 +57,7 @@ class MessageManager $sql = "SELECT COUNT(id) as count FROM $table WHERE - user_receiver_id=" . api_get_user_id() . " AND + user_receiver_id=".api_get_user_id()." AND msg_status = " . MESSAGE_STATUS_UNREAD; $result = Database::query($sql); $row = Database::fetch_assoc($result); @@ -72,9 +72,9 @@ class MessageManager { $table_message = Database::get_main_table(TABLE_MESSAGE); if ($unread) { - $condition_msg_status = ' msg_status = ' . MESSAGE_STATUS_UNREAD . ' '; + $condition_msg_status = ' msg_status = '.MESSAGE_STATUS_UNREAD.' '; } else { - $condition_msg_status = ' msg_status IN(' . MESSAGE_STATUS_NEW . ',' . MESSAGE_STATUS_UNREAD . ') '; + $condition_msg_status = ' msg_status IN('.MESSAGE_STATUS_NEW.','.MESSAGE_STATUS_UNREAD.') '; } $keyword = Session::read('message_search_keyword'); @@ -87,7 +87,7 @@ class MessageManager $sql = "SELECT COUNT(id) as number_messages FROM $table_message WHERE $condition_msg_status AND - user_receiver_id=" . api_get_user_id() . " + user_receiver_id=".api_get_user_id()." $keywordCondition "; $result = Database::query($sql); @@ -135,7 +135,7 @@ class MessageManager msg_status as col4 FROM $table_message WHERE - user_receiver_id=" . api_get_user_id() . " AND + user_receiver_id=".api_get_user_id()." AND msg_status IN (0,1) $keywordCondition ORDER BY col$column $direction @@ -160,10 +160,10 @@ class MessageManager $link = '&f=social'; } $userInfo = api_get_user_info($result[1]); - $message[1] = '' . $result[2] . '
' . $userInfo['complete_name']; - $message[3] = '' . - Display::return_icon('message_reply.png', get_lang('ReplyToMessage')) . '' . - '  ' . Display::return_icon('delete.png', get_lang('DeleteMessage')) . ''; + $message[1] = ''.$result[2].'
'.$userInfo['complete_name']; + $message[3] = ''. + Display::return_icon('message_reply.png', get_lang('ReplyToMessage')).''. + '  '.Display::return_icon('delete.png', get_lang('DeleteMessage')).''; $message[2] = api_convert_and_format_date($result[3], DATE_TIME_FORMAT_LONG); //date stays the same foreach ($message as $key => $value) { @@ -268,7 +268,7 @@ class MessageManager //@todo it's possible to edit a message? yes, only for groups if ($edit_message_id) { $query = " UPDATE $table_message SET - update_date = '" . $now . "', + update_date = '".$now."', content = '".Database::escape_string($content)."' WHERE id = '$edit_message_id' "; Database::query($query); @@ -437,7 +437,7 @@ class MessageManager $message = sprintf( get_lang('CopyOfMessageSentToXUser'), $userInfo['complete_name'] - ) . '
' . $message; + ).'
'.$message; self::send_message_simple( $drhInfo['user_id'], @@ -485,7 +485,7 @@ class MessageManager $row = Database::fetch_array($result); // update parent_id for other user receiver - $sql = "UPDATE $table_message SET parent_id = " . $row['id'] . " + $sql = "UPDATE $table_message SET parent_id = ".$row['id']." WHERE id = $message_id"; Database::query($sql); } @@ -504,7 +504,7 @@ class MessageManager $user_receiver_id = intval($user_receiver_id); $id = intval($id); $sql = "SELECT * FROM $table_message - WHERE id=" . $id . " AND msg_status<>4"; + WHERE id=".$id." AND msg_status<>4"; $rs = Database::query($sql); if (Database::num_rows($rs) > 0) { @@ -514,7 +514,7 @@ class MessageManager $query = "UPDATE $table_message SET msg_status = 3 WHERE - user_receiver_id=" . $user_receiver_id . " AND + user_receiver_id=".$user_receiver_id." AND id = " . $id; Database::query($query); @@ -604,13 +604,13 @@ class MessageManager $path_user_info['dir'] = UserManager::getUserPathById($message_user_id, 'system'); } - $path_message_attach = $path_user_info['dir'] . 'message_attachments/'; + $path_message_attach = $path_user_info['dir'].'message_attachments/'; // If this directory does not exist - we create it. if (!file_exists($path_message_attach)) { @mkdir($path_message_attach, api_get_permissions_for_new_directories(), true); } - $new_path = $path_message_attach . $new_file_name; + $new_path = $path_message_attach.$new_file_name; if (is_uploaded_file($file_attach['tmp_name'])) { @copy($file_attach['tmp_name'], $new_path); } @@ -645,7 +645,7 @@ class MessageManager while ($row = Database::fetch_array($rs)) { $path = $row['path']; $attach_id = $row['id']; - $new_path = $path . '_DELETED_' . $attach_id; + $new_path = $path.'_DELETED_'.$attach_id; if (!empty($group_id)) { $userGroup = new UserGroup(); @@ -661,9 +661,9 @@ class MessageManager ); } - $path_message_attach = $path_user_info['dir'] . 'message_attachments/'; - if (is_file($path_message_attach . $path)) { - if (rename($path_message_attach . $path, $path_message_attach . $new_path)) { + $path_message_attach = $path_user_info['dir'].'message_attachments/'; + if (is_file($path_message_attach.$path)) { + if (rename($path_message_attach.$path, $path_message_attach.$new_path)) { $sql = "UPDATE $table_message_attach set path='$new_path' WHERE id ='$attach_id'"; Database::query($sql); @@ -688,8 +688,8 @@ class MessageManager $sql = "UPDATE $table_message SET msg_status = '0' WHERE msg_status<>4 AND - user_receiver_id=" . intval($user_id) . " AND - id='" . intval($message_id) . "'"; + user_receiver_id=".intval($user_id)." AND + id='" . intval($message_id)."'"; Database::query($sql); } @@ -709,8 +709,8 @@ class MessageManager $sql = "UPDATE $table_message SET msg_status = '$type' WHERE - user_receiver_id=" . intval($user_id) . " AND - id='" . intval($message_id) . "'"; + user_receiver_id=".intval($user_id)." AND + id='" . intval($message_id)."'"; Database::query($sql); } @@ -727,7 +727,7 @@ class MessageManager } $table_message = Database::get_main_table(TABLE_MESSAGE); $query = "SELECT * FROM $table_message - WHERE user_receiver_id=" . intval($user_id) . " AND id='" . intval($message_id) . "'"; + WHERE user_receiver_id=".intval($user_id)." AND id='".intval($message_id)."'"; $result = Database::query($query); return $row = Database::fetch_array($result); @@ -749,7 +749,7 @@ class MessageManager $sql = "SELECT * FROM $table_message WHERE group_id= $group_id AND - msg_status NOT IN ('" . MESSAGE_STATUS_OUTBOX . "', '" . MESSAGE_STATUS_DELETED . "') + msg_status NOT IN ('".MESSAGE_STATUS_OUTBOX."', '".MESSAGE_STATUS_DELETED."') ORDER BY id"; $rs = Database::query($sql); $data = array(); @@ -777,7 +777,7 @@ class MessageManager $sql = "SELECT * FROM $table_message WHERE group_id = $group_id AND - msg_status NOT IN ('" . MESSAGE_STATUS_OUTBOX . "', '" . MESSAGE_STATUS_DELETED . "') + msg_status NOT IN ('".MESSAGE_STATUS_OUTBOX."', '".MESSAGE_STATUS_DELETED."') ORDER BY id "; $rs = Database::query($sql); @@ -826,7 +826,7 @@ class MessageManager $sql = "SELECT * FROM $table_message WHERE parent_id='$parent_id' AND - msg_status <> " . MESSAGE_STATUS_OUTBOX . " + msg_status <> ".MESSAGE_STATUS_OUTBOX." $condition_group_id ORDER BY send_date DESC $condition_limit "; $rs = Database::query($sql); @@ -854,8 +854,8 @@ class MessageManager $table_message = Database::get_main_table(TABLE_MESSAGE); $query = "SELECT id FROM $table_message WHERE - user_receiver_id = " . intval($user_id) . " AND - id = '" . intval($id) . "'"; + user_receiver_id = ".intval($user_id)." AND + id = '" . intval($id)."'"; $result = Database::query($query); $num = Database::num_rows($result); if ($num > 0) { @@ -903,8 +903,8 @@ class MessageManager msg_status as col5 FROM $table_message WHERE - user_sender_id=" . api_get_user_id() . " AND - msg_status=" . MESSAGE_STATUS_OUTBOX . " + user_sender_id=".api_get_user_id()." AND + msg_status=" . MESSAGE_STATUS_OUTBOX." $keywordCondition ORDER BY col$column $direction LIMIT $from, $number_of_items"; @@ -913,7 +913,7 @@ class MessageManager $message_list = array(); while ($result = Database::fetch_row($sql_result)) { if ($request === true) { - $message[0] = ''; + $message[0] = ''; } else { $message[0] = ($result[0]); } @@ -921,20 +921,20 @@ class MessageManager $result[2] = Security::remove_XSS($result[2]); $userInfo = api_get_user_info($result[4]); if ($request === true) { - $message[1] = '' . $userInfo['complete_name'] . ''; - $message[2] = '' . str_replace("\\", "", $result[2]) . ''; + $message[1] = ''.$userInfo['complete_name'].''; + $message[2] = ''.str_replace("\\", "", $result[2]).''; $message[3] = api_convert_and_format_date($result[3], DATE_TIME_FORMAT_LONG); //date stays the same - $message[4] = '  ' . - Display::return_icon('delete.png', get_lang('DeleteMessage')) . ''; + $message[4] = '  '. + Display::return_icon('delete.png', get_lang('DeleteMessage')).''; } else { $link = ''; if (isset($_GET['f']) && $_GET['f'] == 'social') { $link = '&f=social'; } - $message[1] = '' . $result[2] . '
' . $userInfo['complete_name']; + $message[1] = ''.$result[2].'
'.$userInfo['complete_name']; $message[2] = api_convert_and_format_date($result[3], DATE_TIME_FORMAT_LONG); //date stays the same - $message[3] = '' . - Display::return_icon('delete.png', get_lang('DeleteMessage')) . ''; + $message[3] = ''. + Display::return_icon('delete.png', get_lang('DeleteMessage')).''; } foreach ($message as $key => $value) { @@ -967,8 +967,8 @@ class MessageManager $sql = "SELECT COUNT(id) as number_messages FROM $table_message WHERE - msg_status=" . MESSAGE_STATUS_OUTBOX . " AND - user_sender_id=" . api_get_user_id() . " + msg_status=".MESSAGE_STATUS_OUTBOX." AND + user_sender_id=" . api_get_user_id()." $keywordCondition "; $result = Database::query($sql); @@ -993,25 +993,25 @@ class MessageManager if (isset($message_id) && is_numeric($message_id)) { $query = "SELECT * FROM $table_message WHERE - user_sender_id = " . api_get_user_id() . " AND - id = " . $message_id . " AND + user_sender_id = ".api_get_user_id()." AND + id = " . $message_id." AND msg_status = 4;"; $result = Database::query($query); } } else { if (is_numeric($message_id) && !empty($message_id)) { $query = "UPDATE $table_message SET - msg_status = '" . MESSAGE_STATUS_NEW . "' + msg_status = '".MESSAGE_STATUS_NEW."' WHERE - user_receiver_id=" . api_get_user_id() . " AND - id='" . $message_id . "'"; + user_receiver_id=" . api_get_user_id()." AND + id='" . $message_id."'"; Database::query($query); $query = "SELECT * FROM $table_message WHERE msg_status<>4 AND - user_receiver_id=" . api_get_user_id() . " AND - id='" . $message_id . "'"; + user_receiver_id=".api_get_user_id()." AND + id='" . $message_id."'"; $result = Database::query($query); } } @@ -1044,27 +1044,27 @@ class MessageManager if ($source == 'outbox') { $message_content .= '
'; $message_content .= '
    '; - $message_content .= '
  • ' . $user_image . '
  • '; - $message_content .= '
  • ' . $name . ' '; - $message_content .= api_strtolower(get_lang('To')) . ' ' . $receiverUserInfo['complete_name'].'
  • '; - $message_content .= '
  • ' . Display::dateToStringAgoAndLongDate($row['send_date']) . '
  • '; + $message_content .= '
  • '.$user_image.'
  • '; + $message_content .= '
  • '.$name.' '; + $message_content .= api_strtolower(get_lang('To')).' '.$receiverUserInfo['complete_name'].'
  • '; + $message_content .= '
  • '.Display::dateToStringAgoAndLongDate($row['send_date']).'
  • '; $message_content .= '
'; $message_content .= '
'; } else { $message_content .= '
'; $message_content .= '
    '; - $message_content .= '
  • ' . $user_image . '
  • '; - $message_content .= '
  • ' . $name . '
  • '; - $message_content .= '
  • '. Display::dateToStringAgoAndLongDate($row['send_date']) . '
  • '; + $message_content .= '
  • '.$user_image.'
  • '; + $message_content .= '
  • '.$name.'
  • '; + $message_content .= '
  • '.Display::dateToStringAgoAndLongDate($row['send_date']).'
  • '; $message_content .= '
'; $message_content .= '
'; } $message_content .= '
'; } else { if ($source == 'outbox') { - $message_content .= get_lang('From') . ': ' . $name . ' ' . api_strtolower(get_lang('To')) . ' ' . $receiverUserInfo['complete_name'] . ''; + $message_content .= get_lang('From').': '.$name.' '.api_strtolower(get_lang('To')).' '.$receiverUserInfo['complete_name'].''; } else { - $message_content .= get_lang('From') . ': ' . $name . ' ' . api_strtolower(get_lang('To')) . ' ' . get_lang('Me') . ''; + $message_content .= get_lang('From').': '.$name.' '.api_strtolower(get_lang('To')).' '.get_lang('Me').''; } } @@ -1072,26 +1072,26 @@ class MessageManager
- +
' . str_replace("\\", "", $content) . '' . str_replace("\\", "", $content).'
-
' . (!empty($files_attachments) ? implode('
', $files_attachments) : '') . '
+
' . (!empty($files_attachments) ? implode('
', $files_attachments) : '').'
'; $social_link = ''; if (isset($_GET['f']) && $_GET['f'] == 'social') { $social_link = 'f=social'; } if ($source == 'outbox') { - $message_content .= '' . - Display::return_icon('back.png', get_lang('ReturnToOutbox')) . '  '; + $message_content .= ''. + Display::return_icon('back.png', get_lang('ReturnToOutbox')).'  '; } else { - $message_content .= '' . - Display::return_icon('back.png', get_lang('ReturnToInbox')) . '  '; - $message_content .= '' . - Display::return_icon('message_reply.png', get_lang('ReplyToMessage')) . '  '; + $message_content .= ''. + Display::return_icon('back.png', get_lang('ReturnToInbox')).'  '; + $message_content .= ''. + Display::return_icon('message_reply.png', get_lang('ReplyToMessage')).'  '; } - $message_content .= '' . - Display::return_icon('delete.png', get_lang('DeleteMessage')) . ' '; + $message_content .= ''. + Display::return_icon('delete.png', get_lang('DeleteMessage')).' '; $message_content .= '
@@ -1109,8 +1109,8 @@ class MessageManager public static function get_user_id_by_email($user_email) { $tbl_user = Database::get_main_table(TABLE_MAIN_USER); - $sql = 'SELECT user_id FROM ' . $tbl_user . ' - WHERE email="' . Database::escape_string($user_email) . '";'; + $sql = 'SELECT user_id FROM '.$tbl_user.' + WHERE email="' . Database::escape_string($user_email).'";'; $rs = Database::query($sql); $row = Database::fetch_array($rs, 'ASSOC'); if (isset($row['user_id'])) { @@ -1170,7 +1170,7 @@ class MessageManager $items = $topic['count']; $reply_label = ($items == 1) ? get_lang('GroupReply') : get_lang('GroupReplies'); - $label = ' ' . $items . ' ' . $reply_label; + $label = ' '.$items.' '.$reply_label; $topic['title'] = trim($topic['title']); if (empty($topic['title'])) { @@ -1182,31 +1182,31 @@ class MessageManager 'h4', Display::url( Security::remove_XSS($topic['title'], STUDENT, true), - api_get_path(WEB_CODE_PATH) . 'social/group_topics.php?id=' . $group_id . '&topic_id=' . $topic['id'] + api_get_path(WEB_CODE_PATH).'social/group_topics.php?id='.$group_id.'&topic_id='.$topic['id'] ), array('class' => 'title') ); $actions = ''; if ($my_group_role == GROUP_USER_PERMISSION_ADMIN || $my_group_role == GROUP_USER_PERMISSION_MODERATOR ) { - $actions = '
' . Display::url(get_lang('Delete'), api_get_path(WEB_CODE_PATH) . 'social/group_topics.php?action=delete&id=' . $group_id . '&topic_id=' . $topic['id'], array('class' => 'btn btn-default')); + $actions = '
'.Display::url(get_lang('Delete'), api_get_path(WEB_CODE_PATH).'social/group_topics.php?action=delete&id='.$group_id.'&topic_id='.$topic['id'], array('class' => 'btn btn-default')); } $date = ''; if ($topic['send_date'] != $topic['update_date']) { if (!empty($topic['update_date'])) { - $date .= ' ' . get_lang('LastUpdate') . ' ' . date_to_str_ago($topic['update_date']); + $date .= ' '.get_lang('LastUpdate').' '.date_to_str_ago($topic['update_date']); } } else { - $date .= ' ' . get_lang('Created') . ' ' . date_to_str_ago($topic['send_date']); + $date .= ' '.get_lang('Created').' '.date_to_str_ago($topic['send_date']); } - $html .= '
' . $label . ' - ' . $date . $actions . '
'; + $html .= '
'.$label.' - '.$date.$actions.'
'; $html .= ''; $image = $user_sender_info['avatar']; - $user_info = '
' . $name . '
'; - $user_info .= ''; + $user_info = '
'.$name.'
'; + $user_info .= ''; $html .= '
'; $html .= $user_info; @@ -1284,7 +1284,7 @@ class MessageManager 'group_id' => $group_id, 'message_id' => $main_message['id'], 'action' => 'edit_message_group', - 'anchor_topic' => 'topic_' . $main_message['id'], + 'anchor_topic' => 'topic_'.$main_message['id'], 'topics_page_nr' => $topic_page_nr, 'items_page_nr' => $items_page_nr, 'topic_id' => $main_message['id'] @@ -1292,7 +1292,7 @@ class MessageManager if (api_is_platform_admin()) { $links .= Display::url( Display::returnFontAwesomeIcon('trash'), - 'group_topics.php?action=delete&id=' . $group_id . '&topic_id=' . $topic_id, + 'group_topics.php?action=delete&id='.$group_id.'&topic_id='.$topic_id, [ 'class' => 'btn btn-default' ] @@ -1317,7 +1317,7 @@ class MessageManager 'group_id' => $group_id, 'message_id' => $main_message['id'], 'action' => 'reply_message_group', - 'anchor_topic' => 'topic_' . $main_message['id'], + 'anchor_topic' => 'topic_'.$main_message['id'], 'topics_page_nr' => $topic_page_nr, 'topic_id' => $main_message['id'] ]); @@ -1335,31 +1335,31 @@ class MessageManager $links .= '
'; $links .= ''; - $title = '

' . Security::remove_XSS($main_message['title'], STUDENT, true) . $links . '

'; + $title = '

'.Security::remove_XSS($main_message['title'], STUDENT, true).$links.'

'; $userPicture = $user_sender_info['avatar']; $main_content .= '
'; $main_content .= '
'; $main_content .= '
'; - $main_content .= '' . $name . ''; + $main_content .= ''.$name.''; $main_content .= '
'; $main_content .= '
'; $date = ''; if ($main_message['send_date'] != $main_message['update_date']) { if (!empty($main_message['update_date'])) { - $date = '
'. Display::returnFontAwesomeIcon('calendar') .' ' . get_lang('LastUpdate') . ' ' . date_to_str_ago($main_message['update_date']) . '
'; + $date = '
'.Display::returnFontAwesomeIcon('calendar').' '.get_lang('LastUpdate').' '.date_to_str_ago($main_message['update_date']).'
'; } } else { - $date = '
' . Display::returnFontAwesomeIcon('calendar') .' ' . get_lang('Created') . ' ' . date_to_str_ago($main_message['send_date']) . '
'; + $date = '
'.Display::returnFontAwesomeIcon('calendar').' '.get_lang('Created').' '.date_to_str_ago($main_message['send_date']).'
'; } - $attachment = '
' . (!empty($files_attachments) ? implode('
', $files_attachments) : '') . '
'; + $attachment = '
'.(!empty($files_attachments) ? implode('
', $files_attachments) : '').'
'; $main_content .= '
'; - $user_link = '' . $name . ''; + $user_link = ''.$name.''; $main_content .= '
'; - $main_content .= '
' . $user_link . '
'; - $main_content .= $date ; - $main_content .= '
'. $main_message['content'] . $attachment . '
'; + $main_content .= '
'.$user_link.'
'; + $main_content .= $date; + $main_content .= '
'.$main_message['content'].$attachment.'
'; $main_content .= '
'; $main_content .= ''; @@ -1380,7 +1380,7 @@ class MessageManager if (empty($topic['id'])) { continue; } - $items_page_nr = isset($_GET['items_' . $topic['id'] . '_page_nr']) ? intval($_GET['items_' . $topic['id'] . '_page_nr']) : null; + $items_page_nr = isset($_GET['items_'.$topic['id'].'_page_nr']) ? intval($_GET['items_'.$topic['id'].'_page_nr']) : null; $links = ''; $links .= '
'; $html_items = ''; @@ -1390,36 +1390,36 @@ class MessageManager $links .= '
'; if (($my_group_role == GROUP_USER_PERMISSION_ADMIN || $my_group_role == GROUP_USER_PERMISSION_MODERATOR) || $topic['user_sender_id'] == $current_user_id) { - $links .= '' . - Display::returnFontAwesomeIcon('pencil') . ''; + $links .= ''. + Display::returnFontAwesomeIcon('pencil').''; } - $links .= ''; - $links .= Display::returnFontAwesomeIcon('commenting') . ''; + $links .= ''; + $links .= Display::returnFontAwesomeIcon('commenting').''; $links .= '
'; $links .= '
'; $userPicture = $user_sender_info['avatar']; - $user_link = '' . $name . ' '; + $user_link = ''.$name.' '; $html_items .= '
'; $html_items .= '
'; - $html_items .= '
' . $name . '
'; + $html_items .= '
'.$name.'
'; $html_items .= '
'; $date = ''; if ($topic['send_date'] != $topic['update_date']) { if (!empty($topic['update_date'])) { - $date = '
' . Display::returnFontAwesomeIcon('calendar') .' '. get_lang('LastUpdate') . ' ' . date_to_str_ago($topic['update_date']) . '
'; + $date = '
'.Display::returnFontAwesomeIcon('calendar').' '.get_lang('LastUpdate').' '.date_to_str_ago($topic['update_date']).'
'; } } else { - $date = '
' . Display::returnFontAwesomeIcon('calendar') . get_lang('Created') . ' ' . date_to_str_ago($topic['send_date']) . '
'; + $date = '
'.Display::returnFontAwesomeIcon('calendar').get_lang('Created').' '.date_to_str_ago($topic['send_date']).'
'; } - $attachment = '
' . (!empty($files_attachments) ? implode('
', $files_attachments) : '') . '
'; + $attachment = '
'.(!empty($files_attachments) ? implode('
', $files_attachments) : '').'
'; $html_items .= '
'; $html_items .= '
'; $html_items .= $links; - $html_items .= '
' . $user_link . '
'; + $html_items .= '
'.$user_link.'
'; $html_items .= $date; - $html_items .= '
' . Security::remove_XSS($topic['content'], STUDENT, true) . '
' . $attachment . '
'; + $html_items .= '
'.Security::remove_XSS($topic['content'], STUDENT, true).'
'.$attachment.'
'; $html_items .= '
'; $html_items .= ''; @@ -1431,8 +1431,8 @@ class MessageManager $indent = intval($topic['indent_cnt']) * $base_padding + $base_padding; } - $html_items = Display::div($html_items, array('class' => 'message-post', 'id' => 'msg_' . $topic['id'])); - $html_items = Display::div($html_items, array('class' => '', 'style' => 'margin-left:' . $indent . 'px')); + $html_items = Display::div($html_items, array('class' => 'message-post', 'id' => 'msg_'.$topic['id'])); + $html_items = Display::div($html_items, array('class' => '', 'style' => 'margin-left:'.$indent.'px')); $array_html_items[] = array($html_items); } @@ -1446,7 +1446,7 @@ class MessageManager ); if (!empty($array_html_items)) { $html .= Display::return_sortable_grid( - 'items_' . $topic['id'], + 'items_'.$topic['id'], array(), $array_html_items, $options, @@ -1537,14 +1537,14 @@ class MessageManager $rs_file = Database::query($sql); if (Database::num_rows($rs_file) > 0) { $attach_icon = Display::return_icon('attachment.gif', ''); - $archiveURL = api_get_path(WEB_CODE_PATH) . 'messages/download.php?type=' . $type . '&file='; + $archiveURL = api_get_path(WEB_CODE_PATH).'messages/download.php?type='.$type.'&file='; while ($row_file = Database::fetch_array($rs_file)) { $archiveFile = $row_file['path']; $filename = $row_file['filename']; $filesize = format_file_size($row_file['size']); $filecomment = Security::remove_XSS($row_file['comment']); $filename = Security::remove_XSS($filename); - $links_attach_file[] = $attach_icon . ' ' . $filename . ' (' . $filesize . ')' . (!empty($filecomment) ? ' - ' . $filecomment . '' : ''); + $links_attach_file[] = $attach_icon.' '.$filename.' ('.$filesize.')'.(!empty($filecomment) ? ' - '.$filecomment.'' : ''); } } } @@ -1563,7 +1563,7 @@ class MessageManager $sql = "SELECT * FROM $tbl_message WHERE id = '$message_id' AND - msg_status <> '" . MESSAGE_STATUS_DELETED . "' "; + msg_status <> '".MESSAGE_STATUS_DELETED."' "; $res = Database::query($sql); $item = array(); if (Database::num_rows($res) > 0) { @@ -1690,7 +1690,7 @@ class MessageManager Session::write('message_sent_search_keyword', $keyword); - $success = get_lang('SelectedMessagesDeleted') . ' 
' . get_lang('BackToOutbox') . ''; + $success = get_lang('SelectedMessagesDeleted').' 
'.get_lang('BackToOutbox').''; $html = null; if (isset($_REQUEST['action'])) { @@ -1798,7 +1798,7 @@ class MessageManager ON m.user_sender_id = u.user_id WHERE m.user_receiver_id = $userId AND - m.msg_status = " . MESSAGE_STATUS_UNREAD . " + m.msg_status = ".MESSAGE_STATUS_UNREAD." AND m.id > $lastId ORDER BY m.send_date DESC"; @@ -1887,11 +1887,11 @@ class MessageManager ); $tplMailBody->assign('user', $user); $tplMailBody->assign('is_western_name_order', api_is_western_name_order()); - $tplMailBody->assign('manageUrl', api_get_path(WEB_CODE_PATH) . 'admin/user_edit.php?user_id=' . $user->getId()); + $tplMailBody->assign('manageUrl', api_get_path(WEB_CODE_PATH).'admin/user_edit.php?user_id='.$user->getId()); $layoutContent = $tplMailBody->get_template('mail/new_user_mail_to_admin.tpl'); - $emailsubject = '[' . get_lang('UserRegistered') . '] ' . $user->getUsername(); + $emailsubject = '['.get_lang('UserRegistered').'] '.$user->getUsername(); $emailbody = $tplMailBody->fetch($layoutContent); $admins = UserManager::get_all_administrators(); @@ -1922,8 +1922,8 @@ class MessageManager */ public static function failedSentMailErrors() { - $base = api_get_path(SYS_ARCHIVE_PATH) . 'mail/'; - $mailq = $base . 'mailq'; + $base = api_get_path(SYS_ARCHIVE_PATH).'mail/'; + $mailq = $base.'mailq'; if (!file_exists($mailq) || !is_readable($mailq)) { return false; @@ -1944,7 +1944,7 @@ class MessageManager $mail_queue[$i]['code'] = $codeMatches[2]; } - $fullMail = $base . $mail_queue[$i]['code']; + $fullMail = $base.$mail_queue[$i]['code']; $mailFile = fopen($fullMail, 'r'); //Get the reason of mail fail @@ -1967,7 +1967,7 @@ class MessageManager //Get the time of mail fail if (preg_match('/^\s?(\d+)(\D+)\s+(.*)$/', $line, $timeMatches)) { - $mail_queue[$i]['time'] = $timeMatches[1] . $timeMatches[2]; + $mail_queue[$i]['time'] = $timeMatches[1].$timeMatches[2]; } elseif (preg_match('/^(\s+)((.*)@(.*))\s+(.*)$/', $line, $emailMatches)) { $mail_queue[$i]['mail'] = $emailMatches[2]; $i++; diff --git a/main/reports/reports.php b/main/reports/reports.php index 71b342544b..68143e0964 100755 --- a/main/reports/reports.php +++ b/main/reports/reports.php @@ -11,7 +11,7 @@ $cidReset = true; // including files -require_once __DIR__ . '/../inc/global.inc.php'; +require_once __DIR__.'/../inc/global.inc.php'; require_once 'reports.lib.php'; require_once 'multiquery.lib.php'; @@ -39,16 +39,16 @@ if ($_REQUEST['format'] == 'link') { $kv = array(); foreach ($_POST as $key => $value) { if ($key != 'format') { - $kv[] = $key . '=' . urlencode($value); + $kv[] = $key.'='.urlencode($value); } } $query_string = join("&", $kv); - die('' . get_lang('ReportTypeLink') . ''); + die(''.get_lang('ReportTypeLink').''); } if ($_REQUEST['format'] == 'directlink') { foreach (array('jquery.dataTables.min.js') as $js) { - $htmlHeadXtra[] = '' . "\n"; + $htmlHeadXtra[] = ''."\n"; } $htmlCSSXtra[] = 'dataTable.css'; @@ -77,11 +77,11 @@ if ($_REQUEST['format'] == 'csv') { $kv = array(); foreach ($_POST as $key => $value) { if ($key != 'format') { - $kv[] = $key . '=' . urlencode($value); + $kv[] = $key.'='.urlencode($value); } } $query_string = join("&", $kv); - die('' . get_lang('DownloadFile') . ''); + die(''.get_lang('DownloadFile').''); } else { if ($_REQUEST['format'] == 'downloadcsv') { if ((strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) && (strpos($_SERVER['HTTP_USER_AGENT'], @@ -120,7 +120,7 @@ if (is_array($reports_template[$_REQUEST['type']])) { //die(get_lang('NoDataAvailable')); } } else { - die('' . get_lang('ErrorWhileBuildingReport') . ''); + die(''.get_lang('ErrorWhileBuildingReport').''); } if ($_REQUEST['format'] == 'html' || $_REQUEST['format'] == 'directlink') { @@ -130,14 +130,14 @@ if ($_REQUEST['format'] == 'html' || $_REQUEST['format'] == 'directlink') { echo ''; - echo ''; // FIXME style + echo '
'; // FIXME style // counting fields $nfields = multiquery_num_fields($result); @@ -163,7 +163,7 @@ if ($_REQUEST['format'] == 'html' || $_REQUEST['format'] == 'directlink') { $columns[$i] = multiquery_field_name($result, $i); if (substr($columns[$i], -5, 5) != '_link') { $column_islink[$i] = false; - echo ''; + echo ''; } else { $columns_islink[$i] = true; } @@ -173,8 +173,8 @@ if ($_REQUEST['format'] == 'html' || $_REQUEST['format'] == 'directlink') { $columns_flip = array_flip($columns); $columns_link = array(); for ($i = 0; $i < $nfields; $i++) { - if ($column_islink[$i] == false && array_key_exists($columns[$i] . '_link', $columns_flip)) { - $columns_link[$i] = $columns_flip[$columns[$i] . '_link']; + if ($column_islink[$i] == false && array_key_exists($columns[$i].'_link', $columns_flip)) { + $columns_link[$i] = $columns_flip[$columns[$i].'_link']; } else { $columns_link[$i] = ''; } @@ -187,12 +187,12 @@ if ($_REQUEST['format'] == 'html' || $_REQUEST['format'] == 'directlink') { if ($columns_link[$i] != '') // link is defined { if (substr($columns_link[$i], 0, 10) == 'javascript') { - echo ''; + echo ''; } else { - echo ''; + echo ''; } } else { - echo ''; + echo ''; } } } @@ -220,7 +220,7 @@ if ($_REQUEST['format'] == 'html' || $_REQUEST['format'] == 'directlink') { $columns[$i] = multiquery_field_name($result, $i); if (substr($columns[$i], -5, 5) != '_link') { $column_islink[$i] = false; - echo csv_escaping($columns[$i]) . ','; + echo csv_escaping($columns[$i]).','; } else { $columns_islink[$i] = true; } @@ -231,7 +231,7 @@ if ($_REQUEST['format'] == 'html' || $_REQUEST['format'] == 'directlink') { for ($i = 0; $i < $nfields; $i++) { if (!$columns_islink[$i]) // ignore links { - echo csv_escaping($row[$i]) . ','; + echo csv_escaping($row[$i]).','; } } // fixme echo "\n"; @@ -245,7 +245,7 @@ function csv_escaping($value, $csv_separator = ',') { $value = str_replace('"', '""', $value); if (strpos($value, '""') or strpos($value, $csv_separator) or $value != trim($value)) { - $value = '"' . $value . '"'; + $value = '"'.$value.'"'; } return $value; } diff --git a/main/session/session_category_edit.php b/main/session/session_category_edit.php index 141216ec24..1dd5e6e26c 100644 --- a/main/session/session_category_edit.php +++ b/main/session/session_category_edit.php @@ -33,10 +33,10 @@ if (!$infos = Database::fetch_array($result)) { exit(); } -list($year_start,$month_start,$day_start)=explode('-',$infos['date_start']); -list($year_end,$month_end,$day_end)=explode('-',$infos['date_end']); +list($year_start, $month_start, $day_start) = explode('-', $infos['date_start']); +list($year_end, $month_end, $day_end) = explode('-', $infos['date_end']); -if (!api_is_platform_admin() && $infos['session_admin_id']!=$_user['user_id'] && !api_is_session_admin()) { +if (!api_is_platform_admin() && $infos['session_admin_id'] != $_user['user_id'] && !api_is_session_admin()) { api_not_allowed(true); } @@ -73,24 +73,24 @@ $thisDay = date('d'); // display the header Display::display_header($tool_name); if (!empty($return)) { - Display::display_error_message($return,false); + Display::display_error_message($return, false); } ?>
- +
- +
- +
@@ -100,58 +100,58 @@ if (!empty($return)) {
/ / @@ -163,61 +163,61 @@ if (!empty($return)) {
/ / @@ -238,7 +238,7 @@ if (!empty($return)) {
' . $columns[$i] . ''.$columns[$i].'' . $row[$i] . ''.$row[$i].'' . $row[$i] . ''.$row[$i].'' . $row[$i] . ''.$row[$i].'