Помощ за php

Post Reply
User avatar
KyMyHuCT
Нов
Нов
Posts: 97
Joined: Thu Sep 20, 2012 4:01 pm
Location: България
Contact:

Помощ за php

Post by KyMyHuCT » Mon Oct 24, 2016 10:25 pm

Здравейте от 1-2 седмици се занимавам с една система за сървъри нещо като гаметракер mon.csservers.biz та въпросът ми е някой може ли да ми помогне да добавим други игри освен cs 1.6 искам да добавя cs go ,minecraft и gta много ще съм благодарен някой ако ми помогне благодаря предварително

незнам темата на правилното място ли е ако не е моля не я трийте преместете я на мястото и

novakabg
Турист
Турист
Posts: 337
Joined: Fri May 13, 2016 12:29 pm
Contact:

Post by novakabg » Tue Oct 25, 2016 6:26 am

Какво прави темата ти тук?

HTML / Javascript / CSS -> :D

Трябва да дадеш код, сподели го тука за добавяне,изваждане,изглед + mysql.

User avatar
KyMyHuCT
Нов
Нов
Posts: 97
Joined: Thu Sep 20, 2012 4:01 pm
Location: България
Contact:

Post by KyMyHuCT » Tue Oct 25, 2016 8:20 am

За добавяне е това

Code: Select all

<?php 
if&#40;logged_in &#40;&#41; == false&#41; &#123;

	$_SESSION&#91;'error'&#93; = "Трябва да сте регистриран!";
	header&#40;"Location&#58;/index.php"&#41;;
&#125;
else &#123;
if&#40;isset&#40;$_POST&#91;'provera_servera'&#93;&#41;&#41; &#123;
$_POST&#91;'ip_address'&#93; = htmlspecialchars&#40;$_POST&#91;'ip_address'&#93;, ENT_QUOTES&#41;;

	//Server checks
	try &#123;
		$Query = new LiveStats&#40;$_POST&#91;'ip_address'&#93;, $_POST&#91;'connection_port'&#93;&#41;;
		$info = $Query->GetServer&#40;&#41;;
	&#125;
	catch &#40;LSError $e&#41; &#123;&#125;
				
	//Check status of the server
	if&#40;empty&#40;$e&#41;&#41;&#123; $status = 1; &#125; else &#123; $status = 0; &#125;
	
&#125;
if&#40;isset&#40;$_POST&#91;'add_server'&#93;&#41;&#41; &#123;
	$ip   	  = htmlspecialchars&#40;$_POST&#91;'ip'&#93;, ENT_QUOTES&#41;;
	$port 	  = htmlspecialchars&#40;$_POST&#91;'port'&#93;, ENT_QUOTES&#41;;
	$mod  = htmlspecialchars&#40;$_POST&#91;'mod'&#93;&#41;;
	$game 	  = htmlspecialchars&#40;$_POST&#91;'igra'&#93;, ENT_QUOTES&#41;;
	$naziv_srv 	  = htmlspecialchars&#40;$_POST&#91;'hostname'&#93;&#41;;
	$drzava  = htmlspecialchars&#40;$_POST&#91;'drzava'&#93;&#41;;

	$ban = mysql_num_rows&#40;mysql_query&#40;"SELECT ip FROM banovi WHERE ip='$ip'"&#41;&#41;;
	if&#40;$ban > 0&#41; &#123;

		$_SESSION&#91;'error'&#93; = "IP Je banovan!";
		header&#40;"Location&#58;/dodaj_server"&#41;;
		exit&#40;&#41;;
	&#125; 


	$ubaci = mysql_query&#40;"INSERT INTO `servers` &#40;`hostname`,`user_id`, `ip`, `port`, `game`,`drzava`,`mod`&#41; VALUES &#40;'$naziv_srv','$_SESSION&#91;user_id&#93;', '$ip', '$port', '$game','$drzava','$mod'&#41;"&#41;;
	if&#40;!$ubaci&#41; &#123;

		$_SESSION&#91;'error'&#93; = "Възникна грешка!";
		header&#40;'Location&#58;/dodaj_server'&#41;;

	&#125; else &#123;

		$_SESSION&#91;'ok'&#93; = "Успешно добавихте сървъра";
		header&#40;"Location&#58;/server_info/$ip&#58;$port"&#41;;

	&#125;

	
&#125;
?>
<div id="welcome">
<h3>Добавяне на нов сървър&#58;</h3>
<p>Попълнете формата за добавяне на сървър!</p><hr />
<?php
if&#40;isset&#40;$_POST&#91;'provera_servera'&#93;&#41;&#41; &#123;

	$game	  = $_POST&#91;'game'&#93;;

	if&#40;server_exists2&#40;$_POST&#91;'ip_address'&#93;, $_POST&#91;'connection_port'&#93;&#41;&#41; &#123;
		$_SESSION&#91;'error'&#93; = "Сървър вече съществува в сайта!";
		header&#40;"Location&#58;/server_info/$_POST&#91;ip_address&#93;&#58;$_POST&#91;connection_port&#93;"&#41;;
	&#125;

	if&#40;$status == 0&#41; &#123;
		$_SESSION&#91;'error'&#93; = "Сървърът е офлайн!";
		header&#40;"Location&#58;/dodaj_server"&#41;;
	&#125;

	if&#40;!$info->Directory == "cstrike"&#41; &#123;
		$_SESSION&#91;'error'&#93; = "Сървърът не е Counter Strike!";
		header&#40;"Location&#58;/dodaj_server"&#41;;
	&#125;

&#125;
if&#40;isset&#40;$_GET&#91;'success'&#93;&#41; && empty&#40;$_GET&#91;'success'&#93;&#41;&#41; &#123;
	echo '<div class="alert alert-success">
			<button type="button" class="close" data-dismiss="alert">&times;</button>
			<strong>Поздравления!</strong> Вашият сървър беше добавен!';
	if&#40;$settings&#91;'server_confirmation'&#93; == '1'&#41; echo "&nbsp;&nbsp; Моля, изчакайте одобрение администратор!";
	echo '</div>';
&#125;

if&#40;empty&#40;$errors&#41; == false&#41; &#123;
	echo output_errors&#40;$errors&#41;;
&#125;

?>

<form method="post" action="">
	<label>Игра</label> <br />
	<select type="text" name="igra">
		<option value="cstrike"> Counter Strike 1.6 </option>
	</select> <br /> <br />
	
	<label>IP адрес</label><br />
	<input type="text" name="ip_address"  />
	<br /><br />

	<label>Порт</label><br />
	<input type="text" name="connection_port" value="27015" maxlength="5"/><br />
	<br /> <br />

	<label>Държава</label> <br />
	<select type="text" name="drzava">
	<option value="BG"> Bulgaria </option>
	<option value="RU"> Russia </option>
	<option value="RO"> Romania </option>
	<option value="TR"> Turkey </option>
	<option value="GR"> Greece </option>
	<option value="DE"> Germany </option>
	<option value="FR"> France </option>
		<option value="RS"> Srbija </option>
		<option value="BA"> Bosna i Hercegovina </option>
		<option value="ME"> Crna Gora </option>		
		<option value="MK"> Makedonija </option>					
	</select> <br /> <br />

	<label>Мод</label> <br />
	<select type="text" name="mod">
	<option value="5on5"> 5on5 </option>
<option value="AWP">AWP Only </option>
<option value="Aim"> Aim </option>
<option value="Bhop"> Bhop </option>
<option value="Deathrace"> Deathrace </option>
<option value="Knife"> Knife </option>
<option value="GunGame"> GunGame </option>
		<option value="Classic"> Classic </option>	
        <option value="D2"> D2 Only</option>
<option value="Respawn"> Respawn </option>	
<option value="War3Respawn"> WAR3Respawn </option>	
		<option value="ClanWar"> ClanWar </option>	
		<option value="DeathMatch"> DeathMatch </option>	
		<option value="DeathRun"> DeathRun </option>
		<option value="Zombie"> Zombie </option>
		<option value="GunGame"> GunGame </option>
		<option value="PaintBall"> PaintBall </option>			
