Mein Skript dreht durch! Brauche Dringen hilfe (PHP)
lima-city → Forum → Programmiersprachen → PHP, MySQL & .htaccess
abc
abstammung
adlig
akademische ausbildung
alpha
aura
balance
baron
begabung
buchstabe
edle
erben
regeneration
resistenz
schreiten
sinnen
skript
steiger
vorteil
wolfskind
-
Morgen...
das ist mein skript:
[PHP]include ("$url/dats_gen/vorteile.dat");
for($x=0;$x<2;$x++)
{
echo "<tr><td><select name='vor_$x'>";
$alpha = "A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z";
$buchstabe = explode("|",$alpha);
for($a=0;$a<26;$a++)
{
for($b=0;$b<26;$b++)
{
for($c=0;$c<26;$c++)
{
$erstes = $buchstabe[$a];
$zweites = $buchstabe[$b];
$drittes = $buchstabe[$c];
$abc = "V_$erstes$zweites$drittes";
if(isset($name[$abc]) && !isset($ausgegeben[$abc]))
{
$ausgegeben[$abc] = '1';
if(!isset($schritt[$abc])) $schritt[$abc] = '---';
echo "<option value='$abc'>$name[$abc]</option>
";
}
for($d=0;$d<26;$d++)
{
$erstes = $buchstabe[$a];
$zweites = $buchstabe[$b];
$drittes = $buchstabe[$c];
$viertes = $buchstabe[$d];
$abc = "V_$erstes$zweites$drittes$viertes";
if(isset($name[$abc]) && !isset($ausgegeben[$abc]))
{
$ausgegeben[$abc] = '1';
if(!isset($schritt[$abc])) $schritt[$abc] = '---';
echo "<option value='$abc'>$name[$abc]</option>
";
}
}
}
}
}
echo "</select></td><td><input type='text' name='wert_vor_$x' size='30' maxlength='255'></td></tr>";
unset($ausgegeben);
}[/PHP]
Der Inhalt der Vorteile.dat ist folgender:
[PHP]<!-- vorteile.dat -->
<?
error_reporting(~E_ALL);
# Die Namen der Vorteile
$name[V_ADB] = "Adlige Abstammung (Baron)";
$name[V_ADE] = "Adlige Abstammung (Edler)";
$name[V_ADG] = "Adlige Abstammung (Graf)";
$name[V_AEB] = "Adliges Erbe (Baron)";
$name[V_AEE] = "Adliges Erbe (Edler)";
$name[V_AFF] = "Affinit?t";
$name[V_AAG] = "Akademische Ausbildung (Gelehrter)";
$name[V_AAK] = "Akademische Ausbildung (Krieger)";
$name[V_AAM] = "Akademische Ausbildung (Magier)";
$name[V_ALT] = "Alteresresistenz";
$name[V_AR1] = "Astrale Regeneration I";
$name[V_AR2] = "Astrale Regeneration II";
$name[V_AR3] = "Astrale Regeneration III";
$name[V_ARV] = "Ausr?stungsvorteil";
$name[V_ASM] = "Astralmacht";
$name[V_AUS] = "Ausdauernd";
$name[V_AUZ] = "Ausdauernder Zauberer";
$name[V_BAL] = "Balance";
$name[V_BEI] = "Beidh?ndig";
$name[V_BES] = "Besonderer Besitz";
$name[V_BGB] = "Breitgef?cherte Bildung";
$name[V_BME] = "Begabung f?r Merkmal [...]";
$name[V_BTA] = "Begabung f?r Talent [...]";
$name[V_BRI] = "Begabung f?r Riutal [...]";
$name[V_BTG] = "Begabung f?r Talentgruppe [...]";
$name[V_BZA] = "Begabung f?r Zauber [...]";
$name[V_DAM] = "D?mmerungssicht";
$name[V_EIA] = "Eisenaffine Aura";
$name[V_EID] = "Eidetisches Ged?chtnis";
$name[V_EIG] = "Eigeboren";
$name[V_EIS] = "Eisern";
$name[V_ENT] = "Entfernungssinn";
$name[V_FEE] = "Feenfreund";
$name[V_FEM] = "Feste Matrix";
$name[V_FRV] = "Fr?her Vertrauter";
$name[V_GEA] = "Geweiht [Angrosch]";
$name[V_GEB] = "Gebildet";
$name[V_GEF] = "Gefahreninstinkt";
$name[V_GEG] = "Geweiht [Gravesh]";
$name[V_GEH] = "Geweiht [H'Ranga]";
$name[V_GEN] = "Geweiht [nicht-alveranische Gottheit]";
$name[V_GEZ] = "Geweiht [zw?lfg?ttliche Kriche]";
$name[V_GHX] = "Ger?uschhexerei";
$name[V_GLS] = "Gl?ck im Spiel";
$name[V_GLU] = "Gl?ck";
$name[V_GUA] = "Gut aussehend";
$name[V_GUG] = "Gutes Ged?chtnis";
$name[V_HAU] = "Herausragendes Aussehen";
$name[V_HBA] = "Herausragende Balance";
$name[V_HEI] = "Herausragende Eigenschaft";
$name[V_HIT] = "Hitzeresistenz";
$name[V_HLE] = "Hohe Lebenskraft";
$name[V_HLZ] = "Halbzauberer";
$name[V_HMR] = "Hohe Magieresistenz";
$name[V_HSG] = "Herausragender Sinn (Geruchssinn)";
$name[V_HSH] = "Herausragender Sinn (Geh?r)";
$name[V_HSS] = "Herausragender Sinn (Sicht)";
$name[V_HST] = "Herausragender Sinn (Tastsinn)";
$name[V_HSX] = "Herausragender sechster Sinn";
$name[V_IEG] = "Immunit?t gegen einzelnes Gift [...]";
$name[V_IMG] = "Immunit?t gegen Giftart [...]";
$name[V_INK] = "Innerer Kompass";
$name[V_KAL] = "K?lteresistenz";
$name[V_KAM] = "Kampfrausch";
$name[V_KOB] = "Koboldfreund";
$name[V_LINK] = "Linksh?nder";
$name[V_MAV] = "Machtvoller Vertrauter";
$name[V_MGE] = "Magiegesp?r";
$name[V_MHA] = "Meisterhandwerk";
$name[V_NAC] = "Nachtsicht";
$name[V_NRS] = "Nat?rlicher R?stungsschutz";
$name[V_NSE] = "Niedrige schlechte Eigenschaft";
$name[V_ORT] = "Ortskenntnis [...]";
$name[V_PRO] = "Prophezeien";
$name[V_REG] = "Resistenz gegen Gifte [...]";
$name[V_REK] = "Resistenz gegen Krankheiten";
$name[V_RIC] = "Richtungssinn";
$name[V_SCH] = "Schlangenmensch";
$name[V_SHE] = "Schnelle Heilung";
$name[V_SHG] = "Schutzgeist";
$name[V_SOZ] = "Soziale Anpassungsf?higkeit";
$name[V_SPR] = "Sprachgef?hl";
$name[V_SZV] = "Schwer zu verzaubern";
$name[V_TAC] = "Titularadel (Cavalliere)";
$name[V_TAE] = "Titularadel (Esquirio)";
$name[V_TIE] = "Tierfreund";
$name[V_UBE] = "?bernt?rliche Begabung";
$name[V_UNZ] = "Unbeschwertes Zaubern";
$name[V_VER] = "Verbindungen [...]";
$name[V_VET] = "Veteran";
$name[V_VHA] = "Verh?llte Aura";
$name[V_VIZ] = "Viertelzauberer";
$name[V_VOZ] = "Vollzauberer";
$name[V_VSB] = "Vom Schicksal beg?nstigt";
$name[V_WDN] = "Wesen der Nacht";
$name[V_WOH] = "Wohlklang";
$name[V_WOK] = "Wolfskind";
$name[V_ZAH] = "Z?her Hund";
$name[V_ZEI] = "Zeitgef?hl";
$name[V_ZHA] = "Zauberhaar";
$name[V_ZSG] = "Zweistimmiger Gesang";
$name[V_ZWE] = "Zwergennase";
#Die Kosten der Vorteile, um sie zu aktivieren
$gp[V_AAG] = "10";
$gp[V_AAK] = "10";
$gp[V_AAM] = "15";
$gp[V_ADB] = "7";
$gp[V_ADE] = "7";
$gp[V_ADG] = "7";
$gp[V_AEB] = "10";
$gp[V_AEE] = "10";
$gp[V_AFF] = "5";
$gp[V_ALT] = "3";
$gp[V_AR1] = "4";
$gp[V_AR2] = "8";
$gp[V_AR3] = "10";
$gp[V_ARV] = "1";
$gp[V_ASM] = "2";
$gp[V_AUS] = "1";
$gp[V_AUZ] = "5";
$gp[V_BAL] = "10";
$gp[V_BEI] = "12";
$gp[V_BES] = "7";
$gp[V_BGB] = "x";
$gp[V_BME] = "x";
$gp[V_BRI] = "x";
$gp[V_BTA] = "x";
$gp[V_BTG] = "x";
$gp[V_BZA] = "x";
$gp[V_DAM] = "10";
$gp[V_EIA] = "7";
$gp[V_EID] = "35";
$gp[V_EIG] = "25";
$gp[V_EIS] = "7";
$gp[V_ENT] = "10";
$gp[V_FEE] = "7";
$gp[V_FEM] = "5";
$gp[V_FRV] = "x";
$gp[V_GEA] = "16";
$gp[V_GEB] = "1";
$gp[V_GEF] = "15";
$gp[V_GEG] = "16";
$gp[V_GEH] = "16";
$gp[V_GEN] = "12";
$gp[V_GEZ] = "17";
$gp[V_GHX] = "3";
$gp[V_GLS] = "7";
$gp[V_GLU] = "20";
$gp[V_GUA] = "5";
$gp[V_GUG] = "12";
$gp[V_HAU] = "12";
$gp[V_HBA] = "20";
$gp[V_HEI] = "x";
$gp[V_HIT] = "5";
$gp[V_HLE] = "3";
$gp[V_HLZ] = "10";
$gp[V_HMR] = "3";
$gp[V_HSG] = "5";
$gp[V_HSH] = "5";
$gp[V_HSS] = "5";
$gp[V_HST] = "5";
$gp[V_HSX] = "7";
$gp[V_IEG] = "5";
$gp[V_IMG] = "10";
$gp[V_INK] = "7";
$gp[V_KAL] = "5";
$gp[V_KAM] = "15";
$gp[V_KOB] = "15";
$gp[V_LINK] = "5";
$gp[V_MAV] = "5";
$gp[V_MGE] = "12";
$gp[V_MHA] = "1";
$gp[V_NAC] = "20";
$gp[V_NRS] = "x";
$gp[V_NSE] = "x";
$gp[V_ORT] = "3";
$gp[V_PRO] = "12";
$gp[V_REG] = "7";
$gp[V_REK] = "7";
$gp[V_RIC] = "3";
$gp[V_SCH] = "25";
$gp[V_SHE] = "10";
$gp[V_SHG] = "3";
$gp[V_SOZ] = "7";
$gp[V_SPR] = "10";
$gp[V_SZV] = "7";
$gp[V_TAC] = "7";
$gp[V_TAE] = "7";
$gp[V_TIE] = "7";
$gp[V_UBE] = "1";
$gp[V_UNZ] = "7";
$gp[V_VER] = "1";
$gp[V_VET] = "x";
$gp[V_VHA] = "3";
$gp[V_VIZ] = "5";
$gp[V_VOZ] = "20";
$gp[V_VSB] = "12";
$gp[V_WDN] = "2";
$gp[V_WOH] = "10";
$gp[V_WOK] = "x";
$gp[V_ZAH] = "10";
$gp[V_ZEI] = "3";
$gp[V_ZHA] = "10";
$gp[V_ZSG] = "10";
$gp[V_ZWE] = "12";
# Auf welche Stufe lassen sich die Vorteile steigern? (x => gar nicht)
#$schritt == wieviel kostet es pro Schritt, das Vorteil zu steigern?
$maximum[V_AAG] = "x";
$maximum[V_AAK] = "x";
$maximum[V_AAM] = "x";
$maximum[V_ADB] = "x";
$maximum[V_ADE] = "x";
$maximum[V_ADG] = "x";
$maximum[V_AEB] = "x";
$maximum[V_AEE] = "x";
$maximum[V_AFF] = "x";
$maximum[V_ALT] = "x";
$maximum[V_AR1] = "x";
$maximum[V_AR2] = "x";
$maximum[V_AR3] = "x";
$maximum[V_ARV] = "15";
$schritt[V_ARV] = "12";
$maximum[V_ASM] = "5";
$schritt[V_ASV] = "2";
$maximum[V_AUS] = "5";
$schritt[V_AUS] = "1";
$maximum[V_AUZ] = "x";
$maximum[V_BAL] = "x";
$maximum[V_BEI] = "x";
$maximum[V_BES] = "x";
$maximum[V_BGB] = "x";
$maximum[V_BME] = "x";
$maximum[V_BRI] = "x";
$maximum[V_BTA] = "x";
$maximum[V_BTG] = "x";
$maximum[V_BZA] = "x";
$maximum[V_DAM] = "x";
$maximum[V_EIA] = "x";
$maximum[V_EID] = "x";
$maximum[V_EIG] = "x";
$maximum[V_EIS] = "x";
$maximum[V_ENT] = "x";
$maximum[V_FEE] = "x";
$maximum[V_FEM] = "x";
$maximum[V_FRV] = "x";
$maximum[V_GEA] = "x";
$maximum[V_GEB] = "5";
$schritt[V_GEB] = "1";
$maximum[V_GEF] = "21";
$maximum[V_GEG] = "x";
$maximum[V_GEH] = "x";
$maximum[V_GEN] = "x";
$maximum[V_GEZ] = "x";
$maximum[V_GHX] = "21";
$maximum[V_GLS] = "x";
$maximum[V_GLU] = "x";
$maximum[V_GUA] = "x";
$maximum[V_GUG] = "x";
$maximum[V_HAU] = "x";
$maximum[V_HBA] = "x";
$maximum[V_HEI] = "10";
$maximum[V_HIT] = "x";
$maximum[V_HLE] = "5";
$maximum[V_HLZ] = "x";
$maximum[V_HMR] = "3";
$maximum[V_HSG] = "x";
$maximum[V_HSH] = "x";
$maximum[V_HSS] = "x";
$maximum[V_HST] = "x";
$maximum[V_HSX] = "x";
$maximum[V_IEG] = "x";
$maximum[V_IMG] = "x";
$maximum[V_INK] = "x";
$maximum[V_KAL] = "x";
$maximum[V_KAM] = "x";
$maximum[V_KOB] = "x";
$maximum[V_LINK] = "x";
$maximum[V_MAV] = "x";
$maximum[V_MGE] = "21";
$maximum[V_MHA] = "x";
$maximum[V_NAC] = "x";
$maximum[V_NRS] = "3";
$maximum[V_NSE] = "x";
$maximum[V_ORT] = "x";
$maximum[V_PRO] = "21";
$maximum[V_REG] = "x";
$maximum[V_REK] = "x";
$maximum[V_RIC] = "x";
$maximum[V_SCH] = "x";
$maximum[V_SHE] = "x";
$maximum[V_SHG] = "x";
$maximum[V_SOZ] = "x";
$maximum[V_SPR] = "x";
$maximum[V_SZV] = "x";
$maximum[V_TAC] = "x";
$maximum[V_TAE] = "x";
$maximum[V_TIE] = "x";
$maximum[V_UBE] = "x";
$maximum[V_UNZ] = "x";
$maximum[V_VER] = "15";
$maximum[V_VET] = "x";
$maximum[V_VHA] = "x";
$maximum[V_VIZ] = "x";
$maximum[V_VOZ] = "x";
$maximum[V_VSB] = "x";
$maximum[V_WDN] = "3";
$maximum[V_WOH] = "x";
$maximum[V_WOK] = "15/5";
$maximum[V_ZAH] = "x";
$maximum[V_ZEI] = "x";
$maximum[V_ZHA] = "x";
$maximum[V_ZSG] = "x";
$maximum[V_ZWE] = "21";
#Die Steigerungen der jeweiligen Vorteile
$naechste_stufe[V_AAG] = "";
$naechste_stufe[V_AAK] = "";
$naechste_stufe[V_AAM] = "";
$naechste_stufe[V_ADB] = " | <a href='gen_functions.php?function=erweitern_vors&kurz=V_AEB&kurz_old=V_ADB'>erweitern</a>";
$naechste_stufe[V_ADE] = " | <a href='gen_functions.php?function=erweitern_vors&kurz=V_AEE&kurz_old=V_ADE'>erweitern</a>";
$naechste_stufe[V_ADG] = "";
$naechste_stufe[V_AEB] = "";
$naechste_stufe[V_AEE] = "";
$naechste_stufe[V_AFF] = "";
$naechste_stufe[V_ALT] = "";
$naechste_stufe[V_AR1] = " | <a href='gen_functions.php?function=erweitern_vors&kurz=V_AR2&kurz_old=V_AR1'>erweitern</a>";
$naechste_stufe[V_AR2] = " | <a href='gen_functions.php?function=erweitern_vors&kurz=V_AR3&kurz_old=V_AR2'>erweitern</a>";
$naechste_stufe[V_AR3] = "";
$naechste_stufe[V_ARV] = " | <a href='gen_functions.php`function=steigern_vors&kurz=V_ARV'>+</a>";
$naechste_stufe[V_ASM] = "";
$naechste_stufe[V_AUS] = " | <a href='gen_functions.php?function=steigern_vors&kurz=V_AUS'>+</a>";
$naechste_stufe[V_AUZ] = "";
$naechste_stufe[V_BAL] = " | <a href='gen_functions.php?function=erweitern_vors&kurz=V_HBA&kurz_old=V_BAL'>erweitern</a>";
$naechste_stufe[V_BEI] = "";
$naechste_stufe[V_BES] = "";
$naechste_stufe[V_BGB] = "";
$naechste_stufe[V_BME] = "";
$naechste_stufe[V_BRI] = "";
$naechste_stufe[V_BTA] = "";
$naechste_stufe[V_BTG] = "";
$naechste_stufe[V_BZA] = "";
$naechste_stufe[V_DAM] = "";
$naechste_stufe[V_EIA] = "";
$naechste_stufe[V_EID] = "";
$naechste_stufe[V_EIG] = "";
$naechste_stufe[V_EIS] = "";
$naechste_stufe[V_ENT] = "";
$naechste_stufe[V_FEE] = "";
$naechste_stufe[V_FEM] = "";
$naechste_stufe[V_FRV] = "";
$naechste_stufe[V_GEB] = "";
$naechste_stufe[V_GEF] = "";
$naechste_stufe[V_GHX] = "";
$naechste_stufe[V_GLS] = "";
$naechste_stufe[V_GLU] = "";
$naechste_stufe[V_GUA] = " | <a href='gen_functions.php?function=erweitern&kurz=V_HAU&kurz_old=V_GUA'>erweitern";
$naechste_stufe[V_GUG] = " | <a href='gen_functions.php?function=erweitern&kurz=V_EID&kurz_old=V_GUG'>erweitern";
$naechste_stufe[V_HAU] = "";
$naechste_stufe[V_HBA] = "";
$naechste_stufe[V_HEI] = "";
$naechste_stufe[V_HIT] = "";
$naechste_stufe[V_HLE] = "";
$naechste_stufe[V_HLZ] = "";
$naechste_stufe[V_HMR] = "";
$naechste_stufe[V_HSG] = "";
$naechste_stufe[V_HSH] = "";
$naechste_stufe[V_HSS] = "";
$naechste_stufe[V_HST] = "";
$naechste_stufe[V_HSX] = "";
$naechste_stufe[V_IEG] = "";
$naechste_stufe[V_IMG] = "";
$naechste_stufe[V_INK] = "";
$naechste_stufe[V_KAL] = "";
$naechste_stufe[V_KAM] = "";
$naechste_stufe[V_KOB] = "";
$naechste_stufe[V_LINK] = "";
$naechste_stufe[V_MAV] = "";
$naechste_stufe[V_MGE] = "";
$naechste_stufe[V_MHA] = "";
$naechste_stufe[V_NAC] = "";
$naechste_stufe[V_NRS] = "";
$naechste_stufe[V_NSE] = "";
$naechste_stufe[V_ORT] = "";
$naechste_stufe[V_PRO] = "";
$naechste_stufe[V_REG] = " | <a href='gen_functions.php?function=erweitern&kurz=V_IMG&kurz_old=V_REG'>erweitern";
$naechste_stufe[V_REK] = "";
$naechste_stufe[V_RIC] = "";
$naechste_stufe[V_SCH] = "";
$naechste_stufe[V_SHE] = "";
$naechste_stufe[V_SHG] = "";
$naechste_stufe[V_SOZ] = "";
$naechste_stufe[V_SPR] = "";
$naechste_stufe[V_SZV] = "";
$naechste_stufe[V_TAC] = "";
$naechste_stufe[V_TAE] = "";
$naechste_stufe[V_TIE] = "";
$naechste_stufe[V_UBE] = "";
$naechste_stufe[V_UNZ] = "";
$naechste_stufe[V_VER] = "";
$naechste_stufe[V_VET] = "";
$naechste_stufe[V_VHA] = "";
$naechste_stufe[V_VIZ] = "";
$naechste_stufe[V_VOZ] = "";
$naechste_stufe[V_VSB] = "";
$naechste_stufe[V_WDN] = "";
$naechste_stufe[V_WOH] = "";
$naechste_stufe[V_WOK] = "";
$naechste_stufe[V_ZAH] = "";
$naechste_stufe[V_ZEI] = "";
$naechste_stufe[V_ZHA] = "";
$naechste_stufe[V_ZSG] = "";
$naechste_stufe[V_ZWE] = "";
error_reporting(E_ALL &~'E_NOTICES');
?>[/PHP]
Wenn ich das Skript oben ausf?hre, gibt er mir ein SELECT-Men? mit allen Kombinationsm?glichkeiten der Buchstaben als Wert und Z als Name des Wertes aus...
Wei? einer, warum? Wei? einer, wie man das beheben kann?
Gru?
nae'blis -
Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!
lima-city: Gratis werbefreier Webspace für deine eigene Homepage