Eroare PCP

Secţiune dedicată începatorilor.

Moderatori: Moderatori, Start Moderator

Handabala
New Member
Mesaje: 3
Membru din: Lun Iul 07, 2014 8:04 pm

Eroare PCP

Mesajde Handabala » Sâm Iul 19, 2014 12:33 am

Salut si bine v-am regasit !

Primesc aceasta eroare cand incerc sa pornesc un PCP

Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\ucp\panel\index.php on line 748

La linia 748 exista o : ?>

Uitati aici tot fisierul index.php , sper sa ma puteti ajutaaa !

Cod: Selectaţi tot

<?php
include('header.php');
if(isset($_POST['playerstats'])) {
$seenick = $_POST['playerstats'];?>
<meta http-equiv="refresh" content="0;URL='<? echo "$domainname"; ?>/pcp/index.php?player=<? echo "$seenick"; ?>'">
<?
}
if(isset($_GET['player'])) {
   $theplayer = $_GET['player'];
echo "<head>
<title>$theplayer - $webname</title>
</head>";
   $query = "SELECT * FROM Accounts WHERE Name = '$theplayer'";
   $result = mysql_query($query) or die(mysql_errno() . ": " . mysql_error() . "\n");
   $playerexists = mysql_num_rows($result);
if($playerexists == "0") {
?>
<meta http-equiv="refresh" content="0;URL='index.php?noexist'">
<?
}
else
{
   while ($row= mysql_fetch_array($result))
   {
      $userid = $row["Key"];
      $name = $row["Name"];
      $level = $row["Level"];
      $loggedin = $row["LoggedIn"];
      $emailx = $row["E-Mail"];
      $sadmin = $row["SAdmin"];
      $vip = $row["Vip"];
      $viptime = $row["VIPTime"];
      $rvip = $row["rVip"];
      $cash = $row["Cash"];
      $kills = $row["Kills"];
      $deaths = $row["Deaths"];
      $online = $row["Online"];
      $clan = $row["Clan"];
      $clanrank = $row["ClanRank"];
      $positive = $row["Positive"];
      $negative = $row["Negative"];
      $score = $row["Score"];
      $coins = $row["Coins"];
      $skin = $row["FavSkin"];
      $description3 = $row["Description3"];
      $description2 = $row["Description2"];
      $description1 = $row["Description1"];
      $radmin = $row["RAdmin"];
      $registerdate = $row["RegisterDate"];
      $laston = $row["LastOn"];
      $ratio = $row["ARatio"];
      $timesonserver = $row["TimesOnServer"];
   }
$qprop = "SELECT * FROM Props WHERE pOwner='$theplayer'";
$propres = mysql_query($qprop) or die("Failed");
   while ($row= mysql_fetch_array($propres))
   {
      $propname = $row["pName"];
   }
if(mysql_num_rows($propres) == 0) {
$propexist = "no";
}
else
{
$propexist = "yes";
}
            echo "
   <head>
      <meta http-equiv='Content-Type' content='text/html;charset=utf-8' />
      <title>PCP Home - $webname</title>
                  <script type='text/javascript'>
$(document).ready(function() {

    $('#searchbox').animate({
        marginTop: '-55px'
    }, 200);
    $('#open x').toggle(
        function(){
setTimeout(function() { document.getElementById('searchbox').style.visibility = 'visible'; }, 600);
            $('#searchbox').animate({
                marginTop: '0'
            }, 500);
        },
        function(){
      setTimeout(function() { document.getElementById('searchbox').style.visibility = 'hidden'; }, 100);
            $('#searchbox').animate({
                marginTop: '-55px'
            }, 500);
    });
    });
</script>
</head>
<body>
<div class='content well well-small'>
<div class='container-fluid'>
 <div class='row-fluid'>
 <div id='searchbox' style='visibility: hidden'>
<center>
<form action='index.php' method='post'>
<div class='control-group'>
  <div class='controls'>
    <div class='input-prepend'>
      <span class='add-on'><i class='icon-user'></i></span>
      <input class='span6' id='inputIcon' placeholder='Username' name='playerstats' type='text'>
    </div>
  </div>
</form>
</div>
</center>
</div>
               <center><p><font color='red'><b>$name [User ID: $userid].</b></font></center>
</div>
  <div class='row-fluid'>
    <div class='span7'>
      <div class='well news' style='width: 85%;'>
      
";

echo "<center>$theplayer's Statistics:</center><br>";?>
            <?php
            if ( $loggedin == 1 )
               echo "<b><font color='#FF9900'>Online</font>: <font color='green'>Yes</font><br>";
            else
               echo "<b><font color='#FF9900'>Online</font>: <font color='red'>No</font><br>";
               ?>
            <?php
            if ($level>'0')
               echo "<b><font color='#FF9900'>Admin</font>: <img src='$domainname/pcp/img//1.gif'><font color='#FF9900'> - Level</font>:<font color ='#33AA33'> $level</font></b><br>";
            else
               echo "<b><font color='#FF9900'>Admin</font>: <img src='$domainname/pcp/img/0.gif'><br>";
            ?>
            <?php
            if ( $sadmin == 1 )
               echo "<font color='#FF9900'><b>S.Admin</font>:</b> <img src='$domainname/pcp/img/1.gif'><br>";
            else
               echo "<font color='#FF9900'><b>S.Admin</font>:</b> <img src='$domainname/pcp/img/0.gif'><br>";
            ?>
            <?php
            $now = date('Y-m-d');
            $secsleft = $viptime - strtotime($now);
            $minsleft = $secsleft / 60 ;
            $hoursleft = $minsleft / 60;
            $daysleft = $hoursleft / 24;
            $return = explode(".", $daysleft);
            if ( $vip == "1" ) {
               echo "<font color='#FF9900'><b>VIP</font>:</b> <img src='$domainname/pcp/img/1.gif'> - <font color ='#33AA33'>Permanent</font><br>";
               }
            if ( $vip == "0" ) {
               echo "<font color='#FF9900'><b>VIP</font>:</b> <img src='$domainname/pcp/img/0.gif'><br>";
            }
            if ( $vip == "2" && $return[0]>0) {
               echo "<font color='#FF9900'><b>VIP</font>:</b> <img src='$domainname/pcp/img/1.gif'> - <font color ='#FF9900'>Temporar - $return[0] zile ramase</font><br>";
               }
            if ( $vip == "2" && $return[0]<0) {
            echo "<font color='#FF9900'><b>VIP</font>:</b> <img src='$domainname/pcp/img/0.gif'><br>";
            }
            ?>
            <?php
            $qcar = "SELECT * FROM PersonalVehicles WHERE Owner ='$userplayer'";
            $qresult = mysql_query($qcar) or die("Failed");
            if(mysql_num_rows($qresult) == 0) {
               echo "<font color='#FF9900'><b>Personal Vehicle:</b></font> <img src='$domainname/pcp/img/0.gif'><br>";
               }
            if(mysql_num_rows($qresult) == 1) {
               echo "<font color='#FF9900'><b>Personal Vehicle:</b></font> <img src='$domainname/pcp/img/1.gif'><br>";
               }
            ?>
            <?php echo "<font color='#FF9900'><b>Kills</font>: $kills</b><br><font color='#FF9900'><b>Deaths</font>: $deaths</b><br>";?>
            <?php echo "<font color='#FF9900'><b>Online Time</font>: $online</b><br>";?>
            <?php     if ($clan == None) {
               echo "<font color='#FF9900'><b>Clan</font>: None</b><br>";
            }
            else
            {
               echo "<font color='#FF9900'><b>Clan</font>: $clan <font color='#FF9900'>- Rank</font>: $clanrank</b><br>";
            }
            if($propexist == "yes")
               echo "<font color='#FF9900'><b>Owns the property</font>: $propname</b><br>";
            else
               echo "<font color='#FF0000'><b>This player does not own any property</b></font><br>";

            ?>
            <?php echo "<font color='#FF9900'><b>Respect</font>: <font color='#33AA33'>$positive (+)</font> /</b> <font color='#FF0000'><b>$negative (-)</b></font> <br>
<font color='#FF9900'><b>Cash</font>: $cash <font color = '#33AA33'>$</font></b><br><font color='#FF9900'><b>Coins</font>: $coins </b><br><font color='#FF9900'><b>Score</font>: $score</b><br><br><br>";
if($description1 == "" && $description2 == "" && $description3 == "") {
               echo "No description was set ";
               }
            else
            {
               echo "<b><font color = '#FF0000'>Description</font>:</b><br>";
               echo "<b><font color = '#33AA33'>1)</font> $description1</br><font color = '#33AA33'>2)</font> $description2</br><font color = '#33AA33'>3)</font> $description3</br>";
            } ?>
            <? echo "</div>
</div>
   <div class='span5'>
      <div class='well news' style='width: 95%;'>
<div align='right' id='left' style='width: 70px;'>
<img src='$domainname/pcp/skins/Skin_$skin.png'>
</div>
<div id='right' style='width: 300px;'>";
            if ($loggedin == 1)
               echo "<b><font color='#FF9900'>Online</font>: <font color='green'>Yes</font><br>";
            else
               echo "<b><font color='#FF9900'>Online</font>: <font color='red'>No</font><br>";
echo "
Registered on: $registerdate<br>
Last time you logged in on $laston<br>
You logged in $timesonserver times<br>
</div>
      </div>
    </div>
   </div>
</div>
</div>
</body>
            </html>";
}
}
else
{
//ASDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDd
if(isset($_POST['d1']) && isset($_POST['d2']) && isset($_POST['d3']))
{
$d1 = mysql_real_escape_string($_POST['d1']);
$d2 = mysql_real_escape_string($_POST['d2']);
$d3 = mysql_real_escape_string($_POST['d3']);
$query = "UPDATE Accounts SET Description1='$d1', Description2='$d2', Description3='$d3' WHERE Name='$userplayer' "; // EDIT HERE and specify your table and field names for the SQL query
$result = mysql_query($query) or die(mysql_errno() . ": " . mysql_error() . "\n");
}
      $ipaddress = $_SERVER["REMOTE_ADDR"];
   $queryip = "UPDATE `Accounts` SET `IP`='$ipaddress' WHERE Name LIKE '$userplayer' ";
   $queryban = "UPDATE `Banlist` SET `IP`='$ipaddress' WHERE Name LIKE '$userplayer' ";
   $cookie2 = $_COOKIE['password'];
   $qban = "SELECT * FROM Banlist WHERE Name='$userplayer' AND Aproove != 1";
$resultx = mysql_query($qban) or die(mysql_errno() . ": " . mysql_error() . "\n");
   while ($row= mysql_fetch_array($resultx))
   {
      $banned = $row["Name"];
      $bandate = $row["BanDate"];
      $admin = $row["Admin"];
      $reason = $row["Reason"];
      $bantime = $row["BanTime"];
      $banexpire = $row["BanDays"];
      $bannedip = $row["IP"];
      $status = $row["Aproove"];
      }
if(mysql_num_rows($resultx)>"0" && $status != "1") {
$dleft = $banexpire;
$today = time();
$secsleft = $dleft - $today;
$minsleft = $secsleft/60;
$hoursleft = $minsleft/60;
$daysleft = $hoursleft/24;
         echo "
<html>
<head>
<title>You were banned</title>
    <meta http-equiv='content-type' content='text/html; charset=utf-8' />
   <script type='text/javascript' src='js/jquery-latest.js'></script>
    <script type='text/javascript' src='js/bootstrap.js'></script>
   <script type='text/javascript' src='js/bootstrap.min.js'></script>
   <script type='text/javascript' src='js/bootstrap-affix.js'></script>
   <script type='text/javascript' src='js/bootstrap-alert.js'></script>
   <script type='text/javascript' src='js/bootstrap-button.js'></script>
   <script type='text/javascript' src='js/bootstrap-carousel.js'></script>
   <script type='text/javascript' src='js/bootstrap-collapse.js'></script>
   <script type='text/javascript' src='js/bootstrap-dropdown.js'></script>
   <script type='text/javascript' src='js/modal-responsive-fix.js'></script>
   <script type='text/javascript' src='js/modal-responsive-fix.min.js'></script>
   <script type='text/javascript' src='js/touchscroll.js'></script>
   <script type='text/javascript' src='js/bootstrap-popover.js'></script>
   <script type='text/javascript' src='js/bootstrap-scrollspy.js'></script>
   <script type='text/javascript' src='js/bootstrap-tab.js'></script>
   <script type='text/javascript' src='js/bootstrap-tooltip.js'></script>
   <script type='text/javascript' src='js/bootstrap-transition.js'></script>
   <script type='text/javascript' src='js/bootstrap-typeahead.js'></script>
<link type='text/css' href='css/bootstrap-responsive.css' rel='stylesheet' />
<link type='text/css' href='css/bootstrap-responsive.min.css' rel='stylesheet' />
<link type='text/css' href='css/bootstrap.css' rel='stylesheet' />
<link type='text/css' href='css/bootstrap.min.css' rel='stylesheet' />
  <style type='text/css'>
    /* set the height so $(window).height() is accurate
    html, body {
      height: 100%;
    }
 
    /* prevent scrolling while during modal */
    body.modal-open {
      overflow: hidden;
    }
 
    /* optional: override bootstrap image gallery */
    .modal-gallery {
      margin-top: 0 !important;
    }
    @media (max-width: 767px) {
      .modal-gallery {
        margin-left: 0 !important;
      }
      .modal-fullscreen {
        left: 0 !important;
        right: 0 !important;
      }
    }
  </style>
<script type='text/javascript'>

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-32699801-1']);
  _gaq.push(['_setDomainName', '$domainname']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>
<body>
<div id='wrapper'>
<center>
<a href='$domainname'><img src='images/logo.png'></a>
</center>
<br>
   <div class='navbar'>
      <div class='navbar-inner'>
         <ul class='nav'>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
<li><a href='index.php'>            <i class='icon-remove-circle'></i> You were banned / Ban Info</a></li>
         </ul>
      </div>
   </div>
<div class='content well well-small'>
<div class='container-fluid'>
  <div class='row-fluid'>
<font size='3'><b>We are sorry, <font color ='red'>$userplayer</font> but you are banned from using this <font color ='red'>server</font> and <font color ='red'>Player Control Panel</font>.<br><br>Ban Info:<br>You were banned on username: <font color = '#33AA33'>$userplayer</font><br>Ban Date: <font color = '#33AA33'>$bandate</font><br>Ban Time: <font color = '#33AA33'>$bantime</font>.<br>Banned by: <font color ='#FF9900'>$admin</font><br>Reason: <font color = '#33AA33'>$reason</font>.<br>You were banned on IP: <font color = '#33AA33'>$bannedip</font>.<br>Ban will expire in: <font color = '#33AA33'>$daysleft</font> days.<br><br>You can add an un-ban request <strong><a href='$domainname/pcp/public.php#requests'>here</a></strong>
</b></font></center>
</div>
</div>
</div>
</html>
";
      }
      else
      {
$emailq = "SELECT * FROM Accounts WHERE Name='$userplayer'";
$emailr = mysql_query($emailq);
   while ($row= mysql_fetch_array($emailr))
   {
   $emailx = $row["E-Mail"];
   }

         if ($emailx == "") {
            if(isset($_POST['email'])) {
            $email = $_POST['email'];
               // Build SQL Query
               $query = "UPDATE Accounts SET `E-Mail`='$email' WHERE Name='$userplayer' "; // EDIT HERE and specify your table and field names for the SQL query
               $result = mysql_query($query) or die(mysql_errno() . ": " . mysql_error() . "\n");;
               echo "<html>
   <head>
      <meta http-equiv='Content-Type' content='text/html;charset=utf-8' />
      <title>[PCP] E-Mail - $webname</title>
<meta name='author' content='George Lazu'>
   <script type='text/javascript' src='js/jquery-latest.js'></script>
    <script type='text/javascript' src='js/bootstrap.js'></script>
   <script type='text/javascript' src='js/bootstrap.min.js'></script>
   <script type='text/javascript' src='js/bootstrap-affix.js'></script>
   <script type='text/javascript' src='js/bootstrap-alert.js'></script>
   <script type='text/javascript' src='js/bootstrap-button.js'></script>
   <script type='text/javascript' src='js/bootstrap-carousel.js'></script>
   <script type='text/javascript' src='js/bootstrap-collapse.js'></script>
   <script type='text/javascript' src='js/bootstrap-dropdown.js'></script>
   <script type='text/javascript' src='js/modal-responsive-fix.js'></script>
   <script type='text/javascript' src='js/modal-responsive-fix.min.js'></script>
   <script type='text/javascript' src='js/touchscroll.js'></script>
   <script type='text/javascript' src='js/bootstrap-popover.js'></script>
   <script type='text/javascript' src='js/bootstrap-scrollspy.js'></script>
   <script type='text/javascript' src='js/bootstrap-tab.js'></script>
   <script type='text/javascript' src='js/bootstrap-tooltip.js'></script>
   <script type='text/javascript' src='js/bootstrap-transition.js'></script>
   <script type='text/javascript' src='js/bootstrap-typeahead.js'></script>
<link type='text/css' href='css/bootstrap-responsive.css' rel='stylesheet' />
<link type='text/css' href='css/bootstrap-responsive.min.css' rel='stylesheet' />
<link type='text/css' href='css/bootstrap.css' rel='stylesheet' />
<link type='text/css' href='css/bootstrap.min.css' rel='stylesheet' />
<title>[PCP] E-Mail - $webname</title>
  <style type='text/css'>
    /* set the height so $(window).height() is accurate
    html, body {
      height: 100%;
    }
 
    /* prevent scrolling while during modal */
    body.modal-open {
      overflow: hidden;
    }
 
    /* optional: override bootstrap image gallery */
    .modal-gallery {
      margin-top: 0 !important;
    }
    @media (max-width: 767px) {
      .modal-gallery {
        margin-left: 0 !important;
      }
      .modal-fullscreen {
        left: 0 !important;
        right: 0 !important;
      }
    }
  </style>
<script type='text/javascript'>

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-32699801-1']);
  _gaq.push(['_setDomainName', '$domainname']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<body>
<div id='wrapper'>
<center>
<a href='$domainname'><img src='images/logo.png'></a>
</center>
<br>
   <div class='navbar'>
      <div class='navbar-inner'>
         <ul class='nav'>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
<li><a href='login.php'>            <i class='icon-arrow-right'></i> E-Mail</a></li>
         </ul>
      </div>
   </div>
<div class='content well well-small'>
<div class='container-fluid'>
<div class='row-fluid'>
<meta HTTP-EQUIV='REFRESH' content='3; url=$domainname/pcp/login.php'>
<div class='alert alert-success'>
  <button type='button' class='close' data-dismiss='alert'>&times;</button>
  <h4>You have successfully changed your email address!</h4>
</div>
</div>
</div>
</div>
</body>
</html>";
            }
            else
            {
               echo "<html>
   <head>
      <meta http-equiv='Content-Type' content='text/html;charset=utf-8' />
      <title>[PCP]E-Mail - $webname</title>
    <meta http-equiv='content-type' content='text/html; charset=utf-8' />
<meta name='author' content='George Lazu'>
  <style type='text/css'>
#right {
float:right;
width: 85px;
}
  </style>
  <link type='text/css' href='$domainname/pcp/css/bootstrap-responsive.css' rel='stylesheet' />
<link type='text/css' href='$domainname/pcp/css/bootstrap-responsive.min.css' rel='stylesheet' />
<link type='text/css' href='$domainname/pcp/css/bootstrap.css' rel='stylesheet' />
<link type='text/css' href='$domainname/pcp/css/bootstrap.min.css' rel='stylesheet' />
<script type='text/javascript'>

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-32699801-1']);
  _gaq.push(['_setDomainName', '$domainname']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>
<body>
<div id='wrapper'>
<center>
<a href='$domainname'><img src='images/logo.png'></a>
</center>
<br>
   <div class='navbar'>
      <div class='navbar-inner'>
         <ul class='nav'>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
         <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
<li><a href='index.php'>            <i class='icon-arrow-right'></i> E-Mail</a></li>
         </ul>
      </div>
   </div>
<body>
<div class='content well well-small'>
<div class='container-fluid'>
<div class='row-fluid'>
<h4><b>We are sorry, $userplayer, but for security reasons, you will have to provide us your <u>REAL</u> E-Mail address. Your E-Mail address's format has to be \"user@domain.com\". It's vital for your account to provide us your E-Mail in case of <u><i>ACCOUNT HACKING</i></u><br />
            <form action='index.php' method='POST'>
<center>
<div class='well news' style='width: 200px;'>
    <legend>E-Mail</legend>
    <input type='text' name='email' placeholder='Your e-mail'>
    <button type='submit' class='btn'>Submit</button>
</div>
</center>
</div>
</div>
</div>
</body>
</html>";
            }
         }
         else
         {
            echo "
   <head>
      <meta http-equiv='Content-Type' content='text/html;charset=utf-8' />
      <title>[PCP]Home - $webname</title>
                  <script type='text/javascript'>
$(document).ready(function() {

    $('#searchbox').animate({
        marginTop: '-55px'
    }, 200);
    $('#open x').toggle(
        function(){
setTimeout(function() { document.getElementById('searchbox').style.visibility = 'visible'; }, 600);
            $('#searchbox').animate({
                marginTop: '0'
            }, 500);
        },
        function(){
      setTimeout(function() { document.getElementById('searchbox').style.visibility = 'hidden'; }, 100);
            $('#searchbox').animate({
                marginTop: '-55px'
            }, 500);
    });
    });
</script>
</head>
<body>
<div class='content well well-small'>
<div class='container-fluid'>
 <div class='row-fluid'>
 <div id='searchbox' style='visibility: hidden'>
<center>
<form action='index.php' method='post'>
<div class='control-group'>
  <div class='controls'>
    <div class='input-prepend'>
      <span class='add-on'><i class='icon-user'></i></span>
      <input class='span6' id='inputIcon' placeholder='Username' name='playerstats' type='text' />
    </div>
  </div>
</form>
</div>
</center>
</div>
</div>";
if(isset($_GET['noexist'])) {
echo "<div class='alert alert-error'>
That user does not exist
</div>";
}
echo "               <center><p>Hello, <font color='red'><b>$name</font></b> [<font color='lightblue'><b>$userid</b></font>]. <br><br>On $webname</b> the Player Control Panel (PCP) is a tool that will help you maintain your account under surveillance and customize it as well.</p></center>
  <div class='row-fluid'>
    <div class='span7'>
      <div class='well news' style='width: 85%;'>
";
echo "
               <center>Your Statistics:</center><br>";?>
            <?php
            if ( $level > 0 )
               echo "<b><font color='#FF9900'>Admin</font>: <img src='$domainname/pcp/img/1.gif'><font color='#FF9900'> - Level</font>:<font color ='#33AA33'> $level</font></b><br>";
            else
               echo "<b><font color='#FF9900'>Admin</font>: <img src='$domainname/pcp/img/0.gif'><br>";
            ?>
            <?php
            if ( $sadmin == 1 )
               echo "<font color='#FF9900'><b>S.Admin</font>:</b> <img src='$domainname/pcp/img/1.gif'><br>";
            else
               echo "<font color='#FF9900'><b>S.Admin</font>:</b> <img src='$domainname/pcp/img/0.gif'><br>";
            ?>
            <?php
            $now = date('Y-m-d');
            $secsleft = $viptime - strtotime($now);
            $minsleft = $secsleft / 60 ;
            $hoursleft = $minsleft / 60;
            $daysleft = $hoursleft / 24;
            $return = explode(".", $daysleft);
            if ( $vip == "1" ) {
               echo "<font color='#FF9900'><b>VIP</font>:</b> <img src='$domainname/pcp/img/1.gif'> - <font color ='#33AA33'>Permanent</font><br>";
               }
            if ( $vip == "0" ) {
               echo "<font color='#FF9900'><b>VIP</font>:</b> <img src='$domainname/pcp/img/0.gif'><br>";
            }
            if ( $vip == "2" && $return[0]>0) {
               echo "<font color='#FF9900'><b>VIP</font>:</b> <img src='$domainname/pcp/img/1.gif'> - <font color ='#FF9900'>Temporar - $return[0] zile ramase</font><br>";
               }
            if ( $vip == "2" && $return[0]<0) {
            echo "<font color='#FF9900'><b>VIP</font>:</b> <img src='$domainname/pcp/img/0.gif'><br>";
            }
            ?>
            <?php
            $qcar = "SELECT * FROM PersonalVehicles WHERE Owner ='$userplayer'";
            $qresult = mysql_query($qcar) or die("Failed");
            while($row = mysql_fetch_array($qresult)) {
            $vehname = $row["Vehicle"];
            }
            if(mysql_num_rows($qresult) == 0) {
               echo "<font color='#FF9900'><b>Personal Vehicle:</b></font> <img src='$domainname/pcp/img/0.gif'><br>";
               }
            if(mysql_num_rows($qresult) == 1) {
               echo "<font color='#FF9900'><b>Personal Vehicle:</b></font> <img src='$domainname/pcp/img/1.gif'> - <font color='green'>You own a $vehname</font><br>";
               }
            ?>
            <?php echo "<font color='#FF9900'><b>Kills</font>: $kills</b><br><font color='#FF9900'><b>Deaths</font>: $deaths</b><br>";?>
            <?php echo "<font color='#FF9900'><b>Online Time</font>: $online</b><br>";?>
            <?php    
            if ($clan == None)
               echo "<font color='#FF9900'><b>Clan</font>: None</b><br>";
            else
               echo "<font color='#FF9900'><b>Clan</font>: $clan <font color='#FF9900'>- Rank</font>: $clanrank</b><br>";
            if($propexist == "yes")
               echo "<font color='#FF9900'><b>Owns the property</font>: $propname</b><br>";
            else
               echo "<font color='#FF0000'><b>You do not own any property.</font></b><br>";

            ?>
            <? mysql_query($queryip) or die(mysql_errno() . ": " . mysql_error() . "\n");;
            mysql_query($queryban) or die(mysql_errno() . ": " . mysql_error() . "\n");;?>
            <?php echo "<font color='#FF9900'><b>Respect</font>: <font color='#33AA33'>$positive (+)</font> /</b> <font color='#FF0000'><b>$negative (-)</b></font> <br>
<font color='#FF9900'><b>Cash</font>: $cash <font color = '#33AA33'>$</font></b><br><font color='#FF9900'><b>Coins</font>: $coins </b><br><font color='#FF9900'><b>Score</font>: $score</b><br><br><br>
<b><font color = '#FF0000'>Description</font>:</b>             <a href='#normal-modal' data-toggle='modal'><i class='icon-pencil'></i></a>
 
    <!-- Normal Modal -->
    <div class='modal hide fade' id='normal-modal'>
      <div class='modal-header'>
       <button type='button' class='close' data-dismiss='modal'>&times;</button>
        <h3 class='modal-title'>Set your description</h3>
      </div>
      <div class='modal-body'>
            <form action='index.php?description' method='POST'>
               <p><font size='2'>Description line 1: </font>";
$q = "SELECT * FROM Accounts WHERE Name='$userplayer'";
$r = mysql_query($q);
  while ($row= mysql_fetch_array($r)) {
  $d1 = $row["Description1"];
  $d2 = $row["Description2"];
  $d3 = $row["Description3"];
  }
?><input type='text' name='d1'  class='large' value="<? echo "$d1";?>" size="24" onFocus="this.value='<? echo "$d1";?>'"/></p>
               <p><font size='2'>Description line 2: </font><input type='text' name='d2'  class='large' value="<? echo "$d2";?>" size="24" onFocus="this.value='<? echo "$d2";?>'"/></p>
               <p><font size='2'>Description line 3: </font><input type='text' name='d3'  class='large' value="<? echo "$d3";?>" size="24" onFocus="this.value='<? echo "$d3";?>'"/></p>
      </div>
      <div class='modal-footer'>
        <button data-dismiss='modal' class='btn btn-inverse'>Close</button>
      <input type='submit' value='Set' class='btn' />
      </form>
      </div>
    </div>
<?
echo "<br>";
if($description1 == "" && $description2 == "" && $description3 == "") {
               echo "No description was set ";
               }
            else
            {
if(isset($_GET['description']))
{ echo "
<div class='alert alert-success'>
  <button type='button' class='close' data-dismiss='alert'>&times;</button>
You successfully changed your description.
</div>

";
}
               echo "<b><font color '#33AA33'>1)</font> $description1</br><font color '#33AA33'>2)</font> $description2</br><font color '#33AA33'>3)</font> $description3</br>";
            } ?>
            <? echo "</div>
</div>
   <div class='span5'>
      <div class='well news' style='width: 95%;'>
<div align='right' id='left' style='width: 70px;'>
<img src='$domainname/pcp/skins/Skin_$skin.png'>
</div>
<div id='right' style='width: 300px;'>";
            if ($loggedin == 1)
               echo "<b><font color='#FF9900'>Online</font>: <font color='green'>Yes</font><br>";
            else
               echo "<b><font color='#FF9900'>Online</font>: <font color='red'>No</font><br>";
echo "
Registered on: $registerdate<br>
Last time you logged in on $laston<br>
You logged in $timesonserver times<br>
</div>
      </div>
    </div>
   </div>
</div>
</div>

            </html>";
         }
      }
      }
   if(!isset($_COOKIE['sessionID'])) {
header("Location: login.php");
   }
   include("footer.php");
?>



MarPlo
Senior Member
Mesaje: 885
Membru din: Mie Sep 24, 2008 9:32 am
Localitate: Braila
Contact:

Re: Eroare PCP

Mesajde MarPlo » Sâm Iul 19, 2014 4:06 pm

Salut
Incearca sa inlocuiesti inceputul de cod php "<?" cu "<?php" .

Avatar utilizator
artur99
Average Member
Mesaje: 55
Membru din: Joi Ian 10, 2013 9:00 pm
Contact:

Re: Eroare PCP

Mesajde artur99 » Dum Aug 17, 2014 9:48 pm

Probabil ai pierdut niste paranteze... Totusi nu inteleg de ce nu faci

Cod: Selectaţi tot

if(isset($_POST['playerstats'])) {
$seenick = $_POST['playerstats'];
echo "<meta http-equiv=\"refresh\" content=\"0;URL='$domainname/pcp/index.php?player=$seenick'\">";
}

in loc de

Cod: Selectaţi tot

if(isset($_POST['playerstats'])) {
$seenick = $_POST['playerstats'];?>
<meta http-equiv="refresh" content="0;URL='<? echo "$domainname"; ?>/pcp/index.php?player=<? echo "$seenick"; ?>'">
<?php
}

?
Ar fi mult mai usor...
Daca nu stii inca:
Poti sa adaugi un \ inainte de ghilimea pentru a fi ignorata si a nu incheia stringul.


Adica, in loc de

Cod: Selectaţi tot

<span id="test">What'ss up, <?php echo $username ?>?</span>

poti pune

Cod: Selectaţi tot

<?php echo "<span id=\"test\">What's up, $username?</span>"; ?>

Si nu va da eroare


Înapoi la “PHP Incepători”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 40 vizitatori