Sorry, ich brauche leider nochmal eure Hilfe,
Habe einen Gutschein Mod ( Voucher ) eingebaut.
Das Anlegen der Codes mit wie oft nutzbar oder wie lange gültig klappt super.
Wenn ich aber den Code eintrage wird dem Benutzer zwar angezeigt was er für den Code bekommt aber es wird nichts auf Seinen Ressourcen hinzugefügt
die class.ShowGutscheinEinloesePage.php hat folgenden Inhalt :
Display Spoiler
Display All
das ist nur der Code wo es wahrscheinlich drum geht
die passende tpl (ShowGutscheinEinloesePage.tpl ) sieht so aus :
Display Spoiler
Display All
die Error tpl ( ShowGutscheinError.tpl ) hat folgenden Eintrag :
Display Spoiler
Display All
Wie gesagt, es geht sich darum das dem Benutzer auch die Ressourcen gutgeschrieben werden. Alles andere funktioniert damit
Danke für eure Hilfe
Habe einen Gutschein Mod ( Voucher ) eingebaut.
Das Anlegen der Codes mit wie oft nutzbar oder wie lange gültig klappt super.
Wenn ich aber den Code eintrage wird dem Benutzer zwar angezeigt was er für den Code bekommt aber es wird nichts auf Seinen Ressourcen hinzugefügt
die class.ShowGutscheinEinloesePage.php hat folgenden Inhalt :
PHP Source Code
- $GLOBALS['DATABASE']->query("
- UPDATE
- ".DMGut." as dm,
- ".PLANETS." as p,
- ".USERS." as u
- SET
- dm.`useable` = '".$GLOBALS['DATABASE']->sql_escape($Useable)."',
- dm.`usedby` = '".$GLOBALS['DATABASE']->sql_escape($LastUser)."',
- p.`metal` = p.`metal` + ".$Gutschein['metall'].",
- p.`crystal` = p.`crystal` + ".$Gutschein['kristall'].",
- p.`deuterium` = p.`deuterium` + ".$Gutschein['deuterium'].",
- u.`darkmatter` = u.`darkmatter` + ".$Gutschein['matter']."
- WHERE
- dm.`key` = '".$GLOBALS['DATABASE']->sql_escape($gkey)."' AND
- p.`id` = '".$PLANET['id']."' AND
- u.`id` = '".$USER['id']."';");
- // Code by Robbyn - Thanks for this =)
- $mod_gutscheine_success = 1;
die passende tpl (ShowGutscheinEinloesePage.tpl ) sieht so aus :
HTML Source Code
- {block name="content"}
- <table class="table569">
- <center>
- <form action="" method="post">
- <input type="hidden" name="opt_save" value="1">
- <table width="70%" cellpadding="2" cellspacing="2">
- <tr>
- <th colspan="10">{$mod_gutscheine_user_headline}</th>
- <th colspan="1" width="5%"><img src="./styles/images/Adm/i.gif" width="16" height="16" alt="" class="tooltip" name="Gutschein Info"></th>
- </tr><tr>
- <td>{$mod_gutscheine_user_key}
- <td><input name="gutscheine_key" type="text" maxlength="60" style="background:gold;color:black;"></td>
- </tr><tr>
- <td colspan="2"><input value="{$mod_user_refund}" type="submit"></td>
- </tr>
- </table>
- </form>
- </center>
- </table>
- {/block}
die Error tpl ( ShowGutscheinError.tpl ) hat folgenden Eintrag :
HTML Source Code
- {block name="content"}
- <table class="table569">
- <center>
- <form action="" method="post">
- <input type="hidden" name="opt_save" value="1">
- <table width="70%" cellpadding="2" cellspacing="2">
- <tr>
- <th colspan="2">{$mod_gutscheine_user_headline}</th>
- </tr>
- {if $mod_gutscheine_success == 1}
- <tr>
- <th colspan="2">{$mod_gutscheine_user_Successhead}</th>
- </tr><tr>
- <td>{$mod_gutscheine_recieve1}{$mod_gutschein_name}
- <br><b>{$mod_gutscheine_metall}</b> {$mod_metal}
- <br><b>{$mod_gutscheine_crystall}</b> {$mod_crystall}
- <br><b>{$mod_gutscheine_deuterium}</b> {$mod_deuterium}
- <br><b>{$mod_gutscheine_matter}</b> {$mod_darkmatter} {$mod_gutscheine_recieve2}</td>
- </tr>
- {/if}
- <tr>
- {if $mod_gutscheine_success == 0}
- <td>{$mod_gutscheine_user_Fail}</td>
- </tr>{if $mod_gutscheine_errorcode == 1}<tr>
- <td>{$mod_gutscheine_user_Fail1}</td>
- </tr>{/if}{if $mod_gutscheine_errorcode == 2}<tr>
- <td>{$mod_gutscheine_user_Fail2}</td>
- </tr>{/if}{if $mod_gutscheine_errorcode == 3}<tr>
- <td>{$mod_gutscheine_user_Fail3}</td>
- </tr>{/if}{if $mod_gutscheine_errorcode == 4}<tr>
- <td>{$mod_gutscheine_user_Fail4}</td>
- </tr>{/if}{if $mod_gutscheine_errorcode == 5}<tr>
- <td>{$mod_gutscheine_user_Fail5}</td>
- </tr>{/if}<tr>
- {/if}
- <td colspan="2"><a href="javascript:history.back()">{$mod_gutscheine_user_back}</a></td>
- </tr>
- </table>
- </form>
- </center>
- </table>
- {/block}
Wie gesagt, es geht sich darum das dem Benutzer auch die Ressourcen gutgeschrieben werden. Alles andere funktioniert damit
Danke für eure Hilfe