$data = array('extid' => -99); $post = myupload_icon_banner($bid, $data, $_FILES['backgroundimage'], $uid); if ($post) { $backgroundimage = $post[0]; } } else { $backgroundimage = dhtmlspecialchars(trim($_G['sr_backgroundimage'])); } $bodyarr['backgroundimage'] = $backgroundimage; $moduledata['bodystyle'] = $bodyarr; } foreach ($adddatafield as $line) { $moduledata['module'][$line] = intval($_G['sr_' . $line]); } $contents = "<?php\r//Sanree cache file, DO NOT modify me!\r \$" . "branddefault='" . serialize($moduledata) . "';\r?>"; sysfilecache($contents, "sanree_brand_config.php"); cpmsg($langs['succeed'], "action=plugins&operation=config&act=" . $act . "&do=config&identifier=sanree_brand&pmod=admincp&cateid=" . $cateid . '&page=' . $page, 'succeed'); } else { showsubmenu($menustr); showtableheader('', 'nobottom'); showtablerow('', array(), array('<ul class="tab1">' . '<li><a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=businesseslist&do=list&identifier=sanree_brand&pmod=admincp"><span>' . $langs['businesses_base'] . '</span></a></li>' . '<li><a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=businesseslist&do=plug&identifier=sanree_brand&pmod=admincp"><span>' . $langs['businesses_plug'] . '</span></a></li>' . '<li class="current"><a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=businesseslist&do=config&identifier=sanree_brand&pmod=admincp"><span>' . $langs['businesses_config'] . '</span></a></li>' . '<li><a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=businesseslist&do=batchbrand&identifier=sanree_brand&pmod=admincp"><span>' . $langs['batchbrand'] . '</span></a></li>' . '</ul>')); showtablefooter(); $category = C::t('#sanree_brand#sanree_brand_group')->fetch_all_group(); $cate = array(); foreach ($category as $data) { $cate[] = array(0 => $data[groupid], 1 => $data[groupname]); } showtips($langs['brandconfigtip']); showformheader($thisurl . '&page=' . $page . '&do=config', 'enctype'); showtableheader($langs['businesses_defaultconfig'], 'nobottom'); showsetting($langs['group'], array('groupid', $cate), $defaultconfig['groupid'], 'select');
/** * [Sanree] (C)2012-2099 Sanree Inc. * This is NOT a freeware, use is subject to license terms * * $Id: sanree_brand_domainconfig.php $ */ if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) { exit('Access Denied'); } $do = $_G['sr_do']; $doarray = array('list'); $do = !in_array($do, $doarray) ? 'list' : $do; if ($do == 'list') { showsubmenu($menustr); $domain = trim($config['domain']); if (empty($domain)) { cpmsg($langs['notdomain'], 'action=plugins&operation=config&do=' . $plugin['pluginid'], 'error'); } $langs['domaintipshow'] = str_replace('{domain}', $domain, $langs['domaintipshow']); echo $langs['domaintipshow']; $filename = DISCUZ_ROOT . '/source/plugin/sanree_brand/domain.php'; $handle = fopen($filename, "r"); $contents = fread($handle, filesize($filename)); fclose($handle); $contents = str_replace('{branddomain}', $domain, $contents); $contents = str_replace('{mdomain}', $mdomain, $contents); $contents = str_replace('{redomain}', $redomain, $contents); $contents = str_replace("\r\n", "\r", $contents); sysfilecache($contents, "sanree_brand_domain.php"); }