[PHP-SITE] Little Help With A Code... menu

User Tag List

Results 1 to 1 of 1
  1. #1
    viKKmaN's Avatar Member
    Reputation
    1
    Join Date
    May 2007
    Posts
    32
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [PHP-SITE] Little Help With A Code...

    Hello...
    I Have My Own Server And My Page Let's The Players Create As Many Accounts As They Want On My Server....
    I Have Here My Site's Account Creation Page :

    Code:
    <?php
    if (INCLUDED!==true) exit('Dieee !!!');
    if ($site['show_online_for_users'] !== true && $user[gmlevel]==0) exit('Dieee !!!');
    $page[title] = "$lang[pagetitle_online]";
    include('inc/site.defines.php');
    include('inc/page.header.php');
    ?>
    <div style="height:800;min-height:800;width:660">
    <div class='blogbody'>
    <center>
    <table border='0' cellpadding='0' cellspacing='0' width='90%'>
    <tbody>
    <tr>
     <td colspan='2'>
    <table border='0' cellpadding='0' cellspacing='0' width='100%'>
    <div style='cursor: auto;' id='dataElement'>
    <span>
    <table border='0' cellpadding='0' cellspacing='0' width='100%'>
     <tbody>
     <tr>
      <td width='12'><img src='img/metalborder-top-left.gif' height='12' width='12'></td>
      <td background='img/metalborder-top.gif'></td>
      <td width='12'><img src='img/metalborder-top-right.gif' height='12' width='12'></td>
     </tr>
     <tr>
      <td background='img/metalborder-left.gif'></td>
      <td>
       <table cellpadding='3' cellspacing='0' width='100%'>
        <tbody>
        <tr>
         <td class='rankingHeader' align='center' nowrap='nowrap'>#</td>
         <td class='rankingHeader' align='center' nowrap='nowrap'><?php echo$lang['online_name']; ?>&nbsp;</td>
         <td class='rankingHeader' align='center' nowrap='nowrap'><?php echo$lang['online_race']; ?>&nbsp;</td>
         <td class='rankingHeader' align='center' nowrap='nowrap'><?php echo$lang['online_class']; ?>&nbsp;</td>
         <td class='rankingHeader' align='center' nowrap='nowrap'><?php echo$lang['online_level']; ?>&nbsp;</td>
         <td class='rankingHeader' align='center' nowrap='nowrap'><?php echo$lang['online_location']; ?>&nbsp;</td>
        </tr>
    <?php
    $realms_arr = get_allrealms();
    foreach($realms_arr as $realm_param)
    {
     $result_str = "";
     $mangosd_database = parse_worlddb_info($realm_param['dbinfo']);
     $mangos_db = new DBLayer("XXXX", "XXXX", "XXXX", "XXXX");
     $mangos_db->query("SET NAMES $database_encoding");
     
     $query = $mangos_db->query("SELECT * FROM `character` WHERE `online`='1' ORDER BY `name`");
     while($result = $mangos_db->fetch_assoc($query))
     {
      if($res_color==1)$res_color=2;else$res_color=1;
      $cc++;
      $res_acc = get_user_stats($result['account']);
      $res_race = $site_defines['character_race'][$result['race']];
      $res_class = $site_defines['character_class'][$result['class']];
                    $res_map = $site_defines['map'][$result['map']];
      $char_data = explode(' ',$result['data']);
      $char_gender = dechex($char_data[36]);
      $char_gender = str_pad($char_gender,8, 0, STR_PAD_LEFT);
      $char_gender = $char_gender{3};
      $result_str .= "
        <tr>
         <td class='serverStatus$res_color' align='center'><small>$cc</small></td>
         <td class='serverStatus$res_color'><center><b class='smallBold' style='color: rgb(35, 67, 3);'>$result[name]</b></center></td>
         <td class='serverStatus$res_color' align='center'><small style='color: rgb(102, 13, 2);'><img onmouseover=\"ddrivetip('$lang[$res_race]')\" onmouseout=\"hideddrivetip()\" src='img/$result[race]-$char_gender.gif' height='18' width='18'></small></td>
         <td class='serverStatus$res_color' align='center'><small style='color: rgb(35, 67, 3);'><img onmouseover=\"ddrivetip('$lang[$res_class]')\" onmouseout=\"hideddrivetip()\" src='img/$result[class].gif' height='18' width='18'></small></td>
         <td class='serverStatus$res_color' align='center'><small style='color: rgb(102, 13, 2);'>$char_data[34]</small></td>
         <td class='serverStatus$res_color'><center><small style='color: rgb(125, 50, 25);'>$res_map</small></center></td>
        </tr>";
     }
     
     $mangos_db->close();
     unset($mangos_db);
     echo $result_str;
    }
    ?>
        </tbody>
       </table>
      </td>
      <td background='img/metalborder-right.gif'></td>
     </tr>
     <tr>
      <td><img src='img/metalborder-bot-left.gif' height='11' width='12'></td>
      <td background='img/metalborder-bot.gif'></td>
      <td><img src='img/metalborder-bot-right.gif' height='11' width='12'></td>
     </tr>
     </tbody>
    </table>
    </span>
    </div>
    </td>
    </tr>
    </tbody></table>
    </center>
    </div>
    </div>
    </div>
    <?php
    include('inc/page.footer.php');
    ?>
    And I NOTICED That Spora's Mangos Account Creation Page Let's Me Choose How Many Accounts Players Can Create On MY Server...
    CODE :
    Code:
    <?php
    /* 
     SPORA  v1.2
     Simple Page Of Registration of Accounts for MangOs
     It is made in the form of one page with fields of input of the 
     information of an account and the list of players being on a server.
     
     14.09.2006  Categories
     
     Created by mirage666 (c) (mailto:[email protected] icq# 152263154)
     
     {
      Modifyed by e[R]dem.dogan
      at 14/02/2007    -   20:30 GTM +2
      
      ChangeLog ;
      
      Support for Password Security.
      
      Respect from MrFaun
     }
     ~UPDATED FOR NEW ACCOUNT TABLE BY UNTOLD~ (WoWps.org)
    */
    $lang="en";     // Language ("en" - english, "ru" - russian)
    $host="host.name.com";   // HOST for Mangos database
    $user="root";   // USER for Mangos database
    $password="password";   // PASS for Mangos database
    $db="World";  // NAME of Mangos database
    $hostr="host.name.com";   // HOST for Realm database
    $userr="root";   // USER for Realm database
    $passwordr="password";   // PASS for Realm database
    $dbr="Realm";  // NAME of Realm database
    $database_encoding = 'CP1251'; // Set encoding
    $img_base = "img/";   // Image dir
    $server = "host.name.com";  // Server adress (for realm status)
    $port = "8085";    // Server port (for realm status) 8085 or 3724
    $tbc = "1";
    $lock_acc=0;    // Lock created account to IP adress (1 - on, 0 - off)
    $lock_reg=0;    // Registration only one (or more) account from one IP adress
           // 0 - not limit, 1 - one acc,  2 - two acc, etc...
           // 0 - not limit, 1 - one acc,  2 - two acc, etc...
     
    Switch ($lang)
    {
    case "en": 
     $button="create_en.gif";
     $text = Array(
     'acc' => 'Creation of account',
     'create' => 'is completed !',
     'failed' => 'was not possible !',
     'not_all' => 'Fields are filled not all',
     'playerson' => 'players online',
     'off' => 'is offline',
     'name' => 'Account Name',
     'password' => 'Password',
     'ip_limit' => Array('From your IP ',' accounts are already created'),
     'char' => Array('Name','Race','Class','LvL','Location'),
     );
     break; 
    case "ru": 
     $button="create_ru.gif";
     $text = Array(
     'acc' =>  'Ñîçäàíèå àêêàóíòà',
     'create' => 'çàâåðøåíî !',
     'failed' => 'íåâîçìîæíî !',
     'not_all' => 'Çàïîëíåíû íå âñå ïîëÿ',
     'playerson' => 'èãðîêîâ íà ñåðâåðå',
     'off' => 'ñåé÷àñ îòêëþ÷åí',
     'name' => 'Èìÿ Àêêàóíòà',
     'password' => 'Ïàðîëü',
     'ip_limit' => Array('Ñ âàøåãî IP ',' àêêàóíòîâ óæå ñîçäàíî'),
     'char' => Array('Ïåðñîíàæ','**àñà','Êëàññ','ËâË','**àñïîëîæåíèå'),
     );
     break; 
    }
    $maps_a = Array(
     0 => 'Azeroth', 
     1 => 'Kalimdor', 
     2 => 'UnderMine',
     13 => 'Test zone',
     17 => 'Kalidar',
     30 => 'Alterac Valley', 
     33 => 'Shadowfang Keep Instance', 
     34 => 'The Stockade Instance', 
     35 => 'Stormwind Prizon', 
     36 => 'Deadmines Instance', 
     43 => 'Wailing Caverns Instance', 
     44 => 'Monastery Interior', 
     47 => 'Razorfen Kraul Instance', 
     48 => 'Blackfathom Deeps Instance', 
     70 => 'Uldaman Instance', 
     90 => 'Gnomeregan Instance', 
     109 => 'Sunken Temple Instance', 
     129 => 'Razorfen Downs Instance', 
     150 => 'Outland', 
     169 => 'Emerald Forest', 
     189 => 'Scarlet Monastery Instance', 
     209 => 'Zul\'Farrak Instance', 
     229 => 'Blackrock Spire Instance', 
     230 => 'Blackrock Depths Instance', 
     249 => 'Onyxia\'s Lair Instance', 
     269 => 'Caverns of Time', 
     289 => 'Scholomance Instance', 
     309 => 'Zul\'Gurub Instance', 
     329 => 'Stratholme Instance', 
     349 => 'Mauradon Instance', 
     369 => 'Deeprun Tram', 
     389 => 'Ragefire Chasm Instance', 
     409 => 'The Molten Core Instance', 
     429 => 'Dire Maul Instance', 
     449 => 'Alliance PVP Barracks', 
     450 => 'Horde PVP Barracks', 
     451 => 'Development Land', 
     469 => 'Blackwing Lair Instance', 
     489 => 'Warsong Gulch', 
     509 => 'Ruins of Ahn\'Qiraj Instance', 
     529 => 'Arathi Basin',
     531 => 'Temple of Ahn\'Qiraj Instance', 
     533 => 'Naxxramas Instance',
     530 => 'Outland | Blood Elf/Draenei Area',
     532 => 'Karazhan',
     560 => 'Old Hillsbrad',
     540 => 'The Shattered Halls',
     542 => 'The Blood Furnace',
     543 => 'Hellfire Ramparts',
     544 => 'Magtheridon\'s Lair',
     545 => 'The Steamvault',
     546 => 'The Underbog',
     547 => 'The Slave Pens',
     548 => 'Serpentshrine Cavern',
     550 => 'The Eye',
     552 => 'The Arcatraz',
     553 => 'The Botanica',
     554 => 'The Mechanar',
     555 => 'Shadow Labyrinth',
     556 => 'Sethekk Halls',
     557 => 'Mana-Tombs',
     558 => 'Auchenai Crypts',
     559 => 'Nagrand Arena',
     562 => 'Blade\'s Edge Arena',
     564 => 'Black Temple',
     565 => 'Gruul\'s Lair',
     566 => 'Eye of the Storm',
     568 => 'Zul\'Aman',
     37 => 'Azshara Crater',
     534 => 'Old Hyjal', 
    );
     
    $zone = Array(
     0 => Array(
      Array(700,10,1244,1873,'Undercity',1497),
      Array(-840,-1330,-5050,-4560,'Ironforge',1537),
      Array(1190,200,-9074,-8280,'Stormwind City',1519),
      Array(-2170,-4400,-7348,-6006,'Badlands',3),
      Array(-500,-4400,-4485,-2367,'Wetlands',11),
      Array(2220,-2250,-15422,-11299,'Stranglethorn Vale',33),
      Array(-1724,-3540,-9918,-8667,'Redridge Mountains',44),
      Array(-2480,-4400,-6006,-4485,'Loch Modan',38),
      Array(662,-1638,-11299,-9990,'Duskwood',10),
      Array(-1638,-2344,-11299,-9918,'Deadwind Pass',41),
      Array(834,-1724,-9990,-8526,'Elwynn Forest',12),
      Array(-500,-3100,-8667,-7348,'Burning Steppes',46),
      Array(-608,-2170,-7348,-6285,'Searing Gorge',51),
      Array(2000,-2480,-6612,-4485,'Dun Morogh',1),
      Array(-1575,-5425,-432,805,'The Hinterlands',47),
      Array(3016,662,-11299,-9400,'Westfall',40),
      Array(600,-1575,-1874,220,'Hillsbrad Foothills',267),
      Array(-2725,-6056,805,3800,'Eastern Plaguelands',139),
      Array(-850,-2725,805,3400,'Western Plaguelands',28),
      Array(2200,600,-900,1525,'Silverpine Forest',130),
      Array(2200,-850,1525,3400,'Tirisfal Glades',85),
      Array(-2250,-3520,-12800,-10666,'Blasted Lands',4),
      Array(-2344,-4516,-11070,-9600,'Swamp of Sorrows',8),
      Array(-1575,-3900,-2367,-432,'Arathi Highlands',45),
      Array(600,-1575,220,1525,'Alterac Mountains',36),
     ),
     1 => Array(
      Array(2698,2030,9575,10267,'Darnassus',1657),
      Array(326,-360,-1490,-910,'Thunder Bluff',1638),
      Array(-3849,-4809,1387,2222,'Orgrimmar',1637),
      Array(-1300,-3250,7142,8500,'Moonglade',493),
      Array(2021,-400,-9000,-6016,'Silithus',1377),
      Array(-2259,-7000,4150,8500,'Winterspring',618),
      Array(-400,-2094,-8221,-6016,'Un\'Goro Crater',490),
      Array(-590,-2259,3580,7142,'Felwood',361),
      Array(-3787,-8000,1370,6000,'Azshara',16),
      Array(-1900,-5500,-10475,-6825,'Tanaris',440),
      Array(-2478,-5500,-5135,-2330,'Dustwallow Marsh',15),
      Array(360,-1536,-3474,-412,'Mulgore',215),
      Array(4000,-804,-6828,-2477,'Feralas',357),
      Array(3500,360,-2477,372,'Desolace',405),
      Array(-804,-5500,-6828,-4566,'Thousand Needles',400),
      Array(-3758,-5500,-1300,1370,'Durotar',14),
      Array(1000,-3787,1370,4150,'Ashenvale',331),
      Array(2500,-1300,4150,8500,'Darkshore',148),
      Array(3814,-1100,8600,11831,'Teldrassil',141),
      Array(3500,-804,-412,3580,'Stonetalon Mountains',406),
      Array(-804,-4200,-4566,1370,'The Barrens',17),
     ),
     530 => Array(
      Array(12996,-4468,-5821,5821,'Outland',466),
      Array(10295,4770,-3641,41,'Nagrand',477),
      Array(9475,4447,-1416,1935,'Zangarmarsh',467),
      Array(5539,375,-1962,1481,'Hellfire Peninsula',465),
      Array(4225,-1275,-5614,-1947,'Shadowmoon Valley',473),
      Array(8845,3420,791,4408,'Blade\'s Edge Mountains',475),
      Array(7083,1683,-4600,-1000,'Terokkar Forest',478),
      Array(5483,-91,1739,5456,'Netherstorm',479),
      Array(-4487,-9412,7758,11041,'Eversong Woods',462),
      Array(-5.283,-8583,6066,8266,'Ghostlands',463),
      Array(-10500,-14570,-5508,-2793,'Azuremyst Isle',464),
      Array(-10075,-13337,-2933,-758,'Bloodmyst Isle',476),
      Array(-11066,-12123,-4314,-3609,'The Exodar',471),
      Array(-6400,-7612,9346,10153,'Silvermoon City',480),
      Array(6135,4829,-2344,-1473,'Shattrath City',481),
     ),
     566 => Array(
      Array(2660,389,1404,2918,'Eye of the Storm',482),
     ),
    );
    $def = Array(
     'character_race' => Array(
      1 => 'Human',
      2 => 'Orc',
      3 => 'Dwarf',
      4 => 'Night&nbsp;Elf',
      5 => 'Undead',
      6 => 'Tauren',
      7 => 'Gnome',
      8 => 'Troll',
      9 => 'Goblin',
      11 => 'Draenei',
      10 => 'Blood&nbsp;Elf',
     ),
     'character_class' => Array(
      1 => 'Warrior',
      2 => 'Paladin',
      3 => 'Hunter',
      4 => 'Rogue',
      5 => 'Priest',
      7 => 'Shaman',
      8 => 'Mage',
      9 => 'Warlock',
      11 => 'Druid',
     ),
    );
    class DBLayer
    {
     var $link_id;
     var $query_result;
     var $saved_queries = array();
     var $num_queries = 0;
     function DBLayer($db_host, $db_username, $db_password, $db_name)
     {
      $this->link_id = @mysql_connect($db_host, $db_username, $db_password, true);
      if ($this->link_id)
      {
       if (@mysql_select_db($db_name, $this->link_id))
        return $this->link_id;
       else
        error('Unable to select database. MySQL reported: '.mysql_error(), __FILE__, __LINE__);
      }
      else
       error('Unable to connect to MySQL server. MySQL reported: '.mysql_error(), __FILE__, __LINE__);
     }
     function query($sql)
     {
      $this->query_result = @mysql_query($sql, $this->link_id);
      if ($this->query_result)
      {
       ++$this->num_queries;
       return $this->query_result;
      }
      else
      {
       return false;
      }
     }
    
     function result($query_id = 0, $row = 0)
     {
      return ($query_id) ? @mysql_result($query_id, $row) : false;
     }
    
     function fetch_assoc($query_id = 0)
     {
      return ($query_id) ? @mysql_fetch_assoc($query_id) : false;
     }
    
     function fetch_row($query_id = 0)
     {
      return ($query_id) ? @mysql_fetch_row($query_id) : false;
     }
    
     function num_rows($query_id = 0)
     {
      return ($query_id) ? @mysql_num_rows($query_id) : false;
     }
    
     function affected_rows()
     {
      return ($this->link_id) ? @mysql_affected_rows($this->link_id) : false;
     }
    
     function insert_id()
     {
      return ($this->link_id) ? @mysql_insert_id($this->link_id) : false;
     }
    
     function get_num_queries()
     {
      return $this->num_queries;
     }
    
     function get_saved_queries()
     {
      return $this->saved_queries;
     }
    
     function free_result($query_id = false)
     {
      return ($query_id) ? @mysql_free_result($query_id) : false;
     }
    
     function escape($str)
     {
      if (function_exists('mysql_real_escape_string'))
       return mysql_real_escape_string($str, $this->link_id);
      else
       return mysql_escape_string($str);
     }
    
     function error()
     {
      $result['error_sql'] = @current(@end($this->saved_queries));
      $result['error_no'] = @mysql_errno($this->link_id);
      $result['error_msg'] = @mysql_error($this->link_id);
      return $result;
     }
    
     function close()
     {
      if ($this->link_id)
      {
       if ($this->query_result)
        @mysql_free_result($this->query_result);
       return @mysql_close($this->link_id);
      }
      else
       return false;
     }
    }
    function error($message, $file, $line, $db_error = false)
    {
     global $siteerrors;
     $s = "\t\t".'Error: <strong>'.$message.'.</strong>'."\n";
     echo $s;
    }
    function get_zone_name($mapid, $x, $y){
    global $maps_a, $zone;
    if (!empty($maps_a[$mapid]))
     {
     $zmap=$maps_a[$mapid];
     if (($mapid==0) or ($mapid==1) or ($mapid==530) or ($mapid==566))
      {
      $i=0; $c=count($zone[$mapid]);
      while ($i<$c)
       {
     if ($zone[$mapid][$i][2] < $x  AND $zone[$mapid][$i][3] > $x AND $zone[$mapid][$i][1] < $y  AND $zone[$mapid][$i][0] > $y) $zmap=$zone[$mapid][$i][4];
       $i++;
       }
      }
     } else $zmap="Unknown zone";
    return $zmap;
        } 
    function test_realm(){
     global $server, $port;
     $s = @fsockopen("$server", $port, $ERROR_NO, $ERROR_STR,(float)0.5);
     if($s){@fclose($s);return true;} else return false;
    }
    function get_realm_name(){
     global $hostr, $userr, $passwordr, $dbr, $database_encoding;
     $realm_db = new DBLayer($hostr, $userr, $passwordr, $dbr);
     $realm_db->query("SET NAMES $database_encoding");
     $query = $realm_db->query("SELECT * FROM `realmlist`");
     $result = $realm_db->fetch_assoc($query);
     $realm_db->close();
     unset($realm_db);
     return($result['name']);
    }
     
    if (empty($_POST['username']) and empty($_POST['passw']) and empty($_POST['email'])) 
     {
     $cont='         <TR>
                    <TD rowSpan=6><IMG height=110 
                      src="'.$img_base.'pixel.gif" width=15></TD>
                    <TD vAlign=center align=left width=190><B 
                      style="FONT-SIZE: 8pt; COLOR: white; LETTER-SPACING: 3px; FONT-VARIANT: small-caps"><LABEL 
                      for=username>'.$text["name"].':</LABEL>&nbsp;</B><BR><INPUT 
                      id=username style="WIDTH: 175px" tabIndex=1 maxLength=16 
                      size=18 name=username></TD>
                    <TD rowSpan=6><IMG height=1 src="'.$img_base.'pixel.gif" width=15></TD></TR>
                  <TR><TD width=190 height=1></TD></TR>
                  <TR><TD width=190 height=1></TD></TR>
                  <TR>
                    <TD vAlign=center align=left width=190><B 
                      style="FONT-SIZE: 8pt; COLOR: white; LETTER-SPACING: 3px; FONT-VARIANT: small-caps"><LABEL 
                      for=passw>'.$text["password"].':</LABEL>&nbsp;</B><BR><INPUT id=passw 
                      style="WIDTH: 175px" tabIndex=2 type=password maxLength=16 
                      size=18 name=passw></TD></TR>
                  <TR>
                    <TD vAlign=center align=left width=190><B 
                      style="FONT-SIZE: 8pt; COLOR: white; LETTER-SPACING: 3px; FONT-VARIANT: small-caps"><LABEL 
                      for=email>E-mail:</LABEL>&nbsp;</B><BR><INPUT id=email 
                      style="WIDTH: 175px" tabIndex=2 maxLength=50 
                      size=18 name=email></TD></TR>
                  <TR>
                    <TD align=left>
                      <TABLE cellSpacing=0 cellPadding=0 border=0>
                        <TBODY>
                        <TR>
                          <TD><IMG height=3 
                            src="'.$img_base.'pixel.gif" width=1></TD>
                          <TD></TD>
                          <TD></TD></TR></TBODY></TABLE></TD></TR>
                  <TR>
                    <TD align=left colSpan=3>
                      <TABLE cellSpacing=0 cellPadding=0 border=0>
                        <TBODY>
                        <TR>
                          <TD><IMG height=39 
                            src="'.$img_base.'pixel.gif" width=19></TD>
                          <TD><INPUT class=button 
                            style="WIDTH: 168px; HEIGHT: 39px" tabIndex=3 type=image 
                            alt=Create src="'.$img_base.$button.'" 
                            value=Create border=0></TD>
         </TR></TBODY></TABLE></TD></TR>';
     } 
     elseif  (empty($_POST['username']) or empty($_POST['passw']) or empty($_POST['email'])) 
     {
     $cont='<TR><TD rowSpan=6><IMG height=152 width=1 src="'.$img_base.'pixel.gif"><TD align=Center><SMALL class=error>
    '.$text["not_all"].'
    <br><br><a href="" onClick="history.go(-1)">Back</a></SMALL></TD></TD></TR>';
     }
     else
     {
     $username = htmlspecialchars(trim("$_POST[username]"));
     $passw = trim($_POST['passw']);
     $email = htmlspecialchars(trim($_POST['email']));
     $ip = getenv('REMOTE_ADDR');
    // ñäåëàòü ïðîâåðêó íà íåïîëó÷åíèå èïà
     $realm_db = new DBLayer($hostr, $userr, $passwordr, $dbr);
     $realm_db->query("SET NAMES $database_encoding");
    $ip_cr=0;
    if ($lock_reg!=0){
      $query = $realm_db->query("SELECT `last_ip` FROM `account`  WHERE `last_ip`='$ip'");
      while($result = $realm_db->fetch_assoc($query)) $ip_cr++;
    }
    if (($ip_cr>=$lock_reg) && ($lock_reg!=0))
    {
      $cont='<TR><TD rowSpan=6><IMG height=152 width=1 src="'.$img_base.'pixel.gif"><TD align=Center><SMALL class=error>
    '.$text["ip_limit"][0].$ip.'<br>'.$ip_cr.$text["ip_limit"][1].'
    <br><br><a href="" onClick="history.go(-1)">Back</a></SMALL></TD></TD></TR>';
     } else
     {
     if($realm_db->query("INSERT INTO `account` (`username`,`sha_pass_hash`,`email`,`last_ip`,`locked`, `tbc`) VALUES ('$username',SHA1(CONCAT(UPPER('$username'),':',UPPER('$passw'))),'$email','$ip','$lock_acc','$tbc')"))
      {
      $cont='<TR><TD rowSpan=6><IMG height=152 width=1 src="'.$img_base.'pixel.gif"><TD align=Center><SMALL>
    '.$text["acc"].'<br><strong>'.$username.'</strong><br>'.$text["create"].'
    </SMALL></TD></TD></TR>';
      }
      else
      {
      $cont='<TR><TD rowSpan=6><IMG height=152 width=1 src="'.$img_base.'pixel.gif"><TD align=Center><SMALL class=error>
    '.$text["acc"].'<br><strong>'.$username.'</strong><br>'.$text["failed"].'
    <br><br><a href="" onClick="history.go(-1)">Back</a></SMALL></TD></TD></TR>';
      }
    }
    
     
     $realm_db->close();
     unset($realm_db);
     }
     
    function make_players_array(){
     global $host, $user, $password, $db, $database_encoding, $pl_array;
    $i=0;
     $mangos_db = new DBLayer($host, $user, $password, $db);
     $mangos_db->query("SET NAMES $database_encoding");
     $query = $mangos_db->query("SELECT * FROM `character` WHERE `online`='1' ORDER BY `name`");
     while($result = $mangos_db->fetch_assoc($query))
     {
      $char_data = explode(' ',$result['data']);
      $char_gender = dechex($char_data[36]);
      $char_gender = str_pad($char_gender,8, 0, STR_PAD_LEFT);
      $char_gender = $char_gender{3};
      $res_pos=get_zone_name($result['map'], $result['position_x'], $result['position_y']);
    $pl_array[$i] = Array($result['name'], $result['race'], $result['class'], $char_data[34], $res_pos, $char_gender);
    $i++;
     }
     $mangos_db->close();
     unset($mangos_db);
    return $i;
    }
    $onlineplayers=make_players_array();
    if (!$sort = &$_GET['s']) $sort=0;
    if (!$flag = &$_GET['f']) $flag=0;
    if ($flag==0) { $flag=1; $sort_type='<'; } 
      else { $flag=0; $sort_type='>'; }
    $link=$_SERVER['PHP_SELF']."?f=".$flag."&s=";
    if (!empty($pl_array)) 
     {
     usort($pl_array, create_function('$a, $b', 'if ( $a['.$sort.'] == $b['.$sort.'] ) return 0; if ( $a['.$sort.'] '.$sort_type.' $b['.$sort.'] ) return -1; return 1;'));
     }
    $list="";
    $i=0;
    while ($i < $onlineplayers)
     {
     $name=$pl_array[$i][0];
     $race=$pl_array[$i][1];
     $class=$pl_array[$i][2];
     $res_race = $def['character_race'][$race];
     $res_class = $def['character_class'][$class];
     $lvl=$pl_array[$i][3];
     $loc=$pl_array[$i][4];
     $gender=$pl_array[$i][5];
     $list.= "
        <tr class=txt>
         <td></td>
         <td>$name</td>
         <td align='center'><img alt=$res_race src='".$img_base.$race."-$gender.gif' height='18' width='18'></td>
         <td align='center'><img alt=$res_class src='".$img_base."$class.gif' height='18' width='18'></td>
         <td align='center'>$lvl</td>
         <td >$loc</td>
        </tr>";
     $i++;
     }
    $title=get_realm_name();
    if (test_realm())
     {
     $title.=(' ('.$onlineplayers.' '.$text["playerson"].')');
     } else
     {
     $title.=(' '.$text["off"]);
     }
    
    // Main part !!!
    ?>
    <HTML><HEAD><META HTTP-EQUIV="Pragma" CONTENT="no-cache"><TITLE><?php print $title ?></TITLE>
    <META http-equiv=Content-Type content="text/html; charset=windows-1251"><LINK 
    id=bnetstyle href="<?php print $img_base ?>style.css" type=text/css 
    rel=stylesheet>
    <SCRIPT language=javascript>
      <!--
        var styleSheet;
        var agt     = navigator.userAgent.toLowerCase();
        var appVer  = navigator.appVersion.toLowerCase();
        var verInt  = parseInt(appVer);
        var ie      = (appVer.indexOf('msie') != -1);
        var opera   = (agt.indexOf('opera') != -1);
        var mozilla = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('opera')==-1)
          && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1)
          && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
        var ns4     = (mozilla && (verInt == 4));
        if (ie && !opera) {
          document.styleSheets["bnetstyle"].addRule ("input", "background-color: #040D1A");
          document.styleSheets["bnetstyle"].addRule ("input", "border-style: solid");
          document.styleSheets["bnetstyle"].addRule ("input", "border-width: 1px");
          document.styleSheets["bnetstyle"].addRule ("input", "border-color: #7F7F7F");
          document.styleSheets["bnetstyle"].addRule ("input", "color: #FFAC04");
          document.styleSheets["bnetstyle"].addRule ("textarea", "background-color: #040D1A");
          document.styleSheets["bnetstyle"].addRule ("textarea", "border-style: solid");
          document.styleSheets["bnetstyle"].addRule ("textarea", "border-width: 1px");
          document.styleSheets["bnetstyle"].addRule ("textarea", "border-color: #7F7F7F");
          document.styleSheets["bnetstyle"].addRule ("textarea", "color: #FFAC04");
          document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-Base-Color: #012158");
          document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-Arrow-Color: #7F7F7F");
          document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-3dLight-Color: #7F7F7F");
          document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-DarkShadow-Color: black");
          document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-Highlight-Color: black");
          document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-Shadow-Color: #00B3FF");
          document.styleSheets["bnetstyle"].addRule ("select", "background-color: #040D1A");
          document.styleSheets["bnetstyle"].addRule ("select", "color: #FFAC04");
          document.styleSheets["bnetstyle"].addRule ("select.gray", "background-color: #040D1A");
          document.styleSheets["bnetstyle"].addRule ("select.gray", "color: #FFAC04");
          document.styleSheets["bnetstyle"].addRule ("ul.thread", "margin-left: 22px;");
        }
      //-->
    </SCRIPT>
    <style type="text/css">
    <!--
    .style4 {color: #d79f14}
    .style6 {color: #365221; font-weight: bold; }
    -->
    </style>
    </HEAD>
    <link rel="shortcut icon" href="img/Icon.jpg" type="image/x-icon" />
    <?php 
     $today = getdate();
     $hours = $today['hours'];
     $minutes = $today['minutes'];
     $seconds = $today['seconds'];
     $month = $today['month'];
     $day = $today['mday'];
     $year = $today['year'];
     if($hours > 19 or $hours < 6)
     {print "<BODY text=#d79f14 vLink=#aaaaaa link=#ffffbb bgColor=#000000 background='img/32.jpg' bgproperties='fixed' leftMargin=0 topMargin=0 marginheight='0' marginwidth='0'>";
     }
     else
     {print "<BODY text=#d79f14 vLink=#aaaaaa link=#ffffbb bgColor=#000000 background='img/back_Create.jpg' bgproperties='fixed' leftMargin=0 topMargin=0 marginheight='0' marginwidth='0'>";
     }
    ?>
    <FORM name=login_form method=post>
      <div align="center">
        <p>
          <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
        </p>
      </div>
      <TBODY>
      <TR>
        <TD align=middle>
          <div align="center"><br>
                    <span class="style6"><font size="+2"><a onMouseOver="document['fpAnimswapImgFP2'].imgRolln=document['fpAnimswapImgFP2'].src;document['fpAnimswapImgFP2'].src=document['fpAnimswapImgFP2'].lowsrc;" onMouseOut="document['fpAnimswapImgFP2'].src=document['fpAnimswapImgFP2'].imgRolln" href="World of Warcraft Community Site">
    <img src="img/PSilver2.gif" id="fpAnimswapImgFP2" name="fpAnimswapImgFP2" dynamicanimation="fpAnimswapImgFP2" lowsrc="img/wowlogo3.gif" border="0"></a>
    </font></span></div>
          <TABLE cellSpacing=0 cellPadding=0 background="<?php print $img_base ?>pixeltje.gif" border=0 style="background-repeat: repeat;">
            <TBODY>
            <TR>
              <TD vAlign=top>
                <DIV style="POSITION: relative">
                <DIV 
                style="LEFT: 130px; WIDTH: 400px; POSITION: absolute; TOP: 0px"></DIV></DIV></TD>
              <TD><IMG height=169 src="<?php print $img_base ?>pixel.gif" 
              width=1></TD>
              <TD></TD></TR>
            <TR>
              <TD><IMG height=1 src="<?php print $img_base ?>pixel.gif" 
              width=203></TD>
              <TD>
        <TABLE cellSpacing=0 cellPadding=0 width=220 border=0>
        <TBODY>
                <?php print $cont ?></TBODY></TABLE></TD>
              <TD><IMG height=1 src="<?php print $img_base ?>pixel.gif" 
              width=217></TD></TR>
            <TR>
              <TD colSpan=3>
                <TABLE cellSpacing=0 cellPadding=0 border=0>
                  <TBODY>
                  <TR>
                    <TD colSpan=3><IMG height=17 
                      src="<?php print $img_base ?>pixel.gif" width=1></TD></TR>
                  <TR>
                    <TD width=106><IMG height=1 
                      src="<?php print $img_base ?>pixel.gif" width=106></TD>
                    <TD width=410><SMALL>
       
    <br><strong class=title><center><?php print $title ?></center></strong>
    <p align="center"><?php
     print "<b>Local servertime:<br>$hours:$minutes:$seconds&nbsp;&nbsp;$day-$month-$year</b>";
     ?>
    </p>
    <p align="center" class="style4"><strong>Visit the Official Project Silvermoon Public forum at:<br>
      <a href="<A href="http://projectsilvermoon.net/">http://projectsilvermoon.net/</a></strong></p">http://projectsilvermoon.net/">http://projectsilvermoon.net/</a></strong></p>
    <br>
    <table cellpadding='3' cellspacing='0' align='center'>
        <tbody>
    <tr class=title>
       <td align='left' nowrap='nowrap' width=50></td>
       <td align='left' nowrap='nowrap' width=60><a href="<?php print $link.'0">'.$text['char'][0] ?></a></td>
       <td align='center' nowrap='nowrap' width=40><a href="<?php print $link.'1">'.$text['char'][1] ?></a></td>
       <td align='center' nowrap='nowrap' width=40><a href="<?php print $link.'2">'.$text['char'][2] ?></a></td>
       <td align='center' nowrap='nowrap' width=40><a href="<?php print $link.'3">'.$text['char'][3] ?></a></td>
       <td align='left' nowrap='nowrap' width=100><a href="<?php print $link.'4">'.$text['char'][4] ?></a></td>
        </tr>
    <tr><td class='txt' align='center' colspan='6' nowrap='nowrap'><IMG height=1 src='<?php print $img_base ?>pixel.gif' width=400></td></tr>    <?php print $list ?>    
        </tbody>
    </table>
                      </SMALL></TD>
                    <TD width=124><IMG height=1 
                      src="<?php print $img_base ?>pixel.gif" width=124></TD></TR>
                  <TR>
          <TD colSpan=3><IMG height=100 
                      src="<?php print $img_base ?>pixel.gif" 
                width=1></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
        </FORM></BODY></HTML>
    My Question is : Is There A Way You Can Help Me TO Combine Those 2 Codes TO Make My Page Allow The Players To Make X Ammount Of Accounts? ( X = to be controled by me ) ???

    I'm Still A Novice In PHP CODE That's Why I Need Your Help.

    YOUR SINCERELLY,
    VIKKMAN .

    [PHP-SITE] Little Help With A Code...

Similar Threads

  1. Replies: 6
    Last Post: 07-16-2008, 04:51 AM
  2. Need a little help with PayPal
    By spudman321 in forum WoW Scams Help
    Replies: 5
    Last Post: 07-11-2008, 11:30 PM
  3. Help with NPC Code
    By Fuynuns93 in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 07-03-2008, 11:34 AM
  4. need a little help with autoit
    By Demonshade in forum Community Chat
    Replies: 2
    Last Post: 07-27-2007, 05:20 AM
All times are GMT -5. The time now is 01:25 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search