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 2 of 2

Thread: Help

  1. #1
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help

    Hello there i am new to these forums and i am having a bit of a problem with my php code. I am trying to add my new style to my website. I have managed to implement all of the new design except for the main content as it keeps floating to the bottom left and will not move. As shown in image below. Thanks any help would be great full


    Help-help.jpg


    CSS

    Code:
    @charset "utf-8";
    
    /* CSS Document */
    
    body { padding:0px; margin:0px; color:FFFFFF;}
    
    body { background:#070707 url(../images/bg.jpg) center 0 no-repeat; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:13px;}
    
    .container{ width:980px; height:980px; margin:0 auto; padding:0;}
    
    
    
    .header{width:954px; height:150px; background:url(../images/banner_bg.jpg) 0 0 no-repeat; margin:0; padding:0; float:left;}
    
    .left_bar{ width:13px; height:100%; margin:0; padding:0; float:left; background:url(../images/sidebars.png)}
    
    .content_body{ width:954px; height:100%; overflow:hidden; float:left;}
    
    .right_bar{ width:13px; height:100%; float:left; background:url(../images/sidebars.png)}
    
    
    
    .ul_nav { width:954px; height:40px; margin:0; padding:0; background:url(../images/ul_bg.jpg) 0 0 repeat-x; float:left; }
    
    .ul_nav li { width:150px; height:40px; list-style:none; float:left; margin:0; padding:0;}
    
    .ul_nav li a { font-size:17px; text-decoration:none; margin:0; padding:0;}
    
    .ul_nav li a:hover { font-size:17px; text-decoration:none; margin:0; padding:0;}
    
    
    
    .award { width:954px; height:40px; margin:0; padding:0; border-radius:10px; border:1px solid #2d2d2d; background:url(../images/award_bg.jpg) 0 0 repeat-x; float:left; }
    
    
    
    .c_green { width:213px; height:40px; margin:0 10px; padding:0; float:left; color:#72fb01; text-align:center; font-size:9px; line-height:22px; }
    
    .green { width:100px; height:5px; margin:0 auto; padding:0; border-radius:10px; border:1px solid #74fb00; background-color:#72fb01; }
    
    
    
    .c_blue { width:213px; height:40px;  margin:0 10px;  padding:0; float:left; color:#00d1ff; text-align:center; font-size:9px; line-height:22px; }
    
    .blue { width:100px; height:5px;  margin:0 auto;  padding:0; border-radius:10px; border:1px solid #00caff; background-color:#00d1ff; }
    
    
    
    .c_red { width:213px; height:40px;  margin:0 10px;  padding:0; float:left; color:#f1011e; text-align:center; font-size:9px; line-height:22px; }
    
    .red { width:100px; height:5px; margin:0 auto; padding:0; border-radius:10px; border:1px solid #fd001d; background-color:#f1011e; }
    
    
    
    .c_yellow { width:213px; height:40px;  margin:0 10px; padding:0; float:left; color:#ffc700; text-align:center; font-size:9px; line-height:22px; }
    
    .yellow { width:100px; height:5px; margin:0 auto; padding:0; border-radius:10px; border:1px solid #ffc008; background-color:#ffc700; }
    
    
    
    .box_container{ width:954px; height:612px; margin:0; padding:0; background:#111111 url(../images/box_containerbg.jpg) 0 bottom repeat-x; float:left; }
    
    
    
    .left_box{ width:230px; height:365px; margin:0; padding:0 0 0 10px; float:left; }
    
    
    
    .left_box p{ color:#FFFFFF; font-size:10px; text-align:center; margin:0; padding:3px 0px; }
    
    
    
    
    
    .left_bx1{ width:18px; height:18px; margin:10px 5px 0px 58px; padding:0; border-radius:4px; border:1px solid #222222; background:#000000; float:left; }
    
    
    
    .left_bx{ width:18px; height:18px; margin:10px 5px 0px 5px; padding:0; border-radius:4px; border:1px solid #222222; background:#000000; float:left; }
    
    
    
    .left_menuR { width:130px; float:left; height:22px; line-height:18px; font-size:12px; margin:0; padding:0px; text-align:center; border-radius:4px; border:1px solid #1e1e1e; background:#000000; text-decoration:none; color:#F00;}
    
    .left_menuR:hover { width:130px; float:left; height:22px; line-height:18px; font-size:12px; margin:0; padding:0px; text-align:center; border-radius:4px; border:1px solid #1e1e1e; background:#0c0c0c; text-decoration:none; color:#fff;}
    
    
    
    
    
    .left_menu { width:130px; float:left; height:22px; line-height:18px; font-size:12px; margin:0; padding:0px; text-align:center; border-radius:4px; border:1px solid #1e1e1e; background:#0c0c0c; text-decoration:none; color:#9f9f9f;}
    
    .left_menu:hover { width:130px; float:left; height:22px; line-height:18px; font-size:12px; margin:0; padding:0px; text-align:center; border-radius:4px; border:1px solid #1e1e1e; background:#0c0c0c; text-decoration:none; color:#fff;}
    
    
    
    
    
    .boxtop_left{ width:318px; height:140px; margin:25px 10px 8px 35px; padding:0; border:1px solid #222222; background:#FFFFFF; float:left; }
    
    
    
    .boxtop_right{ width:318px; height:140px; margin:25px 10px 8px 10px; padding:0; border:1px solid #222222; background:#0f0e0e; float:left; }
    
    
    
    .box_bottom{ width:660px; height:140px; margin:0px 10px 30px 35px; padding:0; border:1px solid #222222; background:#0f0e0e; float:left; }
    
    
    
    .footer { width:954px; height:37px; margin:0; padding:0; border:1px solid #2d2d2d; background:url(../images/ul_bg.jpg) 0 0 repeat-x; float:left; text-align:center; color:#525252; line-height:28px; }
    
    
    
    .contentcontent21 { 		
    	background-color: #000000;
    	border: 2px solid #4D1A1A;
    width="100%" height="100%"
    	background-position:center;
       background-repeat: no-repeat;
            text-decoration: none;
    
    	color: #ffffff;
    
    	font-size: 10px; }
    
    
    .contentcontent { 		
    	
    	
            background-color: #000000;
    	background-position:center;
             background-repeat: no-repeat;
            text-decoration: none;
    	margin: 0px;
    	color: #ffffff;
    
    	font-size: 12px; }
    	
    	
    
    .contenthead{
    margin-top: 0px;
    border: 2px solid #000000;
    	margin: 0px;
    	font-size: 13px;
    	line-height: 18px;
    	font-weight: bold;
    	color: 000000:
    	height: 28px;
    	width: 500px;
    	float: right;
    	background-position: center;
    	color: #FFFFFF;
    }
    .contenthead1{
    margin-top: auto;
    border: 2px solid #000000;
    	margin: 0px;
    	font-size: 13px;
    	line-height: 28px;
    	font-weight: bold;
    	
    
    	
    	color: #FFFFFF;
    }
    
    TABLE, TBODY, TR, TD, TH {
      padding:0;
    margin:0;
      border-spacing:0; /* or border-collapse:collapse */
    }

    Header


    Code:
    <?php
    session_start();
    
    if (!isset($_SESSION['id'])){
        include('home.php');
        die();
    }
    
    include 'dbcon.php';
    
    if (isset($_POST['clean_sb'])) {
        
        if (isset($_POST['token']) && $_POST['token'] == $_SESSION['token']) {
            $soc = mysql_query("SELECT admin FROM grpgusers WHERE id=". mysql_real_escape_string($_SESSION['id']));
    	$f = mysql_fetch_assoc($soc);
    	if($f['admin'] != 1)
    	{
    	 //Do nothing
    	}
    	else
    	{
    	 mysql_query("TRUNCATE table shoutbox_kyle");
    	}
        } else {
            echo 'The request expired.';
        }
        
    }
    
    
    include 'classes.php';
    $profile_class = new User($_GET['id']);
    
    if ($_GET['action'] == "logout"){
    	session_destroy();
    	die('<style type="text/css">
    <!--
    
    body {
    
    background-color: #000000;
    }
    -->
    </style><meta http-equiv="refresh" content="0;url=index.php"><center><img src=logoutpic.gif></center>');
    }
    function microtime_float()
    
    {
    
     $time = microtime();
    
     return (double)substr( $time, 11 ) + (double)substr( $time, 0, 8 );
    }
    $user_class = new User($_SESSION['id']);
    
    // get style info
    $cresult = mysql_query("SELECT `value` FROM `styles` WHERE `style`='". mysql_real_escape_string($user_class->style) ."'");
    $i = 0;
    while($line = mysql_fetch_array($cresult, MYSQL_ASSOC)) {
    	$color[$i] = $line['value'];
    	$i++;
    }
    /* Finding items */
    $fia=(int) rand(1,1000); /* not sure why this says this item is on rand.satan...Anything that is buyable from id 1 to 105 */
    $fib=(int) rand(20,1000); /* not sure why this says this item is on rand.satan...Anything that is buyable from id 1 to 105 */
    if($fia == $fib)
    {
    $iq = mysql_query("SELECT id,itemname FROM `items` WHERE `buyable` = 1 ORDER BY rand() LIMIT 1");
    $r = mysql_fetch_array($iq);
    $item = $r['id'];
    $userid = $user_class->id;
    
    mysql_query("INSERT INTO inventory VALUES ($userid, $item, 1)");
    Send_Event($userid,"While Playing The Game You Found A {$r['itemname']} Think Of It As A Present For Playing The Game.");
    }
    
    //get style info
    $result = mysql_query("SELECT * FROM `serverconfig`");
    $worked = mysql_fetch_array($result);
    if($worked['serverdown'] != "" && $user_class->admin != 1){
    	die("<h1><font color='red'>SERVER DOWN<br><br>".$worked['serverdown']."</font></h1>");
    }
    $resultrelation = mysql_query("SELECT * FROM `rel_requests` WHERE `player` = '$user_class->id'");
    $time = date(F." ".d.", ".Y." ".g.":".i.":".sa,time());
    $result = mysql_query("UPDATE `grpgusers` SET `lastactive` = '".time()."', `ip` = '".$_SERVER['REMOTE_ADDR']."' WHERE `id`='". mysql_real_escape_string($_SESSION['id']) ."'");
    
    function callback($buffer){ 
      $user_class = new User($_SESSION['id']);
    
      $checkhosp = mysql_query("SELECT * FROM `grpgusers` WHERE `hospital`!='0'");
      $nummsgs = mysql_num_rows($checkhosp);
      $hospital = "[".$nummsgs."]";
      
      $checkjail = mysql_query("SELECT * FROM `grpgusers` WHERE `jail`!='0'");
      $nummsgs = mysql_num_rows($checkjail);
      $jail = "[".$nummsgs."]";
    
      $checknews = mysql_query("SELECT * FROM `news` WHERE `to`='" . mysql_real_escape_string($user_class->username) . "' and `viewed`='1'");
      $numnews = mysql_num_rows($checknews);
      $news = "[".$numnews."]";
      
      $checkmail = mysql_query("SELECT * FROM `mail` WHERE `to`='$user_class->id' and `viewed`='1'");
      $nummsgs = mysql_num_rows($checkmail);
      $mail = "[".$nummsgs."]";
      
      $checkmail = mysql_query("SELECT * FROM `events` WHERE `to`='$user_class->id' and `viewed` = '1'");
      $numevents = mysql_num_rows($checkmail);
      $events = "[".$numevents."]";
      
    	$result = mysql_query("SELECT * from `effects` WHERE `userid`='".$user_class->id."'");
    	if (mysql_num_rows($result) != 0){
    	 $effects = '<div class="headbox">Current Effects</div>';
    	 while($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
    	         $effects .= '<a class="leftmenu" href="effects?view='.$line['effect'].'">'.$line['effect']." (".floor($line['timeleft']).")".'</a></ul><br />';
    	 }
    	}
    
      $out = $buffer;
      $out = str_replace("<!_-money-_!>", prettynum($user_class->money,1), $out);
      $out = str_replace("<!_-formhp-_!>", $user_class->formattedhp, $out);
      $out = str_replace("<!_-hpperc-_!>", $user_class->hppercent, $out);
      $out = str_replace("<!_-formenergy-_!>", $user_class->formattedenergy, $out);
      $out = str_replace("<!_-energyperc-_!>", $user_class->energypercent, $out);
      $out = str_replace("<!_-formawake-_!>", $user_class->formattedawake, $out);
      $out = str_replace("<!_-awakeperc-_!>", $user_class->awakepercent, $out);
      $out = str_replace("<!_-formnerve-_!>", $user_class->formattednerve, $out);
      $out = str_replace("<!_-nerveperc-_!>", $user_class->nervepercent, $out);
      $out = str_replace("<!_-points-_!>", prettynum($user_class->points), $out);
      $out = str_replace("<!_-credits-_!>", prettynum($user_class->credits), $out);
      $out = str_replace("<!_-level-_!>", $user_class->level, $out);
      $out = str_replace("<!_-hospital-_!>", $hospital, $out);
      $out = str_replace("<!_-jail-_!>", $jail, $out);
      $out = str_replace("<!_-mail-_!>", $mail, $out);
      $out = str_replace("<!_-news-_!>", $news, $out);
      $out = str_replace("<!_-events-_!>", $events, $out);
      $out = str_replace("<!_-effects-_!>", $effects, $out);
      $out = str_replace("<!_-cityname-_!>", $user_class->cityname, $out);  
      $out = str_replace("<!_-formexp-_!>", $user_class->formattedexp, $out);
      $out = str_replace("<!_-expperc-_!>", $user_class->exppercent, $out);
      $out = str_replace("<!_-countryname-_!>", $user_class->countryname, $out);
      $out = str_replace("<!_-hosp-_!>", $hospital, $out);
      $out = str_replace("<!_-ota;-_!>", $hospital, $out);
    
      return $out;
    }
    ob_start("callback");
    ?><?php
    
    $stats = new User_Stats("bang");
    
    ?>
    
    <html>
    <head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>mafia</title>
    
    <link href="mafia/css/style_scores.css" rel="stylesheet" type="text/css">
    <script language="javascript">
        function changeleft(loca){
            var od=''
            var imgs = document.getElementById("leftsec").getElementsByTagName("img"); 
            for (var i = 0, l = imgs.length; i < l; i++) {  
                od=imgs[i].id;
    
                if(od==loca){
                    imgs[i].src="images/"+od+"_over.jpg";
                    imgs[i].onmouseover="";
                    imgs[i].onmouseout="";
                }else{
                    od = imgs[i].id;
                    imgs[i].src="images/"+od+".jpg";
                    this.onmouseover = function (){this.src="images/"+od+"_over.jpg";};
                        this.onmouseout = function (){this.src="images/"+od+".jpg";};
                }
    
            }
        }
    </script>
    
    </head>
    <<div class="container">
    <div class="left_bar"></div>
    
    <div class="content_body"> 
    <div class="header"><img src="mafia/images/logo.png"></div>
    
    <div>
    <ul class="ul_nav">
    
    
    <li><a href="#"><img src="mafia/images/home_over.jpg" border="0" onclick="changeleft(this.id)" onmouseover="this.src='mafia/images/home_over.jpg'" onmouseout="this.src='mafia/images/home_over.jpg'"></a></li>
    
    <li><a href="#"><img src="mafia/images/about.jpg" border="0" onclick="changeleft(this.id)" onmouseover="this.src='mafia/images/about_over.jpg'" onmouseout="this.src='mafia/images/about.jpg'"></a></li>
    
    </ul>
    </div>
    
    		<div class="box_container">
    
    
    <br clear="all">
    <p>	
    					<font color="yellow"><a href='profiles.php?id=<? echo $user_class->id; ?>'><? echo $user_class->formattedname; ?></a></font>	                                        <br />
    					<?php 
    $s = mysql_query("SELECT `class` FROM `grpgusers` WHERE `id` = ".$user_class->id);
    echo  "<font color='yellow'>".mysql_result($s, 0, 0).   "<br>";
    ?>
                                            <font color="yellow"><!_-money-_!></font><br>	
                                            <font color="yellow"><!_-credits-_!></font>	<br>
                                            <font color="yellow"><!_-points-_!></font><br>
    					
    				
    </p>
    
    <div>
    <a class="left_menuR" href="#">YOUR ACCOUNT</a><br>
    <br>
    <a class="left_menu" href="#">MAILBOX</a><br><br>
    <a class="left_menu" href="#">EVENTS</a><br><br>
    <a class="left_menu" href="#">YOUR SETTINGS</a><br><br>
    <a class="left_menuR" href="#">AREAS</a><br><br>
    <a class="left_menu" href="#">CITY</a><br><br>
    <a class="left_menu" href="#">CRIMES</a><br><br>
    <a class="left_menu" href="#">GYM</a><br><br>
    
    
    <center>
    
    </body>
    </html>
    
    
    <?
    
    $whichad=rand(1,1200/60);
    
    $result2 = mysql_query("SELECT * from `smartads` ORDER BY RAND() LIMIT 0,1");
    while($line = mysql_fetch_array($result2, MYSQL_ASSOC)) {
    
    
    	$ad_class = new User($line['userid']);
    
    	$out .= " 	<td><font color='red'><b>Ad:</b></font> ". $line['ad'] ." - ". $ad_class->formattedname ."</td></tr>";
    
    
    
    }
    echo $out;
    ?>
    
    							<?php
    
    		$result252 = mysql_query("SELECT * FROM `ganginvites` WHERE `username` = '$user_class->username'");
    		//$invites_exist = mysql_num_rows($result252);
    
    
    
    
    		if (mysql_num_rows($result252) > 0){
    			$invite_class = New Gang($line['gangid']);
                     echo "<center><a href='ganginvites.php'>View Unit Invites</a></center>";
    		
    		}
    
    			 	if ($user_class->jail > 0){
    			echo "<marquee scrolldelay=120>You are currenty in jail for " . floor($user_class->jail)/60 . " more minutes.</marquee>";
    
    
    		}
                    
    		if ($user_class->hospital > 0){
    			echo "<marquee scrolldelay=180><font color=red><img src='image/hossy.gif' width='40' height='30' style='border: 1px solid #333333'>You are in the ward for " . floor($user_class->hospital)/60 . " more minutes.</font></marquee>";
    
    		}            
                    
    $resultm = mysql_query("SELECT * FROM `effect4` WHERE `userid` = '".$user_class->id."'");
    $etime = $worked2m['timeleft'];
    
    if ($worked2m > 0){
    echo "<center><font color=red>You have Coke effect on you for " . floor($etime) . " more minutes.<img src='image/cocaine.png' width='30' height='20' style='border: 1px solid #333333'></font></center>";
    }
    $result = mysql_query("SELECT * FROM `effects` WHERE `userid` = '".$user_class->id."'");
    $worked2 = mysql_fetch_array($result);
    $etime = $worked2['timeleft'];
    
    if ($worked2 > 0){
    echo "<center>You have nodoze effect on you for " . floor($etime) . " more minutes.<img src='images/nodo-1.jpg' width='30' height='20' style='border: 1px solid #333333'></center>";
    }
    $resultbla = mysql_query("SELECT * FROM `effect3` WHERE `userid` = '".$user_class->id."'");
    $etime = $worked2212['timeleft'];
    
    if ($worked2212 > 0){
    echo "<center>You have LSD effect on you for " . floor($etime) . " more minutes.<img src='images/lsd1.jpg' width='30' height='20' style='border: 1px solid #333333'></center>";
    }
    $resultbl = mysql_query("SELECT * FROM `effect2` WHERE `userid` = '".$user_class->id."'");
    $etime = $worked221['timeleft'];
    if ($claimed = 0){
    echo "<center>You have METH effect on you for " . floor($etime) . " more minutes.<img src='/images/meth1.jpg' width='30' height='20' style='border: 1px solid #333333'></center>";
    }
    
    $resultbl14 = mysql_query("SELECT * FROM `effect5` WHERE `userid` = '".$user_class->id."'");
    
    $etime = $worked22165['timeleft'];
    if ($worked22165 > 0){
    echo "<center>You have awake boost effect on you for " . floor($etime) . " more minutes.</center>";
    }
    
                    if ($user_class->timeout > 0){
    			echo "<marquee scrolldelay=180><font color=red>You are on a boat for " . floor($user_class->timeout) . " more minutes.</marquee>";
    
    		}
    		if ($user_class->bguard > 0){
    			echo "<center>You have " . floor($user_class->bguard) . " minutes left of Witness Protection<a href='spendgold.php?spend=bguard'> <font color='red'>Remove</a></font></center>";
    
    
    
    }
                  
    			
                    if ($user_class->newnews == 1){
    			echo "<center><a href='news.php'>You have unread news</a></center>";
    
    
    		}
    		
    		
    		if ($user_class->claimed == 0){
    			echo "<center><a href='starter.php'><font color='red'>Claim Your Free Starter Pack NOW.</font></a></center>";
    
    
    		}
    		if ($user_class->banned == 1){
    			echo "<center>You Have Been Banned!</center>";
    die();
    }
    require_once('ajax_chat/chat_globals.php');
    ?>

  • #2
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    None Aligning file


    Code:
    <?php
    
    /* Character class mod v1.00
    
     * this file crime.php is
    
     * already part of grpg script
    
     * and has been modified and
    
     * secured for the above 
    
     * mentioned mod. 
    
     */
    
    include(__DIR__ . '/header.php');
    
    $error = ($user_class->jail > 0) ? "You can't do crimes if you are in jail." : null;
    
    $error = ($user_class->hospital > 0) ? "You can't do crimes if you are in the hospital." : null;
    
    if(isset($error))
    
    	error($error);
    
    $crime = isset($_GET['id']) && ctype_digit($_GET['id']) ? abs(intval($_GET['id'])) : null;
    
    if(!empty($crime)) {
    
    	$result = mysql_query("SELECT * FROM `crimes` WHERE `id` = " . $crime);
    
    	if(!mysql_num_rows($result))
    
    		error("That crime doesn't exist");
    
    	$worked = mysql_fetch_assoc($result);
    
    	$nerve  = $worked['nerve'];
    
    	$name   = $worked['name'];
    
    	$name   = $worked['name'];
    
    	$stext  = '[[We currently do not have a success message for this crime :( You can help us by submitting your idea for a message in the crime section of the forums!]]';
    
    	$ctext  = '[[We currently do not have a "You got caught" message for this crime :( You can help us by submitting your idea for a message in the crime section of the forums!]]';
    
    	$ftext  = '[[We currently do not have a failure message for this crime :( You can help us by submitting your idea for a message in the crime section of the forums!]]';
    
    	$stexta = explode("^", $worked['stext']);
    
    	$stext  = !empty($stexta[0]) ? $stexta[array_rand($stexta)] : $stext;
    
    	$ctexta = explode("^", $worked['ctext']);
    
    	$ctext  = !empty($ctexta[0]) ? $ctexta[array_rand($ctexta)] : $ctext;
    
    	$ftexta = explode("^", $worked['ftext']);
    
    	$ftext  = !empty($ftexta[0]) ? $ftexta[array_rand($ftexta)] : $ftext;
    
    	$chance = rand(1, (100 * $nerve - ($user_class->speed / 35)));
    
    	$money  = round(25 * $nerve) + 15 * ($nerve - 1);
    
    	$s      = mysql_query("SELECT `class` FROM `grpgusers` WHERE `id` = " . $user_class->id);
    
    	$r      = mysql_fetch_assoc($s);
    
    	if($r['class'] == "Thief")
    
    		$money = round(25 * $nerve) + 15 * ($nerve - 1) + 5;
    
    	$exp = $money;
    
    	if($user_class->nerve >= $nerve) {
    
    		if($chance <= 75) {
    
    			echo Message($stext . "<br><br><font color='green'>Success! You receive " . $exp . " exp and $" . $money . ".</font><br><a href='crime.php?id=" . $crime . "'>Retry</a> | <a href='crime.php'>Back</a>");
    
    			mysql_query("UPDATE `grpgusers` SET `exp` = `exp` + " . $exp . ", `crimesucceeded` = `crimesucceeded` + 1, `crimemoney` = `crimemoney` + ".$money.", `money` = `money` + " . $money . ", `nerve` = `nerve` - " . $nerve . " WHERE `id` = " . $_SESSION['id']);
    
    			$updatemission = mysql_query("UPDATE `usermissions` SET `howmany` = `howmany` + 1 WHERE `userid` = '".$user_class->id."'");
    
    		} else if($chance >= 150) {
    
    			echo Message($ctext . "<br><br><font color='red'>You were caught.</font> You were hauled off to jail for " . $crime * 10 . " minutes.");
    
    			$result      = mysql_query("UPDATE `grpgusers` SET `crimefailed` = `crimefailed` + 1, `jail` = " . ($crime * 600) . ", `nerve` = `nerve` - " . $nerve . " WHERE `id` = " . $_SESSION['id']);
    
    		} else {
    
    			echo Message($ftext . "<br><br><font color='red'>You failed.</font><br><a href='crime.php?id=" . $crime . "'>Retry</a> | <a href='crime.php'>Back</a>");
    
    			$result      = mysql_query("UPDATE `grpgusers` SET `crimefailed` = `crimefailed` + 1, `nerve` = `nerve` - " . $nerve . " WHERE `id` = " . $_SESSION['id']);
    
    		}
    
    	} else {
    
    		echo Message("You don't have enough nerve for that crime.");
    
    	}
    
    	include(__DIR__ . '/footer.php');
    
    	exit;
    
    }
    
    ?>
    
    <tr><td class="contenthead">Crime</td></tr>
    
    <tr><td class="contentcontent">
    
    	<table width='60%'>
    
    		<tr>
    
    			<td width='50%'><b>Name</b></td>
    
    			<td width='25%'><b>Nerve</b></td>
    
    			<td width='25%'><b>Action</b></td>
    
    		</tr><?php
    
    $result = mysql_query("SELECT * FROM `crimes` ORDER BY `nerve` ASC");
    
    while($line = mysql_fetch_assoc($result)) {
    
    	echo "<tr>
    
    		<td width='50%'>" . $line['name'] . "</td>
    
    		<td width='25%'>" . $line['nerve'] . "</td>
    
    		<td width='25%'>[<a href='crime.php?id=" . $line['id'] . "'>Do</a>]</td>
    
    	</tr>";
    
    }
    
    ?></table>
    
    </td></tr>
    
    <?php
    
    function error($msg) {
    
    	echo Message($msg);
    
    	include(__DIR__ . '/footer.php');
    
    	exit;
    
    }
    
    include(__DIR__ . '/footer.php');

    Ran out of characters


  •  

    Posting Permissions

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