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


PHP zen_register_admin_page函数代码示例

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


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

示例1: install_quick_updates

function install_quick_updates()
{
    global $db;
    $project = PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR;
    if (substr($project, 0, 5) == "1.3.8" || substr($project, 0, 5) == "1.3.9") {
        $db->Execute("INSERT INTO " . TABLE_CONFIGURATION_GROUP . " VALUES ('', 'Quick Updates', 'Quick Updates Configuration', '1', '1')");
        $group_id = mysql_insert_id();
        $db->Execute("UPDATE " . TABLE_CONFIGURATION_GROUP . " SET sort_order = " . $group_id . " WHERE configuration_group_id = " . $group_id);
        $db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES \n\t\t(NULL, 'Display the ID.',                          'QUICKUPDATES_DISPLAY_ID',          'true',  'Enable/Disable the products id displaying',                     " . $group_id . ", '1', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'), \n\t\t(NULL, 'Display the thumbnail.',                   'QUICKUPDATES_DISPLAY_THUMBNAIL',   'true',  'Enable/Disable the products thumbnail displaying',              " . $group_id . ", '2', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the model.',                        'QUICKUPDATES_MODIFY_MODEL',        'true',  'Enable/Disable the products model displaying and modification', " . $group_id . ", '3', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the name.',                         'QUICKUPDATES_MODIFY_NAME',         'true',  'Enable/Disable the products name editing',                      " . $group_id . ", '4', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the Description.',                  'QUICKUPDATES_MODIFY_DESCRIPTION',  'true',  'Enable/Disable the displaying and modification of products description', " . $group_id . ", '5', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the status of the products.',       'QUICKUPDATES_MODIFY_STATUS',       'true',  'Allow/Disallow the Status displaying and modification',       " . $group_id . ", '6',  NULL, NOW(), NULL,  'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the weight of the products.',       'QUICKUPDATES_MODIFY_WEIGHT',       'true',  'Allow/Disallow the Weight displaying and modification?',      " . $group_id . ", '7',  NULL, NOW(), NULL,  'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the quantity of the products.',     'QUICKUPDATES_MODIFY_QUANTITY',     'true',  'Allow/Disallow the quantity displaying and modification',     " . $group_id . ", '8',  NULL, NOW(), NULL,  'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the manufacturer of the products.', 'QUICKUPDATES_MODIFY_MANUFACTURER', 'false', 'Allow/Disallow the Manufacturer displaying and modification', " . $group_id . ", '9',  NULL, NOW(), NULL,  'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the class of tax of the products.', 'QUICKUPDATES_MODIFY_TAX',          'false', 'Allow/Disallow the Class of tax displaying and modification', " . $group_id . ", '10', NULL, NOW(), NULL,  'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the category.',                     'QUICKUPDATES_MODIFY_CATEGORY',     'true',  'Enable/Disable the products category modify',                 " . $group_id . ", '11', NULL, NOW(), NULL,  'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Display price with all included of tax.',  'QUICKUPDATES_DISPLAY_TVA_OVER',    'true',  'Enable/Disable the displaying of the Price with all tax included when your mouse is over a product', " . $group_id . ", '20', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Display the link towards the products information page.',                       'QUICKUPDATES_DISPLAY_PREVIEW',            'false', 'Enable/Disable the display of the link towards the products information page ',                      " . $group_id . ", '30', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Display the link towards the page where you will be able to edit the product.', 'QUICKUPDATES_DISPLAY_EDIT',               'true',  'Enable/Disable the display of the link towards the page where you will be able to edit the product', " . $group_id . ", '31', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Activate or desactivate the commercial margin.',                                'QUICKUPDATES_ACTIVATE_COMMERCIAL_MARGIN', 'true',  'Do you want that the commercial margin be activate or not ?'," . $group_id . ", '40', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the sort order.',                   'QUICKUPDATES_MODIFY_SORT_ORDER',        'true', 'Enable/Disable the products sort order modify',               " . $group_id . ", '12', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Use popup edit.',                          'QUICKUPDATES_MODIFY_DESCRIPTION_POPUP', 'true', 'Enable/Disable using popup edit link to description editing', " . $group_id . ", '13', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),') ");
    } elseif (substr($project, 0, 3) == "1.5") {
        $db->Execute("INSERT INTO " . TABLE_CONFIGURATION_GROUP . " VALUES ('', 'Quick Updates', 'Quick Updates Configuration', '1', '1')");
        $group_id = $db->Insert_ID();
        $db->Execute("UPDATE " . TABLE_CONFIGURATION_GROUP . " SET sort_order = " . $group_id . " WHERE configuration_group_id = " . $group_id);
        zen_register_admin_page('quick_updates_config', 'BOX_CATALOG_QUICK_UPDATES', 'FILENAME_CONFIGURATION', 'gID=' . $group_id, 'configuration', 'Y', 103);
        $db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function)  VALUES \n\t\t(NULL, 'Display the ID.',                          'QUICKUPDATES_DISPLAY_ID',          'true',  'Enable/Disable the products id displaying',                     " . $group_id . ", '1', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'), \n\t\t(NULL, 'Display the thumbnail.',                   'QUICKUPDATES_DISPLAY_THUMBNAIL',   'true',  'Enable/Disable the products thumbnail displaying',              " . $group_id . ", '2', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the model.',                        'QUICKUPDATES_MODIFY_MODEL',        'true',  'Enable/Disable the products model displaying and modification', " . $group_id . ", '3', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the name.',                         'QUICKUPDATES_MODIFY_NAME',         'true',  'Enable/Disable the products name editing',                      " . $group_id . ", '4', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the Description.',                  'QUICKUPDATES_MODIFY_DESCRIPTION',  'true',  'Enable/Disable the displaying and modification of products description', " . $group_id . ", '5', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the status of the products.',       'QUICKUPDATES_MODIFY_STATUS',       'true',  'Allow/Disallow the Status displaying and modification',       " . $group_id . ", '6',  NULL, NOW(), NULL,  'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the weight of the products.',       'QUICKUPDATES_MODIFY_WEIGHT',       'true',  'Allow/Disallow the Weight displaying and modification?',      " . $group_id . ", '7',  NULL, NOW(), NULL,  'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the quantity of the products.',     'QUICKUPDATES_MODIFY_QUANTITY',     'true',  'Allow/Disallow the quantity displaying and modification',     " . $group_id . ", '8',  NULL, NOW(), NULL,  'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the manufacturer of the products.', 'QUICKUPDATES_MODIFY_MANUFACTURER', 'false', 'Allow/Disallow the Manufacturer displaying and modification', " . $group_id . ", '9',  NULL, NOW(), NULL,  'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the class of tax of the products.', 'QUICKUPDATES_MODIFY_TAX',          'false', 'Allow/Disallow the Class of tax displaying and modification', " . $group_id . ", '10', NULL, NOW(), NULL,  'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the category.',                     'QUICKUPDATES_MODIFY_CATEGORY',     'true',  'Enable/Disable the products category modify',                 " . $group_id . ", '11', NULL, NOW(), NULL,  'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Display price with all included of tax.',  'QUICKUPDATES_DISPLAY_TVA_OVER',    'true',  'Enable/Disable the displaying of the Price with all tax included when your mouse is over a product', " . $group_id . ", '20', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Display the link towards the products information page.',                       'QUICKUPDATES_DISPLAY_PREVIEW',            'false', 'Enable/Disable the display of the link towards the products information page ',                      " . $group_id . ", '30', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Display the link towards the page where you will be able to edit the product.', 'QUICKUPDATES_DISPLAY_EDIT',               'true',  'Enable/Disable the display of the link towards the page where you will be able to edit the product', " . $group_id . ", '31', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Activate or desactivate the commercial margin.',                                'QUICKUPDATES_ACTIVATE_COMMERCIAL_MARGIN', 'true',  'Do you want that the commercial margin be activate or not ?'," . $group_id . ", '40', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Modify the sort order.',                   'QUICKUPDATES_MODIFY_SORT_ORDER',        'true', 'Enable/Disable the products sort order modify',               " . $group_id . ", '12', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, 'Use popup edit.',                          'QUICKUPDATES_MODIFY_DESCRIPTION_POPUP', 'true', 'Enable/Disable using popup edit link to description editing', " . $group_id . ", '13', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),') ");
    } else {
        // unsupported version
        // i should do something here!
    }
}
开发者ID:quangn92,项目名称:visualyou,代码行数:20,代码来源:quick_updates_functions.php

