当前位置: 首页>>代码示例>>PHP>>正文


PHP editCategory函数代码示例

本文整理汇总了PHP中editCategory函数的典型用法代码示例。如果您正苦于以下问题:PHP editCategory函数的具体用法?PHP editCategory怎么用?PHP editCategory使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了editCategory函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: defined

 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
require_once JApplicationHelper::getPath('admin_html');
// get parameters from the URL or submitted form
$section = JRequest::getCmd('section', 'com_content');
$cid = JRequest::getVar('cid', array(0), '', 'array');
JArrayHelper::toInteger($cid, array(0));
switch (JRequest::getCmd('task')) {
    case 'add':
        editCategory(false);
        break;
    case 'edit':
        editCategory(true);
        break;
    case 'moveselect':
        moveCategorySelect($option, $cid, $section);
        break;
    case 'movesave':
        moveCategorySave($cid, $section);
        break;
    case 'copyselect':
        copyCategorySelect($option, $cid, $section);
        break;
    case 'copysave':
        copyCategorySave($cid, $section);
        break;
    case 'go2menu':
    case 'go2menuitem':
开发者ID:Fellah,项目名称:govnobaki,代码行数:31,代码来源:admin.categories.php

示例2: newCategory

/**
 * newCategory()
 *
 * @return
 */
function newCategory()
{
    editCategory();
}
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:9,代码来源:admin_cat_manager.php

示例3: addCat

    }
    return $msg;
}
//Control logic
if ($privs >= 4) {
    //manager or admin
    $msg = '';
    if (isset($_POST['addExe'])) {
        $msg = addCat($cat);
    } elseif (isset($_POST['updExe'])) {
        $msg = updateCat($cat);
    } elseif (isset($_GET['delExe'])) {
        $msg = deleteCat($cat);
    }
    echo "<p class='error'>{$msg}</p>\n\t\t<div class='scrollBoxAd'>\n\t\t<div class='centerBox'>\n";
    if ($mode == 'sort') {
        sortCategories();
        //sort on name
    }
    if ($mode != 'add' and $mode != 'edit' or isset($_POST['back'])) {
        showCategories(false);
        //no add / no edit
    } else {
        editCategory($cat);
        //add or edit
        showCategories(true);
    }
    echo "</div>\n</div>\n";
} else {
    echo "<p class='error'>{$ax['no_way']}</p>\n";
}
开发者ID:sanluca,项目名称:py-acqua-hw,代码行数:31,代码来源:categories.php

