Our Scripts Vault contains many game scripts that you can use to create your own game!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> *{ padding:0; margin:0; } #container { width: 100%; text-align:center; } #header { border-bottom:1px solid #000; height:100px; width: 100%; text-align:center; } #nav { border-bottom:1px solid #000; width: 100%; height:30px; background-color: #d1c0a7; } #nav a { color: blue; text-decoration:none; } img { border: none; } #left-side { width: 11%; border-right:1px solid #000; float:left; height:800px; } #right-side { width: 11%; border-left:1px solid #000; float:right; height:800px; } #body { width:78%; position:absolute; left:150px; } #bottom { clear:both; border-top:1px solid #000; background-color: #d1c0a7; height:30px; border-bottom:1px solid #000; }</style></head><body bgcolor="cyan"><?php$server = "localhost";$dbuser = "root";$dbpass = "";$database = "database";mysql_connect($server, $dbuser, $dbpass);mysql_select_db($database)or die(mysql_error());$sql = "SELECT * FROM `head`";$res = mysql_query($sql) or die(mysql_error());$row = mysql_fetch_assoc($res);$head = $row['head'];$sql2 = "SELECT * FROM `navigation`";$res2 = mysql_query($sql2) or die(mysql_error());$row2 = mysql_fetch_assoc($res2);$nav = $row2['navigation'];$sql3 = "SELECT * FROM `left-side`";$res3 = mysql_query($sql3) or die(mysql_error());$row3 = mysql_fetch_assoc($res3);$left_side = $row3['left-side'];$sql4 = "SELECT * FROM `right-side`";$res4 = mysql_query($sql4) or die(mysql_error());$row4 = mysql_fetch_assoc($res4);$right_side = $row4['right-side'];$sql5 = "SELECT * FROM `body`";$res5 = mysql_query($sql5) or die(mysql_error());$row5 = mysql_fetch_assoc($res5);$body = $row5['body'];$sql6 = "SELECT * FROM `bottom`";$res6 = mysql_query($sql6) or die(mysql_error());$row6 = mysql_fetch_assoc($res6);$bottom = $row6['bottom'];echo noslashes(bbcode(" [container] [header] $head [/header] [navigation] $nav [/navigation] [left-side] $left_side [/left-side] [right-side] $right_side [/right-side] [body] $body [/body] [bottom] $bottom [/bottom] [/container]"));function noslashes($input){//no slashes return stripslashes($input);}function bbcode($input){//for obvious reasons $search = array( '/\[underline](.*?)\[\/underline]/is', '/\[comment](.*?)\[\/comment]/is', '/\[header](.*?)\[\/header]/is', '/\[navigation](.*?)\[\/navigation]/is', '/\[br]/is', '/\[nav-link=(.*?)](.*?)\[\/nav-link]/is', '/\[img=(.*?)](.*?)\[\/img]/is', '/\[left-side](.*?)\[\/left-side]/is', '/\[right-side](.*?)\[\/right-side]/is', '/\[body](.*?)\[\/body]/is', '/\[bottom](.*?)\[\/bottom]/is', '/\[container](.*?)\[\/container]/is' ); $replace = array( '<font style="text-decoration: underline;">$1</font>', '<!-- $1 -->', '<div id="header">$1</div>', '<div id="nav">$1</div>', '<br />', '<a href="$1">$2</a> ', '<img src="$1" title="$2" />', '<div id="left-side">$1</div>', '<div id="right-side">$1</div>', '<div id="body">$1</div>', '<div id="bottom">$1</div>', '<div id="container">$1</div>' ); return preg_replace($search,$replace,$input);}?></body></html>
<?phpsession_start();$server = "localhost";$dbuser = "root";$dbpass = "";$database = "database";mysql_connect($server, $dbuser, $dbpass);mysql_select_db($database)or die(mysql_error());$sql = "SELECT * FROM `head`";$res = mysql_query($sql) or die(mysql_error());$row = mysql_fetch_assoc($res);$head = $row['head'];$sql2 = "SELECT * FROM `navigation`";$res2 = mysql_query($sql2) or die(mysql_error());$row2 = mysql_fetch_assoc($res2);$nav = $row2['navigation'];$sql3 = "SELECT * FROM `left-side`";$res3 = mysql_query($sql3) or die(mysql_error());$row3 = mysql_fetch_assoc($res3);$left_side = $row3['left-side'];$sql4 = "SELECT * FROM `right-side`";$res4 = mysql_query($sql4) or die(mysql_error());$row4 = mysql_fetch_assoc($res4);$right_side = $row4['right-side'];$sql5 = "SELECT * FROM `body`";$res5 = mysql_query($sql5) or die(mysql_error());$row5 = mysql_fetch_assoc($res5);$body = $row5['body'];$sql6 = "SELECT * FROM `bottom`";$res6 = mysql_query($sql6) or die(mysql_error());$row6 = mysql_fetch_assoc($res6);$bottom = $row6['bottom'];$update_head = $_SESSION['head-changes'];$update_nav = $_SESSION['nav-changes'];$update_left_side = $_SESSION['left-side-changes'];$update_right_side = $_SESSION['right-side-changes'];$update_body = $_SESSION['body-changes'];$update_bottom = $_SESSION['bottom-changes'];function notags($input){//makes it inpossible to get tags to work and hack return trim(htmlspecialchars(addslashes($input)));}$form = "<table><tr><td><form method=\"post\" action=\"better way.php\">Head";if($update_head){ $form .= " $update_head"; session_destroy(); } $form .= "<br /><textarea name=\"head\" style=\"width:300px;height:100px;\">$head</textarea><input type=\"submit\" value=\"Edit Header\" name=\"edit-header\"></form></td></tr><tr><td><form method=\"post\" action=\"better way.php\">Navigation";if($update_nav){ $form .= " $update_nav"; session_destroy(); } $form .= "<br /><textarea name=\"navigation\" style=\"width:300px;height:100px;\">$nav</textarea><input type=\"submit\" value=\"Edit Navigation\" name=\"edit-nav\"></form></td></tr><tr><td><form method=\"post\" action=\"better way.php\">Left Side";if($update_left_side){ $form .= " $update_left_side"; session_destroy(); }$form .= "<br /><textarea name=\"left-side\" style=\"width:300px;height:100px;\">$left_side</textarea><input type=\"submit\" value=\"Edit Left-Side\" name=\"edit-left-side\"></form></td></tr><tr><td><form method=\"post\" action=\"better way.php\">Right Side"; if($update_right_side){ $form .= " $update_right_side"; session_destroy(); }$form .="<br /><textarea name=\"right-side\" style=\"width:300px;height:100px;\">$right_side</textarea><input type=\"submit\" value=\"Edit Right-Side\" name=\"edit-right-side\"></form></td></tr><tr><td><form method=\"post\" action=\"better way.php\">Body";if($update_body){ $form .= " $update_body"; session_destroy(); }$form .= "<br /><textarea name=\"body\" style=\"width:300px;height:100px;\">$body</textarea><input type=\"submit\" value=\"Edit Body\" name=\"edit-body\"></form></td></tr><tr><td><form method=\"post\" action=\"better way.php\">Bottom";if($update_bottom){ $form .= " $update_bottom"; session_destroy(); }$form .= "<br /><textarea name=\"bottom\" style=\"width:300px;height:100px;\">$bottom</textarea><input type=\"submit\" value=\"Edit Bottom\" name=\"edit-bottom\"></form></td></tr></table>";echo $form;if($_POST['edit-header']){ $header = notags($_POST['head']); $update = "UPDATE `head` SET `head`='$header'"; $update_set = mysql_query($update)or die(mysql_error()); $_SESSION['head-changes'] = "Changes Saved"; header("Location: better way.php");}if($_POST['edit-nav']){ $navigation = notags($_POST['navigation']); $update = "UPDATE `navigation` SET `navigation`='$navigation'"; $update_set = mysql_query($update)or die(mysql_error()); $_SESSION['nav-changes'] = "Changes Saved"; header("Location: better way.php");}if($_POST['edit-left-side']){ $edit_left_side = notags($_POST['left-side']); $update = "UPDATE `left-side` SET `left-side`='$edit_left_side'"; $update_set = mysql_query($update)or die(mysql_error()); $_SESSION['left-side-changes'] = "Changes Saved"; header("Location: better way.php");}if($_POST['edit-right-side']){ $edit_right_side = notags($_POST['right-side']); $update = "UPDATE `right-side` SET `right-side`='$edit_right_side'"; $update_set = mysql_query($update)or die(mysql_error()); $_SESSION['right-side-changes'] = "Changes Saved"; header("Location: better way.php");}if($_POST['edit-body']){ $edit_body = notags($_POST['body']); $update = "UPDATE `body` SET `body`='$edit_body'"; $update_set = mysql_query($update)or die(mysql_error()); $_SESSION['body-changes'] = "Changes Saved"; header("Location: better way.php");}if($_POST['edit-bottom']){ $edit_bottom = notags($_POST['bottom']); $update = "UPDATE `bottom` SET `bottom`='$edit_bottom'"; $update_set = mysql_query($update)or die(mysql_error()); $_SESSION['bottom-changes'] = "Changes Saved"; header("Location: better way.php");}?>
---- Table structure for table `body`--CREATE TABLE IF NOT EXISTS `body` ( `body` text NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1;---- Dumping data for table `body`--INSERT INTO `body` (`body`) VALUES('[underline]the body[/underline]\r\n[br]\r\n<a href="test">test</a>');-- ------------------------------------------------------------ Table structure for table `bottom`--CREATE TABLE IF NOT EXISTS `bottom` ( `bottom` text NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1;---- Dumping data for table `bottom`--INSERT INTO `bottom` (`bottom`) VALUES('[underline]bottom[/underline]');-- ------------------------------------------------------------ Table structure for table `head`--CREATE TABLE IF NOT EXISTS `head` ( `head` text NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1;---- Dumping data for table `head`--INSERT INTO `head` (`head`) VALUES('[underline]header[/underline]');-- ------------------------------------------------------------ Table structure for table `left-side`--CREATE TABLE IF NOT EXISTS `left-side` ( `left-side` text NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1;---- Dumping data for table `left-side`--INSERT INTO `left-side` (`left-side`) VALUES('[underline]left side[/underline]');-- ------------------------------------------------------------ Table structure for table `navigation`--CREATE TABLE IF NOT EXISTS `navigation` ( `navigation` text NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1;---- Dumping data for table `navigation`--INSERT INTO `navigation` (`navigation`) VALUES('[nav-link=#]nav link 1[/nav-link]\r\n | \r\n[nav-link=#]nav link 2[/nav-link]\r\n |\r\n[nav-link=whatever-edit.php]To edit page[/nav-link]');-- ------------------------------------------------------------ Table structure for table `right-side`--CREATE TABLE IF NOT EXISTS `right-side` ( `right-side` text NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1;---- Dumping data for table `right-side`--INSERT INTO `right-side` (`right-side`) VALUES('[underline]right side[/underline]');
ok here is a much better and easier way of doing this language thingfirst you shoulod make it so people who want to translate must already have an account and if they do want to translate the website have a form where they
and chris you said in my topic my database could use work what could i do to make it better?
I'd use JSON. XML is way too much fluff way too much extra data way too much waste.
but dude, please DONT implement your game into BP portal.. a friend of mine, who made overwatch, implemented the game to Bigpoint , but he spend so much time for realize the standards of Bigpoint and at the end he didnt earned money. make an Facebook login into your game and publish the game over facebook its the better alternative way.
He is actually making a facebook login, he dont work on facebook version. you can just use facebook account to create ingame account to log the player in. you dont need an extra facebook version. its just a big advertisment if your game is added to Application list on facebook.btw: Facebook use JSON as well;)
yeah bit its still yeasier and faster to make a small sperated version for FB than for BP , you have just to check if facebook user is logged in, then disable adds, facebooks payment system u dont need to intergrate(as far as i know, maybe they changed the rules..)
EDIT: how did you changed my reputation? i cannot find the link to it:D