?> admin/index.php?act=memberscomment&remove=notta'; } </script> <?php foreach ($_POST['checkbox'] as $box) { $query = yasDB_select("SELECT userid FROM memberscomments WHERE id = '{$box}'", false); if ($query->num_rows == 0) { echo '<center>You cannot delete this members comment that does not exist!<br />'; echo '<a href="index.php?act=memberscomment">Click here to go back</a></center>'; } else { if ($_GET['remove'] != 'notta') { $row = $query->fetch_array(MYSQLI_ASSOC); $query->close(); yasDB_delete("DELETE FROM memberscomments WHERE id = '{$box}'", false); ?> <meta http-equiv="refresh" content="0;URL=<?php echo $setting['siteurl']; ?> admin/index.php?act=memberscomment" /> <?php } } } } else { if (isset($_GET['page'])) { $pageno = $_GET['page']; } else { $pageno = 1; }
break; case 'vasco': $installed = yasDB_select("SELECT `id` FROM `games` WHERE `source` = 'VASCOGAMES' AND `sourceid` = " . $row['sourceid']); if ($installed->num_rows > 0) { $success = true; } else { $success = install_vascogame($row['sourceid']); } break; default: break; } if ($success) { $orderresult = yasDB_select("SELECT `order` FROM `gameque` WHERE `source` = '" . $row['source'] . "' AND `sourceid` = " . $row['sourceid']); $order = $orderresult->fetch_array(); yasDB_delete("DELETE FROM `gameque` WHERE `source` = '" . $row['source'] . "' AND `sourceid` = " . $row['sourceid']); yasDB_update("UPDATE `gameque` SET `order` = `order` - 1 WHERE `order` > {$order[0]}"); } } } if ($jobs['gameque'][0] == 7) { $jobs['gameque'][1] = $plus_week; } else { if ($jobs['gameque'][0] == 30) { $jobs['gameque'][1] = $plus_month; } else { $jobs['gameque'][1] = $midnight_today; } } doLog("GameQue update triggered by visitor " . $displayIp); }
window.location.href = '<?php echo $setting['siteurl'];?>admin/index.php?act=links'; } </script> <?php*/ foreach ($_POST['checkbox'] as $box) { $query = yasDB_select("SELECT id FROM links WHERE id = '{$box}'", false); if ($query->num_rows == 0) { echo '<center>You cannot delete a link that does not exist!<br />'; echo '<a href="index.php?act=links">Click here to go back</a></center>'; } else { if ($_GET['remove'] != 'notta') { $row = $query->fetch_array(MYSQLI_ASSOC); $row['id']; $query->close(); yasDB_delete("delete from links where id = '{$box}'", false); ?> <meta http-equiv="refresh" content="0;URL=<?php echo $setting['siteurl']; ?> admin/index.php?act=links" /> <?php } } } } else { if (isset($_GET['page'])) { $pageno = $_GET['page']; } else { $pageno = 1; }
?> admin/index.php?act=news&remove=notta'; } </script> <?php foreach ($_POST['checkbox'] as $box) { $query = yasDB_select("SELECT id, date, news_text, topic FROM news WHERE id = '{$box}'", false); if ($query->num_rows == 0) { echo '<center>You cannot delete this news that does not exist!<br />'; echo '<a href="index.php?act=news">Click here to go back</a></center>'; } else { if ($_GET['remove'] != 'notta') { $row = $query->fetch_array(MYSQLI_ASSOC); $query->close(); yasDB_delete("DELETE FROM news WHERE id = '{$box}'", false); ?> <meta http-equiv="refresh" content="0;URL=<?php echo $setting['siteurl']; ?> admin/index.php?act=news" /> <?php } } } } elseif (isset($_POST['add'])) { $news = yasDB_clean($_POST['news_text']); $topic = yasDB_clean($_POST['topic']); yasDB_insert("INSERT INTO news (date, news_text, topic) values ('{$_POST['date']}', '{$news}', '{$_POST['topic']}')"); echo 'News entry Successfully added!<br />'; echo '<a href="index.php?act=news">Click here to proceed!</a>';
?> admin/index.php?act=manage_users&remove=notta'; } </script> <?php foreach ($_POST['checkbox'] as $box) { $query = yasDB_select("SELECT username FROM user WHERE id = '{$box}'", false); if ($query->num_rows == 0) { echo '<center>You cannot delete a user that does not exist!<br />'; echo '<a href="index.php?act=manage_users">Click here to go back</a></center>'; } else { if ($_GET['remove'] != 'notta') { $row = $query->fetch_array(MYSQLI_ASSOC); $query->close(); yasDB_delete("delete from user where id = '{$box}'", false); ?> <meta http-equiv="refresh" content="0;URL=<?php echo $setting['siteurl']; ?> admin/index.php?act=manage_users" /> <?php } } } } else { if (isset($_GET['page'])) { $pageno = $_GET['page']; } else { $pageno = 1; }
<?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"> <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>
} else { echo '<center><a href="index.php?act=brokenfiles">Click here to proceed</a></p></center>'; } } } elseif (!empty($_GET['delete'])) { $query = yasDB_select("SELECT id, file, thumbnail, source, sourceid FROM games WHERE id = " . intval($_GET['delete']), false); if ($query->num_rows == 0) { echo '<center>You cannot delete a game that does not exist!<br />'; echo '<a href="index.php?act=managegames">Click here to go back</a></center>'; } else { $table = array('MOCHI' => 'mochigames', 'FGD' => 'fgdfeed', 'PLAYTOMIC' => 'playtomicfeed', 'FOG' => 'fogfeed', 'KONGREGATE' => 'kongregate', 'VASCOGAMES' => 'vascogames'); $row = $query->fetch_array(MYSQLI_ASSOC); @unlink('../' . $row['file']); @unlink('../' . $row['thumbnail']); $query->close(); yasDB_delete("delete from games where id = " . intval($_GET['delete']), false); if ($row['source'] != 'OTHER') { if ($row['source'] == 'MOCHI' || $row['source'] == 'PLAYTOMIC') { yasDB_update("UPDATE `" . $table[$row['source']] . "` SET `isinstalled` = '0' WHERE `id` = " . $row['sourceid']); } else { yasDB_update("UPDATE `" . $table[$row['source']] . "` SET `installed` = '0' WHERE `id` = " . $row['sourceid']); } } echo '<center><p style="text-align:center;">Game successfully deleted.<br />'; echo '<a href="index.php?act=managegames">Click here to proceed</a></p></center>'; } } else { $catName = array(); $catId = array(); $i = 0; $query = yasDB_select("SELECT id, name FROM categories", false);
?> admin/index.php?act=managetopics&remove=notta'; } </script> <?php foreach ($_POST['checkbox'] as $box) { $query = yasDB_select("SELECT id, name FROM forumtopics WHERE id = '{$box}'", false); if ($query->num_rows == 0) { echo '<center>You cannot delete a topic that does not exist!<br />'; echo '<a href="index.php?act=managetopics">Click here to go back</a></center>'; } else { if ($_GET['remove'] != 'notta') { $row = $query->fetch_array(MYSQLI_ASSOC); $query->close(); yasDB_delete("delete from forumtopics where id = '{$box}'", false); yasDB_update("UPDATE `user` set topics = topics -1 WHERE name = '{$row['name']}'"); // deletes a topic from user total yasDB_update("UPDATE `user` set totalposts = totalposts -1 WHERE username = '******'name']}'"); // deletes a topic from user total post count ?> <meta http-equiv="refresh" content="0;URL=<?php echo $setting['siteurl']; ?> admin/index.php?act=managetopics" /> <?php } } } } else { if (isset($_GET['page'])) {
include "../includes/db_functions.inc.php"; foreach ($_POST['checkbox'] as $box) { if (!is_numeric($box)) { exit; } $box = intval($box); $query = yasDB_select("SELECT `id`, `file`, `thumbnail`, `thumbnail_200`, `source`, `sourceid` FROM `games` WHERE `id` = {$box}", false); if ($query->num_rows != 0) { $row = $query->fetch_array(MYSQLI_ASSOC); @unlink('../' . $row['file']); @unlink('../' . $row['thumbnail']); if ($row['thumbnail'] != '') { @unlink('../' . $row['thumbnail_200']); } $query->close(); yasDB_delete("DELETE FROM `games` WHERE id = '{$box}'", false); switch ($row['source']) { case 'MOCHI': yasDB_update("UPDATE `mochigames` SET `isinstalled` = 0 WHERE `id` = {$row['sourceid']}"); break; case 'FGD': yasDB_update("UPDATE `fgdfeed` SET `installed` = 0 WHERE `id` = {$row['sourceid']}"); break; case 'PLAYTOMIC': yasDB_update("UPDATE `playtomicfeed` SET `isinstalled` = 0 WHERE `id` = {$row['sourceid']}"); break; case 'FOG': yasDB_update("UPDATE `fogfeed` SET `installed` = '0' WHERE `id` = {$row['sourceid']}"); break; case 'KONGREGATE': yasDB_update("UPDATE `kongregate` SET `installed` = '0' WHERE `id` = {$row['sourceid']}");
<?php foreach ($_POST['checkbox'] as $box) { if (!is_numeric($box)) { echo 'Invalid POST data'; exit; } $box = intval($box); $query = yasDB_select("SELECT id FROM comments WHERE id = " . $box, false); if ($query->num_rows == 0) { echo '<center>You cannot delete this comment that does not exist!<br />'; echo '<a href="index.php?act=comments">Click here to go back</a></center>'; } else { if ($_GET['remove'] != 'notta') { $row = $query->fetch_array(MYSQLI_ASSOC); $query->close(); yasDB_delete("DELETE FROM comments WHERE id = " . $box, false); ?> <meta http-equiv="refresh" content="0;URL=<?php echo $setting['siteurl']; ?> admin/index.php?act=comments" /> <?php } } } } else { if (isset($_GET['page'])) { $pageno = intval($_GET['page']); } else { $pageno = 1; }
} </script> <?php foreach ($_POST['checkbox'] as $box) { $query = yasDB_select("SELECT id, file, thumbnail FROM downgames WHERE id = '{$box}'", false); if ($query->num_rows == 0) { echo '<center>You cannot delete a game that does not exist!<br />'; echo '<a href="index.php?act=managedowngame">Click here to go back</a></center>'; } else { if ($_GET['remove'] != 'notta') { $row = $query->fetch_array(MYSQLI_ASSOC); @unlink('../ourgames/img/' . $row['file']); @unlink('../ourgames/games/' . $row['thumbnail']); $query->close(); yasDB_delete("delete from downgames where id = '{$box}'", false); ?> <meta http-equiv="refresh" content="0;URL=<?php echo $setting['siteurl']; ?> admin/index.php?act=managedowngame" /> <?php } } } } else { if (isset($_GET['page'])) { $pageno = $_GET['page']; } else { $pageno = 1; }
private function delete_user() { yasDB_delete("DELETE FROM useronline WHERE timestamp < ({$this->timestamp} - {$this->timeout})"); }
if ($action == 'que') { $check = yasDB_select("SELECT `source` FROM `gameque` WHERE `source` = '{$type}' AND `sourceid` = {$id}"); if ($check->num_rows > 0) { echo "Game already in Queue"; exit; } $maxresult = yasDB_select("SELECT `order` FROM `gameque` ORDER BY `order` DESC LIMIT 1"); if ($maxresult->num_rows == 0) { $order = 1; } else { $max = $maxresult->fetch_array(); $order = $max[0] + 1; } $result = yasDB_insert("INSERT INTO `gameque` (source, sourceid, title, thumb, `order`) VALUES ('{$type}', {$id}, '{$title}', '{$thumb}', {$order})"); if ($result) { echo "Game successfully added to scheduled game queue."; } else { echo "Database error, unable to queue game."; } } else { $orderresult = yasDB_select("SELECT `order` FROM `gameque` WHERE `source` = '{$type}' AND `sourceid` = {$id}"); $order = $orderresult->fetch_array(); $result = yasDB_delete("DELETE FROM `gameque` WHERE `source` = '{$type}' AND `sourceid` = {$id} LIMIT 1"); yasDB_update("UPDATE `gameque` SET `order` = `order` - 1 WHERE `order` > {$order[0]}"); if ($result) { echo "Game successfully removed from install queue."; } else { echo "Database error, unable to remove game from queue."; } } }
require_once "../../../includes/resize.php"; require_once "../../../includes/pagination.class.php"; function prepGame($title) { $title = str_replace(" ", "-", $title); $title = str_replace("'", "_", $title); $title = str_replace('"', "_", $title); $title = str_replace('/', "_", $title); $title = str_replace("\\", "_", $title); return rawurlencode($title); } if (isset($_SESSION["user"])) { $user = $_SESSION["user"]; $userid = $_SESSION['userid']; if (isset($_POST['favourite'])) { yasDB_delete("DELETE FROM favourite WHERE userid='{$userid}' AND gameid = '{$_POST['gamedelete']}'", false); } $result = yasDB_select("SELECT gameid FROM favourite WHERE userid='{$_SESSION['userid']}'", false); $numrows = $result->num_rows; $result->close(); if ($numrows == 0) { echo "<center><h3>You have no favorite games.</h3></center>"; } else { $pageurl = new pagination($numrows, $setting['seo'], 'favourites', $setting['gperpage'], 3); $query = yasDB_select("SELECT * FROM favourite WHERE userid= '{$userid}' LIMIT " . $pageurl->start . ", " . $pageurl->limit); while ($row = $query->fetch_array(MYSQLI_ASSOC)) { $games = yasDB_select("SELECT * FROM games WHERE id = '{$row['gameid']}'"); $games = $games->fetch_array(MYSQLI_ASSOC); $gameurl = prepGame($games['file']); $games['description'] = stripslashes($games['description']); if (strlen($games['description']) > 75) {
$query2 = yasDB_select("SELECT `source`, `sourceid` FROM `gameque` WHERE `order` = " . intval($action[1])); $new = $query2->fetch_array(); $old = $query1->fetch_array(); yasDB_select("UPDATE `gameque` SET `order` = `order` +1 WHERE `source` = '{$new[0]}' AND `sourceid` = {$new[1]}"); yasDB_select("UPDATE `gameque` SET `order` = `order` - 1 WHERE `source` = '{$old[0]}' AND `sourceid` = {$old[1]}"); } break; } } exit; } if (isset($_GET['delete'])) { $ident = explode(',', $_GET['delete']); $query1 = yasDB_select("SELECT `order` FROM `gameque` WHERE `source` = '" . yasDB_clean($ident[0]) . "' AND `sourceid` = " . intval($ident[1])); $order = $query1->fetch_array(); $deleteResult = yasDB_delete("DELETE FROM `gameque` WHERE `source` = '" . yasDB_clean($ident[0]) . "' AND `sourceid` = " . intval($ident[1])); yasDB_update("UPDATE `gameque` SET `order` = `order` - 1 WHERE `order` > {$order[0]}"); } ?> <script language="JavaScript"> function Check(chk) { if(document.deleteform.Check_All.value=="Check All"){ for (i = 0; i < chk.length; i++) { chk[i].checked = true; } document.deleteform.Check_All.value="UnCheck All"; } else { for (i = 0; i < chk.length; i++) { chk[i].checked = false; } document.deleteform.Check_All.value="Check All";
?> admin/index.php?act=categories&remove=notta'; } </script> <?php foreach ($_POST['checkbox'] as $box) { $query = yasDB_select("SELECT id FROM categories WHERE id = '{$box}'", false); if ($query->num_rows == 0) { echo '<center>You cannot delete this categorie that does not exist!<br />'; echo '<a href="index.php?act=categories">Click here to go back</a></center>'; } else { if ($_GET['remove'] != 'notta') { $row = $query->fetch_array(MYSQLI_ASSOC); $query->close(); yasDB_delete("DELETE FROM categories WHERE id = '{$box}'", false); ?> <meta http-equiv="refresh" content="0;URL=<?php echo $setting['siteurl']; ?> admin/index.php?act=categories" /> <?php } } } } elseif (isset($_POST['add'])) { $query = yasDB_select("SELECT id FROM `categories` where name = '{$_POST['name']}'", false); if ($query->num_rows != 0) { $query->close(); echo '<center>Sorry, that category already exists.<br/>'; echo '<a href="index.php?act=categories">Click here to go back</a></center>';
<?php @ob_start(); @session_start(); include "includes/db_functions.inc.php"; include "includes/config.inc.php"; $ref = $_SERVER['HTTP_REFERER']; if (isset($_SESSION['user']) || isset($_SESSION['userid'])) { $memberid = intval($_SESSION['userid']); yasDB_delete("DELETE FROM membersonline WHERE memberid='{$memberid}'"); session_unset(); session_destroy(); setcookie("user", '', time() - 172800); header("Location: " . $setting['siteurl']); exit; } else { header("Location: " . $setting['siteurl'] . "index.php?act=register"); } @ob_end_flush(); exit;
?> admin/index.php?act=manageforumcats&remove=notta'; } </script> <?php foreach ($_POST['checkbox'] as $box) { $query = yasDB_select("SELECT id FROM forumcats WHERE id = '{$box}'", false); if ($query->num_rows == 0) { echo '<center>You cannot delete this categorie that does not exist!<br />'; echo '<a href="index.php?act=manageforumcats">Click here to go back</a></center>'; } else { if ($_GET['remove'] != 'notta') { $row = $query->fetch_array(MYSQLI_ASSOC); $query->close(); yasDB_delete("DELETE FROM forumcats WHERE id = '{$box}'", false); ?> <meta http-equiv="refresh" content="0;URL=<?php echo $setting['siteurl']; ?> admin/index.php?act=manageforumcats" /> <?php } } } } elseif (isset($_POST['add'])) { $query = yasDB_select("SELECT id FROM `forumcats` where name = '{$_POST['name']}'", false); if ($query->num_rows != 0) { $query->close(); echo '<center>Sorry, that category already exists.<br/>'; echo '<a href="index.php?act=manageforumcats">Click here to go back</a></center>';
?> admin/index.php?act=newsblogcomments&remove=notta'; } </script> <?php foreach ($_POST['checkbox'] as $box) { $query = yasDB_select("SELECT id FROM newsblog WHERE id = " . intval($box), false); if ($query->num_rows == 0) { echo '<center>You cannot delete this news comment that does not exist!<br />'; echo '<a href="index.php?act=newsblogcomments">Click here to go back</a></center>'; } else { if ($_GET['remove'] != 'notta') { $row = $query->fetch_array(MYSQLI_ASSOC); $query->close(); yasDB_delete("DELETE FROM newsblog WHERE id = " . intval($box), false); ?> <meta http-equiv="refresh" content="0;URL=<?php echo $setting['siteurl']; ?> admin/index.php?act=newsblogcomments" /> <?php } } } } else { if (isset($_GET['page'])) { $pageno = $_GET['page']; } else { $pageno = 1; }
$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>'; echo '<center><br><a href="index.php?act=ads">Click to continue.</a></center>'; } else { echo '<br/>'; $ads = yasDB_select("SELECT * FROM `ads` ORDER BY id asc", false); while ($row = $ads->fetch_array(MYSQLI_ASSOC)) { $ad = '<?php '; $ad .= 'echo ad("' . $row['id'] . '");'; $ad .= ' ?>'; ?> <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="edit_ads" method="post" action="index.php?act=ads">
</script> <?php foreach ($_POST['checkbox'] as $box) { $query = yasDB_select("SELECT id, name FROM forumposts WHERE id = '{$box}'", false); if ($query->num_rows == 0) { echo '<center>You cannot delete a post that does not exist!<br />'; echo '<a href="index.php?act=manageposts">Click here to go back</a></center>'; } else { if ($_GET['remove'] != 'notta') { $row = $query->fetch_array(MYSQLI_ASSOC); yasDB_update("UPDATE `user` set posts = posts -1 WHERE username = '******'name']}'"); // add a post to the user yasDB_update("UPDATE `user` set totalposts = totalposts -1 WHERE username = '******'name']}'"); // add a post to the user Total $query->close(); yasDB_delete("delete from forumposts where id = '{$box}'", false); ?> <meta http-equiv="refresh" content="0;URL=<?php echo $setting['siteurl']; ?> admin/index.php?act=manageposts" /> <?php } } } } else { if (isset($_GET['page'])) { $pageno = $_GET['page']; } else { $pageno = 1; }