Example #1
0
function upload($form, $met_file_format)
{
    global $lang_js22, $lang_js23, $lang_fileOK, $lang_fileError1, $lang_fileError2, $lang_fileError3, $lang_fileError4;
    if (is_array($form)) {
        $filear = $form;
    } else {
        $filear = $_FILES[$form];
    }
    if (!is_writable('../upload/file/')) {
        okinfo('javascript:history.go(-1);', $lang_js22);
    }
    //Get extension
    $ext = explode(".", $filear["name"]);
    $extnum = count($ext) - 1;
    $ext = $ext[$extnum];
    //Save the settings file name
    $name = met_rand(32) . "." . $ext;
    if (strtolower($ext) == 'php' || strtolower($ext) == 'aspx' || strtolower($ext) == 'asp' || strtolower($ext) == 'jsp' || strtolower($ext) == 'js' || strtolower($ext) == 'asa') {
        okinfo('javascript:history.go(-1);', $lang_js23);
    }
    if ($met_file_format != "" && !in_array(strtolower($ext), explode("|", strtolower($met_file_format)))) {
        okinfo('javascript:history.go(-1);', $lang_js23);
    }
    if (!copy($filear["tmp_name"], "../upload/file/" . $name)) {
        $errors = array(0 => "{$lang_fileOK}", 1 => "{$lang_fileError1} ", 2 => "{$lang_fileError2} ", 3 => "{$lang_fileError3} ", 4 => "{$lang_fileError4} ");
    } else {
        @unlink($filear["tmp_name"]);
        //Delete temporary files
    }
    return "../upload/file/" . $name;
}
Example #2
0
 public function __construct()
 {
     global $_M;
     if (!$_M['config']['met_weibo_open']) {
         okinfo($_M['url']['login'], '微信登录功能已关闭');
     }
     $this->appid = $_M['config']['met_weibo_appkey'];
     $this->appkey = $_M['config']['met_weibo_appsecret'];
     $this->table = $_M['table']['user_other'];
     $this->type = 'weibo';
 }
Example #3
0
 public function __construct()
 {
     global $_M;
     if (!$_M['config']['met_weixin_open']) {
         okinfo($_M['url']['login'], '微信登录功能已关闭');
     }
     if (is_weixin_client()) {
         $this->appid = $_M['config']['met_weixin_gz_appid'];
         $this->appkey = $_M['config']['met_weixin_gz_appsecret'];
     } else {
         $this->appid = $_M['config']['met_weixin_appid'];
         $this->appkey = $_M['config']['met_weixin_appsecret'];
     }
     $this->table = $_M['table']['user_other'];
     $this->type = 'weixin';
 }
if ($met_member_login == 2 && isset($username) && isset($code)) {
    $username = daddslashes($username);
    $admin_list = $db->get_one("SELECT * FROM {$met_admin_table} WHERE admin_id='{$username}'");
    if (!$admin_list) {
        okinfo($member_index_url, $lang_js4);
        exit;
    }
    $array = explode("-", $admin_list['admin_register_date']);
    $year = $array[0];
    $month = $array[1];
    $array = explode(":", $array[2]);
    $minute = $array[1];
    $second = $array[2];
    $array = explode(" ", $array[0]);
    $day = $array[0];
    $hour = $array[1];
    $timestamp = mktime($hour, $minute, $second, $month, $day, $year);
    if (md5($timestamp) == $code) {
        $query = "update {$met_admin_table} SET checkid=1 where admin_id='{$username}'";
        $db->query($query);
        okinfo($member_index_url, $lang_js5);
        exit;
    }
    okinfo($member_index_url, $lang_js4);
    exit;
}
$mfname = 'register';
include template('member');
footermember();
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
Example #5
0
function authtemp($code)
{
    global $au_site, $met_weburl;
    if (function_exists(authcode)) {
        run_strtext(authcode($code, DECODE, md5("metinfo")));
    }
    $au_site = explode("|", $au_site);
    foreach ($au_site as $val) {
        if (stristr($met_weburl, $val)) {
            return;
        }
    }
    var_export("-->");
    okinfo("http://www.metinfo.cn", "{$met_weburl}未授权使用此模板或已经过期! Powered by MetInfo");
    exit;
}
Example #6
0
 public function dovalid()
 {
     global $_M;
     $auth = load::sys_class('auth', 'new');
     $email = $auth->decode($_M['form']['p']);
     if ($email) {
         if ($_M['form']['password']) {
             $user = $this->userclass->get_user_by_email($email);
             if ($user) {
                 if ($this->userclass->editor_uesr_password($user['id'], $_M['form']['password'])) {
                     okinfo($_M['url']['login'], $_M['word']['modifypasswordsuc']);
                 } else {
                     okinfo($_M['url']['login'], $_M['word']['opfail']);
                 }
             } else {
                 okinfo($_M['url']['login'], $_M['word']['nouser']);
             }
         }
         require_once $this->template('tem/getpassword_mailset');
     } else {
         okinfo($_M['url']['register'], $_M['word']['emailvildtips2']);
     }
 }
Example #7
0
File: index.php Project: nanfs/lt
<?php

$index = "wap";
require_once '../include/common.inc.php';
if (!$met_wap) {
    okinfo('../index.php?lang=' . $lang, $lang_metwapok);
}
require_once 'wap.php';
if (!$met_wap_logo) {
    $met_wap_logo = $met_logo;
}
if (!$wap_description) {
    $wap_description = $met_description;
}
include waptemplate($temp);
wapfooter();
?>
 
