regular expression

2002-07-27 Thread GsuLinuX

Hi,

I wanna check the information typed in the form field whether if it is in date format 
or not . Like :
check it if it is in format day/mount/year , in format like ab/cd/ef or ab/cd/efgh 
ab must be valid like between 1-31
cd must be valid between 1-12 or must be a string that exist in an array that i 
define, for exemple A[12]
ef must be valid like between 00-99 or efgh between 1900-2010 

In second part i wanna get the month in a variable, i mean cd to a variable , cd 
can be either a numeric value or a string

Can u help me writing that regular exp.?!?

thanx

funky
Istanbul





Poll for my site

2002-03-19 Thread GsuLinuX

Hi again from Istanbul:) ,

I wanna make poll for some datas that we obtain from the users. For this, i know howto 
insert the datas to my sql database, make an average or something specific but how can 
i show the results as visual which has become very popular in web sites?

thanx

Derya



Entire Site Search

2002-03-19 Thread GsuLinuX

Hi from Istanbul,

I wan to integrate an Entire Site Search  and also Specific Search for my site. I 
didn't make a substructure in my site for this. 
How can i make it? 

thanx

Derya 




Re: How can i put the html code in my cgi?!?

2002-03-05 Thread GsuLinuX

thanx, but i got a huge html code and converting like that will cost be too
much, isn't there a method pratique like
print html code;

?!??!?!!??

thanx

Derya



- Original Message -
From: Eduardo Cancino [EMAIL PROTECTED]
To: GsuLinuX [EMAIL PROTECTED]
Sent: Monday, March 04, 2002 11:05 PM
Subject: RE: How can i put the html code in my cgi?!?


 Use this tutorial, is very good:

 http://stein.cshl.org/WWW/software/CGI/

 :-)

 -Mensaje original-
 De: GsuLinuX [mailto:[EMAIL PROTECTED]]
 Enviado el: Lunes, 04 de Marzo de 2002 03:06 p.m.
 Para: [EMAIL PROTECTED]
 Asunto: How can i put the html code in my cgi?!?


 Hi from Ýstanbul,

 I'm used to put the html code in cgi as below:

 require subparseform.lib;
 Parse_Form;

 print html code;
 # HTML CODE
 html code


 But i don't know how to do it with the new module CGI.pm , anyone knows
 that?!?

 thanx

 Derya Sezen





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




How can i put the html code in my cgi?!?

2002-03-04 Thread GsuLinuX

Hi from stanbul,

I'm used to put the html code in cgi as below:

require subparseform.lib;
Parse_Form;

print html code;
# HTML CODE
html code


But i don't know how to do it with the new module CGI.pm , anyone knows that?!?

thanx

Derya Sezen


 



Missing modules

2002-03-03 Thread GsuLinuX

Hi from stanbul,

Anyone knows a free server that i can test my perl scripts?  I've already find some 
but the modules that i need aren't installed. I prefer the one that all the perl 
modules are installed if it exists:)

thanx

Derya 



2 regular expressions

2002-02-28 Thread GsuLinuX


Hi from stanbul,

How can i convert 
   
1.$a = 29.7548925547539     $a = 29.75  

2.$b = 2345342 -- $b = 2,345,342

thanx

Derya
Istanbul



Re: buton names

2002-02-14 Thread GsuLinuX


It worked on normal submit buttons but problem on image submit button.

I couldn't manage to work it with
image submit buttons. Fot example if their 2 image submit buttons as :

input type=image border=0 name=button3 value=This is button 3
src=c:\windows\desktop\house.gif width=100 height=50brbrbr
input type=image border=0 name=button4 value=This is button 4
src=c:\windows\desktop\debugreport.jpg width=100 height=50

cgi cannot get the names of these? Must i use other module?

thanxs
bye


