本文整理汇总了PHP中return_array函数的典型用法代码示例。如果您正苦于以下问题:PHP return_array函数的具体用法?PHP return_array怎么用?PHP return_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了return_array函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLangCodes
function getLangCodes()
{
global $db;
$l = array();
$result = $db->query('SELECT id FROM ' . $db->pre . 'language ORDER BY language', __LINE__, __FILE__);
while ($row = $db->fetch_assoc($result)) {
$settings = return_array('settings', $row['id']);
if (!isset($l[$settings['spellcheck_dict']])) {
$l[$settings['spellcheck_dict']] = array();
}
$l[$settings['spellcheck_dict']] = $row['id'];
}
return $l;
}
示例2: while
</tr>
<tr>
<td class="ubox" colspan="2"><ul>
<li><?php
echo $lang->phrase('admin_packages_language_edit_translations_text_1');
?>
</li>
<li><?php
echo $lang->phrase('admin_packages_language_edit_translations_text_2');
?>
</li>
</ul></td>
</tr>
<?php
while ($row = $db->fetch_assoc($result)) {
$phrases = return_array('modules', $row['id']);
if (!isset($phrases[$phrase])) {
$phrases[$phrase] = '';
}
?>
<tr>
<td class="mbox" width="50%"><em><?php
echo $row['language'];
?>
</em> <?php
echo $lang->phrase('admin_packages_language_edit_translation');
?>
<br /><span class="stext"><?php
echo $lang->phrase('admin_packages_language_edit_translation_text');
?>
</span></td>
示例3: head
echo head();
error('javascript: history.back(-1);', 'Specified package (' . $id . ') does not exist.');
}
$data = $db->fetch_assoc($result);
$file = $gpc->get('file', none);
if (empty($file)) {
$file = convert2adress($data['title']) . '.zip';
}
$ini = $myini->read("modules/{$data['id']}/config.ini");
if (!isset($ini['language']) || !is_array($ini['language']) || is_array($ini['language']) && count($ini['language']) == 0) {
$ini['language'] = array();
}
$dirs = array();
$langcodes = getLangCodes();
foreach ($langcodes as $code => $lid) {
$langdata = return_array('modules', $lid);
$langdata = array_intersect_key($langdata, $ini['language']);
if ($lid == $config['langdir']) {
$ini['language'] = $langdata;
} else {
$ini['language_' . $code] = $langdata;
}
}
$myini->write("modules/{$data['id']}/config.ini", $ini);
$tpl = $gpc->get('tpl', int);
$tempdir = "temp/";
$error = false;
require_once 'classes/class.zip.php';
$archive = new PclZip($tempdir . $file);
$v_list = $archive->create("modules/{$id}/", PCLZIP_OPT_REMOVE_PATH, "modules/{$id}/");
if ($v_list == 0) {
示例4: foot
echo foot();
} elseif ($job == 'phrase_file_copy2') {
echo head();
$dest = $gpc->get('id', int);
$source = $gpc->get('dir', int);
$file = $gpc->get('file', none);
$encfile = base64_decode($file);
$phrase = $gpc->get('phrase', str);
$destpath = 'language/' . $dest . '/' . $encfile;
$c = new manageconfig();
if (!file_exists($destpath)) {
createParentDir($encfile, 'language/' . $dest);
$c->createfile($destpath, 'lang');
}
$encfile = substr($encfile, 0, strlen($encfile) - 8);
$langarr = return_array($encfile, $source);
if (!isset($langarr[$phrase])) {
error('admin.php?action=language&job=phrase_file&file=' . $file, $lang->phrase('admin_lang_phrase_not_found'));
}
$c->getdata($destpath, 'lang');
$c->updateconfig($phrase, str, $langarr[$phrase]);
$c->savedata();
ok('admin.php?action=language&job=phrase_file&file=' . $file, $lang->phrase('admin_lang_phrase_copied'));
} elseif ($job == 'phrase_delete') {
echo head();
$delete = $gpc->get('delete', arr_none);
$result = $db->query('SELECT * FROM ' . $db->pre . 'language ORDER BY language');
while ($row = $db->fetch_assoc($result)) {
foreach ($delete as $base) {
$base = base64_decode($base);
$path = "language/{$row['id']}/{$base}";
示例5: elseif
if ($file == 'javascript') {
$delobj = $scache->load('loadlanguage');
$delobj->delete();
}
ok('admin.php?action=language&job=lang_array&id='.$id.'&file='.$file.'&page='.$page);
}
elseif ($job == 'lang_default') {
echo head();
$id = $gpc->get('id', int);
$c = new manageconfig();
$c->getdata();
$c->updateconfig('langdir', int, $id);
$data = return_array('settings', $id);
$c->updateconfig('asia_charset', str, $data['charset']);
$c->savedata();
$delobj = $scache->load('loadlanguage');
$delobj->delete();
ok('admin.php?action=language&job=manage');
}
elseif ($job == 'lang_edit') {
echo head();
$id = $gpc->get('id', int);
$myini = new INI();
// Emails
$mailcategories = array(