@@ -18,11 +18,11 @@ discard block |
||
18 | 18 | |
19 | 19 | api_protect_admin_script(true); |
20 | 20 | |
21 | -$formSent=0; |
|
22 | -$errorMsg=''; |
|
21 | +$formSent = 0; |
|
22 | +$errorMsg = ''; |
|
23 | 23 | //$interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin')); |
24 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
25 | -$interbreadcrumb[] = array('url' => "session_category_list.php","name" => get_lang('ListSessionCategory')); |
|
24 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
25 | +$interbreadcrumb[] = array('url' => "session_category_list.php", "name" => get_lang('ListSessionCategory')); |
|
26 | 26 | |
27 | 27 | // Database Table Definitions |
28 | 28 | $tbl_user = Database::get_main_table(TABLE_MAIN_USER); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | //display the header |
62 | 62 | Display::display_header($tool_name); |
63 | 63 | if (!empty($return)) { |
64 | - Display::display_error_message($return,false); |
|
64 | + Display::display_error_message($return, false); |
|
65 | 65 | } |
66 | 66 | ?> |
67 | 67 | <div class="row"> |
@@ -72,13 +72,13 @@ discard block |
||
72 | 72 | <div class="form-group"> |
73 | 73 | <label class="col-sm-3 control-label"><?php echo get_lang('SessionCategoryName') ?></label> |
74 | 74 | <div class="col-sm-6"> |
75 | - <input type="text" class="form-control" name="name" placeholder="<?php echo get_lang('Category') ?>" size="50" maxlength="50" value="<?php if($formSent) echo api_htmlentities($name,ENT_QUOTES,$charset); ?>"> |
|
75 | + <input type="text" class="form-control" name="name" placeholder="<?php echo get_lang('Category') ?>" size="50" maxlength="50" value="<?php if ($formSent) echo api_htmlentities($name, ENT_QUOTES, $charset); ?>"> |
|
76 | 76 | </div> |
77 | 77 | <div class="col-md-3"></div> |
78 | 78 | </div> |
79 | 79 | <div class="form-group"> |
80 | 80 | <div class="col-sm-offset-3 col-sm-6"> |
81 | - <?php echo get_lang('TheTimeLimitsAreReferential');?> <a href="javascript://" onclick="if(document.getElementById('options').style.display == 'none'){document.getElementById('options').style.display = 'block';}else{document.getElementById('options').style.display = 'none';}"><?php echo get_lang('AddTimeLimit') ?></a> |
|
81 | + <?php echo get_lang('TheTimeLimitsAreReferential'); ?> <a href="javascript://" onclick="if(document.getElementById('options').style.display == 'none'){document.getElementById('options').style.display = 'block';}else{document.getElementById('options').style.display = 'none';}"><?php echo get_lang('AddTimeLimit') ?></a> |
|
82 | 82 | </div> |
83 | 83 | <div class="col-md-3"></div> |
84 | 84 | </div> |
@@ -90,58 +90,58 @@ discard block |
||
90 | 90 | <div class="col-sm-6"> |
91 | 91 | <select name="day_start"> |
92 | 92 | <option value="1">01</option> |
93 | - <option value="2" <?php if((!$formSent && $thisDay == 2) || ($formSent && $day_start == 2)) echo 'selected="selected"'; ?> >02</option> |
|
94 | - <option value="3" <?php if((!$formSent && $thisDay == 3) || ($formSent && $day_start == 3)) echo 'selected="selected"'; ?> >03</option> |
|
95 | - <option value="4" <?php if((!$formSent && $thisDay == 4) || ($formSent && $day_start == 4)) echo 'selected="selected"'; ?> >04</option> |
|
96 | - <option value="5" <?php if((!$formSent && $thisDay == 5) || ($formSent && $day_start == 5)) echo 'selected="selected"'; ?> >05</option> |
|
97 | - <option value="6" <?php if((!$formSent && $thisDay == 6) || ($formSent && $day_start == 6)) echo 'selected="selected"'; ?> >06</option> |
|
98 | - <option value="7" <?php if((!$formSent && $thisDay == 7) || ($formSent && $day_start == 7)) echo 'selected="selected"'; ?> >07</option> |
|
99 | - <option value="8" <?php if((!$formSent && $thisDay == 8) || ($formSent && $day_start == 8)) echo 'selected="selected"'; ?> >08</option> |
|
100 | - <option value="9" <?php if((!$formSent && $thisDay == 9) || ($formSent && $day_start == 9)) echo 'selected="selected"'; ?> >09</option> |
|
101 | - <option value="10" <?php if((!$formSent && $thisDay == 10) || ($formSent && $day_start == 10)) echo 'selected="selected"'; ?> >10</option> |
|
102 | - <option value="11" <?php if((!$formSent && $thisDay == 11) || ($formSent && $day_start == 11)) echo 'selected="selected"'; ?> >11</option> |
|
103 | - <option value="12" <?php if((!$formSent && $thisDay == 12) || ($formSent && $day_start == 12)) echo 'selected="selected"'; ?> >12</option> |
|
104 | - <option value="13" <?php if((!$formSent && $thisDay == 13) || ($formSent && $day_start == 13)) echo 'selected="selected"'; ?> >13</option> |
|
105 | - <option value="14" <?php if((!$formSent && $thisDay == 14) || ($formSent && $day_start == 14)) echo 'selected="selected"'; ?> >14</option> |
|
106 | - <option value="15" <?php if((!$formSent && $thisDay == 15) || ($formSent && $day_start == 15)) echo 'selected="selected"'; ?> >15</option> |
|
107 | - <option value="16" <?php if((!$formSent && $thisDay == 16) || ($formSent && $day_start == 16)) echo 'selected="selected"'; ?> >16</option> |
|
108 | - <option value="17" <?php if((!$formSent && $thisDay == 17) || ($formSent && $day_start == 17)) echo 'selected="selected"'; ?> >17</option> |
|
109 | - <option value="18" <?php if((!$formSent && $thisDay == 18) || ($formSent && $day_start == 18)) echo 'selected="selected"'; ?> >18</option> |
|
110 | - <option value="19" <?php if((!$formSent && $thisDay == 19) || ($formSent && $day_start == 19)) echo 'selected="selected"'; ?> >19</option> |
|
111 | - <option value="20" <?php if((!$formSent && $thisDay == 20) || ($formSent && $day_start == 20)) echo 'selected="selected"'; ?> >20</option> |
|
112 | - <option value="21" <?php if((!$formSent && $thisDay == 21) || ($formSent && $day_start == 21)) echo 'selected="selected"'; ?> >21</option> |
|
113 | - <option value="22" <?php if((!$formSent && $thisDay == 22) || ($formSent && $day_start == 22)) echo 'selected="selected"'; ?> >22</option> |
|
114 | - <option value="23" <?php if((!$formSent && $thisDay == 23) || ($formSent && $day_start == 23)) echo 'selected="selected"'; ?> >23</option> |
|
115 | - <option value="24" <?php if((!$formSent && $thisDay == 24) || ($formSent && $day_start == 24)) echo 'selected="selected"'; ?> >24</option> |
|
116 | - <option value="25" <?php if((!$formSent && $thisDay == 25) || ($formSent && $day_start == 25)) echo 'selected="selected"'; ?> >25</option> |
|
117 | - <option value="26" <?php if((!$formSent && $thisDay == 26) || ($formSent && $day_start == 26)) echo 'selected="selected"'; ?> >26</option> |
|
118 | - <option value="27" <?php if((!$formSent && $thisDay == 27) || ($formSent && $day_start == 27)) echo 'selected="selected"'; ?> >27</option> |
|
119 | - <option value="28" <?php if((!$formSent && $thisDay == 28) || ($formSent && $day_start == 28)) echo 'selected="selected"'; ?> >28</option> |
|
120 | - <option value="29" <?php if((!$formSent && $thisDay == 29) || ($formSent && $day_start == 29)) echo 'selected="selected"'; ?> >29</option> |
|
121 | - <option value="30" <?php if((!$formSent && $thisDay == 30) || ($formSent && $day_start == 30)) echo 'selected="selected"'; ?> >30</option> |
|
122 | - <option value="31" <?php if((!$formSent && $thisDay == 31) || ($formSent && $day_start == 31)) echo 'selected="selected"'; ?> >31</option> |
|
93 | + <option value="2" <?php if ((!$formSent && $thisDay == 2) || ($formSent && $day_start == 2)) echo 'selected="selected"'; ?> >02</option> |
|
94 | + <option value="3" <?php if ((!$formSent && $thisDay == 3) || ($formSent && $day_start == 3)) echo 'selected="selected"'; ?> >03</option> |
|
95 | + <option value="4" <?php if ((!$formSent && $thisDay == 4) || ($formSent && $day_start == 4)) echo 'selected="selected"'; ?> >04</option> |
|
96 | + <option value="5" <?php if ((!$formSent && $thisDay == 5) || ($formSent && $day_start == 5)) echo 'selected="selected"'; ?> >05</option> |
|
97 | + <option value="6" <?php if ((!$formSent && $thisDay == 6) || ($formSent && $day_start == 6)) echo 'selected="selected"'; ?> >06</option> |
|
98 | + <option value="7" <?php if ((!$formSent && $thisDay == 7) || ($formSent && $day_start == 7)) echo 'selected="selected"'; ?> >07</option> |
|
99 | + <option value="8" <?php if ((!$formSent && $thisDay == 8) || ($formSent && $day_start == 8)) echo 'selected="selected"'; ?> >08</option> |
|
100 | + <option value="9" <?php if ((!$formSent && $thisDay == 9) || ($formSent && $day_start == 9)) echo 'selected="selected"'; ?> >09</option> |
|
101 | + <option value="10" <?php if ((!$formSent && $thisDay == 10) || ($formSent && $day_start == 10)) echo 'selected="selected"'; ?> >10</option> |
|
102 | + <option value="11" <?php if ((!$formSent && $thisDay == 11) || ($formSent && $day_start == 11)) echo 'selected="selected"'; ?> >11</option> |
|
103 | + <option value="12" <?php if ((!$formSent && $thisDay == 12) || ($formSent && $day_start == 12)) echo 'selected="selected"'; ?> >12</option> |
|
104 | + <option value="13" <?php if ((!$formSent && $thisDay == 13) || ($formSent && $day_start == 13)) echo 'selected="selected"'; ?> >13</option> |
|
105 | + <option value="14" <?php if ((!$formSent && $thisDay == 14) || ($formSent && $day_start == 14)) echo 'selected="selected"'; ?> >14</option> |
|
106 | + <option value="15" <?php if ((!$formSent && $thisDay == 15) || ($formSent && $day_start == 15)) echo 'selected="selected"'; ?> >15</option> |
|
107 | + <option value="16" <?php if ((!$formSent && $thisDay == 16) || ($formSent && $day_start == 16)) echo 'selected="selected"'; ?> >16</option> |
|
108 | + <option value="17" <?php if ((!$formSent && $thisDay == 17) || ($formSent && $day_start == 17)) echo 'selected="selected"'; ?> >17</option> |
|
109 | + <option value="18" <?php if ((!$formSent && $thisDay == 18) || ($formSent && $day_start == 18)) echo 'selected="selected"'; ?> >18</option> |
|
110 | + <option value="19" <?php if ((!$formSent && $thisDay == 19) || ($formSent && $day_start == 19)) echo 'selected="selected"'; ?> >19</option> |
|
111 | + <option value="20" <?php if ((!$formSent && $thisDay == 20) || ($formSent && $day_start == 20)) echo 'selected="selected"'; ?> >20</option> |
|
112 | + <option value="21" <?php if ((!$formSent && $thisDay == 21) || ($formSent && $day_start == 21)) echo 'selected="selected"'; ?> >21</option> |
|
113 | + <option value="22" <?php if ((!$formSent && $thisDay == 22) || ($formSent && $day_start == 22)) echo 'selected="selected"'; ?> >22</option> |
|
114 | + <option value="23" <?php if ((!$formSent && $thisDay == 23) || ($formSent && $day_start == 23)) echo 'selected="selected"'; ?> >23</option> |
|
115 | + <option value="24" <?php if ((!$formSent && $thisDay == 24) || ($formSent && $day_start == 24)) echo 'selected="selected"'; ?> >24</option> |
|
116 | + <option value="25" <?php if ((!$formSent && $thisDay == 25) || ($formSent && $day_start == 25)) echo 'selected="selected"'; ?> >25</option> |
|
117 | + <option value="26" <?php if ((!$formSent && $thisDay == 26) || ($formSent && $day_start == 26)) echo 'selected="selected"'; ?> >26</option> |
|
118 | + <option value="27" <?php if ((!$formSent && $thisDay == 27) || ($formSent && $day_start == 27)) echo 'selected="selected"'; ?> >27</option> |
|
119 | + <option value="28" <?php if ((!$formSent && $thisDay == 28) || ($formSent && $day_start == 28)) echo 'selected="selected"'; ?> >28</option> |
|
120 | + <option value="29" <?php if ((!$formSent && $thisDay == 29) || ($formSent && $day_start == 29)) echo 'selected="selected"'; ?> >29</option> |
|
121 | + <option value="30" <?php if ((!$formSent && $thisDay == 30) || ($formSent && $day_start == 30)) echo 'selected="selected"'; ?> >30</option> |
|
122 | + <option value="31" <?php if ((!$formSent && $thisDay == 31) || ($formSent && $day_start == 31)) echo 'selected="selected"'; ?> >31</option> |
|
123 | 123 | </select> |
124 | 124 | / |
125 | 125 | <select name="month_start"> |
126 | 126 | <option value="1">01</option> |
127 | - <option value="2" <?php if((!$formSent && $thisMonth == 2) || ($formSent && $month_start == 2)) echo 'selected="selected"'; ?> >02</option> |
|
128 | - <option value="3" <?php if((!$formSent && $thisMonth == 3) || ($formSent && $month_start == 3)) echo 'selected="selected"'; ?> >03</option> |
|
129 | - <option value="4" <?php if((!$formSent && $thisMonth == 4) || ($formSent && $month_start == 4)) echo 'selected="selected"'; ?> >04</option> |
|
130 | - <option value="5" <?php if((!$formSent && $thisMonth == 5) || ($formSent && $month_start == 5)) echo 'selected="selected"'; ?> >05</option> |
|
131 | - <option value="6" <?php if((!$formSent && $thisMonth == 6) || ($formSent && $month_start == 6)) echo 'selected="selected"'; ?> >06</option> |
|
132 | - <option value="7" <?php if((!$formSent && $thisMonth == 7) || ($formSent && $month_start == 7)) echo 'selected="selected"'; ?> >07</option> |
|
133 | - <option value="8" <?php if((!$formSent && $thisMonth == 8) || ($formSent && $month_start == 8)) echo 'selected="selected"'; ?> >08</option> |
|
134 | - <option value="9" <?php if((!$formSent && $thisMonth == 9) || ($formSent && $month_start == 9)) echo 'selected="selected"'; ?> >09</option> |
|
135 | - <option value="10" <?php if((!$formSent && $thisMonth == 10) || ($formSent && $month_start == 10)) echo 'selected="selected"'; ?> >10</option> |
|
136 | - <option value="11" <?php if((!$formSent && $thisMonth == 11) || ($formSent && $month_start == 11)) echo 'selected="selected"'; ?> >11</option> |
|
137 | - <option value="12" <?php if((!$formSent && $thisMonth == 12) || ($formSent && $month_start == 12)) echo 'selected="selected"'; ?> >12</option> |
|
127 | + <option value="2" <?php if ((!$formSent && $thisMonth == 2) || ($formSent && $month_start == 2)) echo 'selected="selected"'; ?> >02</option> |
|
128 | + <option value="3" <?php if ((!$formSent && $thisMonth == 3) || ($formSent && $month_start == 3)) echo 'selected="selected"'; ?> >03</option> |
|
129 | + <option value="4" <?php if ((!$formSent && $thisMonth == 4) || ($formSent && $month_start == 4)) echo 'selected="selected"'; ?> >04</option> |
|
130 | + <option value="5" <?php if ((!$formSent && $thisMonth == 5) || ($formSent && $month_start == 5)) echo 'selected="selected"'; ?> >05</option> |
|
131 | + <option value="6" <?php if ((!$formSent && $thisMonth == 6) || ($formSent && $month_start == 6)) echo 'selected="selected"'; ?> >06</option> |
|
132 | + <option value="7" <?php if ((!$formSent && $thisMonth == 7) || ($formSent && $month_start == 7)) echo 'selected="selected"'; ?> >07</option> |
|
133 | + <option value="8" <?php if ((!$formSent && $thisMonth == 8) || ($formSent && $month_start == 8)) echo 'selected="selected"'; ?> >08</option> |
|
134 | + <option value="9" <?php if ((!$formSent && $thisMonth == 9) || ($formSent && $month_start == 9)) echo 'selected="selected"'; ?> >09</option> |
|
135 | + <option value="10" <?php if ((!$formSent && $thisMonth == 10) || ($formSent && $month_start == 10)) echo 'selected="selected"'; ?> >10</option> |
|
136 | + <option value="11" <?php if ((!$formSent && $thisMonth == 11) || ($formSent && $month_start == 11)) echo 'selected="selected"'; ?> >11</option> |
|
137 | + <option value="12" <?php if ((!$formSent && $thisMonth == 12) || ($formSent && $month_start == 12)) echo 'selected="selected"'; ?> >12</option> |
|
138 | 138 | </select> |
139 | 139 | / |
140 | 140 | <select name="year_start"> |
141 | 141 | <?php |
142 | - for ($i=$thisYear-5;$i <= ($thisYear+5);$i++) { |
|
142 | + for ($i = $thisYear - 5; $i <= ($thisYear + 5); $i++) { |
|
143 | 143 | ?> |
144 | - <option value="<?php echo $i; ?>" <?php if((!$formSent && $thisYear == $i) || ($formSent && $year_start == $i)) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
144 | + <option value="<?php echo $i; ?>" <?php if ((!$formSent && $thisYear == $i) || ($formSent && $year_start == $i)) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
145 | 145 | <?php |
146 | 146 | } |
147 | 147 | ?> |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | <select name="year_end"> |
207 | 207 | <option value="0">----</option> |
208 | 208 | <?php |
209 | - for ($i=$thisYear-5;$i <= ($thisYear+5);$i++) { |
|
209 | + for ($i = $thisYear - 5; $i <= ($thisYear + 5); $i++) { |
|
210 | 210 | ?> |
211 | 211 | <option value="<?php echo $i; ?>"><?php echo $i; ?></option> |
212 | 212 | <?php |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | $tool_name = get_lang('ExportSessionListXMLCSV'); |
34 | 34 | |
35 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
35 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
36 | 36 | |
37 | 37 | set_time_limit(0); |
38 | 38 | |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | ORDER BY id"; |
57 | 57 | |
58 | 58 | if (api_is_multiple_url_enabled()) { |
59 | - $tbl_session_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
59 | + $tbl_session_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
60 | 60 | $access_url_id = api_get_current_access_url_id(); |
61 | - if ($access_url_id != -1){ |
|
61 | + if ($access_url_id != -1) { |
|
62 | 62 | $sql = "SELECT s.id, name,id_coach,username,access_start_date,access_end_date,visibility,session_category_id |
63 | 63 | FROM $tbl_session s |
64 | 64 | INNER JOIN $tbl_session_rel_access_url as session_rel_url |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | $archiveFile = 'export_sessions_'.$session_id.'_'.api_get_local_time().'.'.$file_type; |
115 | 115 | while (file_exists($archivePath.$archiveFile)) { |
116 | - $archiveFile ='export_users_'.$session_id.'_'.api_get_local_time().'_'.uniqid('').'.'.$file_type; |
|
116 | + $archiveFile = 'export_users_'.$session_id.'_'.api_get_local_time().'_'.uniqid('').'.'.$file_type; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | $cvs = false; |
@@ -123,12 +123,12 @@ discard block |
||
123 | 123 | |
124 | 124 | |
125 | 125 | while ($row = Database::fetch_array($result)) { |
126 | - $row['name'] = str_replace(';',',',$row['name']); |
|
127 | - $row['username'] = str_replace(';',',',$row['username']); |
|
128 | - $row['access_start_date'] = str_replace(';',',',$row['access_start_date']); |
|
129 | - $row['access_end_date'] = str_replace(';',',',$row['access_end_date']); |
|
130 | - $row['visibility'] = str_replace(';',',',$row['visibility']); |
|
131 | - $row['session_category'] = str_replace(';',',',$row['session_category_id']); |
|
126 | + $row['name'] = str_replace(';', ',', $row['name']); |
|
127 | + $row['username'] = str_replace(';', ',', $row['username']); |
|
128 | + $row['access_start_date'] = str_replace(';', ',', $row['access_start_date']); |
|
129 | + $row['access_end_date'] = str_replace(';', ',', $row['access_end_date']); |
|
130 | + $row['visibility'] = str_replace(';', ',', $row['visibility']); |
|
131 | + $row['session_category'] = str_replace(';', ',', $row['session_category_id']); |
|
132 | 132 | |
133 | 133 | |
134 | 134 | // users |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | |
143 | 143 | $rsUsers = Database::query($sql); |
144 | 144 | $users = ''; |
145 | - while ($rowUsers = Database::fetch_array($rsUsers)){ |
|
146 | - if($cvs){ |
|
147 | - $users .= str_replace(';',',',$rowUsers['username']).'|'; |
|
145 | + while ($rowUsers = Database::fetch_array($rsUsers)) { |
|
146 | + if ($cvs) { |
|
147 | + $users .= str_replace(';', ',', $rowUsers['username']).'|'; |
|
148 | 148 | } else { |
149 | 149 | $users .= "\t\t<User>$rowUsers[username]</User>\n"; |
150 | 150 | } |
@@ -184,8 +184,8 @@ discard block |
||
184 | 184 | $coachs = implode(",", $coachs); |
185 | 185 | |
186 | 186 | if ($cvs) { |
187 | - $courses .= str_replace(';',',',$rowCourses['code']); |
|
188 | - $courses .= '['.str_replace(';',',',$coachs).']['; |
|
187 | + $courses .= str_replace(';', ',', $rowCourses['code']); |
|
188 | + $courses .= '['.str_replace(';', ',', $coachs).']['; |
|
189 | 189 | } else { |
190 | 190 | $courses .= "\t\t<Course>\n"; |
191 | 191 | $courses .= "\t\t\t<CourseCode>$rowCourses[code]</CourseCode>\n"; |
@@ -208,9 +208,9 @@ discard block |
||
208 | 208 | |
209 | 209 | $rsUsersCourse = Database::query($sql); |
210 | 210 | $userscourse = ''; |
211 | - while ($rowUsersCourse = Database::fetch_array($rsUsersCourse)){ |
|
211 | + while ($rowUsersCourse = Database::fetch_array($rsUsersCourse)) { |
|
212 | 212 | if ($cvs) { |
213 | - $userscourse .= str_replace(';',',',$rowUsersCourse['username']).','; |
|
213 | + $userscourse .= str_replace(';', ',', $rowUsersCourse['username']).','; |
|
214 | 214 | } else { |
215 | 215 | $courses .= "\t\t\t<User>$rowUsersCourse[username]</User>\n"; |
216 | 216 | } |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | if (api_is_multiple_url_enabled()) { |
292 | 292 | $tbl_session_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
293 | 293 | $access_url_id = api_get_current_access_url_id(); |
294 | - if ($access_url_id != -1){ |
|
294 | + if ($access_url_id != -1) { |
|
295 | 295 | $sql = "SELECT s.id, name FROM $tbl_session s |
296 | 296 | INNER JOIN $tbl_session_rel_access_url as session_rel_url |
297 | 297 | ON (s.id = session_rel_url.session_id) |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | |
305 | 305 | echo '<div class="actions">'; |
306 | 306 | echo '<a href="../session/session_list.php">'. |
307 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('SessionList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
307 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('SessionList'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
308 | 308 | echo '</div>'; |
309 | 309 | |
310 | 310 | if (!empty($errorMsg)) { |
@@ -313,8 +313,8 @@ discard block |
||
313 | 313 | |
314 | 314 | $form = new FormValidator('session_export', 'post', api_get_self()); |
315 | 315 | $form->addElement('hidden', 'formSent', 1); |
316 | -$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV' , 'csv', null); |
|
317 | -$form->addElement('radio', 'file_type', '', 'XLS' , 'xls', null); |
|
316 | +$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV', 'csv', null); |
|
317 | +$form->addElement('radio', 'file_type', '', 'XLS', 'xls', null); |
|
318 | 318 | $form->addElement('radio', 'file_type', null, 'XML', 'xml', null, array('id' => 'file_type_xml')); |
319 | 319 | |
320 | 320 | $options = array(); |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | $options[$enreg['id']] = $enreg['name']; |
324 | 324 | } |
325 | 325 | |
326 | -$form->addElement('select', 'session_id', get_lang('WhichSessionToExport'), $options); |
|
326 | +$form->addElement('select', 'session_id', get_lang('WhichSessionToExport'), $options); |
|
327 | 327 | $form->addButtonExport(get_lang('ExportSession')); |
328 | 328 | |
329 | 329 | $defaults = array(); |
@@ -4,9 +4,9 @@ |
||
4 | 4 | * @package chamilo.messages |
5 | 5 | */ |
6 | 6 | require_once '../inc/global.inc.php'; |
7 | -if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') { |
|
7 | +if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') { |
|
8 | 8 | header('Location:inbox.php?f=social'); |
9 | -} elseif ( api_get_setting('allow_message_tool')=='true') { |
|
9 | +} elseif (api_get_setting('allow_message_tool') == 'true') { |
|
10 | 10 | header('Location:inbox.php'); |
11 | 11 | } |
12 | 12 | exit; |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | |
49 | 49 | // get message user id for inbox/outbox |
50 | 50 | $message_uid = ''; |
51 | -$message_type = array('inbox','outbox'); |
|
52 | -if (in_array($_GET['type'],$message_type)) { |
|
51 | +$message_type = array('inbox', 'outbox'); |
|
52 | +if (in_array($_GET['type'], $message_type)) { |
|
53 | 53 | if ($_GET['type'] == 'inbox') { |
54 | 54 | $message_uid = $row_users['user_receiver_id']; |
55 | 55 | } else { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | if (!empty($row_users['group_id'])) { |
65 | 65 | $users_group = $userGroup->get_all_users_by_group($row_users['group_id']); |
66 | - if (!in_array($current_uid,array_keys($users_group))) { |
|
66 | + if (!in_array($current_uid, array_keys($users_group))) { |
|
67 | 67 | $not_allowed_to_edit = true; |
68 | 68 | } |
69 | 69 | } else { |
@@ -93,6 +93,6 @@ discard block |
||
93 | 93 | if (Security::check_abs_path($full_file_name, $path_user_info['dir'].'message_attachments/')) { |
94 | 94 | // launch event |
95 | 95 | Event::event_download($file_url); |
96 | - DocumentManager::file_send_for_download($full_file_name,TRUE, $title); |
|
96 | + DocumentManager::file_send_for_download($full_file_name, TRUE, $title); |
|
97 | 97 | } |
98 | 98 | exit; |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $attendance->set_attendance_qualify_title($_POST['attendance_qualify_title']); |
61 | 61 | $attendance->set_attendance_weight($_POST['attendance_weight']); |
62 | 62 | $link_to_gradebook = false; |
63 | - if ( isset($_POST['attendance_qualify_gradebook']) && $_POST['attendance_qualify_gradebook'] == 1 ) { |
|
63 | + if (isset($_POST['attendance_qualify_gradebook']) && $_POST['attendance_qualify_gradebook'] == 1) { |
|
64 | 64 | $link_to_gradebook = true; |
65 | 65 | } |
66 | 66 | $attendance->category_id = $_POST['category_id']; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | ) { |
113 | 113 | $link_to_gradebook = true; |
114 | 114 | } |
115 | - $attendance->attendance_edit($attendance_id,$link_to_gradebook); |
|
115 | + $attendance->attendance_edit($attendance_id, $link_to_gradebook); |
|
116 | 116 | Security::clear_token(); |
117 | 117 | header('location:index.php?action=attendance_list&'.api_get_cidreq()); |
118 | 118 | exit; |
@@ -543,17 +543,17 @@ discard block |
||
543 | 543 | } |
544 | 544 | } |
545 | 545 | $max_cols_per_page = 12; //10 dates + 2 name and number |
546 | - $max_dates_per_page = $max_dates_per_page_original = $max_cols_per_page - 2;//10 |
|
546 | + $max_dates_per_page = $max_dates_per_page_original = $max_cols_per_page - 2; //10 |
|
547 | 547 | $rows = count($data_table); |
548 | 548 | |
549 | 549 | if ($cols > $max_cols_per_page) { |
550 | - $number_tables = round(($cols-2)/$max_dates_per_page); |
|
550 | + $number_tables = round(($cols - 2) / $max_dates_per_page); |
|
551 | 551 | $headers = $data_table[0]; |
552 | 552 | $all = array(); |
553 | 553 | $tables = array(); |
554 | 554 | $changed = 1; |
555 | 555 | |
556 | - for ($i= 0; $i <= $rows; $i++) { |
|
556 | + for ($i = 0; $i <= $rows; $i++) { |
|
557 | 557 | $row = isset($data_table[$i]) ? $data_table[$i] : null; |
558 | 558 | $key = 1; |
559 | 559 | $max_dates_per_page = 10; |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | foreach ($item as $value) { |
565 | 565 | if ($count_j >= $max_dates_per_page) { |
566 | 566 | $key++; |
567 | - $max_dates_per_page = $max_dates_per_page_original*$key; |
|
567 | + $max_dates_per_page = $max_dates_per_page_original * $key; |
|
568 | 568 | //magic hack |
569 | 569 | $tables[$key][$i][] = $tables[1][$i][0]; |
570 | 570 | $tables[$key][$i][] = $tables[1][$i][1]; |
@@ -622,8 +622,8 @@ discard block |
||
622 | 622 | $form = new FormValidator( |
623 | 623 | 'search', |
624 | 624 | 'post', |
625 | - api_get_self() . '?' . api_get_cidreq( |
|
626 | - ) . '&action=calendar_logins' |
|
625 | + api_get_self().'?'.api_get_cidreq( |
|
626 | + ).'&action=calendar_logins' |
|
627 | 627 | ); |
628 | 628 | $form->addDateRangePicker('range', get_lang('DateRange')); |
629 | 629 | $form->addButton('submit', get_lang('Submit')); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | if (api_is_allowed_to_edit(null, true)) { |
14 | 14 | echo '<div class="actions">'; |
15 | 15 | echo '<a href="index.php?'.api_get_cidreq().'&action=attendance_add">'. |
16 | - Display::return_icon('new_attendance_list.png', get_lang('CreateANewAttendance'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
16 | + Display::return_icon('new_attendance_list.png', get_lang('CreateANewAttendance'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
17 | 17 | echo '</div>'; |
18 | 18 | } |
19 | 19 | $attendance = new Attendance(); |
@@ -4,7 +4,7 @@ |
||
4 | 4 | // See AttendanceController::calendarLogins function |
5 | 5 | echo '<div class="actions">'; |
6 | 6 | echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_list">'. |
7 | - Display::return_icon('back.png',get_lang('AttendanceCalendar'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
7 | + Display::return_icon('back.png', get_lang('AttendanceCalendar'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
8 | 8 | echo '</div>'; |
9 | 9 | |
10 | 10 | echo $form; |
@@ -14,15 +14,15 @@ discard block |
||
14 | 14 | echo '<div class="actions">'; |
15 | 15 | if ($action == 'calendar_add') { |
16 | 16 | echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.'">'. |
17 | - Display::return_icon('back.png',get_lang('AttendanceCalendar'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
17 | + Display::return_icon('back.png', get_lang('AttendanceCalendar'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
18 | 18 | } else { |
19 | 19 | echo '<a href="index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id.'">'. |
20 | - Display::return_icon('back.png',get_lang('AttendanceSheet'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
20 | + Display::return_icon('back.png', get_lang('AttendanceSheet'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
21 | 21 | if (api_is_allowed_to_edit()) { |
22 | 22 | echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_add&attendance_id='.$attendance_id.'">'. |
23 | - Display::return_icon('add.png',get_lang('AddDateAndTime'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
23 | + Display::return_icon('add.png', get_lang('AddDateAndTime'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
24 | 24 | echo '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDeleteAllDates').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=calendar_all_delete&attendance_id='.$attendance_id.'">'. |
25 | - Display::return_icon('clean.png',get_lang('CleanCalendar'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
25 | + Display::return_icon('clean.png', get_lang('CleanCalendar'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
26 | 26 | } |
27 | 27 | } |
28 | 28 | echo '</div>'; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $form = new FormValidator( |
59 | 59 | 'attendance_calendar_add', |
60 | 60 | 'POST', |
61 | - 'index.php?action=calendar_add&attendance_id='.$attendance_id.'&' . api_get_cidreq(), |
|
61 | + 'index.php?action=calendar_add&attendance_id='.$attendance_id.'&'.api_get_cidreq(), |
|
62 | 62 | '' |
63 | 63 | ); |
64 | 64 | $form->addElement('header', get_lang('AddADateTime')); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | 'weekly' => get_lang('RepeatWeekly'), |
96 | 96 | 'monthlyByDate' => get_lang('RepeatMonthlyByDate') |
97 | 97 | ); |
98 | - $form->addElement('select', 'repeat_type', get_lang('RepeatType') , $a_repeat_type); |
|
98 | + $form->addElement('select', 'repeat_type', get_lang('RepeatType'), $a_repeat_type); |
|
99 | 99 | |
100 | 100 | $form->addElement('date_picker', 'end_date_time', get_lang('RepeatEnd'), array('form_name'=>'attendance_calendar_add')); |
101 | 101 | $defaults['end_date_time'] = date('Y-m-d'); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $form = new FormValidator( |
132 | 132 | 'attendance_calendar_edit', |
133 | 133 | 'POST', |
134 | - 'index.php?action=calendar_edit&attendance_id=' . $attendance_id . '&calendar_id=' . $calendar_id . '&' . api_get_cidreq(), |
|
134 | + 'index.php?action=calendar_edit&attendance_id='.$attendance_id.'&calendar_id='.$calendar_id.'&'.api_get_cidreq(), |
|
135 | 135 | '' |
136 | 136 | ); |
137 | 137 | $form->addDateTimePicker('date_time', array(get_lang('Date')), array('form_name'=>'attendance_calendar_edit'), 5); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | get_lang('DateTime'), |
148 | 148 | null, |
149 | 149 | ICON_SIZE_MEDIUM |
150 | - ).' '.substr($calendar['date_time'], 0, strlen($calendar['date_time'])- 3) .' '; |
|
150 | + ).' '.substr($calendar['date_time'], 0, strlen($calendar['date_time']) - 3).' '; |
|
151 | 151 | |
152 | 152 | if (isset($calendar['groups']) && !empty($calendar['groups'])) { |
153 | 153 | foreach ($calendar['groups'] as $group) { |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | // error messages |
14 | 14 | if (isset($error)) { |
15 | - Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false); |
|
15 | + Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'), false); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | if (!isset($error)) { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $form->addElement('hidden', 'sec_token', $token); |
29 | 29 | |
30 | 30 | $form->addText('title', get_lang('Title'), true); |
31 | -$form->applyFilter('title','html_filter'); |
|
31 | +$form->applyFilter('title', 'html_filter'); |
|
32 | 32 | $form->addHtmlEditor( |
33 | 33 | 'description', |
34 | 34 | get_lang('Description'), |
@@ -41,21 +41,21 @@ discard block |
||
41 | 41 | if ((api_get_session_id() != 0 && Gradebook::is_active()) || api_get_session_id() == 0) { |
42 | 42 | $form->addButtonAdvancedSettings('id_qualify'); |
43 | 43 | |
44 | - $form->addElement('html','<div id="id_qualify_options" style="display:none">'); |
|
44 | + $form->addElement('html', '<div id="id_qualify_options" style="display:none">'); |
|
45 | 45 | |
46 | 46 | // Qualify Attendance for gradebook option |
47 | - $form->addElement('checkbox', 'attendance_qualify_gradebook', '', get_lang('QualifyAttendanceGradebook'),'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"'); |
|
48 | - $form->addElement('html','<div id="options_field" style="display:none">'); |
|
47 | + $form->addElement('checkbox', 'attendance_qualify_gradebook', '', get_lang('QualifyAttendanceGradebook'), 'onclick="javascript: if(this.checked){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"'); |
|
48 | + $form->addElement('html', '<div id="options_field" style="display:none">'); |
|
49 | 49 | |
50 | 50 | GradebookUtils::load_gradebook_select_in_tool($form); |
51 | 51 | |
52 | 52 | $form->addElement('text', 'attendance_qualify_title', get_lang('TitleColumnGradebook')); |
53 | 53 | $form->applyFilter('attendance_qualify_title', 'html_filter'); |
54 | - $form->addElement('text', 'attendance_weight', get_lang('QualifyWeight'),'value="0.00" Style="width:40px" onfocus="javascript: this.select();"'); |
|
54 | + $form->addElement('text', 'attendance_weight', get_lang('QualifyWeight'), 'value="0.00" Style="width:40px" onfocus="javascript: this.select();"'); |
|
55 | 55 | $form->applyFilter('attendance_weight', 'html_filter'); |
56 | - $form->addElement('html','</div>'); |
|
56 | + $form->addElement('html', '</div>'); |
|
57 | 57 | |
58 | - $form->addElement('html','</div>'); |
|
58 | + $form->addElement('html', '</div>'); |
|
59 | 59 | } |
60 | 60 | $form->addButtonCreate(get_lang('Save')); |
61 | 61 | $form->display(); |