ArcEmu: Simpleweb V2.0 - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Simpleweb V2.0 Lé Epic Releez

#1 User is offline   pingue 

  • Member
  • Pip
  • Group: Members
  • Posts: 99
  • Joined: 18-July 09
  • Gender:Male
  • Location:EARTH LULZ!
  • Interests:web designing.. grilz n titz, wow :3

Posted 12 December 2009 - 11:56 PM

Been working on the second release since I released the first version! New updates and they're pretty epic (in my opinion).

What's New in Version 2!
  • Theme Switcher - 6 Little configurable boxes in the header that switch through the themes.
  • Fixed Registration Script - Only works for ArcEmu.
  • Configuration File
  • Much better Coding
  • Paging
  • "Who's Online" Script - Only works for ArcEmu.
  • Edited Application Form (Not ready though).
  • Page Time Generator
  • 3 New Themes! (Illidan, Cataclysm, Ulduar!)
  • Centered the Layout


Preview @ SimpleWeb v2.1(Preview, unreleased)

Download:
Download Page

Open up /admin/config.php <- edit the stuff to your information, so the website works functionally ;)

What's coming up in Version3: Whole new layout & more graphics, login system for user accounts (Maybe integration with PHPBB, announcement system and user system.)

Hope you enjoy the website :)
Posted Image
0

#2 User is offline   Bob Herman 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 452
  • Joined: 11-October 08
  • Gender:Male

Posted 13 December 2009 - 09:59 AM

A little more about the SimpleWeb. Like its name might suggest, the site is actually pretty simple. All six designs are very well laid out, and the best part is: you get all six.

You can switch themes by clicking on the six little boxes at the top. Once you've changed themes, the site will save the theme you chose while you browse it (but not for all eternity ;) ) . The site has a pretty fast loading time, has little tutorials on how to edit the site, and much, much more!

Here is a picture of all the themes:

Posted Image

Posted Image

Posted Image

Posted Image

Posted Image

Enjoy :)
0

#3 User is offline   rmsteinmann 

  • Newbie
  • Group: Members
  • Posts: 2
  • Joined: 06-December 09

Posted 14 December 2009 - 08:58 PM

Forum looks great. Keep getting this error when I go to the 'REGISTER' tab.

Quote

Notice: A session had already been started - ignoring session_start() in C:\wamp\www\pages\register.php on line 2


Here's my register.php

<?php
           session_start();
           function reg()
           {
			     
                  if($_SERVER['REQUEST_METHOD'] == "POST")
                  {
					     global $dbhost, $dbuser, $dbpass, $dbselect;
                         $conf["ok"] = "<p><a href='index.php'>Congratulations, your account has been created!</a></p><br />";
                         $conf["multi"] = true; // if you allow multi account its true else false (default not allowed)
                         $connect = mysql_connect($dbhost,$dbuser,$dbpass) or die(mysql_error());
                         mysql_select_db($dbselect,$connect) or die(mysql_error());
                  
                         $login = !get_magic_quotes_gpc() ? addslashes($_POST['login']) : $_POST['login'];
                         $password = !get_magic_quotes_gpc() ? addslashes($_POST['password']) : $_POST['password'];
                         $email = !get_magic_quotes_gpc() ? addslashes($_POST['email']) : $_POST['email'];
                         $ip = $_SERVER['REMOTE_ADDR'];
                         if(($_SESSION['reg'] || already_reg($ip)) && !$conf["multi"])
                                return "<div style='background-color:red; color:white; font-weight:bold;'>ERROR: Already one accounts on this IP !</div>".form();
                                                 
                         if(!is_str($login) || !is_str($password) || strlen($login) <= 5 || strlen($password) <= 5)
                                return "<div style='background-color:red; color:white; font-weight:bold;'>ERROR: Login or password are invalid !</div>".form();
                         if(!is_email($email))
                                return "<div style='background-color:red; color:white; font-weight:bold;'>ERROR: Invalid email !</div>".form();
                         $sha1pass = sha1(strtoupper($login).":".strtoupper($password));

                         $sql = "INSERT INTO accounts(login,password,encrypted_password,gm,banned,lastip,email,flags) VALUES('$login','$password','$sha1pass',0,0,'$ip','$email',24);";
                         if(mysql_query($sql))
                         {
                                mysql_close($connect);   
                                $_SESSION['reg'] = true;
                                return "<div style='font-weight:bold;'>".$conf["ok"]."</div>";
                         }
                         switch(mysql_errno())
                         {
                                case 1062 :
                                   return "<div style='background-color:red; color:white; font-weight:bold;'>This accounts already exist !</div> ".form();
                                   break;
                         }
                         return "Mysql Error : ".mysql_errno()."<br />".form();
                  }
                  else
                         return form();
           }
           function is_str($str)
           {
                  return ereg("^[A-Za-z0-9]+$",$str);
           }
           function is_email($mail)
           {
                         $regex='#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,5}$#';
                  if(preg_match($regex,$mail));
                  {
                         $c = mysql_query("SELECT email FROM accounts WHERE email = '$mail';");
                         if(mysql_num_rows($c) == 0)
                                return true;
                  }
                  return false;
           }
           function already_reg($ip)
           {
                  $c = mysql_query("SELECT * FROM accounts WHERE lastip = '$ip';");
                  if(mysql_num_rows($c) == 0)
                         return false;
                  return true;
           }
           function form()
           {
                   return '
                  <form action="'.htmlentities($_SERVER['PHP_SELF']).'?p=register" method="post">
                         <table>
                                <tr><td>Login : (6 chars min) </td><td><input name="login" value="" type="text" /></td></tr>
                                <tr><td>Password : (6 chars min) </td><td><input name="password" value="" type="password" /></td></tr>
                                <tr><td>Email : </td><td><input name="email" value="" type="text" /></td></tr>
                                <tr><td colspan="2" align="center"><input type="submit" /></td></tr>
                         </table>
                  </form>';
           }