Example #8
0
                $body = $body . '<tr><td class="l">' . $val[name] . '</td><td class="r">' . $para . '</td>' . $bt . '</tr>' . "\n";
            } else {
                if ($met_cv_image != $val[id]) {
                    $para = explode('../', $para);
                    $para = $para[1] != "" ? "<a href=" . $met_weburl . $para[1] . " trage='_blank' style='color:#f00;' >" . $lang_Download . "</a>" : $lang_Emptyno;
                    $body = $body . '<tr><td class="l">' . $val[name] . '</td><td class="r">' . $para . '</td>' . $bt . '</tr>' . "\n";
                }
            }
        }
        $body .= '<tr><td class="footer" colspan="3">Powered by <a target="_blank" href="http://www.metinfo.cn">MetInfo ' . $metcms_v . '</a> &copy;2008-2011 &nbsp;<a target="_blank" href="http://www.metinfo.cn">MetInfo Inc.</a></td></tr>';
        $body .= '</table>';
        if ($met_cv_back == 1) {
            jmailsend($from, $fromname, $cvto, $met_cv_title, $met_cv_content, $usename, $usepassword, $smtp);
        }
        jmailsend($from, $fromname, $to, $title, $body, $usename, $usepassword, $smtp);
    }
    /*短信提醒*/
    if ($met_nurse_job) {
        require_once ROOTPATH . 'include/export.func.php';
        if (maxnurse() < $met_nurse_max) {
            $domain = strdomain($met_weburl);
            $message = "您网站[{$domain}]收到了新的简历[{$job_list[position]}],请尽快登录网站后台查看";
            sendsms($met_nurse_job_tel, $message, 4);
        }
    }
    /**/
    $backurl = $metinfo_member_name == "" ? '../index.php?lang=' . $lang : '../member/' . $member_index_url;
    okinfo($backurl, $lang_js21);
}
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
Example #9
0
                $paravalues[] = $list1;
            }
            $i = 1;
            $infos = "";
            for ($j = 0; $j < count($paravalues); $j++) {
                $paras4_name = "para" . $val[id] . "_" . $i;
                $para_name = ${$paras4_name};
                if ($infos) {
                    if ($para_name) {
                        $infos = $infos . "、" . $para_name;
                    }
                } else {
                    if ($para_name) {
                        $infos = $para_name;
                    }
                }
                $i = $i + 1;
            }
            if ($db->get_one("SELECT * FROM {$met_plist} WHERE listid='{$uses_id['id']}' and paraid='{$val['id']}' and module='10' and lang='{$lang}'")) {
                $query = "update {$met_plist} SET\tinfo='{$infos}' where listid='{$uses_id['id']}' and paraid='{$val['id']}' and module='10' and lang='{$lang}'";
                $db->query($query);
            } else {
                $query = "INSERT INTO {$met_plist} SET info='{$infos}',listid='{$uses_id['id']}',paraid='{$val['id']},module='10',lang='{$lang}'";
                $db->query($query);
            }
        }
    }
    okinfo('basic.php?lang=' . $lang, $lang_js21);
}
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
Example #10
0
                $para2 = ${$para1};
                $para = $para2 != "" ? $para . $para2 . "-" : $para;
            }
            $para = substr($para, 0, -1);
        }
        $para = htmlspecialchars($para);
        $query = "update {$met_flist} SET\n\t\t\t\t\t  paraid   ='{$val['id']}',\n\t\t\t\t\t  info     ='{$para}'\n\t\t\t\t\t  where listid='{$id}' and paraid={$val['id']}";
        if ($val[type] == 5 and $para == '') {
            $query = '';
        }
        $db->query($query);
    }
    okinfo('feedback.php?lang=' . $lang, $lang_js21);
} else {
    if ($feedback_list[readok] == 1 || $feedback_list[useinfo] != '') {
        okinfo('feedback.php?lang=' . $lang, $lang_js24);
    }
    $query = "SELECT * FROM {$met_parameter} where lang='{$lang}' and module=8  order by no_order";
    if ($met_member_use) {
        $query = "SELECT * FROM {$met_parameter} where lang='{$lang}' and  module=8  and access<='{$metinfo_member_type}' order by no_order";
    }
    $result = $db->query($query);
    while ($list = $db->fetch_array($result)) {
        if ($list[type] == 2 or $list[type] == 4 or $list[type] == 6) {
            $query1 = "select * from {$met_list} where lang='{$lang}' and bigid='" . $list[id] . "' order by no_order";
            $result1 = $db->query($query1);
            while ($list1 = $db->fetch_array($result1)) {
                $paravalue[$list[id]][] = $list1;
            }
        }
        $value_list = $db->get_one("select * from {$met_flist} where paraid={$list['id']} and listid={$id} ");
Example #11
0
 /**
  * 检测是否登陆
  * 有权限则程序向后运行,无权限则提示物权限
  */
 protected function check()
 {
     global $_M;
     $current_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
     if (strstr($current_url, $_M['url']['site_admin'] . "index.php")) {
         $admin_index = 1;
     } else {
         $admin_index = '';
     }
     $met_adminfile = $_M['config']['met_adminfile'];
     $met_admin_table = $_M['table']['admin_table'];
     $metinfo_admin_name = get_met_cookie('metinfo_admin_name');
     $metinfo_admin_pass = get_met_cookie('metinfo_admin_pass');
     if (!$metinfo_admin_name || !$metinfo_admin_pass) {
         if ($admin_index) {
             met_cooike_unset();
             met_setcookie("re_url", $re_url, time() - 3600);
             Header("Location: " . $_M['url']['site_admin'] . "login/login.php");
         } else {
             if (!$re_url) {
                 $re_url = $_SERVER[HTTP_REFERER];
                 $HTTP_REFERERs = explode('?', $_SERVER[HTTP_REFERER]);
                 $admin_file_len1 = strlen("/{$met_adminfile}/");
                 $admin_file_len2 = strlen("/{$met_adminfile}/index.php");
                 if (strrev(substr(strrev($HTTP_REFERERs[0]), 0, $admin_file_len1)) == "/{$met_adminfile}/" || strrev(substr(strrev($HTTP_REFERERs[0]), 0, $admin_file_len2)) == "/{$met_adminfile}/index.php" || !$HTTP_REFERERs[0]) {
                     $re_url = "http://{$_SERVER[SERVER_NAME]}{$_SERVER[REQUEST_URI]}";
                 }
             }
             if (!$_COOKIE[re_url] && !strstr($re_url, "return.php")) {
                 met_setcookie("re_url", $re_url, time() + 3600);
             }
             met_cooike_unset();
             Header("Location: " . $_M['url']['site_admin'] . "login/login.php");
         }
         exit;
     } else {
         $query = "SELECT * FROM {$_M['table']['admin_table']} WHERE admin_id = '{$metinfo_admin_name}' AND admin_pass = '******' AND usertype = '3'";
         $admincp_ok = DB::get_one($query);
         if (!$admincp_ok) {
             if ($admin_index) {
                 met_cooike_unset();
                 met_setcookie("re_url", $re_url, time() - 3600);
                 Header("Location: " . $_M['url']['site_admin'] . "login/login.php");
             } else {
                 if (!$re_url) {
                     $re_url = $_SERVER[HTTP_REFERER];
                     $HTTP_REFERERs = explode('?', $_SERVER[HTTP_REFERER]);
                     $admin_file_len1 = strlen("/{$met_adminfile}/");
                     $admin_file_len2 = strlen("/{$met_adminfile}/index.php");
                     if (strrev(substr(strrev($HTTP_REFERERs[0]), 0, $admin_file_len1)) == "/{$met_adminfile}/" || strrev(substr(strrev($HTTP_REFERERs[0]), 0, $admin_file_len2)) == "/{$met_adminfile}/index.php" || !$HTTP_REFERERs[0]) {
                         $re_url = "http://{$_SERVER[SERVER_NAME]}{$_SERVER[REQUEST_URI]}";
                     }
                 }
                 if (!strstr($re_url, "return.php")) {
                     if (!$_COOKIE['re_url']) {
                         met_setcookie("re_url", $re_url, time() + 3600);
                     }
                 }
                 met_cooike_unset();
                 Header("Location: " . $_M['url']['site_admin'] . "login/login.php");
             }
             exit;
         }
     }
     $query = "SELECT * FROM {$_M['table']['admin_table']} WHERE admin_id='{$metinfo_admin_name}' AND admin_pass='******'";
     $membercp_ok = DB::get_one($query);
     if (!strstr($membercp_ok['admin_op'], "metinfo")) {
         if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
             $return_url = "";
         } else {
             $return_url = "javascript:window.history.back();";
         }
         if (stristr(M_ACTION, 'add')) {
             if (!strstr($membercp_ok['admin_op'], "add")) {
                 okinfo($return_url, $_M['word']['loginadd']);
             }
         }
         if (stristr(M_ACTION, 'editor')) {
             if (!strstr($membercp_ok['admin_op'], "editor")) {
                 okinfo($return_url, $_M['word']['loginedit']);
             }
         }
         if (stristr(M_ACTION, 'del')) {
             if (!strstr($membercp_ok['admin_op'], "del")) {
                 okinfo($return_url, $_M['word']['logindelete']);
             }
         }
         if (stristr(M_ACTION, 'all')) {
             if (!strstr($membercp_ok['admin_op'], "metinfo")) {
                 okinfo($return_url, $_M['word']['loginall']);
             }
         }
         if (stristr(M_ACTION, 'table')) {
             if (stristr($_M['form']['submit_type'], 'save')) {
                 if ($_M['form']['allid']) {
                     $power_ids = explode(',', $_M['form']['allid']);
                     $e = 0;
                     $a = 0;
                     foreach ($power_ids as $val) {
                         if ($val) {
                             if (is_numeric($val)) {
                                 $e++;
                             } else {
                                 $a++;
                             }
                         }
                         if ($e > 0) {
                             if (!strstr($membercp_ok['admin_op'], "editor")) {
                                 okinfo($return_url, $_M['word']['loginedit']);
                             }
                         }
                         if ($a > 0) {
                             if (!strstr($membercp_ok['admin_op'], "add")) {
                                 okinfo($return_url, $_M['word']['loginadd']);
                             }
                         }
                     }
                 }
             }
             if (stristr($_M['form']['submit_type'], 'del')) {
                 if (!strstr($membercp_ok['admin_op'], "del")) {
                     okinfo($return_url, $_M['word']['logindelete']);
                 }
             }
         }
     }
     if (stristr($_M['url']['own'], 'admin/appstore')) {
         if (!stristr($membercp_ok['admin_type'], '1507') && $membercp_ok['admin_type'] != 'metinfo') {
             echo "<script type='text/javascript'> alert('{$_M['word']['appmarket_jurisdiction']}');window.history.back();</script>";
             exit;
         }
     }
     if (stristr($_M['url']['own'], 'admin/theme')) {
         if ($_M['form']['mobile']) {
             if (!stristr($membercp_ok['admin_type'], '1102') && $membercp_ok['admin_type'] != 'metinfo') {
                 echo "<script type='text/javascript'> alert('{$_M['word']['setup_permissions']}');window.history.back();</script>";
                 exit;
             }
         } else {
             if (!stristr($membercp_ok['admin_type'], '1101') && $membercp_ok['admin_type'] != 'metinfo') {
                 echo "<script type='text/javascript'> alert('{$_M['word']['setup_permissions']}');window.history.back();</script>";
                 exit;
             }
         }
     }
 }
Example #12
0
    okinfo('message.php?lang=' . $lang, $lang_js1);
}
if ($metinfo_member_name != $message_list[customerid]) {
    okinfo('javascript:history.back();', $lang_js1);
}
if ($action == "editor") {
    //code
    if ($met_memberlogin_code == 1) {
        require_once 'captcha.class.php';
        $Captcha = new Captcha();
        if (!$Captcha->CheckCode($code)) {
            echo "<script type='text/javascript'> alert('{$lang_membercode}');window.history.back();</script>";
            exit;
        }
    }
    $query = "update {$met_message} SET\n                      name               = '{$messagename}',\n\t\t\t\t\t  tel            \t = '{$tel}',\n\t\t\t\t\t  email              = '{$email}',\n\t\t\t\t\t  contact\t\t\t = '{$contact}',\n\t\t\t\t\t  info  \t\t\t = '{$info}'\n\t\t\t\t\t  where id='{$id}'";
    $db->query($query);
    okinfo('message.php?lang=' . $lang, $lang_js21);
} else {
    if ($message_list[readok] == 1 || $message_list[useinfo] != '') {
        okinfo('message.php?lang=' . $lang, $lang_js24);
    }
    if (!$message_list) {
        okinfo('message.php?lang=' . $lang, $lang_js1);
    }
    $mfname = 'message_editor';
    include template('member');
    footermember();
}
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
Example #13
0
<?php