- Original Message -
From: Brett W. McCoy [EMAIL PROTECTED]
To: GsuLinuX [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, February 14, 2002 6:26 AM
Subject: Re: buton names


 On Wed, 13 Feb 2002, GsuLinuX wrote:

  There are 2 submit butons under my form and the information entered to
the form will be send to different cgi's. How can i do this?
 
  One idea i thougt is to give names to the buttons and in the cgi :
  if buton name is buton1
  { code1 }
  if buton name is buton2
  {code2 }

 You have two submit buttons, each with the same name but a different
 value.

 print submit(-name='action',
-value='Add'
   );

 print submit(-name='action',
-value='Delete'
   );

   They won't go to different CGI scripts, but a single CGI script
 will have those button names (you should give them values also) as
 parameters, so you can take different action based on the button names.
 I would use a hash of coderefs to handle this:

 my $action_button = param('action');

 my %actions = ( 'Add' = \add
 'Delete' = \delete
);

 $action($action_button)-();

 

 sub add  {
   ..
 }

 sub delete {
 
 };

 Or, alternatively, you could use CGI::Application to accomplish this
 (which also uses a hash of coderefs to handle multiple actions).

 -- Brett
   http://www.chapelperilous.net/
 
 Air is water with holes in it.


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




buton names

2002-02-13 Thread GsuLinuX

Hola! , 

There are 2 submit butons under my form and the information entered to the form will 
be send to different cgi's. How can i do this?

One idea i thougt is to give names to the buttons and in the cgi :
if buton name is buton1
{ code1 }
if buton name is buton2
{code2 }

how can i do that if it's possible

thanx
funky
Istanbul




Re: buton names

2002-02-13 Thread GsuLinuX

thanx from Istanbul:)
i'll try it...

funky

- Original Message -
From: Hanson, Robert [EMAIL PROTECTED]
To: 'GsuLinuX' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 14, 2002 12:03 AM
Subject: RE: buton names


 Oh, I see.  Errr... I agree with Camilo.

 If you really wanted to do it that way you could have the script redirect
