Esempio n. 1
0
************************************************************************/
define('OPENLD_ROOT', './');
require OPENLD_ROOT . 'admin_header.php';
$req_page = isset($_REQUEST['page']) ? is_numeric($_REQUEST['page']) ? $_REQUEST['page'] : '1' : '1';
$req_id = isset($_REQUEST['id']) ? $_REQUEST['id'] : '0';
$req_cat = isset($_REQUEST['category']) ? $_REQUEST['category'] : '';
($hook = get_hook('admin_browse_before_sql_input_check')) ? eval($hook) : null;
//SQL Operations
if (isset($_REQUEST['delete'])) {
    delete_category($_REQUEST['delete']);
} elseif (isset($_REQUEST['delete_link'])) {
    delete_link($_REQUEST['delete_link']);
} elseif (isset($_REQUEST['move_cat_sql'])) {
    move_category($req_id, $req_page, $_REQUEST['move_cat_sql'], $_REQUEST['to_new_parent']);
} elseif (isset($_REQUEST['move_link_sql'])) {
    move_link($req_id, $req_page, $_REQUEST['move_link_sql'], $_REQUEST['to_new_parent']);
} elseif (isset($_REQUEST['edit_cat_sql'])) {
    edit_a_category($req_id, $req_page, $_REQUEST['cat_id']);
} elseif (isset($_REQUEST['edit_link_sql'])) {
    edit_a_link($req_id, $req_page, $_REQUEST['edit_link_sql']);
} elseif (isset($_REQUEST['add_a_link'])) {
    add_a_link($req_id);
} elseif (isset($_REQUEST['add_a_category'])) {
    add_a_category($req_id);
} elseif (isset($_REQUEST['unaccept'])) {
    unaccept_category($_REQUEST['unaccept']);
} elseif (isset($_REQUEST['unaccept_link'])) {
    unaccept_link($_REQUEST['unaccept_link']);
}
($hook = get_hook('admin_browse_after_sql_ops')) ? eval($hook) : null;
//Now Dig for categories which content we will display later
Esempio n. 2
0
  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 . 'admin_header.php';
$req_page = isset($_REQUEST['page']) ? is_numeric($_REQUEST['page']) ? $_REQUEST['page'] : '1' : '1';
$req_id = isset($_REQUEST['id']) ? $_REQUEST['id'] : '0';
$req_cat = isset($_REQUEST['category']) ? $_REQUEST['category'] : '';
//SQL Operations
if (isset($_REQUEST['delete_link'])) {
    delete_link($_REQUEST['delete_link']);
} elseif (isset($_REQUEST['move_link_sql'])) {
    move_link(0, $_REQUEST['page'], $_REQUEST['move_link_sql'], $_REQUEST['to_new_parent']);
} elseif (isset($_REQUEST['edit_link_sql'])) {
    edit_a_link(0, $_REQUEST['page'], $_REQUEST['edit_link_sql']);
} elseif (isset($_REQUEST['unaccept_link'])) {
    unaccept_link($_REQUEST['unaccept_link']);
}
($hook = get_hook('admin_links_after_sql_ops')) ? eval($hook) : null;
$query = array('SELECT' => '*', 'FROM' => 'links', 'WHERE' => 'active=1', 'ORDER BY' => 'type DESC, ' . $settings['links_sorting_by']);
($hook = get_hook('admin_links_sql')) ? eval($hook) : null;
$links_result = $db->query_build($query) or error("can't dig links", __FILE__, __LINE__);
$start_limit = $settings['number_of_links_per_page'] * (intval($req_page) > 0 ? intval($req_page) - 1 : 0);
$query['LIMIT'] = $start_limit . ", " . $settings['number_of_links_per_page'];
($hook = get_hook('admin_links_limit_sql')) ? eval($hook) : null;
$result_limit = $db->query_build($query) or error("can't dig links with result_limit", __FILE__, __LINE__);
$page = 'admin/admin_links.php';
require OPENLD_ROOT . 'admin_footer.php';