1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws_iframe.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws_draggable.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/iframecontentmws.js"></SCRIPT>
% if ( length($number) ) {
<% $number %>
% if ( $opt{'callable'} && $curuser->option('vonage-username') ) {
<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('https://secure.click2callu.com/tpcc/makecall?username=<% uri_escape($curuser->option('vonage-username')) %>&password=<% uri_escape($curuser->option('vonage-password')) %>&fromnumber=<% uri_escape($curuser->option('vonage-fromnumber')) %>&tonumber=1<% $snumber %>', 240, 64, 'call_popup'), CAPTION, 'Initiating call', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE, WIDTH, 240, HEIGHT, 64 ); return false;" TITLE="Call this number"><IMG SRC="<%$fsurl%>images/red_telephone_mimooh_01.png" BORDER=0 ALT="Call this number"></A>
% }
%
% } else {
% }
<%init>
my( $number, %opt ) = @_;
( my $snumber = $number ) =~ s/\D//g;
my $curuser = $FS::CurrentUser::CurrentUser;
( my $vonage_number = $curuser->option('vonage-fromnumber') ) =~ s/\D//g;
$vonage_number =~ /^1/ or $vonage_number = "1$vonage_number";
</%init>
|