示例2: install_quick_updates

function install_quick_updates()
{
    global $db;
    $project = PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR;
    if (substr($project, 0, 5) == "1.3.8" || substr($project, 0, 5) == "1.3.9") {
        $db->Execute("INSERT INTO " . TABLE_CONFIGURATION_GROUP . " VALUES (NULL, '快速更新', '快速更新选项', '1', '1')");
        $group_id = mysql_insert_id();
        $db->Execute("UPDATE " . TABLE_CONFIGURATION_GROUP . " SET sort_order = " . $group_id . " WHERE configuration_group_id = " . $group_id);
        $db->Execute("INSERT INTO " . TABLE_CONFIGURATION . "  VALUES \n\t\t(NULL, '商品编号', 'QUICKUPDATES_DISPLAY_ID', 'true', '是否显示商品编号', " . $group_id . ", '1', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'), \n\t\t(NULL, '商品缩略图', 'QUICKUPDATES_DISPLAY_THUMBNAIL', 'true', '是否显示商品缩略图', " . $group_id . ", '2', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品型号', 'QUICKUPDATES_MODIFY_MODEL', 'true', '是否修改商品型号', " . $group_id . ", '3', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品名称', 'QUICKUPDATES_MODIFY_NAME', 'true', '是否修改商品名称', " . $group_id . ", '4', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品简介', 'QUICKUPDATES_MODIFY_DESCRIPTION', 'true', '是否修改商品简介', " . $group_id . ", '5', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品状态', 'QUICKUPDATES_MODIFY_STATUS', 'true', '是否修改商品状态', " . $group_id . ", '6', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品重量', 'QUICKUPDATES_MODIFY_WEIGHT', 'true', '是否修改商品重量', " . $group_id . ", '7', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品数量', 'QUICKUPDATES_MODIFY_QUANTITY', 'true', '是否修改商品数量', " . $group_id . ", '8', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品厂家', 'QUICKUPDATES_MODIFY_MANUFACTURER', 'false', '是否修改商品厂家', " . $group_id . ", '9', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品税类', 'QUICKUPDATES_MODIFY_TAX', 'false', '是否修改商品税类', " . $group_id . ", '10', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品分类', 'QUICKUPDATES_MODIFY_CATEGORY', 'true', '是否修改商品分类', " . $group_id . ", '11', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品价格', 'QUICKUPDATES_DISPLAY_TVA_OVER', 'true', '鼠标指向商品时,是否显示含税价格', " . $group_id . ", '20', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '前台商品页面的链接', 'QUICKUPDATES_DISPLAY_PREVIEW', 'false', '是否显示到前台商品信息页面的链接', " . $group_id . ", '30', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '后台商品页面的链接', 'QUICKUPDATES_DISPLAY_EDIT', 'true', '是否显示到后台商品编辑页面的链接', " . $group_id . ", '31', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品利润', 'QUICKUPDATES_ACTIVATE_COMMERCIAL_MARGIN', 'true', '是否显示商品利润'," . $group_id . ", '40', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品排序', 'QUICKUPDATES_MODIFY_SORT_ORDER', 'true', '是否修改商品排序', " . $group_id . ", '12', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '弹出窗口', 'QUICKUPDATES_MODIFY_DESCRIPTION_POPUP', 'true', '是否使用弹出链接修改商品简介', " . $group_id . ", '13', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),') ");
    } elseif (substr($project, 0, 3) == "1.5") {
        $db->Execute("INSERT INTO " . TABLE_CONFIGURATION_GROUP . " VALUES (NULL, '快速更新', '快速更新选项', '1', '1')");
        $group_id = mysql_insert_id();
        $db->Execute("UPDATE " . TABLE_CONFIGURATION_GROUP . " SET sort_order = " . $group_id . " WHERE configuration_group_id = " . $group_id);
        zen_register_admin_page('quick_updates_config', 'BOX_CATALOG_QUICK_UPDATES', 'FILENAME_CONFIGURATION', 'gID=' . $group_id, 'configuration', 'Y', 103);
        $db->Execute("INSERT INTO " . TABLE_CONFIGURATION . "  VALUES \n\t\t(NULL, '商品编号', 'QUICKUPDATES_DISPLAY_ID', 'true', '是否显示商品编号', " . $group_id . ", '1', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'), \n\t\t(NULL, '商品缩略图', 'QUICKUPDATES_DISPLAY_THUMBNAIL', 'true', '是否显示商品缩略图', " . $group_id . ", '2', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品型号', 'QUICKUPDATES_MODIFY_MODEL', 'true', '是否修改商品型号', " . $group_id . ", '3', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品名称', 'QUICKUPDATES_MODIFY_NAME', 'true', '是否修改商品名称', " . $group_id . ", '4', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品简介', 'QUICKUPDATES_MODIFY_DESCRIPTION', 'true', '是否修改商品简介', " . $group_id . ", '5', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品状态', 'QUICKUPDATES_MODIFY_STATUS', 'true', '是否修改商品状态', " . $group_id . ", '6', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品重量', 'QUICKUPDATES_MODIFY_WEIGHT', 'true', '是否修改商品重量', " . $group_id . ", '7', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品数量', 'QUICKUPDATES_MODIFY_QUANTITY', 'true', '是否修改商品数量', " . $group_id . ", '8', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品厂家', 'QUICKUPDATES_MODIFY_MANUFACTURER', 'false', '是否修改商品厂家', " . $group_id . ", '9', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品税类', 'QUICKUPDATES_MODIFY_TAX', 'false', '是否修改商品税类', " . $group_id . ", '10', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品分类', 'QUICKUPDATES_MODIFY_CATEGORY', 'true', '是否修改商品分类', " . $group_id . ", '11', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品价格', 'QUICKUPDATES_DISPLAY_TVA_OVER', 'true', '鼠标指向商品时,是否显示含税价格', " . $group_id . ", '20', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '前台商品页面的链接', 'QUICKUPDATES_DISPLAY_PREVIEW', 'false', '是否显示到前台商品信息页面的链接', " . $group_id . ", '30', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '后台商品页面的链接', 'QUICKUPDATES_DISPLAY_EDIT', 'true', '是否显示到后台商品编辑页面的链接', " . $group_id . ", '31', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品利润', 'QUICKUPDATES_ACTIVATE_COMMERCIAL_MARGIN', 'true', '是否显示商品利润', " . $group_id . ", '40', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '商品排序', 'QUICKUPDATES_MODIFY_SORT_ORDER', 'true', '是否修改商品排序', " . $group_id . ", '12', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t(NULL, '弹出窗口', 'QUICKUPDATES_MODIFY_DESCRIPTION_POPUP', 'true', '是否使用弹出链接修改商品简介', " . $group_id . ", '13', NULL, NOW(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),') ");
    } else {
        // unsupported version
        // i should do something here!
    }
}
开发者ID:R-Future,项目名称:zencart,代码行数:20,代码来源:quick_updates_functions.php

示例3: die

<?php

/**
 * Slideshow creator
 *
 * @package slideshow
 * @author Vassilios Barzokas <contact@vbarzokas.com> 
 * @author website www.vbarzokas.com
 * @copyright Copyright 2011 Vassilios Barzokas
 * @license http://www.gnu.org/copyleft/gpl.html   GNU Public License V2.0
 * @version $Id: slideshow.php 1.1 2012-01-22 11:50:04Z $
 */