# MetInfo Enterprise Content Management System
# Copyright (C) MetInfo Co.,Ltd (http://www.metinfo.cn). All rights reserved.
require_once '../include/common.inc.php';
$classaccess = $db->get_one("SELECT * FROM {$met_column} WHERE module='6' and lang='{$lang}'");
$metaccess = $classaccess[access];
$class1 = $classaccess[id];
require_once '../include/head.php';
$guanlian = $class_list[$class1][releclass];
$class1_info = $class_list[$class1][releclass] ? $class_list[$class_list[$class1][releclass]] : $class_list[$class1];
$class2_info = $class_list[$class1][releclass] ? $class_list[$class1] : $class_list[$class2];
if (!class1_info) {
    okinfo('../', $lang_error);
}
$serch_sql = " where lang='{$lang}' {$mobilesql} and displaytype='1' and ((TO_DAYS(NOW())-TO_DAYS(`addtime`)< useful_life) OR useful_life=0) ";
if ($met_member_use == 2) {
    $serch_sql .= " and access<={$metinfo_member_type}";
}
$order_sql = "order by no_order desc,addtime desc";
$total_count = $db->counter($met_job, "{$serch_sql}", "*");
$totaltop_count = $db->counter($met_job, "{$serch_sql} and top_ok='1'", "*");
require_once '../include/pager.class.php';
$page = (int) $page;
if ($page_input) {
    $page = $page_input;
}
$list_num = $met_job_list;
$rowset = new Pager($total_count, $list_num, $page);
$from_record = $rowset->_offset();
$page = $page ? $page : 1;
Example #14
0
File: index.php Project: nanfs/lt
<?php

