| Author |  | 
      
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          Is there a way that you can add an output section on the formula page? What I mean is to show the output from the previously entered formula.
           | Posted: February 28 2005 at 19:55 | IP Logged |   |  
           | 
 |  
 Thanks!
 
 Tony
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | krommetje Super User
 
  
  
 Joined: December 29 2004
 Location: Netherlands
 Online Status: Offline
 Posts: 695
 | 
          
           | Posted: March 02 2005 at 05:12 | IP Logged |   |  
           | 
 |  
| TonyNo wrote: 
 
    
    | 
      
       | Is there a way that you can add an output section on the formula page? What I mean is to show the output from the previously entered formula. |  |  |  
 I've been looking at this, the only way I could come up with is through a PCANYWARE connection. I second your question, so let's put it as a feature request for the next beta... I'v been looking at programming a GUI for phcommand.exe but there seems to be more into-it than I thought...
 
 Peter
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | dhoward Admin Group
 
  
  
 Joined: June 29 2001
 Location: United States
 Online Status: Offline
 Posts: 4447
 | 
          Should be doable.  I looked at this before, so not sure why I didnt do it.  Anyways, I'll look into it.
           | Posted: March 02 2005 at 10:47 | IP Logged |   |  
           | 
 |  
 In the meantime...here is what you want as a PSP page:
 
 <html>
 <head>
 <title>PowerHome</title>
 <link rel=stylesheet type="text/css" href="/ph.css">
 </head>
 <body bgcolor="#ffffff">
 <table cellpadding=0 cellspacing=0 class=ht1>
 <tr class=ht1r1>
 <td align=left valign=bottom class=ht1r1c1><img src="/ph.gif" border=0 class=ht1r1c1e1><span class=ht1r1c1e2>  
 Version: <%ph_getversion()%>   </span><span class=ht1r1c1e3><a
 href="javascript:window.location.replace('/formula.psp?')"&g t;Refresh</a></span>
 </tr></table>
 <table width=100% cellpadding=0 cellspacing=2 class=ht2>
 <tr class=ht2r1>
 <td align=left valign=center bgcolor="#00ff00" class=ht2r1c1><span class=ht2r1c1e1><b>Time:</b> </span><span
 class=ht2r1c1e2><%string(today(),"dddd mmm dd, yyyy hh:mm:ss")%>   </span><span class=ht2r1c1e3><b>Sunrise:</b>
 </span><span  class=ht2r1c1e4><%string(ph_getsuntime(today(),1),"hh: mm:ss")%>   </span><span
 class=ht2r1c1e5><b>Sunset:</b> </span><span  class=ht2r1c1e6><%string(ph_getsuntime(today(),2),"hh: mm:ss")%>
   </span><span class=ht2r1c1e7><b>Dawn:</b> </span><span
 class=ht2r1c1e8><%string(ph_getsuntime(today(),3),"hh: mm:ss")%>   </span><span class=ht2r1c1e9><b>Dusk:</b>
 </span><span  class=ht2r1c1e10><%string(ph_getsuntime(today(),4),"hh :mm:ss")%></span></td>
 </tr>
 <tr class=ht2r3>
 <td align=left valign=center class=ht2r3c1><a href="/ph-cgi/main">Main</a></td>
 </tr>
 </table>
 <%if(ph_getwebparm("formula") <> "","<p><b>The result of your previous formula: </b>" + ph_getwebparm("formula") +
 "</p><p><b>is: </b>" + ph_formula(ph_getwebparm("formula")) + "</p>","")%>
 <form method="post" action="/formula.psp" name="eval_formula"><table cellspacing=2 cellpadding=10 border=0 class=ft1><tr
 class=ft1r1><td valign=top align=left  class=ft1r1c1><strong>Formula:</strong></t d></tr>
 <tr class=ft1r2><td valign=top align=left class=ft1r2c1><textarea name="formula" cols=50 rows=10 maxlength=1024
 class=ft1r2c1e1></textarea><input type="hidden" name="nexturl" value=""></td></tr>
 <tr class=ft1r3><td valign=top align=center class=ft1r3c1><input type="submit" value="Submit"
 class=ft1r3c1e1></td></tr></table></ form>
 </body>
 </html>
 
 This is designed to be save with a filename of "formula.psp" and placed in the webserver root directory.  Under setup, you can modify the main menu to use this page instead of the ph-cgi/formula page.
 
 Hope this helps,
 
 Dave.
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          Awesome! Thanks Dave!
           | Posted: March 02 2005 at 13:59 | IP Logged |   |  
           | 
 |    
 Of course, I should have been able to whip that up!
   
 Tony
 | 
       
        | Back to Top |       | 
       
       
        |  |