if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
}
if (function_exists('zen_register_admin_page')) {
    if (!zen_page_key_exists('slideshow')) {
        // Add slideshow to Tools menu
        zen_register_admin_page('slideshow', 'BOX_TOOLS_SLIDESHOW', 'FILENAME_SLIDESHOW', '', 'tools', 'Y', 17);
    }
}
开发者ID:R-Future,项目名称:zencart,代码行数:21,代码来源:slideshow.php

示例4: Copyright

<?php

/*
 $Id: reg_backup_mysql.php, v 1.4 2011/11/24  $																    
                                                     
  By PRO-Webs.net 12.9.2011
                                                      
  Powered by Zen-Cart (www.zen-cart.com)              
  Portions Copyright (c) 2006 The Zen Cart Team       
                                                      
  Released under the GNU General Public License       
  available at www.zen-cart.com/license/2_0.txt       
  or see "license.txt" in the downloaded zip          

  DESCRIPTION: Add Export Orders to Tools Menu
*/
if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
}
if (function_exists('zen_register_admin_page')) {
    if (!zen_page_key_exists('todopago')) {
        zen_register_admin_page('todopago', 'BOX_TOOLS_TODOPAGO', 'FILENAME_TODOPAGO', '', 'tools', 'Y', 17);
    }
}
开发者ID:TodoPago,项目名称:Plugin-ZenCart,代码行数:24,代码来源:reg_todopago.php

示例5: zen_deregister_admin_pages

    $db->Execute($sql);
}
//check if track_id4 column exists
$sql = "SHOW COLUMNS FROM " . TABLE_ORDERS_STATUS_HISTORY . " LIKE '%track_id4%'";
$result = $db->Execute($sql);
if (!$result->RecordCount()) {
    $sql = "ALTER TABLE " . TABLE_ORDERS_STATUS_HISTORY . " ADD track_id4 TEXT default NULL";
    $db->Execute($sql);
}
//check if track_id5 column exists
$sql = "SHOW COLUMNS FROM " . TABLE_ORDERS_STATUS_HISTORY . " LIKE '%track_id5%'";
$result = $db->Execute($sql);
if (!$result->RecordCount()) {
    $sql = "ALTER TABLE " . TABLE_ORDERS_STATUS_HISTORY . " ADD track_id5 TEXT default NULL";
    $db->Execute($sql);
}
if (file_exists(DIR_FS_ADMIN . DIR_WS_INCLUDES . 'auto_loaders/config.typt.php')) {
    if (!unlink(DIR_FS_ADMIN . DIR_WS_INCLUDES . 'auto_loaders/config.typt.php')) {
        $messageStack->add('The auto-loader ' . DIR_FS_ADMIN . 'includes/auto_loaders/config.typt.php  has not been deleted.  For this module to work you must delete this file manually.', 'error');
    }
}
$messageStack->add('Ty Package Tracker v3.1.4 install completed!', 'success');
// find next sort order in admin_pages table
$sql = "SELECT (MAX(sort_order)+2) as sort FROM " . TABLE_ADMIN_PAGES;
$result = $db->Execute($sql);
$admin_page_sort = $result->fields['sort'];
// now register the admin pages
// Admin Menu for Ty Package Tracker Configuration Menu
zen_deregister_admin_pages('configTyPackageTracker');
zen_register_admin_page('configTyPackageTracker', 'BOX_CONFIGURATION_TY_PACKAGE_TRACKER', 'FILENAME_CONFIGURATION', 'gID=' . $typt_configuration_id, 'configuration', 'Y', $admin_page_sort);
开发者ID:bislewl,项目名称:super_edit_orders_with_ty,代码行数:30,代码来源:init_typt_config.php

示例6: die

<?php

/**
 * Add entry to Tools menu
 */
if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
}
if (function_exists('zen_register_admin_page')) {
    if (!zen_page_key_exists('emailArchive')) {
        zen_register_admin_page('emailArchive', 'BOX_TOOLS_EMAIL_ARCHIVE_MANAGER', 'FILENAME_EMAIL_HISTORY', '', 'tools', 'Y', 20);
    }
}
开发者ID:R-Future,项目名称:zencart,代码行数:13,代码来源:reg_email_archive_manager.php

示例7: VALUES

<?php

// use $configuration_group_id where needed
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_group_id, sort_order, configuration_key, configuration_title, configuration_value, configuration_description, set_function) VALUES (" . (int) $configuration_group_id . ", 1, 'HIPCHAT_ERROR_ENABLE', 'Enabel Module', 'false', 'Should this module be used', 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),');");
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_group_id, sort_order, configuration_key, configuration_title, configuration_value, configuration_description) VALUES (" . (int) $configuration_group_id . ", 2, 'HIPCHAT_TOKEN', 'HipChat API Auth Token', '', 'This is the token that you will need to get form hipchat');");
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_group_id, sort_order, configuration_key, configuration_title, configuration_value, configuration_description, set_function) VALUES (" . (int) $configuration_group_id . ", 6, 'HIPCHAT_MESSAGE_FORMAT', 'Message Format', 'text', 'This is the format of message that should be sent, either TEXT or HTML', 'zen_cfg_select_option(array(\\'text\\', \\'html\\'),');");
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_group_id, sort_order, configuration_key, configuration_title, configuration_value, configuration_description) VALUES (" . (int) $configuration_group_id . ", 4, 'HIPCHAT_NOTIFY_ROOM', 'Notify the room?', '1', 'Should it notify the room, when it sends the message (true = 1)');");
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_group_id, sort_order, configuration_key, configuration_title, configuration_value, configuration_description) VALUES (" . (int) $configuration_group_id . ", 9, 'HIPCHAT_MESSAGE_COLOR', 'Color of the message', 'red', 'Background color for message. One of yellow, red, green, purple, gray, or random.');");
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_group_id, sort_order, configuration_key, configuration_title, configuration_value, configuration_description) VALUES (" . (int) $configuration_group_id . ", 2, 'HIPCHAT_ROOM_ID', 'Room ID to post the message to', '', 'This is either the name of the room, but more dependable is to use the room id (it also called API ID)');");
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_group_id, sort_order, configuration_key, configuration_title, configuration_value, configuration_description) VALUES (" . (int) $configuration_group_id . ", 3, 'HIPCHAT_ERROR_FROM', 'From name on Error messages', 'Error Log', 'This the name that it will appear the message came from');");
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_group_id, sort_order, configuration_key, configuration_title, configuration_value, configuration_description) VALUES (" . (int) $configuration_group_id . ", 7, 'HIPCHAT_MAX_LENGTH', 'Maximum length of message', '1000', 'This is the maximum length of the message, HipChat max is 10,000 but that is really long.');");
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_group_id, sort_order, configuration_key, configuration_title, configuration_value, configuration_description) VALUES (" . (int) $configuration_group_id . ", 8, 'HIPCHAT_ERROR_PREFIX', 'Prefix on Error Message', '', 'This will be added the the start of the message, this is useful for when you want to notify a person, like @user');");
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_group_id, sort_order, configuration_key, configuration_title, configuration_value, configuration_description) VALUES (" . (int) $configuration_group_id . ", 9, 'HIPCHAT_LAST_MESSAGE', 'Last Time Message Sent', '', 'This is the last timestamp a message was sent, set this to zero to send one on the next pageload reguardless');");
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_group_id, sort_order, configuration_key, configuration_title, configuration_value, configuration_description) VALUES (" . (int) $configuration_group_id . ", 5, 'HIPCHAT_LIMIT_MESSAGE', 'Limit of Message', '300', 'Change how often messages are sent, setting this at 300 will limit the number of messages to no sooner then every 5 minutes');");
$db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_group_id, sort_order, configuration_key, configuration_title, configuration_value, configuration_description, set_function) VALUES (" . (int) $configuration_group_id . ", 3, 'HIPCHAT_API_FORMAT', 'Format to send Notify', 'json', 'Desired response format: json or xml. (default: json)', 'zen_cfg_select_option(array(\\'json\\', \\'xml\\'),');");
// For Admin Pages
$zc150 = PROJECT_VERSION_MAJOR > 1 || PROJECT_VERSION_MAJOR == 1 && substr(PROJECT_VERSION_MINOR, 0, 3) >= 5;
if ($zc150) {
    // continue Zen Cart 1.5.0
    // delete configuration menu
    $db->Execute("DELETE FROM " . TABLE_ADMIN_PAGES . " WHERE page_key = 'configHipchat' LIMIT 1;");
    // add configuration menu
    if (!zen_page_key_exists('configHipchat')) {
        if ((int) $configuration_group_id > 0) {
            zen_register_admin_page('configHipchat', 'BOX_HIPCHAT_NOTIFICATION', 'FILENAME_CONFIGURATION', 'gID=' . $configuration_group_id, 'configuration', 'Y', $configuration_group_id);
            $messageStack->add('Enabled HipChat Notification Configuration Menu.', 'success');
        }
    }
}
开发者ID:midoNuminix,项目名称:hipchat_notification,代码行数:29,代码来源:1_0_0.php