$depth = '../';
require_once $depth . '../login/login_check.php';
if ($action == "linkopen") {
    $met_addlinkopen = $met_addlinkopen;
    $langp = $lang;
    $metcms[$langp]['met_addlinkopen'] = $met_addlinkopen;
    require_once $depth . '../include/config.php';
    okinfo('../link/index.php?lang=' . $lang);
} else {
    $serch_sql = " where lang='{$lang}' ";
    if ($link_type != "") {
        $serch_sql .= " and link_type={$link_type} ";
    }
    if ($com_ok != "") {
        $serch_sql .= " and com_ok={$com_ok} ";
    }
    if ($show_ok != "") {
        $serch_sql .= " and show_ok={$show_ok} ";
    }
    if ($link_lang != "") {
        $serch_sql .= " and link_lang={$link_lang} ";
    }
    $order_sql = " order by orderno desc";
    if ($search == "detail_search") {
        if ($webname) {
            $serch_sql .= " and webname like '%{$webname}%' ";
        }
        $total_count = $db->counter($met_link, "{$serch_sql}", "*");
    } else {
Example #15
0
File: message.php Project: nanfs/lt
    }
    if ($met_fd_email == 1) {
        $fromurl = $_SERVER['HTTP_REFERER'];
        $query1 = "select * from {$met_mlist} where lang='{$lang}' and module='7' and listid={$use_id['id']} order by id";
        $result1 = $db->query($query1);
        while ($list1 = $db->fetch_array($result1)) {
            $email_list[] = $list1;
        }
        $body = '';
        foreach ($email_list as $val) {
            $body .= "<b>{$val['imgname']}</b>:{$val['info']}<br />";
        }
        $title = $pname . "{$lang_MessageInfo1}";
        jmailsend($from, $fromname, $to, $title, $body, $usename, $usepassword, $smtp, $email);
    }
    okinfo($returnurl, "{$lang_MessageInfo2}");
} else {
    $class2 = $class_list[$class1][releclass] ? $class1 : $class2;
    $class1 = $class_list[$class1][releclass] ? $class_list[$class1][releclass] : $class1;
    $class_info = $class2 ? $class2_info : $class1_info;
    if ($class2 != "") {
        $class_info[name] = $class2_info[name] . "--" . $class1_info[name];
    }
    $show[description] = $class_info[description] ? $class_info[description] : $met_description;
    $show[keywords] = $class_info[keywords] ? $class_info[keywords] : $met_keywords;
    $met_title = $met_title ? $navtitle . '-' . $met_title : $navtitle;
    $message[listurl] = $met_pseudo ? 'index-' . $lang . '.html' : ($met_webhtm == 2 ? ($met_htmlistname ? "message_list_1" : "index_list_1") . $met_htmtype : "index.php?lang=" . $lang);
    if (count($nav_list2[$message_column[id]])) {
        $k = count($nav_list2[$class1]);
        $nav_list2[$class1][$k] = $class1_info;
        $nav_list2[$class1][$k][name] = $lang_messageview;
Example #16
0
# MetInfo Enterprise Content Management System
# Copyright (C) MetInfo Co.,Ltd (http://www.metinfo.cn). All rights reserved.
require_once '../include/common.inc.php';
$download = $db->get_one("select * from {$met_download} where id='{$id}'");
if (!$download) {
    okinfo('../', $lang_error);
}
if ($type == 'para') {
    $metinfodown = $db->get_one("select * from {$met_parameter} where id='{$paraid}'");
    $download[downloadaccess] = $metinfodown[access];
    $metinfoparadown = $db->get_one("select * from {$met_plist} where id='{$listid}' and module='4'");
    $download[downloadurl] = $metinfoparadown[info];
}
$query = "select * from {$met_admin_array} where id='{$download['downloadaccess']}'";
$memberacess = $db->get_one($query);
$download[downloadaccess] = $memberacess[user_webpower];
if (intval($metinfo_member_type) >= intval($download[downloadaccess])) {
    header("location:{$download['downloadurl']}");
    exit;
} else {
    met_cooike_unset();
    change_met_cookie('metinfo_member_name', $metinfo_member_name);
    change_met_cookie('metinfo_member_pass', $metinfo_member_pass);
    change_met_cookie('metinfo_member_type', $metinfo_member_type);
    change_met_cookie('metinfo_admin_name', $metinfo_admin_name);
    save_met_cookie();
    okinfo('../member/' . $member_index_url, $lang_downloadaccess);
}
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
Example #17
0
            } else {
                okinfo('../admin/getpassword.php', $lang_password19);
            }
        } else {
            if ($password == '') {
                okinfo('javascript:history.back();', $lang_dataerror);
            }
            if ($passwordsr != $password) {
                okinfo('javascript:history.back();', $lang_js6);
            }
            $password = md5($password);
            if (!$p) {
                die;
            }
            $array = explode('.', authcode($p, 'DECODE', $met_webkeys));
            $array[0] = daddslashes($array[0]);
            $query = "update {$met_admin_table} set\n\t\t\t   admin_pass='******'\n\t\t\t   where admin_id='{$array['0']}'";
            $db->query($query);
            okinfo('../index.php', $lang_jsok);
        }
        break;
    default:
        if ($action != '') {
            die;
        }
        break;
}
$css_url = "../templates/css";
$img_url = "../templates/images";
include template('getpassword');
footer();
Example #18
0
 public function doemailvild()
 {
     global $_M;
     $auth = load::sys_class('auth', 'new');
     $username = $auth->decode($_M['form']['p']);
     if ($username) {
         if ($this->userclass->get_user_valid($username)) {
             okinfo($_M['url']['login'], $_M['word']['activesuc']);
         } else {
             okinfo($_M['url']['register'], $_M['word']['emailvildtips1']);
         }
     } else {
         okinfo($_M['url']['register'], $_M['word']['emailvildtips2']);
     }
 }
