php-general Digest 16 Nov 2008 13:51:04 -0000 Issue 5793

Topics (messages 283325 through 283331):

Days until Easter and Christmas
        283325 by: Ron Piggott
        283328 by: David Robley

Re: ability to find include files...
        283326 by: Andrew Ballard
        283330 by: Richard Heyes
        283331 by: tedd

Re: user access/roles/privs functionality
        283327 by: Eric Butera

Re: mySQL query question
        283329 by: Jim Lucas

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 ---
Is there a way to modify this code so it will always be the *next*
Christmas and Easter?

<?php

$todays_date_seasonal_format = DATE("Y-m-d");
$next_Christmas = DATE("Y") . "-12-25";
$next_Easter = date("D d M Y", strtotime("2009-03-21
+".easter_days(2009)." days"));
$days_until_Christmas = ( strtotime($next_Christmas) -
strtotime($todays_date_seasonal_format) ) / 86400;
$days_until_Easter = round(( strtotime($next_Easter) -
strtotime($todays_date_seasonal_format) ) / 86400);

echo $days_until_Christmas . "<br>";
echo $days_until_Easter . "<br>";


--- End Message ---
--- Begin Message ---
Ron Piggott wrote:

> Is there a way to modify this code so it will always be the *next*
> Christmas and Easter?
> 
> <?php
> 
> $todays_date_seasonal_format = DATE("Y-m-d");
> $next_Christmas = DATE("Y") . "-12-25";
> $next_Easter = date("D d M Y", strtotime("2009-03-21
> +".easter_days(2009)." days"));
> $days_until_Christmas = ( strtotime($next_Christmas) -
> strtotime($todays_date_seasonal_format) ) / 86400;
> $days_until_Easter = round(( strtotime($next_Easter) -
> strtotime($todays_date_seasonal_format) ) / 86400);
> 
> echo $days_until_Christmas . "<br>";
> echo $days_until_Easter . "<br>";

Have you tried incrementing the year value by one when you define
$next_[holiday]


Cheers
-- 
David Robley

He who always plows a straight furrow is in a rut.
Today is Setting Orange, the 28th day of The Aftermath in the YOLD 3174. 


--- End Message ---
--- Begin Message ---
On Sat, Nov 15, 2008 at 6:07 PM, bruce <[EMAIL PROTECTED]> wrote:
>
> Hi list...
>
> starting to go through a debug/understanding session of a couple of php web
> apps. i'm wondering if there's any kind of tool/method that i can use to see
> which files are accessed/included/required when a given page is displayed..
>
> this would allow me to quickly understand the "flow" of the apps. searching
> via google hasn't really turned up anything...
>
> thoughts/comments/pointers welcome.
>
> thanks!
>

Yes. How about get_included_files().

http://www.php.net/get_included_files

Andrew

--- End Message ---
--- Begin Message ---
> starting to go through a debug/understanding session of a couple of php web
> apps. i'm wondering if there's any kind of tool/method that i can use to see
> which files are accessed/included/required when a given page is displayed..
>
> this would allow me to quickly understand the "flow" of the apps. searching
> via google hasn't really turned up anything...

If the app has a support list, you could try asking for pointers on
that. Or you could try the authors.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated November 15th)

--- End Message ---
--- Begin Message ---
At 3:07 PM -0800 11/15/08, bruce wrote:
Hi list...

starting to go through a debug/understanding session of a couple of php web
apps. i'm wondering if there's any kind of tool/method that i can use to see
which files are accessed/included/required when a given page is displayed..

this would allow me to quickly understand the "flow" of the apps. searching
via google hasn't really turned up anything...

thoughts/comments/pointers welcome.

One of the techniques I use is to place an "echo('<include name>');" at the top of all includes. Then when parent scripts are run, you see which includes are loaded.

I also do this to see if an include has any problems -- for if it does, then you won't see it report.

HTH's

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
On Sat, Nov 15, 2008 at 11:21 AM, bruce <[EMAIL PROTECTED]> wrote:
> Hi list...
>
> I need a way of managing users/teams/etc.. implementing roles/access
> rights/privs,etc...
>
> I'd like a way of being able to have users "report to" the resource above
> them, ie, the ability to have a hierarchical kind of tree approach would be
> good as wel, as this would allow different user/mgr/teams to be moved
> up/down in the tree as required.
>
> If I can find the right process, I'll implement it in my targeted app. I'd
> prefer something that's fairly well compartmentalized.. but if need be, I'm
> willing to rip the right system out of it's parent app if I can find one
> that's good!!!
>
> I've reviewed the systems in the vtiger/knowledgetree apps.
>
> thoughts/comments/pointers would be useful!
>
> thanks!
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Take a look at Zend_Acl

--- End Message ---
--- Begin Message ---
Michael S. Dunsavage wrote:
On Fri, 2008-11-14 at 12:46 -0800, Jim Lucas wrote:
SELECT @confirm_number AS confirm_number;

Are we not SELECTING the column value here? should we be selecting
confirm_number as confirm_number?

The idea is to give you the number that was used in the INSERT statement. It might have changed since the INSERT. Never know.

So, giving you the one used in the INSERT is the best way to make sure you get the one you are expecting.


--- End Message ---

Reply via email to