Example #1
0
         break;
     case 4:
         $table = $met_download;
         break;
     case 5:
         $table = $met_img;
         break;
 }
 $classold1 = $classold2 = "class{$movenow['classtype']}={$movenow['id']}";
 $classtypenext = $movenow['classtype'] + 1;
 if ($classtypenext < 4) {
     $classold1 .= " and class{$classtypenext}=0";
 }
 if ($classto == 0) {
     /*移动为顶级栏目*/
     $filedir = "../../" . metdetrim($foldername);
     if (!file_exists($filedir)) {
         @mkdir($filedir, 0777);
     }
     if (!file_exists($filedir)) {
         metsave('../column/index.php?anyid=' . $anyid . '&lang=' . $lang, $lang_modFiledir);
     }
     if ($movenow['module'] != 8 && $movenow['module'] != 7) {
         column_copyconfig($foldername, $movenow['module'], $movenow['id']);
     }
     $query = "update {$met_column} set classtype=1,bigclass=0,foldername='{$foldername}',releclass=0 where id='{$id}'";
     $db->query($query);
     if ($metinfo_admin_pop != "metinfo") {
         $metinfo_admin_pop .= $id . '-';
         $query = "update {$met_admin_table} SET admin_type = '{$metinfo_admin_pop}' where id='{$admin_list['id']}'";
         $db->query($query);
Example #2
0
                    $db->query($query);
                }
            }
        }
    }
    if ($metinfo_admin_pop1 != '') {
        if ($metinfo_admin_pop != "metinfo") {
            $metinfo_admin_pop1 = $metinfo_admin_pop . $metinfo_admin_pop1;
            $metinfo_admin_pop1 = metdetrim($metinfo_admin_pop1);
            $query = "update {$met_admin_table} SET admin_type = '{$metinfo_admin_pop1}' where id='{$admin_list['id']}'";
            $db->query($query);
        }
        $admin_list = $db->get_all("SELECT * FROM {$met_admin_table} where usertype = 3 && admin_type!='metinfo' &&  admin_type like '%9999%' and id!='{$admin_list['id']}'");
        foreach ($admin_list as $key => $val) {
            $val['admin_type1'] = $val['admin_type'] . $metinfo_admin_pop1;
            $val['admin_type1'] = metdetrim($val['admin_type1']);
            $query = "update {$met_admin_table} SET admin_type = '{$val['admin_type1']}' where id='{$val['id']}'";
            $db->query($query);
        }
    }
    file_unlink("../../cache/column_{$lang}.inc.php");
} elseif ($action == "editorok") {
    $gent = '../../sitemap/index.php?lang=' . $lang . '&htmsitemap=' . $met_member_force;
    metsave('../column/index.php?anyid=' . $anyid . '&lang=' . $lang, '', '', '', $gent);
} else {
    $admin_list = $db->get_one("SELECT * FROM {$met_column} WHERE id='{$id}'");
    if (!$admin_list) {
        metsave('../column/index.php?anyid=' . $anyid . '&lang=' . $lang, $lang_dataerror);
    }
    $query1 = "select * from {$met_column} where bigclass='{$admin_list['id']}'";
    $result1 = $db->query($query1);
Example #3
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';
if ($action == "add") {
    if ($met_memberlogin_code == 1) {
        require_once ROOTPATH . 'member/captcha.class.php';
        $Captcha = new Captcha();
        if (!$Captcha->CheckCode($code)) {
            echo "<script type='text/javascript'> alert('{$lang_membercode}'); window.history.back();</script>";
            exit;
        }
    }
    $yhid = metdetrim($yhid);
    $admin_if = $db->get_one("SELECT * FROM {$met_admin_table} WHERE admin_id='{$yhid}'");
    if ($admin_if || !$yhid) {
        okinfo('javascript:history.back();', $lang_js15);
    }
    require_once '../include/jmail.php';
    $checkid = 0;
    if ($met_member_login == 1) {
        $checkid = 1;
    }
    if ($met_member_login == 2) {
        $array = explode("-", $m_now_date);
        $year = $array[0];
        $month = $array[1];
        $array = explode(":", $array[2]);
        $minute = $array[1];
        $second = $array[2];