function sliders_huge_it_slider() { require_once "sliders.php"; require_once "sliders.html.php"; if (!function_exists('print_html_nav')) { require_once "slider_function/html_slider_func.php"; } if (isset($_GET["task"])) { $task = $_GET["task"]; } else { $task = ''; } if (isset($_GET["id"])) { $id = $_GET["id"]; } else { $id = 0; } global $wpdb; switch ($task) { case 'add_cat': add_slider(); break; case 'add_shortcode_post': add_shortcode_post(); break; case 'popup_posts': if ($id) { popup_posts($id); } break; case 'popup_video': if ($id) { popup_video($id); } else { $id = $wpdb->get_var("SELECT MAX( id ) FROM " . $wpdb->prefix . "huge_itslider_sliders"); popup_video($id); } break; case 'edit_cat': if ($id) { editslider($id); } else { $id = $wpdb->get_var("SELECT MAX( id ) FROM " . $wpdb->prefix . "huge_itslider_sliders"); editslider($id); } break; case 'save': if ($id) { apply_cat($id); } case 'apply': if ($id) { apply_cat($id); editslider($id); } break; case 'remove_cat': removeslider($id); showslider(); break; default: showslider(); break; } }
function videogallerys_huge_it_videogallery() { require_once "admin/video_gallery_func.php"; require_once "admin/video_gallery_view.php"; if (!function_exists('print_html_nav')) { require_once "videogallery_function/html_videogallery_func.php"; } if (isset($_GET["task"])) { $task = $_GET["task"]; } else { $task = ''; } if (isset($_GET["id"])) { $id = $_GET["id"]; } else { $id = 0; } global $wpdb; switch ($task) { case 'add_cat': add_videogallery(); break; case 'popup_posts': if ($id) { popup_posts($id); } else { $id = $wpdb->get_var("SELECT MAX( id ) FROM " . $wpdb->prefix . "huge_it_videogallery_galleries"); popup_posts($id); } break; case 'videogallery_video': if ($id) { videogallery_video($id); } else { $id = $wpdb->get_var("SELECT MAX( id ) FROM " . $wpdb->prefix . "huge_it_videogallery_galleries"); videogallery_video($id); } break; case 'edit_cat': if ($id) { editvideogallery($id); } else { $id = $wpdb->get_var("SELECT MAX( id ) FROM " . $wpdb->prefix . "huge_it_videogallery_galleries"); editvideogallery($id); } break; case 'save': if ($id) { apply_cat($id); } case 'apply': if ($id) { apply_cat($id); editvideogallery($id); } break; case 'remove_cat': removevideogallery($id); showvideogallery(); break; default: showvideogallery(); break; } }
function Categories_Spider_Catalog() { ////////including functions for categories require_once "Categories.php"; require_once "Categories.html.php"; if (!function_exists('print_html_nav')) { require_once "nav_function/nav_html_func.php"; } if (isset($_GET["task"])) { $task = $_GET["task"]; } else { $task = ''; } if (isset($_GET["id"])) { $id = $_GET["id"]; } else { $id = 0; } global $wpdb; switch ($task) { case 'add_cat': add_category(); break; case 'publish_cat': $nonce_sp_cat = $_REQUEST['_wpnonce']; if (!wp_verify_nonce($nonce_sp_cat, 'nonce_sp_cat')) { die("Are you sure you want to do this?"); } change_cat($id); showCategory(); break; case 'publish': check_admin_referer('nonce_sp_cat', 'nonce_sp_cat'); publish_all(TRUE); showCategory(); break; case 'unpublish_cat': $nonce_sp_cat = $_REQUEST['_wpnonce']; if (!wp_verify_nonce($nonce_sp_cat, 'nonce_sp_cat')) { die("Are you sure you want to do this?"); } change_cat($id); showCategory(); break; case 'unpublish': check_admin_referer('nonce_sp_cat', 'nonce_sp_cat'); publish_all(FALSE); showCategory(); break; case 'edit_cat': if ($id) { editCategory($id); } else { $id = $wpdb->get_var("SELECT MAX( id ) FROM " . $wpdb->prefix . "spidercatalog_product_categories"); editCategory($id); } break; case 'save': if ($id) { check_admin_referer('nonce_sp_cat', 'nonce_sp_cat'); apply_cat($id); } else { save_cat(); check_admin_referer('nonce_sp_cat', 'nonce_sp_cat'); } showCategory(); break; case 'apply': if ($id) { check_admin_referer('nonce_sp_cat', 'nonce_sp_cat'); apply_cat($id); editCategory($id); } else { check_admin_referer('nonce_sp_cat', 'nonce_sp_cat'); $true = save_cat(); if ($true) { $id = $wpdb->get_var("SELECT MAX( id ) FROM " . $wpdb->prefix . "spidercatalog_product_categories"); editCategory($id); } else { ?> <h1>Database Error Please install plugin again</h1><?php showCategory(); } } break; case 'remove_cat': $nonce_sp_cat = $_REQUEST['_wpnonce']; if (!wp_verify_nonce($nonce_sp_cat, 'nonce_sp_cat')) { die("Are you sure you want to do this?"); } removeCategory($id); showCategory(); break; case 'delete': check_admin_referer('nonce_sp_cat', 'nonce_sp_cat'); delete_all(); showCategory(); break; default: showCategory(); break; } }
function portfolios_huge_it_portfolio() { require_once "admin/portfolios_func.php"; require_once "admin/portfolios_view.php"; if (!function_exists('print_html_nav')) { require_once "portfolio_function/html_portfolio_func.php"; } if (isset($_GET["task"])) { $task = $_GET["task"]; } else { $task = ''; } if (isset($_GET["id"])) { $id = $_GET["id"]; } else { $id = 0; } global $wpdb; switch ($task) { case 'add_cat': add_portfolio(); break; case 'edit_cat': if ($id) { editportfolio($id); } else { $id = $wpdb->get_var("SELECT MAX( id ) FROM " . $wpdb->prefix . "huge_itportfolio_portfolios"); editportfolio($id); } break; case 'save': if ($id) { apply_cat($id); } case 'apply': if ($id) { apply_cat($id); editportfolio($id); } break; case 'remove_cat': removeportfolio($id); showportfolio(); break; default: showportfolio(); break; } }
function huge_it_catalog_albums_page() { require_once "admin/albums_func.php"; require_once "admin/albums_view.php"; // show_albums(); if (isset($_GET["del_review"])) { $del_review_id = $_GET["del_review"]; } if (isset($_GET["task"])) { $task = $_GET["task"]; } else { $task = ''; } if (isset($_GET["id"])) { $id = $_GET["id"]; } else { $id = 0; } global $wpdb; switch ($task) { case 'add_album': add_album(); break; if (isset($_GET["del_id"])) { if ($_GET["del_id"] != '') { $wpdb->query($wpdb->prepare("DELETE FROM " . $wpdb->prefix . "huge_it_catalog_rating WHERE id = '%d' ", $_GET["del_id"])); header("Location: admin.php?page=catalogs_huge_it_catalog&id=" . $_GET['id'] . "&task=ratings&prod_id=" . $_GET['prod_id'] . "&TB_iframe=1"); } } break; case 'edit_album': if ($id) { edit_album($id); } else { $id = $wpdb->get_var("SELECT MAX( id ) FROM " . $wpdb->prefix . "huge_it_catalogs"); edit_album($id); } break; case 'save': if ($id) { apply_cat($id); } case 'apply': if ($id) { apply_cat($id); edit_album($id); } break; case 'remove_cat': removecatalog($id); showcatalog(); break; case 'remove_album': remove_album($id); show_albums(); break; default: show_albums(); break; } wp_enqueue_style("admin_css", plugins_url("style/admin.style.css", __FILE__), FALSE); }