Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    php source code not working in main window..

    right coudent think of a title sorry bit silly title but here in http://www.devaney-host.com/~mafia
    The rank is not showing up for some reason here's the code..

    PHP Code:
    <?php
    include "includes/db_connect.php";
    include 
    "includes/functions.php";

    logincheck();
    ?> 
    <link href="http://www.gsm.sletz.com/includes/in.css" rel="stylesheet" type="text/css">
    <script language="JavaScript">
    <!--
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
      if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    // -->
    </script>
    <title>GSM</title>
    <div id="Layer1" style="position:absolute; left:152px; top:10px; width:369px; height:420px; z-index:1"><b><u>Money 
      order</u><br>
      &pound;0-&pound;10000 wealth =&quot;Skank&quot;<br>
      &pound;10000-&pound;50000=&quot;Poor&quot;<br>
      &pound;50000-&pound;100000=&quot;A Nobody&quot;<br>
      &pound;100000-&pound;500000=&quot;Good wage&quot;<br>
      &pound;500000-&pound;2000000= Wealthy&quot;<br>
      &pound;2000000-&pound;5000000=&quot;Business man&quot;<br>
      &pound;5000000-&pound;10000000=&quot;Rich bast***&quot;<br>
      &pound;10000000-&pound;50000000=&quot;One rich fuc**&quot;<br>
      &pound;50000000&raquo;=&quot;Richer than god&quot;</b></div>
    <b> <u><br>Rank order</u></br>
    </b><b><br>Paper kid </br>
    <br>Thief</br>
    <br>Security guard</br>
    <br>Body guard</br>
    <br>Criminal </br>
    <br>Sniper</br>
    <br>Soldier </br>
    <br>Marksman </br>
    <br>Wise guy</br>
    <br>Drug lord </br>
    <br>Advisor</br>
    <br>Made man </br>
    <br>General</br>
    <br>Capo</br>
    <br>War master</br>
    <br>Boss</br>
    <br>Godfather</br>
    <br>Don</br>
    <br>Bosses of Boss</br>
    <br>Mob Boss</br>
    <br>War God</br>
    <br>Slayer</br>
    <br>Messiah</br>
    <br>Supreme Being</br></b>
    <p></p>


  • #2
    New Coder
    Join Date
    May 2006
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    know im a lil bit of a n00b but want have i odne wrong?

  • #3
    New Coder
    Join Date
    May 2006
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Also if you been on the site this could help you with my problem the your stat's page
    PHP Code:
    <?php session_start(); include_once"includes/db_connect.php"; include_once"includes/functions.php"logincheck(); 
    $username=$_SESSION['username'];
    $query=mysql_query("SELECT * FROM users WHERE username='$username'");
    $fetch=mysql_fetch_object($query);

    $query1=mysql_query("SELECT * FROM user_info WHERE username='$username'");
    $info=mysql_fetch_object($query1);




    $currank=$fetch->rank;
    $rankp $fetch->rankpoints;

    if (
    $currank == "Tramp"){
    $max "100";
    $old="0";
    }elseif (
    $currank == "Paper Kid"){
    $max "200";
    $old="100";
    }elseif (
    $currank == "Thief"){
    $max '400';
    $old="200";
    }elseif (
    $currank == "Hooligan"){
    $max '800';
    $old="400";

    }elseif (
    $currank == "SecurityGuard"){
    $max '1600';
    $old="800";

    }elseif (
    $currank == "BodyGuard"){
    $max '2000';
    $old="1600";

    }elseif (
    $currank == "Criminal"){
    $max '4000';
    $old="2000";
    }elseif (
    $currank == "Sniper"){
    $max '8000';
    $old="4000";

    }elseif (
    $currank == "Soldier"){
    $max '12800';
    $old="8000";

    }elseif (
    $currank == "MarksMan"){
    $max '25600';
    $old="12800";

    }elseif (
    $currank == "WiseGuy"){
    $max '102400';
    $old="25600";

    }elseif (
    $currank == "Druglord"){
    $max '204800';
    $old="102400";

    }elseif (
    $currank == "Advisor"){
    $max '304800';
    $old="204800";

    }elseif (
    $currank == "MadeMan"){
    $max '404800';
    $old="304800";

    }elseif (
    $currank == "General"){
    $max '504800';
    $old="404800";

    }elseif (
    $currank == "Capo"){
    $max '604800';
    $old="504800";
    }elseif (
    $currank == "WarMaster"){
    $max '704800';
    $old="604800";
    }elseif (
    $currank == "Boss"){
    $max '804800';
    $old="704800";
    }elseif (
    $currank == "Godfather"){
    $max '904800';
    $old="804800";
    }elseif (
    $currank == "Don"){
    $max '1004800';
    $old="904800";
    }elseif (
    $currank == "Bosses of Boss"){
    $max '1104800';
    $old="1004800";
    }elseif (
    $currank == "Mob Boss"){
    $max '1204800';
    $old="1104800";
    }elseif (
    $currank == "WarGod"){
    $max '1304800';
    $old="1204800";
    }elseif (
    $currank == "Slayer"){
    $max '1404800';
    $old="1304800";
    }elseif (
    $currank == "Messiah"){
    $max '1504800';
    $old="1404800";
    }elseif (
    $currank == "SupremeBeing"){
    $max '1604800';
    $old="1504800";
    }elseif (
    $currank == "God"){
    $max '17048000';
    $old="1604800";
    }

    $percent round((($rankp-$old)/($max-$old))*100);
    ?>


    <html>


    <body>

    <table width="755" border="0" align="center" cellpadding="0" cellspacing="3">
      <!--DWLayoutTable-->
      <tr> 
        <td width="370" height="174" valign="top"><table width="100%" border="1" cellpadding="2" class=thinline cellspacing="0" bordercolor="black">
            <!--DWLayoutTable-->
            <tr> 
              <td background="includes/grad.jpg" colspan="2"><div align="center">Waiting 
                  times</div></td>
            </tr>
            <tr> 
              <td width="184" ><strong>Crime</strong></td>
              <td width="177"> 
                <?php  if ($fetch->lastcrime <= time()){ echo "<font color=green>Ready</font>"; }else{   echo "".maketime($fetch->lastcrime).""; } ?>
              </td>
            </tr>
            <tr> 
              <td ><strong>Gta</strong></td>
              <td > 
                <?php  if ($fetch->lastgta <= time()){ echo "<font color=green>Ready</font>"; }else{   echo "".maketime($fetch->lastgta).""; } ?>
              </td>
            </tr>
              <tr> 
              <td ><strong>Bike Jack</strong></td>
              <td > 
                <?php  if ($fetch->lastbt <= time()){ echo "<font color=green>Ready</font>"; }else{   echo "".maketime($fetch->lastbt).""; } ?>
              </td>
            </tr>
                <tr> 
              <td ><strong>Boat Theft</strong></td>
              <td > 
                <?php  if ($fetch->lastboat <= time()){ echo "<font color=green>Ready</font>"; }else{   echo "".maketime($fetch->lastboat).""; } ?>
              </td>
            </tr>
    <tr> 
              <td height="11"><strong>Organised crime</strong></td>
              <td height="11"> 
                <?php  if ($fetch->last_oc  <= time()){ echo "<font color=green>Ready</font>"; }else{   echo "".maketime($fetch->last_oc ).""; } ?>
              </td>
            </tr>
            <tr> 
              <td height="11"><strong>Extortion</strong></td>
              <td height="11"> 
                <?php if ($fetch->last_ext time()){ echo "<font color=green>Ready</font>"; }else{ echo "".maketime($fetch->last_ext).""; } ?>
              </td>
            </tr>
            <tr> 
              <td height="11"><strong>Order</strong></td>
              <td height="11"> 
                <?php if ($fetch->last_order time()){ echo "<font color=green>Ready</font>"; }else{ echo "".maketime($fetch->last_order).""; } ?>
              </td>
            </tr>
            <tr> 
              <td height="5"><strong>Next kill attempt</strong></td>
              <td height="5"> 
                <?php if ($fetch->last_kill time()){ echo "<font color=green>Ready</font>"; }else{ echo "".maketime($fetch->last_kill).""; } ?>
              </td>
            </tr>
            <tr> 
              <td height="3"><strong>Next race</strong></td>
              <td height="3"> 
                <?php if ($fetch->last_race time()){ echo "<font color=green>Ready</font>"; }else{ echo "".maketime($fetch->last_race).""; } ?>
              </td>
            </tr>
            <tr> 
              <td height="3"><strong>Next flight</strong></td>
              <td height="3"> 
                <?php if ($fetch->lasttravel time()){ echo "<font color=green>Ready</font>"; }else{ echo "".maketime($fetch->lasttravel).""; } ?>
              </td>
            </tr>
          </table></td>
        <td width="376" valign="top"><table width="100%" border="1" cellpadding="2" class=thinline cellspacing="0" bordercolor="black">
            <!--DWLayoutTable-->
            <tr> 
              <td background="includes/grad.jpg" colspan="2"><div align="center">Counters</div></td>
            </tr>
            <tr> 
              <td width="184" ><strong>Crimes</strong></td>
              <td width="177"><?php echo "".makecomma($info->crimes).""?></td>
            </tr>
            <tr> 
              <td ><strong>Gta's</strong></td>
              <td ><?php echo "".makecomma($info->gtas).""?></td>
            </tr>
            <tr> 
              <td height="11"><strong>Organised crimes</strong></td>
              <td height="11"><?php echo "".makecomma($info->ocs).""?></td>
            </tr>
            <tr> 
              <td height="11"><strong>Kills</strong></td>
              <td height="11"><?php echo "".makecomma($info->kill_skill).""?></td>
            </tr>
          
            <tr> 
              <td height="3"><strong>Referrals</strong></td>
              <td height="3"><?php echo "$fetch->referral"?></td>
            </tr>
          </table></td>
      </tr>
      <tr> 
        <td height="138" valign="top"><table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
            <!--DWLayoutTable-->
            <tr> 
              <td width="375" height="138"><table width="100%" border="1" cellpadding="2" class=thinline cellspacing="0" bordercolor="black">
                  <!--DWLayoutTable-->
                  <tr> 
                    <td background="includes/grad.jpg" colspan="2"><div align="center">Inventory</div></td>
                  </tr>
                  <tr> 
                    <td width="184" ><strong>Weapon</strong></td>
                    <td width="177"><?php echo "$fetch->weapon"?></td>
                  </tr>
                  <tr> 
                    <td ><strong>Protection</strong></td>
                    <td ><?php echo "$fetch->protection"?></td>
                  </tr>
                  <tr> 
                    <td ><strong>Backpack</strong></td>
                    <td >None</td>
                  </tr>
                  <tr> 
                    <td height="11"><strong>Plane</strong></td>
                    <td height="11"><?php echo "$fetch->plane"?></td>
                  </tr>
                  <tr> 
                    <td height="11"><strong>Safe</strong></td>
                    <td height="11"><?php echo "$fetch->protection"?></td>
                  </tr>
                  <tr> 
                    <td height="5"><strong>Bullets</strong></td>
                    <td height="5"><?php echo "".makecomma($fetch->bullets).""?></td>
                  </tr>
                </table></td>
            </tr>
          </table></td>
        <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
            <!--DWLayoutTable-->
            <tr> 
              <td width="380" height="138"><table class=thinline width="100%" border="1" cellpadding="2" cellspacing="0" bordercolor="black">
                  <!--DWLayoutTable-->
                  <tr> 
                    <td colspan="2" background="includes/grad.jpg"><div align="center">Your 
                        information</div></td>
                  </tr>
                  <tr> 
                    <td width="188" ><strong>User id</strong></td>
                    <td width="173">#<?php echo "$fetch->id"?></td>
                  </tr>
                  <tr> 
                    <td ><strong>Username</strong></td>
                    <td><?php echo "$fetch->username"?></td>
                  </tr>
                  <tr> 
                    <td ><strong>Money</strong></td>
                    <td >&pound;<?php echo "".makecomma($fetch->money).""?></td>
                  </tr>
                  <tr> 
                    <td ><strong>Registered date</strong></td>
                    <td ><?php echo "$fetch->regged"?></td>
                  </tr>
                  <tr> 
                    <td ><strong>Rank</strong></td>
                    <td ><?php echo "$fetch->rank"?></td>
                  </tr>
                  <tr> 
                    <td ><strong>Location</strong></td>
                    <td ><?php echo "$fetch->location"?></td>
                  </tr>
                </table></td>
            </tr>
          </table></td>
      </tr>
      <tr> 
        <td height="48" valign="top"> <table width="100%" border="1" class=thinline  cellpadding="2" cellspacing="0" bordercolor="black">
            <!--DWLayoutTable-->
            <tr> 
              <td width="370" background="includes/grad.jpg" valign="top"><div align="center">Rank 
                  progress</div></td>
            </tr>
            <tr> 
              <td height="25" valign="top"> <table width="<?php echo "$percent"?>%" border="1" cellpadding="2" cellspacing="0" bordercolor=black class=thinline>
                  <tr> 
                    <td width="18"><?php echo "$percent"?>%</td>
                  </tr>
                </table></td>
            </tr>
          </table></td>
        <td valign="top"><table width="100%" border="1" class=thinline  cellpadding="2" cellspacing="0" bordercolor="black">
            <!--DWLayoutTable-->
            <tr> 
              <td width="376" background="includes/grad.jpg" valign="top"><div align="center">Energy</div></td>
            </tr>
            <tr> 
              <td height="25" valign="top"><table width="<?php echo "$fetch->energy"?>%" border="1" cellpadding="2" cellpadding="2" cellspacing="0" bordercolor=black class=thinline>
                  <tr> 
                    <td width="18"><?php echo "$fetch->energy"?>%</td>
                  </tr>
                </table></td>
            </tr>
          </table></td>
      </tr>
      <tr> 
        <td height="32"><table width="100%" border="1" class=thinline  cellpadding="2" cellspacing="0" bordercolor="black">
            <!--DWLayoutTable-->
            <tr> 
              <td width="370" background="includes/grad.jpg" valign="top"><div align="center">Health</div></td>
            </tr>
            <tr> 
              <td height="25" valign="top"> <table width="<?php echo "$fetch->health"?>%" border="1" cellpadding="2" cellspacing="0" bordercolor=black class=thinline>
                  <tr> 
                    <td width="18"><?php echo "$fetch->health"?>%</td>
                  </tr>
                </table></td>
            </tr>
          </table></td>
        <td><table width="100%" border="1" class=thinline  cellpadding="2" cellspacing="0" bordercolor="black">
            <!--DWLayoutTable-->
            <tr> 
              <td width="370" background="includes/grad.jpg" valign="top"><div align="center">Killing 
                  skill </div></td>
            </tr>
            <tr> 
              <td height="25" valign="top"> <table width="<?php echo "$info->kill_skill"?>%" border="1" cellpadding="2" cellspacing="0" bordercolor=black class=thinline>
                  <tr> 
                    <td width="18"><?php echo "$info->kill_skill"?>%</td>
                  </tr>
                </table></td>
            </tr>
          </table></td>
      </tr>
      <tr> 
        <td height="44"><table width="100%" border="1" class=thinline  cellpadding="2" cellspacing="0" bordercolor="black">
            <!--DWLayoutTable-->
            <tr> 
              <td width="370" background="includes/grad.jpg" valign="top"><div align="center">Calculator</div></td>
            </tr>
            <td class=header align=center><center><a href="calc.php">Click To Use</a></center></td>
    </table></td>
        <td><table width="100%" border="1" class=thinline  cellpadding="2" cellspacing="0" bordercolor="black">
            <!--DWLayoutTable-->
            <tr> 
              <td width="370" background="includes/grad.jpg" valign="top"><div align="center">Clock 
                  tower </div></td>
            </tr>
            <tr> 
              <td height="25" valign="top"><center><? echo gmdate('Y-m-d h:i:s'); ?></center> </td>
            </tr>
          </table></td>
      </tr>
    </table>
    <div align="center"></div>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    </body>
    </html>
    ?>

  • #4
    New Coder
    Join Date
    May 2006
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sorry to keep posting but any one know what my prob could be?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •