11 my $message=$query->param('message');
12 my $phone=$query->param('phone');
13 my $operation=$query->param('operation');
16 my ($template, $loggedinuser, $cookie)
17 = get_template_and_user({template_name => "sms/sms-home.tmpl",
21 flagsrequired => {circulate => 1},
24 if ($operation eq"sendsms"){
25 $phone=parse_phone($phone);
27 ##write to a queue and exit
28 my $me=C4::Context->userenv;
29 my $card=$me->{cardnumber};
30 $result=write_sms($card,$message,$phone);
36 my $error=error_codes($errorcode);
37 $template->param(error=>$error);
38 output_html_with_http_headers $query, $cookie, $template->output;