diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acm/acm_file.php | 4 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_attachments.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_board.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_groups.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_prune.php | 192 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_styles.php | 8 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 6 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 6 | ||||
-rw-r--r-- | phpBB/includes/functions_convert.php | 4 | ||||
-rw-r--r-- | phpBB/includes/functions_user.php | 2 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_front.php | 15 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_groups.php | 2 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 2 |
13 files changed, 148 insertions, 99 deletions
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index e18008421e..f98873fdbf 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -83,9 +83,9 @@ class acm else { // Now, this occurred how often? ... phew, just tell the user then... - if (!@is_writeable($this->cache_dir)) + if (!@is_writable($this->cache_dir)) { - trigger_error($this->cache_dir . ' is NOT writeable.', E_USER_ERROR); + trigger_error($this->cache_dir . ' is NOT writable.', E_USER_ERROR); } trigger_error('Not able to open ' . $this->cache_dir . 'data_global.' . $phpEx, E_USER_ERROR); diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index ed8daf911f..1db18f6d5c 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1145,7 +1145,7 @@ class acp_attachments { global $user, $phpbb_root_path; - // Does the target directory exist, is it a directory and writeable. + // Does the target directory exist, is it a directory and writable. if ($create_directory) { if (!file_exists($phpbb_root_path . $upload_dir)) diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index d7f692a525..629a119e69 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -31,7 +31,7 @@ class acp_board * Validation types are: * string, int, bool, * script_path (absolute path in url - beginning with / and no trailing slash), - * rpath (relative), rwpath (realtive, writeable), path (relative path, but able to escape the root), wpath (writeable) + * rpath (relative), rwpath (realtive, writable), path (relative path, but able to escape the root), wpath (writable) */ switch ($mode) { diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index 0cd2c2527b..d40a8ae47b 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -37,7 +37,7 @@ class acp_groups $update = (isset($_POST['update'])) ? true : false; // Clear some vars - $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false; + $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false; $group_row = array(); // Grab basic data for group, if group_id is set and exists diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php index 49c68beef1..a516a8b194 100644 --- a/phpBB/includes/acp/acp_prune.php +++ b/phpBB/includes/acp/acp_prune.php @@ -210,82 +210,12 @@ class acp_prune if ($prune) { + $action = request_var('action', 'deactivate'); + if (confirm_box(true)) { - $users = request_var('users', '', true); - $action = request_var('action', 'deactivate'); - $deleteposts = request_var('deleteposts', 0); - - if ($users) - { - $users = explode("\n", $users); - $where_sql = ' AND ' . $db->sql_in_set('username_clean', array_map('utf8_clean_string', $users)); - } - else - { - $username = request_var('username', '', true); - $email = request_var('email', ''); - - $joined_select = request_var('joined_select', 'lt'); - $active_select = request_var('active_select', 'lt'); - $count_select = request_var('count_select', 'eq'); - $joined = request_var('joined', ''); - $active = request_var('active', ''); - - $active = ($active) ? explode('-', $active) : array(); - $joined = ($joined) ? explode('-', $joined) : array(); - - if ((sizeof($active) && sizeof($active) != 3) || (sizeof($joined) && sizeof($joined) != 3)) - { - trigger_error($user->lang['WRONG_ACTIVE_JOINED_DATE'] . adm_back_link($this->u_action), E_USER_WARNING); - } - - $count = request_var('count', 0); - - $key_match = array('lt' => '<', 'gt' => '>', 'eq' => '='); - $sort_by_types = array('username', 'user_email', 'user_posts', 'user_regdate', 'user_lastvisit'); - - $where_sql = ''; - $where_sql .= ($username) ? " AND username_clean LIKE '" . $db->sql_escape(str_replace('*', '%', utf8_clean_string($username))) . "'" : ''; - $where_sql .= ($email) ? " AND user_email LIKE '" . $db->sql_escape(str_replace('*', '%', $email)) . "' " : ''; - $where_sql .= (sizeof($joined)) ? " AND user_regdate " . $key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]) : ''; - $where_sql .= ($count) ? " AND user_posts " . $key_match[$count_select] . " $count " : ''; - $where_sql .= (sizeof($active)) ? " AND user_lastvisit " . $key_match[$active_select] . " " . gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]) : ''; - } - - // Get bot ids - $sql = 'SELECT user_id - FROM ' . BOTS_TABLE; - $result = $db->sql_query($sql); - - $bot_ids = array(); - while ($row = $db->sql_fetchrow($result)) - { - $bot_ids[] = $row['user_id']; - } - $db->sql_freeresult($result); - - // Do not prune founder members - $sql = 'SELECT user_id, username - FROM ' . USERS_TABLE . ' - WHERE user_id <> ' . ANONYMOUS . ' - AND user_type <> ' . USER_FOUNDER . " - $where_sql"; - $result = $db->sql_query($sql); - - $where_sql = ''; $user_ids = $usernames = array(); - - while ($row = $db->sql_fetchrow($result)) - { - // Do not prune bots and the user currently pruning. - if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids)) - { - $user_ids[] = $row['user_id']; - $usernames[$row['user_id']] = $row['username']; - } - } - $db->sql_freeresult($result); + $this->get_prune_users($user_ids, $usernames); if (sizeof($user_ids)) { @@ -328,6 +258,30 @@ class acp_prune } else { + // We list the users which will be pruned... + $user_ids = $usernames = array(); + $this->get_prune_users($user_ids, $usernames); + + if (!sizeof($user_ids)) + { + trigger_error($user->lang['USER_PRUNE_FAILURE'] . adm_back_link($this->u_action), E_USER_WARNING); + } + + // Assign to template + foreach ($user_ids as $user_id) + { + $template->assign_block_vars('users', array( + 'USERNAME' => $usernames[$user_id], + 'U_PROFILE' => append_sid($phpbb_root_path . 'memberlist.' . $phpEx, 'mode=viewprofile&u=' . $user_id), + 'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview&u=' . $user_id, true, $user->session_id) : '', + )); + } + + $template->assign_vars(array( + 'S_DEACTIVATE' => ($action == 'deactivate') ? true : false, + 'S_DELETE' => ($action == 'delete') ? true : false, + )); + confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array( 'i' => $id, 'mode' => $mode, @@ -341,11 +295,11 @@ class acp_prune 'active_select' => request_var('active_select', ''), 'active' => request_var('active', ''), 'count_select' => request_var('count_select', ''), - 'count' => request_var('count', 0), + 'count' => request_var('count', ''), 'deleteposts' => request_var('deleteposts', 0), 'action' => request_var('action', ''), - ))); + )), 'confirm_body_prune.html'); } } @@ -379,6 +333,94 @@ class acp_prune 'U_FIND_USER' => append_sid($phpbb_root_path . "memberlist.$phpEx", 'mode=searchuser&form=acp_prune&field=users')) ); } + + /** + * Get user_ids/usernames from those being pruned + */ + function get_prune_users(&$user_ids, &$usernames) + { + global $user, $db; + + $users = request_var('users', '', true); + $deleteposts = request_var('deleteposts', 0); + + if ($users) + { + $users = explode("\n", $users); + $where_sql = ' AND ' . $db->sql_in_set('username_clean', array_map('utf8_clean_string', $users)); + } + else + { + $username = request_var('username', '', true); + $email = request_var('email', ''); + + $joined_select = request_var('joined_select', 'lt'); + $active_select = request_var('active_select', 'lt'); + $count_select = request_var('count_select', 'eq'); + $joined = request_var('joined', ''); + $active = request_var('active', ''); + + $active = ($active) ? explode('-', $active) : array(); + $joined = ($joined) ? explode('-', $joined) : array(); + + if ((sizeof($active) && sizeof($active) != 3) || (sizeof($joined) && sizeof($joined) != 3)) + { + trigger_error($user->lang['WRONG_ACTIVE_JOINED_DATE'] . adm_back_link($this->u_action), E_USER_WARNING); + } + + $count = request_var('count', ''); + + $key_match = array('lt' => '<', 'gt' => '>', 'eq' => '='); + $sort_by_types = array('username', 'user_email', 'user_posts', 'user_regdate', 'user_lastvisit'); + + $where_sql = ''; + $where_sql .= ($username) ? " AND username_clean LIKE '" . $db->sql_escape(str_replace('*', '%', utf8_clean_string($username))) . "'" : ''; + $where_sql .= ($email) ? " AND user_email LIKE '" . $db->sql_escape(str_replace('*', '%', $email)) . "' " : ''; + $where_sql .= (sizeof($joined)) ? " AND user_regdate " . $key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]) : ''; + $where_sql .= ($count !== '') ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : ''; + $where_sql .= (sizeof($active)) ? " AND user_lastvisit " . $key_match[$active_select] . " " . gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]) : ''; + } + + // Protect the admin, do not prune if no options are given... + if (!$where_sql) + { + return; + } + + // Get bot ids + $sql = 'SELECT user_id + FROM ' . BOTS_TABLE; + $result = $db->sql_query($sql); + + $bot_ids = array(); + while ($row = $db->sql_fetchrow($result)) + { + $bot_ids[] = $row['user_id']; + } + $db->sql_freeresult($result); + + // Do not prune founder members + $sql = 'SELECT user_id, username + FROM ' . USERS_TABLE . ' + WHERE user_id <> ' . ANONYMOUS . ' + AND user_type <> ' . USER_FOUNDER . " + $where_sql"; + $result = $db->sql_query($sql); + + $where_sql = ''; + $user_ids = $usernames = array(); + + while ($row = $db->sql_fetchrow($result)) + { + // Do not prune bots and the user currently pruning. + if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids)) + { + $user_ids[] = $row['user_id']; + $usernames[$row['user_id']] = $row['username']; + } + } + $db->sql_freeresult($result); + } } ?>
\ No newline at end of file diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index f079d228e2..ed49b6df06 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -698,7 +698,7 @@ parse_css_file = {PARSE_CSS_FILE} $additional = ''; // If the template is stored on the filesystem try to write the file else store it in the database - if (!$safe_mode && !$template_info['template_storedb'] && file_exists($file) && is_writeable($file)) + if (!$safe_mode && !$template_info['template_storedb'] && file_exists($file) && @is_writable($file)) { if (!($fp = fopen($file, 'wb'))) { @@ -1358,7 +1358,7 @@ parse_css_file = {PARSE_CSS_FILE} } // where should we store the CSS? - if (!$safe_mode && !$theme_info['theme_storedb'] && file_exists($stylesheet_path) && is_writeable($stylesheet_path)) + if (!$safe_mode && !$theme_info['theme_storedb'] && file_exists($stylesheet_path) && @is_writable($stylesheet_path)) { // write stylesheet to file if (!($fp = fopen($stylesheet_path, 'wb'))) @@ -2307,7 +2307,7 @@ parse_css_file = {PARSE_CSS_FILE} { $theme_data = $this->db_theme_data($style_row); } - else if (!$store_db && !$safe_mode && is_writeable("{$phpbb_root_path}styles/{$style_row['theme_path']}/theme/stylesheet.css")) + else if (!$store_db && !$safe_mode && @is_writable("{$phpbb_root_path}styles/{$style_row['theme_path']}/theme/stylesheet.css")) { $store_db = 1; $theme_data = $style_row['theme_data']; @@ -2331,7 +2331,7 @@ parse_css_file = {PARSE_CSS_FILE} if ($style_row['template_storedb'] != $store_db) { - if (!$store_db && !$safe_mode && is_writeable("{$phpbb_root_path}styles/{$style_row['template_path']}/template")) + if (!$store_db && !$safe_mode && @is_writable("{$phpbb_root_path}styles/{$style_row['template_path']}/template")) { $sql = 'SELECT * FROM ' . STYLES_TEMPLATE_DATA_TABLE . " diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index c7df637fee..1e8a7b8f3e 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -252,9 +252,9 @@ class acp_users $ban_give_reason = request_var('ban_give_reason', '', true); // Log not used at the moment, we simply utilize the ban function. - user_ban(substr($action, 3), $ban, 0, 0, 0, $ban_reason, $ban_give_reason); + $result = user_ban(substr($action, 3), $ban, 0, 0, 0, $ban_reason, $ban_give_reason); - trigger_error($user->lang['BAN_SUCCESSFUL'] . adm_back_link($this->u_action . '&u=' . $user_id)); + trigger_error((($result === false) ? $user->lang['BAN_ALREADY_ENTERED'] : $user->lang['BAN_SUCCESSFUL']) . adm_back_link($this->u_action . '&u=' . $user_id)); break; @@ -1339,7 +1339,7 @@ class acp_users include($phpbb_root_path . 'includes/functions_display.' . $phpEx); - $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false; + $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false; if ($submit) { diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index efff0424d8..7782cba893 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2878,14 +2878,14 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count, $display_cat = ATTACHMENT_CATEGORY_NONE; } - $download_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&f=' . (int) $forum_id . '&mode=view'); + $download_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&mode=view'); switch ($display_cat) { // Images case ATTACHMENT_CATEGORY_IMAGE: $l_downloaded_viewed = 'VIEWED_COUNT'; - $inline_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&f=' . (int) $forum_id); + $inline_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id']); $block_array += array( 'S_IMAGE' => true, @@ -2898,7 +2898,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count, // Images, but display Thumbnail case ATTACHMENT_CATEGORY_THUMB: $l_downloaded_viewed = 'VIEWED_COUNT'; - $thumbnail_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&t=1&f=' . (int) $forum_id); + $thumbnail_link = append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&t=1'); $block_array += array( 'S_THUMBNAIL' => true, diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index c02d736695..514da99e39 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -2269,7 +2269,7 @@ function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_ @chmod($trg_path, 0777); } - if (!is_writeable($trg_path)) + if (!@is_writable($trg_path)) { $bad_dirs[] = path($config['script_path']) . $trg; } @@ -2336,7 +2336,7 @@ function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_ @chmod($trg_path . $dir, 0777); } - if (!is_writeable($trg_path . $dir)) + if (!@is_writable($trg_path . $dir)) { $bad_dirs[] = $trg . $dir; $bad_dirs[] = $trg_path . $dir; diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index b41b329cce..1f4f9b2d3f 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1806,7 +1806,7 @@ function avatar_process_user(&$error, $custom_userdata = false) $avatar_select = basename(request_var('avatar_select', '')); // Can we upload? - $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $change_avatar && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false; + $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $change_avatar && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false; if ((!empty($_FILES['uploadfile']['name']) || $data['uploadurl']) && $can_upload) { diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index 6904d6dfd1..8bebbc71bd 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -144,13 +144,13 @@ function mcp_front_view($id, $mode, $action) $global_id = $forum_list[0]; $sql = $db->sql_build_query('SELECT', array( - 'SELECT' => 'r.report_time, p.post_id, p.post_subject, u.username, u.username_clean, u.user_colour, u.user_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name', + 'SELECT' => 'r.report_time, p.post_id, p.post_subject, p.post_time, u.username, u.username_clean, u.user_colour, u.user_id, u2.username as author_name, u2.username_clean as author_name_clean, u2.user_colour as author_colour, u2.user_id as author_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name', 'FROM' => array( REPORTS_TABLE => 'r', REPORTS_REASONS_TABLE => 'rr', TOPICS_TABLE => 't', - USERS_TABLE => 'u', + USERS_TABLE => array('u', 'u2'), POSTS_TABLE => 'p' ), @@ -166,6 +166,7 @@ function mcp_front_view($id, $mode, $action) AND r.reason_id = rr.reason_id AND p.topic_id = t.topic_id AND r.user_id = u.user_id + AND p.poster_id = u2.user_id AND p.forum_id IN (0, ' . implode(', ', $forum_list) . ')', 'ORDER_BY' => 'p.post_time DESC' @@ -192,11 +193,17 @@ function mcp_front_view($id, $mode, $action) 'REPORTER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), 'U_REPORTER' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']), + 'AUTHOR_FULL' => get_username_string('full', $row['author_id'], $row['author_name'], $row['author_colour']), + 'AUTHOR' => get_username_string('username', $row['author_id'], $row['author_name'], $row['author_colour']), + 'AUTHOR_COLOUR' => get_username_string('colour', $row['author_id'], $row['author_name'], $row['author_colour']), + 'U_AUTHOR' => get_username_string('profile', $row['author_id'], $row['author_name'], $row['author_colour']), + 'FORUM_NAME' => (!$global_topic) ? $row['forum_name'] : $user->lang['GLOBAL_ANNOUNCEMENT'], 'TOPIC_TITLE' => $row['topic_title'], 'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'], - 'REPORT_TIME' => $user->format_date($row['report_time'])) - ); + 'REPORT_TIME' => $user->format_date($row['report_time']), + 'POST_TIME' => $user->format_date($row['post_time']), + )); } } diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index 5b891cf1bb..99371d2024 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -449,7 +449,7 @@ class ucp_groups $avatar_select = basename(request_var('avatar_select', '')); $category = basename(request_var('category', '')); - $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false; + $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false; // Did we submit? if ($update) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index a7ce7ac024..cea9a43ffd 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -511,7 +511,7 @@ class ucp_profile $avatar_select = basename(request_var('avatar_select', '')); $category = basename(request_var('category', '')); - $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false; + $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false; if ($submit) { |