php-general Digest 1 Mar 2012 15:09:02 -0000 Issue 7708

Topics (messages 316816 through 316821):

time/task reporting
        316816 by: Robert Nilsson
        316817 by: Fatih P.
        316818 by: Stuart Dallas

Re: Website preview script
        316819 by: Stuart Dallas

Nested database loops and completing an unordered list....
        316820 by: Jay Blanchard
        316821 by: FeIn

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hi,
 Ok, I admit -I'm lazy!
 Been asked to make a reporting tool, what and how many hours spent on
 Possible with a save option, to enable continuously adding during the week, 
before sending off by mail to manager and one self.

 Surely I'm not the first person looking at a similar tool, been searching a 
bit but not found example code to use for adjustment to suite my group needs.

 Anyone care to share or point me to a site where I can find this?

 Thanks

--- End Message ---
--- Begin Message ---
On Thu, Mar 1, 2012 at 10:43 AM, Robert Nilsson <rob...@myself.com> wrote:

> Hi,
>  Ok, I admit -I'm lazy!
>  Been asked to make a reporting tool, what and how many hours spent on
>  Possible with a save option, to enable continuously adding during the
> week, before sending off by mail to manager and one self.
>
>  Surely I'm not the first person looking at a similar tool, been searching
> a bit but not found example code to use for adjustment to suite my group
> needs.
>
>  Anyone care to share or point me to a site where I can find this?
>
>  Thanks
>

hey, there is something called project hamster for gnome. might give you an
idea:

http://live.gnome.org/ProjectHamster
http://projecthamster.wordpress.com/
https://launchpad.net/hamster-applet

--- End Message ---
--- Begin Message ---
On 1 Mar 2012, at 08:43, Robert Nilsson wrote:

> Ok, I admit -I'm lazy!
> Been asked to make a reporting tool, what and how many hours spent on
> Possible with a save option, to enable continuously adding during the week, 
> before sending off by mail to manager and one self.
> 
> Surely I'm not the first person looking at a similar tool, been searching a 
> bit but not found example code to use for adjustment to suite my group needs.
> 
> Anyone care to share or point me to a site where I can find this?

This wheel has been invented many times already. Save yourself some time and 
money and use an existing service: 
http://www.google.com/search?q=online+time+tracking

Add up what your time will cost to develop a solution, double it because your 
estimate will almost certainly be too low, then double it again to cover 
maintenance for the first year, and compare that figure to what a SaaS solution 
will cost for one year. Unless your requirements are sufficiently different to 
that which already exists, or you want to develop this as a learning 
experience, grab a wheel off the shelf.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
On 1 Mar 2012, at 03:06, Nibin V M wrote:

> But what my requirement here is, I need to display the website configured
> on our server. No matter where the domain actually points to :)
> 
> Perhaps it can call a proxy....here is the actual intention of creating
> this script.
> 
> Suppose X created a new website on serverA, but the domain actually
> pointing to ServerB. So to test his new website on ServerA, he either has
> to edit "hosts" file or use serverA/~user. I don't want him not to use
> either method. I would like to provide him a PHP feature on my control
> panel says "site preview" through which he can view his website on serverA.
> Its just like a website preview option in plesk control panel :)


I think you're looking at this problem from completely the wrong angle. Why 
does the preview need to sit under their domain name? If that's really what you 
want then you have no option but to do something very very clunky with their 
hosts file, or take over their DNS lookup which is just pure evil and will have 
huge side effects and security implications.

Why can't you simply set the virtual host for their site so it responds to two 
domain names. Firstly their actual domain name, and secondly something like 
theirdomain.com.preview.techsware.in (this would be *.preview.techsware.in in 
your zone file). That way they just need to visit 
http://theirdomain.com.preview.techsware.in/ and they'll see their website.

Simples.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
Good morning PHP groupies!

I am working on this tool that will ultimately display a collapsible org chart. The org chart is based on a nested unordered list and that is the heart of my question.

The NUL(nested unordered list) is based on a set of database queries - sometimes as many as 14 queries. Each query relies on data returned by all of the the queries before it. So what I am doing right now is this -

query generates a list item
    while this list item get the next level dependent upon this item
        query generates this list item
while this list item get the next level dependent on each list item above

...and so on. (I have written about this before and thought I had it solved, but alas, that is not the case.) The result needs to be something like this:

<ul>
<li>level a
<ul>
<li>level b</li> // has no children
<li>level b
<ul>
<li>level c</li>
</ul>
</li>
</ul>
</li>
</ul>

This is a semantically and syntacticallycorrect UL. Keep in mind that this can go many levels deeper. The hardest part, and the part that I am looking to accomplish, is closing the list items properly regardless of how deep the tree is. If properly handled this could even be made into JSON with the proper syntax, but I am not worried about that now. I was hoping that a fresh set of eyes would point me to a solution that I obviously cannot see at the moment.

Thanks!

Jay

--- End Message ---
--- Begin Message ---
I don't how how you keep your data in your database but there is no need to
issues that many queries to retrieve your data. From what I understand the
data you want to display is hierarchical. Here's an article that will
hopefully point you to a solution (there are more out there, some better
than other, google mysql hierchical data or database hierarchical data).
The article I was talking about is here:
http://www.sitepoint.com/hierarchical-data-database/



On Thu, Mar 1, 2012 at 4:29 PM, Jay Blanchard <
jay.blanch...@sigmaphinothing.org> wrote:

> Good morning PHP groupies!
>
> I am working on this tool that will ultimately display a collapsible org
> chart. The org chart is based on a nested unordered list and that is the
> heart of my question.
>
> The NUL(nested unordered list) is based on a set of database queries -
> sometimes as many as 14 queries. Each query relies on data returned by all
> of the the queries before it. So what I am doing right now is this -
>
> query generates a list item
>    while this list item get the next level dependent upon this item
>        query generates this list item
>                while this list item get the next level dependent on each
> list item above
>
> ...and so on. (I have written about this before and thought I had it
> solved, but alas, that is not the case.) The result needs to be something
> like this:
>
> <ul>
> <li>level a
> <ul>
> <li>level b</li> // has no children
> <li>level b
> <ul>
> <li>level c</li>
> </ul>
> </li>
> </ul>
> </li>
> </ul>
>
> This is a semantically and syntacticallycorrect UL. Keep in mind that this
> can go many levels deeper. The hardest part, and the part that I am looking
> to accomplish, is closing the list items properly regardless of how deep
> the tree is. If properly handled this could even be made into JSON with the
> proper syntax, but I am not worried about that now. I was hoping that a
> fresh set of eyes would point me to a solution that I obviously cannot see
> at the moment.
>
> Thanks!
>
> Jay
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---

Reply via email to