<?php
  # 插件功能块,  
  # 编辑于2012-06-13日
  # 伪静对应功能: RewriteRule ^plugin/(.*)$ plugin.php?$1 [L]
  # $default_parem,$default_get,$default_post 数组相当重要
define('IN_SYSTEM', 'plugin');

include('./Source/Inc/common.inc.php');
include('./Source/Inc/app.inc.php');

$run_dir = 'Plugins';
$common_tpl_arr = array();
$common_tpl_arr[0] = "./{$run_dir}/plu_default/tpl/";

if(is_dir('./'.$run_dir.'/plu_'.$default_parem[1].'/') === true){
    $include_file = "./{$run_dir}/plu_{$default_parem[1]}/{$default_parem[2]}.inc.php";
    $common_tpl_arr[0] = "./{$run_dir}/plu_{$default_parem[1]}/tpl/";
}else{
    $include_file = "./$run_dir/plu_default/{$default_parem[1]}.inc.php";
}

$common_tpl_arr[1] = "./$run_dir/default_tpl/";

if(is_file($include_file) === false)
    exit('Plug-in application file does not exist.');
    
include($include_file);