root/ip/tags/release_1_3_0_53/includes/mini_cal/mini_cal_SNAILLITE.php
| 111 | 163 | ||
|---|---|---|---|
239 | $s_yy = substr($search_date, 0, 4); | 239 | $s_yy = substr($search_date, 0, 4); |
240 | $s_mm = substr($search_date, 4, 2); | 240 | $s_mm = substr($search_date, 4, 2); |
241 | $s_dd = substr($search_date, 6, 2); | 241 | $s_dd = substr($search_date, 6, 2); |
242 | $url = append_sid(IP_ROOT_PATH . 'calendar.' PHP_EXT . '?day=' . $s_dd . '&month=' . $s_mm . '&year=' . $s_yy . '&mode=display'); | 242 | $url = append_sid(IP_ROOT_PATH . 'calendar.' . PHP_EXT . '?day=' . $s_dd . '&month=' . $s_mm . '&year=' . $s_yy . '&mode=display'); |
243 | return $url; | 243 | return $url; |
244 | } | 244 | } |
245 | 245 | ||
... | ... | ||
249 | { | 249 | { |
250 | global $db, $cal_config; | 250 | global $db, $cal_config; |
251 | // Get the user permissions first. | 251 | // Get the user permissions first. |
252 | $sql = 'SELECT user_calendar_perm FROM ' . USERS_TABLE . ' WHERE user_id = \''.$user_id.'\''; | 252 | $sql = "SELECT user_calendar_perm FROM " . USERS_TABLE . " WHERE user_id = " . $user_id; |
253 | if ( !($result = $db->sql_query($sql)) ) | 253 | if ( !($result = $db->sql_query($sql)) ) |
254 | { | 254 | { |
255 | message_die(GENERAL_ERROR, 'Could not select Calendar permission from user table', '', __LINE__, __FILE__, $sql); | 255 | message_die(GENERAL_ERROR, 'Could not select Calendar permission from user table', '', __LINE__, __FILE__, $sql); |
... | ... | ||
258 | $db->sql_freeresult($result); | 258 | $db->sql_freeresult($result); |
259 | 259 | ||
260 | // Get the group permissions second. | 260 | // Get the group permissions second. |
261 | $sql = 'SELECT group_calendar_perm FROM ' . USER_GROUP_TABLE . ' ug, ' . GROUPS_TABLE. " g | 261 | $sql = "SELECT group_calendar_perm FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE. " g |
262 | WHERE ug.user_id = '$user_id' AND g.group_id = ug.group_id"; | 262 | WHERE ug.user_id = " . $user_id . " AND g.group_id = ug.group_id"; |
263 | if ( !($result = $db->sql_query($sql)) ) | 263 | if ( !($result = $db->sql_query($sql)) ) |
264 | { | 264 | { |
265 | message_die(GENERAL_ERROR, 'Could not select Calendar permission from user/usergroup table', '', __LINE__, __FILE__, $sql2); | 265 | message_die(GENERAL_ERROR, 'Could not select Calendar permission from user/usergroup table', '', __LINE__, __FILE__, $sql2); |
Download diff