本文整理汇总了PHP中exportdata函数的典型用法代码示例。如果您正苦于以下问题:PHP exportdata函数的具体用法?PHP exportdata怎么用?PHP exportdata使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了exportdata函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: array
}
$imgextarray = array('jpg', 'gif');
$id = $_G['gp_id'];
if ($operation == 'export' && $id) {
$smileyarray = DB::fetch_first("SELECT name, directory FROM " . DB::table('forum_imagetype') . " WHERE typeid='{$id}' AND type='smiley'");
if (!$smileyarray) {
cpheader();
cpmsg('smilies_type_nonexistence', '', 'error');
}
$smileyarray['smilies'] = array();
$query = DB::query("SELECT typeid, displayorder, code, url FROM " . DB::table('common_smiley') . " WHERE typeid='{$id}' AND type='smiley'");
while ($smiley = DB::fetch($query)) {
$smileyarray['smilies'][] = $smiley;
}
$smileyarray['version'] = strip_tags($_G['setting']['version']);
exportdata('Discuz! Smilies', $smileyarray['name'], $smileyarray);
}
cpheader();
if (!$operation) {
if (!submitcheck('smiliessubmit')) {
shownav('style', 'smilies_edit');
showsubmenu('nav_smilies', array(array('smilies_type', 'smilies', 1), array('smilies_import', 'smilies&operation=import', 0)));
showtips('smilies_tips_smileytypes');
showformheader('smilies');
showtableheader();
showsubtitle(array('', 'display_order', 'enable', 'smilies_type', 'dir', 'smilies_nums', ''));
$smtypes = 0;
$dirfilter = array();
$query = DB::query("SELECT * FROM " . DB::table('forum_imagetype') . " WHERE type='smiley' ORDER BY displayorder");
while ($type = DB::fetch($query)) {
$squery = DB::query("SELECT COUNT(*) FROM " . DB::table('common_smiley') . " WHERE typeid='{$type['typeid']}'");
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:31,代码来源:admincp_smilies.php
示例2: unset
unset($modules['extra']);
$pluginarray['plugin']['modules'] = serialize($modules);
$plugindir = DISCUZ_ROOT . './source/plugin/' . $pluginarray['plugin']['directory'];
if (file_exists($plugindir . '/install.php')) {
$pluginarray['installfile'] = 'install.php';
}
if (file_exists($plugindir . '/uninstall.php')) {
$pluginarray['uninstallfile'] = 'uninstall.php';
}
if (file_exists($plugindir . '/upgrade.php')) {
$pluginarray['upgradefile'] = 'upgrade.php';
}
if (file_exists($plugindir . '/check.php')) {
$pluginarray['checkfile'] = 'check.php';
}
exportdata('Discuz! Plugin', $plugin['identifier'], $pluginarray);
} elseif ($operation == 'import') {
if (!submitcheck('importsubmit') && !isset($_G['gp_dir'])) {
shownav('plugin');
showsubmenu('nav_plugins', array(array('plugins_list', 'plugins', 0), array('plugins_install', 'plugins&operation=import', 1), $isplugindeveloper ? array('plugins_add', 'plugins&operation=add', 0) : array()));
$query = DB::query("SELECT * FROM " . DB::table('common_plugin') . " ORDER BY available DESC, pluginid DESC");
$installsdir = array();
while ($plugin = DB::fetch($query)) {
$installsdir[] = $plugin['directory'];
}
showtableheader();
echo '<tr><td><div class="ofolder">source/plugin/</div></td><td></td></tr>';
$plugindir = DISCUZ_ROOT . './source/plugin';
$pluginsdir = dir($plugindir);
$newplugins = array();
while ($entry = $pluginsdir->read()) {
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:admincp_plugins.php
示例3: empty
$defaultnew = $_G['gp_defaultnew'];
$newname = $_G['gp_newname'];
$id = $_G['gp_id'];
$operation = empty($operation) ? 'admin' : $operation;
if ($operation == 'export' && $id) {
$stylearray = DB::fetch_first("SELECT s.name, s.templateid, t.name AS tplname, t.directory, t.copyright FROM " . DB::table('common_style') . " s LEFT JOIN " . DB::table('common_template') . " t ON t.templateid=s.templateid WHERE styleid='{$id}'");
if (!$stylearray) {
cpheader();
cpmsg('styles_export_invalid', '', 'error');
}
$query = DB::query("SELECT * FROM " . DB::table('common_stylevar') . " WHERE styleid='{$id}'");
while ($style = DB::fetch($query)) {
$stylearray['style'][$style['variable']] = $style['substitute'];
}
$stylearray['version'] = strip_tags($_G['setting']['version']);
exportdata('Discuz! Style', $stylearray['name'], $stylearray);
}
cpheader();
$predefinedvars = array('available' => array(), 'boardimg' => array(), 'imgdir' => array(), 'styleimgdir' => array(), 'stypeid' => array(), 'headerbgcolor' => array(0, $lang['styles_edit_type_bg']), 'bgcolor' => array(0), 'sidebgcolor' => array(0, '', '#FFF sidebg.gif repeat-y 100% 0'), 'titlebgcolor' => array(0), 'headerborder' => array(1, $lang['styles_edit_type_header'], '1px'), 'headertext' => array(0), 'footertext' => array(0), 'font' => array(1, $lang['styles_edit_type_font']), 'fontsize' => array(1), 'threadtitlefont' => array(1, $lang['styles_edit_type_thread_title']), 'threadtitlefontsize' => array(1), 'smfont' => array(1), 'smfontsize' => array(1), 'tabletext' => array(0), 'midtext' => array(0), 'lighttext' => array(0), 'link' => array(0, $lang['styles_edit_type_url']), 'highlightlink' => array(0), 'lightlink' => array(0), 'wrapbg' => array(0), 'wrapbordercolor' => array(0), 'msgfontsize' => array(1, $lang['styles_edit_type_post'], '14px'), 'contentwidth' => array(1), 'contentseparate' => array(0), 'menubgcolor' => array(0, $lang['styles_edit_type_menu']), 'menutext' => array(0), 'menuhoverbgcolor' => array(0), 'menuhovertext' => array(0), 'inputborder' => array(0, $lang['styles_edit_type_input']), 'inputborderdarkcolor' => array(0), 'inputbg' => array(0, '', '#FFF'), 'dropmenuborder' => array(0, $lang['styles_edit_type_dropmenu']), 'dropmenubgcolor' => array(0), 'floatbgcolor' => array(0, $lang['styles_edit_type_float']), 'floatmaskbgcolor' => array(0), 'commonborder' => array(0, $lang['styles_edit_type_other']), 'commonbg' => array(0), 'specialborder' => array(0), 'specialbg' => array(0), 'noticetext' => array(0));
if ($operation == 'admin') {
$query = DB::query("SELECT s.styleid, s.available, s.name, t.name AS tplname, t.directory, t.copyright FROM " . DB::table('common_style') . " s LEFT JOIN " . DB::table('common_template') . " t ON t.templateid=s.templateid ORDER BY s.available desc, s.styleid");
$sarray = $tpldirs = array();
while ($row = DB::fetch($query)) {
$sarray[$row['styleid']] = $row;
$tpldirs[] = realpath($row['directory']);
}
$defaultid = DB::result_first("SELECT svalue FROM " . DB::table('common_setting') . " WHERE skey='styleid'");
if (!submitcheck('stylesubmit')) {
$narray = array();
$dir = DISCUZ_ROOT . './template/';
$templatedir = dir($dir);
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:admincp_styles.php
示例4: updatecache
updatecache('threadsorts');
}
cpmsg('threadtype_import_succeed', 'action=threadtypes', 'succeed');
} elseif ($operation == 'export') {
$sortid = intval($_GET['sortid']);
$typevarlist = array();
$typevararr = C::t('forum_typevar')->fetch_all_by_sortid($sortid);
$typeoptionarr = C::t('forum_typeoption')->fetch_all(array_keys($typevararr));
$threadtypearr = C::t('forum_threadtype')->fetch($sortid);
foreach ($typevararr as $typevar) {
$typeoption = $typeoptionarr[$typevar['optionid']];
$typevar = array_merge($threadtypearr, $typevar);
$typevar = array_merge($typeoption, $typevar);
$typevar['tpdescription'] = $typeoption['description'];
$typevar['ttdescription'] = $threadtypearr['description'];
$typevar['tpexpiration'] = $typeoption['expiration'];
$typevar['ttexpiration'] = $threadtypearr['expiration'];
unset($typevar['fid']);
$typevarlist[] = $typevar;
}
if (empty($typevarlist)) {
$threadtype = C::t('forum_threadtype')->fetch($sortid);
$threadtype['ttdescription'] = $threadtype['description'];
unset($threadtype['fid']);
$typevarlist[] = $threadtype;
}
if (empty($typevarlist)) {
cpmsg('threadtype_export_error');
}
exportdata('Discuz! Threadtypes', $typevarlist[0]['typeid'], $typevarlist);
}
开发者ID:deepziyu,项目名称:JX3PVE,代码行数:31,代码来源:admincp_threadtypes.php
示例5: strip_tags
if (file_exists($entrydir . '/upgrade.php')) {
$app['extra']['upgradefile'] = 'upgrade.php';
}
if (file_exists($entrydir . '/check.php')) {
$app['extra']['checkfile'] = 'check.php';
}
if (file_exists($entrydir . '/enable.php')) {
$app['extra']['enablefile'] = 'enable.php';
}
if (file_exists($entrydir . '/disable.php')) {
$app['extra']['disablefile'] = 'disable.php';
}
}
$apparray['app'] = $app;
$apparray['version'] = strip_tags($_G['setting']['version']);
exportdata('Dzz! app', $app['identifier'] ? $app['identifier'] : random(5), $apparray);
exit;
} elseif ($do == 'import') {
//导入应用
if (!submitcheck('importsubmit')) {
include template('import');
} else {
$apparray = getimportdata('Dzz! app');
if ($apparray['app']['identifier']) {
if (!is_dir(DZZ_ROOT . './dzz/' . $apparray['app']['identifier'])) {
showmessage('应用目录不存在,请将应用文件放入dzz/下后重试!');
}
$extra = unserialize($apparray['app']['extra']);
$filename = $extra['installfile'];
if (!empty($filename) && preg_match('/^[\\w\\.]+$/', $filename)) {
$filename = DZZ_ROOT . './dzz/' . ${$apparray}['app']['identifier'] . '/' . $filename;
开发者ID:druphliu,项目名称:dzzoffice,代码行数:31,代码来源:cp.php
示例6: exit
exit('Access Denied');
}
require_once libfile('function/admin');
$do = trim($_GET['do']);
if ($do == 'export') {
//主题导出
$id = intval($_GET['id']);
$thame = C::t('thame')->fetch($id);
unset($thame['id']);
unset($thame['default']);
if (!$thame) {
showmessage('主题不存在');
}
$apparray = array();
$apparray['thame'] = $thame;
exportdata('Dzz! theme', $apparray['thame']['folder'], $apparray);
exit;
} elseif ($do == 'install') {
//安装主题
$finish = FALSE;
$dir = $_GET['dir'];
$xmlfile = 'dzz_theme_' . $dir . '.xml';
$importfile = DZZ_ROOT . './dzz/styles/thame/' . $dir . '/' . $xmlfile;
if (!file_exists($importfile)) {
showmessage('主题目录内没有主题配置文件:' . $xmlfile, dreferer());
}
$importtxt = @implode('', file($importfile));
$apparray = getimportdata('Dzz! theme');
$thame = $apparray['thame'];
unset($thame['id']);
unset($thame['default']);
开发者ID:druphliu,项目名称:dzzoffice,代码行数:31,代码来源:cp.php
示例7: cpheader
if (empty($allowforumsedit) && empty($allowusergroups) && empty($allowcreditwizard)) {
cpheader();
cpmsg('action_noaccess', '', 'error');
}
if ($operation == 'export' && $id) {
$projectarray = $db->fetch_first("SELECT * FROM {$tablepre}projects WHERE id='{$id}'");
if (!$projectarray) {
cpheader();
cpmsg('undefined_action', '', 'error');
}
if ($projectarray['type'] == 'forum' && empty($allowforumsedit) || $projectarray['type'] == 'group' && empty($allowusergroups) || $projectarray['type'] == 'extcredit' && empty($allowcreditwizard)) {
cpheader();
cpmsg('action_noaccess', '', 'error');
}
$projectarray['version'] = strip_tags($version);
exportdata('Discuz! Project', $projectarray['type'] . '_' . $projectarray['name'], $projectarray);
}
cpheader();
if (!$operation) {
if (!submitcheck('projectsubmit')) {
$listarray = array();
$projectlist = $typeadd = $selecttype = '';
$page = max(1, intval($page));
$start_limit = ($page - 1) * 10;
$allowaction = array('forum' => $allowforumsedit, 'group' => $allowusergroups, 'extcredit' => $allowcreditwizard);
if (!empty($type) && in_array($type, array('forum', 'group', 'extcredit'))) {
foreach ($allowaction as $key => $val) {
if ($type == $key && empty($val)) {
cpmsg('action_noaccess', '', 'error');
}
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:project.inc.php
示例8: switch
switch ($value['type']) {
case 0:
unset($value['parameter']['threads_forums']);
unset($value['parameter']['tids']);
unset($value['parameter']['typeids']);
break;
case 1:
unset($value['parameter']['forums_forums']);
break;
case 4:
unset($value['parameter']['images_forums']);
break;
}
$exportdataarray[$exportdata['variable']] = serialize($value);
}
exportdata('Discuz! Request', date('Ymd'), $exportdataarray);
} else {
header("location: {$boardurl}{$BASESCRIPT}?action=jswizard");
dexit();
}
}
} elseif ($type == 'threads') {
$tcheckorderby = array(isset($parameter['orderby']) ? $parameter['orderby'] : 'lastpost' => 'checked');
for ($i = 0; $i <= 6; $i++) {
$tcheckspecial[$i] = !empty($parameter['special'][$i]) ? 'checked' : '';
$tcheckdigest[$i] = !empty($parameter['digest'][$i]) ? 'checked' : '';
$tcheckstick[$i] = !empty($parameter['stick'][$i]) ? 'checked' : '';
}
$parameter['newwindow'] = isset($parameter['newwindow']) ? intval($parameter['newwindow']) : 1;
$tradionewwindow[$parameter['newwindow']] = 'checked';
$jsthreadtypeselect = '<select multiple="multiple" name="parameter[typeids][]" size="10"><option value="all">' . $lang['jswizard_all_typeids'] . '</optoin><option value=""> </option>';
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:jswizard.inc.php
示例9: savefield
savefield($option, true);
break;
case "cancelform":
cancelform($option);
break;
case "cancelfield":
cancelfield($option);
break;
case 'listdata':
listdata($option, $cid);
break;
case 'exportdata':
exportdata($option, $rcid);
break;
case 'exportalldata':
exportdata($option, -1);
break;
case 'deldata':
deletedata($option, $rcid);
break;
case 'sample':
addSampleData($option);
break;
case 'saveorder':
saveOrder($cid);
break;
case 'saveRegistration':
saveRegistration($option);
break;
case 'backup':
backup();
开发者ID:RangerWalt,项目名称:ecci,代码行数:31,代码来源:admin.forme.php
注:本文中的exportdata函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论