private function _getPostSignOutput($hookPosition)
 {
     $res = array();
     if ($hookPosition == Appbyme::$config['mobile_sign_position_mobile']) {
         global $postlist;
         foreach ($postlist as $post) {
             $res[] = Appbyme::getPostSign('mobile_sign_post_mobile', 'viewthread_post', $post['status']);
         }
     }
     return $res;
 }
Beispiel #2
0
        $thumbTaskList === false && ($thumbTaskList = array());
        $thumbTaskCount = (int) count($thumbTaskList);
        cpmsg(sprintf('
            <input type="checkbox" name="type[]" value="cleandata" id="clean_datacache" class="checkbox" checked />
            <label for="clean_datacache">%s</label>
            <input type="checkbox" name="type[]" value="updatedata" id="update_datacache" class="checkbox" checked />
            <label for="update_datacache">%s</label>
            <input type="checkbox" name="type[]" value="cleanthumb" id="clean_thumbcache" class="checkbox" />
            <label for="clean_thumbcache">%s</label><br />
            %s
            <input type="text" name="thumb_task_length" value="0" class="text" />
            %s
            ', Appbyme::lang('mobcent_clean_datacache'), Appbyme::lang('mobcent_update_datacache'), Appbyme::lang('mobcent_clean_thumbcache'), Appbyme::lang('mobcent_thumb_task_length_setting'), Appbyme::lang('mobcent_thumb_task_length') . ' ' . $thumbTaskCount), "{$baseUrl}&step=2", 'form');
        break;
    case 2:
        $type = implode('_', (array) $_GET['type']);
        cpmsg('tools_updatecache_waiting', sprintf("{$baseUrl}&step=3&type=%s&thumb_task_length=%d", $type, $_GET['thumb_task_length']), 'loading');
        break;
    case 3:
        $thumbTaskCount = (int) $_GET['thumb_task_length'];
        $type = explode('_', $_GET['type']);
        in_array('cleandata', $type) && Appbyme::cleanCache();
        in_array('updatedata', $type) && Appbyme::updateCache();
        in_array('cleanthumb', $type) && Appbyme::cleanThumb();
        $thumbTaskCount > 0 && Appbyme::makeThumb($thumbTaskCount);
        cpmsg('update_cache_succeed', '', 'succeed');
        break;
    default:
        cpmsg('step error', '', 'error');
        break;
}
<?php

/**
 * 应用 >> 安米手机客户端 >> 转换接口包管理
 *
 * @author 谢建平 <*****@*****.**>
 * @copyright 2012-2014 Appbyme
 * @license http://opensource.org/licenses/LGPL-3.0
 */
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
    exit('Access Denied');
}
require_once dirname(__FILE__) . '/appbyme.class.php';
Appbyme::init();
$mobcentInfo = Appbyme::getVersion();
showtagheader('div', 'forum_stype', true);
showtableheader(Appbyme::lang('mobcent_infomation_appbyme'));
showtablerow('', array(), array(sprintf('%s: %s', Appbyme::lang('mobcent_version_user'), $mobcentInfo['user_version'])));
showtablerow('', array(), array(sprintf('%s: %s', Appbyme::lang('mobcent_version_appbyme'), $mobcentInfo['mobcent_version'])));
showtablefooter();
showtagfooter('div');
 public static function submitModuleParam()
 {
     $mid = (int) $_GET['moduleid'];
     $param = PortalModule::initModuleParam();
     // 更新模块参数
     if (!empty($_GET['param']) && is_array($_GET['param'])) {
         $param = array_merge($param, $_GET['param']);
         $param['article_starttime'] = self::_strToTime($param['article_starttime']);
         $param['article_endtime'] = self::_strToTime($param['article_endtime']);
         if ($param['article_endtime'] && $param['article_starttime'] > $param['article_endtime']) {
             cpmsg(Appbyme::lang('mobcent_error_time_invalid'), '', 'error');
         }
         PortalModule::updateModule($mid, array('param' => serialize($param)));
     }
 }
    $dsuPaulsignSetting = $_G['cache']['plugin']['dsu_paulsign'];
    $extcreditsSetting = $_G['setting']['extcredits'];
    // 签到奖励基数设置
    $signExtcreditBase = Appbyme::getDzPluginCache('sign_extcredit_base');
    $signExtcreditBase == false && ($signExtcreditBase = 100);
    if (isset($extcreditsSetting[$dsuPaulsignSetting['nrcredit']])) {
        showsetting(Appbyme::lang('mobcent_operation_sign_extcredit_base') . ' ' . $_G['setting']['extcredits'][$dsuPaulsignSetting['nrcredit']]['title'], 'signextcreditbase_new', (int) $signExtcreditBase, 'text', '', 0, Appbyme::lang('mobcent_tips_extcredit_base'), '', '', true);
    }
    // 发回帖奖励基数设置
    $forumExtcreditBase = Appbyme::getDzPluginCache('forum_extcredit_base');
    !is_array($forumExtcreditBase) && ($forumExtcreditBase = array());
    foreach ($extcreditsSetting as $id => $extcredit) {
        showsetting(Appbyme::lang('mobcent_operation_forum_extcredit_base') . ' ' . $extcredit['title'], sprintf('forumextcreditbase_new[%d]', $id), (int) (isset($forumExtcreditBase[$id]) ? $forumExtcreditBase[$id] : 100), 'text', '', 0, Appbyme::lang('mobcent_tips_extcredit_base'), '', '', true);
    }
    showtablefooter();
    showsubmit('operation_submit', 'submit');
    showformfooter();
    showtagfooter('div');
} else {
    if (!empty($_POST['signextcreditbase_new'])) {
        Appbyme::setDzPluginCache('sign_extcredit_base', (int) $_POST['signextcreditbase_new']);
    }
    if (!empty($_POST['forumextcreditbase_new'])) {
        $bases = array();
        foreach ($_POST['forumextcreditbase_new'] as $id => $base) {
            $bases[$id] = (int) $base;
        }
        Appbyme::setDzPluginCache('forum_extcredit_base', $bases);
    }
    cpmsg(Appbyme::lang('mobcent_operation_edit_succeed'), $baseUrl, 'succeed');
}
Beispiel #6
0
$baseUrl = rawurldecode(cpurl());
if (!submitcheck('seo_submit')) {
    $formUrl = ltrim($baseUrl, 'action=');
    $setting = array();
    $seoConfigs = array('seotitle', 'seokeywords', 'seodescription');
    foreach ($seoConfigs as $key) {
        $config = Appbyme::getAppbymeConfig($key);
        $setting[$key] = unserialize($config['cvalue']);
    }
    showtagheader('div', 'seo_setting', true);
    showformheader($formUrl);
    showtableheader();
    showtitle('<em class="right">' . cplang('setting_seo_robots_output') . '</em>' . cplang('setting_seo'));
    showtablerow('', array('class="vtop tips2" colspan="4" style="padding-left:20px;"'), array('<ul><li>' . cplang('setting_seo_seotitle_comment') . '</li><li>' . cplang('setting_seo_seodescription_comment') . '</li><li>' . cplang('setting_seo_seokeywords_comment') . '</li></ul>'));
    showtitle(Appbyme::lang('appbyme_seo_title_download'));
    showtablerow('', array('width="80"', ''), array(cplang('setting_seo_seotitle'), '<input type="text" name="settingnew[seotitle][download]" value="' . htmlspecialchars($setting['seotitle']['download']) . '" class="txt" style="width:280px;" />'));
    showtablerow('', array('width="80"', ''), array(cplang('setting_seo_seokeywords'), '<input type="text" name="settingnew[seokeywords][download]" value="' . htmlspecialchars($setting['seokeywords']['download']) . '" class="txt" style="width:280px;" />'));
    showtablerow('', array('width="80"', ''), array(cplang('setting_seo_seodescription'), '<input type="text" name="settingnew[seodescription][download]" value="' . htmlspecialchars($setting['seodescription']['download']) . '" class="txt" style="width:280px;" />'));
    showtablefooter();
    // showtableheader();
    // showsetting('setting_seo_seohead', 'settingnew[seohead]', $setting['seohead'], 'textarea');
    // showtablefooter();
    showsubmit('seo_submit', 'submit');
    showformfooter();
    showtagfooter('div');
} else {
    foreach ($_POST['settingnew'] as $key => $setting) {
        Appbyme::setAppbymeConfig($key, serialize($setting));
    }
    cpmsg(Appbyme::lang('mobcent_seo_edit_succeed'), $baseUrl, 'succeed');
}
 */
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
require_once dirname(__FILE__) . '/appbyme.class.php';
Appbyme::init();
global $_G;
$_G['disabledwidthauto'] = 1;
$appInfo = Appbyme::getAppbymeConfig('app_download_options');
!empty($appInfo['cvalue']) && ($appInfo = unserialize($appInfo['cvalue']));
$appName = $appInfo['appName'];
$appImage = $appInfo['appImage'];
$appIcon = $appInfo['appIcon'];
$appDescribe = $appInfo['appDescribe'];
$androidDownloadUrl = $appInfo['appDownloadUrl']['android'];
$appleDownloadUrl = $appInfo['appDownloadUrl']['apple'];
$appleMobileDownloadUrl = $appInfo['appDownloadUrl']['appleMobile'];
$androidQRCode = $appInfo['appQRCode']['android'];
$appleQRCode = $appInfo['appQRCode']['apple'];
$assetsBaseUrlPath = $_G['siteurl'] . '/source/plugin/' . Appbyme::PLUGIN_ID . '/template';
list($navtitle, $metadescription, $metakeywords) = Appbyme::getSeoSetting('download');
if (!$navtitle) {
    $navtitle = Appbyme::lang('appbyme_seo_title_download');
    $nobbname = false;
} else {
    $nobbname = true;
}
!$metadescription && ($metadescription = $navtitle);
!$metakeywords && ($metakeywords = $navtitle);
$isFromWeixin = strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false;
include template('appbyme_app:download');
 public function mobile()
 {
     Appbyme::$config['mobile_allow_download_redirect'] && header('Location: ' . Appbyme::createAppApiUrl('misc/download'));
 }
 public static function getSeoSetting($page, $data = array(), $defset = array())
 {
     global $_G;
     $searchs = array('{bbname}');
     $replaces = array($_G['setting']['bbname']);
     $setting = array();
     $seoConfigs = array('seotitle', 'seokeywords', 'seodescription');
     foreach ($seoConfigs as $key) {
         $config = Appbyme::getAppbymeConfig($key);
         $setting[$key] = unserialize($config['cvalue']);
     }
     $_G['setting'] = array_merge($_G['setting'], $setting);
     $seotitle = $seodescription = $seokeywords = '';
     $titletext = $defset['seotitle'] ? $defset['seotitle'] : $_G['setting']['seotitle'][$page];
     $descriptiontext = $defset['seodescription'] ? $defset['seodescription'] : $_G['setting']['seodescription'][$page];
     $keywordstext = $defset['seokeywords'] ? $defset['seokeywords'] : $_G['setting']['seokeywords'][$page];
     preg_match_all("/\\{([a-z0-9_-]+?)\\}/", $titletext . $descriptiontext . $keywordstext, $pageparams);
     if ($pageparams) {
         foreach ($pageparams[1] as $var) {
             $searchs[] = '{' . $var . '}';
             if ($var == 'page') {
                 $data['page'] = $data['page'] > 1 ? lang('core', 'page', array('page' => $data['page'])) : '';
             }
             $replaces[] = $data[$var] ? strip_tags($data[$var]) : '';
         }
         if ($titletext) {
             $seotitle = helper_seo::strreplace_strip_split($searchs, $replaces, $titletext);
         }
         if ($descriptiontext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1)) {
             $seodescription = helper_seo::strreplace_strip_split($searchs, $replaces, $descriptiontext);
         }
         if ($keywordstext && (isset($_G['makehtml']) || CURSCRIPT == 'forum' || IS_ROBOT || $_G['adminid'] == 1)) {
             $seokeywords = helper_seo::strreplace_strip_split($searchs, $replaces, $keywordstext);
         }
     }
     return array($seotitle, $seodescription, $seokeywords);
 }