Problem z wyszukiwark?

Basta4

Active User
Zarejestrowany
Dołączył
Grudzień 18, 2009
Posty
92
Liczba reakcji
2
ZA POMOC REPUT!!!!!!!!!!!!!!!!!

Witam! Postanowi?em przerobi? Acc Makera na takie jak by forum, lecz mam problem z wyszukiwark? szukam ju? od dw?ch dni tego skryptu, lecz nic tam nie ma dlatego postanowi?em "wpa??" tutaj, poniewa? jest tu du?o skrypter?w.
Przejd?my do rzeczy:
Chcia?bym, aby kto? przerobi? mi skrypt wyszukiwania postaci na skrypt wyszukiwania np film?w.
Je?li nie b?dziecie wiedzie? o co chodzi napiszcie do mnie na gg 9243610

<?php include ('top.inc.php');?>

<h2>Character Search:</h2>

<?php
$char = $_REQUEST['char'];
$char = trim($char);
$guild_file = $dirdata . "guilds.xml";
$g = fopen($guild_file, "r");
$guild_contents = fread($g, filesize($guild_file));
$guild_tags = explode("<", $guild_contents);
$found = 0;
foreach($guild_tags as $guild_tag) {
if (substr($guild_tag, 0, 5) == "guild" && $found != 1) {
if ($temppos = stristr($guild_tag, "name=\"")) {
$temp = explode("\"", $temppos);
$guild_name = $temp[1];
}
}
if (substr($guild_tag, 0, 6) == "member") {
if ($temppos = stristr($guild_tag, "name=\"$char")) {
$temp = explode("\"", $temppos);
$member_name = $temp[1];
$found = 1;
}
}
}
if ($found == 0) {
$guild_name = 'None';
}
$guild_file = $dirdata . "guilds.xml";
$g = fopen($guild_file, "r");
$guild_contents = fread($g, filesize($guild_file));
$guild_tags = explode("<", $guild_contents);
$found = 0;
foreach($guild_tags as $guild_tag)
{
if (substr($guild_tag, 0, 5) == "guild" && $found != 1)
{
if ($temppos = stristr($guild_tag, "name=\""))
{
$temp = explode("\"", $temppos);
$guild_name = "<a href='guild.php?guild=$temp[1]'>$temp[1]</a>";
}
}
if (substr($guild_tag, 0, 6) == "member")
{
if ($temppos = stristr($guild_tag, "name=\"$char"))
{
$temp = explode("\"", $temppos);
$member_name = $temp[1];
$found = 1;
}
}
}
if ($found == 0)
{
$guild_name = 'None';
}
$file = "$dirplayer$char.xml";
$f = @fopen($file, "r");
if (!$char)
{
}
else if (!$f)
{
print("<h2><b>Character $char does not exist!</h2>");
} else
{
$contents = fread($f, filesize($file));
$tags = explode("<", $contents);
$name = "";
$level = 0;
$magic_level = 0;
$voc = 0;
$town = 0;
$lastlogin = 0;
$skills = array(0, 0, 0, 0, 0, 0);
$reason = "";
$deletion = 0;
$bantime = "";
$banned = 0;
$time = "";
$namelock = 0;
foreach($tags as $tag)
{
if(substr($tag, 0, 3) == "ban") {
if($temppos = stristr($tag, "reason=\"")) {
$temp = explode("\"", $temppos);
$reason = $temp[1];
}
if($temppos = stristr($tag, "deleted=\"")) {
$temp = explode("\"", $temppos);
$deletion = $temp[1];
}
if($temppos = stristr($tag, "banrealtime=\"")) {
$temp = explode("\"", $temppos);
$bantime = $temp[1];
}
if($temppos = stristr($tag, "banned=\"")) {
$temp = explode("\"", $temppos);
$banned = $temp[1];
}
}
if (substr($tag, 0, 6) == "player")
{
if ($temppos = stristr($tag, "name=\""))
{
$temp = explode("\"", $temppos);
$name = $temp[1];
}
if ($temppos = stristr($tag, "level=\""))
{
$temp = explode("\"", $temppos);
$level = $temp[1];
}

if($temppos = stristr($tag, "namelock=\"")) {
$temp = explode("\"", $temppos);
$namelock = $temp[1];
}
if ($temppos = stristr($tag, "maglevel=\""))
{
$temp = explode("\"", $temppos);
$magic_level = $temp[1];
}
if ($temppos = stristr($tag, "voc=\""))
{
$temp = explode("\"", $temppos);
$voc = $temp[1];
}
if ($temppos = stristr($tag, "promoted=\""))
{
$temp = explode("\"", $temppos);
$promo = $temp[1];
}
if ($temppos = stristr($tag, "sex=\""))
{
$temp = explode("\"", $temppos);
$sex = $temp[1];
}
if ($temppos = stristr($tag, "lastlogin=\""))
{
$temp = explode("\"", $temppos);
$lastlogin = $temp[1];
}
if ($temppos = stristr($tag, "access=\""))
{
$temp = explode("\"", $temppos);
$access = $temp[1];
}
}
if (substr($tag, 0, 6) == "temple")
{
if ($temppos = stristr($tag, "x=\""))
{
$temp = explode("\"", $temppos);
$town = $temp[1];
}
}
if (substr($tag, 0, 6) == "skill ")
{
if ($temppos = stristr($tag, "skillid=\""))
{
$temp = explode("\"", $temppos);
$tempid = $temp[1];
}
if ($temppos = stristr($tag, "level=\""))
{
$temp = explode("\"", $temppos);
$templvl = $temp[1];
}
if ($tempid && $templvl) {
$skills[$tempid] = $templvl;
}
}
if (substr($tag, 0, 5) == "death")
{
if ($temppos = stristr($tag, "name=\""))
{
$temp = explode("\"", $temppos);
$tempname = $temp[1];
}

if ($temppos = stristr($tag, "level=\""))
{
$temp = explode("\"", $temppos);
$templvl = $temp[1];
}

if ($time = stristr($tag, "time=\""))
{
$temp = explode("\"", $time);
$time = $temp[1];
}

if ($time==0)
$time = "00:00";
else
$time = date ('M d Y, H:i:s',$time);

if ($tempname && $templvl)
{
if (file_exists("$dirmonster$tempname.xml"))
{
$deathtext[] = " $templvl by a $tempname ($time)";
}
elseif (file_exists("$dirplayer$tempname.xml"))
{
$deathtext[] = "$templvl by <a href=\"character.php?char=$tempname\">$tempname</a> ($time)";
}
else
{
$deathtext[] = "$templvl by $tempname ($time)";
}
}
}
}
print("<h3>Character information:</h3>");
print("<table cellSpacing=1 cellPadding=2 width=450px><tr>");
print("<tr><td width=150px>Name:</td><td width=300px>$name<br/></td></tr>");
$charsex = array("Female", "Male");
print("<tr><td width=150px>Sex:</td><td width=300px>$charsex[$sex]<br></td></tr>");
if ($promo == 0)
$vocations = array("None", "Sorcerer", "Druid", "Paladin", "Knight");
if ($promo == 1)
$vocations = array("None", "Master Sorcerer", "Elder Druid", "Royal Paladin", "Elite Knight");
print("<tr><td width=150px>Profession:</td><td width=300px>$vocations[$voc]<br></td></tr>");
print("<tr><td width=150px>Level:</td><td width=300px>$level<br/></td></tr>");
print("<tr><td width=150px>Magic Level:</td><td width=300px>$magic_level<br/></td></tr>");
print("<tr><td width=150px>World:</td><td width=300px>$world<br/></td></tr>");
if ($town == 500)
$twn = 0;
$towns = array("Prison", "Dragon Mountain");
print("<tr><td width=150px>Residence:</td><td width=300px>$towns[$twn]<br/></td></tr>");
print("<tr><td width=150px>Guild membership:</td><td width=300px>$guild_name<br/></td></tr>");
if ($lastlogin==0)
$logindate = "Never logged in";
else
$logindate = date ('M d Y, H:i:s A',$lastlogin);
print("<tr><td width=150px>Last login:</td><td width=300px>$logindate<br/></td></tr>");
print("</table>");


print("<h3>Account information:</h3>");
print("<table cellSpacing=1 cellPadding=4 width=450px><tr>");
if($bans) {
print("<b>Banished:</b> <br><font color=#FF0000>$bans</font><br><br>");
}
//print("<br><br>Debug<br>bann = $bann <br>deleted = $deleted<br> reason = $reason");
if($banned > 0) {
if($deletion > 0)
print("<tr><td width=150px>Banished:</td><td width=300px><font color=red>Banished until deletion <br>because of $reason.</font><br/></td></tr>");
else
print("<tr><td width=150px>Banished:</td><td width=300px><font color=red>Banished until $bantime <br>because of $reason.</font><br/></td></tr>");
}
$position = array("Player", "<b><font color=red>Tutor</font></b>", "<b><font color=red>Counsellor</font></b>", "<b><font color=red>Gamemaster</font></b>", "<b><font color=red>Senior Gamemaster</font></b>", "<b><font color=red>God</font></b>");
print("<tr><td width=150px>Position:</td><td width=300px>$position[$access]</td></tr>");
print("</table>");
if ($deathtext)
{
print("<h3>Deaths:</h3>");
foreach($deathtext as $temp) {
print("<tr>Killed at level $temp.<br>");
}
print("<br/><br/>");
}
}
?>
<form method="get" action="<?=$PHP_SELF?>">
<h3>Search Character:</h3>
Name: <input type="text" name="char" maxlength="20"/> <input type="submit" value="Search"/></td></tr>
</table>
</form>



