Jump to content

[MySql/PHP/Html/CSS] User Control Panel - Chroma


AraZel
 Share

Recommended Posts

  • 2 weeks later...

Cum pot rezolva asta 

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/u799587976/public_html/rpg/includes/connection.php on line 2

Warning: mysql_connect(): Access denied for user 'kadilac1996'@'31.170.164.32' (using password: YES) in /home/u799587976/public_html/rpg/includes/connection.php on line 2
Nu se poate efectua conexiunea MYSQL.

Link to comment
Share on other sites

Cum pot rezolva asta 

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/u799587976/public_html/rpg/includes/connection.php on line 2

 

Warning: mysql_connect(): Access denied for user 'kadilac1996'@'31.170.164.32' (using password: YES) in /home/u799587976/public_html/rpg/includes/connection.php on line 2

Nu se poate efectua conexiunea MYSQL.

Chesti asta o bagi in includes http://www.girlshare.ro/34678941 ( DB_MySQL.php)

 Apoi, connection.php-ul tau o sa trebuiasca sa arate cam asa.

 

 

<?php

error_reporting(E_ALL & ~E_NOTICE);
define("PATH", dirname(dirname(__FILE__)));
require_once(PATH. "/includes/DB_MySQL.php");
## Baza de date
$hostbaza = "localhost";
$userbaza = "root";
$parolabaza = "";
$numebaza = "jksbkbfk";
## Baza de date
 
 
 
$db = new DB_MySQL();
$db->connect($hostbaza,$userbaza,$parolabaza,$numebaza);

?>

 

 

Acum inlocuiesti cu astea.

 
- $db->query("SQL QUERY"); Clasicu query
- $db->fetch($db->query("SQL Query")); Fetch_Array (stii si tu cum se mananca)
- $db->numRows($db->query("SQL Query")); Numara randurile
- $db->getLastId(); Preia ultimu ID inserat in DB
 
* Cam astea sunt baza.
 
---------------------------------------
De exemplu:
online.php sa zicem ca tu il ai scris asa
 
?php
 
include 'includes/config.php';
include 'includes/header.php';
 
 
$civil =mysql_query('SELECT COUNT(playerID) as total FROM playeraccounts WHERE playerStatus > 0 and playerGroup = 0');
$civil = mysql_fetch_array($civil);
 
?>
 
<div class="main-content">
<div class="page-content">
<div class="row-fluid">
 
<?php $query =mysql_query('Select * from playeraccounts where playerGroup="1" and playerStatus > 0 ORDER by playerGroupRank ASC'); ?>
<div class="row-fluid"><div class="span12">
<h4 class="groupcolor g1">Admin Faction (<?=$lspd['total']?> online)</h4>
<?php while($dnn = mysql_fetch_array($query)) { ?>
<div class="span2 center">
<a href="cont.php?id=<?php echo htmlentities($dnn['playerID']); ?>">
<img src="images/avatars/40/<?php echo htmlentities($dnn['playerSkin']);?>.png"><Br />
<?php echo htmlentities($dnn['playerName']); ?>
</a>
</div>
<?php } ?>
</div>
 
<?php $query =mysql_query('Select * from playeraccounts where playerGroup="2" and playerStatus > 0 ORDER by playerGroupRank ASC'); ?>
<div class="row-fluid"><div class="span12">
<h4 class="groupcolor g2">Helper Faction (<?=$fbi['total']?> online)</h4>
<?php while($dnn = mysql_fetch_array($query)) { ?>
<div class="span2 center">
<a href="cont.php?id=<?php echo htmlentities($dnn['playerID']); ?>">
<img src="images/avatars/40/<?php echo htmlentities($dnn['playerSkin']);?>.png"><Br />
<?php echo htmlentities($dnn['playerName']); ?>
</a>
</div>
<?php } ?>
</div>
 
<b <h4 class="groupcolor g15">Civilians online (<?=$civil['total']?> online)</h4></b>
 
 
 
<table class="table table-condensed">
<tbody>
<tr class="success">
<td style="width: 143px;">Name</td>
<td >Level</td>
<td>Hours played</td>
<td>Respect points</td>
</tr>
<?php $query =mysql_query('SELECT * from playeraccounts WHERE playerStatus > 0 and playerGroup = 0 order by playerID desc'); 
 while($dnn=mysql_fetch_array($query)) { ?>
<tr> 
<td><a href="cont.php?id=<?=$dnn['playerID']?>"><font color='#1a1a1a'><?=$dnn['playerName']?></a></font></td>
<td>
<?php echo htmlentities($dnn['playerLevel']); ?>
</td>
 
<td>
<?php echo htmlentities($dnn['playerHours']); ?>
</td>
 
</td>
<td><?php echo htmlentities($dnn['playerAge']); ?></td>
</tr>
<?php } ?>
 