<option value="Furien"> Furien </option>	
<option value="Other"> Other </option>	
	</select> <br /> <br />

	<input class="add_server_btn" type="submit" name="provera_servera" value="Продължи" /><br /><br />
	
	<?php if&#40;isset&#40;$_POST&#91;'provera_servera'&#93;&#41; && $status == 1 && empty&#40;$errors&#41; &#41;&#123; ?>
		<br />

		Име на сървъра&#58; <br /><input type="text" name="hostname_provera" disabled value="<?php echo $info->Hostname; ?>" />

		<br /><br />

		<input type="text" name="hostname" hidden value="<?php echo $info->Hostname; ?>" />
		<input type="text" name="ip" hidden value="<?php echo $_POST&#91;'ip_address'&#93;; ?>" />
		<input type="text" name="port" hidden value="<?php echo $_POST&#91;'connection_port'&#93;; ?>" />
		<input type="text" name="drzava" hidden value="<?php echo $_POST&#91;'drzava'&#93;; ?>" />
		<input type="text" name="mod" hidden value="<?php echo $_POST&#91;'mod'&#93;; ?>" />

		<input class="add_server_btn" type="submit" name="add_server" value="Добави сървъра" />


		
<?php &#125; 
?>

<?php &#125;;?>
</form>
</div>
<div id="uputstva">

	<h3> Внимание! </h3> <hr />

	» Истинските сървъри с повече от два бота ще получат рестартиране ранг ! <hr />
	» Фалшиви сървъри ще бъдат изтрити и IP БАННАТИ ! <hr />
	» GameMenu - в които сървъри е променено е забранено ! <hr />
	» Сървъри, които имат Автоматично свързване ще бъдат изтрити и забранени ! <hr />
	» Сървъри, които се променят основните файлове на играта, ще бъдат изтрити и IP забранени ! <hr />

</div>
<br /> <br />


За изглед е това мисля че работи без mysql

Code: Select all

<?php 
defined&#40;"access"&#41; or die&#40;"Нямате достъп до тази страница"&#41;;





$ip_port	= explode&#40;"&#58;", $_GET&#91;'ip'&#93;,$_GET&#91;'port'&#93;&#41;;
$ip			= $ip_port&#91;0&#93;;
$port		= $ip_port&#91;1&#93;;


