<?php echo '<ul>'; $sql = mysql_query("SELECT * FROM ava_games WHERE published=1 ORDER BY hits desc LIMIT 10"); while ($row = mysql_fetch_array($sql)) { $url = GameUrl($row['id'], $row['seo_url'], $row['category_id']); $name = shortenStr($row['name'], $template['module_max_chars']); if ($setting['module_thumbs'] == 1) { $image_url = GameImageUrl($row['image'], $row['import'], $row['url']); $image = '<img src="' . $image_url . '" width="25" height="25" style="vertical-align: middle;" alt="' . $row['name'] . '" /> '; } else { $image = ''; } echo '<li>' . $image . '<a href="' . $url . '">' . $name . '</a></li>'; } echo '</ul>';
$count = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM ava_highscores WHERE user = {$id}"), 0); if ($count >= 1) { $query = mysql_query("SELECT * FROM ava_highscores WHERE user = {$id} ORDER BY score desc LIMIT 10"); echo '<ul class="user_highscore_list"> <li> <div id="user_highscore_header"> <div class="user_highscore_name">' . GAME . '</div> <div class="user_highscore_score">' . HIGHSCORE_SCORE . '</div> </div> </li>'; while ($highscore = mysql_fetch_array($query)) { $game_query = mysql_query("SELECT * FROM ava_games WHERE id = {$highscore['game']}"); $highscore_game = mysql_fetch_array($game_query); $date = FormatDate($highscore['date'], 'short'); $game_url = GameUrl($highscore_game['id'], $highscore_game['seo_url'], $highscore_game['category_id']); $game_thumbnail = GameImageUrl($highscore_game['image'], $highscore_game['import'], $highscore_game['url']); echo '<li> <div class="user_highscore_container"> <div class="user_highscore_avatar"> <a href="' . $game_url . '"><img src="' . $game_thumbnail . '" width="30" height="30"/></a> </div> <div class="user_highscore_name"><a href="' . $game_url . '">' . shortenStr($highscore_game['name'], 15) . '</a></div> <div class="user_highscore_score">' . $highscore['score'] . '</div> </div> </li>'; } echo '</ul>'; } else { echo '<div class="user_no_highscores">' . HIGHSCORE_NONE . '</div>'; }
if ($cpage == 1) { $cline = 0; } else { $cline = $cpage * $p_scale - $p_scale; } $limit = $cline + $p_scale; if ($limit >= $total_bnum) { $limit = $total_bnum; } $p_scale1 = $limit - $cline; $query2 = "select * from messenger where receiveid_fk='{$_SESSION['id']}'And receive_del='N'\r\n\t\t\t\t\t\t\t\torder by mnum desc limit {$cline}, {$p_scale1}"; $result2 = mysql_query($query2, $connect); for ($i = 0; $rows2 = @mysql_fetch_array($result2); $i++) { $bunho = $total_bnum - ($i + $cline) + 1; //원하는 크기만큼 잘라서 내용을 보여주기 위해 util.php 파일의 shortenStr()함수를 불러내 필요한 길이의 값을 만든 뒤 화면에 출력함 $msg_char = shortenStr($rows2[message], 20); ?> <tr> <td align="center" class="line"> <input type="checkbox" name="mnum[]" value="<?php echo $rows2[mnum]; ?> "></td> <td align="center"class ="line"> <?php echo $rows2[sendid_fk]; ?> </td> <td class="line"> <a href="message_view.php? mnum=<?php
if (isset($page) && $page > 1) { $page_info = PAGE . ' ' . $page . ' - '; } if (isset($_GET['sortby'])) { $sort = secure($_GET['sortby']); $sort_info = $sort_options[$sort] . ' - '; } echo '<meta name="description" content="' . $cat_info['name'] . ' ' . $sort_info . $page_info . shortenStr(strip_tags($cat_info['description']), 157) . '" /> <meta name="keywords" content="' . $cat_info['keywords'] . '" />'; } else { if (isset($_GET['task']) && $_GET['task'] == 'news' && (isset($_GET['id']) || isset($_GET['name']))) { echo '<meta name="description" content="' . shortenStr(strip_tags($news['content']), 157) . '" /> <meta name="keywords" content="' . $news['meta_tags'] . '" />'; } else { if (isset($_GET['task']) && $_GET['task'] == 'view_page') { echo '<meta name="description" content="' . shortenStr(strip_tags($page['page']), 157) . '" /> <meta name="keywords" content="' . $page['meta_tags'] . '" />'; } else { if (isset($_GET['task']) && $_GET['task'] == 'topic') { echo '<meta name="description" content="' . shortenStr($topic['first_post_content'], 157) . '" /> <meta name="keywords" content="' . $page['meta_tags'] . '" />'; } else { echo '<meta name="description" content="' . $setting['site_description'] . '" /> <meta name="keywords" content="' . $setting['site_keywords'] . '" />'; } } } } } ?> <meta name="generator" content="AV Arcade" />
<div class="bottomBOXES"> <div class="cubeBOX"> <p class="cubeBOX_title">Latest News</p> <ul> <?php $sql = mysql_query("SELECT * FROM ava_news ORDER BY id desc LIMIT 5"); while ($row = mysql_fetch_array($sql)) { $url = NewsUrl($row['id'], $row['seo_url']); $title = shortenStr($row['title'], $template['module_max_chars']); if ($setting['module_thumbs'] == 1) { $image_url = $setting['site_url'] . '/uploads/news_icons/' . $row['image']; $image = '<img src="' . $image_url . '" width="25" height="25" style="vertical-align: middle;" />'; } else { $image = ''; } echo '<li class="news">' . $image . ' <a href="' . $url . '">' . $title . '</a></li>'; } ?> </ul> </div> <div class="cubeBOX"> <p class="cubeBOX_title">Newest Games</p> <ul> <?php include './includes/modules/newest.php'; ?> </ul> </div>
include './templates/purpledino/sections/newest.php'; ?> <div class="contentleft"> <div class="generalgames_top"> <p>Most popular Games</p> </div> <div class="generalgames_box_home"> <ul> <?php $sql = mysql_query("SELECT * FROM ava_games WHERE published=1 ORDER BY hits desc LIMIT 20"); while ($row = mysql_fetch_array($sql)) { $i++; $url = GameUrl($row['id'], $row['seo_url'], $row['category_id']); $name = shortenStr($row['name'], 18); if ($setting['module_thumbs'] == 1) { $image_url = GameImageUrl($row['image'], $row['import'], $row['url']); $image = '<img class="GThumb_home" src="' . $image_url . '" alt="' . $row['name'] . '" /> '; } else { $image = ''; } echo '<li><a href="' . $url . '" class="tooltip" title="' . $row['name'] . '">' . $image . '<br />' . $name . '</a></li>'; if ($i == 10) { echo '<div style="float:right; width: 336px; background-color: #d1d1d1; height: 280px; margin: 0 0 6px 0;">'; include './templates/purpledino/sections/advert.php'; echo $big_square; echo '</div>'; } } ?>
$isimg = isImg($rec[$field]); if ($isimg) { $out .= "<img src=\"" . $rec[$field] . "\" style=\"max-width:99%; max-height:99%\" onload=\"javascript: var baseSize=118; if(this.width > baseSize){ this.style.width = baseSize+'px';}else if(this.height > baseSize){ this.style.height=baseSize+'px'; } \" id=\"img_" . $rec[$field] . "\" />"; } else { $out .= "" . shortenStr($rec[$field], $list_disp_limit) . ""; } $out .= "</a>"; # <br/>".$rec[$field]."</td>"; } else { if ($gtbl->getExtraInput($field) != '') { $out .= "<td ondblclick=\"javascript:show('span_disp_" . $field . "','" . $gtbl->getExtraInput($field) . "&act=" . $act . "&field=" . $field . "&otbl=" . $tbl . "&oldv=" . $rec[$field] . "&oid=" . $id . "',true,true);\" title=\"" . addslashes($rec[$field]) . "\">" . shortenStr($rec[$field], $list_disp_limit) . " <span id=\"span_disp_" . $field . "\"> </span> <div id=\"extrainput_" . $act . "_" . $field . "\" class=\"extrainput\"> </div> </td>"; $listid[$dispi] = $rec[$field]; } else { $fv = str_replace('<', '<', $rec[$field]); $fv_short = $fv_orig = $fv; $fv_short = shortenStr($fv, $list_disp_limit); $fhref = $gtbl->getHref($field, $rec); if (count($fhref) > 0) { if (strpos($fhref[0], "javascript") !== false) { $fv_short = "<a href=\"javascript:void(0);\" onclick=\"" . $fhref[0] . "\" title=\"" . $fhref[1] . "\" target=\"" . $fhref[2] . "\">" . $fv_short . "</a>"; } else { $fv_short = "<a href=\"" . $fhref[0] . "\" title=\"" . $fhref[1] . "\" target=\"" . $fhref[2] . "\">" . $fv_short . "</a>"; } } $out .= "<td ondblclick=\"javascript:switchEditable('othercont_div_" . $id . "_" . $field . "','" . $field . "','" . $inputtype . "','','" . $url . "&act=updatefield&field=" . $field . "&id=" . $id . "','" . $gtbl->getReadOnly($field) . "');\" title=\"" . str_replace("\"", "", $fv_orig) . "\" " . $gtbl->getCss($field) . "><div id=\"othercont_div_" . $id . "_" . $field . "\">" . $fv_short . "</div></td>"; $listid[$dispi] = $rec[$field]; } } } } # hmsum, sum or count each item
function GameData($raw_data, $type) { global $setting, $template, $user; $game = array('id' => $raw_data['id'], 'instructions' => nl2br($raw_data['instructions']), 'plays' => $raw_data['hits'], 'highscores' => $raw_data['highscores'], 'seo_url' => $raw_data['seo_url'], 'category' => $raw_data['category_id'], 'submitter' => $raw_data['submitter']); if ($type != 'view_game') { $description_stripped = htmlspecialchars(strip_tags($raw_data['description'])); } if (isset($template[$type . '_game_chars'])) { $game['name'] = shortenStr($raw_data['name'], $template[$type . '_game_chars']); } else { $game['name'] = $raw_data['name']; } if (isset($template[$type . '_game_desc_chars'])) { $game['description'] = shortenStr($description_stripped, $template[$type . '_game_desc_chars']); } else { $game['description'] = $raw_data['description']; } $game['url'] = GameUrl($raw_data['id'], $raw_data['seo_url'], $raw_data['category_id']); $game['image_url'] = GameImageUrl($raw_data['image'], $raw_data['import'], $raw_data['url']); if ($raw_data['highscores'] == 1) { $game['highscore_image'] = $template['highscore_image']; } else { $game['highscore_image'] = ''; } if ($user['admin'] == 1) { $game['admin_edit'] = '<a href="' . $setting['site_url'] . '/admin/?task=manage_games#id=' . $raw_data['id'] . '">Edit</a>'; } else { $game['admin_edit'] = ''; } $game['date_added'] = FormatDate($raw_data['date_added'], 'date'); // Define the overall rating for use in the template $game['rating'] = $game['rating_image'] = GenerateRating($raw_data['rating'], $type); $game['rating_value'] = $raw_data['rating']; // Get the submitter name and URL if ($raw_data['submitter'] != 0) { $submitter = mysql_fetch_array(mysql_query("SELECT * FROM ava_users WHERE id = {$raw_data['submitter']}")); $game['submitter_name'] = $submitter['username']; $game['submitter_url'] = ProfileUrl($submitter['id'], $submitter['seo_url']); } return $game; }
} } $query = mysql_query("SELECT * FROM ava_fog WHERE {$where} AND visible = 0 ORDER BY id DESC LIMIT {$from}, {$max_results}"); $categories = ''; $cq = mysql_query("SELECT * FROM ava_cats ORDER BY cat_order ASC"); while ($ca = mysql_fetch_array($cq)) { $categories .= '<option value="' . $ca['id'] . '">'; if ($ca['parent_id'] != 0) { $categories .= ' '; } $categories .= $ca['name'] . '</option>'; } while ($go = mysql_fetch_array($query)) { $categorya = ''; $height = $go['height'] + 100; $description = shortenStr($go['description'], 300); echo ' <div id="game-' . $go['id'] . '" class="mochi_item"><div class="manage_column0"><img src="' . $go['thumb_url'] . '" width="40" height="40"></div><div id="tgame_name' . $go['id'] . '" class="fog_column">' . $go['name'] . ' <span class="mochi_details"> Tags: ' . $go['tags'] . '</span><br /><div title="' . $go['description'] . '" class="mochi_description">' . $description . '</div></div> <div class="mochi_column3" id="download-icon-' . $go['id'] . '"><img src="images/dl.png" width="24" height="24" onclick="AddGame(' . $go['id'] . ', ' . "'" . $go['fog_id'] . "'" . ');" /></img></div> <div class="mochi_column3" id="category-container-' . $go['id'] . '"><select name="category" id="category' . $go['id'] . '"> ' . $categories . ' </select></div> <div class="mochi_column3" id="play-icon-' . $go['id'] . '"><img src="images/go.png" width="24" height="24" onclick="PlayGame(' . $go['id'] . ', ' . $height . ');" /></div> <div class="mochi_column3" id="reject-icon-' . $go['id'] . '"><img src="images/no.png" width="24" height="24" onclick="RejectGame(' . $go['id'] . ');" /></div> <div id="edit-game-' . $go['id'] . '" class="edit_game_container">'; echo '</div></div>';