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


PHP Options::groupAdd方法代码示例

本文整理汇总了PHP中Options::groupAdd方法的典型用法代码示例。如果您正苦于以下问题:PHP Options::groupAdd方法的具体用法?PHP Options::groupAdd怎么用?PHP Options::groupAdd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Options的用法示例。


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

示例1: filesize

$fileSize = filesize('includes/options.inc.php');
// Get the options from the db, will by default have a false value
$dbTimeStamp = Options::get('modified');
$dbFileSize = Options::get('filesize');
// Force the filesize and modification date to strings to be able to compare it with the DB
settype($lastEdit, 'string');
settype($fileSize, 'string');
$optionsUpdate = false;
// Update version based on the date and / or filesize. This will also work if the db is empty
if ($dbTimeStamp !== $lastEdit or $dbFileSize !== $fileSize) {
    $optionsUpdate = true;
    Options::groupAdd('Website Settings', 'basic website information');
    Options::groupAdd('META Data', 'control the Meta Data for the website');
    Options::groupAdd('Email Templates', 'variables used in Email Templates');
    Options::groupAdd('Miscellaneous', 'general settings page, not editible');
    Options::groupAdd('User Settings', "options visible in the user's settings page");
    // Set the timestamp and filesize
    Options::add('modified', $lastEdit, 'hidden', 'Miscellaneous');
    // Do not modify these, they need to be static
    Options::add('filesize', $fileSize, 'hidden', 'Miscellaneous');
    // Do not modify these, they need to be static
    // These would be the options you want to set, it will first
    // Site
    Options::addOnce('siteName', 'http://www.mysite.co.za', 'input', 'Website Settings');
    Options::addOnce('siteLogo', 'assets/img/logo.png', 'input', 'Website Settings');
    Options::addOnce('siteIcon', 'assets/img/icon.png', 'input', 'Website Settings');
    Options::addOnce('prettyName', '<small>www.</small>MySite<small>.co.za</small>', 'input', 'Website Settings');
    // Email Templates
    Options::addOnce('emailName', 'www.MySite.co.za', 'input', 'Email Templates');
    Options::addOnce('emailInfo', 'info@mysite.co.za', 'input', 'Email Templates');
    Options::addOnce('emailAdmin', 'drpain@mweb.co.za', 'input', 'Email Templates');
开发者ID:repsycle,项目名称:baseline,代码行数:31,代码来源:options.inc.php

示例2: filesize

$lastEdit = $lastEdit['mtime'];
$fileSize = filesize('includes/options.inc.php');
// Get the options from the db, will by default have a false value
$dbTimeStamp = get_option('modified');
$dbFileSize = get_option('filesize');
// Force the filesize and modification date to strings to be able to compare it with the DB
settype($lastEdit, 'string');
settype($fileSize, 'string');
$optionsUpdate = false;
// Update version based on the date and / or filesize. This will also work if the db is empty
if ($dbTimeStamp !== $lastEdit or $dbFileSize !== $fileSize) {
    $optionsUpdate = true;
    Options::groupAdd('Website Settings', 'basic website information');
    Options::groupAdd('META Data', 'control the Meta Data for the website');
    Options::groupAdd('Email Templates', 'variables used in Email Templates');
    Options::groupAdd('Miscellaneous', 'general settings page');
    // Set the timestamp and filesize
    Options::add('modified', $lastEdit, 'hidden');
    // Do not modify these, they need to be static
    Options::add('filesize', $fileSize, 'hidden');
    // Do not modify these, they need to be static
    // These would be the options you want to set, it will first
    // Site
    Options::add('siteName', 'http://www.mysite.co.za', 'input', 'Website Settings');
    Options::add('siteLogo', 'assets/img/logo.png', 'input', 'Website Settings');
    Options::add('siteIcon', 'assets/img/icon.png', 'input', 'Website Settings');
    Options::add('prettyName', '<small>www.</small>MySite<small>.co.za</small>', 'input', 'Website Settings');
    // Email Templates
    Options::add('emailName', 'www.MySite.co.za', 'input', 'Email Templates');
    Options::add('emailInfo', 'info@mysite.co.za', 'input', 'Email Templates');
    Options::add('emailAdmin', 'drpain@mweb.co.za', 'input', 'Email Templates');
开发者ID:ninjahza,项目名称:baseline,代码行数:31,代码来源:options.inc.php

示例3: groupSet

 public static function groupSet($group, $desc = '')
 {
     return Options::groupAdd($group, $desc);
 }
开发者ID:ninjahza,项目名称:baseline,代码行数:4,代码来源:class.options.php

示例4: array

                // Set the option to the new value
                Options::set($dateOption, $timestamp);
                $changes = true;
            }
        }
    }
    if (isset($_POST['action']) && $_POST['action'] == 'update') {
        Options::set($_POST['option'], Options::get($_POST['option']), $_POST['type'], $_POST['group']);
        $changes = true;
    }
    if (isset($_POST['action']) && $_POST['action'] == 'add') {
        Options::set($_POST['option_name'], $_POST['option_value'], $_POST['type'], $_POST['group']);
        $changes = true;
    }
    if (isset($_POST['action']) && $_POST['action'] == 'group_add') {
        Options::groupAdd($_POST['group_name'], $_POST['group_desc']);
        $changes = true;
    }
    if (isset($_POST['action']) && $_POST['action'] == 'group_remove') {
        Options::groupRemove($_POST['group']);
        $changes = true;
    }
    if (isset($_POST['action']) && $_POST['action'] == 'remove') {
        Options::remove($_POST['option']);
        $changes = true;
    }
}
$title = "Admin <small>take control</small>";
Template::setBaseDir('./assets/tmpl');
$html = Template::loadTemplate('layout', array('header' => Template::loadTemplate('header', array('title' => $title, 'user' => $user, 'admin' => $isadmin, 'msg' => $msg, 'selected' => 'admin')), 'content' => Template::loadTemplate('admin', array('changes' => $changes)), 'footer' => Template::loadTemplate('footer', array('time_start' => $time_start))));
echo $html;
开发者ID:repsycle,项目名称:baseline,代码行数:31,代码来源:admin.php


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