本文整理汇总了PHP中config::create方法的典型用法代码示例。如果您正苦于以下问题:PHP config::create方法的具体用法?PHP config::create怎么用?PHP config::create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类config
的用法示例。
在下文中一共展示了config::create方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
/************************************************************************
* Dashboard2
* Copyright 2006-2010 by Niels Leenheer
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
config::create('redirectToLogin', 'boolean', true);
/* Dutch language strings */
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='login', value='Inloggen'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='logout', value='Uitloggen'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='username', value='Gebruikersnaam'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='password', value='Wachtwoord'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='rememberpassword', value='Wachtwoord onthouden'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='passwordnotcorrect', value='De door u opgegeven gebruikersnaam of het door u opgegeven wachtwoord is niet correct.'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='anerroroccured', value='Er is een fout opgetreden'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='notenoughrights', value='U heeft niet voldoende rechten.'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='logintoview', value='Log in om deze pagina te openen.'");
/* English language strings */
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='login', value='Login'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='logout', value='Logout'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='username', value='Username'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='password', value='Password'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='rememberpassword', value='Remember password'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='passwordnotcorrect', value='The supplied username or password is not correct.'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='anerroroccured', value='An error occured'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='notenoughrights', value='You are not allowed to view this page.'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='logintoview', value='Log in to open this page.'");
示例2: int
<?php
/************************************************************************
* Dashboard2
* Copyright 2006-2010 by Niels Leenheer
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
sql::create("contents_links", "\r\n\t\t`ID` int(11) NOT NULL default '0',\r\n\t\t`revision` int(11) NOT NULL default '0',\r\n\t\t`link` int(11) NOT NULL auto_increment,\r\n\t\t`position` int(11) NOT NULL default '0',\r\n\t\t`url` varchar(255) NOT NULL default '',\r\n\t\t`title` varchar(255) NOT NULL default '',\r\n\t\t`target` varchar(16) NOT NULL default '',\r\n\t\tUNIQUE KEY `id_revision_link` (`ID`,`revision`,`link`)\r\n\t");
config::create('linksAlign', 'string', 'right');
/* Dutch language strings */
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='links', value='Links'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='linksurl', value='Adres'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='linkstarget', value='Doel'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='newwindow', value='Nieuw venster'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='currentwindow', value='Hetzelfde venster'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='linksdraganddrop', value='Klik op een link om te wijzigen of sleep de links naar de gewenste positie'");
/* English language strings */
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='links', value='Links'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='linksurl', value='URL'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='linkstarget', value='Target'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='newwindow', value='New window'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='currentwindow', value='Current window'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='linksdraganddrop', value='Click a link to edit it or drag and drop the links in the order you want'");
示例3:
<?php
/************************************************************************
* Dashboard2
* Copyright 2006-2010 by Niels Leenheer
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
config::create('installed', 'boolean', true);
config::create('inlineLogin', 'boolean', false);
config::create('inlineLogout', 'boolean', false);
config::create('multiLanguageSupport', 'boolean', false);
config::create('showLastModified', 'boolean', true);
config::create('siteTitle', 'string', 'Acme Cogs, Ltd.');
示例4:
<?php
/************************************************************************
* Dashboard2
* Copyright 2006-2010 by Niels Leenheer
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
config::create('analyticsId', 'string', '');
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='analytics', value='Analytics'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='nl', id='analyticsId', value='Web Property ID'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='analytics', value='Analytics'");
sql::query("INSERT INTO " . _TABLE_PREFIX_ . "strings SET language='en', id='analyticsId', value='Web Property ID'");