$result  = mysql_query&#40;"SELECT * FROM `servers` WHERE `ip` = '$ip' AND `port` = '$port' ORDER by glasovi DESC"&#41;;
$server_data = mysql_fetch_array&#40;$result, MYSQL_ASSOC&#41;;




	

	if&#40;$ip_port == ""&#41; &#123;
		
		$_SESSION&#91;'error'&#93; = "Сървър не съществува!";
		header&#40;'Location&#58;/index.php'&#41;;
		
	&#125;
	
	if&#40;!$server_data&#41; &#123;
		
		$_SESSION&#91;'error'&#93; = "Сървър не съществува!";
		header&#40;'Location&#58;/index.php'&#41;;		
		
	&#125;

	if&#40;$server_data&#91;'ban'&#93; == "1"&#41; &#123;

		$_SESSION&#91;'error'&#93; = "Сървърът е Баннат!";
		header&#40;"Location&#58;/serveri"&#41;;

	&#125; 

	$server_id  = $server_data&#91;'id'&#93;;
	$vlasnikid = $server_data&#91;'vlasnik'&#93;;
	$last_update = time&#40;&#41; - $server_data&#91;'cache_time'&#93;;
	$last_updateM = intval&#40;$last_update/60&#41;;


	
	try &#123;
		$Query = new LiveStats&#40;$server_data&#91;'ip'&#93;, $server_data&#91;'port'&#93;&#41;;
		$info = $Query->GetServer&#40;&#41;;
	&#125;
	catch &#40;LSError $e&#41; &#123;&#125;
	
	//Check status of the server
	if&#40;empty&#40;$e&#41;&#41;&#123; $status = 1; &#125; else &#123; $status = 0; &#125;
			
	$cache = trim&#40;$cache&#41;;
	$datum = date&#40;'d'&#41;;

	// Info servera
	$hostname = $info->Hostname;	
	$mapa = $info->Map;		
	$mod = $server_data&#91;'mod'&#93;;
	$broj_igraca = $info->PlayerCount;
	$max_igraca = $info->MaxPlayers;
	$igra = $server_data&#91;'game'&#93;;
	if&#40;$igra == "cstrike"&#41; &#123;

		$igra = "Counter Strike 1.6";

	&#125;;
	$online = $server_data&#91;'status'&#93;;
	if&#40;$online == "0"&#41; &#123;

		$online = "Не";
	&#125; else &#123;

		$online = "Да";
	&#125;
	$dodao = mysql_result&#40;mysql_query&#40;"SELECT username FROM users WHERE user_id = '$server_data&#91;user_id&#93;'"&#41;,0&#41;;

	$vlasnik = $server_data&#91;'vlasnik'&#93;;
	if&#40;$vlasnik == "" OR $vlasnik == "0"&#41; &#123;

		$vlasnik = "Няма собственик";

	&#125; else &#123;

		$vlasnikusername = mysql_result&#40;mysql_query&#40;"SELECT username FROM users WHERE user_id = '$server_data&#91;vlasnik&#93;'"&#41;,0&#41;;
		$vlasnik = "<a href='/korisnik/$vlasnikid'>$vlasnikusername</a>";

	&#125;;

	$sajt = $server_data&#91;'forum'&#93;;
	if&#40;$sajt == ""&#41; &#123;

		$sajt = "Няма";
	&#125; else &#123;

		$sajt = "<a href='http&#58;//$sajt'>$sajt</a>";
	&#125;

	$igraci = "$server_data&#91;broj_igraca&#93;/$server_data&#91;max_igraca&#93;";

	// Prosecan broj igraca
	$players = $server_data&#91;'broj_igraca'&#93;;
	  
	$niz24 = explode&#40;',' , $players&#41;;

	$niz1 = substr&#40;$players , 12&#41;;
	$niz12 = explode&#40;',' , $niz1&#41;;

	$suma = array_sum&#40; $niz24 &#41;;
	$suma1 = array_sum&#40; $niz12 &#41;;

	$prosek = round&#40;$suma / count&#40; $niz24 &#41;, 2&#41;;
	$prosek12 = round&#40;$suma1 / count&#40; $niz12 &#41;, 2&#41;;

	// Mapa
	$mapurl = "/img/mape/$server_data&#91;game&#93;/$server_data&#91;mapa&#93;.jpg";

	if &#40;getimagesize&#40;$mapurl&#41; !== false&#41; &#123;
	    $mapurl = "/img/mape/$server_data&#91;game&#93;/$server_data&#91;mapa&#93;.jpg";
	&#125; else &#123;
	    $mapurl = "/img/mape/$server_data&#91;game&#93;/$server_data&#91;mapa&#93;.jpg";
	&#125;
	$glasovi = $server_data&#91;'glasovi'&#93;;
	$rank = $server_data&#91;'rank'&#93;;
	if&#40;$rank == "0"&#41; &#123;

		$rank = "999999";
	&#125;
	
	//update cache
	mysql_query&#40;"UPDATE `servers` SET `cache` = '$cache' WHERE `ip` = '$ip' AND `port` = '$port'"&#41;;
	//Update cache time
	mysql_query&#40;"UPDATE `servers` SET `cache_time` = unix_timestamp&#40;&#41; WHERE `ip` = '$ip' AND `port` = '$port'"&#41;;
	//Update cache status of the server
	mysql_query&#40;"UPDATE `servers` SET `status` = '$status' WHERE `ip` = '$ip' AND `port` = '$port'"&#41;;
	
	if&#40;$status == "1"&#41; &#123; 
	mysql_query&#40;"UPDATE `servers` SET `hostname` = '$hostname' WHERE `ip` = '$ip' AND `port` = '$port'"&#41;;
	mysql_query&#40;"UPDATE `servers` SET `mapa` = '$mapa' WHERE `ip` = '$ip' AND `port` = '$port'"&#41;;
	mysql_query&#40;"UPDATE `servers` SET `max_igraca` = '$max_igraca' WHERE `ip` = '$ip' AND `port` = '$port'"&#41;;
	mysql_query&#40;"UPDATE `servers` SET `broj_igraca` = '$broj_igraca' WHERE `ip` = '$ip' AND `port` = '$port'"&#41;;		
	&#125;


	// INFORMACIJE SERVERA

	if&#40;$status == "1"&#41; &#123;

		$naziv_servera = $info->Hostname;
		$mapa_ = $info->Map;

	&#125; else &#123;

		$naziv_servera = $server_data&#91;'hostname'&#93;;
		$mapa_ = $server_data&#91;'mapa'&#93;;
	&#125;




