<?php
$path = (function_exists('iconv')) ? iconv('windows-1251', 'utf-8', $l) : $l;
$path = '/' . preg_replace('#^/+|/+$#i', null, $path) . '/';
mysql_query("UPDATE `loads_list` SET prosm = prosm +1 WHERE `path` = '" . mysql_real_escape_string($path) . "' AND `name` = '" . mysql_real_escape_string($file) . "' LIMIT 1");