Pomoc przy skrzypcie

grigo123

New User
Zarejestrowany
Dołączył
Styczeń 25, 2010
Posty
7
Liczba reakcji
0
jak przerobic ten skrypt aby dawal pacc w godzinach a nie w dniach? bo mi nie dziala gdy daje w dniach. probowalem go sam przerobic ale cos nie dzialalo. powniewaz pisalo w acc makerze podaj acc numer zamiast nick i gdy sie juz podalo acc to bledy wywalalo :(

tutaj plik itemxml.php jak potrzebny jeszcze jakis to piszcie :)

Kod:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<?php include 'config.php'; ?>
<meta http-equiv="Content-Language" content="pl" />
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250" />
<meta name="author" content="DeGhost" />
<meta http-equiv="Reply-to" content="deghost@o2.pl" />
<title><?php echo $title; ?></title>
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>

<body>

	<div id="topmen">

	<div class="menutop">
	<div direction="center"><?php include 'uptime.php'; ?></div>
</div></div>
	<div id="podstawa">

	<div class="logo"></div>
		<div class="menulogo">
<?php include ("include/menu1.php");?>
	</div>

		<div id="menu">
			<div class="newmenu"></div>
				<div class="srodek">
					<div class="tekst">
						<?php include ("include/account_login.php");?>
						<h5><a href="account_create.php">+ Rejestracja</a></h5>
					</div>
				</div>

			<div class="newmenuu"></div>
				<div class="srodek">
					<div class="tekst">
<?php include ("include/menu2.php");?>				
</div>
				</div>

			<div class="newmenuuu"></div>
				<div class="srodek">
					<div class="tekst">
<?php include ("include/menu3.php");?>
					</div>
				</div>


		</div>
		<div id="nius">
			<div class="newsman">Shopik</div>
			
			<div class="srodekniusa">
			<div class="teksts">



<?php

if ($_POST['usluga'] == "item1") //Nazwa uslugi dla ktorej bedzie dolny kod
{
$nick = $_POST['nick'];
$check = $_POST['check'];
$item_id = '2443'; //ID itemy ktory ma zostac stworzony w DP
$file = $players_folder .$nick.'.xml';
if (file_exists($file)) {
//Sprawdzacz kodu
            $id = "35479"; //ID klienta dotpay.pl
            $code = "czuk"; //Kod uslugi SMS
            $type = "sms"; //Typ uslugi
            $del= "1"; //Czy kod jednorazowy

                $handle = fopen("http://dotpay.pl/check_code.php?id=".$id."&code=".$code."&check=".$check."&type=".$type."&del=".$del."", "r");
            $status = fgets($handle, 8);
            fclose($handle);

            if ((empty($check)) || (empty($nick)))
              {
              $message = "Prosze wypelnic wszystkie pola.";
              }

            elseif ($status == 0)
              {
              $message = "Wpisany kod jest niepoprawny.";
              }
            else
              {
$xml = simplexml_load_file($file);
$character = $xml->depots->depot->item->inside->addChild('item');
$character->addAttribute('id', $item_id);

$newplayerFile = $xml->asXML();
$open_file = fopen($file, 'w');
fwrite($open_file, $newplayerFile);
fclose($open_file);

$message = "Do twojego DP w g??wnym miescie zostal dodany item.";
            }

}else{
$message = "<font color='red'><b>Nie isnieje taka postac!</b></font>";
      }
}

elseif ($_POST['usluga'] == "pacc7")
{
$nick = $_POST['nick'];
$check = $_POST['check'];
$dni = '7';
$file = $acc_folder .$nick.'.xml';

if (file_exists($file)) {

//Sprawdzacz kodu
$id = "35479";
$code = "czuk";
$type = "sms";
$del= "1";

                $handle = fopen("http://dotpay.pl/check_code.php?id=".$id."&code=".$code."&check=".$check."&type=".$type."&del=".$del."", "r");
$status = fgets($handle, 8);
fclose($handle);

if ((empty($check)) || (empty($nick)))
{
$message = "Prosze wypelnic wszystkie pola.";
}

elseif ($status == 0)
{
$message = "Wpisany kod jest niepoprawny.";
}
else
{


$XML = simplexml_load_string(file_get_contents($file));
$open_file = fopen($acc_folder .$nick.'.xml', 'r');
$playerXML = simplexml_load_string(fread($open_file, 999999));
fclose($open_file);

$dom = dom_import_simplexml($playerXML);
$dom2 = $dom->getAttribute('premDays');
$dom->setAttribute('premDays', $dom2 + $dni);



$newplayerFile = $playerXML->asXML();
$open_file = fopen($acc_folder .$nick.'.xml', 'w');
fwrite($open_file, $newplayerFile);
fclose($open_file);

$message = "W?asnie zosta? przes?any PACC dla ciebie.";
            }

}else{
$message = "<font color='red'><b>Nie isnieje takie konto!</b></font>";
      }
}