?>

<div id="serverinfo">

	<div class="title" style="width&#58;610px;"><img src="/img/igre/<?php echo $server_data&#91;'game'&#93;; ?>.gif" style="width&#58;10px; height&#58;10px;"> <img src="/img/lokacije/<?php echo $server_data&#91;'drzava'&#93;; ?>.png" style="height&#58;10px;">
		<span style="float&#58;right;">Последна актуализация&#58; <?php echo time_ago&#40;$server_data&#91;'cache_time'&#93;&#41;; ?></span>
	</div>
	<div class="sibox">
		» Остновна информация <br /> <br />

		<p>Име&#58; <span class="boja_zelena"><?php echo $naziv_servera; ?></span> </p>
		<p>Мод&#58; <span class="boja_zelena"><?php echo $mod; ?></span> </p>	
		<p>Игра&#58; <span class="boja_zelena"><img src="/img/igre/<?php echo $server_data&#91;'game'&#93;; ?>.gif" style="width&#58;10px; height&#58;10px;"> <?php echo $igra; ?></span> </p>			
		<p>Онлайн&#58; <span class="boja_zelena"><?php echo $online; ?></span> </p>
		<p>IP Адрес&#58; <span class="boja_zelena"><?php echo "$ip&#58;$port"; ?></span> </p>
		<p>Добавил&#58; <span class="boja_zelena"><a href="/korisnik/<?php echo $server_data&#91;'user_id'&#93;; ?>"><?php echo $dodao; ?></a></span> </p>
		<p>Собственост&#58; <span class="boja_zelena"><?php echo $vlasnik; ?><a href="/process/vlasnistvo/<?php echo "$ip&#58;$port"; ?>"> &#91; Потвърди собственост &#93; </a> </span> </p>
		<br />
		» Допълнителна информация <br /> <br />
		<p>Сайт/Форум&#58; <span class="boja_zelena"><?php echo $sajt; ?></span> <?php if&#40;$vlasnikid == $_SESSION&#91;'user_id'&#93;&#41; &#123; ?> <span class="izmeni"><a data-popup-open="izmeni" href="#"> Промени </a></span> <?php &#125;;?></p>
		<br />
		» Информация за играчите <br /> <br />
		<p>Играчи&#58; <span class="boja_zelena"><?php echo $igraci; ?></span> </p>
		<p>Средните играчи в послетните &#40;12часа&#41;&#58; <span class="boja_zelena"><?php echo $prosek12; ?></span> </p>	
		<p>Средните играчи в послетните &#40;24часа&#41;&#58; <span class="boja_zelena"><?php echo $prosek; ?></span> </p>			
		<br />	
		» Ранг и гласове <br /> <br />
		<p>Брой гласове&#58; <span class="boja_zelena"><?php echo $glasovi; ?></span> </p>
		<p>Ранг <span class="boja_zelena"><?php echo $rank; ?></span> </p>
				
		<br />	
		<div class="mapaservera">			
			<img src="<?php echo $mapurl; ?>" style="width&#58;150px; height&#58;110px;"> <br />
			Текуща карта&#58; <?php echo $mapa_; ?>
		</div>
		<div id="baneri">
  		<h3>Банери</h3>

		<img src="/banner/<?php echo "$ip&#58;$port"; ?>"> <br /><br />
		HTML Код <br />
		<textarea cols="60" rows="1" title="HTML code" onclick="this.select&#40;&#41;" readonly="readonly"><a href="http&#58;//<?php echo $_SERVER&#91;'SERVER_NAME'&#93;; ?>/server_info/<?php echo "$ip&#58;$port"; ?>" target="_blank"><img src="http&#58;//mon.csservers.biz/banner/<?php echo "$ip&#58;$port"; ?>" border="0"></a></textarea> <br />
		&#91;BB&#93;Форум Код&#58; <br />
		<textarea cols="60" rows="1" title="Forum code" onclick="this.select&#40;&#41;" readonly="readonly">&#91;url=http&#58;//<?php echo $_SERVER&#91;'SERVER_NAME'&#93;; ?>/server_info/<?php echo "$ip&#58;$port"; ?>&#93;&#91;img&#93;http&#58;//<?php echo $_SERVER&#91;'SERVER_NAME'&#93;; ?>/banner/<?php echo "$ip&#58;$port"; ?>&#91;/img&#93;&#91;/url&#93;</textarea><br /><br /><br />
		</div>

		<div id="oceni">
			<div class="title">Гласувайте за сървъра</div>
		<div class="glas">
			<div class="glasaj_btn"><span style="font-size&#58;16px;"><?php echo $server_data&#91;'glasovi'&#93;; ?> гласа</span> <span><a href="/glasaj/<?php echo "$server_id"; ?>">Гласувай</a></span></div>
		</div>
		</div> <br />
		<div id="shoutbox">

			<div class="title">Чат</div>
			
			<?php 

				$sbp 	= mysql_num_rows&#40;mysql_query&#40;"SELECT id FROM shoutbox WHERE server='$server_id'"&#41;&#41;;
				if&#40;$sbp <1&#41; &#123;

					echo "<div class='shoutbox_komentar'>Няма коментари!</div>";
				&#125; else &#123;

				$kveri = mysql_query&#40;"SELECT * FROM shoutbox WHERE server='$server_id' ORDER by id DESC LIMIT 5"&#41;;
				while&#40;$sb = mysql_fetch_array&#40;$kveri&#41;&#41; &#123;
				$komentar = $sb&#91;'komentar'&#93;;
								  if&#40;strlen&#40;$komentar&#41; > 120&#41;&#123; 
							          $komentar = substr&#40;$komentar,0,120&#41;; 
							          $komentar .= "..."; 
							     &#125;
			?>			
			<div class="shoutbox_komentar">
				<div class="komentar">
					<?php echo $komentar; ?> <hr />
					Коментар от&#58; <strong><a href="/korisnik/<?php echo $sb&#91;'user_id'&#93;; ?>"><?php echo $sb&#91;'username'&#93;; ?></a></strong>
				</div>
			</div>	

			<?php &#125;&#125;; ?>
			<div class="sbl"> 
			<?php if&#40;logged_in &#40;&#41; == false&#41; &#123; ?>
			<img src="/img/info.png"> <span style="margin-left&#58;20px;">Моля влезте в профила си за да оставите коментар!</span> 
			<?php &#125; else &#123; ?>

			<?php 

				if&#40;isset&#40;$_POST&#91;'submit'&#93;&#41;&#41; &#123;

					$user_id 	= $_SESSION&#91;'user_id'&#93;;
					$username 	= mysql_result&#40;mysql_query&#40;"SELECT username FROM users WHERE user_id='$user_id'"&#41;,0&#41;;					
					$komentar 	= htmlspecialchars&#40;mysql_real_escape_string&#40;addslashes&#40;$_POST&#91;'sbk'&#93;&#41;&#41;&#41;;

					$ubaci = "INSERT into shoutbox&#40;user_id,username,komentar,server&#41; VALUES&#40;'$user_id','$username','$komentar','$server_id'&#41;";
					$kveri = mysql_query&#40;$ubaci&#41;;

					if&#40;!$ubaci&#41; &#123;

						die&#40;"<script> alert&#40;'Възникна грешка!'&#41;; document.location.href='/server_info/$ip&#58;$port'; </script>"&#41;;

					&#125; else &#123;

						die&#40;"<script> alert&#40;'Вашият коментар е добавен успещно!'&#41;; document.location.href='/server_info/$ip&#58;$port'; </script>"&#41;;
					&#125;

				&#125; // submit

			?>

			<form action="" method="post">
				<textarea type="text" name="sbk" required="required" placeholder="Напишете вашият коментар..."></textarea> <br />
				<input type="submit" name="submit"  class="sbs" value="Коментирай"></input>
			</form>

			<?php &#125;; ?>
			</div>
		</div>	



		<br /><br />
		<div class="title"> Онлайн играчи в сървъра </div> 

		<table class="online_igraci" cellspacing='0'>
			<thead>
				<th>Nick</th>
				<th>Убийства</th>
				<th>Време</th>
			</thead>
			<tbody>
				<?php

					foreach&#40;$info->Players as $online_igraci&#41;&#123;
						
						echo "
							<tr>
								<td>&#123;$online_igraci->Name&#125;</td>
								<td>&#123;$online_igraci->Score&#125;</td>
								<td>&#123;$online_igraci->TimePlayed&#125;</td>
							</tr>";
					&#125;
				?>
			</tbody>
		</table>		

	</div>	