<?php include ('menu.inc.php');?>
 
Odp: Problem z wyszukiwark?

>>>od?wie?am<<<
 
Odp: Problem z wyszukiwark?

>>>od?wie?am<<<
 
Odp: Problem z wyszukiwark?


Chcia?bym, aby kto? przerobi? mi skrypt wyszukiwania postaci na skrypt wyszukiwania np film?w.

Ale jak brzmi problem? Wstawiasz jakis kod - w dodatku jako cytat.. Kt?ry s?u?y do wyszukiwania postaci. A ty chcesz skrypt wyszukiwania film?w? WTF?
Takie co? mo?na napisa? na 666 sposob?w. W zale?no?ci od tego gdzie to ma dzia?a?. Jak nic nie napisa?e? o przeznaczeniu skryptu, to albo nikomu sie nie chce z tym m?czy?, albo nikt i tak nie wie o co chodzi. Po to jest to forum ?eby tu opisa? problem, a nie na GG..

Btw... Moja firma mo?e ci to napisa?, w cenie ju? od 30 z? netto za godzine pracy programisty.
 
Odp: Problem z wyszukiwark?

@up chodzi?o mi o wyszukiwark? np. tak? jak jest na exsite.pl wpisuj? jak?? nazw? np. Gta i wyskakuje par? plik?w z nazw? GTA, ale to ju? nie wa?ne, bo ju? znalaz?em pomoc na innym forum za darmo a nie za 30 z?otych! Temat Do Zamkni?cia!!!
 
Back
Do góry