Jump to content

jakebur01

Members
  • Posts

    885
  • Joined

  • Last visited

Everything posted by jakebur01

  1. I don't have access to that. You are amazing, I am going to wear out my welcome with you helping me so much.
  2. How can I remove the PHPSESSID's from my urls? It's ok if they are there inside the admin area, but I need to check for a session on my home page and I don't need the search engines indexing the sessionid's. Is there any way to use sessions on a page without using session_start(); ? <?php session_start();//this is at the top of the page ?> // here is the section where I need to check if they are logged in. <?php if (isset($_SESSION['valid_user'])) { ?> <table width="188" border="0" cellspacing="3" cellpadding="3"> <tr> <td bgcolor="#DFDABD"><div align="center"><a href="admin.php" class="style15">My Account</a> <span class="style15">|</span> <a href="logout.php" class="style15">Log Out</a></div></td> </tr> </table> <?php } else { //echo "navigation"; ?> <div style="padding-right:13px; "> <form name="form1" method="post" action="admin.php"> <div align="right"> <table width="183" border="0" cellspacing="3" cellpadding="3"> <tr> <td bgcolor="#DFDABD"><div align="center"><span class="style15">User:</span><span class="style7"> <input type="text" name="textfield2"> </span> <br /> <span class="style15">Pass:</span> <input type="password" name="textfield3"> <br /> <input type="submit" name="Submit" value="Log In"> <br /> <a href="signup.php" class="style2">Not a member? Sign up </a> <a href="#"><img src="images/pint_1.jpg" alt=" " width="6" height="5" vspace="1" border="0" style="margin-right:7px "></a></div></td> </tr> </table> </div> </form> </div> <?php } ?>
  3. That was it. <?php echo $te;?>
  4. Is my php not processing in the javascript?
  5. <div id="content"> <table class="countTable"> <tr><th colspan="2" id="remain"><?=$te;?></th> <script type="text/javascript"> v=new Date(); var remain=document.getElementById('remain'); function tremain(){ n=new Date(); s=<?=$secondsDiff;?>-Math.round((n.getTime()-v.getTime())/1000.); m=0; h=0; if(s<0){ remain.innerHTML='Chat Time ';document.location=document.location; }else{ if(s>59){ m=Math.floor(s/60); s=s-m*60 } if(m>59){ h=Math.floor(m/60); m=m-h*60 } if(s<10){ s="0"+s } if(m<10){ m="0"+m } remain.innerHTML=" "+h+"h "+m+"m "+s+'s';document.title=h+':'+m+':'+s+' .'; window.setTimeout("tremain();",999); } } tremain(); </script> </tr> </table> </div>
  6. yea but i'm getting a blank, does my php look ok?
  7. It works perfect during the meeting time. And after meeting time, it displays "chat closed." I just can't get the countdown to work for before the meeting. `Jake
  8. I have this script that is supposed to check to see if it is meetingtime if not it is supposed to countdown then start the meeting. $meetingstarttime and $meetingendtime are unix time stamps. <?php //$meetingstarttime=1218973304; //just a test - delete this line for using database values $te = date("Y-m-d H:i:s", $meetingstarttime); $secondsDiff = $meetingstarttime - time(); if ( time() > $meetingendtime) { echo "Chat closed"; }else if ( time() <= $meetingstarttime) { ?> <div id="content"> <table class="countTable"> <tr><th colspan="2" id="remain"><?=$te;?></th> <script type="text/javascript"> v=new Date(); var remain=document.getElementById('remain'); function tremain(){ n=new Date(); s=<?=$secondsDiff;?>-Math.round((n.getTime()-v.getTime())/1000.); m=0; h=0; if(s<0){ remain.innerHTML='Chat Time ';document.location=document.location; }else{ if(s>59){ m=Math.floor(s/60); s=s-m*60 } if(m>59){ h=Math.floor(m/60); m=m-h*60 } if(s<10){ s="0"+s } if(m<10){ m="0"+m } remain.innerHTML=" "+h+"h "+m+"m "+s+'s';document.title=h+':'+m+':'+s+' .'; window.setTimeout("tremain();",999); } } tremain(); </script> </tr> </table> </div> <?php } else { $chat->printChat(); } ?>
  9. Will this work just the same? $Endhour=$Hour+1; $Starttime = mktime($Hour, 0, 0, $Month, $Day, $Year); $Endtime = mktime($Endhour, 0, 0, $Month, $Day, $Year); Thanks, Jake
  10. I am trying to add one hour onto $Endtime. I can't get it to work correctly. $Starttime = mktime($Hour, 0, 0, $Month, $Day, $Year); $Endtime = mktime($Hour+1, 0, 0, $Month, $Day, $Year);
  11. What if I want to customize my month, day, year, and hour into this? Say the info from the form is: $year='2008'; $day='23'; $month='8'; $hour='11'; $timezone='-4'; How could I turn this into a unix timestamp?
  12. I have a chat that users can schedule at a given time. In the form they are able to choose timezone, hour, day, and month. I am storing this into my database as a unix time stamp. What is the best way for me to do this? <form name="form1" method="post" action="process_meeting.php"> <table width="614" border="0" cellspacing="3" cellpadding="3"> <tr> <td width="107" class="style23">Type:</td> <td width="222"><select name="select"> <option value="t1">t1</option> <option value="t2">t2</option> <option value="t3">t3</option> <option value="t4">t4</option> <option value="t5">t5</option> </select> </td> </tr> <tr> <td class="style23">Club:</td> <td><input type="text" name="textfield"></td> </tr> <tr> <td class="style23">Topic:</td> <td><input type="text" name="textfield2"></td> </tr> <tr> <td class="style23">Timezone:</td> <td> <select name="timezone"> <option value="-12">GMT - 12 Hours (INTERNATIONAL DATE LINE WEST)</option> <option value="-11">GMT - 11 Hours (NOME TIME)</option> <option value="-10">GMT - 10 Hours (HAWAII/ALASKA STANDARD TIME)</option> <option value="-9">GMT - 9 Hours (ALASKA/YUKON STANDARD TIME)</option> <option value="-8">GMT - 8 Hours (PACIFIC STANDARD TIME-USA-CANADA)</option> <option value="-7">GMT - 7 Hours (MOUNTAIN STANDARD TIME-USA-CANADA)</option> <option value="-6">GMT - 6 Hours (CENTRAL STANDARD TIME-USA-CANADA)</option> <option value="-5">GMT - 5 Hours (EASTERN STANDARD TIME-USA-CANADA)</option> <option value="-4">GMT - 4 Hours (ATLANTIC STANDARD TIME)</option> <option value="-3">GMT - 3 Hours</option> <option value="-2">GMT - 2 Hours (AZORES TIME)</option> <option value="-1">GMT - 1 Hours (WEST AFRICA TIME)</option> <option value="+0">GMT (WESTERN EUROPEAN TIME)</option> <option value="+1">GMT + 1 Hour (CENTRAL EUROPEAN TIME)</option> <option value="+2">GMT + 2 Hours</option> <option value="+3">GMT + 3 Hours</option> <option value="+4">GMT + 4 Hours</option> <option value="+5">GMT + 5 Hours</option> <option value="+6">GMT + 6 Hours</option> <option value="+7">GMT + 7 Hours</option> <option value="+8">GMT + 8 Hours</option> <option value="+9">GMT + 9 Hours</option> <option value="+10">GMT + 10 Hours</option> <option value="+11">GMT + 11 Hours</option> <option value="+12">GMT + 12 Hours</option> </select> </td> </tr> <tr> <td class="style23">Hour:</td> <td><select name=hour> <option value=00>00</option> <option value=01>01</option> <option value=02>02</option> <option value=03>03</option> <option value=04>04</option> <option value=05>05</option> <option value=06>06</option> <option value=07>07</option> <option value=08>08</option> <option value=09>09</option> <option value=10>10</option> <option value=11>11</option> <option value=12>12</option> <option value=13>13</option> <option value=14>14</option> <option value=15>15</option> <option value=16>16</option> <option value=17>17</option> <option value=18>18</option> <option value=19>19</option> <option value=20>20</option> <option value=21>21</option> <option value=22>22</option> <option value=23>23</option> <option value=24>24</option> </select></td> </tr> <tr> <td class="style23">Month:</td> <td><select name=month value=''>Select Month</option> <option value='01'>January</option> <option value='02'>February</option> <option value='03'>March</option> <option value='04'>April</option> <option value='05'>May</option> <option value='06'>June</option> <option value='07'>July</option> <option value='08'>August</option> <option value='09'>September</option> <option value='10'>October</option> <option value='11'>November</option> <option value='12'>December</option> </select> </td> </tr> <tr> <td class="style23">Day:</td> <td><select name=dt > <option value='01'>01</option> <option value='02'>02</option> <option value='03'>03</option> <option value='04'>04</option> <option value='05'>05</option> <option value='06'>06</option> <option value='07'>07</option> <option value='08'>08</option> <option value='09'>09</option> <option value='10'>10</option> <option value='11'>11</option> <option value='12'>12</option> <option value='13'>13</option> <option value='14'>14</option> <option value='15'>15</option> <option value='16'>16</option> <option value='17'>17</option> <option value='18'>18</option> <option value='19'>19</option> <option value='20'>20</option> <option value='21'>21</option> <option value='22'>22</option> <option value='23'>23</option> <option value='24'>24</option> <option value='25'>25</option> <option value='26'>26</option> <option value='27'>27</option> <option value='28'>28</option> <option value='29'>29</option> <option value='30'>30</option> <option value='31'>31</option> </select></td> </tr> <tr> <td class="style23">Year:</td> <td><span class="style15">Year(yyyy)</span> <input name=year type=text value=2008 size=8 maxlength="4"></td> </tr> </table> <p> <input type="submit" name="Submit" value="Schedule Meeting!"> </p> </form> Now, On the php that processes this... I want it to format it in unix timestamp according to the timezone they selected, hour, month, day, and year.
  13. I need to use the unix timestamp.
  14. I'm confused... $hour is the hour they selected in the form. $timezone is the time zone selection in the form(it holds values like -2, +4, 0, -3, etc.) And I was using $currenttimezone to get things back to greenwich mean time (that should be +6 not -6), I am 6 hours behind greenwich mean time.
  15. I am having trouble putting the puzzle together. I have a form with timezone, hour, day, and year. Ex. of time zone option: <option value="-7">GMT - 7 Hours (MOUNTAIN STANDARD TIME-USA-CANADA)</option> <option value="-6">GMT - 6 Hours (CENTRAL STANDARD TIME-USA-CANADA)</option> <option value="-5">GMT - 5 Hours (EASTERN STANDARD TIME-USA-CANADA)</option> <option value="-4">GMT - 4 Hours (ATLANTIC STANDARD TIME)</option> <option value="-3">GMT - 3 Hours</option> <option value="-2">GMT - 2 Hours (AZORES TIME)</option> <option value="-1">GMT - 1 Hours (WEST AFRICA TIME)</option> <option value="+0">GMT (WESTERN EUROPEAN TIME)</option> I am posting this to a page where I need to convert the time and date into a timestamp according to the timezone they chose. Note: The server is sitting on central time zone. $hour=$_POST['hour']; $month=$_POST['month']; $day=$_POST['day']; $year=$_POST['year']; $timezone=$_POST['timezone']; $currenttimezone="-6"; $finalhour= $timestamp = mktime($finalhour, 0, 0, $month, $day, $year); I stopped..... I really don't know what I am doing here. My current timezone is -6(central time). I am using this for a scheduled chat time. So if someone scheduled it for 2 pm china time, they would be able to access the chat at that time.
  16. Could you give me an example of how I would implement eastern time into this if I am on central: echo date("M-d-Y", mktime(0, 0, 0, 12, 32, 1997));
  17. My server is sitting in central time zone. Dallas, TX. How do I need to set up the time zones?
  18. What about time zones? Is there already an option value out there that already contains all of the time zones so I won't have to rebuild the whole thing?
  19. mktime looks good. I am building the form now. I will implement the time zones as well.
  20. Hey, I am looking for some code. I need my users to be able to select year month day time and timezone in a form. I want it to convert into a unix timestamp so I can insert it into my database.
  21. What are some great open source chat scripts that would be customizable?
  22. I am using a chat script off of phpfreechat.net. My problem is that when I pass the my table data into the variables such as the chat room name, username, and title. The changes are not actually changed until I clear the cache and reload the page. Is their any way around this?
  23. Thank you!!!
  24. do I just set up my mysql column as a timestamp?
  25. $meetingstarttime= 2008-08-11 11:00:00 $meetingendtime= 2008-08-11 12:00:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.