php-general Digest 26 Jul 2007 12:21:16 -0000 Issue 4925

Topics (messages 259544 through 259557):

Re: No is_date() function?
        259544 by: Ken Tozier
        259546 by: Crayon Shin Chan
        259548 by: M. Sokolewicz

Malformed Email Date Header
        259545 by: Chris Aitken

day in week
        259547 by: Christian Hänsel
        259549 by: M. Sokolewicz

Re: The Official OT "Name Tedd's Grandson" Thread
        259550 by: Micky Hulse
        259551 by: Colin Guthrie

appendChild(), removeChild()
        259552 by: Man-wai Chang
        259553 by: Richard Heyes
        259554 by: Man-wai Chang
        259555 by: Richard Heyes
        259557 by: Man-wai Chang

Sessions?
        259556 by: Luc

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---

On Jul 25, 2007, at 10:37 AM, Edward Kay wrote:

PS: Please don't top post on mailing lists.

I'm unfamiliar with the term "top post". What does it mean?

--- End Message ---
--- Begin Message ---
On Thursday 26 July 2007 11:44, Ken Tozier wrote:
> On Jul 25, 2007, at 10:37 AM, Edward Kay wrote:
> > PS: Please don't top post on mailing lists.
>
> I'm unfamiliar with the term "top post". What does it mean?

But you are familiar with google?

-- 
Crayon

--- End Message ---
--- Begin Message ---
This is top-posting

Ken Tozier wrote:

On Jul 25, 2007, at 10:37 AM, Edward Kay wrote:

PS: Please don't top post on mailing lists.

I'm unfamiliar with the term "top post". What does it mean?

and this is bottom-posting.
Generally on mailinglists it's common to bottom-post and not top-post.

--- End Message ---
--- Begin Message ---
Hi All,

 

Just a query I have which by the looks of my research into it online, still
exists on various installations around the world.

 

The websites I build for my clients are scattered over several hosting
servers, and I've noticed that one of them has an issue with the usage of
the mail() function.

 

The sever is running PHP Version 4.4.2 under Windows NT Server 5.2 build
3790.

 

Whenever I use mail() to send an email out via a website, it goes out not a
problem, but in the email program, the date received is around 10 hours
ahead. This causes my clients much grief, especially those who have shopping
carts and large numbers of emails and have the incoming emails listed all
out of order because of the future date stamp.

 

After digging into this somewhat, I had a friend of mine on a freebsd box
got me to email him from one of the scripts, and his *nix mail filtering
software hiccuped on the incoming message complaining that....

 

X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char B8 hex): Date: Wed,
04 

        Jul 2007 10:11:39 \2701000\n

 

Now, he sent me the headers of the email that he received, and the "Date: "
line in the headers was showing up as the following

 

Date: Wed, 04 Jul 2007 10:11:39 ?1000

 

With a ? before the 1000, which, but looking at all the other entries for
the date in the headers, they all appear with the correct +1000 in place.

 

Has anyone come across this or know of a reason why this is happening on
this particular server. I have other hosting accounts on other windows and
linux PHP boxes which do not have this issue. Just one this one server.

 

 

 

Regards

 


Chris Aitken
The Web Hub Designer and Programmer
Phone : 02 4648 0808
Mobile : 0411 132 075

 

-------------------------------------------------

 

Making The Web Work........ The Web Hub
 <http://www.thewebhub.com.au/> http://www.thewebhub.com.au/
 <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]

 

-------------------------------------------------

 

Confidentiality Statement:  
This message is intended only for the use of the Addressee and may contain 
information that is PRIVILEDGED and CONFIDENTIAL.  If you are not the 
intended recipient, dissemination of this communication is prohibited.  
If you have received this communication in error, please erase all 
copies of the message and its attachments and notify us immediately.

 


--- End Message ---
--- Begin Message ---
Good morning fellas,

I was wondering if there was a function like "is_this_week()"...

What I have is a statistics table for the last week, from strtotime("Last Monday") to strtotime("Last Sunday")... now I wanna put a different background colour on the rows where the shown weekday is in the current week... I hope you guess what I'm shooting at :o) So if today is Thursday, everything from "last monday" to "last thursday" should be shown in a different colour.

Does anybody have an idea? I was thinking of doing it with time() and maths.... but I was hoping there was a simpler approach.

All the best, the weekend is near!

Chris

--
-------------------------------------
My baby's first words will be
"Hello World" ... or maybe "foo / bar" ?

--- End Message ---
--- Begin Message ---
Christian Hänsel wrote:
Good morning fellas,

I was wondering if there was a function like "is_this_week()"...

What I have is a statistics table for the last week, from strtotime("Last Monday") to strtotime("Last Sunday")... now I wanna put a different background colour on the rows where the shown weekday is in the current week... I hope you guess what I'm shooting at :o) So if today is Thursday, everything from "last monday" to "last thursday" should be shown in a different colour.

Does anybody have an idea? I was thinking of doing it with time() and maths.... but I was hoping there was a simpler approach.

All the best, the weekend is near!

