<?php require_once '../../config.php'; include '../secure.php'; if ($login_status != 1) { exit; } include '../../includes/core.php'; $id = $_POST['id']; $q = mysql_query("SELECT * FROM ava_cats WHERE id={$id}"); $r = mysql_fetch_array($q); $category_name = htmlspecialchars($r['name']); $tags = TagList($r['id'], ", ", 0); ?> <div class="form_container"> <br /> <form id="form1" name="form1" method="post" action="includes/edit_category_submit.php"> <div class="form_element_container"> <div class="form_lable"> <label>Category name</label></div> <div class="form_element"><input class="text_box" name="category_name" type="text" id="category_name<?php echo $r['id']; ?> " value="<?php echo $category_name; ?> " /></div> </div> <div class="form_element_container"> <div class="form_lable"><label>Description</label></div>
$ur = mysql_query("SELECT * FROM ava_ratings WHERE game_id={$id} AND user_id='{$user['id']}'"); $user_rating = mysql_fetch_array($ur); $game['new_rating_form'] = GenerateRating($user_rating['rating'], 'view_game'); } else { $game['new_rating_form'] = '<div id="rateMe" title="Rate Me..."> <a onclick="rateIt(this, ' . $id . ')" id="_1" title="1" onmouseover="rating(this)" onmouseout="off(this)"></a> <a onclick="rateIt(this, ' . $id . ')" id="_2" title="2" onmouseover="rating(this)" onmouseout="off(this)"></a> <a onclick="rateIt(this, ' . $id . ')" id="_3" title="3" onmouseover="rating(this)" onmouseout="off(this)"></a> <a onclick="rateIt(this, ' . $id . ')" id="_4" title="4" onmouseover="rating(this)" onmouseout="off(this)"></a> <a onclick="rateIt(this, ' . $id . ')" id="_5" title="5" onmouseover="rating(this)" onmouseout="off(this)"></a> </div>'; } } else { $game['new_rating_form'] = GAME_LOGIN_TO_RATE; } $game['tags'] = TagList($row2['id'], " ", 1); if ($game['tags'] == '') { $game['tags'] = NO_TAGS; } if ($user['login_status'] == 1) { $user_has_highscore = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM ava_highscores WHERE user= {$user['id']} AND game = {$id}"), 0); if ($user_has_highscore) { $style = 'display: inherit'; $message = HIGHSCORE_ALREADY_SUBMITTED; } else { $style = 'display: none'; $message = HIGHSCORE_SUBMITTED; } $game['game_message'] = '<div id="game_message" style="' . $style . '">' . $message . ' - <a href="#" id="challenge_link" onclick="ShowPopup(\'ava-popup\', \'' . $setting['site_url'] . '/includes/view_game/ajax/challenge_friend.php?id=' . $game['id'] . '\', \'' . CHALLENGE_HEADING . '\'); return false">' . CHALLENGE_A_FRIEND_LONG . '</a></div>'; } else { $game['game_message'] = '';