OpenLD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ************************************************************************/ define('OPENLD_ROOT', './'); require OPENLD_ROOT . "header.php"; ($hook = get_hook('suggest_category_before_input_check')) ? eval($hook) : null; if (!empty($_POST)) { $id = isset($_POST['id']) && is_numeric($_POST['id']) ? $_POST['id'] : 0; $_POST = openld_trim_array($_POST); $error->check_category_title($_POST['title'] = check_if_null($_POST['title']), check_if_null($id)); $error->check_category_description($_POST['description'] = check_if_null($_POST['description'])); //and print to sql $if_active_by_default = 0; ($hook = get_hook('suggest_category_input_control')) ? eval($hook) : null; if ($error->transform_error()) { $query = array('INSERT' => 'title, description, active, father_id, created', 'INTO' => 'categories', 'VALUES' => '"' . $db->escape($_POST['title']) . '", "' . $db->escape($_POST['description']) . '", ' . $if_active_by_default . ', ' . intval($id) . ', NOW()'); ($hook = get_hook('suggest_sql')) ? eval($hook) : null; $db->query_build($query) or error("Writing suggest category information to database was impossible", __FILE__, __LINE__); } } $page = "suggest_category.php"; ($hook = get_hook('suggest_category_before_page')) ? eval($hook) : null; require "footer.php";
OpenLD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ************************************************************************/ define('OPENLD_ROOT', './'); require "header.php"; $req_page = isset($_GET['page']) ? intval($_GET['page']) : '1'; ($hook = get_hook('search_before_input_check')) ? eval($hook) : null; if (isset($_GET['term'])) { $_GET = openld_trim_array($_GET); if ($_GET['search_type'] == 'categories') { $s_from = 'categories'; $s_active = OPENLD_IF_ACTIVE_CATS; } else { $s_from = 'links'; $s_active = OPENLD_IF_ACTIVE_LINKS; } $query = array('SELECT' => '*', 'FROM' => $s_from); if ($_GET['search_in'] == 'title' || $_GET['search_in'] == 'description') { $query['WHERE'] = $db->escape($_GET['search_in']) . " LIKE '%" . $db->escape($_GET['term']) . "%'" . $s_active; } switch ($_GET['sort_by']) { case "alphabetical": $query['ORDER BY'] = $db->escape($_GET['search_in']); break;
<div id="openldbb-admain1" class="openld-adblock openld-adform"> <h2><span>Category Adder</span></h2> <div class="openld-adcontent"> <?php if (isset($_POST['add_categories']) && isset($_POST['category'])) { ?> <div class='adformpanel'> <fieldset id='admin-welcome'> <legend><span>The following categories have been added:</span></legend> <div class='fieldgroup'> <ul> <?php $categories = openld_trim_array(explode("\n", $_POST['add_categories'])); foreach ($categories as $category) { $query = array('INSERT' => 'title, active, father_id, created', 'INTO' => 'categories', 'VALUES' => '"' . $db->escape($category) . '", 1, ' . intval($_POST['category']) . ', NOW()'); $db->query_build($query) or error("category: " . $db->escape($category) . " = " . intval($_POST['category']), __FILE__, __LINE__); echo "<li>" . $category . "</li>"; } ?> </ul> </div> </fieldset> </div> <?php } ?> <p class="buttoned hasheading"> Separate the categories with a linebreak. <br /><br /> </p> <form accept-charset="utf-8" method="post" action="<?php
$pay->print_log(); } break; case 'cancel': $success_message = PAYMENT_CANCELLED; break; case 'success': $success_message = SUBMIT_SUCCESS; break; } } ($hook = get_hook('submit_before_input_check')) ? eval($hook) : null; if (!empty($_POST) && (isset($_POST['title']) || isset($_POST['url']))) { $_GET['cat_id'] = isset($_REQUEST['cat_id']) && is_numeric($_REQUEST['cat_id']) ? $_REQUEST['cat_id'] : 0; $_POST = openld_trim_array($_POST); $_REQUEST = openld_trim_array($_REQUEST); $_POST['url'] = remove_last_slash($_POST['url']); if ($settings['reciprocal_links_option'] == 'Y' && $_POST['linktype'] == 'reciprocal') { $error->check_linktype(check_if_null($_POST['linktype']), $_POST['reciprocal_url'] = check_if_null($_POST['reciprocal_url']), check_if_null($_POST['url'])); } else { $error->check_linktype(check_if_null($_POST['linktype']), null, check_if_null($_POST['url'])); } $error->check_link_email($_POST['email'] = check_if_null($_POST['email'])); $error->check_name($_POST['name'] = check_if_null($_POST['name'])); $error->check_link_title($_POST['title'] = check_if_null($_POST['title'])); $error->check_link_description($_POST['description'] = check_if_null($_POST['description'])); $error->check_link_url($_POST['url'] = check_if_null($_POST['url'])); $error->check_link_category_id(check_if_null($_POST['cat_id'])); $if_reciprocal_column_name = $settings['reciprocal_links_option'] == 'Y' && $_POST['linktype'] == 'reciprocal' ? ', reciprocal_url' : ''; //goes into the DB.. no lang variable $if_reciprocal_column_value = $settings['reciprocal_links_option'] == 'Y' && $_POST['linktype'] == 'reciprocal' ? ', ' . "'" . $db->escape($_POST['reciprocal_url']) . "'" : '';