Файл: EasyHost v2.0/system/htdocs/admin/system/includes.pl
Строк: 23
<?php
$system->error('This feature has been disabled in demo mode') if $system->config('demo');
my $delete = $system->db->prepare('DELETE FROM includes WHERE category_id = ? AND name = ?');
my $replace = $system->db->prepare('REPLACE INTO includes VALUES (?,?,?)');
foreach my $name ('header','footer')
{
if (length $system->param($name) > 0)
{
$replace->execute($system->param('category') || '0',$name,$system->param($name));
}
else
{
$delete->execute($system->param('category') || '0',$name);
}
$system->service->{'include'}{$system->param('category')}{$name} = $system->param($name);
}
$delete->finish;
$replace->finish;
my $search = ($system->param('category') > 0) ? EasyHost::Category->new($system->param('category'))->users : $system->service->users;
$search->execute;
while (my $user = $search->fetch)
{
print STDER "UPDATE: ".$user->name."n";
$user->update;
}
$system->redirect('finish');
?>