本文整理汇总了PHP中apply_cat函数的典型用法代码示例。如果您正苦于以下问题:PHP apply_cat函数的具体用法?PHP apply_cat怎么用?PHP apply_cat使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了apply_cat函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sliders_huge_it_slider
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;
}
}
示例2: videogallerys_huge_it_videogallery
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;
}
}
示例3: Categories_Spider_Catalog
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();
//.........这里部分代码省略.........
示例4: portfolios_huge_it_portfolio
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;
}
}
示例5: huge_it_catalog_albums_page
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);
}