示例4: array

             break;
         }
     }
 case 'editcategory':
     if ($isallowed && $mode == 'editcategory') {
         $smarty->assign('languages', $lang->listLanguages());
         $grouplist = $rights->getAllGroups();
         $smarty->assign('groups', $grouplist);
         if (isset($_POST['save'])) {
             $assigned_groups = array();
             foreach ($grouplist as $group) {
                 if (@$_POST['group_' . $group['groupid']] == '1') {
                     $assigned_groups[] = $group['groupid'];
                 }
             }
             editCategory($categoryid, $_POST['name'], $assigned_groups, $_POST['language']);
         } else {
             $breadcrumbs->addElement($lang->get('editcategory'), makeURL($mod, array('mode' => 'editcategory', 'categoryid' => $categoryid)));
             $category = getCategory($categoryid);
             $smarty->assign('category', $category);
             $assigned_groups = array_row($db->selectList('media_categories_permissions', '*', '`categoryid`=' . $categoryid), 'groupid');
             $smarty->assign('permissions', $assigned_groups);
             $smarty->assign('path', $template_dir . "/editcategory.tpl");
             break;
         }
     }
 case 'createcategory':
     if ($isallowed && $mode == 'createcategory') {
         $smarty->assign('languages', $lang->listLanguages());
         $grouplist = $rights->getAllGroups();
         $smarty->assign('groups', $grouplist);
开发者ID:tech-nik89,项目名称:lpm4,代码行数:31,代码来源:media.mod.php

示例5: switch

/* TEST DE LA VARIABLE ACTION PASSER EN AJAX 
	POUR DETERMINER QUELLE FONCTION EST APPELER */
if (isset($_POST['action']) && !empty($_POST['action'])) {
    $action = $_POST['action'];
    switch ($action) {
        case 'getAllCategoriesDT':
            echo getAllCategoriesDT();
            break;
        case 'deleteCategory':
            $id = $_POST['id'];
            echo deleteCategory($id);
            break;
        case 'editCategory':
            $id = $_POST['id'];
            $category = $_POST['category'];
            echo editCategory($id, $category);
            break;
        case 'createCategory':
            $category = $_POST['category'];
            echo createCategory($category);
            break;
    }
}
function getAllCategoriesDT()
{
    global $bdd, $_TABLES;
    if (!is_null($bdd) && !is_null($_TABLES)) {
        $content = '<thead>';
        $content .= '<tr>';
        $content .= '<th>Id</th>';
        $content .= '<th>Category</th>';
开发者ID:xXNoceboXx,项目名称:WUS,代码行数:31,代码来源:category.controller.php

示例6: editConfig

 case "config":
     editConfig($fpss_config, $option);
     break;
     // CATEGORIES
 // CATEGORIES
 case "cancel_category":
     cancelCategory($option);
     break;
 case "categories":
     showCategories($option);
     break;
 case "new_category":
     editCategory(0, $option);
     break;
 case "edit_category":
     editCategory($cid, $option);
     break;
 case "save_category":
     saveCategory($option);
     break;
 case "delete_category":
     deleteCategories($option);
     break;
 case "publish_category":
     publishCategories(1, $option);
     break;
 case "unpublish_category":
     publishCategories(0, $option);
     break;
     // SLIDES
 // SLIDES
开发者ID:bizanto,项目名称:Hooked,代码行数:31,代码来源:admin.fpss.php

示例7: defined

*/
/** ensure this file is being included by a parent file */
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
require_once $mainframe->getPath('admin_html');
// get parameters from the URL or submitted form
$section = mosGetParam($_REQUEST, 'section', '');
$cid = mosGetParam($_REQUEST, 'cid', array(0));
if (!is_array($cid)) {
    $cid = array(0);
}
switch ($task) {
    case "new":
        editCategory(0, $section);
        break;
    case "edit":
        editCategory(intval($cid[0]));
        break;
    case "moveselect":
        moveCategorySelect($option, $cid, $section);
        break;
    case "movesave":
        moveCategorySave($option, $cid, $section);
        break;
    case "copyselect":
        copyCategorySelect($option, $cid, $section);
        break;
    case "copysave":
        copyCategorySave($option, $cid, $section);
        break;
    case "save":
        saveCategory();
开发者ID:cwcw,项目名称:cms,代码行数:31,代码来源:admin.categories.php

示例8: mysql_close

"></p>
</form>
<?php 
}
if (!$_SESSION["user_id"]) {
    mysql_close($link);
    header("Location: " . $path . "login.php?return_to=" . $PHP_SELF);
} else {
    include "includes/header.php";
    $query = mysql_query("SELECT add_categories from " . $table_prefix . "users where user_id = " . $_SESSION["user_id"] . " limit 1");
    $row = mysql_fetch_row($query);
    if ($row[0] == 1) {
        $edit = true;
    } else {
        echo "<p class=\"warning\">" . $lang["not_authorized_edit_categories"] . "</p>\n";
    }
}
if ($edit) {
    switch ($_REQUEST["mode"]) {
        case "edit_category":
            editCategory($id);
            break;
        case "delete_category":
            deleteCategory($id);
            break;
        default:
            showCategories();
            break;
    }
}
include "includes/footer.php";
开发者ID:AwelEshetu,项目名称:school_projects,代码行数:31,代码来源:edit_categories.php

示例9: array

    if (strlen($name) < 3 || strlen($name) > 32) {
        $error['name'] = $lang['error_category_name'];
    }
    if (empty($error)) {
        if ($action == "insert") {
            $insert_data = array('name' => $name);
            $insert_query = insertCategory($insert_data);
            if ($insert_query) {
                $_SESSION['success'] = $lang['success_insert'];
            } else {
                $error_warning = $lang['error_query'];
            }
        } else {
            if ($action == "update") {
                $edit_data = array('categoryId' => $category_id, 'name' => $name);
                $edit_query = editCategory($edit_data);
                if ($edit_query) {
                    $_SESSION['success'] = $lang['success_edit'];
                } else {
                    $_SESSION['error_warning'] = $lang['error_query'];
                }
            }
        }
        header('Location:category.html');
    } else {
        $error_name = $error['name'];
    }
}
?>

<div id="content">
开发者ID:nvcDeb,项目名称:CoinCod,代码行数:31,代码来源:category_form.php

示例10: 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();
//.........这里部分代码省略.........
开发者ID:jazzindizzin,项目名称:Quality-Timber-Doors,代码行数:101,代码来源:catalog.php

示例11: _editCategory

 function _editCategory($post)
 {
     $retval = true;
     require_once './include/spCategory.inc.php';
     if ($post) {
         $this->_ajaxResult = editCategory($this->_db, $this->_action);
     } else {
         if ($this->_action !== ACT_BMCAT_ADD) {
             getCategory($this->_db, $GLOBALS[ARG_BMCAT_ID]);
         }
         $this->_theme->render('dlgCatEdit.tpl');
     }
 }
开发者ID:spremi,项目名称:spmarks,代码行数:13,代码来源:spApplication.inc.php

示例12: switch

}
switch ($cmd) {
    case "addCategory":
        addCategory();
        break;
    case "finishCategory":
        finishCategory($_POST['name'], $_POST['parent'], $_POST['image']);
        break;
    case "addBlogEntry":
        addBlogEntry($_POST['blog_category']);
        break;
    case "finishBlogEntry":
        finishBlogEntry($_POST['entry_category'], $_POST['entry_title'], $_POST['entry_text'], $_POST['entry_ext_text']);
        break;
    case "editCategory":
        editCategory($_GET['id']);
        break;
    case "finishEditCategory":
        finishEditCategory($_POST['id'], $_POST['name'], $_POST['parent'], $_POST['image']);
        break;
    case "deleteCategory":
        deleteCategory($_GET['id']);
        break;
    case "edit":
        editBlogEntry($_GET['id']);
        break;
    case "finishEdit":
        finishEditBlogEntry($_POST['id'], $_POST['editBlogCategory'], $_POST['editBlogTitle'], $_POST['editBlogText'], $_POST['editBlogExtText']);
        break;
    case "delete":
        deleteBlogEntry($_GET['id']);
开发者ID:BackupTheBerlios,项目名称:jonescms,代码行数:31,代码来源:blog.php

示例13: defined

// no direct access
defined('_VALID_MOS') or die('Restricted access');
require_once $mainframe->getPath('admin_html');
define('COM_IMAGE_BASE', $mosConfig_absolute_path . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'stories');
// get parameters from the URL or submitted form
$section = stripslashes(strval(mosGetParam($_REQUEST, 'section', 'content')));
$cid = josGetArrayInts('cid');
switch ($task) {
    case 'new':
        editCategory(0, $section);
        break;
    case 'edit':
        editCategory(intval($cid[0]));
        break;
    case 'editA':
        editCategory(intval($id));
        break;
    case 'moveselect':
        moveCategorySelect($option, $cid, $section);
        break;
    case 'movesave':
        moveCategorySave($cid, $section);
        break;
    case 'copyselect':
        copyCategorySelect($option, $cid, $section);
        break;
    case 'copysave':
        copyCategorySave($cid, $section);
        break;
    case 'go2menu':
    case 'go2menuitem':
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:31,代码来源:admin.categories.php

示例14: dbQuery

                dbQuery("UPDATE [db]categories SET sequence=" . $count++ . " WHERE category_id = " . $row['cid']);
            }
        }
    }
    return $msg;
}
//Control logic
if ($privs >= 4) {
    //manager or admin
    $msg = '';
    if (isset($_POST['addExe'])) {
        $msg = addCat();
    } elseif (isset($_POST['updExe'])) {
        $msg = updateCat();
    } elseif (isset($_GET['delExe'])) {
        $msg = deleteCat();
    }
    echo "<p class='error'>{$msg}</p>\n\t\t<div class='scrollBoxAd'>\n\t\t<div class='centerBox'>\n";
    if (!$editCat or isset($_POST['back'])) {
        showCategories(false);
        //no edit
    } else {
        editCategory($editCat, $cid);
        //action = "add" or "edit"
        showCategories(true);
        //edit
    }
    echo "</div>\n</div>\n";
} else {
    echo "<p class='error'>{$ax['no_way']}</p>\n";
}
开发者ID:krievley,项目名称:schedule,代码行数:31,代码来源:categories.php