示例8: install_easypopulate_4

function install_easypopulate_4()
{
    global $db;
    $project = PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR;
    if (substr($project, 0, 5) == "1.3.8" || substr($project, 0, 5) == "1.3.9") {
        $db->Execute("INSERT INTO " . TABLE_CONFIGURATION_GROUP . " (configuration_group_title, configuration_group_description, sort_order, visible) VALUES ('Easy Populate 4', 'Configuration Options for Easy Populate 4', '1', '1')");
        $group_id = mysql_insert_id();
        $db->Execute("UPDATE " . TABLE_CONFIGURATION_GROUP . " SET sort_order = " . $group_id . " WHERE configuration_group_id = " . $group_id);
        $db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES \n\t\t\t('Uploads Directory',                  'EASYPOPULATE_4_CONFIG_TEMP_DIR', 'temp/', 'Name of directory for your uploads (default: temp/).', " . $group_id . ", '0', NULL, now(), NULL, NULL),\n\t\t\t('Upload File Date Format',            'EASYPOPULATE_4_CONFIG_FILE_DATE_FORMAT', 'm-d-y', 'Choose order of date values that corresponds to your uploads file, usually generated by MS Excel. Raw dates in your uploads file (Eg 2005-09-26 09:00:00) are not affected, and will upload as they are.', " . $group_id . ", '1', NULL, now(), NULL, 'zen_cfg_select_option(array(\"m-d-y\", \"d-m-y\", \"y-m-d\"),'),\n\t\t\t('Default Raw Time',                   'EASYPOPULATE_4_CONFIG_DEFAULT_RAW_TIME', '09:00:00', 'If no time value stipulated in upload file, use this value. Useful for ensuring specials begin after a specific time of the day (default: 09:00:00)', " . $group_id . ", '2', NULL, now(), NULL, NULL),\n\t\t\t('Upload/Download Prices Include Tax', 'EASYPOPULATE_4_CONFIG_PRICE_INC_TAX', 'false', 'Choose to include or exclude tax, depending on how you manage prices outside of Zen Cart.', " . $group_id . ", '5', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t\t('Verbose Feedback',                   'EASYPOPULATE_4_CONFIG_VERBOSE', 'true', 'When importing, report all messages. Set to false for only warnings and errors. (default: true).', " . $group_id . ", '6', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t\t('Make Zero Qty Products Inactive',    'EASYPOPULATE_4_CONFIG_ZERO_QTY_INACTIVE', 'false', 'When uploading, make the status Inactive for products with zero qty (default: false).', " . $group_id . ", '7', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t\t('Smart Tags Replacement of Newlines', 'EASYPOPULATE_4_CONFIG_SMART_TAGS', 'true', 'Allows your description fields in your uploads file to have carriage returns and/or new-lines converted to HTML line-breaks on uploading, thus preserving some rudimentary formatting - Note: this legacy code is disabled until further review. (default: true).', " . $group_id . ", '8', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t\t('Advanced Smart Tags',                'EASYPOPULATE_4_CONFIG_ADV_SMART_TAGS', 'false', 'Allow the use of complex regular expressions to format descriptions, making headings bold, add bullets, etc. Note: legacy code is disabled until further review. (default: false).', " . $group_id . ", '9', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t\t('Debug Logging',                      'EASYPOPULATE_4_CONFIG_DEBUG_LOGGING', 'true', 'Allow Easy Populate to generate an error log on errors only (default: true)', " . $group_id . ", '10', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t\t('Maximum Quantity Discounts',         'EASYPOPULATE_4_CONFIG_MAX_QTY_DISCOUNTS', '3', 'Maximum number of quantity discounts (price breaks). Is the number of discount columns in downloaded file (default: 3).', " . $group_id . ", '11', NULL, now(), NULL, NULL),\n\t\t\t('Split On Number of Records',         'EASYPOPULATE_4_CONFIG_SPLIT_RECORDS', '2000', 'Number of records to split csv files. Used to break large import files into smaller files. Useful on servers with limited resourses. (default: 2000).', " . $group_id . ", '12', NULL, now(), NULL, NULL),\n\t\t\t('Script Execution Time',              'EASYPOPULATE_4_CONFIG_EXECUTION_TIME', '60', 'Number of seconds for script to run before timeout. May not work on some servers. (default: 60).', " . $group_id . ", '13', NULL, now(), NULL, NULL),\n\t\t\t('Convert Curly Quotes, etc.',         'EASYPOPULATE_4_CONFIG_CURLY_QUOTES', '0', 'Convert Curly Quotes, Em-Dash, En-Dash and Ellipsis characters in Product Names &amp; Descriptions (default 0).<br><br>0=No Change<br>1=Replace with Basic Characters<br>3=Replace with HMTL equivalants', " . $group_id . ", '14', NULL, now(), NULL, 'zen_cfg_select_option(array(\"0\", \"1\", \"2\"),'),\n\t\t\t('Convert Character 0x92',             'EASYPOPULATE_4_CONFIG_CHAR_92', '1', 'Convert Character 0x92 characters in Product Names &amp; Descriptions (default 1).<br><br>0=No Change<br>1=Replace with Standard Single Quote<br>2=Replace with HMTL equivalant', " . $group_id . ", '15', NULL, now(), NULL, 'zen_cfg_select_option(array(\"0\", \"1\", \"2\"),'),\n\t\t\t('Enable Products Meta Data',          'EASYPOPULATE_4_CONFIG_META_DATA', '1', 'Enable Products Meta Data Columns (default 1).<br><br>0=Disable<br>1=Enable', " . $group_id . ", '16', NULL, now(), NULL, 'zen_cfg_select_option(array(\"0\", \"1\"),'), \n\t\t\t('Enable Products Music Data',         'EASYPOPULATE_4_CONFIG_MUSIC_DATA', '0', 'Enable Products Music Data Columns (default 0).<br><br>0=Disable<br>1=Enable', " . $group_id . ", '17', NULL, now(), NULL, 'zen_cfg_select_option(array(\"0\", \"1\"),'),\n\t\t\t('User Defined Products Fields',       'EASYPOPULATE_4_CONFIG_CUSTOM_FIELDS', '', 'User Defined Products Table Fields (comma delimited, no spaces)', " . $group_id . ", '18', NULL, now(), NULL, NULL),\n\t\t\t('Export URI with Prod and or Cat',       'EASYPOPULATE_4_CONFIG_EXPORT_URI', '0', 'Export the current products or categories URI when exporting data? (Yes - 1 or no - 0)', " . $group_id . ", '19', NULL, now(), NULL, 'zen_cfg_select_option(array(\"0\", \"1\"),')\n\t\t");
    } elseif (PROJECT_VERSION_MAJOR > '1' || PROJECT_VERSION_MINOR >= '5.0') {
        $db->Execute("INSERT INTO " . TABLE_CONFIGURATION_GROUP . " (configuration_group_title, configuration_group_description, sort_order, visible) VALUES ('Easy Populate 4', 'Configuration Options for Easy Populate 4', '1', '1')");
        if (PROJECT_VERSION_MAJOR > '1' || PROJECT_VERSION_MINOR >= '5.3') {
            $group_id = mysqli_insert_id($db->link);
        } else {
            $group_id = mysql_insert_id();
        }
        $db->Execute("UPDATE " . TABLE_CONFIGURATION_GROUP . " SET sort_order = " . $group_id . " WHERE configuration_group_id = " . $group_id);
        zen_register_admin_page('easypopulate_4_config', 'BOX_TOOLS_EASYPOPULATE_4', 'FILENAME_CONFIGURATION', 'gID=' . $group_id, 'configuration', 'Y', 97);
        $db->Execute("INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES \n\t\t\t('Uploads Directory',                  'EASYPOPULATE_4_CONFIG_TEMP_DIR', 'temp/', 'Name of directory for your uploads (default: temp/).', " . $group_id . ", '0', NULL, now(), NULL, NULL),\n\t\t\t('Upload File Date Format',            'EASYPOPULATE_4_CONFIG_FILE_DATE_FORMAT', 'm-d-y', 'Choose order of date values that corresponds to your uploads file, usually generated by MS Excel. Raw dates in your uploads file (Eg 2005-09-26 09:00:00) are not affected, and will upload as they are.', " . $group_id . ", '1', NULL, now(), NULL, 'zen_cfg_select_option(array(\"m-d-y\", \"d-m-y\", \"y-m-d\"),'),\n\t\t\t('Default Raw Time',                   'EASYPOPULATE_4_CONFIG_DEFAULT_RAW_TIME', '09:00:00', 'If no time value stipulated in upload file, use this value. Useful for ensuring specials begin after a specific time of the day (default: 09:00:00)', " . $group_id . ", '2', NULL, now(), NULL, NULL),\n\t\t\t('Upload/Download Prices Include Tax', 'EASYPOPULATE_4_CONFIG_PRICE_INC_TAX', 'false', 'Choose to include or exclude tax, depending on how you manage prices outside of Zen Cart.', " . $group_id . ", '5', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t\t('Verbose Feedback',                   'EASYPOPULATE_4_CONFIG_VERBOSE', 'true', 'When importing, report all messages. Set to false for only warnings and errors. (default: true).', " . $group_id . ", '6', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t\t('Make Zero Qty Products Inactive',    'EASYPOPULATE_4_CONFIG_ZERO_QTY_INACTIVE', 'false', 'When uploading, make the status Inactive for products with zero qty (default: false).', " . $group_id . ", '7', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t\t('Smart Tags Replacement of Newlines', 'EASYPOPULATE_4_CONFIG_SMART_TAGS', 'true', 'Allows your description fields in your uploads file to have carriage returns and/or new-lines converted to HTML line-breaks on uploading, thus preserving some rudimentary formatting - Note: this legacy code is disabled until further review. (default: true).', " . $group_id . ", '8', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t\t('Advanced Smart Tags',                'EASYPOPULATE_4_CONFIG_ADV_SMART_TAGS', 'false', 'Allow the use of complex regular expressions to format descriptions, making headings bold, add bullets, etc. Note: legacy code is disabled until further review. (default: false).', " . $group_id . ", '9', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t\t('Debug Logging',                      'EASYPOPULATE_4_CONFIG_DEBUG_LOGGING', 'true', 'Allow Easy Populate to generate an error log on errors only (default: true)', " . $group_id . ", '10', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),\n\t\t\t('Maximum Quantity Discounts',         'EASYPOPULATE_4_CONFIG_MAX_QTY_DISCOUNTS', '3', 'Maximum number of quantity discounts (price breaks). Is the number of discount columns in downloaded file (default: 3).', " . $group_id . ", '11', NULL, now(), NULL, NULL),\n\t\t\t('Split On Number of Records',         'EASYPOPULATE_4_CONFIG_SPLIT_RECORDS', '2000', 'Number of records to split csv files. Used to break large import files into smaller files. Useful on servers with limited resourses. (default: 2000).', " . $group_id . ", '12', NULL, now(), NULL, NULL),\n\t\t\t('Script Execution Time',              'EASYPOPULATE_4_CONFIG_EXECUTION_TIME', '60', 'Number of seconds for script to run before timeout. May not work on some servers. (default: 60).', " . $group_id . ", '13', NULL, now(), NULL, NULL),\n\t\t\t('Convert Curly Quotes, etc.',         'EASYPOPULATE_4_CONFIG_CURLY_QUOTES', '0', 'Convert Curly Quotes, Em-Dash, En-Dash and Ellipsis characters in Products Description (default 0).<br><br>0=No Change<br>1=Replace with Basic Characters<br>3=Replace with HMTL equivalants', " . $group_id . ", '14', NULL, now(), NULL, 'zen_cfg_select_option(array(\"0\", \"1\", \"2\"),'),\n\t\t\t('Convert Character 0x92',             'EASYPOPULATE_4_CONFIG_CHAR_92', '1', 'Convert Character 0x92 characters in Product Names &amp; Descriptions (default 1).<br><br>0=No Change<br>1=Replace with Standard Single Quote<br>2=Replace with HMTL equivalant', " . $group_id . ", '15', NULL, now(), NULL, 'zen_cfg_select_option(array(\"0\", \"1\", \"2\"),'),\n\t\t\t('Enable Products Meta Data',          'EASYPOPULATE_4_CONFIG_META_DATA', '1', 'Enable Products Meta Data Columns (default 1).<br><br>0=Disable<br>1=Enable', " . $group_id . ", '16', NULL, now(), NULL, 'zen_cfg_select_option(array(\"0\", \"1\"),'), \n\t\t\t('Enable Products Music Data',         'EASYPOPULATE_4_CONFIG_MUSIC_DATA', '0', 'Enable Products Music Data Columns (default 0).<br><br>0=Disable<br>1=Enable', " . $group_id . ", '17', NULL, now(), NULL, 'zen_cfg_select_option(array(\"0\", \"1\"),'),\n\t\t\t('User Defined Products Fields',       'EASYPOPULATE_4_CONFIG_CUSTOM_FIELDS', '', 'User Defined Products Table Fields (comma delimited, no spaces)', " . $group_id . ", '18', NULL, now(), NULL, NULL),\n\t\t\t('Export URI with Prod and or Cat',       'EASYPOPULATE_4_CONFIG_EXPORT_URI', '0', 'Export the current products or categories URI when exporting data? (Yes - 1 or no - 0)', " . $group_id . ", '19', NULL, now(), NULL, 'zen_cfg_select_option(array(\"0\", \"1\"),')\n\t\t");
    } else {
        // unsupported version
        // i should do something here!
    }
}
开发者ID:xiaoguizhidao,项目名称:EasyPopulate-4.0,代码行数:24,代码来源:easypopulate_4_functions.php

示例9: NOW

<?php

$db->Execute("REPLACE INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES\n('Fast and Easy Checkout', 'FEC_STATUS', 'false', 'Activate Fast and Easy Checkout? (note: Easy Sign-up and Login must be disabled separately)', " . $configuration_group_id . ", 10, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('One Page Checkout', 'FEC_ONE_PAGE', 'true', 'Activate One Page Checkout?<br />Default = false (includes checkout_confirmation page)', " . $configuration_group_id . ", 11, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Checkout Confirmation Alternate Text', 'FEC_CHECKOUT_CONFIRMATION_TEXT', 'Your order is being processed, please wait...', 'Alternate text to be displayed on Checkout Confirmation page:', " . $configuration_group_id . ", 12, NOW(), NOW(), NULL, NULL),\n('Display Checkout in Split Column', 'FEC_SPLIT_CHECKOUT', 'true', 'Display the checkout page in a split column format?', " . $configuration_group_id . ", 13, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Activate Drop Down List', 'FEC_DROP_DOWN', 'false', 'Activate drop down list to appear on checkout page?', " . $configuration_group_id . ", 14, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Gift Wrapping Module Switch', 'FEC_GIFT_WRAPPING_SWITCH', 'false', 'If the gift wrapping module is installed, set to true to activate', " . $configuration_group_id . ", 15, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Activate Gift Message Field', 'FEC_GIFT_MESSAGE', 'false', 'Activate gift message field to appear on checkout page?', " . $configuration_group_id . ", 16, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Drop Down List Options', 'FEC_DROP_DOWN_LIST', 'Option 1,Option 2,Option 3,Option 4,Option 5', 'Enter each option separated by commas:', " . $configuration_group_id . ", 17, NOW(), NOW(), NULL, NULL),\n('Activate Checkbox Field', 'FEC_CHECKBOX', 'false', 'Activate checkbox field to appear on checkout page?', " . $configuration_group_id . ", 18, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n\n('Easy Sign-Up and Login', 'FEC_EASY_SIGNUP_STATUS', 'false', 'Activate Easy Sign-Up and Login?', " . $configuration_group_id . ", 20, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Display Order Total', 'FEC_ORDER_TOTAL', 'false', 'Display the Order Total sidebox on login?', " . $configuration_group_id . ", 21, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Display Confidence Box', 'FEC_CONFIDENCE', 'false', 'Display the \"Shop With Confidence\" sidebox on login?', " . $configuration_group_id . ", 22, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('COWOA Position', 'FEC_NOACCOUNT_POSITION', 'side', 'Display the COWOA fieldset above the registration form (top) or beneath the login (side)?', " . $configuration_group_id . ", 23, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'top\\', \\'side\\'),'),\n('Confirm Email', 'FEC_CONFIRM_EMAIL', 'false', 'Require user to enter email twice for confirmation?', " . $configuration_group_id . ", 24, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Shipping Address', 'FEC_SHIPPING_ADDRESS', 'true', 'Display the shipping address form on the login and COWOA pages?', " . $configuration_group_id . ", 25, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Copy Billing', 'FEC_COPYBILLING', 'true', 'If the shipping address form is enabled, should the copy billing address checkbox be checked by default?', " . $configuration_group_id . ", 26, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Master Password', 'FEC_MASTER_PASSWORD', 'false', 'Allow login to customer account using master password? (Must be using ZenCart v1.5.0 or higher)', " . $configuration_group_id . ", 27, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n\n('Checkout Without Account', 'FEC_NOACCOUNT_SWITCH', 'true', 'Activate Checkout Without an Account?', " . $configuration_group_id . ", 30, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Checkout Without Account Only', 'FEC_NOACCOUNT_ONLY_SWITCH', 'false', 'Disable regular login/registration and force Checkout Without an Account?', " . $configuration_group_id . ", 31, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Combine COWOA Accounts', 'FEC_NOACCOUNT_COMBINE', 'false', 'Combine COWOA accounts so that COWOA customers can access their orders and other account features (note this will only work on future registrations)?', " . $configuration_group_id . ", 31, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Hide Email Options For No Account', 'FEC_NOACCOUNT_HIDEEMAIL', 'true', 'Hide \"HTML/TEXT-Only\" for checkout without account?', " . $configuration_group_id . ", 32, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Automatic LogOff for No Account', 'FEC_NOACCOUNT_LOGOFF', 'true', 'Automatically logoff customers without accounts?', " . $configuration_group_id . ", 33, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),'),\n('Free/Virtual Checkout', 'FEC_FREE_VIRTUAL_CHECKOUT', 'false', 'Only require name and email address for products that are both free and virtual?', " . $configuration_group_id . ", 34, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(\\'true\\', \\'false\\'),');");
global $sniffer;
if (!$sniffer->field_exists(TABLE_CUSTOMERS, 'COWOA_account')) {
    $db->Execute("ALTER TABLE " . TABLE_CUSTOMERS . " ADD COWOA_account tinyint(1) NOT NULL default 0;");
}
if (!$sniffer->field_exists(TABLE_ORDERS, 'COWOA_order')) {
    $db->Execute("ALTER TABLE " . TABLE_ORDERS . " ADD COWOA_order tinyint(1) NOT NULL default 0;");
}
$db->Execute("INSERT IGNORE INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Telephone Number', 'ACCOUNT_TELEPHONE', 'true', 'Display telephone number field during account creation and with account information', '5', '8', 'zen_cfg_select_option(array(\\'true\\', \\'false\\'), ', now());");
$db->Execute("INSERT IGNORE INTO " . TABLE_QUERY_BUILDER . " (query_id, query_category, query_name, query_description, query_string) VALUES ('', 'email,newsletters', 'Permanent Account Holders Only', 'Send email only to permanent account holders ', 'select customers_email_address, customers_firstname, customers_lastname from TABLE_CUSTOMERS where COWOA_account != 1 order by customers_lastname, customers_firstname, customers_email_address');");
$zc150 = PROJECT_VERSION_MAJOR > 1 || PROJECT_VERSION_MAJOR == 1 && substr(PROJECT_VERSION_MINOR, 0, 3) >= 5;
if ($zc150) {
    // continue Zen Cart 1.5.0
    // delete configuration menu
    $db->Execute("DELETE FROM " . TABLE_ADMIN_PAGES . " WHERE page_key = 'configFastandEasyCheckout' LIMIT 1;");
    // add configuration menu
    if (!zen_page_key_exists('configFastandEasyCheckout')) {
        if ((int) $configuration_group_id > 0) {
            zen_register_admin_page('configFastandEasyCheckout', 'BOX_CONFIGURATION_FEC', 'FILENAME_CONFIGURATION', 'gID=' . $configuration_group_id, 'configuration', 'Y', $configuration_group_id);
            $messageStack->add('Enabled Fast and Easy Checkout Configuration menu.', 'success');
        }
    }
}
开发者ID:krakatoa14,项目名称:fec,代码行数:25,代码来源:1_12_0.php

示例10: zen_deregister_admin_pages

// Admin Menu for Super Orders Configuration Menu
zen_deregister_admin_pages('configSuperOrders');
zen_register_admin_page('configSuperOrders', 'BOX_CONFIGURATION_SUPER_ORDERS', 'FILENAME_CONFIGURATION', 'gID=' . $so_configuration_id, 'configuration', 'Y', $admin_page_sort);
//-- Admin Menu for Batch Status Update
zen_deregister_admin_pages('customersBatchStatusUpdate');
zen_register_admin_page('customersBatchStatusUpdate', 'BOX_CUSTOMERS_SUPER_BATCH_STATUS', 'FILENAME_SUPER_BATCH_STATUS', '', 'customers', 'Y', $admin_page_sort);
//-- Admin Menu for Batch Status Print
zen_deregister_admin_pages('customersBatchFormPrint');
zen_register_admin_page('customersBatchFormPrint', 'BOX_CUSTOMERS_SUPER_BATCH_FORMS', 'FILENAME_SUPER_BATCH_FORMS', '', 'customers', 'Y', $admin_page_sort);
//-- Admin Menu for Batch Print Pages
zen_deregister_admin_pages('customersBatchPages');
zen_register_admin_page('customersBatchPages', 'BOX_CUSTOMERS_SUPER_BATCH_PAGES', 'FILENAME_SUPER_BATCH_PAGES', '', 'customers', 'N', $admin_page_sort);
//-- Admin Menu for Super Data Sheet
zen_deregister_admin_pages('customersSuperDataSheet');
zen_register_admin_page('customersSuperDataSheet', 'BOX_CUSTOMERS_SUPER_DATA_SHEET', 'FILENAME_SUPER_DATA_SHEET', '', 'customers', 'N', $admin_page_sort);
//-- Admin Menu for Super Shipping Label
zen_deregister_admin_pages('customersSuperShippingLabel');
zen_register_admin_page('customersSuperShippingLabel', 'BOX_CUSTOMERS_SUPER_SHIPPING_LABEL', 'FILENAME_SUPER_SHIPPING_LABEL', '', 'customers', 'N', $admin_page_sort);
//-- Admin Menu for Super Orders Edit Pop-Up
zen_deregister_admin_pages('customersSuperPopUp');
zen_register_admin_page('customersSuperPopUp', 'BOX_CUSTOMERS_SUPER_EDIT_POPUP', 'FILENAME_SUPER_EDIT', '', 'customers', 'N', $admin_page_sort);
//-- Admin Menu for Manage Payment Types
zen_deregister_admin_pages('localizationManagePaymentTypes');
zen_register_admin_page('localizationManagePaymentTypes', 'BOX_LOCALIZATION_MANAGE_PAYMENT_TYPES', 'FILENAME_SUPER_PAYMENT_TYPES', '', 'localization', 'Y', $admin_page_sort);
//-- Admin Menu for Orders Awaiting Paymments Report
zen_deregister_admin_pages('reportsOrdersAwaitingPayment');
zen_register_admin_page('reportsOrdersAwaitingPayment', 'BOX_REPORTS_SUPER_REPORT_AWAIT_PAY', 'FILENAME_SUPER_REPORT_AWAIT_PAY', '', 'reports', 'Y', $admin_page_sort);
//-- Admin Menu for Cash Report
zen_deregister_admin_pages('reportsCashReport');
zen_register_admin_page('reportsCashReport', 'BOX_REPORTS_SUPER_REPORT_CASH', 'FILENAME_SUPER_REPORT_CASH', '', 'reports', 'Y', $admin_page_sort);
开发者ID:quangn92,项目名称:visualyou,代码行数:30,代码来源:init_so_config.php

示例11: zen_register_admin_page

    if (empty($menu_key)) {
        $error = TRUE;
        $messageStack->add(ERROR_MENU_NOT_CHOSEN, 'error');
    }
    if (isset($_POST['display_on_menu'])) {
        $checked = 'checked="true"';
        $display_on_menu = 'Y';
    } else {
        $display_on_menu = 'N';
    }
    if (isset($_POST['sort_order'])) {
        $sort_order = (int) $_POST['sort_order'];
    }
    if (!$error) {
        // register page
        zen_register_admin_page($page_key, $language_key, $main_page, $page_params, $menu_key, $display_on_menu, $sort_order);
        // prepare success message
        $messageStack->add(SUCCESS_ADMIN_PAGE_REGISTERED, 'success');
        // reset form values
        $page_key = $language_key = $main_page = $page_params = $menu_key = $checked = '';
        $sort_order = 0;
    }
}
// prepare options for menu pulldown
$menu_titles = zen_get_menu_titles();
$menu_options = array();
$menu_options[0] = array('id' => NULL, 'text' => TEXT_SELECT_MENU);
foreach ($menu_titles as $id => $title) {
    $menu_options[] = array('id' => $id, 'text' => $title);
}
?>
开发者ID:kirkbauer2,项目名称:kirkzc,代码行数:31,代码来源:admin_page_registration.php

示例12: zen_register_admin_page

    $admin_page = 'toolsMetaTagsController';
    // delete configuration menu
    $db->Execute("DELETE FROM " . TABLE_ADMIN_PAGES . " WHERE page_key = '" . $admin_page . "' LIMIT 1;");
    // add configuration menu
    if (!zen_page_key_exists($admin_page)) {
        if ((int) $configuration_group_id > 0) {
            zen_register_admin_page($admin_page, 'BOX_TOOLS_META_TAGS_CONTROLLER', 'FILENAME_META_TAG_CONTROLLER', '', 'tools', 'Y', $configuration_group_id);
            $messageStack->add('Enabled Meta Tags Controller', 'success');
        }
    }
}
// adding meta tags controller
$zc150 = PROJECT_VERSION_MAJOR > 1 || PROJECT_VERSION_MAJOR == 1 && substr(PROJECT_VERSION_MINOR, 0, 3) >= 5;
if ($zc150) {
    // continue Zen Cart 1.5.0
    $admin_page = 'toolsMetaTagsControllerAjax';
    // delete configuration menu
    $db->Execute("DELETE FROM " . TABLE_ADMIN_PAGES . " WHERE page_key = '" . $admin_page . "' LIMIT 1;");
    // add configuration menu
    if (!zen_page_key_exists($admin_page)) {
        if ((int) $configuration_group_id > 0) {
            zen_register_admin_page($admin_page, 'BOX_TOOLS_META_TAGS_CONTROLLER_AJAX', 'FILENAME_AJAX_META_TAGS_CONTROLLER', '', 'tools', 'N', $configuration_group_id);
            $messageStack->add('Enabled Meta Tags Controller Ajax', 'success');
        }
    }
}
if (!$sniffer->field_exists(TABLE_EZPAGES, 'pages_meta_title')) {
    $db->Execute("ALTER TABLE " . TABLE_EZPAGES . " ADD pages_meta_title VARCHAR(255) NOT NULL DEFAULT '', ADD pages_meta_keywords text, ADD pages_meta_description text");
}
$db->Execute("CREATE TABLE IF NOT EXISTS " . TABLE_META_TAGS . " (\n\t`meta_tags_id` int(11) NOT NULL AUTO_INCREMENT,\n\t`page` varchar(255) NOT NULL DEFAULT '',\n  `language_id` int(11) NOT NULL DEFAULT '1',\n  `metatags_title` varchar(255) NOT NULL DEFAULT '',\n  `metatags_keywords` text,\n  `metatags_description` text,\n  `meta_tag_group` varchar(256),\n  PRIMARY KEY (`meta_tags_id`,`language_id`));");
$db->Execute("INSERT INTO " . TABLE_META_TAGS . " (`page`, `language_id`, `metatags_title`, `metatags_keywords`, `metatags_description`, `meta_tag_group`) VALUES\n('site_wide', 1, 'Zen Cart!', 'The Art of E-commerce', 'ecommerce, open source, shop, online shopping, store', 'site_wide'),\n('home', 1, '', 'Home Meta Description', 'Meta Keywords', 'general'),\n('contact_us', 1, '', NULL, NULL, 'general'),\n('privacy', 1, '', NULL, NULL, 'general'),\n('conditions', 1, '', NULL, NULL, 'general');");
开发者ID:bislewl,项目名称:zencart_meta_tags_controller,代码行数:31,代码来源:1_0_0.php

示例13: die

<?php

// $Id: reg_easypopulate_4.php, v4.0.21 06-01-2012 chadderuski $
// NOTE: This is for registering the mod in zencart 1.5+ only
if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
}
if (function_exists('zen_register_admin_page')) {
    if (!zen_page_key_exists('easypopulate_4')) {
        // Add easypopulate_4 to Tools menu
        zen_register_admin_page('easypopulate_4', 'BOX_TOOLS_EASYPOPULATE_4', 'FILENAME_EASYPOPULATE_4', '', 'tools', 'Y', 97);
    }
}
开发者ID:gs125790,项目名称:EasyPopulate-4.0,代码行数:13,代码来源:reg_easypopulate_4.php

示例14: VALUES

    $db->Execute($sql);
    $sql = "INSERT INTO " . DB_PREFIX . "configuration VALUES (NULL, 'Show currency symbols','DPU_SHOW_CURRENCY_SYMBOLS', 'true', '', '" . $dpu_configuration_id . "', 70, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')";
    $db->Execute($sql);
    $sql = "INSERT INTO " . DB_PREFIX . "configuration VALUES (NULL, 'Show product quantity','DPU_SHOW_QUANTITY', 'false', '', '" . $dpu_configuration_id . "', 80, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')";
    $db->Execute($sql);
    $sql = "INSERT INTO " . DB_PREFIX . "configuration VALUES (NULL, 'Where to display the second price','DPU_SECOND_PRICE', 'cartAdd', '', '" . $dpu_configuration_id . "', 90, NULL, now(), NULL, NULL)";
    $db->Execute($sql);
} else {
    $messageStack->add('Database Error: Unable to access configuration_group_id in table' . TABLE_CONFIGURATION_GROUP, 'error');
    $failed = true;
}
// Add support for admin profiles to edit configuration and orders
if (function_exists('zen_register_admin_page')) {
    if (!zen_page_key_exists('configDynamicPriceUpdater')) {
        // Get the sort order
        $page_sort_query = "SELECT MAX(sort_order) as max_sort FROM `" . TABLE_ADMIN_PAGES . "` WHERE menu_key='configuration'";
        $page_sort = $db->Execute($page_sort_query);
        $page_sort = $page_sort->fields['max_sort'] + 1;
        // Register the administrative pages
        zen_register_admin_page('configDynamicPriceUpdater', 'BOX_CONFIGURATION_DYNAMIC_PRICE_UPDATER', 'FILENAME_CONFIGURATION', 'gID=' . $dpu_configuration_id, 'configuration', 'Y', $page_sort);
    }
}
if (file_exists(DIR_FS_ADMIN . DIR_WS_INCLUDES . 'auto_loaders/config.dpu.php')) {
    if (!unlink(DIR_FS_ADMIN . DIR_WS_INCLUDES . 'auto_loaders/config.dpu.php')) {
        $messageStack->add('The auto-loader file ' . DIR_FS_ADMIN . 'includes/auto_loaders/config.dpu.php has not been deleted. For this module to work you must delete the ' . DIR_FS_ADMIN . 'includes/auto_loaders/config.dpu.php file manually.  Before you post on the Zen Cart forum to ask, YES you are REALLY supposed to follow these instructions and delete the ' . DIR_FS_ADMIN . 'includes/auto_loaders/config.dpu.php file.', 'error');
        $failed = true;
    }
}
if (!$failed) {
    $messageStack->add('Dynamic Price Updater v3.0 install completed!', 'success');
}
开发者ID:quangn92,项目名称:visualyou,代码行数:31,代码来源:init_dpu_config.php

示例15: ultimate_seo_install

function ultimate_seo_install($version)
{
    global $db, $messageStack;
    $failed = false;
    // Check to make sure all new files have been uploaded.
    // These are not intended to be perfect checks, just a quick 'hey you'.
    $files = array(DIR_FS_ADMIN . DIR_WS_INCLUDES . 'extra_datafiles/seo.php', DIR_FS_ADMIN . DIR_WS_FUNCTIONS . 'extra_functions/seo.php', DIR_FS_ADMIN . DIR_WS_LANGUAGES . 'english/extra_definitions/seo.php', DIR_FS_CATALOG . DIR_WS_INCLUDES . 'extra_datafiles/seo.php', DIR_FS_CATALOG . DIR_WS_INCLUDES . 'auto_loaders/config.seo.php', DIR_FS_CATALOG . DIR_WS_INCLUDES . 'init_includes/init_seo_config.php', DIR_FS_CATALOG . DIR_WS_CLASSES . 'seo.url.php');
    foreach ($files as $file) {
        if (!file_exists($file)) {
            $messageStack->add(sprintf(SEO_INSTALL_ERROR_FILE_NOT_FOUND, $file), 'error');
            $failed = true;
        }
    }
    // Attempt a database upgrade before doing anything else.
    ultimate_seo_upgrade($version);
    // Now check the required tables if not already present
    $check = $db->Execute('SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES ' . 'WHERE TABLE_SCHEMA = \'' . DB_DATABASE . '\' ' . 'AND TABLE_NAME = \'' . TABLE_SEO_CACHE . '\'');
    if ($check->EOF) {
        $db->Execute('CREATE TABLE `' . TABLE_SEO_CACHE . '` ( ' . '`cache_id` VARCHAR(32) NOT NULL default \'\', ' . '`cache_language_id` TINYINT(1) NOT NULL default \'0\', ' . '`cache_name` VARCHAR(255) NOT NULL default \'\', ' . '`cache_data` MEDIUMTEXT NOT NULL, ' . '`cache_global` TINYINT(1) NOT NULL default \'1\', ' . '`cache_gzip` TINYINT(1) NOT NULL default \'1\', ' . '`cache_method` VARCHAR(20) NOT NULL default \'RETURN\', ' . '`cache_date` DATETIME NOT NULL default \'0000-00-00 00:00:00\', ' . '`cache_expires` DATETIME NOT NULL default \'0000-00-00 00:00:00\', ' . 'PRIMARY KEY (`cache_id`,`cache_language_id`), ' . 'KEY `cache_id` (`cache_id`), ' . 'KEY `cache_language_id` (`cache_language_id`), ' . 'KEY `cache_global` (`cache_global`) ' . ') ENGINE=MyISAM');
    }
    // Now check the configuration group
    $group_id = 0;
    $check = $db->Execute('SELECT `configuration_group_id` FROM `' . TABLE_CONFIGURATION_GROUP . '` ' . 'WHERE `configuration_group_title` = \'' . SEO_CONFIGURATION_GROUP_TITLE . '\'');
    if ($check->EOF) {
        $max_sort = $db->Execute('SELECT MAX(sort_order) AS `max_sort` FROM `' . TABLE_CONFIGURATION_GROUP . '`');
        if (!$max_sort->EOF) {
            $max_sort = $max_sort->fields['max_sort'] + 1;
            // Create configuration group
            $db->Execute('INSERT INTO `' . TABLE_CONFIGURATION_GROUP . '` ' . 'VALUES (\'\', \'' . SEO_CONFIGURATION_GROUP_TITLE . '\', ' . '\'' . SEO_CONFIGURATION_GROUP_DESCRIPTION . '\', \'' . $max_sort . '\', \'1\')');
            $group_id = (int) $db->insert_ID();
        } else {
            $messageStack->add(sprintf(SEO_INSTALL_ERROR_SORT_ORDER, TABLE_CONFIGURATION_GROUP), 'error');
            $failed = true;
        }
    } else {
        $group_id = (int) $check->fields['configuration_group_id'];
    }
    // Install (or update) any needed configuration items
    if ($group_id != 0) {
        $sql_data_array = array('configuration_group_id' => $group_id, 'sort_order' => 0, 'last_modified' => 'null', 'date_added' => 'now()');
        foreach (ultimate_seo_default_settings($version) as $key => $data) {
            $check = $db->Execute('SELECT `configuration_id` FROM `' . TABLE_CONFIGURATION . '` ' . 'WHERE `configuration_key`=\'' . $key . '\'');
            if ($check->EOF) {
                $data['configuration_key'] = $key;
                $data['configuration_title'] = constant($key . '_TITLE');
                $data['configuration_description'] = constant($key . '_DESCRIPTION');
                zen_db_perform(TABLE_CONFIGURATION, array_merge($sql_data_array, $data));
            } else {
                unset($data['configuration_value']);
                ultimate_seo_upgrade_option($key, array_merge($data, array('sort_order' => $sql_data_array['sort_order'])));
            }
            $sql_data_array['sort_order']++;
        }
        // Update the version stored in the database for this plugin
        $sql_data_array = array('last_modified' => 'now()', 'configuration_value' => $version, 'set_function' => 'zen_cfg_select_option(array(\\\'' . $version . '\\\'),');
        zen_db_perform(TABLE_CONFIGURATION, $sql_data_array, 'update', '`configuration_key`=\'USU_VERSION\'');
        unset($sql_data_array);
        // Reset the cache to deal with any stale entries
        usu_reset_cache_data('true');
    }
    unset($defaults);
    // Add support for admin profiles
    if (function_exists('zen_register_admin_page')) {
        if (!zen_page_key_exists('configUltimateSEO')) {
            $max_sort = $db->Execute('SELECT MAX(sort_order) AS `max_sort` FROM `' . TABLE_ADMIN_PAGES . '` WHERE `menu_key`=\'configuration\'');
            if (!$max_sort->EOF) {
                $max_sort = $max_sort->fields['max_sort'] + 1;
                // Register the administrative page
                zen_register_admin_page('configUltimateSEO', 'SEO_CONFIGURATION_GROUP_TITLE', 'FILENAME_CONFIGURATION', 'gID=' . $group_id, 'configuration', 'Y', $max_sort);
            } else {
                $messageStack->add(sprintf(SEO_INSTALL_ERROR_SORT_ORDER, TABLE_ADMIN_PAGES), 'error');
                $failed = true;
            }
        }
    }
    return $failed;
}
开发者ID:R-Future,项目名称:zencart,代码行数:77,代码来源:init_seo_config.php


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