[Koha-cvs] koha/intranet/cgi-bin/sms sms.pl [rel_TG]

Tumer Garip tgarip at neu.edu.tr
Sat Mar 10 02:29:01 CET 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_TG
Changes by:	Tumer Garip <tgarip1957>	07/03/10 01:29:01

Added files:
	intranet/cgi-bin/sms: sms.pl 

Log message:
	fresh files for rel_TG

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/intranet/cgi-bin/sms/sms.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1

Patches:
Index: sms.pl
===================================================================
RCS file: sms.pl
diff -N sms.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sms.pl	10 Mar 2007 01:29:01 -0000	1.1.2.1
@@ -0,0 +1,43 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+use C4::SMS;
+use C4::Interface::CGI::Output;
+use C4::Auth;
+my ($res,$ua);
+my %commands;
+my $query = new CGI;
+my $message=$query->param('message');
+my $phone=$query->param('phone');
+my $operation=$query->param('operation');
+my $result;
+my $errorcode;
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "sms/sms-home.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {circulate => 1},
+			     debug => 1,
+			     });
+if ($operation eq"sendsms"){
+ $phone=parse_phone($phone);
+  if ($phone>0){
+##write to a queue and exit
+my $me=C4::Context->userenv;
+my $card=$me->{cardnumber};
+	 $result=write_sms($card,$message,$phone);
+
+  }else{
+  $errorcode=-1104;
+ }
+}
+my $error=error_codes($errorcode);
+$template->param(error=>$error);
+output_html_with_http_headers $query, $cookie, $template->output;
+
+
+
+
+





More information about the Koha-cvs mailing list