Chris


for each of your days run a date('W', $thatDate) and compare it to a date('W', time()). the W modifier returns a weeknumber, if they match, it's this week, otherwise it's not.

- tul

--- End Message ---
--- Begin Message ---
Congrats Tedd! :)

Cheers,
Micky

--
Wishlists: <http://snipurl.com/1gqpj>
   Switch: <http://browsehappy.com/>
     BCC?: <http://snipurl.com/w6f8>
       My: <http://del.icio.us/mhulse>

--- End Message ---
--- Begin Message ---
tedd wrote:
> At 8:53 AM -0400 7/25/07, Daniel Brown wrote:
>>    First of all, congrats to Tedd on his 9th grandchild, a boy, at
>> 8lbs. 9oz.

Congrats do Tedd and to your son and his partner!

> My son just informed me that the baby's name is Jacob William Sperling.
> I now have a grandson who's name sounds older than me. Besides my son, I
> also have someone who I can pass the domain name of Sperling.com on to
> -- if that accounts for anything.
> 
> Kind of neat being the first digital Sperling. Have any of you thought
> about the legacy you're leaving digitally?

Well I managed to convince the Irish domain people to let me register
guthr.ie which I think is pretty cool. Means I can create an email
address that is literally just my name with an at sign and a dot thrown
in! Also means that I can setup email addresses and websites for my
family pretty easily :)

On the downside, as I use the domain quite a lot for numerous things, I
now find it quite hard to write (type) my lastname /without/ the dot in
it!! So my legacy will be to name any offspring with the dot in place on
their birth certificate to avoid any hassle :p

Col

--- End Message ---
--- Begin Message ---
If the child refers to a file, is it client-side only? I meant it's
nothing like AJAX, right?

-- 
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   18:44:01 up 14 days 20:48 1 user load average: 0.04 0.05 0.05
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--- End Message ---
--- Begin Message ---
Man-wai Chang wrote:
> If the child refers to a file, is it client-side only? I meant it's
> nothing like AJAX, right?

Since JS runs on the client, yes.

-- 
Richard Heyes
+44 (0)844 801 1072
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--- End Message ---
--- Begin Message ---
If the child refers to a file, is it client-side only? I meant it's
nothing like AJAX, right?
Since JS runs on the client, yes.

... or unless the file was cached, right?

I am reading about these stuffs lately. :)

--
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   19:15:01 up 14 days 21:19 1 user load average: 0.02 0.06 0.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--- End Message ---
--- Begin Message ---
Man-wai Chang wrote:
If the child refers to a file, is it client-side only? I meant it's
nothing like AJAX, right?
Since JS runs on the client, yes.

... or unless the file was cached, right?

I am reading about these stuffs lately. :)

JavaScript (The main part of AJAX) runs on the client. Using AJAX you can have it call stuff on your server, but mainly it is client side only.

--
Richard Heyes
+44 (0)844 801 1072
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--- End Message ---
--- Begin Message ---
JavaScript (The main part of AJAX) runs on the client. Using AJAX you can have it call stuff on your server, but mainly it is client side only.


THX

--
  @~@   Might, Courage, Vision, SINCERITY.
 / v \  Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04)  Linux 2.6.22.1
  ^ ^   20:20:01 up 14 days 22:24 1 user load average: 0.00 0.01 0.00
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk

--- End Message ---
--- Begin Message ---
 Good morning list,    

 I have my form up and running but something is missing: if you omit
 required fields, the form returns an error like:
 please fill in ...
 please fill in...

 the error message is displayed above the form on the same page. The
 problem is that upon showing the error message, the fields already
 filled out, return blank so that the user has to fill everything in
 again.

 What i would like to have is that the data already filled out, is
 being saved when the error message kicks in so that the user doesn't
 have to start al over again.

 Am i right in assuming this is done with a session, and if so how
 would i do that?

 here's my script:

