本文整理匯總了PHP中CLang::installed方法的典型用法代碼示例。如果您正苦於以下問題:PHP CLang::installed方法的具體用法?PHP CLang::installed怎麽用?PHP CLang::installed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CLang
的用法示例。
在下文中一共展示了CLang::installed方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: fclose
fclose($handle);
// do dbstuff
try {
$config = new CConfig();
$d = $database->load($_POST['databasetype']);
$d->connect($_POST['databasehost'], $_POST['databaseuser'], $_POST['databasepassword'], $_POST['databasename']);
define('TBL_PREFIX', $_POST['databaseprefix']);
$queries = file_get_contents('kernel/sql/users.sql');
$queries .= file_get_contents('kernel/sql/news.sql');
$queries .= file_get_contents('kernel/sql/polls.sql');
$queries .= file_get_contents('kernel/sql/basic.sql');
$queries .= file_get_contents('kernel/sql/help.sql');
// TODO
include_once 'kernel/language.class.php';
$languages = new CLang();
foreach ($languages->installed() as $language) {
echo $language;
$languages->update($language);
$tmpquery = file_get_contents('kernel/sql/basicpages.sql');
$tmpquery = ereg_replace('%language%', $languages->getPrefLangCode(), $tmpquery);
$tmpquery = ereg_replace('%shown_logout%', $languages->translate('logout'), $tmpquery);
$tmpquery = ereg_replace('%shown_index%', $languages->translate('Home'), $tmpquery);
$tmpquery = ereg_replace('%shown_registerform%', $languages->translate('Register'), $tmpquery);
$tmpquery = ereg_replace('%shown_sendpasswordform%', $languages->translate('Lost Password'), $tmpquery);
$tmpquery = ereg_replace('%shown_changeoptionsform%', $languages->translate('Edit Settings'), $tmpquery);
$tmpquery = ereg_replace('%shown_viewuserlist%', $languages->translate('Userlist'), $tmpquery);
$queries .= $tmpquery;
}
$queries = ereg_replace('%show_logout_in_nav%', Yes, $queries);
$queries = ereg_replace('%show_index_in_nav%', Yes, $queries);
$queries = ereg_replace('%show_registerform_in_nav%', No, $queries);