473,761 Members | 8,372 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Load Set of Files Between Hrs

39 New Member
I have a set of file that I would like to use between the hours of 7am - 9pm, and then another set from 9pm - 7am. Am I on the right track with this code?

Thanks for any help....


[php]
<?php
$h = date('h');
if ($h < 09)
{
$link1 = 'caddisplay1.ph p';
$link2 = 'units1.php';
$link3 = 'emsa1.php';
}
else
{
$link1 = 'caddisplay.php ';
$link2 = 'units.php';
$link3 = 'emsa.php';
}



echo "
<frameset rows=\"32,*\" style=\"border: 0;\" framespacing=\" 0\">
<frame name=\"toolfram e\" src=\"toolBar1. php\" marginwidth=\"0 \" marginheight=\" 0\" scrolling=\"no\ " frameborder=\"n o\" noresize>

<frameset id=\"layout\" rows=\"60%,26,* \" cols=\"*\" border=\"3\" framespacing=\" 3\">
<frame name=\"calls\" src=\"$link1\" scrolling=\"yes \" frameborder=\"y es\">
<frame name=\"middle\" src=\"$link3\" scrolling=\"no\ " noresize frameborder=\"n o\">
<frame name=\"units\" src=\"$link2\" scrolling=\"yes \" frameborder=\"y es\">
</frameset>
</frameset>
</frameset>
</HTML>
";
?>
[/php]
Aug 12 '08 #1
7 1437
r035198x
13,262 MVP
date('h') gives 12 hour format 01 - 12. You should use date('H') which gives 24 hour format 00 - 23.
Aug 12 '08 #2
nathanwb
39 New Member
i did have that and i had it set for 21 which is 9p, but it never switched..
Aug 12 '08 #3
r035198x
13,262 MVP
i did have that and i had it set for 21 which is 9p, but it never switched..
You'll need to have the page auto refreshing as well. Remember that script is run once before the page is displayed.
Aug 12 '08 #4
nathanwb
39 New Member
well I am not worried about the page refreshing, but maily for peopel who chose that link it will pull the correct files after the posted time..
Aug 12 '08 #5
r035198x
13,262 MVP
well I am not worried about the page refreshing, but maily for peopel who chose that link it will pull the correct files after the posted time..
People who click that link will go to the link that was set when the page first loaded. Remember (like I said above) that the PHP file will run only once before the page is displayed.
Aug 12 '08 #6
nathanwb
39 New Member
I understand that.. but the link to this index file is on a static page elsewhere, once click it will bring you to this page.. that is whay I am referring to..
Aug 12 '08 #7
r035198x
13,262 MVP
I understand that.. but the link to this index file is on a static page elsewhere, once click it will bring you to this page.. that is whay I am referring to..
Declare the $link variables before the if-else part.
Aug 12 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

19
13291
by: Nancy | last post by:
Hi, When I start my PC(winXP Pro), it always says: Unknown(): Unable toload dynamic library './php_msql.dll' - The specified module could not be found. Then my Apache servre starts, load php module and works well. I copied php_msql.dll to my system32 directory. Who knows what's wrong? Thanks a lot?
1
16080
by: Ray in HK | last post by:
What are the differences between LOAD DATA INFILE and LOAD DATA LOCAL INFILE ? I found some web hosting company do not allow using LOAD DATA INFILE but allow LOAD DATA LOCAL INFILE. The reason is for the sake of security. What does that mean ?
1
3855
by: jen_designs | last post by:
Can you load 2 xml files on an html page via javascript? I can get one xml file to load, using the following code. How about two. I need to combine 2 xmls files on the client. Any other way to do this? <script type="text/javascript"> var xml = new ActiveXObject("Microsoft.XMLDOM") xml.async = false xml.load("myXML.xml") var xsl = new ActiveXObject("Microsoft.XMLDOM") xsl.async = false
2
2072
by: John Alesse | last post by:
Hi, I've created a very simple winforms control using the c# wizard in VS .net 2003 that is nothing but a System.Windows.Forms.UserControl. There are no other controls on the form It takes IE 12 seconds to load this control into the page. CPU usage is at only 1% to 2% during the 12 sec All of this is on a single machine XP Pro sp1 (all critical updates loaded) 2.6GHz, P4, 512MB ra IE v6.0.2800.1106.xpsp2.030422-1633 IIS 5.1 ..net...
10
2652
by: GeekBoy | last post by:
Okay, I have two identical web servers running Windows 2003 web server. I have an ASP.NET application which runs great on one of them. Dedicated IP address, behind our firewall, etc. Everyone's happy. Now -- how do I take advantage of that second computer to "load-balance" the web site? Will it really give my users a noticable performance increase? How do you accomplish this? I've read many of those MS articles and it's...
3
7198
by: db2udbgirl | last post by:
Env: DB2 UDB 8.2, AIX 5.3 While trying to load data (73 Million rows, Medium size table uses 4K tablespace) into a table using cursor it fails with "SQL0964C The transaction log for the database is full. SQLSTATE=57011" But I felt that Load utility wont log any acvitities on the database. Here it what I tried to do db2 "declare c1 cursor for select CAST(PARTITIONING_NBR AS CHAR(10)), VEH_IDENT_NBR, OPTN_CD, VIN_TYPE_CD,...
7
6576
by: P. Adhia | last post by:
Sorry for quoting an old post and probably I am reading out of context so my concern is unfounded. But I would appreciate if I can get someone or Serge to confirm. Also unlike the question asked in the post below, my question involves non-partitioned table loads. I want to know if, in general, loading from cursor is slower than loading from a file? I was thinking cursor would normally be faster, because of DB2's superior buffer/prefetch...
4
9613
by: andrewcw | last post by:
I am moving some code forward from .NET 1.1. I was able to load the XSL file and perform the transform. The MSDN documentation looks like it should be easy. But I get a compile error. Ideas ? How can I share my XSLT ( there are 2 helper stylesheets, and I check that they are also available... the loaded xsl makes reference to the helper xsl files. Where should I start looking ? // Load the stylesheet. errBefore =...
8
3741
by: Joe Withawk | last post by:
I have a solution consisting of a c# project as win application and a c++ project as classlibrary. Both are .net 2.0 The classlibrary handles some loading of quicktime movies, but that should not be relevant. On my development machine I build the exe and dll and run the exe which has a reference to the dll. At some point it uses featured in the dll. This works fine. Then I copy my exe and dll to the target system and when the featured...
2
6562
by: David Thielen | last post by:
So we have moved our app from .NET version 2.X in IIS6 to a Windows 2008 Server running IIS7. We have copied all files to the Windwardreports\apps directory and that apps directory has been converted to an application running in ..NET 2.X and Integrated mode. We copied over the DB and edited the web.config file to the DB username and password. I also added the NETWORK SERVICE user to the DB.
0
9531
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9957
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3881
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.