Файл: EasyHost v2.0/system/htdocs/manager/account/data.pl
Строк: 28
<?php
if ($system->service->config('data_contact') eq 'required')
{
$system->error('The contact name field is required') if (length $system->param('data_contact') == 0);
$system->error('The phone number field is required') if (length $system->param('data_phone') == 0);
}
if ($system->service->config('data_address') eq 'required')
{
$system->error('The address field is required') if (length $system->param('data_address') == 0);
$system->error('The city field is required') if (length $system->param('data_city') == 0);
$system->error('The country field is required') if (length $system->param('data_country') == 0);
$system->error('The province field is required') if ($system->param('data_country') eq 'CA' && length $system->param('data_province') == 0);
$system->error('The state field is required') if ($system->param('data_country') eq 'US' && length $system->param('data_state') == 0);
$system->error('The zip/postal code field is required') if (length $system->param('data_zip_code') == 0);
}
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','updated their details');
$system->redirect('password');
?>