Пример #1
0
function cloudaddons_clear($type, $id)
{
    global $_G;
    if (isset($_G['config']['plugindeveloper']) && $_G['config']['plugindeveloper'] > 0) {
        return;
    }
    $dirs = array('plugin' => array('plugin', './source/plugin/'), 'template' => array('style', './template/'));
    if ($dirs[$type] && cloudaddons_getmd5($id . '.' . $type)) {
        $entrydir = DISCUZ_ROOT . $dirs[$type][1] . $id;
        $d = dir($entrydir);
        $filedeleted = false;
        while ($f = $d->read()) {
            if (preg_match('/^discuz\\_' . $dirs[$type][0] . '\\_' . $id . '(\\_\\w+)?\\.xml$/', $f)) {
                @unlink($entrydir . '/' . $f);
                if ($type == 'plugin' && !$filedeleted) {
                    @unlink($entrydir . '/' . $f);
                    $importtxt = @implode('', file($entrydir . '/' . $f));
                    $pluginarray = getimportdata('Discuz! Plugin');
                    if ($pluginarray['installfile']) {
                        @unlink($entrydir . '/' . $pluginarray['installfile']);
                    }
                    if ($pluginarray['upgradefile']) {
                        @unlink($entrydir . '/' . $pluginarray['upgradefile']);
                    }
                    $filedeleted = true;
                }
            }
        }
    }
}
Пример #2
0
}
if (isset($_GET['del'])) {
    $del['cat_id'] = intval($_GET['del']);
    DB::delete('house_cat', $del);
}
if (isset($_GET['edit'])) {
    $edit = intval($_GET['edit']);
    $edit_array = array();
    $edit_array = fetch_all('house_cat', ' WHERE cat_id=' . $edit . ' ORDER BY cat_pid DESC,cat_sort ASC', '*', 0);
}
if (isset($_GET['edit_submit'])) {
    $edit_array = array();
    $edit_array = gpc('cat_');
    DB::update('house_cat', $edit_array, array('cat_id' => $edit_array['cat_id']));
}
$cat_array = array();
$cat_array = fetch_all('house_cat', ' ORDER BY cat_pid ASC,cat_sort ASC');
foreach ($cat_array as $k => $v) {
    if ($v['cat_pid'] == '0') {
        $sum = fetch_all('house_cat', " WHERE cat_pid='{$v['cat_id']}' ", ' count(cat_id) as sum ', 0);
        $cat_array[$k] = array_merge($cat_array[$k], $sum);
    }
}
$cat_array_field .= "\$cat_array = " . arrayeval($cat_array) . ";\n";
writetocache('house_cat_array', $cat_array_field);
if (!cloudaddons_getmd5("house.plugin")) {
    cpmsg(lang('admincp_msg', 'cloudaddons_genuine_message'), '', 'error', array('addonid' => "house.plugin"));
}
$pid_cat_array = array();
$pid_cat_array = fetch_all("house_cat", " WHERE cat_id='{$cat_pid}' ", "*", 0);
include template("house:admin/admin_cat");
function cloudaddons_uninstall($md5file, $dir)
{
    $array = cloudaddons_getmd5($md5file);
    if ($array === false) {
        return;
    }
    if (!empty($array['RevisionID'])) {
        cloudaddons_removelog($array['RevisionID']);
    }
    @unlink(DISCUZ_ROOT . './data/addonmd5/' . $md5file . '.xml');
    cloudaddons_cleardir($dir);
}
Пример #4
0
if (!defined('IN_ADMINCP')) {
    exit('Admin Login');
}
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
require DISCUZ_ROOT . './source/plugin/sale/include/config.inc.php';
require DISCUZ_ROOT . './source/plugin/sale/include/function.class.php';
$identifier = "sale";
$mod = "admin_area";
$self_url = 'plugins&operation=config&identifier=' . $identifier . '&pmod=' . $mod . "&do=" . $do;
$cp_url = 'action=' . $self_url;
$now_url = ADMINSCRIPT . '?' . $cp_url;
$values = array(intval($_GET['pid']), intval($_GET['cid']), intval($_GET['did']));
$elems = array(addslashes($_GET['province']), addslashes($_GET['city']), addslashes($_GET['district']));
if (!cloudaddons_getmd5("sale.plugin")) {
    /* cpmsg(lang('admincp_msg','cloudaddons_genuine_message'),'','error',array('addonid' => "sale.plugin"));*/
}
$level = 1;
$upids = array(0);
$theid = 0;
for ($i = 0; $i < 3; $i++) {
    if (!empty($values[$i])) {
        $theid = intval($values[$i]);
        $upids[] = $theid;
        $level++;
    } else {
        for ($j = $i; $j < 3; $j++) {
            $values[$j] = '';
        }
        break;
Пример #5
0
<?php

/**
 *      版权声明: 该程序为 [DiscuzCMS!] 独立自主开发, 依法拥有该产品知识产权,所有代码版权归[DiscuzCMS!]所有, 程序内均为商业代码, 仅为购买者提供使用授权.
 *		法律声明: 未经官方授权使用修改或者传播都是属于侵权和违法行为, 依法将追究一切相关法律责任.
 *		官方网站: http://www.DiscuzCMS.com 
**/
if (!defined('IN_ADMINCP')) {
    exit('Admin Login');
}
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
global $gongqiu_config, $_lang;
require_once DISCUZ_ROOT . './source/plugin/gongqiu/include/config.inc.php';
require_once DISCUZ_ROOT . './source/plugin/gongqiu/include/function.class.php';
$mod = "admin_jubao";
$self_url = 'plugins&operation=config&identifier=gongqiu&pmod=' . $mod . "&do=" . $do;
$cp_url = 'action=' . $self_url;
if (!cloudaddons_getmd5("gongqiu.plugin")) {
    /*	cpmsg(lang('admincp_msg','cloudaddons_genuine_message'),'','error',array('addonid' => "gongqiu.plugin"));*/
}
if (isset($_GET['del'])) {
    $jubao_id = intval($_GET['del']);
    DB::delete('gongqiu_jubao', array('jubao_id' => $jubao_id));
}
$jubao_array = fetch_all('gongqiu_jubao', " ORDER BY jubao_time DESC");
$style = 'default';
include template("gongqiu:admin/admin_jubao");
Пример #6
0
    DB::insert('info_cat', $post);
}
if (isset($_GET['del'])) {
    $del['cat_id'] = intval($_GET['del']);
    DB::delete('info_cat', $del);
}
if (isset($_GET['edit'])) {
    $edit = intval($_GET['edit']);
    $edit_array = array();
    $edit_array = fetch_all('info_cat', ' WHERE cat_id=' . $edit . ' ORDER BY cat_pid DESC,cat_sort ASC', '*', 0);
}
if (isset($_GET['edit_submit'])) {
    $edit_array = array();
    $edit_array = gpc('cat_');
    DB::update('info_cat', $edit_array, array('cat_id' => $edit_array['cat_id']));
}
$cat_array = array();
$cat_array = brian_fetch_all('info_cat', ' ORDER BY cat_sort ASC', array('sort' => 'cat_id'));
brian_cat_cache();
$profile_type_array = fetch_all("info_profile_type", " ORDER BY profile_type_id ASC");
if (!cloudaddons_getmd5("info.plugin")) {
    cpmsg(lang('admincp_msg', 'cloudaddons_genuine_message'), '', 'error', array('addonid' => "info.plugin"));
}
$pid_cat_array = array();
$pid_cat_array = fetch_all("info_cat", " WHERE cat_id='{$cat_pid}' ", "*", 0);
$style = 'default';
include template("info:admin/admin_cat");
?>


Пример #7
0
function house($addonid = 'house.plugin')
{
    $array = cloudaddons_getmd5($addonid);
    if (cloudaddons_open('&mod=app&ac=validator&ver=2&addonid=' . $addonid . ($array !== false ? '&rid=' . $array['RevisionID'] . '&sn=' . $array['SN'] . '&rd=' . $array['RevisionDateline'] : '')) === '0') {
        cpmsg('cloudaddons_genuine_message', '', 'error', array('addonid' => $addonid));
    }
}
Пример #8
0
<?php

/*
 * Install Uninstall Upgrade AutoStat System Code 2016020222g11xc1LgxH
 * This is NOT a freeware, use is subject to license terms
 * From www.1314study.com
 */
if (!defined('IN_ADMINCP')) {
    exit('Access Denied');
}
$addonid = $pluginarray['plugin']['identifier'] . '.plugin';
$array = cloudaddons_getmd5($addonid);
if (cloudaddons_open('&mod=app&ac=validator&addonid=' . $addonid . ($array !== false ? '&rid=' . $array['RevisionID'] . '&sn=' . $array['SN'] . '&rd=' . $array['RevisionDateline'] : '')) === '0') {
    cpmsg('cloudaddons_genuine_message', '', 'error', array('addonid' => $addonid));
}
Пример #9
0
function splugin_genuine($identifier)
{
    $addonid = $identifier . '.plugin';
    $array = cloudaddons_getmd5($addonid);
    $return = '1';
    if (s_cloudaddon_open('&mod=app&ac=validator&addonid=' . $addonid . ($array !== false ? '&rid=' . $array['RevisionID'] . '&sn=' . $array['SN'] . '&rd=' . $array['RevisionDateline'] : '')) === '0') {
        $return = '0';
    }
    return $return;
}