$contact_form_action = $_SERVER['PHP_SELF'];
if ((isset($_POST["sendcontact"])) && ($_POST["sendcontact"] == "contactsent")) 
{
        $contacter_form_error = array();
        if (empty($_POST['empresa_name'])){
                $contacter_form_error[] = 'favor preencher nome da empresa';
        }
        if (empty($_POST['contato_name'])){
                $contacter_form_error[] = 'favor preencher nome do contato';
        }
        if (empty($_POST['fone'])){
                $contacter_form_error[] = 'favor preencher número do telefone';
        }
        if (empty($_POST['contato_email'])){
                $contacter_form_error[] = 'favor preencher seu e-mail';
        }
        if (empty($_POST['produto'])){
                $contacter_form_error[] = 'favor preencher o produto';
        }
        if (empty($_POST['origem'])){
                $contacter_form_error[] = 'favor preencher origem';
        }
        if (empty($_POST['destino'])){
                $contacter_form_error[] = 'favor preencher destino';
        }
        if (empty($_POST['quantidade'])){
                $contacter_form_error[] = 'favor preencher quantidade';
        }
        if (empty($_POST['peso'])){
                $contacter_form_error[] = 'favor preencher peso';
        }
        if (empty($_POST['comprimento'])){
                $contacter_form_error[] = 'favor preencher comprimento';
        }
        if (empty($_POST['altura'])){
                $contacter_form_error[] = 'favor preencher altura';
        }
        if (empty($_POST['largura'])){
                $contacter_form_error[] = 'favor preencher largura';
        }
        else {
                $empresa_name = stripslashes($_POST['empresa_name']);
                $contato_email = stripslashes($_POST['contato_email']);
                
    $body =<<<EOB
 Prezado,
 Favor cotar, conforme os seguintes dados: 

Empresa: $_POST[empresa_name]
Contato: $_POST[contato_name]
Fone: $_POST[fone]
Fax: $_POST[fax]
Email: $_POST[contato_email]
Produto: $_POST[produto]
Origem: $_POST[origem]
Destino: $_POST[destino]
Quantidade: $_POST[quantidade]
Peso: $_POST[peso]
Comprimento: $_POST[comprimento]
Altura: $_POST[altura]
Largura: $_POST[largura]

Grato.
   
Atenciosamente,

$_POST[contato_name]
EOB;
$contato_name = $_POST['contato_name'];
$subjectline = "$websitetitle | Orçamento de empresa";
$notification_message = "Obrigado por nos contatar, $contato_name. Recebemos 
sua mensagem e entraremos em contato em breve.";
$notification_subject = "Obrigado por sua mensagem para $websitetitle.";
                        
@mail($contato_email,$subjectline,$body, "From: $contato_email"); 
@mail($contato_email,$notification_subject,$notification_message, "From: 
$youremail");                                          
        
header("Location:$thankyoupage");               
        }
}

==== Some html text ========
?>
// Print form field errors if present
if (count($contacter_form_error)>0){
        print '<p id="bottom"><strong>Algo está errado:</strong></p>'."\n";
        print '<ul>'."\n";
        foreach($contacter_form_error as $form_err) {
                print "<li class=\"error\">$form_err</li>\n";
        }
        print '</ul>'."\n";
}
?> 
<form method="post" id="contactform" action="<? print $contact_form_action; ?>">
<p>Todos os campos obrigatórios são marcados com asteriscos (<span 
class="required">*</span>).</p>
<fieldset>
<legend>Seus Dados</legend>
<label for="empresa_name">Empresa <span class="required">*</span></label>
<br />
<input type="text" id="empresa_name" name="empresa_name" size="30" value="<? 
print $empresa_name; ?>" />
<br />
<label for="contato_name">Contato <span class="required">*</span></label>
<br />
<input type="text" id="contato_name" name="contato_name" size="30" value="<? 
print $contato_name; ?>" />
<br />
<label for="fone">Número do telefone <span class="required">*</span></label>
<br />
<input type="text" id="fone" name="fone" size="30" value="<? print $fone; ?>" />
<br />
<label for="fax">Fax</label>
<br />
<input type="text" id="fax" name="fax" size="30" value="<? print $fax; ?>" />
<br />
<label for="contato_email">E-mail <span class="required">*</span></label>
<br />
<input type="text" id="contato_email" name="contato_email" size="30" value="<? 
print $contato_email; ?>" />
<br />
<label for="produto">Produto <span class="required">*</span></label>
<br />
<input type="text" id="produto" name="produto" size="30" value="<? print 
$produto; ?>" />
<br />
<label for="origem">Origem <span class="required">*</span></label>
<br />
<input type="text" id="origem" name="origem" size="30" value="<? print $origem 
?>" />
<br />
<label for="destino">Destino <span class="required">*</span></label>
<br />
<input type="text" id="destino" name="destino" size="30" value="<? print 
$destino; ?>" />
<br />
<label for="quantidade">Quantidade <span class="required">*</span></label>
<br />
<input type="text" id="quantidade" name="quantidade" size="30" value="<? print 
$quantidade; ?>" />
<br />
<label for="peso">Peso <span class="required">*</span></label>
<br />
<input type="text" id="peso" name="peso" size="30" value="<? print $peso; ?>" />
<br />
<label for="comprimento">Comprimento <span class="required">*</span></label>
<br />
<input type="text" id="comprimento" name="comprimento" size="30" value="<? 
print $comprimento; ?>" />
<br />
<label for="altura">Altura <span class="required">*</span></label>
<br />
<input type="text" id="altura" name="altura" size="30" value="<? print $altura; 
?>" />
<br />
<label for="largura">Largura <span class="required">*</span></label>
<br />
<input type="text" id="largura" name="largura" size="30" value="<? print 
$largura; ?>" />
<br />
</fieldset>
<input type="hidden" name="sendcontact" value="contactsent" />
<input type="submit" value="Enviar" />
</form> 
 
-- 
Best regards,
 Luc
________________________

Powered by The Bat! version 3.99.3 with Windows XP (build 2600),
version 5.1 Service Pack 2 and using the best browser: Opera.

"Experience - the name men give to their mistakes." - Oscar Wilde.

--- End Message ---

Reply via email to