</div>

<!-- POPUP PROZORI &#58;D -->

				<div class="popup" data-popup="izmeni">
				<div class="popup-inner">
					<div class="popup-title"><center> Редактирай сайта <?php echo $server_data&#91;'hostname'&#93;; ?> </center></div>				
					<center>
						<?php 

						

							if&#40;isset&#40;$_POST&#91;'izmeni'&#93;&#41;&#41; &#123;

								$sajt = $_POST&#91;'sajt'&#93;;
								$kveri = mysql_query&#40;"UPDATE servers SET forum='$sajt' WHERE ip='$ip' AND port='$port'"&#41;;
								if&#40;!$kveri&#41; &#123;

									$_SESSION&#91;'error'&#93; = "Грешка!";
									header&#40;"Location&#58;/server_info/$ip&#58;$port"&#41;;
								&#125; else &#123;

									$_SESSION&#91;'ok'&#93; = "Успешно!";
									header&#40;"Location&#58;/server_info/$ip&#58;$port"&#41;;

								&#125;
							&#125;

						?>

						<h3> Инструкции&#58; </h3>
						» В полето по-долу въведете сайта без  <span style="color&#58;#07939F;">http&#58;//</span>! &#40;Пример&#58; <span style="color&#58;#07939F;">www.csservers.biz</span>&#41; <br />
						» Ако нямате сайт на сървъра оставете полето празно!
						<br /><br />
						<form action="" method="POST">
						<input type="text" name="sajt" class="djoxi" placeholder="Линк на сайта..."></input><br /> <br />
						<input type="submit" name="izmeni" class="login_btn" value="Промени"></input>
						
						</form>
					</center>
					<a class="popup-close" data-popup-close="izmeni" href="#">x</a>
					</div>
				</div>	



<br /> <br />

tyrla4eto
Нов
Нов
Posts: 152
Joined: Sat Aug 20, 2011 6:13 pm

Post by tyrla4eto » Fri Oct 28, 2016 10:27 am

Значи ти искаш някой да ти направи скрипта? Опитвал ли си се да направиш нещо? Дай някакъв твой код по който си работил.

User avatar
KyMyHuCT
Нов
Нов
Posts: 97
Joined: Thu Sep 20, 2012 4:01 pm
Location: България
Contact:

Post by KyMyHuCT » Fri Oct 28, 2016 8:52 pm

ми по тези съм работи но нещо не се получват нещата ако искаш намери ме на скайп chabukawe

User avatar
DeathGuard_
Много Редовен
Много Редовен
Posts: 1975
Joined: Sat Sep 27, 2008 9:17 pm
Answers: 207
Location: Наоколо...
Contact:

Post by DeathGuard_ » Sat Oct 29, 2016 8:02 am

Какво пречи по кода, който вече имаш да добавиш полета minecraft, igri в базата данни и в кода да добавиш редове за изтегляне на инфорацията от тези полета в сайта си? Принципът е абсолютно същия, като този, който си използвал в този код. Освен ако не разбираш от php и искаш някой да ти го направи?

Post Reply