-
Notifications
You must be signed in to change notification settings - Fork 1
/
asikart_easyset.php
76 lines (59 loc) · 2.17 KB
/
asikart_easyset.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/**
* @package Windwalker.Framework
* @subpackage AKHelper
*
* @copyright Copyright (C) 2012 Asikart. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Generated by AKHelper - http://asikart.com
*/
defined( '_JEXEC' ) or die;
if(JVERSION >= 3.0 && !defined('DS')){
define('DS', DIRECTORY_SEPARATOR) ;
}
// Include WindWalker from libraries or plugin self.
// ===============================================================
if(!defined('AKPATH_ROOT')) {
$inner_ww_path = JPATH_PLUGINS."/system/asikart_easyset/windwalker" ;
$lib_ww_path = JPATH_LIBRARIES . '/windwalker' ;
if(file_exists($lib_ww_path.'/init.php')) {
// From libraries
$ww_path = $lib_ww_path ;
}else{
// From Component folder
$ww_path = $inner_ww_path ;
}
// Init WindWalker
// ===============================================================
if(!file_exists($ww_path.'/init.php')) {
$message = 'Please install WindWalker Framework libraries.' ;
throw new Exception($message, 500) ;
}
include_once $ww_path.'/init.php' ;
}
else{
include_once AKPATH_ROOT.'/init.php' ;
}
$akpath = JPATH_ROOT.'/easyset' ;
$akurl = JURI::root().'easyset/' ;
$akadmin_path = JPATH_PLUGINS.'/system/asikart_easyset' ;
$akadmin_url = JURI::root().'plugins/system/asikart_easyset' ;
$mainfile = $akadmin_path.'/main.php';
define('AK_PATH' , $akpath );
define('AK_CMD_PATH' , AK_PATH.'/cmd');
define('AK_URL' , $akurl);
define('AK_JS_URL' , AK_URL.'js');
define('AK_CSS_URL' , AK_URL.'css');
define('AK_ADMIN_PATH' , $akadmin_path );
define('AK_ADMIN_LIB_PATH' , AK_ADMIN_PATH.'/lib');
define('AK_ADMIN_CMD_PATH' , AK_ADMIN_LIB_PATH.'/cmd');
define('AK_ADMIN_URL' , $akadmin_url);
define('AK_ADMIN_JS_URL' , AK_ADMIN_URL.'/lib/includes/js');
define('AK_ADMIN_CSS_URL' , AK_ADMIN_URL.'/lib/includes/css');
// load AKHelper
if( !class_exists( 'AKHelper' ) ) include_once ( AK_ADMIN_LIB_PATH.'/akhelper/akhelper.init.php' );
// include something
jimport( 'joomla.filesystem.file' );
jimport( 'joomla.filesystem.folder' );
// load Easyset
include_once ( $mainfile );