Changeset 647


Ignore:
Timestamp:
Oct 30, 2009, 8:45:01 PM (15 years ago)
Author:
barny
Message:

Opraven test server web

Location:
trunk/test_server
Files:
74 added
6 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test_server/index.php

    r646 r647  
    11<?php
    2 include_once( 'config.php' );
    3 include_once( 'functiondata.php' );
    4 include_once( 'languages.php' );
    5 ?>
    6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    7 <html xmlns="http://www.w3.org/1999/xhtml">
    8 <head>
    9 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" />
    10 <title><?php echo "$title"; ?></title>
    11 <link href="<?php echo $img_base ?>rospora.css" rel="stylesheet" type="text/css" />
    12 </head>
    13 <body style="text-align: center">
    14 <table width="57%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#999999" height="363">
    15   <tr>
    16     <th height="72" colspan="4" class="cells" scope="col"><div align="left" class="cell">
    17                 <a href="index.php"><img src="<?php echo $img_base ?>logo4.gif" alt="Mangos" width="214" height="68" class="header" border="0"/></a></div></th>
    18   </tr>
    19   <tr>
    20     <td height="32" colspan="4" class="cell"></td>
    21   </tr>
    22   <tr>
    23     <td width="4%" rowspan="7" class="cell"></td>
    24     <th width="24%" height="36" class="menu2" nowrap>MENU</th>
    25     <td width="4%" rowspan="7" align="left" class="cell"></td>
    26     <td width="68%" height="36" align="left" class="menu2">
    27         <?php
    28         $select= $_GET['select'];
    29         print "<strong class=title><center>$status $title</center></strong><br>";
    30         ?>
    31         </td>
    32   </tr>
    33   <tr>
    34     <th height="32" class="menu1" nowrap style="background-color: #333333">
    35         <a href="online.php">Online Players</a> </th>
    36     <td rowspan="6" class="tables" valign="top" align="left"><div align="center" class="tables" style="height:1px; scroll:auto; clear:both; position:relative; margin-top:auto; overflow: visible; visibility: visible;">
    37       <div align="left" class="tables2">
    38       <p class="tables"></p>
    39       <table width="100%" height="1" border="0" valign="top" cellpadding="0" cellspacing="0" bgcolor="#37404F" id="2">
    40 <?php           
    41 if ( $select = $_GET['select'] ){
    42 switch ($select){
    43 case status:
    44     echo "$textone";
    45 break;
    46 case statics:
    47     echo "  <tr>
    48     <th width='34%' scope='col'>Database</th>
    49     <th width='66%' scope='col'>$rev</th>
    50   </tr>
    51   <tr>
    52     <th scope='row'>Max. Online </th>
    53     <td>$time</td>
    54   </tr>
    55   <tr>
    56     <th scope='row'>&nbsp;</th>
    57     <td>&nbsp;</td>
    58   </tr>
    59   <tr>
    60     <th scope='row'>&nbsp;</th>
    61     <td>Statics on total population </td>
    62   </tr>
    63   <tr>
    64     <th scope='row'>&nbsp;</th>
    65     <td>&nbsp;</td>
    66   </tr>
    67   <tr>
    68     <th scope='row'>Human</th>
    69     <td><img src='$staticpic$yuzde_human'/></td>
    70   </tr>
    71   <tr>
    72     <th scope='row'>Dwarf</th>
    73     <td><img src='$staticpic$yuzde_dwarf'/></td>
    74   </tr>
    75   <tr>
    76     <th scope='row'>Night Elf </th>
    77     <td><img src='$staticpic$yuzde_nightelf'/></td>
    78   </tr>
    79   <tr>
    80     <th scope='row'>Gnome</th>
    81     <td><img src='$staticpic$yuzde_gnome'/></td>
    82   </tr>
    83   <tr>
    84     <th scope='row'>Dranei</th>
    85     <td><img src='$staticpic$yuzde_dranei'/></td>
    86   </tr>
    87   <tr>
    88     <th scope='row'>&nbsp;</th>
    89     <td>&nbsp;</td>
    90   </tr>
    91   <tr>
    92     <th scope='row'>Orc</th>
    93     <td><img src='$staticpic$yuzde_orc'/></td>
    94   </tr>
    95   <tr>
    96     <th scope='row'>Troll</th>
    97     <td><img src='$staticpic$yuzde_troll'/></td>
    98   </tr>
    99   <tr>
    100     <th scope='row'>Undead</th>
    101     <td><img src='$staticpic$yuzde_undead'/></td>
    102   </tr>
    103   <tr>
    104     <th scope='row'>Tauren</th>
    105     <td><img src='$staticpic$yuzde_tauren'/></td>
    106   </tr>
    107   <tr>
    108     <th scope='row'>Blood Elf </th>
    109     <td><img src='$staticpic$yuzde_bloodelf'/></td>
    110   </tr>
    111   <tr>
    112     <th scope='row'>&nbsp;</th>
    113     <td>&nbsp;</td>
    114   </tr>
    115   <tr>
    116     <th scope='row'>Accounts</th>
    117     <td>$max_acc</td>
    118   </tr>
    119   <tr>
    120     <th scope='row'>Characters</th>
    121     <td>$max_char</td>
    122   </tr>
    123   <tr>
    124     <th scope='row'>Game Masters </th>
    125     <td>$max_gm</td>
    126   </tr>
    127   <tr>
    128     <th scope='row'>&nbsp;</th>
    129     <td>&nbsp;</td>
    130   </tr>
    131   <tr>
    132     <th scope='row'>&nbsp;</th>
    133     <td>&nbsp;</td>
    134   </tr>
    135   <tr>
    136     <th scope='row'>&nbsp;</th>
    137     <td>&nbsp;</td>
    138   </tr>
    139   <tr>
    140     <th scope='row'>&nbsp;</th>
    141     <td>&nbsp;</td>
    142   </tr>
    143   <tr>
    144     <th scope='row'>&nbsp;</th>
    145     <td>&nbsp;</td>
    146   </tr>
    147   <tr>
    148     <th scope='row'>&nbsp;</th>
    149     <td>&nbsp;</td>
    150   </tr>
    151   <tr>
    152     <th scope='row'>&nbsp;</th>
    153     <td>&nbsp;</td>
    154   </tr>";
    155 break;
    156 case accountcreate:
    157         echo "$cont";
    158 break;
    159 }}
    160 else
    161 {
    162 print "<tr><td><center>Welcome to <b>MaNGOS</b> , Powered Free MMORPG Server</center></td></tr>";
     2/*
     3  ReggAcc
     4 
     5          by (c) Vladonix (reggacc.admin at gmail dot com) - last changes 09.12.2008
     6          more info - see HowToInstall.txt, world1.php and configuration_example.php
     7         
     8*/
     9
     10define('roSSECURE',true);                   // tested in configuration file - change
     11
     12define('CFG_FILE', "configuration.php");    // configuration file - change name
     13
     14if (!is_file(CFG_FILE)) {
     15  echo "<P>Create >>> <a href=\"administration.php\">ReggAcc configuration</a> <<< </P>";
     16  die('Configuration file does not exist.');
     17}
     18
     19require_once(CFG_FILE);     // main configuration - included must be first, becouse there is defined variable $lang used in lang.php
     20require_once('lang.php');   // translations + contains function to write log, do not remove!
     21include_once('dblayer.php');// database manipulating class (methods)
     22
     23if (!isset($layout)  ||  !$layout) {
     24  $layout = 0;
     25  $lpath = "tbc/";
     26}
     27else {
     28  $lpath = "wotlk/";
     29}
     30
     31$lfile = "style".$lang.".css";
     32
     33if (!isset($realm_num)  ||  $realm_num < 2) {
     34  header ('Location: http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].dirname($_SERVER['SCRIPT_NAME'])."/world1.php?nr=0");
     35}
     36else {
     37  $roption = array();
     38  $rvalue = array();
     39  $numr = 0;
     40   
     41  if ($realm_num > 9)
     42    $realm_num = 9;
     43   
     44  // tahame udaje z databaz z konfiguraku
     45  for ($s = 0; $s < $realm_num; $s++) {
     46    $hh = "hostr".($s?$s:"");
     47    $uu = "userr".($s?$s:"");
     48    $pp ="passwordr".($s?$s:"");
     49    $dd = "dbr".($s?$s:"");
     50    $enc =  "database_encoding".($s?$s:"");
     51    $rrid =  "rid".($s?$s:"");
     52   
     53    $rname = "";
     54    $rvalue[$s] = $s;
     55    $numr++;          // prehodnot - zobrazit iba spravne nakonfigurovane realmy?
     56             
     57    if (isset(${$hh})  &&  isset(${$uu})  &&  isset(${$pp})  &&  isset(${$dd})  &&  isset(${$enc}) ) {
     58      $rname = get_realm_name2(${$hh}, ${$uu}, ${$pp}, ${$dd}, ${$enc}, ${$rrid});
     59      if (!empty($rname))
     60        $roption[$s] = $rname;
     61      else
     62        $roption[$s] = "R".$s." - Err - check DB";             
     63    }
     64    else {
     65      $roption[$s] = "R".$s.". - Err - check config";
     66    } 
     67  }
     68 
     69   
     70  // tahame udaje iba z konfiguraku
     71  // su zadane v konfigu udaje? testujeme iba premenne realmNameX teraz - tie zobrazime v kombo boxe
     72//  for ($i = 0; $i < $realm_num; $i++) {
     73//    if ($i == 0)
     74//      $rtemp = "realmName";
     75//    else
     76//      $rtemp = "realmName".$i;
     77   
     78//    if (isset(${$rtemp})  &&  !empty(${$rtemp})) {
     79//      $roption[$numr] = ${$rtemp};
     80//      $rvalue[$numr] = $i;
     81//      $numr++;     
     82//    }
     83//  }
     84 
     85  if ($numr == 0)  // nenassiel ziaden, asi mame staru konfiguraciu s jednym realmom
     86    header ('Location: http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].dirname($_SERVER['SCRIPT_NAME'])."/world1.php?nr=0");
     87  else if ($numr == 1)  // nasiel iba jeden
     88    header ('Location: http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].dirname($_SERVER['SCRIPT_NAME'])."/world1.php?nr=".$rvalue[0]);
     89  else { 
     90?>       
     91
     92<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
     93<html>
     94  <head>
     95    <title><?php isset($sitename)?print $sitename:print ""; ?></title>
     96    <meta http-equiv="Cache-Control" content="no-cache,must-revalidate">
     97    <meta http-equiv=Content-Type content="text/html; charset=<?php isset($charset)?print $charset:print 'utf-8'; ?>">
     98    <link href="<?php echo $lpath.$lfile ?>" type="text/css" rel=stylesheet>
     99    <link rel="Shortcut Icon" href="<?php print $img_base ?>wowlogoanim.gif" type="image/gif">
     100  </head>
     101
     102<body>
     103
     104<div id="main">
     105
     106  <div id="levypanel">
     107  </div>
     108
     109  <div id="stredni">
     110 
     111    <div id="wlogo" title="WoW">&nbsp;</div>
     112   
     113    <div id="vstup">
     114   
     115    <?php
     116   
     117      if ($numr > 1) {
     118        echo "
     119      <p class=\"pcaps\">Choose your realm </p>
     120     
     121      <form method=\"post\" action=\"world1.php\">
     122        <select name=\"nr\" tabindex=\"1\">";
     123        for ($i = 0; $i < $numr; $i++)
     124          echo "<option value=\"".$rvalue[$i]."\">".$roption[$i]."</option>\n";
     125       
     126        echo "
     127        </select>
     128       
     129        <input type=\"submit\" class=\"bsend\" tabindex=\"2\" title=\"Send\" value=\"\">
     130       
     131      </form>";   
     132      }
     133      else {
     134        echo "
     135      <P class=\"pcaps\">         
     136        Set multirealm variables in configuration file <a href=\"administration.php\">HERE</a>
     137      </P>";
     138      }
     139     
     140    ?>   
     141     
     142    </div>
     143   
     144    <div id="footer"><span class="txt">
     145     <?php isset($siteText)?print $siteText:print '&nbsp;'; ?>
     146     </span>
     147    </div>
     148 
     149  </div>
     150
     151
     152  <div id="pravypanel">
     153  </div>
     154
     155</div>
     156
     157</body>
     158</html>
     159
     160<?php
     161  }
    163162}
    164163?>
    165       </table>
    166         </div>
    167     </div></td>
    168   <tr>
    169     <td height="16" align="left" nowrap="nowrap" class="menu1" style="background-color: #333333">
    170         <a href="index.php?select=accountcreate">Create Account</a></td>
    171   </tr>
    172   <tr>
    173     <td height="37" align="left" nowrap="nowrap" class="menu1" style="background-color: #333333">
    174         <a href="index.php?select=statics">Statics</a></td>
    175   </tr>
    176   <tr>
    177     <td height="34" align="left" class="menu1" style="background-color: #333333"><a href="<?php echo $forumadd ?>" target="_blank">Forum</a></td>
    178   </tr>
    179   <tr>
    180     <td height="34" align="left" class="menu1" style="background-color: #333333"><a href="<?php echo $voteadd ?>" target="_blank">Vote</a></td>
    181   </tr>
    182   <tr>
    183     <td height="30" class="tables" style="background-color: #303B4A"><?php echo $credits ?></td>
    184   </tr>
    185 </table>
    186 </body>
    187 </html>
Note: See TracChangeset for help on using the changeset viewer.