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


PHP manageconfig::getdata方法代码示例

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


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

示例1: 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__);
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:15,代码来源:function.viscacha_backend.php

示例2: 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();
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:46,代码来源:function.tools.php

示例3: manageconfig

&amp;package=<?php 
            echo IMPTYPE_PACKAGE;
            ?>
"><?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);
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:packages.php

示例4: foreach

 // Delete templates
 $designObj = $scache->load('loaddesign');
 $designs = $designObj->get(true);
 foreach ($designs as $row) {
     $tpldir = "templates/{$row['template']}/modules/{$id}/";
     if (file_exists($tpldir)) {
         rmdirr($tpldir);
     }
 }
 // Delete phrases
 if (isset($ini['language']) && count($ini['language']) > 0) {
     $result = $db->query('SELECT * FROM ' . $db->pre . 'language', __LINE__, __FILE__);
     while ($row = $db->fetch_assoc($result)) {
         $path = "language/{$row['id']}/modules.lng.php";
         if (file_exists($path)) {
             $c->getdata($path, 'lang');
             foreach ($ini['language'] as $phrase => $value) {
                 $c->delete($phrase);
             }
             $c->savedata();
         }
     }
 }
 // Delete modules
 if (file_exists($dir)) {
     rmdirr($dir);
 }
 if ($confirm) {
     echo head();
     ok('admin.php?action=cms&job=plugins&sort=1', 'Package successfully deleted!');
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:cms.php

示例5: foot

    }
    ?>
  <tr>
   <td class="ubox" colspan="2" align="center"><input type="submit" name="Submit" value="<?php 
    echo $lang->phrase('admin_lang_form_save');
    ?>
" /></td>
  </tr>
 </table>
</form>
	<?php 
    echo foot();
} elseif ($job == 'phrase_add2') {
    echo head();
    $varname = $gpc->get('varname', none);
    $text = $gpc->get('text', none);
    $file = base64_decode($gpc->get('file', none));
    $language = $gpc->get('langt', none);
    $c = new manageconfig();
    foreach ($language as $id => $t) {
        if (empty($t)) {
            $t = $text;
        }
        $c->getdata("language/{$id}/{$file}", 'lang');
        $c->updateconfig($varname, str, $t);
        $c->savedata();
    }
    ok('admin.php?action=language&job=phrase_file&file=' . urlencode(base64_encode($file)));
} else {
    viscacha_header('Location: admin.php?action=language&job=manage');
}
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:language.php

示例6: trim

        $config['dbpw'] = trim($_REQUEST['dbpw']);
    }
    if (isset($_REQUEST['database'])) {
        $config['database'] = trim($_REQUEST['database']);
    }
    if (isset($_REQUEST['pconnect'])) {
        $config['pconnect'] = $_REQUEST['pconnect'];
    }
    if (isset($_REQUEST['dbprefix'])) {
        $config['dbprefix'] = trim($_REQUEST['dbprefix']);
    }
    if (isset($_REQUEST['dbsystem'])) {
        $config['dbsystem'] = $_REQUEST['dbsystem'];
    }
    $c = new manageconfig();
    $c->getdata('../data/config.inc.php');
    $c->updateconfig('host', str);
    $c->updateconfig('dbuser', str);
    $c->updateconfig('dbpw', str);
    $c->updateconfig('database', str);
    $c->updateconfig('pconnect', int);
    $c->updateconfig('dbprefix', str);
    $c->updateconfig('dbsystem', str);
    $c->savedata();
    ?>
<div class="bfoot center">Database Settings saved!</div>
<?php 
}
require '../data/config.inc.php';
require_once '../classes/database/' . $config['dbsystem'] . '.inc.php';
$db = new DB($config['host'], $config['dbuser'], $config['dbpw'], $config['database'], $config['pconnect'], false, $config['dbprefix']);
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:7.php

示例7: array

