forked from MightyGorgon/icy_phoenix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
credits.php
84 lines (75 loc) · 2.5 KB
/
credits.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/**
*
* @package Icy Phoenix
* @version $Id$
* @copyright (c) 2008 Icy Phoenix
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
*
* @Extra credits for this file
* Nivisec.com ([email protected])
*
*/
define('IN_ICYPHOENIX', true);
if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(IP_ROOT_PATH . 'common.' . PHP_EXT);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// End session management
include(IP_ROOT_PATH . 'includes/functions_credits.' . PHP_EXT);
$mode = request_var('mode', '', true);
/*
* Parse for modes...
*/
setup_hacks_list_array();
scan_hl_files();
switch($mode)
{
default:
{
$sql = 'SELECT * FROM ' . HACKS_LIST_TABLE . "
WHERE hack_hide = 'No'
ORDER BY hack_name ASC";
$result = $db->sql_query($sql, 0, 'credits_');
$row_class = '';
$i = 0;
while ($row = $db->sql_fetchrow($result))
{
$row_class = ip_zebra_rows($row_class);
$template->assign_block_vars('listrow', array(
'ROW_CLASS' => $row_class,
'HACK_ID' => $row['hack_id'],
'HACK_AUTHOR' => ($row['hack_author_email'] != '') ? ((USE_CRYPTIC_EMAIL) ? $row['hack_author'] . '<br />' . cryptize_hl_email($row['hack_author_email']) : '<a href="mailto:' . $row['hack_author_email'] . '">' . $row['hack_author'] . '</a>') : $row['hack_author'],
'HACK_WEBSITE' => ($row['hack_author_website'] != '') ? '<a target="blank" href="' . $row['hack_author_website'] . '">' . $row['hack_author_website'] . '</a>' : $lang['No_Website'],
'HACK_NAME' => ($row['hack_download_url'] != '') ? '<a target="blank" href="' . $row['hack_download_url'] . '">' . $row['hack_name'] . '</a>' : $row['hack_name'],
'HACK_DESC' => $row['hack_desc'],
//'HACK_VERSION' => ($row['hack_version'] != '') ? ' v' . $row['hack_version'] : ''));
'HACK_VERSION' => ($row['hack_version'] != '') ? $row['hack_version'] : ''
)
);
}
if (empty($i))
{
$template->assign_block_vars('empty_switch', array());
$template->assign_var('L_NO_HACKS', $lang['No_Hacks']);
}
}
}
$template->assign_vars(array(
'L_PAGE_NAME' => $meta_content['page_title'],
'S_MODE_ACTION' => append_sid(basename(__FILE__)),
'L_VERSION' => $lang['Version'],
'L_AUTHOR' => $lang['Author'],
'L_DESCRIPTION' => $lang['Description'],
'L_HACK_NAME' => $lang['Hack_Name'],
'L_WEBSITE' => $lang['Website']
)
);
full_page_generation('credits_display.tpl', $lang['Hacks_List'], '', '');
?>