function ArrayHSC(&$array) { if (!is_array($array)) { return; } foreach ($array as $key => $value) { if (is_array($array[$key])) { ArrayHSC($array[$key]); } else { $array[$key] = htmlspecialchars($array[$key], ENT_QUOTES); } } }
</fieldset> <?php $result = $DB->Query('SELECT * FROM lx_user_field_defs ORDER BY field_id'); ?> <fieldset<?php if ($DB->NumRows($result) < 1) { echo ' style="display: none;"'; } ?> > <legend>User Defined Fields</legend> <?php while ($field = $DB->NextRow($result)) { ArrayHSC($field); AdminFormField($field); ?> <div class="fieldgroup"> <?php if ($field['type'] != FT_CHECKBOX) { ?> <label for="<?php echo $field['name']; ?> "><?php echo $field['label']; ?> :</label> <?php
function GetLinkedPath(&$category) { global $DB; if ($category['category_id'] == 0) { return 'Root'; } $generated_path = ''; $sections = array('<a href="index.php?r=lxShBrowse">Root</a>'); $parts = unserialize($category['path_parts']); foreach ($parts as $part) { ArrayHSC($part); if ($part['category_id'] == $category['category_id']) { $sections[] = $part['name']; } else { $sections[] = "<a href=\"index.php?r=lxShBrowse&c={$part['category_id']}\">{$part['name']}</a>"; } } return join(' » ', $sections); }
function &GenericSearch($table, $files, $select_callback = null, $item_callback = null, $fields = null) { global $C, $DB, $BLIST_TYPES, $WLIST_TYPES, $ANN_LOCATIONS; $out = array('status' => JSON_SUCCESS, 'html' => '', 'pagination' => $GLOBALS['DEFAULT_PAGINATION'], 'pagelinks' => ''); $per_page = isset($_REQUEST['per_page']) && $_REQUEST['per_page'] > 0 ? $_REQUEST['per_page'] : 20; $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 1; $select = new SelectBuilder('*' . (empty($fields) ? '' : ', ' . $fields), $table); $override = FALSE; if (function_exists($select_callback)) { $override = $select_callback($select); } if (!$override) { $select->AddWhere($_REQUEST['field'], $_REQUEST['search_type'], $_REQUEST['search'], $_REQUEST['search_type'] != ST_EMPTY); } $select->AddOrder($_REQUEST['order'], $_REQUEST['direction']); if (!empty($_REQUEST['order_next'])) { $select->AddOrder($_REQUEST['order_next'], $_REQUEST['direction_next']); } $result = $DB->QueryWithPagination($select->Generate(), $select->binds, $page, $per_page); $out['pagination'] = $result; $out['pagelinks'] = PageLinks($result); if ($result['result']) { if (!is_array($files)) { $files = array($files); } $row_html = ''; foreach ($files as $file) { $row_html .= file_get_contents("includes/{$file}"); } while ($item = $DB->NextRow($result['result'])) { ArrayHSC($item); if (function_exists($item_callback)) { $item_callback($item); } ob_start(); eval('?>' . $row_html); $out['html'] .= ob_get_contents(); ob_end_clean(); } $DB->Free($result['result']); } return $out; }
function lxShGeneralSettings() { global $C; VerifyAdministrator(); CheckAccessList(); ArrayHSC($C); $C = array_merge($C, $GLOBALS['_server_'] == null ? GetServerCapabilities() : $GLOBALS['_server_']); include_once 'includes/settings-general.php'; }
echo "{$warning}<br />"; } ?> </div> <?php } ?> <fieldset> <legend>General Information</legend> <?php $domains =& $DB->FetchAll('SELECT * FROM `tx_domains` ORDER BY `domain`'); if (count($domains)) { ArrayHSC($domains); ?> <div class="fieldgroup"> <label for="domain">Domain:</label> <select id="domain"> <?php foreach ($domains as $domain) { ?> <option class="{base_url: '<?php echo $domain['base_url']; ?> ', document_root: '<?php echo $domain['document_root']; ?> '}"><?php echo $domain['domain'];
<div class="fieldgroup"> <label class="lesspad">Comments:</label> <?php echo StringChopTooltip($item['admin_comments'], 90); ?> </div> <?php } ?> <?php if ($item['edited']) { $edited = unserialize(base64_decode($item['edit_data'])); unset($edited['banner_data']); unset($edited['banner_url_local']); ArrayHSC($edited); ?> <div style="border: 1px solid #ffe7cb; background-color: #FFFFC8; padding: 3px; margin-left: 20px; margin-top: 8px;" class="edited_span"> <div style="float: right;"> <img src="images/check.png" border="0" width="12" height="12" alt="Approve" title="Click to approve" class="click" onclick="return processEditSelected('<?php echo $item['username']; ?> ', 'approve')"> <img src="images/x.png" border="0" width="12" height="12" alt="Reject" title="Click to reject" class="function click" onclick="return processEditSelected('<?php echo $item['username']; ?> ', 'reject')"> </div> <b style="color: #ff9112;">Edited Data</b><br /> <?php foreach ($edited as $name => $value) {
</div> <?php } ?> </fieldset> <fieldset> <legend>Referrer Stats</legend> <?php $result = $DB->Query('SELECT * FROM `tlx_account_referrer_stats` WHERE `username`=? ORDER BY `raw_in` DESC', array($_REQUEST['username'])); if ($DB->NumRows($result)) { while ($referrer = $DB->NextRow($result)) { ArrayHSC($referrer); ?> <div style="clear: both; margin-bottom: 5px;"> <div style="float: left; width: 80px; text-align: right; padding-right: 10px"> <?php echo number_format($referrer['raw_in'], null, $C['dec_point'], $C['thousands_sep']); ?> </div> <?php if ($referrer['referrer'] == '-') { ?> No Referrer <?php } else { ?> <a href="<?php
function txShAdministratorMail() { global $DB, $C; VerifyAdministrator(); ArrayHSC($_REQUEST); if (is_array($_REQUEST['username'])) { $_REQUEST['to'] = join(', ', $_REQUEST['username']); $_REQUEST['to_list'] = join(',', $_REQUEST['username']); } else { $_REQUEST['to'] = $_REQUEST['to_list'] = $_REQUEST['username']; } $function = 'txAdministratorMail'; include_once 'includes/email-compose.php'; }
if ($subcategories < 1) { ?> <div class="notice margin-top"> This category has no sub-categories </div> <?php } else { ?> <table width="100%" cellpadding="4" cellspacing="0"> <tr> <td width="33%" valign="top"> <?php $breakat = ceil($subcategories / 3); $counter = 0; while ($subcategory = $DB->NextRow($result)) { ArrayHSC($subcategory); $counter++; if ($subcategory['crosslink_id']) { $crosslink = $DB->Row('SELECT * FROM lx_categories WHERE category_id=?', array($subcategory['crosslink_id'])); } ?> <div style="padding-bottom: 6px;"> <?php if ($subcategory['crosslink_id']) { ?> <a href="index.php?r=lxShBrowse&c=<?php echo $crosslink['category_id']; ?> "><?php echo $subcategory['name'];
<?php if (!defined('TGPX')) { die("Access denied"); } $sizes = unserialize(GetValue('preview_sizes')); $gallery = $DB->Row('SELECT * FROM `tx_galleries` WHERE `gallery_id`=?', array($_REQUEST['gallery_id'])); ArrayHSC($gallery); $format = array(); if ($image) { $categories =& CategoriesFromTags($gallery['categories']); $format = GetCategoryFormat($gallery['format'], $categories[0]); $imagesize = @getimagesize($image); } $title = "Cropping For Gallery {$gallery['gallery_id']}"; include_once 'includes/header.php'; ?> <script language="JavaScript"> var select_focus = false; var thumb_queue = new Array(); var thumbs_found = 0; var thumbs_downloaded = 0; var thumb_height = null; var cropper_created = false; var max_width = 650; var max_height = 525; var resize_ratio = 1; var BIAS_CENTER = 0; var BIAS_TOP = 1;