</script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Account Activated</title> </head> <body> <div id="body_wrapper"> <div id="wrapper"><div id="menu">Your Account:</div> <div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"> <div id="vmarquee" style="position: absolute; width: 98%;"> <?php include_once "includes/config.inc.php"; include_once "includes/db_functions.inc.php"; $id = intval($_GET['id']); $code = yasDB_clean($_GET['code']); if ($id && $code) { $check = yasDB_select("SELECT id FROM user WHERE id={$id} AND randomkey='{$code}'", false); $checknum = $check->num_rows; if ($checknum == 1) { $activated = yasDB_update("UPDATE user SET activated='1' WHERE id='{$id}'", false); echo '<h4>Your account is now active you can now login!.<br /> Click here to login.<br /> <a href="' . $setting['siteurl'] . 'index.php">Login</a> </h4>'; } else { echo '<h4>Invalid ID or Activation code.Please contact admin using our contact form<br /> <a href="' . $setting['siteurl'] . 'contactus.html">Contact Us</a> </h4>'; } } else {
<?php include "db_functions.inc.php"; $userid = yasDB_clean($_GET['uid']); $query = yasDB_select("SELECT * FROM `user` WHERE `id` = '{$userid}'"); $userdata = $query->fetch_array(MYSQLI_ASSOC); ?> <br/><br/> <form id="profile" name="profile" method="post" action="index.php?act=profile"> <?php if (!$userdata['oauth_provider']) { ?> Name:<br /> <input type="text" name="name" value="<?php echo $userdata['name']; ?> " size="50" /><p> <?php } if ($userdata['oauth_provider'] != "facebook") { ?> Email:<br /> <input type="email" name="email" value="<?php echo $userdata['email']; ?> " size="50" /><p> <?php } ?> Website:(Remember the http://)<br /> <input type="text" name="website" value="<?php
<div id="center"> <?php include_once $setting['sitepath'] . '/includes/pagination.class.php'; $setting['gperpage'] = $setting['gperpage'] < 1 ? 15 : $setting['gperpage']; ?> <div class="container_box1"> <div id="headergames2">Download Games</div> <?php ini_set("display_errors", 0); if ($_POST['upload'] == "1") { include_once $setting['siteurl'] . "/includes/db_functions.inc.php"; $email = yasDB_clean($_POST['email']); $query = yasDB_insert("INSERT INTO notifydown (email) VALUES ('{$email}')", false); if (!$query) { echo "Database Error!"; } else { echo "<center>Email Submited!<br />We will send you email when we add new game.</center>"; } } else { echo ' <center> <form method="post"> <input type="hidden" name="upload" value="1" /> Enter your email to be notified about our new addition of downloadable games: <br /> <input type="text" name="email" maxlength="30" width="300" /> <input type="submit" value="Submit" /> </form> </center>'; $result = yasDB_select("SELECT count(id) FROM `downgames` ");
echo ' <a href="index.php?act=managemochi&page=' . $nextpage . '&category=' . $category . '&rating=' . $rating . '&description=' . $description . '&keywords=' . $keywords . '&filter=Filter games">NEXT</a>'; echo ' <a href="index.php?act=managemochi&page=' . $lastpage . '&category=' . $category . '&rating=' . $rating . '&description=' . $description . '&keywords=' . $keywords . '&filter=Filter games">LAST</a>'; } echo '</div>'; if (isset($_GET['install'])) { if ($_GET['install'] == 'Install') { install_mochigame($_GET['gameid']) or die("Game did not install successfully"); echo '<script>alert("Game sucessfully installed.");</script>'; if (isset($_GET['page'])) { $pageno = $_GET['page']; } else { $pageno = 1; } if (isset($_GET['category'])) { $category = $_GET['category']; } else { $category = 'all'; } if (isset($_GET['rating'])) { $rating = $_GET['rating']; } else { $rating = 'all'; } $description = yasDB_clean($_GET['description']); $keywords = yasDB_clean($_GET['keywords']); echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=index.php?act=managemochi&page=' . $pageno . '&category=' . $category . '&rating=' . $rating . '&description=' . $description . '&keywords=' . $keywords . '&filter=Filter games">'; exit; } } ?> </div>
<?php include "../../../includes/db_functions.inc.php"; include "../../../includes/config.inc.php"; include "../../../includes/checklinks.class.php"; $post_text = yasDB_clean($_POST['text'], true); $post_desc = yasDB_clean($_POST['description'], true); $post_url = yasDB_clean($_POST['url']); $post_reciprocal = yasDB_clean($_POST['reciprocal']); $post_linkemail = yasDB_clean($_POST['linkemail']); if (empty($post_text) or empty($post_url) or empty($post_reciprocal) or empty($post_linkemail) or empty($post_desc)) { echo "<h3>You didn't fill everything out for your link!</h3>"; exit; } if ($_POST['recaptcha'] == 'yes') { include "../../../includes/securimage/securimage.php"; $img = new Securimage(); $valid = $img->check($_POST['code']); if (!$valid) { $passed = false; } else { $passed = true; } } elseif ($_POST['recaptcha'] == 'no') { $answer = array('10', 'ten'); if (!in_array(strtolower($_POST['security']), $answer)) { $passed = false; } else { $passed = true; } }
function install_playtomic($gameid) { $table = ''; $pre = 'ptomic'; global $mysqli; $categories = array('Action' => 2, 'Adventure' => 3, 'Strategy' => 10, 'Multiplayer' => 2, 'Puzzle' => 1, 'Rhythm' => 7, 'Shooter' => 5, 'Sports' => 4, 'Other' => 7, 'RPG' => 3, 'Arcade' => 9, 'Driving' => 4, 'Defense' => 10, 'Rhythm' => 7, 'Education' => 7, 'Gadgets' => 1, 'Fighting' => 2, 'Dress Up' => 8, 'Board Game' => 7, 'Pimp & Customize' => 8, 'Pimp & Customize' => 8); $query = yasDB_select("SELECT * FROM `playtomicfeed` WHERE `id` = '{$gameid}'", false); $result = $query->fetch_array(MYSQLI_ASSOC); $gamename = $result['name']; $thumburl = $result['thumburl']; $thumburl_200 = $result['thumbnail_200x200']; $screen1_thumb = ''; $screen2_thumb = ''; $screen3_thumb = ''; $screen4_thumb = ''; $gameurl = $result['gameurl']; $c = explode(",", $result['categories']); // Remove comma delimiter and seperate categories into array in order to insert single category. $category = $categories[$c[0]]; $slug = str_replace(array('-', '_'), '', $result['slug']); // Download and save game file $game_file = $pre . "_" . $slug . "." . GetFileExtension($result['gameurl']); $game_url = '../swf/' . $game_file; download_file($gameurl, $game_url); $gamefile = 'swf/' . $game_file; // Download and save 100x100 thumbnail pic $smallthumb = $pre . "_" . $slug . "." . GetFileExtension($result['thumburl']); $sm_thumb = '../img/' . $smallthumb; download_file($thumburl, $sm_thumb); $gamethumb = 'img/' . $smallthumb; // Download and save 200x200 thumbnail pic $gamethumb200 = ''; /*if(!empty($result['thumbnail_200x200']) || $type == 0) { $t_url = str_replace("..", "", $result['thumbnail_200x200']); $mediumthumb = $pre."_200_" . $slug . "." . GetFileExtension($result['thumbnail_200x200']); $med_thumb = '../img/' . $mediumthumb; download_file($t_url, $med_thumb); $gamethumb200 = 'img/' . $mediumthumb; } else { $gamethumb200 = ''; }*/ ///////////////////////////////////////////////////////////////////////////////////////////////// // Remove code comment to download the game screen images - depends on availabilty in the feed // ///////////////////////////////////////////////////////////////////////////////////////////////// /* // Download and save screen 1 pic if($result['screenthumburl1']) { $t_url = str_replace("..", "", $result['screenthumburl1']); $largethumb = $pre."_screen1_" . $slug . "." . GetFileExtension($result['screenthumburl1']); $screen1_thumb = '../img/' . $largethumb; download_file($t_url, $screen1_thumb); } // Download and save screen 2 pic if($result['screenthumburl2']) { $t_url = str_replace("..", "", $result['screenthumburl2']); $largethumb = $pre."_screen2_" . $slug . "." . GetFileExtension($result['screenthumburl2']); $screen2_thumb = '../img/' . $largethumb; download_file($t_url, $screen2_thumb); } // Download and save screen 3 pic if($result['screenthumburl3']) { $t_url = str_replace("..", "", $result['screenthumburl3']); $largethumb = $pre."_screen3_" . $slug . "." . GetFileExtension($result['screenthumburl3']); $screen3_thumb = '../img/' . $largethumb; download_file($t_url, $screen3_thumb); } // Download and save screen 4 pic if($result['screenthumburl2']) { $t_url = str_replace("..", "", $result['screenthumburl4']); $largethumb = $pre."_screen4_" . $slug . "." . GetFileExtension($result['screenthumburl4']); $screen4_thumb = '../img/' . $largethumb; download_file($t_url, $screen4_thumb); } */ $desc = yasDB_clean($result['description']); // Prep for DB insert $instructions = yasDB_clean($result['instructions']); $keywords = $result['keywords']; $keywords = yasDB_clean($keywords); $gamename = yasDB_clean($gamename); $gamefile = yasDB_clean($gamefile); $gamethumb = yasDB_clean($gamethumb); $height = $result['height']; $width = $result['width']; $query->close(); $query = yasDB_insert("INSERT INTO `games` (`id`, `title`, `description`, `instructions`, `keywords`, `file`, `height`, `width`, `category`, `plays`, `code`, `type`, `source`, `sourceid`, `thumbnail`, `thumbnail_200`, `screen1`, `screen2`, `screen3`, `screen4`) VALUES (NULL, '{$gamename}', '{$desc}', '{$instructions}', '{$keywords}', '{$gamefile}', '{$height}', '{$width}', {$category}, 0, '', 'SWF', 'PLAYTOMIC', {$gameid}, '{$gamethumb}', '{$gamethumb200}', '{$screen1_thumb}', '{$screen2_thumb}','{$screen3_thumb}','{$screen4_thumb}')", false); if (!$query) { echo 'Error updating Games database'; return false; } $query = yasDB_update("UPDATE `playtomicfeed` SET isinstalled = 1 WHERE id = '{$result['id']}'", false); if (!query) { echo 'Error updating $table database'; return false; } return true; }
} echo ' ( Page ' . $pageno . ' of ' . $lastpage . ' ) '; if ($pageno == $lastpage) { echo ' NEXT LAST '; } else { $nextpage = $pageno + 1; echo ' <a href="index.php?act=managevasco&page=' . $nextpage . '&category=' . $category . '&description=' . $description . '&filter=Filter games">NEXT</a>'; echo ' <a href="index.php?act=managevasco&page=' . $lastpage . '&category=' . $category . '&description=' . $description . '&filter=Filter games">LAST</a>'; } echo '</div>'; if (isset($_GET['install'])) { if ($_GET['install'] == 'Install') { install_vascogame($_GET['gameid']) or die("Game did not install successfully"); echo '<script>alert("Game sucessfully installed.");</script>'; if (isset($_GET['page'])) { $pageno = $_GET['page']; } else { $pageno = 1; } if (isset($_GET['category'])) { $category = $_GET['category']; } else { $category = 'all'; } $description = yasDB_clean($_GET['description']); echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=index.php?act=managevasco&page=' . $pageno . '&category=' . $category . '&description=' . $description . '&filter=Filter games;">'; exit; } } ?> </div>
$post_desc = yasDB_clean($_POST['description'], true); $post_url = yasDB_clean($_POST['url']); $post_reciprocal = yasDB_clean($_POST['reciprocal']); $post_linkemail = yasDB_clean($_POST['linkemail']); } else { $post_text = ''; $post_desc = ''; $post_url = ''; $post_reciprocal = ''; $post_linkemail = ''; } if (isset($_GET['add']) && $_GET['add'] == 'link') { $post_text = yasDB_clean($_POST['text'], true); $post_desc = yasDB_clean($_POST['description'], true); $post_url = yasDB_clean($_POST['url']); $post_reciprocal = yasDB_clean($_POST['reciprocal']); if (empty($post_text) or empty($post_url) or empty($post_reciprocal)) { echo "<center>You didn't fill everything out for your link!</center>"; } if ($_POST['recaptcha'] == 'yes') { include $setting['sitepath'] . "/includes/securimage/securimage.php"; $img = new Securimage(); $valid = $img->check($_POST['code']); if (!$valid) { $passed = false; } else { $passed = true; } } elseif ($_POST['recaptcha'] == 'no') { $answer = array('10', 'ten'); if (!in_array(strtolower($_POST['security']), $answer)) {
function db_backup() { global $mysqli; global $setting; $path = $setting['sitepath'] . '/admin/backup/'; $file = DB_DATABASE . '_' . date("Y-m-d-H-i-s") . '.sql'; $backupFile = $path . $file; if (!is_dir($path)) { mkdir($path, 0766); } chmod($path, 0777); $fh = fopen($backupFile, 'w'); $tab_status = yasDB_select("SHOW TABLE STATUS"); while ($all = $tab_status->fetch_array(MYSQLI_ASSOC)) { $tbl_stat[$all['Name']] = $all['Auto_increment']; } $backup = ''; $tables = yasDB_select("SHOW TABLES FROM `" . DB_DATABASE . "`"); if ($tables->num_rows == 0) { return false; } while ($tabs = $tables->fetch_row()) { $droptbl = "DROP TABLE IF EXISTS `" . $tabs[0] . "`;\n"; $backup .= "--\n-- Table structure for `" . $tabs[0] . "`\n--\n\n" . $droptbl . "\nCREATE TABLE IF NOT EXISTS `" . $tabs[0] . "` ("; $res = yasDB_select("SHOW CREATE TABLE " . $tabs[0]); while ($all = $res->fetch_array(MYSQLI_ASSOC)) { $str = str_replace("CREATE TABLE `" . $tabs[0] . "` (", "", $all['Create Table']); $str = str_replace(",", ",", $str); $str2 = str_replace("`) ) TYPE=MyISAM ", "`)\n ) TYPE=MyISAM ", $str); if ($tbl_stat[$tabs[0]] > 0) { $ai = " AUTO_INCREMENT=" . $tbl_stat[$tabs[0]]; } else { $ai = ""; } $backup .= $str2 . $ai . ";\n\n"; } $backup .= "--\n-- Data to be executed for table `" . $tabs[0] . "`\n--\n\n"; $limit = yasDB_select("SHOW COLUMNS FROM `" . $tabs[0] . "`"); $column = $limit->fetch_row(); $tcount = yasDB_select("SELECT COUNT(" . $column[0] . ") FROM `" . $tabs[0] . "`"); $total = $tcount->fetch_row(); $total = $total[0]; $running = 0; while ($running <= $total) { $data = yasDB_select("SELECT * FROM `" . $tabs[0] . "` LIMIT " . $running . ",1000"); $loop = 0; $numrows = $data->num_rows; while ($dt = $data->fetch_row()) { $loop++; if ($loop == 1) { $backup .= "\nINSERT INTO `{$tabs['0']}` VALUES('" . yasDB_clean($dt[0]) . "'"; } else { $backup .= "\t('" . yasDB_clean($dt[0]) . "'"; } for ($i = 1; $i < sizeof($dt); $i++) { $backup .= ", '" . yasDB_clean($dt[$i]) . "'"; } if ($loop >= $numrows || $loop % 1000 == 0) { $loop = 0; $backup .= ");\n"; fwrite($fh, $backup); unset($backup); $backup = ''; } else { $backup .= "),\n"; } } $running += 1000; } $backup .= "\n-- --------------------------------------------------------\n\n"; } fwrite($fh, $backup); fclose($fh); if ($fh) { if (class_exists('ZipArchive')) { $zip = new ZipArchive(); $zipfile = $backupFile . '.zip'; $compress = $zip->open($zipfile, ZIPARCHIVE::CREATE); if ($compress === true) { $zip->addFile($backupFile, $file); $zip->close(); if (filesize($zipfile) > 0) { unlink($backupFile); return true; } else { return false; } } else { return false; } } return true; } else { return false; } }
echo '<center>Files per page must be a number.</center>'; } else { if ($_POST['use'] == 1) { $captcha = 'yes'; } else { $captcha = 'no'; } if (!empty($_POST['password']) && $_POST['password'] == $_POST['passwordcheck']) { $id = '1'; yasDB_update("UPDATE settings SET gperpage = " . intval($_POST['gperpage']) . ", numbgames = " . intval($_POST['numbgames']) . ", gamesort = '{$_POST['gamesort']}', approvelinks = '{$_POST['approvelinks']}', numblinks = " . intval($_POST['numblinks']) . ", seo = '{$_POST['seo']}' , lightbox = '{$_POST['lightbox']}', theme = '{$_POST['theme']}', skin = '{$_POST['skin']}', disabled = '{$_POST['disabled']}', regclosed = '{$_POST['regclosed']}', email = '{$_POST['email']}', sitename = '" . yasDB_clean($_POST['sitename']) . "', slogan = '" . yasDB_clean($_POST['slogan']) . "', metades = '" . yasDB_clean($_POST['metades']) . "', metakeywords = '" . yasDB_clean($_POST['metakeywords']) . "',`userecaptcha` = '{$captcha}', `cachelife` = " . intval($_POST['pagecache']) . ", `password` = '" . md5($_POST['password']) . "' where id = '1'"); include "../includes/settings_function.inc.php"; createConfigFile(); echo '<center>Site settings updated!<br />'; echo '<a href="index.php?act=settings">Click here to proceed.</a></center>'; } elseif (empty($_POST['password'])) { yasDB_update("UPDATE settings SET gperpage = " . intval($_POST['gperpage']) . ", numbgames = " . intval($_POST['numbgames']) . ", gamesort = '{$_POST['gamesort']}', approvelinks = '{$_POST['approvelinks']}', numblinks = " . intval($_POST['numblinks']) . ", seo = '{$_POST['seo']}' , lightbox = '{$_POST['lightbox']}', theme = '{$_POST['theme']}', skin = '{$_POST['skin']}', disabled = '{$_POST['disabled']}', regclosed = '{$_POST['regclosed']}', email = '{$_POST['email']}', sitename = '" . yasDB_clean($_POST['sitename']) . "', slogan = '" . yasDB_clean($_POST['slogan']) . "', metades = '" . yasDB_clean($_POST['metades']) . "', metakeywords = '" . yasDB_clean($_POST['metakeywords']) . "',`userecaptcha` = '{$captcha}', `cachelife` = " . intval($_POST['pagecache']) . " where id = '1'"); include "../includes/settings_function.inc.php"; createConfigFile(); echo '<center>Site settings updated!<br />'; echo '<a href="index.php?act=settings"><span style="color:green;">Click here to proceed.</span></a></center>'; } else { echo '<center>Passwords did not match!<br />'; echo '<a href="index.php?act=settings">Click here to proceed.</a></center>'; } } } } else { $query = yasDB_select("SELECT * FROM settings"); $row = $query->fetch_array(MYSQLI_ASSOC); $dir = $setting['sitepath'] . '/templates/'; $files = scandir($dir);
function install_fgdgame($gameid) { global $mysqli; $query = yasDB_select("SELECT * FROM `fgdfeed` WHERE `id` = '{$gameid}'", false); $result = $query->fetch_array(MYSQLI_ASSOC); $categories = array('Action' => 2, 'Adventure' => 3, 'Arcade' => 9, 'Defense' => 10, 'Casino' => 6, 'Driving' => 2, 'Fighting' => 2, 'Gadgets' => 10, 'Multiplayer' => 2, 'Puzzle' => 1, 'Rhythm' => 7, 'RPG' => 3, 'Shooter' => 5, 'Sports' => 4, 'Strategy' => 10, 'Other' => 7); //Other // Download and save game file if ($result['gamefile']) { $g_url = str_replace("..", "", $result['gamefile']); $game_file = basename($g_url); $game_file = "fgd_" . $result['uuid'] . "." . GetFileExtension($result['gamefile']); $game_url = '../swf/' . $game_file; download_file($g_url, $game_url); } else { return false; } // Download and save thumbnail pic if ($result['thumbfile']) { $t_url = str_replace("..", "", $result['thumbfile']); $smallthumb = "fgd_" . $result['uuid'] . "." . GetFileExtension($result['thumbfile']); $thumb = '../img/' . $smallthumb; download_file($t_url, $thumb); } $desc = yasDB_clean($result['description']); // Prep for DB insert $gamename = yasDB_clean($result['title']); $gamefile = yasDB_clean(str_replace("../", "", $game_url)); $gamethumb = yasDB_clean(str_replace("../", "", $thumb)); $tags = yasDB_clean($result['tags']); $height = $result['height']; $width = $result['width']; $c = explode(",", $result['categories']); if ($c[0] == "Other" || $c[0] == "Gadgets" || $c[0] == "Rhythm" || $c[0] == "Arcade") { $category = getCategory(wordsArray($result['title'] . ' ' . $result['description'] . ' ' . $result['tags'])); } else { $category = $categories[$c[0]]; } $query->close(); $query = yasDB_insert("INSERT INTO `games` (`id`, `title`, `description`, `instructions`, `keywords`, `file`, `height`, `width`, `category`, `plays`, `code`, `type`, `source`, `sourceid`, `thumbnail`, `thumbnail_200`, `screen1`, `screen2`, `screen3`, `screen4`) VALUES (NULL, '{$gamename}', '{$desc}', '', '{$tags}', '{$gamefile}', {$height}, {$width}, {$category}, 0, '', 'SWF', 'FGD', {$gameid}, '{$gamethumb}', '', '', '','','')", false); if (!$query) { echo 'Error updating Games database'; return false; } $query = yasDB_update("UPDATE fgdfeed SET installed = 1 WHERE id = {$result['id']}", false); if (!query) { echo 'Error updating fgdfeed database'; return false; } return true; }
echo $row['id']; ?> " /><input type="submit" class="button" name="edit" value="Edit!" /></td> </tr> </form> </table> </div> <?php } } elseif (isset($_POST['edit'])) { if (empty($_POST['id']) || empty($_POST['username'])) { echo '<center>One or more fields was left empty.<br />'; echo '<a href="index.php?act=manage_users&edit=' . $_POST['id'] . '">Click here to go back</a></center>'; } else { if (isset($_POST["endban"]) && $_POST["endban"] != '') { $endban = yasDB_clean($_POST["endban"]); if ($endban != 0) { $endban = $endban * 24 * 60 * 60; $endban = time() + $endban; } } else { $endban = 0; } yasDB_update("UPDATE user SET username = '******'username']}', email = '{$_POST['email']}', website = '{$_POST['website']}', endban = {$endban} \n\t\t\tWHERE id = '{$_POST['id']}'"); echo '<center>user Successfully edited!<br />'; echo '<a href="index.php?act=manage_users">Click here to proceed</a></center>'; } } elseif (!empty($_GET['reset'])) { $query = yasDB_select("SELECT avatar FROM user WHERE id='{$_GET['reset']}'"); $exists = $query->fetch_array(MYSQLI_ASSOC); if ($exists['avatar'] != "") {
echo $row['newsid']; ?> " /><input type="submit" class="button" name="edit" value="Edit!" /><input type="reset" class="button" value="Reset"/></td> </tr> </table> </div> </form> <?php } $query->close(); } elseif (isset($_POST['edit'])) { if (!isset($_POST['username']) || !isset($_POST['comment'])) { echo '<center>One or more fields was left empty.<br />'; echo '<a href="index.php?act=newsblogcomments&edit=' . intval($_POST['id']) . '">Click here to go back</a><center>'; } else { yasDB_update("update newsblog set username = '******'username']) . "', comment = '" . yasDB_clean($_POST['comment']) . "' WHERE id = " . intval($_POST['id']), false); echo '<center>Comment Successfully edited!<br />'; echo '<a href="index.php?act=newsblogcomments">Click here to proceed</a></center>'; } } elseif (!empty($_GET['delete'])) { $query = yasDB_select("select id from newsblog where id = " . intval($_GET['delete']), false); if ($query->num_rows == 0) { echo '<center>You cannot delete a members comment that does not exist!<br />'; echo '<a href="index.php?act=newsblogcomments">Click here to go back</a></center>'; $query->close(); } else { $query->close(); yasDB_delete("delete from newsblog where id = " . intval($_GET['delete']), false); echo '<center>Members comment successfully deleted.<br />'; echo '<a href="index.php?act=newsblogcomments">Click here to proceed</a></center>'; }
<div class="breadcrumbs"><a href="index.php?act=manage_ga" title="Google Analytics">Google Analytics Data</a></div> </div><br /> <div class="select-bar"> <label> <h3>Google Analytics Login Info</h3> </label> </div> <?php $replace = array('https://', 'http://', 'www.'); $serverUrl = $setting['siteurl']; $serverUrl = str_replace($replace, "", $serverUrl); $serverUrl = 'www.' . $serverUrl; if (isset($_POST['edit_ga'])) { $galogin = yasDB_clean($_POST['gaLogin']); $gapassword = yasDB_clean($_POST['gaPassword']); $gaurl = yasDB_clean($_POST['gaUrl']); if ($gapassword == "") { $pswd = ""; } else { $pswd = ", `gapassword` = '" . $gapassword . "'"; } yasDB_update("UPDATE `settings` SET `galogin` = '{$galogin}'" . $pswd . ", `gaurl` = '{$gaurl}' WHERE id = 1", false); echo '<center>Updated!'; echo '<br/><a href="index.php?act=gainfo">Click to continue.</a></center>'; } else { echo '<br/>'; $query = yasDB_select("SELECT `galogin`, `gapassword`, `gaurl` FROM `settings` WHERE `id` = 1"); $social = $query->fetch_array(MYSQLI_ASSOC); ?> <div class="table"> <img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" />
$name = $_SESSION['user']; $ipaddress = $_SERVER['REMOTE_ADDR']; yasDB_insert("INSERT INTO `memberscomments` (userid, ipaddress, comment, name) VALUES ({$userid}, '{$ipaddress}', '{$comment}', '{$name}')"); echo "<h3>Comment added!</h3>"; } } elseif (isset($_POST['newsid'])) { $id = yasDB_clean($_POST['newsid']); $comment = yasDB_clean($_POST['comment']); $ipaddress = yasDB_clean($_SERVER['REMOTE_ADDR']); yasDB_insert("INSERT INTO `newsblog` (username, newsid, comment, ipaddress) values ('{$_SESSION['user']}', {$id}, '{$comment}', '{$ipaddress}')", false); echo "<h3>Comment added!</h3>"; } elseif (empty($_POST['gameid'])) { echo "<h3>Sorry, the game you were commenting seems to be invalid.</h3>"; exit; } elseif (empty($_POST['comment']) || empty($_POST['name'])) { echo "<h3>All fields must filled in.</h3>"; exit; } else { $gameid = yasDB_clean($_POST['gameid']); $comment = yasDB_clean(strip_tags($_POST['comment']), true); $name = yasDB_clean($_POST['name']); $ipaddress = yasDB_clean($_SERVER['REMOTE_ADDR']); yasDB_insert("INSERT INTO `comments` (gameid, comment, ipaddress, name) VALUES ('{$gameid}', '{$comment}', '{$ipaddress}', '{$name}')", false); echo "<h3>Comment added!</h3>"; } //} } else { ?> <h3>The security question was answered incorrectly</h3> <?php }
$email = yasDB_clean($_POST['email']); $location = yasDB_clean($_POST['location']); $job = yasDB_clean($_POST['job']); $aboutme = yasDB_clean($_POST['aboutme']); $hobbies = yasDB_clean($_POST['hobbies']); $gender_radio = yasDB_clean($_POST['radio']); $month = yasDB_clean($_POST['DateOfBirth_Month']); $day = yasDB_clean($_POST['DateOfBirth_Day']); $year = yasDB_clean($_POST['DateOfBirth_Year']); $shhobs = yasDB_clean($_POST['shhobs']); $shloc = yasDB_clean($_POST['shloc']); $sheml = yasDB_clean($_POST['sheml']); $shname = yasDB_clean($_POST['shname']); $shabout = yasDB_clean($_POST['shabout']); $deact = yasDB_clean($_POST['deact']); $cmtsdisabled = yasDB_clean($_POST['cmtsdisabled']); if ($month == "-Month-" || $day == "-Day-" || $year == "-Year-") { $birthday = 0; } else { $birthday = strtotime($day . " " . $month . " " . $year); } if ($gender_radio == 'female') { $gender = 'female'; } elseif ($gender_radio == 'male') { $gender = 'male'; } else { $gender = ''; } if (isset($_SESSION['userid'])) { yasDB_update("UPDATE `user` SET website = '{$website}', name = '{$name}', email = '{$email}', location='{$location}', job='{$job}', aboutme='{$aboutme}', hobbies='{$hobbies}', shhobs = '{$shhobs}', cmtsdisabled = '{$cmtsdisabled}', shloc = '{$shloc}', sheml = '{$sheml}', shname = '{$shname}', shabout = '{$shabout}', deact = '{$deact}', birthday='{$birthday}', gender='{$gender}' WHERE id = '{$userid}'"); echo '<h2>Your profile has been updated.</h2>';
<div id="center-column"> <div class="top-bar"> <h1>Cpanel - Ads</h1> <div class="breadcrumbs"><a href="index.php?act=ads" title="Manage Ads">Manage Ads</a></div> </div><br /> <div class="select-bar"> <label> <h3>Add Ads</h3> </label> </div> <?php if (isset($_POST['add_ads'])) { $name = yasDB_clean($_POST['name']); $code = stripslashes($_POST['code']); yasDB_insert("INSERT INTO `ads` ( `id` , `name` , `code`) VALUES ('', '" . $name . "', '" . $code . "')", false); echo 'Ad added!'; } else { ?> <div class="table"> <img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" /> <img src="img/bg-th-right.gif" width="7" height="7" alt="" class="right" /> <form name="add_ads" method="post" action="index.php?act=addads"> <table class="listing form" cellpadding="0" cellspacing="0"> <tr> <th class="full" colspan="2">Ads</th> </tr> <tr> <td class="first" width="172"><strong>Name</strong></td> <td class="last"><input type="text" name="name" maxlength="255" /></td> </tr> <tr class="bg">
function install_konggame($gameid) { global $mysqli; $query = yasDB_select("SELECT * FROM `kongregate` WHERE `id` = '{$gameid}'", false); $result = $query->fetch_array(MYSQLI_ASSOC); $categories = array('Action' => 2, 'Adventure & RPG' => 3, 'Strategy & Defense' => 10, 'Multiplayer' => 2, 'Puzzle' => 1, 'Rhythm' => 7, 'Shooter' => 5, 'Sports & Racing' => 4, 'Music & More' => 7); //Other // Download and save game file if ($result['file']) { $g_url = str_replace("..", "", $result['file']); $game_file = basename($g_url); $game_file = "kong_" . preg_replace('#\\W#', '', $result['title']) . "." . GetFileExtension($result['file']); $game_url = '../swf/' . $game_file; download_file($g_url, $game_url); } else { return false; } // Download and save thumbnail pic if ($result['thumbnail']) { $t_url = str_replace("..", "", $result['thumbnail']); $smallthumb = "kong_" . preg_replace('#\\W#', '', $result['title']) . "." . GetFileExtension($result['thumbnail']); $thumb = '../img/' . $smallthumb; download_file($t_url, $thumb); } $desc = yasDB_clean($result['description']); // Prep for DB insert $gamename = yasDB_clean($result['title']); $gamefile = yasDB_clean(str_replace("../", "", $game_url)); $gamethumb = yasDB_clean(str_replace("../", "", $thumb)); $height = $result['height']; $width = $result['width']; $c = $result['category']; $category = $categories[$c]; $query->close(); $query = yasDB_insert("INSERT INTO `games` (`id`, `title`, `description`, `instructions`, `keywords`, `file`, `height`, `width`, `category`, `plays`, `code`, `type`, `source`, `sourceid`, `thumbnail`, `thumbnail_200`, `screen1`, `screen2`, `screen3`, `screen4`) VALUES (NULL, '{$gamename}', '{$desc}', '', '', '{$gamefile}', {$height}, {$width}, {$category}, 0, '', 'SWF', 'KONGREGATE', {$gameid}, '{$gamethumb}', '', '', '','','')", false); if (!$query) { echo 'Error updating Games database'; return false; } $query = yasDB_update("UPDATE kongregate SET installed = 1 WHERE id = {$result['id']}", false); if (!query) { echo 'Error updating kongergate database'; return false; } return true; }
<div id="center"> <div class="container_box1"> <div class="header"><center>Unsubscribe</center></div> <div class="container_box4"> <center> <?php ini_set("display_errors", 0); if (isset($_GET['id'])) { include_once "../includes/db_functions.inc.php"; $id = yasDB_clean($_GET['id']); $query = yasDB_delete("DELETE FROM notifydown WHERE id ='{$id}'", false); if (!$query) { echo 'Database error!'; } else { echo 'Your email is deleted from the mailing list.'; } } ?> </center> </div> <div class="clear"></div> </div>
if (in_array($thumb_ext, $thumb_types) || in_array($file_ext, $file_types)) { if ($_FILES["file"]["error"] > 0) { echo "<center>Return Code: " . $_FILES["thumbnail"]["error"] . "</center>"; } else { move_uploaded_file($_FILES["thumbnail"]["tmp_name"], $setting['sitepath'] . "/img/" . $num . $_FILES["thumbnail"]["name"]); move_uploaded_file($_FILES["file"]["tmp_name"], $setting['sitepath'] . "/swf/" . $num . $_FILES["file"]["name"]); $img = yasDB_clean("img/" . $num . $_FILES['thumbnail']['name']); $file = yasDB_clean("swf/" . $num . $_FILES['file']['name']); $desc = yasDB_clean($_POST['description']); $title = yasDB_clean($_POST['title']); $instructions = yasDB_clean($_POST['instructions']); $keywords = yasDB_clean($_POST['keywords']); $height = intval($_POST['height']); $width = intval($_POST['width']); $category = intval($_POST['category']); $type = yasDB_clean($_POST['type']); if ($height > 0 && $width > 0) { $query = yasDB_insert("INSERT INTO games (title, description, instructions, keywords, category, thumbnail, file, height, width, type, active) VALUES ('{$title}', '{$desc}', '{$instructions}', '{$keywords}', {$category}, '{$img}', '{$file}', '{$height}', '{$width}'', '{$type}', '0')", false); if ($query) { echo '<center><span style="display:block;text-align:center;font-size:24px;padding:10px 0 50px 0;">Game successfully added!</span></center>'; } } else { list($width, $height, $type, $attributes) = getimagesize($setting['sitepath'] . '/' . $file); $query = yasDB_insert("INSERT INTO games (title, description, instructions, keywords, category, thumbnail, file, height, width, type, active) VALUES ('{$title}', '{$desc}', '{$instructions}', '{$keywords}', {$category}, '{$img}', '{$file}', '{$height}', '{$width}', '{$type}', '0')", false); if ($query) { echo '<center><span style="display:block;text-align:center;font-size:24px;padding:10px 0 50px 0;">Game successfully added!</span></center>'; } } } } else { echo '<center>File or thumbnail type not supported</center>';
<div id="center-column"> <div class="top-bar"> <h1>Cpanel - Ads</h1> <div class="breadcrumbs"><a href="index.php?act=addads" title="Add ads">Add Ads</a></div> </div><br /> <div class="select-bar"> <label> <h3>Manage Ads</h3> </label> </div> <?php include $setting['sitepath'] . '/templates/' . $setting['theme'] . '/adschedule.php'; $id = isset($_POST["id"]) ? yasDB_clean($_POST["id"]) : ''; $name = isset($_POST['name']) ? yasDB_clean($_POST['name']) : ''; $code = isset($_POST['code']) ? yasDB_clean(stripslashes($_POST['code'])) : ''; if (isset($_POST['edit_ads'])) { if ($id > 0 && $id < 12) { yasDB_update("UPDATE `ads` SET code = '{$code}' WHERE id = '{$id}'", false); } else { yasDB_update("UPDATE `ads` SET name = '{$name}', code = '{$code}' WHERE id = '{$id}'", false); } echo '<center>Updated!'; echo '<br><a href="index.php?act=ads">Click to continue.</a></center>'; } elseif (isset($_POST['delete_ad'])) { $id = $_REQUEST["id"]; if ($id > 0 && $id < 12) { yasDB_update("UPDATE ads SET code='Put AD code here' WHERE id = '{$id}'", false); } else { yasDB_delete("DELETE FROM ads WHERE id = '{$id}'", false); } echo '<center>The ad was deleted</center>';
$text = yasDB_clean($_POST['text']); if (isset($_POST['name'])) { $name = yasDB_clean($_POST['name']); } else { if (isset($_SESSION['user'])) { $name = $_SESSION['user']; } else { $name = ''; } } $date = date("F j, Y, g:i a"); //create date time $sql = "INSERT INTO `forumtopics` (id, subject, cat, date, name, text,lastupdate) VALUES ('', '{$subject}', {$cat}, '{$date}', '{$name}', '{$text}'," . time() . ")"; $result = yasDB_insert($sql); if (isset($_SESSION['user'])) { $user = yasDB_clean($_SESSION['user']); yasDB_update("UPDATE `user` set topics = topics +1 WHERE username = '******'"); // add a post to the user yasDB_update("UPDATE `user` set totalposts = totalposts +1 WHERE username = '******'"); // add a post to user total yasDB_update("UPDATE `stats` set numbers = numbers +1 WHERE id = '3'"); // adds a post to Forum Total Posts yasDB_update("UPDATE `stats` set numbers = numbers +1 WHERE id = '4'"); // adds a post to Post Today } if ($result) { ?> <center>Successful<br/></center> <?php $query = yasDB_select("SELECT max(id) AS lastid FROM forumtopics"); $answer = $query->fetch_array(MYSQLI_ASSOC);
$website = yasDB_clean($_POST['website']); $name = yasDB_clean($_POST['name']); $email = yasDB_clean($_POST['email']); $location = yasDB_clean($_POST['location']); $aboutme = yasDB_clean($_POST['aboutme']); $hobbies = yasDB_clean($_POST['hobbies']); $shhobs = yasDB_clean($_POST['shhobs']); $shloc = yasDB_clean($_POST['shloc']); $sheml = yasDB_clean($_POST['sheml']); $shname = yasDB_clean($_POST['shname']); $shabout = yasDB_clean($_POST['shabout']); $deact = yasDB_clean($_POST['deact']); $cmtsdisabled = yasDB_clean($_POST['cmtsdisabled']); yasDB_update("UPDATE `user` SET website = '{$website}', name = '{$name}', email = '{$email}', location = '{$location}', aboutme = '{$aboutme}', hobbies = '{$hobbies}', shhobs = '{$shhobs}', shloc = '{$shloc}', sheml = '{$sheml}', shname = '{$shname}', shabout = '{$shabout}', deact = '{$deact}', cmtsdisabled = '{$cmtsdisabled}' WHERE username = '******'"); if (!empty($_POST['password'])) { $password = md5(yasDB_clean($_POST['password'])); yasDB_update("UPDATE user SET password = '******' WHERE username = '******'"); } echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=index.php?act=profile">'; } else { $query = yasDB_select("SELECT * FROM `user` WHERE username = '******'"); $row = $query->fetch_array(MYSQLI_ASSOC); echo ' <div class="containbox2"><div id="preview"></div><div id="profileBox"> <form name="usersettings" id="profile" method="post" action="index.php?act=profile"> <table class="tg"> <tr> <th class="tg-s6z2" colspan="4">' . $user . 's Profile:</th> </tr> <tr> <td class="tg-vn4c">Name:</td> <td class="tg-vn4c"><input type="text" name="name" id="s-a-g" value="' . $row['name'] . '" size="30" /></td>
function install_vascogame($gameid) { global $mysqli; $query = yasDB_select("SELECT * FROM `vascogames` WHERE `id` = '{$gameid}'", false); $result = $query->fetch_array(MYSQLI_ASSOC); $categories = array('action games' => 2, 'adventure games' => 3, 'strategy games' => 10, 'skill games' => 10, 'puzzle games' => 1, 'arcade games' => 9, 'shooting games' => 5, 'sports games' => 4, 'misc games' => 7, 'car games' => 4); //Strategy // Download and save game file if ($result['file']) { $g_url = str_replace("..", "", $result['file']); $game_file = basename($g_url); $game_file = "vasco_" . preg_replace('#\\W#', '', $result['title']) . "." . GetFileExtension($result['file']); $game_url = '../swf/' . $game_file; download_file($g_url, $game_url); } else { return false; } // Download and save thumbnail pic if ($result['thumbnail']) { $t_url = str_replace("..", "", $result['thumbnail']); $smallthumb = "vasco_" . preg_replace('#\\W#', '', $result['title']) . "." . GetFileExtension($result['thumbnail']); $thumb = '../img/' . $smallthumb; download_file($t_url, $thumb); } $desc = yasDB_clean($result['description']); // Prep for DB insert $gamename = yasDB_clean($result['title']); $gamefile = yasDB_clean(str_replace("../", "", $game_url)); $gamethumb = yasDB_clean(str_replace("../", "", $thumb)); $height = $result['height']; $width = $result['width']; $c = $result['category']; $category = $categories[$c]; $query->close(); if ($category == null || $category == '' || $category == 0) { $category == 7; } $query = yasDB_insert("INSERT INTO `games` (`id`, `title`, `description`, `instructions`, `keywords`, `file`, `height`, `width`, `category`, `plays`, `code`, `type`, `source`, `sourceid`, `thumbnail`, `thumbnail_200`, `screen1`, `screen2`, `screen3`, `screen4`) VALUES (NULL, '{$gamename}', '{$desc}', '', '', '{$gamefile}', {$height}, {$width}, {$category}, 0, '', 'SWF', 'VASCOGAMES', {$gameid}, '{$gamethumb}', '', '', '','','')", false); if (!$query) { echo 'Error updating Games database'; return false; } $query = yasDB_update("UPDATE `vascogames` SET `installed` = 1 WHERE `id` = {$result['id']}", false); if (!query) { echo 'Error updating vascogames database'; return false; } return true; }
$valid = $img->check($_POST['code']); if (!$valid) { $passed = false; } else { $passed = true; } } elseif ($_POST['recaptcha'] == 'no') { $answer = array('10', 'ten'); if (!in_array(strtolower($_POST['security']), $answer)) { $passed = false; } else { $passed = true; } } if ($passed) { $name = yasDB_clean($_POST['name']); $email = yasDB_clean($_POST['email']); $message = yasDB_clean($_POST['message']); $recipientname = yasDB_clean($_POST['recipientname']); $recipientemail = yasDB_clean($_POST['recipientemail']); $message = mail($recipientemail, "A message from {$name} \n\n {$email}", "Dear {$recipientname},\n\nYour friend {$name}, found our site very useful, and thought you would be interested.\n\nPlease follow the link to view our site:\n" . $setting['siteurl'] . " \n\nThank You,\n\n {$name},", 'From: "' . $setting['sitename'] . '" <your_email.com>'); if (@mail($email, $message, $recipientname, $recipientemail)) { echo '<span style="color:blue;">Message sent</span><br/><br/>'; } else { echo '<span style="color:red;">Error sending message</span><br/><br/>'; } } else { echo '<span style="color:red;">The security question was answered incorrectly. Please try again.</span><br/><br/>'; } } $name = isset($_POST['name']) ? $_POST['name'] : '';
function install_mgfgame($gameid) { global $mysqli; $query = yasDB_select("SELECT * FROM `mgffeed` WHERE `id` = '{$gameid}'", false); $result = $query->fetch_array(MYSQLI_ASSOC); // Download and save game file if ($result['file']) { $g_url = str_replace("..", "", $result['file']); $game_file = basename($g_url); $game_file = "mgf_" . $result['title'] . "." . GetFileExtension($result['file']); $game_url = '../swf/' . $game_file; download_file($g_url, $game_url); } else { return false; } // Download and save thumbnail pic if ($result['thumbnail']) { $t_url = str_replace("..", "", $result['thumbnail']); $smallthumb = "mgf_" . $result['title'] . "." . GetFileExtension($result['thumbnail']); $sm_thumb = '../img/' . $smallthumb; download_file($t_url, $sm_thumb); } $desc = yasDB_clean($result['description']); // Prep for DB insert $gamename = yasDB_clean($result['title']); $keywords = yasDB_clean($result['keywords']); $gamefile = yasDB_clean(str_replace("../", "", $game_url)); $gamethumb = yasDB_clean(str_replace("../", "", $sm_thumb)); $gamethumb200 = yasDB_clean(str_replace("../", "", $med_thumb)); $height = intval($result['height']); $width = intval($result['width']); $instructions = yasDB_clean($result['instructions']); $keywords = yasDB_clean($result['keywords']); $category = $result['category']; $review = yasDB_clean($result['review']); $query->close(); $query = yasDB_insert("INSERT INTO `games` (`id`, `title`, `description`, `instructions`, `keywords`, `file`, `height`, `width`, `category`, `plays`, `code`, `type`, `source`, `sourceid`, `thumbnail`, `ismochi`, `thumbnail_200`, `screen1`, `screen2`, `screen3`, `screen4`, `review`, `active`) VALUES (NULL, '{$gamename}', '{$desc}', '{$instructions}', '{$keywords}', '{$gamefile}', {$height}, {$width}, {$category}, 0, '', 'SWF', 'OTHER', {$gameid}, '{$gamethumb}', 0, '{$gamethumb200}', '', '','','', '{$review}', 1)", false); if (!$query) { echo 'Error updating Games database'; return false; } $query = yasDB_update("UPDATE mgffeed SET installed = '1' WHERE id = {$result['id']}", false); if (!$query) { echo 'Error updating mgffeed database'; return false; } return true; }
$avquery = yasDB_select("SELECT avatar FROM avatars WHERE userid = {$_SESSION['userid']}"); if ($avquery->num_rows != 0) { while ($avfile = $avquery->fetch_array(MYSQL_ASSOC)) { echo ' <div class="avatarpics"> <ul> <li class="even"><input type="image" class="useravatars" src="' . $setting['siteurl'] . 'avatars/' . $avfile['avatar'] . '" onclick="switchAvatar(\'' . $avfile['avatar'] . '\');return false"> <center><input type="image" src="' . $setting['siteurl'] . 'templates/' . $setting['theme'] . '/skins/' . $setting['skin'] . '/images/close.png" height="15" width="15" name="avatar" value="Remove" onclick="deleteAvatar(\'' . addslashes($avfile['avatar']) . '\');return false"/></center></li> </ul> </div>'; } } $avquery->close(); while ($num < $count) { $file = $files[$num]['name']; $num++; $n++; $file = yasDB_clean($file); $ext = pathinfo($file, PATHINFO_EXTENSION); if (in_array($ext, $os)) { echo ' <div class="avatarpics"> <ul> <li class="even"> <input type="image" src="' . $setting['siteurl'] . 'avatars/' . $file . '" onclick="switchAvatar(\'' . $file . '\');return false" width="100px" height="100px"></li> </ul> </div>'; } } unset($files); echo '<div class="clear"></div>';
<?php session_start(); require_once "db_functions.inc.php"; require_once "config.inc.php"; if (isset($_SESSION['userid'])) { $af = yasDB_clean($_GET['af']); $userid = yasDB_clean($_SESSION['userid']); yasDB_delete("DELETE FROM `avatars` WHERE `userid` = '{$userid}' and `avatar` = '{$af}'"); unlink("../avatars/" . $af); $query = yasDB_select("SELECT `avatarfile` FROM `user` WHERE `id` = '{$userid}'"); $useraf = $query->fetch_array(MYSQLI_ASSOC); if ($af == $useraf['avatarfile']) { yasDB_update("UPDATE user SET avatarfile = 'useruploads/noavatar.JPG' WHERE id = {$userid}"); echo 'useruploads/noavatar.JPG'; } else { echo $useraf['avatarfile']; } }
<div id="center-column"> <div class="top-bar"> <h1>Cpanel - Social</h1> <div class="breadcrumbs"><a href="index.php?act=socialids" title="Social IDs">Social IDs</a></div> </div><br /> <div class="select-bar"> <label> <h3>Social App IDs for Login</h3> </label> </div> <?php if (isset($_POST['edit_social'])) { $fbid = yasDB_clean($_POST['fbAppId']); $fbsecret = yasDB_clean($_POST['fbAppSecret']); $twid = yasDB_clean($_POST['twAppId']); $twsecret = yasDB_clean($_POST['twAppSecret']); yasDB_update("UPDATE `settings` SET `fb_app_id` = '{$fbid}', `fb_app_secret` = '{$fbsecret}', `tw_app_id` = '{$twid}', `tw_app_secret` = '{$twsecret}' WHERE id = 1", false); include "../includes/settings_function.inc.php"; createConfigFile(); echo '<center>Updated!'; echo '<br/><a href="index.php?act=socialids">Click to continue.</a></center>'; } else { echo '<br/>'; $query = yasDB_select("SELECT `fb_app_id`, `fb_app_secret`, `tw_app_id`, `tw_app_secret` FROM `settings` WHERE `id` = 1"); $social = $query->fetch_array(MYSQLI_ASSOC); ?> <div class="table"> <img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" /> <img src="img/bg-th-right.gif" width="7" height="7" alt="" class="right" /> <form name="app_ids" method="post" action="index.php?act=socialids"> <table class="listing form" cellpadding="0" cellspacing="0">
if ($_POST['username'] == '' || $_POST['password'] == '') { ?> <script>alert("Sorry username or password is empty!!");</script> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=<?php echo $setting['siteurl'] . 'index.php?act=register'; ?> "> <?php exit; } if ($passed) { $username = yasDB_clean($_POST["username2"]); $password = md5(yasDB_clean($_POST["password"])); $name = yasDB_clean($_POST["name"]); $email = yasDB_clean($_POST["email"]); $website = yasDB_clean($_POST["website"]); $date = time() + 0 * 24 * 60 * 60; $plays = 0; $points = 0; $stmt = yasDB_select("SELECT * FROM user WHERE username LIKE '{$username}'"); if ($stmt->num_rows == 0) { $stmt = yasDB_insert("INSERT INTO `user` (username, password, name, email, website, plays, points, date) VALUES ('{$username}','{$password}','{$name}','{$email}','{$website}','{$plays}','{$points}', '{$date}')", false); if ($stmt) { ?> <script>alert("Registered: You can now log in");</script> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=<?php echo $setting['siteurl']; ?> "> <?php exit;