$defaults = array('status' => 'active', 'type' => 'regular'); if (!isset($_REQUEST['analyzed'])) { $_REQUEST = array_merge($_REQUEST, $defaults); } // Get settings from last import if (!is_array($_REQUEST['fields'])) { $last_import = GetValue('last_import'); if ($last_import != null) { $_REQUEST['fields'] = unserialize($last_import); } } $fields = explode('|', FileReadLine("{$GLOBALS['BASE_DIR']}/data/{$filename}")); $user_fields =& GetUserGalleryFields(); $field_options = array('IGNORE' => 'IGNORE', 'gallery_url' => 'Gallery URL', 'description' => 'Description', 'keywords' => 'Keywords', 'tags' => 'Tags', 'categories' => 'Categories', 'thumbnails' => 'Thumbnails', 'email' => 'E-mail Address', 'nickname' => 'Nickname', 'weight' => 'Weight', 'clicks' => 'Clicks', 'submit_ip' => 'Submit IP', 'sponsor_id' => 'Sponsor', 'type' => 'Type', 'format' => 'Format', 'date_scheduled' => 'Date Scheduled', 'date_deletion' => 'Date of Deletion', 'partner' => 'Partner', 'icons' => 'Icons', 'preview_url' => 'Preview URL', 'dimensions' => 'Preview Size'); foreach ($user_fields as $user_field) { $field_options[$user_field['name']] = StringChop($user_field['label'], 25); } include_once 'includes/header.php'; include_once 'includes/menu.php'; ?> <script language="JavaScript"> $(function() { $('#bad_category').bind('change', function() { if( this.options[this.selectedIndex].value == 'force' ) { $('#category_select').SlideInLeft(300); } else
function txGallerySearchSave() { global $DB, $json, $C; VerifyPrivileges(P_GALLERY, TRUE); $search_id = 0; $new = 1; $search = $DB->Row('SELECT * FROM `tx_saved_searches` WHERE `identifier`=?', array($_REQUEST['identifier'])); if ($search) { $DB->Update('UPDATE `tx_saved_searches` SET `fields`=? WHERE `search_id`=?', array($search['search_id'])); $search_id = $search['search_id']; $new = 0; } else { $DB->Update('INSERT INTO `tx_saved_searches` VALUES (?,?,?)', array(null, $_REQUEST['identifier'], $_REQUEST['fields'])); $search_id = $DB->InsertID(); } echo $json->encode(array('status' => JSON_SUCCESS, 'search_id' => $search_id, 'newsearch' => $new, 'identifier' => htmlspecialchars(StringChop($_REQUEST['identifier'], 40)))); }
function OptionTagsAdv($options, $selected, $value, $name, $max_length = 9999) { $html = ''; if (is_array($options)) { foreach ($options as $option) { $html .= "<option value=\"" . htmlspecialchars($option[$value]) . "\"" . (is_array($selected) && in_array($option[$value], $selected) || $option[$value] == $selected ? ' selected="selected"' : '') . ">" . htmlspecialchars(StringChop($option[$name], $max_length)) . "</option>\n"; } } return $html; }
</div> <form action="ajax.php" name="search" id="search" method="POST"> <table align="center" cellpadding="3" cellspacing="0" class="margin-top"> <tr> <td align="right"> <b>Search:</b> </td> <td colspan="2"> <select name="field"> <?php $field_options = array('title,description,keywords' => 'Title, Description or Keywords', 'lx_links.link_id' => 'Link ID', 'site_url' => 'Site URL', 'recip_url' => 'Recip URL', 'title' => 'Title', 'description' => 'Description', 'status' => 'Status', 'type' => 'Type', 'expires' => 'Expires', 'name' => 'Name', 'email' => 'E-mail Address', 'submit_ip' => 'Submit IP', 'keywords' => 'Keywords', 'clicks' => 'Clicks', 'ratings' => 'Number of Ratings', 'rating_avg' => 'Average Rating', 'weight' => 'Weight', 'date_added' => 'Date Added', 'date_modified' => 'Date Modified', 'date_scanned' => 'Date Scanned', 'icons' => 'Icon HTML', 'admin_comments' => 'Admin Comments', 'username' => 'Username'); $result = $DB->Query('SELECT * FROM lx_link_field_defs ORDER BY field_id'); while ($field = $DB->NextRow($result)) { $field_options[$field['name']] = StringChop($field['label'], 27); } $DB->Free($result); echo OptionTags($field_options, $_REQUEST['field']); ?> </select> <select name="search_type"> <option value="matches">Matches</option> <option value="contains">Contains</option> <option value="starts">Starts With</option> <option value="less">Less Than</option> <option value="greater">Greater Than</option> <option value="between">Between</option> <option value="empty">Empty</option> </select> <input type="text" name="search" size="30" value="<?php
function StringChopTooltip($string, $length, $center = FALSE, $append = null) { if (strlen($string) > $length) { $string = '<span title="' . $string . '" class="tt">' . StringChop($string, $length, $center, $append) . '</span>'; } return $string; }
function AdminFormField(&$options) { $options['tag_attributes'] = str_replace(array('"', '''), array('"', "'"), $options['tag_attributes']); switch ($options['type']) { case FT_CHECKBOX: if (strlen($options['label']) > 70) { $options['label'] = '<span title="' . $options['label'] . '">' . StringChop($options['label'], 70, true) . "</span>"; } if (preg_match('/value\\s*=\\s*["\']?([^\'"]+)\\s?/i', $options['tag_attributes'], $matches)) { $options['tag_attributes'] = 'class="checkbox" value="' . $matches[1] . '"'; } else { $options['tag_attributes'] = 'class="checkbox"'; } break; case FT_SELECT: if (strlen($options['label']) > 20) { $options['label'] = '<span title="' . $options['label'] . '">' . StringChop($options['label'], 20) . "</span>"; } $options['tag_attributes'] = ''; break; case FT_TEXT: if (strlen($options['label']) > 20) { $options['label'] = '<span title="' . $options['label'] . '">' . StringChop($options['label'], 20) . "</span>"; } $options['tag_attributes'] = 'size="70"'; break; case FT_TEXTAREA: if (strlen($options['label']) > 20) { $options['label'] = '<span title="' . $options['label'] . '">' . StringChop($options['label'], 20) . "</span>"; } $options['tag_attributes'] = 'rows="5" cols="80"'; break; } }
/** * Get the full category path for display */ function lxCategoryPath() { global $DB, $json, $C; $paths = array(); if ($_REQUEST['ids'] == '') { echo ''; return; } foreach (explode(',', $_REQUEST['ids']) as $id) { if ($id == 0) { $paths[] = 'Root'; } else { $category = $DB->Row('SELECT * FROM lx_categories WHERE category_id=?', array($id)); $path = unserialize($category['path_parts']); $parts = array(); foreach ($path as $part) { $parts[] = $part['name']; } $path = StringChop(join('/', $parts), 85, true, ' ... '); $path = str_replace(array('/'), array('<b>/</b>'), htmlspecialchars($path)); $paths[] = $path; } } echo $json->encode(array('status' => JSON_SUCCESS, 'html' => join('<br />', $paths))); }
]" id="reject_<?php echo $item['username']; ?> " class="reject" style="margin-left: 5px;"> <option value="">None</option> <?php if ($GLOBALS['_rejects_']) { ?> <?php foreach ($GLOBALS['_rejects_'] as $reject) { ?> <option value="<?php echo $reject['email_id']; ?> "><?php echo StringChop($reject['identifier'], 20); ?> </option> <?php } ?> <?php } ?> </select> </span> <?php } ?> </td> </tr>
</div> <?php } if ($item['admin_comments']) { ?> <div style="margin-top: 4px;"><b>Admin Comments:</b> <?php echo $item['admin_comments']; ?> </div> <?php } foreach ($GLOBALS['_user_fields_'] as $field) { if (!IsEmptyString($item[$field['name']])) { ?> <div style="margin-top: 4px;"><b><?php echo htmlspecialchars(StringChop($field['label'], 25)); ?> :</b> <?php echo htmlspecialchars($item[$field['name']]); ?> </div> <?php } } ?> <?php if ($item['is_edited']) { $edited = unserialize(base64_decode($item['edit_data']));
echo $item['news_id']; ?> "> <td valign="top"> <input type="checkbox" class="checkbox autocb" name="news_id[]" value="<?php echo $item['news_id']; ?> "> </td> <td valign="top"> <b><?php echo StringChopTooltip($item['headline'], 100); ?> </b><br /> <div style="margin-left: 20px;"><?php echo nl2br(StringChop($item['body'], 500)); ?> </div> </td> <td valign="top"> <?php echo date(DF_SHORT, strtotime($item['date_added'])); ?> </td> <td style="text-align: right;" class="last" valign="top"> <a href="index.php?r=lxShEditNews&news_id=<?php echo urlencode($item['news_id']); ?> " class="window function {title: 'Edit News Item'}"> <img src="images/edit.png" width="12" height="12" alt="Edit" title="Edit"></a> <a href="" onclick="return deleteSelected('<?php
<option value="selected">Selected Galleries</option> <option value="matching">All Matching Galleries</option> <option value="all">All Galleries</option> </select> <button type="button" onclick="executeFunction()">Execute</button> <div id="multi_email_selector" style="display: none; padding-top: 5px;"> <b>E-mail:</b> <select name="multi_email" id="multi_email"> <option value="">NONE</option> <?php $options = ''; $result = $DB->Query('SELECT `email_id`,`identifier` FROM `tx_rejections` ORDER BY `identifier`'); while ($rejection = $DB->NextRow($result)) { $options .= "<option value=\"{$rejection['email_id']}\">" . htmlspecialchars(StringChop($rejection['identifier'], 30)) . "</option>\n"; } $DB->Free($result); echo $options; ?> </select> </div> <div id="ban_reason_div" style="display: none; padding-top: 5px;"> <b>Reason:</b> <input type="text" name="ban_reason" value="" size="40" /> </div> </div> <div style="display: none;"> <button class="window {title: 'E-mail Submitters', callback: bulkMail}" id="mail_galleries"></button>
<?php if (!defined('LINKX')) { die("Access denied"); } $fields_search = array('lx_links.link_id' => 'Link ID', 'site_url' => 'Site URL', 'recip_url' => 'Recip URL', 'title' => 'Title', 'description' => 'Description', 'status' => 'Status', 'type' => 'Type', 'expires' => 'Expires', 'name' => 'Name', 'email' => 'E-mail Address', 'submit_ip' => 'Submit IP', 'keywords' => 'Keywords', 'clicks' => 'Clicks', 'ratings' => 'Number of Ratings', 'rating_avg' => 'Average Rating', 'weight' => 'Weight', 'date_added' => 'Date Added', 'date_modified' => 'Date Modified', 'date_scanned' => 'Date Scanned', 'icons' => 'Icon HTML', 'admin_comments' => 'Admin Comments', 'username' => 'Username'); $fields_update = array('site_url' => 'Site URL', 'recip_url' => 'Recip URL', 'title' => 'Title', 'description' => 'Description', 'name' => 'Name', 'email' => 'E-mail Address', 'submit_ip' => 'Submit IP', 'keywords' => 'Keywords', 'clicks' => 'Clicks', 'weight' => 'Weight', 'icons' => 'Icon HTML', 'admin_comments' => 'Admin Comments', 'username' => 'Username'); $result = $DB->Query('SELECT * FROM lx_link_field_defs ORDER BY field_id'); while ($field = $DB->NextRow($result)) { $fields_search[$field['name']] = StringChop($field['label'], 27); $fields_update[$field['name']] = StringChop($field['label'], 27); } $DB->Free($result); define('NODTD', TRUE); include_once 'includes/header.php'; ?> <div style="padding: 10px;"> <div class="margin-bottom"> <div style="float: right;"> <a href="docs/link-tasks.html" target="_blank"><img src="images/help.png" border="0" alt="Help" title="Help"></a> </div> Use the functions below to perform quick updates on multiple links </div> <?php if ($GLOBALS['message']) { ?> <div class="notice margin-bottom"> <?php echo $GLOBALS['message'];