Last change
on this file since 9745 was
9745,
checked in by mistic100, 13 years ago
|
[extensions] Contest Results
- New bloc for PWG Stuffs
- Use new admin links and javascript implementation
- Distinguish pending and running contests (both pending before)
|
File size:
829 bytes
|
Line | |
---|
1 | <?php |
---|
2 | define('PHPWG_ROOT_PATH','../../../'); |
---|
3 | define('IN_ADMIN', true); |
---|
4 | include_once(PHPWG_ROOT_PATH.'include/common.inc.php'); |
---|
5 | |
---|
6 | $image = pwg_query("SELECT id, name, file, path, tn_ext |
---|
7 | FROM " . IMAGES_TABLE . " |
---|
8 | WHERE id = " . pwg_db_real_escape_string($_GET['image_id']) . ";"); |
---|
9 | |
---|
10 | if (!pwg_db_num_rows($image)) { |
---|
11 | //$themeconf = $template->get_template_vars('themeconf'); |
---|
12 | //$data['TN_SRC'] = $themeconf['admin_icon_dir'] . '/errors.png'; |
---|
13 | $data['TN_SRC'] = 'admin/themes/default/icon/errors.png'; |
---|
14 | $data['IMAGE_NAME'] = 'N/A'; |
---|
15 | |
---|
16 | } else { |
---|
17 | $image = pwg_db_fetch_assoc($image); |
---|
18 | $data['TN_SRC'] = get_thumbnail_url($image); |
---|
19 | $data['IMAGE_NAME'] = (empty($image['name'])) ? get_name_from_file($image['file']) : $image['name']; |
---|
20 | } |
---|
21 | |
---|
22 | echo "<img src='" . str_replace('../../.', '', $data['TN_SRC']) . "'/><br>" . $data['IMAGE_NAME']; |
---|
23 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.