Jump to content

maxudaskin

Members
  • Posts

    628
  • Joined

  • Last visited

Everything posted by maxudaskin

  1. Ok, so I cannot spell
  2. mysql_query("SELECT tpye, pid, SUM(totaltime) as sumValue FROM pireps WHERE type = '0' GROUP BY pid ORDER BY sumValue DESC LIMIT 5") Which outputs: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/.grable/vzoom/virtualzoom.net/index.php on line 402
  3. How can this be written properly? <?php echo "<tr style='background-color:". $colour ."' onMouseOver='this.style.backgroundColor:"#EFF4FB"' onMouseOut='this.style.backgroundColor:". $colour ."'>"; ?>
  4. Is it possible? {if($colourbare == 1){ echo ''; $colour = '#F2F2F2'; }else{ $colour = '#E2E2E2'; echo ''; } ?> <tr style='background-color:<?php $colour; ?>' onMouseOver='this.style.backgroundColor:#EFF4FB' onMouseOut='this.style.backgroundColor:<?php $colour; ?>'>;
  5. <?php $result = mysql_query("select * from users ORDER BY pid"); while($row = mysql_fetch_array($result)) {if($colourbare == 1){ echo ''; $colour = '#F2F2F2'; }else{ $colour = '#E2E2E2'; echo ''; } echo "<tr>"; echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $row['fname'] . "</td>"; echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $row['lname'] . "</td>"; echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $row['pid'] . "</td>"; echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $row['hub'] . "</td>"; echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $row['country'] . "</td>"; echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $row['position'] . "</td>"; $pid = $row['pid']; $hours_sql = mysql_query("SELECT SUM(totaltime) as sumValue FROM pireps WHERE pid = {'$pid'} GROUP BY pid ORDER BY sumValue DESC LIMIT 5"); while($hours = mysql_fetch_array($hours_sql)){ // Line 353 - - - - - - - - - - - - - - - - - - echo "<td bgcolor='". $colour ."'><a href='../user.php?pid=" . $row['pid'] . "' class='ab'>" . $hours['sumValue'] . "</td>"; } echo "</tr>"; ?> I get the error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/.grable/vzoom/virtualzoom.net/info/roster.php on line 353
  6. I want to make my own, going with open source is too easy and I have taken the easy way out too many times.
  7. Am I looking in the right spot?
  8. I have this open: http://www.phpbb.com/about/features/compare.php The thing is, I want the user's perspective.
  9. I see one major problem... well, actually, I don't see it.
  10. There are not many people online at this time of night, and most people that answer, are pretty much only fluent in HTML, Javascript and PHP... not many people know tpl.
  11. Can you give us a link?
  12. I want to make my own forum for my website, but I am having difficulty thinking of good features. Do not be afraid to say obvious things because to me, it might not be obvious.
  13. Try changing <?php $config['whos_online'][$x] = '<a href="/members/profile.php?id='. $nuser['id'] .'&user='. $nuser['username'] .'">'. $nuser['display'] .'</a><br />'; ?> to <?php $config['whos_online'][$x] = '<a href="/members/profile.php?id='. $nuser["id"] .'&user='. $nuser["username"] .'">'. $nuser["display"] .'</a><br />'; ?>
  14. Hey everybody, I am a webmaster and "CEO" of a Virtual Airline for Microsoft's Flight Simulator 2004 and FSX. I was wondering how my website looked aesthetically. I know that it looks better than most VA's out there, especially the well known Delta Virtual Airlines, but they are loved because of their features. My VA is at http://www.virtualzoom.net . Criticism is appreciated.
  15. What I would do if I were you is have a function that is put on a page that is required() in all pages. The function would be like so... <?php session_start(); if(empty ($_SESSION['lang'])){ if(!empty($_GET['lang'])){ $_SESSION['lang'] = $_GET['lang']; }else{ echo '<form id="lang" name="lang" method="get" action="'.$PHP_SELF.'">'; echo '<select name="lang">'; echo '<option value="en">English</option>'; echo '<option value="fr">Français</option>'; echo '</select>'; echo '<button type="submit">Submit</button>'; echo '</form>'; }}else{ $lang = $_SESSION['lang']; } ?>
  16. Here is what I want to do. I have a database with flight hours that are specifically assigned to a particular user. I wanted to have the hours added together according to the users... so if there were three entries for 0100, such as 3, 1.5, and 7.5, I want to have them added up and then the top ten users with the most hours to be sorted DESC.
  17. maxudaskin

    onClick

    <td width="33%" height="20" align="center" valign="middle" class="cursor_link" style="background:url(../images/admin_tab_L.jpg)" onclick="newapps.style.class='uncollapsedtable'" onclick="filedflights.style.class='collapsedtable'" onclick="messages.style.class='collapsedtable'" onMouseOver="this.style.background='url(../images/admin_tab_L_hvr.jpg)'" onMouseOut="this.style.background='url(../images/admin_tab_L.jpg)'"> It does not seem to be working... any ideas? CSS: .collapsedtable{ visibility:collapse; } .uncollapsedtable{ visibility:visible; } FULL SCRIPT: <table onload="MM_preloadImages('../images/admin_tab_C_hvr.jpg','../images/admin_tab_L_hvr.jpg','../images/admin_tab_R_hvr.jpg','../images/admin_tab_C.jpg','../images/admin_tab_R.jpg','../images/admin_tab_L.jpg')" width="98%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="33%" height="20" align="center" valign="middle" class="cursor_link" style="background:url(../images/admin_tab_L.jpg)" onclick="newapps.style.class='uncollapsedtable'" onclick="filedflights.style.class='collapsedtable'" onclick="messages.style.class='collapsedtable'" onMouseOver="this.style.background='url(../images/admin_tab_L_hvr.jpg)'" onMouseOut="this.style.background='url(../images/admin_tab_L.jpg)'"><div class="middle_vallign" style="color:#FFFFFF; height:100%; vertical-align:middle;">New Applicants</div></td> <td width="33%" height="20" align="center" valign="middle" class="cursor_link" style="background:url(../images/admin_tab_C.jpg)" onMouseOver="this.style.background='url(../images/admin_tab_C_hvr.jpg)'" onMouseOut="this.style.background='url(../images/admin_tab_C.jpg)'"><div class="middle_vallign" style="color:#FFFFFF; height:100%; vertical-align:middle;">Filed Flights</div></td> <td width="34%" height="20" align="center" valign="middle" class="cursor_link" style="background:right url(../images/admin_tab_R.jpg)" onMouseOver="this.style.background='right url(../images/admin_tab_R_hvr.jpg)'" onMouseOut="this.style.background='right url(../images/admin_tab_R.jpg)'"><div class="middle_vallign" style="color:#FFFFFF; height:100%; vertical-align:middle;">Messages</div></td> </tr> <tr> <td colspan="3" bgcolor="#333355"><table width="100%" border="0" cellpadding="0" cellspacing="1" id="newapps"> <tr> <td bgcolor="#FFFFFF"> </td> </tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="1" id="filedflights"> <tr> <td bgcolor="#FFFFFF"><br /></td> </tr> </table><table width="100%" border="0" cellpadding="0" cellspacing="1" id="messages"> <tr> <td bgcolor="#FFFFFF"><br /></td> </tr> </table></td> </tr> </table>
  18. I just got back to PHP after a somewhat lengthy leave...
  19. How can I automatically redirect after header information is already sent?
  20. How would I be able to remove the OOM from OOM0100 if $var1 = "OOM0100"; ?
  21. I think the issue was that it wouldn't let me redefine $ttlt while using it in the redefinition.
  22. I think he means to have block letters... so something like this:
  23. <?php $dept = $_POST['dept']; $dest = $_POST['arrv']; $acft = $_POST['aircraft']; $tail = $_POST['tail']; $ttlt = $_POST['min']/60; $ttlt = round($ttlt,2); $aspd = $_POST['airspeed']; $dptm = $_POST['depttime']; $dstm = $_POST['arrvtime']; $calt = $_POST['alt']; $altt = $_POST['alt_type']; $rout = $_POST['route']; $fnum = $_POST['flight_num']; $query = mysql_query("INSERT INTO `database`.`table` (`departure` ,`destination` ,`flight_id` ,`route` ,`aircraft` ,`totaltime` ,`online` ,`date` ,`type` ,`pid`)VALUES ('{$dept}', '{$dest}', '{$fnum}', '{$rout}', '{$acft}', '{$ttlt}', '{}', '{}', '1', '{}')"); ?> It keeps outputting 0... Any ideas?
  24. Sorry. I should have researched first. round(number to be rounded,decimal points)
  25. I was wondering if you could round 0.98333333333 to a number with three significant numbers (0.98) and round up if needed... is it possible?
×
×
  • 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.