</tbody></table> 
<!-- do not affect this divs, or your design will fuck up -->
</div>
 
</div>
</div>
<!-- do not affect this divs, or your design will fuck up -->
 
 
Asta trebuie modificat si scris asa dupa DB_MySQL.php
 
<?php
 
require_once('includes/config.php');
require_once('includes/header.php');
 
$civil = $db->query('SELECT COUNT(playerID) as total FROM playeraccounts WHERE playerStatus > 0 and playerGroup = 0');
$civil = $db->fetch($civil);
 
?>
 
<div class="main-content">
<div class="page-content">
<div class="row-fluid">
 
<?php $query = $db->query('Select * from playeraccounts where playerGroup="1" and playerStatus > 0 ORDER by playerGroupRank ASC'); ?>
<div class="row-fluid"><div class="span12">
<h4 class="groupcolor g1">Admin Faction (<?=$lspd['total']?> online)</h4>
<?php while($dnn = $db->fetch($query)) { ?>
<div class="span2 center">
<a href="cont.php?id=<?php echo htmlentities($dnn['playerID']); ?>">
<img src="images/avatars/40/<?php echo htmlentities($dnn['playerSkin']);?>.png"><Br />
<?php echo htmlentities($dnn['playerName']); ?>
</a>
</div>
<?php } ?>
</div>
 
<?php $query = $db->query('Select * from playeraccounts where playerGroup="2" and playerStatus > 0 ORDER by playerGroupRank ASC'); ?>
<div class="row-fluid"><div class="span12">
<h4 class="groupcolor g2">Helper Faction (<?=$fbi['total']?> online)</h4>
<?php while($dnn = $db->fetch($query)) { ?>
<div class="span2 center">
<a href="cont.php?id=<?php echo htmlentities($dnn['playerID']); ?>">
<img src="images/avatars/40/<?php echo htmlentities($dnn['playerSkin']);?>.png"><Br />
<?php echo htmlentities($dnn['playerName']); ?>
</a>
</div>
<?php } ?>
</div>
 
<b <h4 class="groupcolor g15">Civilians online (<?=$civil['total']?> online)</h4></b>
 
 
 
<table class="table table-condensed">
<tbody>
<tr class="success">
<td style="width: 143px;">Name</td>
<td >Level</td>
<td>Hours played</td>
<td>Respect points</td>
</tr>
<?php $query = $db->query('SELECT * from playeraccounts WHERE playerStatus > 0 and playerGroup = 0 order by playerID desc'); 
 while($dnn=$db->fetch($query)) { ?>
<tr> 
<td><a href="cont.php?id=<?=$dnn['playerID']?>"><font color='#1a1a1a'><?=$dnn['playerName']?></a></font></td>
<td>
<?php echo htmlentities($dnn['playerLevel']); ?>
</td>
 
<td>
<?php echo htmlentities($dnn['playerHours']); ?>
</td>
 
</td>
<td><?php echo htmlentities($dnn['playerAge']); ?></td>
</tr>
<?php } ?>
 
</tbody></table> 
<!-- do not affect this divs, or your design will fuck up -->
</div>
 
</div>
</div>
<!-- do not affect this divs, or your design will fuck up -->
---------------------------------------------------------------
 
Iti dai si tu seama ce sa schimbat ce nu. Le compari si vezi cum sta treaba, bafta.
Edited by .JustiN
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

dar asta Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'ccosmin1996'@'89.39.13.54' (using password: YES)' in /home/qsttime1/public_html/gtapanel/includes/connection.php:5 Stack trace: #0 /home/qsttime1/public_html/gtapanel/includes/connection.php(5): PDO->__construct('mysql:host=188....', 'ccosmin1996s', '89.39.13.192') #1 /home/qsttime1/public_html/gtapanel/includes/config.php(4): include('/home/qsttime1/...') #2 /home/qsttime1/public_html/gtapanel/index.php(2): include('/home/qsttime1/...') #3 {main} thrown in /home/qsttime1/public_html/gtapanel/includes/connection.php on line 5

Edited by Master18
Link to comment
Share on other sites

 

Chesti asta o bagi in includes http://www.girlshare.ro/34678941 ( DB_MySQL.php)

 Apoi, connection.php-ul tau o sa trebuiasca sa arate cam asa.

 

 

<?php

