Unmantained Guida [Script PHP]Uppa ip gm

Una guida contrassegnata come Unmantained contiene informazioni su un argomento obsoleto, non più utile o files non aggiornati da parte del creatore.
Stato
Discussione chiusa ad ulteriori risposte.

NikoAsBari

Utente Gold
22 Novembre 2009
1,013
51
62
311
Ultima modifica da un moderatore:
questo script serve per uppare l'ip a un gm

nome file : update.php
script:

PHP:
<?php
$action=@$_POST["action"];
switch ($action){
case "send":
send();
break;
default:
change();
break;
}
function change(){
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Crediti NikoAsBari</title>
<link rel="stylesheet" href="css/index.css">
<link href="images/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
</style>
</head>

<body>



<table background=images/middle.gif border=0 cellpadding=0 cellspacing=0 width=466 align="center">
<tbody> 
<tr> 
<td width="466" height="200" align=middle valign=top> 
<form method=post name=chgform action="update.php">
<input type="hidden" name="action" value="send" />
<table border=0 cellpadding=0 cellspacing=0 width=466>
<tbody> 
<tr> 
<td width="466"><br>
<b><font size="3">¡¡</font><span class="style1">Update Tool</span></b> <span class="style1"><font 
color=#cc3300><font color="#0033FF">- Utilizzo riservato allo Staff</font></font><font 
color=#cc3300></font></span></td>
</tr>
<tr>
<td height=1><img height=1 src="" width=300></td>
</tr>
<tr> 
<td align=right>¡¡ 
<div align="left"></div>
<table align=center border=0 cellpadding=5 cellspacing=1 width="425">
<tbody> 
<tr> 
<td align=right class=txt_gray colspan=2> 
div align=left><font 
color=#cc3300>Compilare i seguenti campi </font></div>
</td>
</tr>
<tr align="left" valign="middle"> 
<td class=txt_gray width="184" height="32"> 
<div align=left>NickName PG</div>
</td>
<td class=txt_gray width="218" height="32"> 
<input maxlength=16 name=UserID size=17>
<div align=center></div>
</td>
</tr>
<tr align="left" valign="middle">
<td class=txt_gray width="184">Password Tool</td>
<td class=txt_gray width="218"> 
<input maxlength=7 name=srcno size=7>
</td>
</tr>
<tr align="left" valign="middle"> 
<td class=txt_gray width="184">Inidirizzo IP</td>
<td class=txt_gray width="218"> 
<input maxlength=30 name=password1 size=20>
</td>
</tr>
<tr align="left" valign="middle"> 
<td class=txt_gray width="184"></td>
<td class=txt_gray width="218"> 
                          
</td>
</tr>
<tr align="left" valign="middle"> 
<td class=txt_gray width="184"></td>
<td class=txt_gray width="218"> 
</td>
</tr>                      
</tbody> 
</table>
<div align="left"></div>                  </td>
</tr>
<tr> 
<td height=2><img height=1 src="" 
width=466></td>
</tr>
</tbody> 
</table>
<div align="center"><br>
<a 
href="javascript:document.chgform.submit()"><img border=0 src="bt_confirm.gif" width="79" height="32"></a> 
<br>
<br>
</div>
</form>          </td>
</tr>
</tbody> 
</table>
<div align="left"></div>
</body>

</html>
<?php
}
function send(){
$srcno=$_POST["srcno"];
if ($srcno != "PASS")
{echo "Password Tool Errata.<a href=\"javascript:history.back();\">Torna Inidietro!</a>";exit;
}else{
$UserID=$_POST["UserID"];
$password1=$_POST["password1"];
    require_once("conn.php");
    mysql_select_db("common");
    $exec="update gmlist set mContactIP='$password1' where mName='$UserID'";
    $result=mysql_query($exec);
        echo "Update Riuscito con Successo.";exit;
    }
}

per configurarlo

PHP:
if ($srcno != "PASS")

la pass serve per non far usare lo script ai nabbetti è.é

Dovete creare un immagine bt_confirm.gif che sara il bottone di conferma e dovete avere lo script conn.php tutto nella stessa cartella...per usarlo andate qui e vedrete il vostro ip e lo mettete nella barra "indirizzo ip"....
 
eccolo sistemato e messi i TUOI crediti.
il form in html da rinominare in ip.html
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />


    <title>Aggiorna IP GM - Tool By NikoAsBari</title>
</head>

<body>
<center>
<form action="update.php" method="POST">
<font face="calibri" size="2">Nome GM</font></br>
<input type="text" name="UserID"/>
<br />
<font face="calibri" size="2">IP</font></br>
<input type="text" name="ip"/>
<br />

<font face="calibri" size="2">Password Tool</font></br>
<input type="text" name="pass"/><br />
<input type="submit" value="Aggiorna IP"/>
<br />
</form>

</center>


</body>
</html>
e lo script in php da rinominare in update.php
PHP:
<?php
include("conn.php");
mysql_select_db("common");
$UserID=$_POST["UserID"];
$ip=$_POST["ip"];
$pass=$_POST['pass'];

if ($pass==password) {
    $exec="update gmlist set mContactIP='$ip' where mName='$UserID'";
    echo"
    <font face=calibri size=3>Ip del GM $UserID è stato aggiornato con successo</font>
    ";
    } else {
echo"Errore Password Tool";
}

?>
non l'ho testato puoi farlo tu per favore?

--- Aggiornamento Post ---

sistemato errore nell'html
 
eccolo sistemato e messi i TUOI crediti.
il form in html da rinominare in ip.html
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />


    <title>Aggiorna IP GM - Tool By NikoAsBari</title>
</head>

<body>
<center>
<form action="update.php" method="POST">
<font face="calibri" size="2">Nome GM</font></br>
<input type="text" name="UserID"/>
<br />
<font face="calibri" size="2">IP</font></br>
<input type="text" name="ip"/>
<br />

<font face="calibri" size="2">Password Tool</font></br>
<input type="text" name="pass"/><br />
<input type="submit" value="Aggiorna IP"/>
<br />
</form>

</center>


</body>
</html>
e lo script in php da rinominare in update.php
PHP:
<?php
include("conn.php");
mysql_select_db("common");
$UserID=$_POST["UserID"];
$ip=$_POST["ip"];
$pass=$_POST['pass'];

if ($pass==password) {
    $exec="update gmlist set mContactIP='$ip' where mName='$UserID'";
    echo"
    <font face=calibri size=3>Ip del GM $UserID è stato aggiornato con successo</font>
    ";
    } else {
echo"Errore Password Tool";
}

?>
non l'ho testato puoi farlo tu per favore?

non posso testarlo al momento non sto in nessun server..comunque i crediti vanno anche a te...vediamo se qualcuno lo prova e se va edito quelli di prima mettendoci anche i tuoi crediti <.<
 
Quello che uso io è piu avanzato (sistema di log e sfrutta sia gmlist che gmhost,inoltre rileva l'ip automaticamente)
 
No non fa reload a da solo ò_O poi sarebbe impossibile la modifica non si terrebbe da li....
 
Non fa il reload ma almeno ti modifica l'ip nel db .. e , invece di entrare nel DataBase ogni volta che cambia un IP , semplicemente devi fare un "reload" ... io lo trovo utilissimo :D
 
Non fa il reload ma almeno ti modifica l'ip nel db .. e , invece di entrare nel DataBase ogni volta che cambia un IP , semplicemente devi fare un "reload" ... io lo trovo utilissimo :D

No lui mi ha chiesto se il mio fa reload a e io ho detto che non lo fa xD però è identico al mio diciamo ò_O
 
Stato
Discussione chiusa ad ulteriori risposte.