Quote:
Originally Posted by Starsky85
schade vieleicht find ich es ja irgendwo anders noch wo es nicht gelöscht ist ma sehen wenn ich was finde poste ich es hier =)
|
Wer suchet der findet:
Zum Einbau erstellt man im "panels"-Ordner einen Ordner namens commonPHP. In diesen Ordner fügt man die beiden Dateien ein. Dann im admin-Ordner eine neue *.php erstellen, ihr irgendeinen Namen geben und fügt das hier ein:
PHP Code:
<?php include('inc/header.php'); ?>
<h1>Inventar</h1>
<?php
$strSearchString = mssql_escape_string($_GET['search']);
$resCharacter = odbc_exec($odbc_connect, '
SELECT char.[m_szName],
char.[m_idPlayer],
char.[MultiServer],
char.[playerslot],
char.[account],
char.[m_nLevel],
char.[m_nJob],
char.[CreateTime],
char.[isblock],
bank.[m_BankPw]
FROM [' . $_CONFIG['db_databases']['chr'] . '].dbo.[CHARACTER_TBL] AS char
LEFT JOIN [' . $_CONFIG['db_databases']['chr'] . '].dbo.[BANK_TBL] AS bank ON bank.[m_idPlayer] = char.[m_idPlayer]
WHERE [m_szName] = \'' . $strSearchString . '\'
');
$strCharacterID = [MENTION=311501]ODB[/MENTION]c_result($resCharacter, 'm_idPlayer');
include('../commonPHP/search_inventory.php');
?>
<?php include('inc/footer.php'); ?>
Anschließend braucht man noch ein bisschen CSS:
HTML Code:
.inventory .title, .bag .title, .bank .title {
padding: 7px 0 0 12px;
font: 12px "Trebuchet MS";
text-shadow: 0 0 2px #df4e29, 0 0 2px #df4e29, 0 0 2px #df4e29, 0 0 2px #df4e29, 0 0 2px #df4e29, 0 0 2px #df4e29, 0 0 2px #df4e29, 0 0 2px #df4e29, 0 0 2px #df4e29;
color: #ffffff;
}
.inventory .item, .bag .item, .bank .item {
font-size: 12px;
color: hsl(240, 68%, 82%);
text-shadow: 1px 1px hsl(240, 100%, 50%);
float: left;
left: 17px;
width: 31px;
height: 31px;
margin: 1px 0 0 1px;
background-size: cover;
vertical-align: bottom;
text-align: right;
}
.inventory {
float: left;
background: url(http://cdn.elitepvpers.org/forum/images/inventory/WndInventory3D.png) repeat left center;
width: 240px;
height: 560px;
position: relative;
}
.inventory .equipment {
width: 240px;
height: 267px;
position: absolute;
top: 0;
}
.inventory .equipment .itemLeft {
position: absolute;
top: 33px;
left: 15px;
}
.inventory .equipment .itemLeft .item {
margin: 0 0 17px 0;
float: none;
}
.inventory .equipment .itemRight {
position: absolute;
top: 33px;
right: 20px;
}
.inventory .equipment .itemRight .item {
margin: 0 0 17px 0;
float: none;
}
.inventory .equipment .itemTop {
position: absolute;
top: 25px;
left: 56px;
}
.inventory .equipment .itemTop .item {
width: 22px;
height: 22px;
margin: 0 3.5px 0 0;
}
.inventory .equipment .itemBottom {
position: absolute;
bottom: 6px;
left: 57px;
}
.inventory .equipment .itemBottom .item {
width: 28px;
height: 28px;
margin: 0 3px 0 0;
}
.inventory .other {
width: 201px;
height: 225px;
padding: 4px 0 0 19px;
position: absolute;
bottom: 64px;
}
.inventory .other .item {
}
.inventory .penya {
color: #009ACD;
font-weight: bold;
width: 100px;
height: 17px;
padding: 1px 0 0 4px;
position: absolute;
bottom: 19px;
left: 105px;
}
.bag {
float: left;
background: url(http://cdn.elitepvpers.org/forum/images/inventory/WndInventoryBag3D.png) repeat left center;
width: 240px;
height: 504px;
margin: 0 10px;
position: relative;
}
.bag .itemTop {
width: 195px;
height: 34px;
padding: 5px 0 0 4px;
position: absolute;
top: 31px;
left: 15px;
}
.bag .itemTop .item, .bag .firstBag .item, .bag .secondBag .item {
}
.bag .firstBag {
width: 195px;
height: 129px;
padding: 4px 0 0 4px;
position: absolute;
top: 155px;
left: 15px;
}
.bag .secondBag {
width: 195px;
height: 129px;
padding: 4px 0 0 4px;
position: absolute;
top: 328px;
left: 15px;
}
.bank {
float: left;
background: url(http://cdn.elitepvpers.org/forum/images/inventory/WndBank3D.png) repeat left center;
width: 165px;
height: 426px;
position: relative;
}
.bank .items {
width: 132px;
height: 352px;
position: absolute;
top: 32px;
left: 17px;
}
.bank .penya {
color: #009ACD;
font-weight: bold;
width: 100px;
height: 17px;
padding: 1px 0 0 4px;
position: absolute;
bottom: 16px;
left: 43px;
}
#ItemDetailBox {
margin: 0 0 15px 0;
height: 138px;
overflow: hidden;
}
#ItemDetailBox table {
float: left;
width: 33%;
}
#ItemDetailBox table tr th {
width: 20%;
min-width: 90px;
padding: 5px 0 0 0;
vertical-align: top;
text-align: left;
}
#ItemDetailBox table tr td {
width: 80%;
}
Einfach eine inventory.css erstellen und diese in der inc/header.php einbinden.
Dann sollte es fertig sein. Diese Datei dann im Panel wie folgt aufrufen: [*DATEINAME*].php?search=BeliebigerCharaktername
Der Query kann noch für diesen Zweck verschlankt werden, habe es aber geraed erstmal 1:1 rauskopiert. Sollte so funktionieren, denke ich. Muss bei Zeiten mal 'wer testen. Und anschaulicher beschreiben kann man das hier auch noch.
Wie binde ich das ein?
>> Einfach eine inventory.css erstellen und diese in der inc/header.php einbinden.