1. #1

    Registriert seit
    09.01.2012
    Beiträge
    29
    Thanked 1 Time in 1 Post

    Standard [Suche] Fight Us Script

    Heyho.

    Ich suche für unsere Clan Homepage ein Fight Us Script.

    Was enthalten sein soll:



    • Clan Name [TextFeld]
    • ClanTag [TextFeld]
    • Clan Homepage [TextFeld]
    • Game (1. Option -> Modern Warfare 2 | 2. Option -> Modern Warfare 3)
    • Maps [TextFeld]
    • How many maps? (1. Option -> 2 | 2. Option -> 4)
    • Gamemode (1. Option -> HQ | 2. Option -> Search and Destroy)
    • Sniper Only? (1. Option -> Yes | 2. Option -> No)
    • Players (1. Option -> 3vs3 | 2. Option -> 4vs4 | 3. Option -> 5vs5 | 4. Option -> 6vs6)
    • Skype Contact [TextFeld]


    Die Daten sollten dann an eine bestimme E-mail mit dem Betreff "Clanwar Request" gesendet werden.
    Würde mich sehr freuen, wenn das einer hinbekommen würde. Brauche es wirklich dringend und hab nicht wirklich etwas im Internet gefunden.

    MfG.

  2. #2
    Avatar von Comu
    Registriert seit
    18.11.2011
    Beiträge
    772
    Thanked 753 Times in 363 Posts

    Standard [Suche] Fight Us Script

    PHP-Code:
    <?php


    // * * * * * * * * * * * * * * * * *
    // Trage hier deine E-Mail ein!

          
    $mail 'deine@email.de';
      
    // Trage hier deine E-Mail ein!
    // * * * * * * * * * * * * * * * * *

    ?>

    <html>

    <head>

      <title> Fight Us! </title>
      
    </head>

    <body>

      <form action="#" method="post">
      
        <table>
        <tr>
          <td> Clan Name </td>
          <td> <input type="text" name="clanname" maxlength="35" /> </td>
        </tr>
        <tr>
          <td> Clan Tag </td>
          <td> <input type="text" name="clantag" maxlength="7" /> </td>
        </tr>
        <tr>
          <td> Clan Homepage </td>
          <td> <input type="text" name="clanhomepage" /> </td>
        </tr>
        <tr>
          <td> Game </td>
          <td> <select name="game">
                 <option> Modern Warfare 2 </option>
                 <option> Modern Warfare 3 </option>
               </select>
          </td>
        </tr>
        <tr>
          <td> Maps </td>
          <td> <input type="text" name="maps" maxlength="150" /> </td>
        </tr>
        <tr>
          <td> How many maps? </td>
          <td> <select name="howmany">
                <option> 2 </option>
                <option> 4 </option>
               </select>
          </td>
        </tr>
        <tr>
          <td> Gamemode </td>
          <td> <select name="mode">
                <option> HQ </option>
                <option> Search and Destroy </option>
          </td>
        </tr>
        <tr>
          <td> Sniper Only? </td>
          <td> <select name="sniperonly">
                 <option> Yes </option>
                 <option> No </option>
               </select>
          </td>
        </tr>
        <tr>
          <td> Players </td>
          <td> <select name="players">
                <option> 3vs3 </option>
                <option> 4vs4 </option>
                <option> 5vs5 </option>
                <option> 6vs6 </option>
               </select>
           </td>
          </tr>
          <tr>
            <td> Skype Contact </td>
            <td> <input type="text" name="skype" maxlength="30" /> </td>
          </tr>
          <tr>
            <td> &nbsp; </td>
            <td> <input type="submit" name="submit" value="Request!" />
          </tr>
          </table>

      </form>
      
      <?php
      
        
    if(isset($_POST['submit']))
        {
        
          if(empty(
    $_POST['clanname']) OR
             empty(
    $_POST['clantag']) OR
             empty(
    $_POST['clanhomepage']) OR
             empty(
    $_POST['maps']) OR
             empty(
    $_POST['skype']))
          {
            echo 
    '<h3 style="color:red;"> Error: Please fill out all fields! </h3>';
          }
          else
          {
          
          
    $content 'Clanwar Request
                      ========================================
                      
                      Clan Name: '
    .$_POST['clanname'].'
                      
                      Clan Tag: '
    .$_POST['clantag'].'
                      
                      Clan Homepage: '
    .$_POST['clanhomepage'].'
                      
                      Game: '
    .$_POST['game'].'
                      
                      Maps: '
    .$_POST['maps'].'
                      
                      How many maps: '
    .$_POST['howmany'].'
                      
                      Gamemode: '
    .$_POST['mode'].'
                      
                      Sniper Only: '
    .$_POST['sniperonly'].'
                      
                      Players: '
    .$_POST['players'].'
                      
                      Skype Contact: '
    .$_POST['skype'].'
                      
                      =======================================
                      (c) by c0mu@live.de'
    ;
                      
              if(
    mail($mail'Clanwar Request'$content"From: fightus@clanscript.com"))
              {
                echo 
    '<h3 style="color:green;"> Your request was sent successfully! </h3>';
              }
              else
              {
                echo 
    '<h3 style="color:red;"> There was an error sending the request. Please contact the administrator! </h3>';
              }
              
          }
          
             
        }
        
      
    ?>
      
      <a href="mailto:c0mu@live.de"> &copy; by c0mu@live.de </a>

    </body>

    </html>
    Als .php abspeichern und die E-Mail oben abändern. Wurde getestet und funktioniert^^

  3. #3

    Registriert seit
    09.01.2012
    Beiträge
    29
    Thanked 1 Time in 1 Post

    Standard [Suche] Fight Us Script

    Danke, funktionert super!

  4. #4
    Avatar von Diebspiel
    Registriert seit
    18.11.2011
    Beiträge
    311
    Thanked 191 Times in 102 Posts

    Standard [Suche] Fight Us Script

    Du solltest die maximale Länge auch serverseitig prüfen, ansonsten kann man das leicht umgehen und einen Flooder etc. bauen, außerdem wäre natürlich ein Captcha gut.

    Grüße

  5. #5
    Avatar von Comu
    Registriert seit
    18.11.2011
    Beiträge
    772
    Thanked 753 Times in 363 Posts

    Standard [Suche] Fight Us Script

    War halt auf die schnelle geschrieben, da er es dringend brauchte. Falls du Probleme mit dem Script hast (wie Diebspiel beispielsweise sagte, Flooding), schreib mich an und ich mach dir das Script sicherer.

Ähnliche Themen

  1. Suche Fifty! Würfel Spiel Script
    Von soulreafer im Forum Webentwicklung
    Antworten: 0
    Letzter Beitrag: 16.09.2013, 23:02
  2. [Suche] änliches script wie Facebooktausch24
    Von Polskaboii im Forum Skriptsprachen
    Antworten: 0
    Letzter Beitrag: 22.12.2012, 14:52
  3. [Brick-Force] Fight For Glory 1on1 Tunier!
    Von Mr Amari im Forum Brick-Force
    Antworten: 32
    Letzter Beitrag: 26.05.2012, 10:04
  4. [Suche] Forum Script ohne MySQL Datenbank
    Von uncopyable im Forum Web-Applications
    Antworten: 3
    Letzter Beitrag: 18.12.2011, 17:35
Diese Seite nutzt Cookies, um das Nutzererlebnis zu verbessern. Klicken Sie hier, um das Cookie-Tracking zu deaktivieren.