Jump to content

patcouch22

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

patcouch22's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I am new to posting on php freaks but have used it for help very often. My question is pretty simple, I'm planning on starting a new social network and am trying to avoid starting from scratch. I know that starting from scratch would give me the most freedom, but I don't think I that length of time to invest in this project. I've done a lot of searching the web for were to go for a good script and while phpFox was not the most popular opinion it does offer the most features, almost all of witch I will be using. I want know how easy the code is to work with, specifically in the 1.5.1 release, as I have heard many say that the 1.1 was horrid. Even more specifically, how easy is adding new features. Any comments would be great, and advice/pointers/direction would be greatly appreciated, as I'm still standing at the first door of this project. Thank You - Pat
  2. Hello, I'm new to these forums and I joined because I am having some problems with a dynamic calendar that I am trying to get working. The error I am receiving is the following: "Fatal error: Maximum execution time of 30 seconds exceeded in /home/rzbqplmx/public_html/phpFunctions.php on line 135". This much I understand... I have and infinite loop, or my code is really really inefficient. My Goal is to create a javascript function call for each event in my database of events, the function call should look something like this : "DefineEvent(20070501, "test", "events.php?id=4", "","" ,"" );" and it does until I have the event stretch between 2 months. here is my code: function checkDateOutput($year, $month, $day){ switch($month){ case '01': if ($day > 31){ $day = '01'; $month = '02'; } break; case '02': if ($day > 28){ $day = '01'; $month = '03'; } break; case '03': if ($day > 31){ $day = '01'; $month = '04'; } break; case '04': if ($day > 30){ $day = '01'; $month = '05'; } break; case '05': if ($day > 31){ $day = '01'; $month = '06'; } break; case '06': if ($day > 30){ $day = '01'; $month = '07'; } break; case '07': if ($day > 31){ $day = '01'; $month = '08'; } break; case '08': if ($day > 31){ $day = '01'; $month = '09'; } break; case '09': if ($day > 30){ $day = '01'; $month = '10'; } break; case '10': if ($day > 31){ $day = '01'; $month = '11'; } break; case '11': if ($day > 30){ $day = '01'; $month = '12'; } break; case '12': if ($day > 31){ $day = '01'; $month = '01'; $year++; } break; } //return ($year.$month.$day); } $rs = mysql_query( "select * from events" ); $list = ''; while($row = mysql_fetch_array( $rs ) ) { #formats the date $date = $row["eventDate"]; $enddate = $row['enddate']; $year = substr($date, 0, 4); $month = substr($date, 5, 2); $day = substr($date, ; $day--; $enddate = substr($enddate, 0, 4) . substr($enddate, 5, 2) . substr($enddate, ; #generates the function for each event do { $day++; if ($day < 10) { $day = '0'.$day; } checkDateOutput($year, $month, $day); $year = substr($date, 0, 4); $month = substr($date, 5, 2); $day = substr($date, ; $list .= "DefineEvent(".$year. $month. $day; $list .= ", \"".$row["name"]; $list .= "\", \"events.php?id=".$row['id']."\", \"\",\"\" ,\"\" );"; }while(($year.$month.$day) <= $enddate); } Thank you very much. if you would like to take a look at the page you can find it at overdriveonline.org/calendar.php ~pat
×
×
  • 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.