예제 #1
0
                if (check_name($www)) {
                    $username = $homepage = $www;
                } else {
                    include load('company.lang');
                    $head_title = $L['not_company'];
                    dhttp(404, $DT_BOT);
                    include template('com-notfound', 'message');
                    exit;
                }
            } else {
                if ($whost == $host) {
                    //301 xxx.com to www.xxx.com
                    $w3 = 'www.' . $host;
                    $c = $db->get_one("SELECT userid FROM {$DT_PRE}company WHERE domain='{$w3}'");
                    if ($c) {
                        d301('http://' . $w3);
                    }
                }
                $c = $db->get_one("SELECT username,domain FROM {$DT_PRE}company WHERE domain='{$whost}'" . ($host == $whost ? '' : " OR domain='{$host}'"), 'CACHE');
                if ($c) {
                    $username = $homepage = $c['username'];
                    $domain = $c['domain'];
                }
            }
        }
    }
}
if ($username) {
    $moduleid = 4;
    $module = 'company';
    $MOD = cache_read('module-' . $moduleid . '.php');
예제 #2
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
if (!$CAT || $CAT['moduleid'] != $moduleid) {
    include load('404.inc');
}
require DT_ROOT . '/module/' . $module . '/common.inc.php';
if ($MOD['list_html']) {
    $html_file = listurl($CAT, $page);
    if (is_file(DT_ROOT . '/' . $MOD['moduledir'] . '/' . $html_file)) {
        d301($MOD['linkurl'] . $html_file);
    }
}
if (!check_group($_groupid, $MOD['group_list']) || !check_group($_groupid, $CAT['group_list'])) {
    include load('403.inc');
}
$CP = $MOD['cat_property'] && $CAT['property'];
if ($MOD['cat_property'] && $CAT['property']) {
    require DT_ROOT . '/include/property.func.php';
    $PPT = property_condition($catid);
}
unset($CAT['moduleid']);
extract($CAT);
$maincat = get_maincat($child ? $catid : $parentid, $moduleid);
$condition = 'status=3';
$condition .= $CAT['child'] ? " AND catid IN (" . $CAT['arrchildid'] . ")" : " AND catid={$catid}";
if ($cityid) {
    $areaid = $cityid;
    $ARE = $AREA[$cityid];
    $condition .= $ARE['child'] ? " AND areaid IN (" . $ARE['arrchildid'] . ")" : " AND areaid={$areaid}";
    $items = $db->count($table, $condition, $CFG['db_expires']);
예제 #3
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
$itemid or dheader($MOD['linkurl']);
if (!check_group($_groupid, $MOD['group_show'])) {
    include load('403.inc');
}
require DT_ROOT . '/module/' . $module . '/common.inc.php';
$item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}");
if ($item && $item['status'] > 2) {
    if ($MOD['show_html'] && is_file(DT_ROOT . '/' . $MOD['moduledir'] . '/' . $item['linkurl'])) {
        d301($MOD['linkurl'] . $item['linkurl']);
    }
    extract($item);
} else {
    include load('404.inc');
}
$CAT = get_cat($catid);
if (!check_group($_groupid, $CAT['group_show'])) {
    include load('403.inc');
}
$content_table = content_table($moduleid, $itemid, $MOD['split'], $table_data);
$t = $db->get_one("SELECT content FROM {$content_table} WHERE itemid={$itemid}");
$content = $t['content'];
if ($lazy) {
    $content = img_lazy($content);
}
if ($MOD['keylink']) {
    $content = keylink($content, $moduleid);
}
$CP = $MOD['cat_property'] && $CAT['property'];