Example #19
0
                        if (!strstr($admincp_ok[admin_op], "del")) {
                            okinfo('javascript:window.history.back();', $lang_logindelete);
                        }
                        break;
                    case "delete":
                        if (!strstr($admincp_ok[admin_op], "del")) {
                            okinfo('javascript:window.history.back();', $lang_logindelete);
                        }
                        break;
                }
                if (!strstr($_SERVER['REQUEST_URI'], "olupdate.php")) {
                    if (($admincp_ok[admin_op] == '---' or $admincp_ok[admin_op] == '') and $action != '' and $action != 'list' and !$action_ajax and !strstr($_SERVER['REQUEST_URI'], "/content.php")) {
                        okinfo('javascript:window.history.back();', $lang_loginall);
                    }
                }
            }
            if (strstr($_SERVER['REQUEST_URI'], "olupdate.php") && strpos($met_host, 'api.metinfo.cn')) {
                $first = strpos($met_host, '/');
                $first = $first ? $first + 1 : 0;
                $met_host = substr($met_host, $first);
            }
        }
        $adminlang = explode('-', $admincp_ok[langok]);
        if ($admincp_ok[langok] != 'metinfo' and !strstr($admincp_ok[langok], $lang)) {
            okinfo('javascript:window.history.back();', $lang_loginalllang);
        }
        /*power end*/
    }
}
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
Example #20
0
                $para2 = ${$para1};
                $para = $para2 != "" ? $para . $para2 . "-" : $para;
            }
            $para = substr($para, 0, -1);
        }
        $para = htmlspecialchars($para);
        $query = "update {$met_plist} SET\n\t\t\t\t\t  paraid   ='{$val['id']}',\n\t\t\t\t\t  info     ='{$para}'\n\t\t\t\t\t  where listid='{$id}' and paraid={$val['id']}";
        if ($val[type] == 5 and $para == '') {
            $query = '';
        }
        $db->query($query);
    }
    okinfo('cv.php?lang=' . $lang, $lang_js21);
} else {
    if ($cv_list[readok] == 1) {
        okinfo('cv.php?lang=' . $lang, $lang_js24);
    }
    $query = "SELECT * FROM {$met_parameter} where lang='{$lang}' and module=6  order by no_order";
    if ($met_member_use) {
        $query = "SELECT * FROM {$met_parameter} where lang='{$lang}' and  module=6  and access<='{$metinfo_member_type}' order by no_order";
    }
    $result = $db->query($query);
    while ($list = $db->fetch_array($result)) {
        if ($list[type] == 2 or $list[type] == 4 or $list[type] == 6) {
            $query1 = "select * from {$met_list} where lang='{$lang}' and bigid='" . $list[id] . "' order by no_order";
            $result1 = $db->query($query1);
            while ($list1 = $db->fetch_array($result1)) {
                $paravalue[$list[id]][] = $list1;
            }
        }
        $value_list = $db->get_one("select * from {$met_plist} where paraid='{$list['id']}' and listid='{$id}' ");
Example #21
0
    $classnow = $member_column[id];
    require_once '../include/head.php';
    $class1_info = $class_list[$classnow];
    $class_info = $class1_info;
    $show[description] = $class_info[description] ? $class_info[description] : $met_keywords;
    $show[keywords] = $class_info[keywords] ? $class_info[keywords] : $met_keywords;
    $met_title = $class_info[name] . "--" . $met_title;
    $member_title = "<script language='javascript' src='member.php?memberaction=control&lang=" . $lang . "'></script>";
    require_once '../public/php/methtml.inc.php';
    require_once 'list.php';
    if ($met_webhtm == 0) {
        $member_index_url = "index.php?lang=" . $lang;
    } else {
        $member_index_url = "index" . $met_htmtype;
    }
    $mfname = 'register';
    include template('member');
    /*
    if(file_exists("../templates/".$met_skin_user."/login.".$dataoptimize_html)){
       include template('register');
    }else{
    include templatemember('register_metinfo');
    }
    */
    footer();
} else {
    okinfo('../', $lang_memberclose);
    exit;
}
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
Example #22
0
                            okinfo('javascript:window.history.back();', $lang_logindelete);
                        }
                        break;
                }
                if (!strstr($_SERVER['REQUEST_URI'], "olupdate.php")) {
                    if (($admincp_ok[admin_op] == '---' or $admincp_ok[admin_op] == '') and $action != '' and $action != 'list' and !$action_ajax and !strstr($_SERVER['REQUEST_URI'], "/content.php")) {
                        okinfo('javascript:window.history.back();', $lang_loginall);
                    }
                }
            }
            if (strstr($_SERVER['REQUEST_URI'], "olupdate.php") && strpos($met_host, 'api.metinfo.cn')) {
                $first = strpos($met_host, '/');
                $first = $first ? $first + 1 : 0;
                $met_host = substr($met_host, $first);
            }
        }
        $adminlang = explode('-', $admincp_ok[langok]);
        if ($depth) {
            $depth1 = '../' . $depth;
        }
        $jurisdiction_url = $depth1 . 'index.php?lang=' . $adminlang[1];
        if (!strstr($_SERVER['REQUEST_URI'], "include/turnover.php")) {
            if (!strstr($_SERVER['REQUEST_URI'], "login_out.php")) {
                if ($admincp_ok[langok] != 'metinfo' and !strstr($admincp_ok[langok], $lang)) {
                    okinfo($jurisdiction_url, $lang_loginalllang);
                }
            }
        }
        /*power end*/
    }
}
Example #23
0
         break;
     case 1:
         if ($searchword != '') {
             $serch_sql .= " and title like '%{$searchword}%' ";
         }
         break;
     case 2:
         if ($searchword != '') {
             $serch_sql .= " and content like '%{$searchword}%' ";
         }
         break;
 }
 $module_name = intval($module) ? $module : $class1_info[module];
 $module_name = intval($module_name);
 if ($module_name < 2 || $module_name > 9) {
     okinfo('javascript:history.back();', $lang_js1);
 }
 $table_name = "met_" . $modulename[$module_name][0];
 $table_name = ${$table_name};
 $total_count = $db->counter($table_name, "{$serch_sql}", "*");
 require_once '../include/pager.class.php';
 $page = (int) $page;
 if ($page_input) {
     $page = $page_input;
 }
 $list_num = $met_search_list;
 $rowset = new Pager($total_count, $list_num, $page);
 $from_record = $rowset->_offset();
 $page = $page ? $page : 1;
 $query = "SELECT * FROM {$table_name} {$serch_sql} {$order_sql} LIMIT {$from_record}, {$list_num}";
 $result = $db->query($query);
