Ignore:
Timestamp:
Mar 14, 2009, 9:22:39 PM (16 years ago)
Author:
amun
Message:

Zaheslováno, Waypointy se exportují podle seznamu NPC k exportu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gh_system/export_system/index.php

    r493 r494  
    22include("../conn.php");
    33
     4$heslo = $_GET['heslo'];
     5
     6if(!empty($heslo) AND $heslo!=$admin):
     7$chyba = "<font color=red>Špatné heslo!</font>";
     8$heslo = 0;
     9endif;
     10if(empty($heslo)):
     11if(!empty($chyba)):
     12echo"<p align=center>$chyba<br />";
     13endif;
     14echo"<form method=GET action=''><p align=center>Heslo: <input type=password name=heslo><br /><br />";
     15echo"<input type=submit value='Přihlásit'></form>";
     16
     17else:
    418
    519$q = $_GET['q'];
     
    2842";
    2943
    30 echo"<form method=post action=index.php?q=1&i=gameobject><input type=submit value='Přidat object do seznamu exportovaných'></form>";
    31 echo"<form method=post action=index.php?q=1&i=creature><input type=submit value='Přidat NPC do seznamu exportovaných'></form>";
    32 echo"<form method=post action=index.php?q=1&i=creature_movement><input type=submit value='Přidat Waypoint do seznamu exportovaných'></form>";
     44echo"<form method=post action=index.php?q=1&i=gameobject&heslo=$heslo><input type=submit value='Přidat object do seznamu exportovaných'></form>";
     45echo"<form method=post action=index.php?q=1&i=creature&heslo=$heslo><input type=submit value='Přidat NPC do seznamu exportovaných'></form>";
     46
    3347echo"<br><br>";
    34 echo"<form method=post action=index.php?q=3&i=gameobject><input type=submit value='Zobrazit seznam objectů'></form>";
    35 echo"<form method=post action=index.php?q=3&i=creature><input type=submit value='Zobrazit seznam NPC'></form>";
    36 echo"<form method=post action=index.php?q=3&i=creature_movement><input type=submit value='Zobrazit seznam Waypointu'></form>";
     48echo"<form method=post action=index.php?q=3&i=gameobject&heslo=$heslo><input type=submit value='Zobrazit seznam objectů'></form>";
     49echo"<form method=post action=index.php?q=3&i=creature&heslo=$heslo><input type=submit value='Zobrazit seznam NPC'></form>";
     50
    3751echo"<br><br>";
    38 echo"<form method=post action=index.php?q=2&i=gameobject><input type=submit value='Vytvořit export objectů'></form>";
    39 echo"<form method=post action=index.php?q=2&i=creature><input type=submit value='Vytvořit export NPC'></form>";
    40 echo"<form method=post action=index.php?q=2&i=creature_movement><input type=submit value='Vytvořit export Waypointu'></form>";
     52echo"<form method=post action=index.php?q=2&i=gameobject&heslo=$heslo><input type=submit value='Vytvořit export objectů'></form>";
     53echo"<form method=post action=index.php?q=2&i=creature&heslo=$heslo><input type=submit value='Vytvořit export NPC'></form>";
     54echo"<form method=post action=index.php?q=2&i=creature_movement&heslo=$heslo><input type=submit value='Vytvořit export Waypointu'></form>";
    4155
    4256} elseif($q==1){
     
    4862if(empty($instal)):
    4963////formulář před přidáním
    50 echo"<form method=post action=index.php?q=1&i=$typ>
     64echo"<form method=post action=index.php?q=1&i=$typ&heslo=$heslo>
    5165ID ($typ): <input type=\"text\" name='guid'><br />
    5266<input type=hidden name=instal value=1>
     
    6478       
    6579        if($existuje_guid==0):
    66         echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?err=1\">";
     80        echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?err=1&heslo=$heslo\">";
    6781        else:
    6882        mysql_select_db($Databaze);
     
    7084       
    7185        if($pridat_do_seznamu):
    72         echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?info=1\">";
    73         else:
    74     echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?err=2\">";
     86        echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?info=1&heslo=$heslo\">";
     87        else:
     88    echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?err=2&heslo=$heslo\">";
    7589        endif;
    7690       
     
    95109    mysql_select_db($Databaze);
    96110    mysql_query("SET NAMES 'utf8'");
     111       
     112        if($typ=="creature_movement"):
     113         $vyhledat_guid_exportovanych = mysql_query("select * from export_list where typ='creature'");
     114        else:
    97115         $vyhledat_guid_exportovanych = mysql_query("select * from export_list where typ='$typ'");
     116         endif;
    98117       
    99118        while($row = mysql_fetch_array($vyhledat_guid_exportovanych)){
     
    135154fclose($soubor);
    136155if($hotovo==$x):
    137 echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?info=2\">";
    138 else:
    139 echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?err=3\">";
     156echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?info=2&heslo=$heslo\">";
     157else:
     158echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?err=3&heslo=$heslo\">";
    140159endif;
    141160
    142161} elseif($q==3){
     162//////////////////////////////////////////////////////////Zobrazení seznamu
    143163$typ = $_GET['i'];
    144164$delete = $_POST['delete'];
     
    161181         while($row = mysql_fetch_array($vyhledat_data_v_seznamu)){
    162182         $id = $row['guid'];
    163          echo"<tr><td>$id</td><form method=post action=index.php?q=3&i=$typ><td><input type=hidden name=delete value=1><input type=hidden name=id value='$id'><input type=submit value='Smazat ze seznamu'></form>";
     183         echo"<tr><td>$id</td><form method=post action=index.php?q=3&i=$typ&heslo=$heslo><td><input type=hidden name=delete value=1><input type=hidden name=id value='$id'><input type=submit value='Smazat ze seznamu'></form>";
    164184         
    165185         }
    166186echo"</table><br>
    167187<br>
    168 <a href=index.php><-- Zpět do menu</a>";
     188<a href=index.php?heslo=$heslo><-- Zpět do menu</a>";
    169189elseif($delete==1):
     190//////////////////////////////////////////////////////////Mazání ze seznamu
    170191$id = $_POST['id'];
    171192
     
    175196        $vyhledat_data_v_seznamu = mysql_query("delete from export_list where guid='$id' LIMIT 1");
    176197        if($vyhledat_data_v_seznamu):
    177         echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?q=3&i=$typ&info=3\">";
    178         else:
    179         echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?q=3&i=$typ&err=4\">";
     198        echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?q=3&i=$typ&info=3&heslo=$heslo\">";
     199        else:
     200        echo"<meta http-equiv=\"refresh\" content=\"0.1;url=index.php?q=3&i=$typ&err=4&heslo=$heslo\">";
    180201        endif;
    181202endif;
    182203}
    183204
    184 
    185 
    186 
    187 
    188 
    189 
    190 
    191 
    192 
    193 
    194 
    195 
    196 
    197 
    198 
    199 
    200 
    201 
    202 
    203 
     205endif;
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
Note: See TracChangeset for help on using the changeset viewer.