to
 the second script  Like this:

 if ( param('button1') ) {
 print Location: somescript.cgi?$params\n\n;
 }
 elsif ( param('button2') ) {
 print Location: anotherscript.cgi?$params\n\n;
 }

 You need to pass the params though as part of the URL though which limits
 you to about 1000 characters of data, and you also need to URL encode it.

 You could also use the do() function, but that is also a little messy.  It
 might look like this:

 if ( param('button1') ) {
 do('somescript.cgi');
 }
 elsif ( param('button2') ) {
 do('anotherscript.cgi');
 }

 Either way though, it would be messy, and I don't recommended either.
 But sometimes that is your only option, like if JavaScript was not
 allowed or you knew that many users would not have JavaScript available
 (unlikely, but stuff happens).

 Rob

 -Original Message-
 From: Camilo Gonzalez [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 13, 2002 4:56 PM
 To: Hanson, Robert; 'GsuLinuX'; [EMAIL PROTECTED]
 Subject: RE: buton names


 I understood his request differently, that he wanted to send the
parameters
 to different scripts depending on the submit button pushed.

 -Original Message-
 From: Hanson, Robert [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 13, 2002 3:44 PM
 To: 'GsuLinuX'; [EMAIL PROTECTED]
 Subject: RE: buton names


 You can do it just like that.

 Given this HTML form:

 form action=/cgi-bin/test.cgi
 input type=submit name=button1 value=This is button 1
 input type=submit name=button2 value=This is button 2
 /form

 You can use this script:

 #!/usr/bin/perl

 use CGI qw/:standard/;

 print header();

 if ( param('button1') ) {
 print Button 1 was pushed!;
 }
 elsif ( param('button2') ) {
 print Button 2 was pushed!;
 }

 Camilo, why is that a problem?  Is there inconsistencies between how
 browsers handle that info?  I don't know of any problems with it offhand,
 and I have used it in the past (a long, long, time ago... nothing recent).

 Rob

 -Original Message-
 From: GsuLinuX [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 13, 2002 3:22 PM
 To: [EMAIL PROTECTED]
 Subject: buton names


 Hola! ,

 There are 2 submit butons under my form and the information entered to the
 form will be send to different cgi's. How can i do this?

 One idea i thougt is to give names to the buttons and in the cgi :
 if buton name is buton1
 { code1 }
 if buton name is buton2
 {code2 }

 how can i do that if it's possible

 thanx
 funky
 Istanbul


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




if the date entered is weekend or no?

2002-02-09 Thread GsuLinuX

How can i understand if the date entered by the client is weekend or no? Are there 
some database specificied for that?

funky




module errors

2002-02-07 Thread GsuLinuX

we wroted a perl code to fetch some information we want from a web site. The code is 
as below:

#!/usr/bin/perl
use LWP::Simple;
use HTML::Parse;
use HTML::FormatText;
use CGI;
$query = new CGI;
my ($html, $ascii);
$html = get(http://www.tcmb.gov.tr/kurlar/today.html;);
defined $html or die Sayfa gelmiyor bi turlu!!;
$ascii = HTML::FormatText-new-format(parse_html($html));
@satircik=split /\n/,$ascii;
$dolaralis=substr($satircik[11], 30,11);
$dolarsatis=substr($satircik[11], 40,11);
$markalis=substr($satircik[17], 30,11);
$marksatis=substr($satircik[17], 40,11);
$frankalis=substr($satircik[18], 30,11);
$franksatis=substr($satircik[18], 40,11);
$euroalis=substr($satircik[30], 30,11);
$eurosatis=substr($satircik[30], 40,11);
$sterlinalis=substr($satircik[31], 30,11);
$sterlinsatis=substr($satircik[31], 40,11);
$output = '?xml version=1.0 encoding=ISO-8859-9 ?';
$output .= \ndoviz\n;
$output .= dolar\n;
$output .= alis$dolaralis/alis\n;
$output .= satis$dolarsatis/satis\n;
$output .= /dolar\n;
$output .= mark\n;
$output .= alis$markalis/alis\n;
$output .= satis$marksatis/satis\n;
$output .= /mark\n;
$output .= frank\n;
$output .= alis$frankalis/alis\n;
$output .= satis$franksatis/satis\n;
$output .= /frank\n;
$output .= sterlin\n;
$output .= alis$sterlinalis/alis\n;
$output .= satis$sterlinsatis/satis\n;
$output .= /sterlin\n;
$output .= euro\n;
$output .= alis$euroalis/alis\n;
$output .= satis$euroalis/satis\n;
$output .= /euro\n;
$output .=/doviz\n;
$outputfile=doviz.xml;
open (dovizhtml, $outputfile);   
print dovizhtml $output;
print $query-redirect('doviz.xml');



We have the debug error:

Can't locate HTML/Parse.pm in @INC(@INC contains:
/usr/lib/perl5/5.6.0/i386-linux
/usr/lib/
.) at
/usr/local/plesk/apache/vhosts/loop10.com/httpdocs/DDdeneme/parite2.cgi line
3

Begin Failed-compilation aborted at
/usr/local/plesk/apache/vhosts/loop10.com/httpdocs/DDdeneme/parite2.cgi line
3


Although we have the modules, why perl gives that error?!!?

thanks

funky
Istanbul



Re: module errors

2002-02-07 Thread GsuLinuX

Ok, you have reason, it must be parser but after it continues to give some
module errors...

Can u say me if my method is true, to fetch some information from a web
site?
thanks

funky
Istanbul


- Original Message -
From: Brett W. McCoy [EMAIL PROTECTED]
To: Uwe Voelker [EMAIL PROTECTED]
Cc: GsuLinuX [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 07, 2002 11:59 PM
Subject: Re: module errors


 On Thu, 7 Feb 2002, Uwe Voelker wrote:

   use HTML::Parse;
 
 
  The module is called HTML::Parser.

 A further investigation via CPAN showed me that HTML::Parse is part of the
 HTML::Tree bundle and is now actually a deprecated module, according to
 the readme.

 -- Brett
   http://www.chapelperilous.net/
 
 All generalizations are false, including this one.
 -- Mark Twain


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]