Jump to content

rodin

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rodin's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Nevermind, got it working w/ a variation of your code! Thanks very much!
  2. Thanks for the reply! I am using 1 = Agreed, 2 = Disagreed 3 = Agreed 2nd Time as my query. I don't think I understand where to go w/ the code given though?
  3. Hi Everyone, I am trying to get the "Did User Agree" field on a database query to be colored Green for "Agreed" Red for "Disagreed" and Blue for "Agreed (2nd Time)" .. I have my PHP setup to do the query just fine as of right now with alternating column colors, just can't seem to get the colors to work as I am hoping for. Can anyone help me get the Agreed? table's background color to the colors above? Any help is GREATLY appreciated! <?php error_reporting(7); $db = mysql_connect("localhost","......",".....") or die("Problem connecting"); mysql_select_db(".....") or die("Problem selecting database"); $query = "SELECT * FROM rules ORDER BY username"; $result = mysql_query($query) or die ("Query failed"); //let's get the number of rows in our result so we can use it in a for loop $numofrows = mysql_num_rows($result); echo "<TABLE BORDER=\"1\">\n"; echo "<TR bgcolor=\"lightblue\"><TD>UserID</TD><TD>UserName</TD><TD>Agreed?</TD><TD>Date Agreed</TD></TR>\n"; for($i = 0; $i < $numofrows; $i++) { $row = mysql_fetch_array($result); //get a row from our result set if($i % 2) { //this means if there is a remainder echo "<TR bgcolor=\"yellow\">\n"; } else { //if there isn't a remainder we will do the else echo "<TR bgcolor=\"white\">\n"; } echo "<TD>".$row['userid']."</TD><TD>".$row['username']."</TD><TD>".$row['diduseragree']."</TD><TD>".$row['dateagreed']."</TD>\n"; echo "</TR>\n"; } //now let's close the table and be done with it echo "</TABLE>\n"; ?>
  4. Hi All, Looking to see if there is a way to round time to the nearest half hour, so no matter what time is displayed, the nearest half hour is displayed. ie: If time displayed is 1:12AM - regardless, round it up to 1:30AM -- 1:01AM still rounds to 1:30AM -- Is this possible? Was unable to find anything on google to do this.. Any help greatly appreciated
  5. Yes no need to be a smarty pants ;)  I even tried to find the answer myself via google and many other means before posing the question ;)
  6. I want to strip all html tags, EXCEPT want to keep the BOLD and the actual font color= , while getting rid of font size and font face, so where right now I get [code] <font face="Verdana" size=2> <b><font color="#00FFFF">rodin</font></b> [/code] I've accomplished keeping the bold, by using the strip_tags then < b >, but haven't accomplished keeping just the font COLOR and closing the font COLOR.  Is this possible as well? Thanks for the great support here!
  7. Hello everyone,   Just wondering if this were possible to do... Right now, I have a script that uses SigmaChat for my bulletin board, and it queries the remote server.. It works just great --- except when their server is offline.  This is my CURRENT php script called via cron every 5 minutes: [code=php:0] <?php include("http://client0.sigmachat.com/scwho.pl?id=xxxxxx&subroom=0&boldadmin=1&comma=1&countonly=0&chatbg=000000&chatusr=FFFFFF&subroomcolor=FFFFFF&chatadmusr=00FFFF&nousermsg=<smallfont>There+are+currently+no+users+in+chat.<%2Fsmallfont>"); ?> [/code] What i'm looking to do, is basically this: If return value is sucessful, then write the contents to > test.html if cannot connect to remote server, write "Chat Information Temporarily Unavailable" to >test.html I currently call the scripts via cron by doing this: */5 * * * * root /usr/local/bin/php /home/user1/maint/numchat.php > /home/user1/maint/chat/numchat.html Can anyone supply any help on getting this completed? Many thanks!
  8. [!--quoteo(post=386673:date=Jun 21 2006, 06:58 PM:name=rodin)--][div class=\'quotetop\']QUOTE(rodin @ Jun 21 2006, 06:58 PM) [snapback]386673[/snapback][/div][div class=\'quotemain\'][!--quotec--] Hello All; Trying to figure out a code to do something that is probably simple, but I'm not able to find anything to combine to make it happen.. Here is what i'd like to accomplish... Check all files in /home/radar/kabc*.png --- if those files are older than x hours, delete them. After deleting those files, I'd like to copy new "placefiles" in the place of the image, basically, copy test.png to kabc101.png (example filename). I'd like to not loop this process if the file size is equal to 123456 bytes exactly, and have the owner of those files a certain user. What this is, is a radar software that I use to upload to my personal website, so if there's no weather going on, I don't use the radar software, and it's not updating the radar on the web, so, after so many hours of the software not uploading anything new, i'd like to find a way to have these placefiles put in place. Once I start my software again, it'll overwrite those files automatically. Does this seem like it's possible? Is it an easy task? Anyone willing to help on this? Thanks bunches! [/quote] No thoughts on this? is it even possible? Thanks!
  9. Hello All; Trying to figure out a code to do something that is probably simple, but I'm not able to find anything to combine to make it happen.. Here is what i'd like to accomplish... Check all files in /home/radar/kabc*.png --- if those files are older than x hours, delete them. After deleting those files, I'd like to copy new "placefiles" in the place of the image, basically, copy test.png to kabc101.png (example filename). I'd like to not loop this process if the file size is equal to 123456 bytes exactly, and have the owner of those files a certain user. What this is, is a radar software that I use to upload to my personal website, so if there's no weather going on, I don't use the radar software, and it's not updating the radar on the web, so, after so many hours of the software not uploading anything new, i'd like to find a way to have these placefiles put in place. Once I start my software again, it'll overwrite those files automatically. Does this seem like it's possible? Is it an easy task? Anyone willing to help on this? Thanks bunches!
×
×
  • 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.