Example #24
0
File: addlink.php Project: nanfs/lt
    setcookie('submit', $time2);
    require_once '../include/jmail.php';
    /*短信提醒*/
    if ($met_nurse_link) {
        require_once ROOTPATH . 'include/export.func.php';
        if (maxnurse() < $met_nurse_max) {
            $domain = strdomain($met_weburl);
            $message = "您网站[{$domain}]收到了新的友情链接申请[" . strdomain($weburl) . "],请尽快登录网站后台查看";
            sendsms($met_nurse_link_tel, $message, 4);
        }
    }
    /**/
    $query = "INSERT INTO {$met_link} SET\n                      webname              = '{$webname}',\n\t\t\t\t\t  info                 = '{$info}',\n\t\t\t\t\t  link_type            = '{$link_type}',\n\t\t\t\t\t  weburl               = '{$weburl}',\n\t\t\t\t\t  weblogo              = '{$weblogo}',\n\t\t\t\t\t  contact              = '{$contact}',\n\t\t\t\t\t  orderno              = '{$orderno}',\n\t\t\t\t\t  lang                 = '{$lang}', \n\t\t\t\t\t  ip                   = '{$ip}', \n\t\t\t\t\t  addtime              = '{$m_now_date}'";
    $db->query($query);
    $returnurl = $module_listall[9][0][url];
    okinfo($returnurl, $lang_MessageInfo2);
} else {
    $class2 = $class_list[$class1][releclass] ? $class1 : $class2;
    $class1 = $class_list[$class1][releclass] ? $class_list[$class1][releclass] : $class1;
    $class_info = $class2 ? $class2_info : $class1_info;
    if ($class2 != "") {
        $class_info[name] = $class2_info[name] . "--" . $class1_info[name];
    }
    $show[description] = $class_info[description] ? $class_info[description] : $met_description;
    $show[keywords] = $class_info[keywords] ? $class_info[keywords] : $met_keywords;
    $met_title = $met_title ? $navtitle . '-' . $met_title : $navtitle;
    if ($link_list['ctitle'] != '') {
        $met_title = $link_list['ctitle'];
    }
    if (count($nav_list2[$link_list[id]])) {
        $k = count($nav_list2[$class1]);
Example #25
0
File: index.php Project: nanfs/lt
                $body = $body . "<b>" . $val[name] . "</b>:" . $para . "<br>";
            } else {
                $para = $para != "" ? "<a href=" . $met_weburl . "upload/file/" . $para . " >" . $met_weburl . "upload/file/" . $para . "</a>" : $para;
                $body = $body . "<b>" . $val[name] . "</b>:" . $para . "<br>";
            }
        }
        $body = $body . "<b>{$lang_FeedbackProduct}</b>:" . $fdtitle . "<br>";
        $body = $body . "<b>{$lang_IP}</b>:" . $ip . "<br>";
        $body = $body . "<b>{$lang_AddTime}</b>:" . $addtime . "<br>";
        $body = $body . "<b>{$lang_SourcePage}</b>:" . $fromurl;
        jmailsend($from, $fromname, $to, $title, $body, $usename, $usepassword, $smtp, $fdto);
    }
    if ($met_fd_back == 1) {
        jmailsend($from, $fromname, $fdto, $met_fd_title, $met_fd_content, $usename, $usepassword, $smtp);
    }
    okinfo($returnurl, "{$lang_Feedback4}");
} else {
    $query = "SELECT * FROM {$met_parameter} where lang='{$lang}' and  module=8 and class1='{$id}' order by no_order";
    if ($met_member_use) {
        $query = "select * from {$met_parameter} where (access in(select id from {$met_admin_array} where user_webpower<='{$metinfo_member_type}') or access=0) and lang='{$lang}' and module=8 and class1='{$id}' order by no_order;";
    }
    $result = $db->query($query);
    while ($list = $db->fetch_array($result)) {
        if ($list[type] == 2 or $list[type] == 4 or $list[type] == 6) {
            $listinfo = $db->get_one("select * from {$met_list} where bigid='{$list['id']}' and no_order=99999");
            $listinfoid = intval(trim($listinfo[info]));
            if ($listinfo) {
                $listmarknow = 'metinfo';
                $classtype = $listinfo[info] == 'metinfoall' ? $listinfoid : ($met_class[$listinfoid][releclass] ? 'class1' : 'class' . $class_list[$listinfoid][classtype]);
                $query1 = "select * from {$met_product} where lang='{$lang}' and {$classtype}='{$listinfoid}' order by updatetime desc";
                $result1 = $db->query($query1);
Example #26
0
 public function dosafety_teladd()
 {
     global $_M;
     $session = load::sys_class('session', 'new');
     if ($_M['form']['code'] != $session->get("phonecode")) {
         okinfo($_M['url']['profile_safety'], $_M['word']['membercode']);
     }
     if (time() > $session->get("phonetime")) {
         okinfo($_M['url']['profile_safety'], $_M['word']['codetimeout']);
     }
     if ($_M['form']['tel'] != $session->get("phonetel")) {
         okinfo($_M['url']['profile_safety'], $_M['word']['telcheckfail']);
     }
     $session->del('phonecode');
     $session->del('phonetime');
     $session->del('phonetel');
     if ($this->userclass->editor_uesr_tel($_M['user']['id'], $_M['form']['tel'])) {
         okinfo($_M['url']['profile_safety'], $_M['word']['bindingok']);
     } else {
         okinfo($_M['url']['profile_safety'], $_M['word']['opfail']);
     }
 }
Example #27
0
File: head.php Project: nanfs/lt
        $link[] = $list;
    }
}
if ($met_member_use and $metaccess) {
    if ($index != "index") {
        $met_js_access = "<script type='text/javascript' id='metccde'>\nvar jsFile = document.createElement('script');\njsFile.setAttribute('type','text/javascript');\njsFile.setAttribute('src','../include/access.php?&metmemberforce={$metmemberforce}&metuser={$metuser}&lang={$lang}&metaccess={$metaccess}&random='+Math.random());\ndocument.getElementsByTagName('head').item(0).appendChild(jsFile);\n</script>";
        $query = "select * from {$met_admin_array} where id='{$metaccess}'";
        $metaccess = $db->get_one($query);
        if (intval($metinfo_member_type) < intval($metaccess)) {
            met_cooike_unset();
            change_met_cookie('metinfo_member_name', $metinfo_member_name);
            change_met_cookie('metinfo_member_pass', $metinfo_member_pass);
            change_met_cookie('metinfo_member_type', $metinfo_member_type);
            change_met_cookie('metinfo_admin_name', $metinfo_admin_name);
            save_met_cookie();
            okinfo('../member/' . $member_index_url . '&referer=' . urlencode(request_uri()), $lang_access);
        }
    }
}
$listimg['news'] = $listnew['news'];
$hitslistimg['news'] = $hitslistnew['news'];
$classlistimg['news'] = $classlistnew['news'];
$hitsclasslistimg['news'] = $hitsclasslistnew['news'];
if ($class_list[$class_list[$classnow]['releclass']]['module'] > 5 and count($nav_list2[$class_list[$classnow]['releclass']])) {
    $nav_list2[$class_list[$classnow]['releclass']][count($nav_list2[$class_list[$classnow]['releclass']])] = $class_list[$class_list[$classnow]['releclass']];
}
if ($met_img_style) {
    switch ($class_list[$classnow]['module']) {
        case 2:
            $met_img_x = $met_newsimg_x ? $met_newsimg_x : $met_img_x;
            $met_img_y = $met_newsimg_y ? $met_newsimg_y : $met_img_y;
Example #28
0
        $outime = 3600 * 24 * 3;
        $String = authcode($admin_list[admin_id] . "." . $x, 'ENCODE', $met_webkeys, $outime);
        $String = urlencode($String);
        $mailurl = $met_weburl . $adminfile . 'member/getpassword.php?lang=' . $lang . '&p=' . $String;
        $body = "<style type='text/css'>\n";
        $body .= "#metinfo{ padding:10px; color:#555; font-size:12px; line-height:1.8;}\n";
        $body .= "#metinfo .text{ border-top:1px dotted #333; border-bottom:1px dotted #333; padding:5px 0px;}\n";
        $body .= "#metinfo .text p{ margin-bottom:5px;}\n";
        $body .= "#metinfo .text a{ color:#70940E; }\n";
        $body .= "#metinfo .copy{ color:#BBB; padding:5px 0px;}\n";
        $body .= "#metinfo .copy a{ color:#BBB; text-decoration:none; }\n";
        $body .= "#metinfo .copy a:hover{ text-decoration:underline; }\n";
        $body .= "#metinfo .copy b{ font-weight:normal; }\n";
        $body .= "</style>\n";
        $body .= "<div id='metinfo'>\n";
        $body .= "<p>" . $lang_hello . $admin_name . "</p>\n";
        $body .= "<div class='text'><p>{$lang_getTip1}</p>";
        $body .= "<p><a href='{$mailurl}'>{$mailurl}</a></p>\n";
        $body .= "<div class='copy'>{$met_webname1}</a></div>";
        require_once '../include/jmail.php';
        $sendMail = jmailsend($from, $fromname, $to, $title, $body, $usename, $usepassword, $smtp);
        $text = $sendMail ? $lang_getTip2 : $lang_getTip3;
        okinfo('login.php?lang=' . $lang, $text);
    } else {
        $mfname = 'getpassword';
        include template('member');
        footermember();
    }
}
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
Example #29
0
File: showmod.php Project: nanfs/lt
} else {
    $news['imgurl'] = $news['imgurl'] != "" ? $news['imgurl'] : '../' . $met_agents_img;
}
$class1 = $news['class1'];
$class2 = $news['class2'];
$class3 = $news['class3'];
$metaccess = $news['access'];
if ($imgproduct == 'download') {
    if (intval($news['downloadaccess']) > 0 && $met_member_use) {
        $news['downloadurl'] = "down.php?id={$news['id']}&lang={$lang}";
    }
}
require_once '../include/head.php';
$is_correct_file = explode('/', $PHP_SELF);
if ($class_list[$class1]['foldername'] != $is_correct_file[count($is_correct_file) - 2]) {
    okinfo('../404.html');
    exit;
}
$class1_info = $class_list[$class1]['releclass'] ? $class_list[$class_list[$class1]['releclass']] : $class_list[$class1];
$class2_info = $class_list[$class1]['releclass'] ? $class_list[$class1] : $class_list[$class2];
$class3_info = $class_list[$class3];
if ($pagemark > 2 && $pagemark < 6) {
    $mdmendy = 1;
}
if ($mdmendy) {
    $query1 = "select * from {$met_plist} where module='{$pagemark}' and listid='{$id}'";
    $result1 = $db->query($query1);
    while ($list1 = $db->fetch_array($result1)) {
        $nowpara1 = "para" . $list1['paraid'];
        $news[$nowpara1] = $list1['info'];
        $metparaaccess = $metpara[$list1['paraid']]['access'];
Example #30
0
 /**
  * 前台权限检测
  * @param int 会员组编号
  * 如果会员拥有权限则,程序代码向后正常执行,如果没有则提示没有权限。
  */
 protected function check($groupid = 0)
 {
     global $_M;
     $user = $this->get_login_user_info();
     $gourl = $_M['gourl'] ? urlencode($_M['gourl']) : urlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
     $gourl = $gourl == -1 ? "" : $gourl;
     if ($_M['lang'] != $_M['config']['met_index_type']) {
         $lang = "&lang={$_M['lang']}";
     }
     if ($groupid == 0 && !$user) {
         okinfo($_M['url']['site'] . 'member/login.php?gourl=' . $gourl . $lang, '');
     }
     $group = load::sys_class('group', 'new')->get_group($groupid);
     if ($user['access'] < $group['access']) {
         okinfo($_M['url']['site'] . 'member/login.php?gourl=' . $gourl . $lang, '');
     }
 }