?>
<div id="content">
  <center><h1>Register an Account</h1></center><br />
  <p>
    <center><?php echo reg(); ?></center>
  </p>
</div>


And also on the 'REALMS' tab I get this:

Quote

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\wamp\www\pages\stats.php on line 10

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\pages\stats.php on line 17


And my stats.php:


<?php
function parsestats() 
{
	global $dbhost, $dbuser, $dbpass, $dbselect;
	#Connect
	mysql_connect($dbhost, $dbuser, $dbpass);
	mysql_select_db($dbselect);
	#Get info from DB
	$query = mysql_query("SELECT name, gender, race, class, level, mapid FROM `characters` WHERE online='1';");
	$results = mysql_num_rows($query);

	$info = "There are {$results} players online!";
	$info .= "<table>";
	$info .= "<tr><td>Name</td><td>Level</td><td>Gender</td><td>Race</td><td>Class</td></tr>";

  #For each row found:
	while($row = mysql_fetch_array($query))
	{
		#Will display (this is example)"
		#Name: Bob, gender: 1
		if( $row['gender'] == '1')
	  		$gender = 'Female';
		else
	  		$gender = 'Male';

		switch ($row['race'])
		{
	  		case '1':
				$race= "<img src=\"../images/races/human.png\" width='18' height='18' \">";
	  			break;
	  		case '2':
				$race= "<img src=\"../images/races/orc.png\"\" width='18' height='18' \">";
	  			break;
	  		case '3':
				$race= "<img src=\"../images/races/dwarf.png\" width='18' height='18' \">";
	  			break;
	  		case '4':
				$race= "<img src=\"../images/races/ne.png\" width='18' height='18' \">";
	  			break;
	  		case '5':
				$race= "<img src=\"../images/races/undead.png\" width='18' height='18' \">";
	  			break;
	  		case '6':
				$race= "<img src=\"../images/races/tauren.png\" width='18' height='18' \">";
	  			break;
	  		case '7':
				$race= "<img src=\"../images/races/gnome.png\" width='18' height='18' \">";
	  			break;
	  		case '8':
				$race= "<img src=\"../images/races/troll.png\" width='18' height='18' \">";
	  			break;
	  		case '10':
				$race= "<img src=\"../images/races/be.png\" width='18' height='18' \">";
	  			break;
	  		case '11':
			$race= "<img src=\"../images/races/human.png\" width='18' height='18' \">";
	  		break;
		}
  //Classes
  switch ($row['class'])
	{
	  case '1':
		$class= "<img src=\"../images/classes/warrior.png\" width='18' height='18' \">";
	  break;

	case '2':
		$class= "<img src=\"../images/classes/paladin.png\" width='18' height='18' \">";
	break;

	case '3': 
		$class= "<img src=\"../images/classes/hunter.png\" width='18' height='18' \">";
	break;

	case '4':
		$class= "<img src=\"../images/classes/rogue.png\" width='18' height='18' \">";
	break;

	case '5':
		$class= "<img src=\"../images/classes/priest.png\" width='18' height='18' \">";
	break;

	case '6':
		$class= "<img src=\"../images/classes/dk.png\" width='18' height='18' \">";
	break;

	case '7':
		$class= "<img src=\"../images/classes/sham.png\" width='18' height='18' \">";
	break;

	case '8':
		$class= "<img src=\"../images/classes/mage.png\" width='18' height='18' \">";
	break;

	case '9':
		$class= "<img src=\"../images/classes/warlock.png\" width='18' height='18' \">";
	break;

	case '11':
		$class= "<img src=\"../images/classes/druid.png\" width='18' height='18' \">";
	break;
	}

	$info .= "<tr><td>{$row[name]}</td><td>{$row[level]}</td><td>{$gender}</td><td>{$race}</td><td>{$class}</td></tr>";
  }

  $info .= "</table>";

  #return info
  return $info;
}

?>
<div id="content">
<center><h1>Realm stats</h1><br />
<p><?php echo "<a href='#'>$servername</a>" . " <br /> " . parsestats(); ?></p>
</center>
</div>


Been trying to figure it out for a while now.
0

#4 User is offline   pingue 

  • Member
  • Pip
  • Group: Members
  • Posts: 99
  • Joined: 18-July 09
  • Gender:Male
  • Location:EARTH LULZ!
  • Interests:web designing.. grilz n titz, wow :3

Posted 15 December 2009 - 07:38 AM

Remove line number 2 from register.php:
 session_start();


And for the stats.php have you tried editing it anything? o.0 Never seen it happen.
Posted Image
0

#5 User is offline   Bob Herman 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 452
  • Joined: 11-October 08
  • Gender:Male

Posted 16 December 2009 - 09:41 AM

*cough* bump *cough*

This thing is really nice guys. You should check it out!!!
0

#6 User is offline   Bob Herman 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 452
  • Joined: 11-October 08
  • Gender:Male

Posted 21 December 2009 - 11:55 AM

We have a nice surprise for all of you, when V3.0 comes out. :P
0

#7 User is offline   weaponovchoice 

  • Newbie
  • Group: Members
  • Posts: 1
  • Joined: 23-July 10
  • Gender:Male

Posted 12 September 2010 - 09:06 PM

this website is awesome thanks man
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users