Файл: EasyHost v2.0/system/htdocs/manager/account/site.pl
Строк: 19
<?php
if ($system->service->config('data_website') eq 'required')
{
$system->error('The website title field is required') if (length $system->param('data_title') == 0);
$system->error('The website description field is required') if (length $system->param('data_description') == 0);
}
$system->error('The category field is required') if ($system->service->config('category_required') == 1 && $system->param('category') < 1);
my $current = $system->db->selectrow_array('SELECT category_id FROM users WHERE id = ?',undef,$login->user->id);
$system->db->do('UPDATE users SET category_id = ? WHERE id = ?',undef,$system->param('category') || '0',$login->user->id);
$login->user->update if ($current != $system->param('category'));
my $replace = $system->db->prepare('REPLACE INTO users_data VALUES (?,?,?)');
foreach (grep { $_ =~ /^data_/i } $system->param)
{
$replace->execute($login->user->id,($_ =~ /^data_(.+)/i)[0],$system->param($_));
}
$replace->finish;
$login->user->notice('site_modify','changed their details');
$system->redirect('password');
?>