Exemple #1
0
                updatesettingcache();
                updateuserspacemid();
                if (!is_array($copyerrorarr)) {
                    showmessage('file_write_error');
                } else {
                    showmessage($alang['the_following_documents'] . implode('<br />', $copyerrorarr));
                }
            }
        }
        //ɾ³ý½âѹËõ³öÀ´µÄÎļþ
        deltree($datadir, $implodefile);
        //¸üлº´æ
        updatesettingcache();
        updateuserspacemid();
        updatemodel('mid', $mid);
        writemodelvalidate('mid', $mid);
        $output = <<<EOF
\t\t\t<p>{$alang['import_model_suc']}</p>
\t\t\t<div class="buttons">
\t\t\t\t\t<input type="button" value="{$alang['return_model_category']}" onclick="window.location.href='{$cpurl}?action=models'"> 
\t\t\t\t\t<input type="button" value="{$alang['go_field_management']}" onclick="window.location.href='{$cpurl}?action=models&op=field&mid={$mid}'"> 
\t\t\t\t\t<input type="button" value="{$alang['go_info_management']}" onclick="window.location.href='{$cpurl}?action=modelmanages&mid={$mid}'"> 
\t\t\t</div>
EOF;
        showmessage($output);
        exit;
    } else {
        showmessage('import_model_error');
    }
} elseif (submitcheck('fieldlistsubmit')) {
    //×Ö¶Î˳Ðò
Exemple #2
0
     }
 }
 if (in_array('model', $_POST['filekind'])) {
     $cachedir = S_ROOT . './cache/model';
     $filearr = sreaddir($cachedir);
     if (!empty($filearr)) {
         foreach ($filearr as $file) {
             @unlink($cachedir . '/' . $file);
         }
     }
     include_once S_ROOT . '/function/model.func.php';
     $query = $_SGLOBAL['db']->query('SELECT mid, modelname FROM ' . tname('models'));
     while ($value = $_SGLOBAL['db']->fetch_array($query)) {
         $state = checkmodel($value['modelname']);
         if ($state) {
             writemodelvalidate('mid', $value['mid']);
         }
     }
 }
 if (in_array('ad', $_POST['filekind'])) {
     updateadcache();
 }
 if (in_array('announcement', $_POST['filekind'])) {
     updateannouncementcache();
 }
 if (in_array('category', $_POST['filekind'])) {
     updatecategorycache();
 }
 if (in_array('config', $_POST['filekind'])) {
     updatesettingcache();
 }