blob: 70d12f42aa596d54c656d738b0fd63a620a0b85e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#! /usr/bin/perl
use CGI;
use GD;
use DBI;
use lib '../../include';
use nms;
my $cgi = CGI->new;
my $dbh = nms::db_connect();
my $box = sprintf("(%d,%d)", $cgi->param('x'), $cgi->param('y'));
$dbh->do('UPDATE placements SET placement=box(?::point, ?::point + point(width(placement),height(placement))) WHERE switch=?',
undef, $box, $box, $cgi->param('switch'));
print $cgi->header(-type=>'text/plain', -expires=>'now');
|