db_Update("user", "user_image='' WHERE user_image='-upload-$image'"); $sql->db_Update("user", "user_sess='' WHERE user_sess='$image'"); $message = $image." ".IMALAN_28; } if (isset($_POST['deleteall'])) { $handle = opendir(e_FILE."public/avatars/"); while ($file = readdir($handle)) { if ($file != '.' && $file != '..' && $file != "index.html" && $file != "null.txt" && $file != '/' && $file != 'CVS' && $file != 'Thumbs.db') { $dirlist[] = $file; } } closedir($handle); $count = 0; while (list($key, $image_name) = each($dirlist)) { if (!$sql->db_Select("user", "*", "user_image='-upload-$image_name' OR user_sess='$image_name'")) { unlink(e_FILE."public/avatars/".$image_name); $count ++; } } $message = $count." ".IMALAN_26; } if (isset($_POST['avdelete'])) { require_once(e_HANDLER."avatar_handler.php"); foreach($_POST['avdelete'] as $key => $val) { $key = $tp->toDB($key); // We only need the key if ($sql->db_Select("user", "*", "user_id='$key'")) { $row = $sql->db_Fetch(); extract($row); $avname=avatar($user_image); if (strpos($avname,"http://")===FALSE) { // Internal file, so unlink it @unlink($avname); } $sql->db_Update("user","user_image='' WHERE user_id='$key'"); $message = IMALAN_51.$user_name." ".IMALAN_28; } } $_POST['check_avatar_sizes'] = TRUE; // Force size recheck after doing one or more deletes } if (isset($_POST['update_options'])) { $pref['image_post'] = $_POST['image_post']; $pref['resize_method'] = $_POST['resize_method']; $pref['im_path'] = trim($tp->toDB($_POST['im_path'])); $pref['image_post_class'] = $_POST['image_post_class']; $pref['image_post_disabled_method'] = $_POST['image_post_disabled_method']; $pref['enable_png_image_fix'] = $_POST['enable_png_image_fix']; save_prefs(); $message = IMALAN_9; } if (isset($message)) { $ns->tablerender("", "