Example #1
0
function page_message()
{
    $message_id = $_GET['message'];
    $message = db_easy("SELECT * FROM `intr_message` WHERE `id`={$message_id}");
    $q_comm = db_query("SELECT * FROM `intr_comments` WHERE `message_id`={$message_id} ORDER BY `date` DESC");
    $user = db_easy("SELECT * FROM `users` WHERE `id`=" . $message['user_id']);
    $edit_del_comment_html = "";
    if (check_group("writer") || $user['name'] == get_user()) {
        $edit_del_message_html .= "<br/><a href='" . uri_make_v1(array("UriScript" => 'intranet.php', 'page' => 'message', 'message' => $message_id, 'edit_message' => 'yes', 'message' => $message['id'])) . "' style='font-size:8pt;'>Редактировать</a>";
        $edit_del_message_html .= "<a href='" . uri_make_v1(array("UriScript" => 'intranet.php', 'page' => 'message', 'message' => $message_id, 'delete_message' => 'yes', 'message' => $message['id'])) . "' style='padding-left:10px;font-size:8pt;' onClick=\"if(!confirm('Удалить?')) return false;\">Удалить</a>";
    }
    $comments_html = "";
    while ($comment = db_fetch($q_comm)) {
        $user = db_easy("SELECT * FROM `users` WHERE `id`={$comment['user_id']}");
        $comments_html .= "<div style='margin:15px 0 0 0;padding:0 0 0 10px;border-left:2px solid #AAA;'>";
        $comments_html .= "<span style='font-size:8pt;font-style:italic;'><b>" . $user['name_rus'] . ",</b> " . date("d.m.Y H:i", strtotime($comment['date'])) . "</span><br/>" . $comment['text'] . "</div>";
        if (check_group("writer") || $user['name'] == get_user()) {
            $comments_html .= "<a href='" . uri_make_v1(array("UriScript" => 'intranet.php', 'page' => 'message', 'message' => $message_id, 'edit_comment' => 'yes', 'comment' => $comment['id'])) . "' style='font-size:8pt;'>Редактировать</a>";
            $comments_html .= "<a href='" . uri_make_v1(array("UriScript" => 'intranet.php', 'page' => 'message', 'message' => $message_id, 'delete_comment' => 'yes', 'comment' => $comment['id'])) . "' style='padding-left:10px;font-size:8pt;' onClick=\"if(!confirm('Удалить?')) return false;\">Удалить</a>";
        }
    }
    $html .= template_get('message/message', array("user" => $user['name_rus'], "date" => date("d.m.Y", strtotime($message['date'])), "title" => $message['title'], "edit_del_message" => $edit_del_message_html, "text" => $message['text'], "uri_back" => uri_make_v1(array("UriScript" => "intranet.php")), "uri_comment" => uri_make_v1(array("UriScript" => "intranet.php", "page" => "message", "message" => $message_id, "add_comment" => "yes")), "comments" => $comments_html));
    //Подключаем подвал
    $html .= template_get('footer');
    return $html;
}
Example #2
0
function page_index()
{
    $q = db_query("SELECT * FROM `intr_message`");
    $message_html = "";
    if (get_user_group() == "writer") {
        $add_message_html = "<a href='" . uri_make_v1(array("UriScript" => "intranet.php", "add_message" => "yes")) . "' style='padding:0 0 0 10px;'><img src='/_content/img/add-icon.png'/></a>";
    } else {
        $add_message_html = "";
    }
    while ($message = db_fetch($q)) {
        $message_html .= "<a href='" . uri_make_v1(array("UriScript" => "intranet.php", "page" => "message", "message" => $message['id'])) . "'>" . trim($message['title']) . "</a>";
        if (check_group("writer") || $user['name'] == get_user()) {
            //$message_html.="<br/><a href='".uri_make_v1(array("UriScript"=>'intranet.php', 'edit_message'=>'yes', 'message'=>$message['id']))."' style='font-size:8pt;'>Редактировать</a>";
            //$message_html.="<a href='".uri_make_v1(array("UriScript"=>'intranet.php', 'delete_message'=>'yes', 'message'=>$message['id']))."' style='padding-left:10px;font-size:8pt;' onClick=\"if(!confirm('Удалить?')) return false;\">Удалить</a>";
            //$message_html.="<br/><br/>";
            /*$comments_html.="<a href='".uri_make_v1(array("UriScript"=>'intranet.php', 'page'=>'message', 'message'=>$message['id'], 'edit_comment'=>'yes', 'comment'=>$comment['id']))."' style='font-size:8pt;'>Редактировать</a>";
            		$comments_html.="<a href='".uri_make_v1(array("UriScript"=>'intranet.php', 'page'=>'message', 'message'=>$message['id'], 'delete_comment'=>'yes', 'comment'=>$comment['id']))."' style='padding-left:10px;font-size:8pt;' onClick=\"if(!confirm('Удалить?')) return false;\">Удалить</a>";
            		*/
            $message_html .= "<a href='" . uri_make_v1(array("UriScript" => "intranet.php", "edit_message" => "yes", "message" => $message['id'])) . "' style='padding:0 0 0 10px;'><img src='/_content/img/edit-icon.png'/></a>";
            $message_html .= "<a href='" . uri_make_v1(array("UriScript" => "intranet.php", "delete_message" => "yes", "message" => $message['id'])) . "' style='padding:0 0 0 10px;' onClick=\"if(!confirm('Удалить?')) return false;\"><img src='/_content/img/remove-icon.png'/></a>" . "<br/>";
        }
    }
    $contacts_html = "";
    $q = db_query("SELECT * FROM `users`");
    while ($user = db_fetch($q)) {
        $contacts_html .= "<a href='" . uri_make_v1(array("UriScript" => "intranet.php", "page" => "contact", "name" => $user['name'])) . "'>" . $user['name_rus'] . "</a>" . "<br/>";
    }
    $html .= template_get('intranet/intranet', array("add_message" => $add_message_html, "message" => $message_html, "contacts" => $contacts_html));
    //Подключаем подвал
    $html .= template_get('footer');
    return $html;
}
Example #3
0
function page_contact()
{
    $user_name = $_GET['name'];
    $user = db_easy("SELECT * FROM `users` WHERE `name`='" . $user_name . "'");
    $edit_del_comment_html = "";
    if (check_group("writer") || $user['name'] == get_user()) {
    }
    $html .= template_get('contacts/contact', array("name_rus" => $user['name_rus'], "position" => $user['position'], "mobile_phone" => $user['mobile_phone']));
    //Подключаем подвал
    $html .= template_get('footer');
    return $html;
}
Example #4
0
 }
 if ($MG['edit_limit'] && $DT_TIME - $item['addtime'] > $MG['edit_limit'] * 86400) {
     message(lang($L['edit_limit'], array($MG['edit_limit'])));
 }
 if ($submit) {
     if ($item['islink']) {
         $post['islink'] = 1;
     } else {
         if (isset($post['islink'])) {
             unset($post['islink']);
         }
     }
     //$post['clear_link'] = $MOD['clear_link'];
     if ($do->pass($post)) {
         $CAT = get_cat($post['catid']);
         if (!$CAT || !check_group($_groupid, $CAT['group_add'])) {
             dalert(lang($L['group_add'], array($CAT['catname'])));
         }
         $post['addtime'] = timetodate($item['addtime']);
         $post['level'] = $item['level'];
         $post['fee'] = $item['fee'];
         $post['style'] = $item['style'];
         $post['template'] = $item['template'];
         $post['filepath'] = $item['filepath'];
         $post['note'] = $item['note'];
         $need_check = $MOD['check_add'] == 2 ? $MG['check'] : $MOD['check_add'];
         $post['status'] = get_status($item['status'], $need_check);
         $post['hits'] = $item['hits'];
         $post['save_remotepic'] = $MOD['save_remotepic'] ? 1 : 0;
         $post['clear_link'] = $MOD['clear_link'] ? 1 : 0;
         $post['get_introduce'] = $MOD['get_introduce'] ? 1 : 0;
Example #5
0
<?php

include "inc/common.php";
// check if valid group specified and return group details
$groupdetails = check_group($_POST, $_GET);
// get permisssions for group
$permissions = group_permissions($groupdetails['group_id'], $user->data['user_id']);
if (!$permissions) {
    fatal_error("No permissions for this group");
}
// get post mode
if (isset($_POST['mode'])) {
    $mode = $_POST['mode'];
} elseif (isset($_GET['mode'])) {
    $mode = $_GET['mode'];
} else {
    $mode = "showexpenses";
}
// get user id if specified
if (isset($_POST['uid'])) {
    $uid = $_POST['uid'];
} elseif (isset($_GET['uid'])) {
    $uid = $_GET['uid'];
}
// get paid / spent if specified
if (isset($_POST['xtype'])) {
    $xtype = $_POST['xtype'];
} elseif (isset($_GET['xtype'])) {
    $xtype = $_GET['xtype'];
}
// get message
Example #6
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
if ($DT_BOT) {
    dhttp(403);
}
require DT_ROOT . '/module/' . $module . '/common.inc.php';
check_referer() or dheader($MOD['linkurl']);
$itemid = intval(decrypt($auth));
$itemid or dheader($MOD['linkurl']);
$item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid} AND status>2");
$item or dheader($MOD['linkurl']);
extract($item);
$CAT = get_cat($catid);
$linkurl = $MOD['linkurl'] . $linkurl;
if (!check_group($_groupid, $MOD['group_show']) || !check_group($_groupid, $MOD['group_contact']) || !check_group($_groupid, $CAT['group_show'])) {
    dheader($linkurl);
}
$fee = get_fee($item['fee'], $MOD['fee_view']);
if ($MG['fee_mode'] && $MOD['fee_mode']) {
    $fee = 0;
}
if ($item['username'] == $_username) {
    $fee = 0;
}
if ($fee) {
    if ($_userid) {
        check_pay($moduleid, $itemid) or dheader($linkurl);
    } else {
        dheader($linkurl);
    }
Example #7
0
$CP = $MOD['cat_property'] && $CAT['property'];
if ($CP) {
    require DT_ROOT . '/include/property.func.php';
    $options = property_option($catid);
    $values = property_value($moduleid, $itemid);
}
$adddate = timetodate($addtime, 5);
$editdate = timetodate($edittime, 5);
$todate = $totime ? timetodate($totime, 3) : 0;
$expired = $totime && $totime < $DT_TIME ? true : false;
$linkurl = $MOD['linkurl'] . $linkurl;
$thumbs = get_albums($item);
$albums = get_albums($item, 1);
$update = '';
$fee = get_fee($item['fee'], $MOD['fee_view']);
if (check_group($_groupid, $MOD['group_contact'])) {
    if ($fee) {
        $user_status = 4;
        $destoon_task = "moduleid={$moduleid}&html=show&itemid={$itemid}";
    } else {
        $user_status = 3;
        $member = $item['username'] ? userinfo($item['username']) : array();
        if ($item['totime'] && $item['totime'] < $DT_TIME && $item['status'] == 3) {
            $update .= ",status=4";
        }
        if ($member) {
            foreach (array('groupid', 'vip', 'validated', 'company', 'areaid', 'truename', 'telephone', 'mobile', 'address', 'qq', 'msn', 'ali', 'skype') as $v) {
                if ($item[$v] != $member[$v]) {
                    $update .= ",{$v}='" . addslashes($member[$v]) . "'";
                }
            }
Example #8
0
             }
             $db->free_result($result);
         }
     }
     $head_name = $L['user_title'];
     $head_title = $head_name . $DT['seo_delimiter'] . $head_title;
     $foot = '';
     include template('know_user', 'mobile');
     if (DT_CHARSET != 'UTF-8') {
         toutf8();
     }
     break;
 case 'answer':
     $itemid or dheader(mobileurl($moduleid));
     $_userid or dheader('login.php?forward=' . urlencode('know.php?action=' . $action . '&itemid=' . $itemid));
     check_group($_groupid, $MOD['group_answer']) or mobile_msg($L['know_msg_right']);
     $item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}");
     $item && $item['status'] > 2 or mobile_msg($L['know_msg_not_question']);
     if ($item['process'] != 1 || $_username && $_username == $item['username']) {
         mobile_msg($L['know_msg_right']);
     }
     if (!$MOD['answer_repeat']) {
         if ($_username) {
             $r = $db->get_one("SELECT itemid FROM {$table_answer} WHERE username='******' AND qid={$itemid}");
         } else {
             $r = $db->get_one("SELECT itemid FROM {$table_answer} WHERE ip='{$DT_IP}' AND qid={$itemid} AND addtime>{$DT_TIME}-86400");
         }
         if ($r) {
             mobile_msg($L['know_msg_has_answered']);
         }
     }
Example #9
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
if ($DT_BOT) {
    dhttp(403);
}
$itemid or dheader($MOD['linkurl']);
login();
require DT_ROOT . '/module/' . $module . '/common.inc.php';
if (!check_group($_groupid, $MOD['group_talent'])) {
    include load('403.inc');
}
$item = $db->get_one("SELECT * FROM {$DT_PRE}resume WHERE itemid={$itemid} AND status=3");
$item or dheader($MOD['linkurl']);
if ($item['open'] != 3) {
    message($L['msg_resume_close'], $MOD['linkurl']);
}
if ($item['username'] == $_username) {
    message($L['msg_add_self'], $MOD['linkurl']);
}
$linkurl = $MOD['linkurl'] . $item['linkurl'];
$item = $db->get_one("SELECT * FROM {$DT_PRE}job_talent WHERE resumeid={$itemid} AND username='******'");
if ($item) {
    message($L['msg_talent_exist'], $linkurl);
}
$db->query("INSERT INTO {$DT_PRE}job_talent (resumeid,username,jointime) VALUES ('{$itemid}','{$_username}','{$DT_TIME}')");
message($L['msg_talent_success'], $linkurl);
Example #10
0
defined('IN_DESTOON') or exit('Access Denied');
$MG['club_reply_limit'] > -1 or dalert(lang('message->without_permission_and_upgrade'), 'goback');
require MD_ROOT . '/reply.class.php';
$do = new reply();
$sql = $_userid ? "username='******'" : "ip='{$DT_IP}'";
$limit_used = $limit_free = $need_password = $need_captcha = $need_question = $fee_add = 0;
$today = $today_endtime - 86400;
if (in_array($action, array('', 'add')) && $MG['club_reply_limit']) {
    $r = $db->get_one("SELECT COUNT(*) AS num FROM {$table}_reply WHERE {$sql} AND status>1 AND addtime>{$today}");
    $limit_used = $r['num'];
    $limit_free = $MG['club_reply_limit'] > $limit_used ? $MG['club_reply_limit'] - $limit_used : 0;
}
switch ($action) {
    case 'add':
        check_group($_groupid, $MOD['group_reply']) or dalert(lang('message->without_permission_and_upgrade'), 'goback');
        $tid = isset($tid) ? intval($tid) : 0;
        $tid or dalert($L['my_choose_post'], $MOD['linkurl']);
        $T = $db->get_one("SELECT * FROM {$table} WHERE itemid={$tid}");
        $T && $T['status'] == 3 or dalert($L['my_not_post']);
        $gid = $T['gid'];
        $GRP = get_group($gid);
        $GRP && $GRP['status'] == 3 or dalert($L['my_not_group']);
        if ($MG['club_reply_limit'] && $limit_used >= $MG['club_reply_limit']) {
            dalert(lang($L['day_limit'], array($MG['club_reply_limit'], $limit_used)), $MODULE[2]['linkurl'] . $DT['file_my'] . '?mid=' . $mid . '&job=' . $job);
        }
        if ($GRP['reply_type'] && !is_fans($GRP)) {
            $action = 'reply';
            $head_title = lang('message->without_permission');
            exit(include template('nofans', $module));
        }
Example #11
0
             credit_record($_username, $MOD['credit_answer'], 'system', $L['answer_question'], 'ID:' . $itemid);
         }
     }
     if ($MOD['answer_message'] && $item['username']) {
         send_message($item['username'], lang($L['answer_msg_title'], array(dsubstr($item['title'], 20, '...'))), lang($L['answer_msg_content'], array($item['title'], stripslashes($content), $linkurl)));
     }
     if ($status == 3) {
         $items = isset($items) ? intval($items) + 1 : 1;
         $page = ceil($items / $pagesize);
         $forward = 'answer.php?itemid=' . $itemid . '&page=' . $page . '&rand=' . mt_rand(10, 99) . '#last';
         dalert('', '', 'parent.window.location="' . $forward . '";');
     } else {
         dalert($L['answer_check'], '', 'parent.window.location=parent.window.location;');
     }
 } else {
     $could_vote = check_group($_groupid, $MOD['group_vote']);
     if (get_cookie('answer_vote_' . $itemid)) {
         $could_vote = false;
     }
     $pages = '';
     $answers = array();
     $items = $db->count($table . '_answer', "qid={$itemid} AND status=3 AND itemid!={$item['aid']}");
     $a = $items;
     if ($item['aid']) {
         $a += 1;
     }
     if ($item['answer'] != $a) {
         $item['answer'] = $a;
         $db->query("UPDATE {$table} SET answer={$a} WHERE itemid={$itemid}");
     }
     if ($item['process'] == 1 && $item['username'] && !$item['message'] && $MOD['messagedays']) {
Example #12
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
if ($DT_BOT) {
    dhttp(403);
}
$itemid or dheader($MOD['linkurl']);
login();
if (!check_group($_groupid, $MOD['group_apply'])) {
    include load('403.inc');
}
require DT_ROOT . '/module/' . $module . '/common.inc.php';
include load('misc.lang');
$item = $db->get_one("SELECT * FROM {$DT_PRE}job WHERE itemid={$itemid}");
$item or message($L['not_exists']);
if ($item['totime'] && $DT_TIME > $item['totime']) {
    message($L['has_expired']);
}
$item['status'] == 3 or message($L['not_exists']);
$item['username'] or message($L['com_not_member']);
$_username != $item['username'] or message($L['send_self']);
$app = $db->get_one("SELECT * FROM {$DT_PRE}job_apply WHERE jobid={$itemid} AND apply_username='******'");
if ($app) {
    message($L['apply_again']);
}
$linkurl = $MOD['linkurl'] . $item['linkurl'];
if ($submit) {
    $resumeid = intval($resumeid);
    $resumeid or dheader($linkurl);
    $resume = $db->get_one("SELECT * FROM {$DT_PRE}resume WHERE itemid={$resumeid} AND status=3 AND open=3 AND username='******'");
    $resume or message($L['not_resume'], $linkurl);
Example #13
0
 if ($verify == 2) {
     question($answer, 1);
 }
 $could_vote = true;
 $condition = $_username ? "AND username='******'" : "AND ip='{$DT_IP}'";
 $r = $db->get_one("SELECT rid FROM {$DT_PRE}vote_record WHERE itemid={$itemid} {$condition}");
 if ($r) {
     $could_vote = false;
 }
 if ($fromtime && $DT_TIME < $fromtime) {
     $could_vote = false;
 }
 if ($totime && $DT_TIME > $totime) {
     $could_vote = false;
 }
 if (!check_group($_groupid, $groupids)) {
     $could_vote = false;
 }
 if ($could_vote) {
     if ($item['choose']) {
         $ids = array();
         $num = 0;
         foreach ($vote as $k => $v) {
             $s = 's' . $v;
             if (${$s}) {
                 $ids[] = $v;
                 ++$num;
             }
         }
         if ($num >= $vote_min && $num <= $vote_max) {
             foreach ($ids as $k => $v) {
Example #14
0
            }
        } elseif (!in_array($g->ns(), array('study', 'promo', 'binet', 'free'))) {
            echo "Error: Unknown NS " . $g->ns() . " for group " . $gtext . "\n";
        }
    }
}
// Fetch groups
$groups = Group::selectAll(GroupSelect::base())->select(GroupSelect::castes());
$groups = $groups->toArray();
krsort($groups);
// Remember used castes
$used_castes = array();
echo "Checking " . count($groups) . " groups\n";
while (!empty($groups)) {
    $g = array_pop($groups);
    check_group($g);
    foreach ($g->castes() as $c) {
        array_push($used_castes, $c->id());
    }
    // Frees memory
    unset($g);
}
// Fetch castes
$cf = new CasteFilter();
$castes = $cf->get();
unset($cf);
echo "There are " . $castes->count() . " castes.\n";
// Unused castes
$unused_castes = array_diff($castes->ids(), $used_castes);
if (!empty($unused_castes)) {
    echo "Warning: " . count($unused_castes) . " unused castes\n";
Example #15
0
     $could_del or dalert($L['comment_msg_del']);
     $cid = isset($cid) ? intval($cid) : 0;
     $cid or dalert($L['comment_msg_cid']);
     $r = $db->get_one("SELECT * FROM {$DT_PRE}comment WHERE itemid='{$cid}' LIMIT 1");
     if ($r) {
         $star = 'star' . $r['star'];
         $db->query("UPDATE {$DT_PRE}comment_stat SET comment=comment-1,`{$star}`=`{$star}`-1 WHERE itemid={$r['item_id']} AND moduleid={$r['item_mid']}");
         $db->query("DELETE FROM {$DT_PRE}comment WHERE itemid={$cid}");
         $forward = rewrite('index.php?mid=' . $mid . '&itemid=' . $itemid . '&page=' . $page . '&rand=' . mt_rand(10, 99));
         dalert($L['comment_msg_del_success'], '', 'parent.window.location="' . $forward . '";');
     } else {
         dalert($L['comment_msg_not_comment']);
     }
     break;
 default:
     if (check_group($_groupid, $MOD['comment_group'])) {
         $user_status = 3;
     } else {
         if ($_userid) {
             $user_status = 1;
         } else {
             $user_status = 2;
         }
     }
     $need_captcha = $MOD['comment_captcha_add'] == 2 ? $MG['captcha'] : $MOD['comment_captcha_add'];
     if ($MOD['comment_pagesize']) {
         $pagesize = $MOD['comment_pagesize'];
         $offset = ($page - 1) * $pagesize;
     }
     if ($submit) {
         if ($user_status != 3) {
Example #16
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
$could_inquiry = check_group($_groupid, $MOD['group_inquiry']);
if ($username == $_username || $domain) {
    $could_inquiry = true;
}
$moduleid = 5;
$module = 'sell';
$MOD = cache_read('module-' . $moduleid . '.php');
$table = $DT_PRE . $module . '_' . $moduleid;
$table_data = $DT_PRE . $module . '_data_' . $moduleid;
if ($itemid) {
    $item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}");
    if (!$item || $item['status'] < 3 || $item['username'] != $username) {
        dheader($MENU[$menuid]['linkurl']);
    }
    unset($item['template']);
    extract($item);
    $CAT = get_cat($catid);
    $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'];
    $CP = $MOD['cat_property'] && $CAT['property'];
    if ($CP) {
        require DT_ROOT . '/include/property.func.php';
        $options = property_option($catid);
        $values = property_value($moduleid, $itemid);
    }
    $adddate = timetodate($addtime, 5);
    $editdate = timetodate($edittime, 5);
Example #17
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
$condition = 'isread=0 AND issend=0 AND status=3';
if ($DT['message_time']) {
    $time = $DT_TIME - $DT['message_time'] * 60;
    $condition .= " AND addtime<{$time}";
}
if ($DT['message_type']) {
    $condition .= " AND typeid IN ({$DT['message_type']})";
}
$msg = $db->get_one("SELECT * FROM {$DT_PRE}message WHERE {$condition} ORDER BY itemid ASC");
if ($msg) {
    $db->query("UPDATE {$DT_PRE}message SET issend=1 WHERE itemid={$msg['itemid']}");
    $user = $db->get_one("SELECT groupid,email,send FROM {$DT_PRE}member WHERE username='******'touser']}'");
    if ($user) {
        if ($user['send']) {
            if (check_group($user['groupid'], $DT['message_group'])) {
                extract($msg);
                $NAME = $L['message_type'];
                $member_url = $MODULE[2]['linkurl'];
                $content = ob_template('message', 'mail');
                send_mail($user['email'], '[' . $NAME[$typeid] . ']' . $title, $content);
                if ($DT['message_weixin']) {
                    send_weixin($msg['touser'], $title . $L['message_weixin']);
                }
            }
        }
    }
}
Example #18
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
$could_buy = check_group($_groupid, $MOD['group_buy']);
if ($username == $_username || $domain) {
    $could_buy = true;
}
$could_buy or dalert($L['msg_buy_deny'], 'goback');
$could_price = check_group($_groupid, $MOD['group_price']);
if ($username == $_username || $domain) {
    $could_price = true;
}
$moduleid = 6;
$module = 'buy';
$MOD = cache_read('module-' . $moduleid . '.php');
$table = $DT_PRE . $module . '_' . $moduleid;
$table_data = $DT_PRE . $module . '_data_' . $moduleid;
if ($itemid) {
    $item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}");
    if (!$item || $item['status'] < 3 || $item['username'] != $username) {
        dheader($MENU[$menuid]['linkurl']);
    }
    unset($item['template']);
    extract($item);
    $CAT = get_cat($catid);
    $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'];
    $CP = $MOD['cat_property'] && $CAT['property'];
    if ($CP) {
        require DT_ROOT . '/include/property.func.php';
Example #19
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
if ($html == 'show') {
    $itemid or exit;
    $item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}");
    if (!$item || $item['status'] < 3) {
        exit;
    }
    extract($item);
    $fee = get_fee($item['fee'], $MOD['fee_view']);
    $currency = $MOD['fee_currency'];
    $unit = $currency == 'money' ? $DT['money_unit'] : $DT['credit_unit'];
    $name = $currency == 'money' ? $DT['money_name'] : $DT['credit_name'];
    $inner = false;
    if (check_group($_groupid, $MOD['group_show'])) {
        if ($fee) {
            $inner = true;
            if ($MG['fee_mode'] && $MOD['fee_mode']) {
                $user_status = 3;
            } else {
                $mid = $moduleid;
                if ($_userid) {
                    if (check_pay($mid, $itemid)) {
                        $user_status = 3;
                    } else {
                        $user_status = 2;
                        $linkurl = $MOD['linkurl'] . $linkurl;
                        $fee_back = $currency == 'money' ? dround($fee * intval($MOD['fee_back']) / 100) : ceil($fee * intval($MOD['fee_back']) / 100);
                        $pay_url = $MODULE[2]['linkurl'] . 'pay.php?mid=' . $mid . '&itemid=' . $itemid . '&username='******'&fee_back=' . $fee_back . '&fee=' . $fee . '&currency=' . $currency . '&sign=' . crypt_sign($_username . $mid . $itemid . $username . $fee . $fee_back . $currency . $linkurl . $title) . '&title=' . rawurlencode($title) . '&forward=' . urlencode($linkurl);
                    }
Example #20
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
$could_contact or dalert($L['msg_contact_deny'], 'goback');
$could_message = check_group($_groupid, $MOD['group_message']);
if ($username == $_username || $domain) {
    $could_message = true;
}
include template('contact', $template);
Example #21
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
if ($DT_BOT) {
    dhttp(403);
}
require DT_ROOT . '/module/' . $module . '/common.inc.php';
check_group($_groupid, $MOD['group_compare']) or dalert(lang('message->without_permission'), 'goback');
$DT_URL = $DT_REF;
$itemid && is_array($itemid) or dalert($L['compare_choose'], 'goback');
$itemid = array_unique($itemid);
$item_nums = count($itemid);
$item_nums < 9 or dalert($L['compare_max'], 'goback');
$item_nums > 1 or dalert($L['compare_min'], 'goback');
$itemid = implode(',', $itemid);
$tags = array();
$result = $db->query("SELECT * FROM {$table} WHERE itemid IN ({$itemid}) ORDER BY addtime DESC");
while ($r = $db->fetch_array($result)) {
    if ($r['status'] != 3) {
        continue;
    }
    $r['editdate'] = timetodate($r['edittime'], 3);
    $r['adddate'] = timetodate($r['addtime'], 3);
    $r['stitle'] = dsubstr($r['title'], 30);
    $r['stitle'] = set_style($r['stitle'], $r['style']);
    $r['userurl'] = userurl($r['username']);
    $r['linkurl'] = $MOD['linkurl'] . $r['linkurl'];
    $tags[] = $r;
}
$head_title = $L['compare_title'] . $DT['seo_delimiter'] . $MOD['name'];
include template($MOD['template_compare'] ? $MOD['template_compare'] : 'compare', $module);
Example #22
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
if ($DT_BOT || $_POST) {
    dhttp(403);
}
require DT_ROOT . '/module/' . $module . '/common.inc.php';
$group_search = $action == 'resume' ? $MOD['group_search_resume'] : $MOD['group_search'];
if (!check_group($_groupid, $group_search)) {
    include load('403.inc');
}
require DT_ROOT . '/include/post.func.php';
include load('search.lang');
$CP = $MOD['cat_property'] && $catid && $CAT['property'];
$thumb = isset($thumb) ? intval($thumb) : 0;
$level = isset($level) ? intval($level) : 0;
$vip = isset($vip) ? intval($vip) : 0;
$gender = isset($gender) ? intval($gender) : 0;
$type = isset($type) ? intval($type) : 0;
$marriage = isset($marriage) ? intval($marriage) : 0;
$education = isset($education) ? intval($education) : 0;
$experience = isset($experience) ? intval($experience) : 0;
if (!$areaid && $cityid && strpos($DT_URL, 'areaid') === false) {
    $areaid = $cityid;
    $ARE = $AREA[$cityid];
}
$minsalary = isset($minsalary) ? intval($minsalary) : 0;
$maxsalary = isset($maxsalary) ? intval($maxsalary) : 0;
$areaid = isset($areaid) ? intval($areaid) : 0;
$fromdate = isset($fromdate) && is_date($fromdate) ? $fromdate : '';
$fromtime = $fromdate ? strtotime($fromdate . ' 0:0:0') : 0;
Example #23
0
    include DT_ROOT . '/include/update.inc.php';
    $head_title = $title . $DT['seo_delimiter'] . $MOD['name'] . $DT['seo_delimiter'] . $head_title;
    $head_name = $CAT['catname'];
    $back_link = 'javascript:Dback(\'' . mobileurl($moduleid, $catid) . '\', \'' . $DT_REF . '\', \'share|comment|purchase\');';
    $foot = '';
} else {
    if ($kw) {
        check_group($_groupid, $MOD['group_search']) or mobile_msg($L['msg_no_search']);
    } else {
        if ($catid) {
            $CAT or mobile_msg($L['msg_not_cate']);
            if (!check_group($_groupid, $MOD['group_list']) || !check_group($_groupid, $CAT['group_list'])) {
                mobile_msg($L['msg_no_right']);
            }
        } else {
            check_group($_groupid, $MOD['group_index']) or mobile_msg($L['msg_no_right']);
        }
    }
    $head_title = $MOD['name'] . $DT['seo_delimiter'] . $head_title;
    if ($kw) {
        $head_title = $kw . $DT['seo_delimiter'] . $head_title;
    }
    $condition = "status=3";
    if ($keyword) {
        $condition .= " AND keyword LIKE '%{$keyword}%'";
    }
    if ($catid) {
        $condition .= $CAT ? " AND catid IN (" . $CAT['arrchildid'] . ")" : " AND catid={$catid}";
    }
    if ($areaid) {
        $condition .= $ARE['child'] ? " AND areaid IN (" . $ARE['arrchildid'] . ")" : " AND areaid={$areaid}";
Example #24
0
$content = $content['content'];
$print = isset($print) ? 1 : 0;
$CAT = get_cat($catid);
if (!check_group($_groupid, $MOD['group_show_resume']) || !check_group($_groupid, $CAT['group_show'])) {
    include load('403.inc');
}
$parentid = $CATEGORY[$catid]['parentid'] ? $CATEGORY[$catid]['parentid'] : $catid;
$adddate = timetodate($addtime, 3);
$editdate = timetodate($edittime, 3);
$linkurl = $MOD['linkurl'] . $linkurl;
$user_status = 4;
$fee = get_fee($item['fee'], $MOD['fee_view_resume']);
$currency = $MOD['fee_currency'];
$unit = $currency == 'money' ? $DT['money_unit'] : $DT['credit_unit'];
$name = $currency == 'money' ? $DT['money_name'] : $DT['credit_name'];
if (check_group($_groupid, $MOD['group_contact_resume'])) {
    if ($MG['fee_mode'] && $MOD['fee_mode']) {
        $user_status = 3;
    } else {
        if ($fee) {
            $mid = -$moduleid;
            if ($_userid) {
                if (check_pay($mid, $itemid)) {
                    $user_status = 3;
                } else {
                    $user_status = 2;
                    $item['title'] = lang($L['resume_title'], array($truename));
                    $fee_back = 0;
                    $pay_url = $MODULE[2]['linkurl'] . 'pay.php?mid=' . $mid . '&itemid=' . $itemid . '&username='******'&fee_back=' . $fee_back . '&fee=' . $fee . '&currency=' . $currency . '&sign=' . crypt_sign($_username . $mid . $itemid . $username . $fee . $fee_back . $currency . $linkurl . $title) . '&title=' . rawurlencode($title) . '&forward=' . urlencode($linkurl);
                }
            } else {
Example #25
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']);
Example #26
0
                     $blacks[] = $v;
                 }
             }
             $black = $blacks ? implode(' ', $blacks) : '';
         } else {
             $black = '';
         }
         $send = $send ? 1 : 0;
         $db->query("UPDATE {$DT_PRE}member SET black='{$black}',send='{$send}' WHERE userid={$_userid}");
         dmsg($L['op_update_success'], '?action=setting');
     } else {
         $head_title = $L['message_title_black'] . $DT['seo_delimiter'] . $head_title;
         $user = $db->get_one("SELECT black,send FROM {$DT_PRE}member WHERE userid={$_userid}");
         $could_send = false;
         if ($DT['message_email'] && $DT['mail_type'] != 'close') {
             if (check_group($_groupid, $DT['message_group'])) {
                 $could_send = true;
             }
         }
     }
     break;
 case 'outbox':
     $status = 2;
     $name = $L['message_title_outbox'];
     $condition = "fromuser='******' AND status={$status} " . $condition;
     $messages = $do->get_list($condition);
     break;
 case 'draft':
     $status = 1;
     $name = $L['message_title_draft'];
     $condition = "fromuser='******' AND status={$status} " . $condition;
Example #27
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
require DT_ROOT . '/module/' . $module . '/common.inc.php';
if (!check_group($_groupid, $MOD['group_index'])) {
    include load('403.inc');
}
$typeid = isset($typeid) ? intval($typeid) : 99;
isset($TYPE[$typeid]) or $typeid = 99;
$dtype = $typeid != 99 ? " AND typeid={$typeid}" : '';
$maincat = get_maincat($catid ? $CAT['parentid'] : 0, $moduleid);
$seo_file = 'index';
include DT_ROOT . '/include/seo.inc.php';
if ($catid) {
    $seo_title = $seo_catname . $seo_title;
}
if ($typeid != 99) {
    $seo_title = $TYPE[$typeid] . $seo_delimiter . $seo_title;
}
if ($page == 1) {
    $head_canonical = $MOD['linkurl'];
}
$destoon_task = "moduleid={$moduleid}&html=index";
if ($EXT['mobile_enable']) {
    $head_mobile = $EXT['mobile_url'] . mobileurl($moduleid, 0, 0, $page);
}
include template($MOD['template_index'] ? $MOD['template_index'] : 'index', $module);
Example #28
0
                $bannert = 0;
                $banner = $bannert;
            }
        } else {
            $bannert = 0;
        }
    }
}
$bannerw = isset($HOME['bannerw']) && $HOME['bannerw'] ? intval($HOME['bannerw']) : 960;
$bannerh = isset($HOME['bannerh']) && $HOME['bannerh'] ? intval($HOME['bannerh']) : 200;
$could_comment = $MOD['comment'];
$homeurl = $MOD['homeurl'];
if ($domain) {
    $could_comment = false;
}
$could_contact = check_group($_groupid, $MOD['group_contact']);
if ($username == $_username || $domain) {
    $could_contact = true;
}
$HSPATH = DT_STATIC . $MODULE[4]['moduledir'] . '/skin/' . $skin . '/';
if (!$banner) {
    $banner = is_file(DT_ROOT . '/' . $MODULE[4]['moduledir'] . '/skin/' . $skin . '/banner.jpg') ? $HSPATH . 'banner.jpg' : '';
}
$background = isset($HOME['background']) ? $HOME['background'] : '';
$bgcolor = isset($HOME['bgcolor']) ? $HOME['bgcolor'] : '';
$logo = isset($HOME['logo']) ? $HOME['logo'] : '';
$video = isset($HOME['video']) ? $HOME['video'] : '';
$css = isset($HOME['css']) ? $HOME['css'] : '';
$announce = isset($HOME['announce']) ? $HOME['announce'] : '';
$map = isset($HOME['map']) ? $HOME['map'] : '';
$stats = isset($HOME['stats']) ? $HOME['stats'] : '';
Example #29
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
if ($DT_BOT || $_POST) {
    dhttp(403);
}
require DT_ROOT . '/module/' . $module . '/common.inc.php';
if (!check_group($_groupid, $MOD['group_search'])) {
    include load('403.inc');
}
require DT_ROOT . '/include/post.func.php';
include load('search.lang');
$CP = $MOD['cat_property'] && $catid && $CAT['property'];
$thumb = isset($thumb) ? intval($thumb) : 0;
$vip = isset($vip) ? intval($vip) : 0;
$typeid = isset($typeid) && isset($TYPE[$typeid]) ? intval($typeid) : 99;
if (!$areaid && $cityid && strpos($DT_URL, 'areaid') === false) {
    $areaid = $cityid;
    $ARE = $AREA[$cityid];
}
$fromdate = isset($fromdate) && is_date($fromdate) ? $fromdate : '';
$fromtime = $fromdate ? strtotime($fromdate . ' 0:0:0') : 0;
$todate = isset($todate) && is_date($todate) ? $todate : '';
$totime = $todate ? strtotime($todate . ' 23:59:59') : 0;
$sfields = array($L['by_auto'], $L['by_title'], $L['by_content'], $L['by_introduce']);
$dfields = array('keyword', 'title', 'content', 'introduce');
$sorder = array($L['order'], $L['order_auto']);
$dorder = array($MOD['order'], '');
if (!$MOD['fulltext']) {
    unset($sfields[2], $dfields[2]);
}
Example #30
0
$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'] && $item['open'] == 3 && 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');
}
if ($open < 3) {
    $_key = $open == 2 ? $password : $answer;
    $str = get_cookie('photo_' . $itemid);
    $pass = $str == md5(md5($DT_IP . $open . $_key . DT_KEY));
    if ($_username && $_username == $username) {
        $pass = true;
    }
} else {
    $pass = true;
}
if ($page > $items) {
    $page = 1;
}