error_reporting(E_ALL & ~E_NOTICE);
define("PATH", dirname(dirname(__FILE__)));
require_once(PATH. "/includes/DB_MySQL.php");
## Baza de date
$hostbaza = "localhost";
$userbaza = "root";
$parolabaza = "";
$numebaza = "jksbkbfk";
## Baza de date
 
 
 
$db = new DB_MySQL();
$db->connect($hostbaza,$userbaza,$parolabaza,$numebaza);

?>

 

 

Acum inlocuiesti cu astea.

 
- $db->query("SQL QUERY"); Clasicu query
- $db->fetch($db->query("SQL Query")); Fetch_Array (stii si tu cum se mananca)
- $db->numRows($db->query("SQL Query")); Numara randurile
- $db->getLastId(); Preia ultimu ID inserat in DB
 
* Cam astea sunt baza.
 
---------------------------------------
De exemplu:
online.php sa zicem ca tu il ai scris asa
 
?php
 
include 'includes/config.php';
include 'includes/header.php';
 
 
$civil =mysql_query('SELECT COUNT(playerID) as total FROM playeraccounts WHERE playerStatus > 0 and playerGroup = 0');
$civil = mysql_fetch_array($civil);
 
?>
 
<div class="main-content">
<div class="page-content">
<div class="row-fluid">
 
<?php $query =mysql_query('Select * from playeraccounts where playerGroup="1" and playerStatus > 0 ORDER by playerGroupRank ASC'); ?>
<div class="row-fluid"><div class="span12">
<h4 class="groupcolor g1">Admin Faction (<?=$lspd['total']?> online)</h4>
<?php while($dnn = mysql_fetch_array($query)) { ?>
<div class="span2 center">
<a href="cont.php?id=<?php echo htmlentities($dnn['playerID']); ?>">
<img src="images/avatars/40/<?php echo htmlentities($dnn['playerSkin']);?>.png"><Br />
<?php echo htmlentities($dnn['playerName']); ?>
</a>
</div>
<?php } ?>
</div>
 
<?php $query =mysql_query('Select * from playeraccounts where playerGroup="2" and playerStatus > 0 ORDER by playerGroupRank ASC'); ?>
<div class="row-fluid"><div class="span12">
<h4 class="groupcolor g2">Helper Faction (<?=$fbi['total']?> online)</h4>
<?php while($dnn = mysql_fetch_array($query)) { ?>
<div class="span2 center">
<a href="cont.php?id=<?php echo htmlentities($dnn['playerID']); ?>">
<img src="images/avatars/40/<?php echo htmlentities($dnn['playerSkin']);?>.png"><Br />
<?php echo htmlentities($dnn['playerName']); ?>
</a>
</div>
<?php } ?>
</div>
 
<b <h4 class="groupcolor g15">Civilians online (<?=$civil['total']?> online)</h4></b>
 
 
 
<table class="table table-condensed">
<tbody>
<tr class="success">
<td style="width: 143px;">Name</td>
<td >Level</td>
<td>Hours played</td>
<td>Respect points</td>
</tr>
<?php $query =mysql_query('SELECT * from playeraccounts WHERE playerStatus > 0 and playerGroup = 0 order by playerID desc'); 
 while($dnn=mysql_fetch_array($query)) { ?>
<tr> 
<td><a href="cont.php?id=<?=$dnn['playerID']?>"><font color='#1a1a1a'><?=$dnn['playerName']?></a></font></td>
<td>
<?php echo htmlentities($dnn['playerLevel']); ?>
</td>
 
<td>
<?php echo htmlentities($dnn['playerHours']); ?>
</td>
 
</td>
<td><?php echo htmlentities($dnn['playerAge']); ?></td>
</tr>
<?php } ?>
 
</tbody></table> 
<!-- do not affect this divs, or your design will fuck up -->
</div>
 
</div>
</div>
<!-- do not affect this divs, or your design will fuck up -->
 
 
Asta trebuie modificat si scris asa dupa DB_MySQL.php
 
<?php
 
require_once('includes/config.php');
require_once('includes/header.php');
 
$civil = $db->query('SELECT COUNT(playerID) as total FROM playeraccounts WHERE playerStatus > 0 and playerGroup = 0');
$civil = $db->fetch($civil);
 
?>
 
<div class="main-content">
<div class="page-content">
<div class="row-fluid">
 
