10 my $message = $query->param( 'message' );
11 my $phone = $query->param( 'phone' );
12 my $operation = $query->param('operation');
15 my ($template, $loggedinuser, $cookie)
16 = get_template_and_user
({template_name
=> "sms/sms-home.tmpl",
20 flagsrequired
=> {circulate
=> "circulate_remaining_permissions" },
23 if ($operation eq "sendsms"){
24 $phone=parse_phone
($phone);
26 ##write to a queue and exit
27 my $me=C4
::Context
->userenv;
28 $result=write_sms
($me->{cardnumber
},$message,$phone);
33 my $error=error_codes
($errorcode);
34 $template->param(error
=>$error);
35 output_html_with_http_headers
$query, $cookie, $template->output;