elseif ($_POST['usluga'] == "pacc14")
{
$nick = $_POST['nick'];
$check = $_POST['check'];
$dni = '14';
$file = $acc_folder .$nick.'.xml';

if (file_exists($file)) {

//Sprawdzacz kodu
$id = "35479";
$code = "PACC14";
$type = "sms";
$del= "1";

                $handle = fopen("http://allpay.eu/check_code.php?id=".$id."&code=".$code."&check=".$check."&type=".$type."&del=".$del."", "r");
$status = fgets($handle, 8);
fclose($handle);

if ((empty($check)) || (empty($nick)))
{
$message = "Prosze wypelnic wszystkie pola.";
}

elseif ($status == 0)
{
$message = "Wpisany kod jest niepoprawny.";
}
else
{


$XML = simplexml_load_string(file_get_contents($file));
$open_file = fopen($acc_folder .$nick.'.xml', 'r');
$playerXML = simplexml_load_string(fread($open_file, 999999));
fclose($open_file);

$dom = dom_import_simplexml($playerXML);
$dom2 = $dom->getAttribute('premDays');
$dom->setAttribute('premDays', $dom2 + $dni);



$newplayerFile = $playerXML->asXML();
$open_file = fopen($acc_folder .$nick.'.xml', 'w');
fwrite($open_file, $newplayerFile);
fclose($open_file);

$message = "W?asnie zosta? przes?any PACC dla ciebie.";
            }

}else{
$message = "<font color='red'><b>Nie isnieje takie konto!</b></font>";
      }
}


elseif ($_POST['usluga'] == "pacc30")
{
$nick = $_POST['nick'];
$check = $_POST['check'];
$dni = '30';
$file = $acc_folder .$nick.'.xml';

if (file_exists($file)) {

//Sprawdzacz kodu
$id = "35479";
$code = "PACC30";
$type = "sms";
$del= "1";

                $handle = fopen("http://dotpay.pl/check_code.php?id=".$id."&code=".$code."&check=".$check."&type=".$type."&del=".$del."", "r");
$status = fgets($handle, 8);
fclose($handle);

if ((empty($check)) || (empty($nick)))
{
$message = "Prosze wypelnic wszystkie pola.";
}

elseif ($status == 0)
{
$message = "Wpisany kod jest niepoprawny.";
}
else
{


$XML = simplexml_load_string(file_get_contents($file));
$open_file = fopen($acc_folder .$nick.'.xml', 'r');
$playerXML = simplexml_load_string(fread($open_file, 999999));
fclose($open_file);

$dom = dom_import_simplexml($playerXML);
$dom2 = $dom->getAttribute('premDays');
$dom->setAttribute('premDays', $dom2 + $dni);



$newplayerFile = $playerXML->asXML();
$open_file = fopen($acc_folder .$nick.'.xml', 'w');
fwrite($open_file, $newplayerFile);
fclose($open_file);

$message = "W?asnie zosta? przes?any PACC dla ciebie.";
            }

}else{
$message = "<font color='red'><b>Nie isnieje takie konto!</b></font>";
      }
}





else
{
    echo "<p align='center'><font size='5' color='red'><b>Wpisz nick postaci i kod aktywacyjny w formularzu po ¶rodku strony!</b></font><br /></p>";
}

if (isset($message))
          {
          echo $message;
          }

echo "<br><br><br>";

?>	
	</div>
</div>
</div>


		<div style="clear:both;"></div><br>
<div class="menutopp">Created by <a href="czuk76.no-ip.org">DeGhost</a>.<br><?php echo $serv; ?> 2008 ©</div>

<?php include ("include/reklama.php");?>

</div>
</body>
</html>
 
Back
Do góry