<?php $query = $db->query('Select * from playeraccounts where playerGroup="1" and playerStatus > 0 ORDER by playerGroupRank ASC'); ?>
<div class="row-fluid"><div class="span12">
<h4 class="groupcolor g1">Admin Faction (<?=$lspd['total']?> online)</h4>
<?php while($dnn = $db->fetch($query)) { ?>
<div class="span2 center">
<a href="cont.php?id=<?php echo htmlentities($dnn['playerID']); ?>">
<img src="images/avatars/40/<?php echo htmlentities($dnn['playerSkin']);?>.png"><Br />
<?php echo htmlentities($dnn['playerName']); ?>
</a>
</div>
<?php } ?>
</div>
 
<?php $query = $db->query('Select * from playeraccounts where playerGroup="2" and playerStatus > 0 ORDER by playerGroupRank ASC'); ?>
<div class="row-fluid"><div class="span12">
<h4 class="groupcolor g2">Helper Faction (<?=$fbi['total']?> online)</h4>
<?php while($dnn = $db->fetch($query)) { ?>
<div class="span2 center">
<a href="cont.php?id=<?php echo htmlentities($dnn['playerID']); ?>">
<img src="images/avatars/40/<?php echo htmlentities($dnn['playerSkin']);?>.png"><Br />
<?php echo htmlentities($dnn['playerName']); ?>
</a>
</div>
<?php } ?>
</div>
 
<b <h4 class="groupcolor g15">Civilians online (<?=$civil['total']?> online)</h4></b>
 
 
 
<table class="table table-condensed">
<tbody>
<tr class="success">
<td style="width: 143px;">Name</td>
<td >Level</td>
<td>Hours played</td>
<td>Respect points</td>
</tr>
<?php $query = $db->query('SELECT * from playeraccounts WHERE playerStatus > 0 and playerGroup = 0 order by playerID desc'); 
 while($dnn=$db->fetch($query)) { ?>
<tr> 
<td><a href="cont.php?id=<?=$dnn['playerID']?>"><font color='#1a1a1a'><?=$dnn['playerName']?></a></font></td>
<td>
<?php echo htmlentities($dnn['playerLevel']); ?>
</td>
 
<td>
<?php echo htmlentities($dnn['playerHours']); ?>
</td>
 
</td>
<td><?php echo htmlentities($dnn['playerAge']); ?></td>
</tr>
<?php } ?>
 
</tbody></table> 
<!-- do not affect this divs, or your design will fuck up -->
</div>
 
</div>
</div>
<!-- do not affect this divs, or your design will fuck up -->
---------------------------------------------------------------
 
Iti dai si tu seama ce sa schimbat ce nu. Le compari si vezi cum sta treaba, bafta.

 

dar asta Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'ccosmin1996'@'89.39.13.54' (using password: YES)' in /home/qsttime1/public_html/gtapanel/includes/connection.php:5 Stack trace: #0 /home/qsttime1/public_html/gtapanel/includes/connection.php(5): PDO->__construct('mysql:host=188....', 'ccosmin1996s', '89.39.13.192') #1 /home/qsttime1/public_html/gtapanel/includes/config.php(4): include('/home/qsttime1/...') #2 /home/qsttime1/public_html/gtapanel/index.php(2): include('/home/qsttime1/...') #3 {main} thrown in /home/qsttime1/public_html/gtapanel/includes/connection.php on line 5

Edited by Master18
Link to comment
Share on other sites

 

dar asta Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'ccosmin1996'@'89.39.13.54' (using password: YES)' in /home/qsttime1/public_html/gtapanel/includes/connection.php:5 Stack trace: #0 /home/qsttime1/public_html/gtapanel/includes/connection.php(5): PDO->__construct('mysql:host=188....', 'ccosmin1996s', '89.39.13.192') #1 /home/qsttime1/public_html/gtapanel/includes/config.php(4): include('/home/qsttime1/...') #2 /home/qsttime1/public_html/gtapanel/index.php(2): include('/home/qsttime1/...') #3 {main} thrown in /home/qsttime1/public_html/gtapanel/includes/connection.php on line 5

 

Scoate-l dupa serverul ftp si incearca-l pe PC cu programul wamp. Vezi ce eroare iti da.

Link to comment
Share on other sites

 

Scoate-l dupa serverul ftp si incearca-l pe PC cu programul wamp. Vezi ce eroare iti da.

 

dar cum fac ca la asta sa se vada normal http://[pune link direct, nu prin alte site-uri&#33;]/1HNsRw%5Bambagatredirecta casa nu fac reclama]

 

Vezi ca linkurile "[pune link direct, nu prin alte site-uri&#33;]" sunt interzise precum si orice tip de link ca acela. Poti primii warn pentru asa ceva.

Edited by Official JustiN.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. 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.