$glob = array();
$glob['board_rules'] = 'Forum Rules';
$glob['editprofile_pic_delete'] = 'Delete Avatar';
$glob['forum_is_read_only'] = 'Sorry, but you are not allowed to write a post in this forum, because this forum is read only.';
$glob['no_board_rules_specified'] = 'No forum rules specified!';
$glob['no_existing_notices'] = 'You did not store any notes!';
$glob['showtopic_options_abo_remove'] = 'Unsubscribe from this topic';
$glob['subscribed_successfully'] = 'You successfully subscribed to this topic.';
$glob['unsubscribed_successfully'] = 'You successfully unsubscribed from this topic.';
$glob['upload_error_default'] = 'An unknown error occured while uploading.';
$glob['showtopic_prefix_title'] = '[{$prefix}] ';
$glob['upload_error_fileexists'] = 'File already exists.';
$glob['upload_error_maximagesize'] = 'Max. imagesize reached. Image is not allowed to be greater than {$miw} x {$mih}.';
$glob['upload_error_noaccess'] = 'Access denied. Could not copy file.';
foreach ($lngids as $lid) {
    $c->getdata('../language/' . $lid . '/global.lng.php', 'lang');
    foreach ($glob as $key => $val) {
        $c->updateconfig($key, str, $val);
    }
    $c->savedata();
    $c->getdata('../language/' . $lid . '/wwo.lng.php', 'lang');
    foreach ($wwo as $key => $val) {
        $c->updateconfig($key, str, $val);
    }
    $c->savedata();
}
// templates
$file = '../templates/editor/rte.css';
$edit = file_get_contents($file);
$edit = preg_replace("~(.rteBk tbody tr td, .rteBk tr td {[\r\n]+)~i", "\\1\tborder-width: 0px;\r\n", $edit);
$filesystem->chmod($file, 0666);
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:3.php

示例8: foot

  </tr>
 </table>
 <?php 
    }
    ?>
	<?php 
    echo foot();
} elseif ($job == 'design_default') {
    echo head();
    $id = $gpc->get('id', int);
    $result = $db->query("SELECT publicuse FROM {$db->pre}designs WHERE id = '{$id}' LIMIT 1");
    $info = $db->fetch_assoc($result);
    if ($info['publicuse'] == 1) {
        include 'classes/class.phpconfig.php';
        $c = new manageconfig();
        $c->getdata();
        $c->updateconfig('templatedir', int, $id);
        $c->savedata();
        $delobj = $scache->load('loaddesign');
        $delobj->delete();
        ok('admin.php?action=designs&job=design');
    } else {
        error('admin.php?action=designs&job=design', $lang->phrase('admin_design_set_design_as_default_error'));
    }
} elseif ($job == 'design_edit') {
    $id = $gpc->get('id', int);
    $result = $db->query("SELECT * FROM {$db->pre}designs WHERE id = '{$id}' LIMIT 1");
    $info = $db->fetch_assoc($result);
    $dir = "templates/";
    $templates = array();
    $d = dir($dir);
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:designs.php

示例9: elseif

    }
    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) {
        $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();
    }
}
echo "- Language files updated.<br />";
// Set incompatible packages inactive
setPackagesInactive();
echo "- Incompatible Packages set as 'inactive'.<br />";
// Refresh Cache
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:4.php

示例10: foot

 </table>
</form>
	<?php
	echo foot();
}
elseif ($job == 'phrase_add2') {
	echo head();
	$source_id = $gpc->get('id', int);
	$file = $gpc->get('file', path);
	$varname = $gpc->get('varname', none);
	$text = $gpc->get('text', none);
	$language = $gpc->get('langt', arr_none);

	$c = new manageconfig();
	foreach ($language as $id => $t) {
		$c->getdata("language/{$id}/{$file}.lng.php", 'lang');
		$c->updateconfig($varname, str, iif(empty($t), $text, $t));
		$c->savedata();
	}

	if ($file == 'javascript') {
		$delobj = $scache->load('loadlanguage');
		$delobj->delete();
	}

	if (is_id($source_id))
		ok('admin.php?action=language&job=lang_array&id='.$source_id.'&file='.$file);
	else
		ok('admin.php?action=language&job=phrase_add&file='.$file);
}
else {
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:31,代码来源:language.php


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