示例15: redirectPageWithoutSession

require_once $_SERVER['DOCUMENT_ROOT'] . '/LibraryManagement/Classes/Entity/Account.php';
redirectPageWithoutSession();
require_once $_SERVER['DOCUMENT_ROOT'] . '/LibraryManagement/Classes/Global/PreDefinedConstants.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/LibraryManagement/Classes/Global/CommonFunctions.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/LibraryManagement/Classes/DatabaseLogic/DBConnection.php';
$actionType = ACTION_ADD;
// Default Action
if (isset($_GET[ACTION_TYPE]) && $_GET[ACTION_TYPE] != NULL) {
    switch ($_GET[ACTION_TYPE]) {
        case ACTION_EDIT:
            $actionType = ACTION_EDIT;
            checkNullwithRedirect(ADD_CATEGORY_PAGE, $_GET[CATEGORY_ID]);
            checkNullwithRedirect(ADD_CATEGORY_PAGE, $_GET[CATEGORY_NAME]);
            checkNullwithRedirect(ADD_CATEGORY_PAGE, $_GET[SECTION_ID]);
            checkNullwithRedirect(ADD_CATEGORY_PAGE, $_GET[PARENT_CATEGORY_ID]);
            editCategory();
            exit;
            break;
        case ACTION_DEL:
            $actionType = ACTION_DEL;
            checkNullwithRedirect(ADD_CATEGORY_PAGE, $_GET[CATEGORY_ID]);
            delCategory();
            exit;
            break;
        case ACTION_ADD:
        default:
            break;
    }
}
checkNullwithRedirect(ADD_CATEGORY_PAGE, $_GET[CATEGORY_NAME]);
checkNullwithRedirect(ADD_CATEGORY_PAGE, $_GET[SECTION_ID]);
开发者ID:VuECASydney,项目名称:LibraryManagement,代码行数:31,代码来源:AddCategoryOk.php


注:本文中的editCategory函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。