本文整理汇总了PHP中manageconfig::savedata方法的典型用法代码示例。如果您正苦于以下问题:PHP manageconfig::savedata方法的具体用法?PHP manageconfig::savedata怎么用?PHP manageconfig::savedata使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类manageconfig
的用法示例。
在下文中一共展示了manageconfig::savedata方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateLanguageFiles
function updateLanguageFiles($ini)
{
$c = new manageconfig();
$codes = array();
$keys = array('language', 'language_de');
$codes = getLangCodesByKeys($keys);
$langcodes = getLangCodes();
foreach ($langcodes as $code => $lid) {
$ldat = explode('_', $code);
if (isset($codes[$ldat[0]])) {
$count = count($codes[$ldat[0]]);
if (in_array('', $codes[$ldat[0]])) {
$count--;
}
} else {
$count = -1;
}
if (isset($codes[$ldat[0]]) && !empty($ldat[1]) && in_array($ldat[1], $codes[$ldat[0]])) {
// Nehme Original
$src = 'language_' . $code;
} elseif (isset($codes[$ldat[0]]) && in_array('', $codes[$ldat[0]])) {
// Nehme gleichen Langcode, aber ohne Countrycode
$src = 'language_' . $ldat[0];
} elseif (isset($codes[$ldat[0]]) && $count > 0) {
// Nehme gleichen Langcode, aber falchen Countrycode
$src = 'language_' . $ldat[0] . '_' . reset($codes[$ldat[0]]);
} else {
// Nehme Standard
$src = 'language';
}
foreach ($ini as $file => $data) {
if (!isset($data[$src])) {
continue;
}
$c->getdata("language/{$lid}/{$file}.lng.php", 'lang');
foreach ($data[$src] as $varname => $text) {
if ($text === null) {
$c->delete($varname);
} else {
$c->updateconfig($varname, str, $text);
}
}
$c->savedata();
}
}
}
示例2: pluginSettingGroupUninstall
function pluginSettingGroupUninstall($pluginid)
{
global $db;
$result = $db->query("SELECT id, name FROM {$db->pre}settings_groups WHERE name = 'module_{$pluginid}' LIMIT 1");
$row = $db->fetch_assoc($result);
$c = new manageconfig();
$c->getdata();
$result = $db->query("SELECT name FROM {$db->pre}settings WHERE sgroup = '{$row['id']}'");
while ($row2 = $db->fetch_assoc($result)) {
$c->delete(array($row['name'], $row2['name']));
}
$c->savedata();
$db->query("DELETE FROM {$db->pre}settings WHERE sgroup = '{$row['id']}'", __LINE__, __FILE__);
$db->query("DELETE FROM {$db->pre}settings_groups WHERE id = '{$row['id']}'", __LINE__, __FILE__);
}
示例3: manageconfig
?>
"><?php
echo $lang->phrase('admin_packages_browser_details');
?>
</a>
</td>
</tr>
<?php
}
?>
</table>
<?php
$c = new manageconfig();
$c->getdata('admin/data/config.inc.php', 'admconfig');
$c->updateconfig('checked_package_updates', int, 1);
$c->savedata();
echo foot();
}
} elseif ($job == 'browser') {
$pb = $scache->load('package_browser');
$types = $pb->types();
$type = $gpc->get('type', int, IMPTYPE_PACKAGE);
$cats = $pb->categories($type);
if (count($cats) > 0) {
// Calculate random entry
unset($cat);
$i = 0;
do {
$keys = array_keys($cats);
shuffle($keys);
$rid = current($keys);