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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262
| <?php
if(!class_exists('config')){class config{}} if(!function_exists('getWebRoot')){function getWebRoot(){}}
$config->version = '20.1.1'; $config->liteVersion = '1.2'; $config->charset = 'UTF-8'; $config->cookieLife = time() + 2592000; $config->timezone = 'Asia/Shanghai'; $config->webRoot = ''; $config->customSession = false; $config->edition = 'open'; $config->tabSession = false; $config->clientCache = false;
$config->requestType = 'PATH_INFO'; $config->requestFix = '-'; $config->moduleVar = 'm'; $config->methodVar = 'f'; $config->viewVar = 't'; $config->sessionVar = 'zentaosid'; $config->views = ',html,json,mhtml,xhtml,'; $config->visions = ',rnd,lite,or,';
$config->zin = new stdclass();
$config->themes['default'] = 'default'; $config->langs['zh-cn'] = '简体'; $config->langs['zh-tw'] = '繁體'; $config->langs['en'] = 'English'; $config->langs['de'] = 'Deutsch'; $config->langs['fr'] = 'Français';
$config->devicePrefix['mhtml'] = ''; $config->devicePrefix['xhtml'] = 'x.';
$config->default = new stdclass(); $config->default->view = 'html'; $config->default->lang = 'en'; $config->default->theme = 'default'; $config->default->module = 'index'; $config->default->method = 'index';
$config->db = new stdclass(); $config->slaveDB = new stdclass(); $config->db->persistent = false; $config->db->driver = 'mysql'; $config->db->encoding = 'UTF8'; $config->db->strictMode = true; $config->db->prefix = 'zt_'; $config->db->enableSqlite = false; $config->slaveDBList = array();
$config->metricDB = new stdclass(); $config->metricDB->type = 'mysql';
$config->domainPostfix = "|com|com.cn|com.hk|com.tw|com.vc|edu.cn|es|"; $config->domainPostfix .= "|eu|fm|gov.cn|gs|hk|im|in|info|jp|kr|la|me|"; $config->domainPostfix .= "|mobi|my|name|net|net.cn|org|org.cn|pk|pro|"; $config->domainPostfix .= "|sg|so|tel|tk|to|travel|tv|tw|uk|us|ws|"; $config->domainPostfix .= "|ac.cn|bj.cn|sh.cn|tj.cn|cq.cn|he.cn|sn.cn|"; $config->domainPostfix .= "|sx.cn|nm.cn|ln.cn|jl.cn|hl.cn|js.cn|zj.cn|"; $config->domainPostfix .= "|ah.cn|fj.cn|jx.cn|sd.cn|ha.cn|hb.cn|hn.cn|"; $config->domainPostfix .= "|gd.cn|gx.cn|hi.cn|sc.cn|gz.cn|yn.cn|gs.cn|pub|pw|"; $config->domainPostfix .= "|qh.cn|nx.cn|xj.cn|tw.cn|hk.cn|mo.cn|xz.cn|xyz|wang|"; $config->domainPostfix .= "|ae|asia|biz|cc|cd|cm|cn|co|co.jp|co.kr|co.uk|"; $config->domainPostfix .= "|top|ren|club|space|tm|website|cool|company|city|email|"; $config->domainPostfix .= "|market|software|ninja|bike|today|life|co.il|io|"; $config->domainPostfix .= "|mn|ph|ps|tl|uz|vn|co.nz|cz|gg|gl|gr|je|md|me.uk|org.uk|pl|si|sx|vg|ag|"; $config->domainPostfix .= "|bz|cl|ec|gd|gy|ht|lc|ms|mx|pe|tc|vc|ac|bi|mg|mu|sc|as|com.sb|cx|ki|nf|sh|"; $config->domainPostfix .= "|rocks|social|co.com|bio|reviews|link|sexy|us.com|consulting|moda|desi|"; $config->domainPostfix .= "|menu|info|events|webcam|dating|vacations|flights|cruises|global|ca|guru|"; $config->domainPostfix .= "|futbol|rentals|dance|lawyer|attorney|democrat|republican|actor|condos|immobilien|"; $config->domainPostfix .= "|villas|foundation|expert|works|tools|watch|zone|bargains|agency|best|solar|"; $config->domainPostfix .= "|farm|pics|photo|marketing|holiday|gift|buzz|guitars|trade|construction|"; $config->domainPostfix .= "|international|house|coffee|florist|rich|ceo|camp|education|repair|win|site|";
$config->CSPs = array(); $config->CSPs[] = "form-action 'self';connect-src 'self'";
$config->colWidth = 264; $config->minColWidth = 264; $config->maxColWidth = 384;
$config->framework = new stdclass(); $config->framework->autoConnectDB = true; $config->framework->multiLanguage = true; $config->framework->multiTheme = true; $config->framework->multiSite = false; $config->framework->extensionLevel = 1; $config->framework->jsWithPrefix = false; $config->framework->filterBadKeys = true; $config->framework->filterTrojan = true; $config->framework->filterXSS = true; $config->framework->filterParam = 2; $config->framework->purifier = true; $config->framework->logDays = 14; $config->framework->autoRepairTable = true; $config->framework->autoLang = false; $config->framework->filterCSRF = true; $config->framework->setCookieSecure = true; $config->framework->sendXCTO = true; $config->framework->sendXXP = true; $config->framework->sendHSTS = true; $config->framework->sendRP = true; $config->framework->sendXPCDP = true; $config->framework->sendXDO = true;
$config->framework->detectDevice['zh-cn'] = true; $config->framework->detectDevice['zh-tw'] = true; $config->framework->detectDevice['en'] = true; $config->framework->detectDevice['de'] = true; $config->framework->detectDevice['fr'] = true; $config->framework->detectDevice['vi'] = true;
$config->ipWhiteList = '*'; $config->xFrameOptions = 'SAMEORIGIN';
$config->features = new stdclass(); $config->features->apiGetModel = false; $config->features->apiSQL = false; $config->features->cronSystemCall = false; $config->features->checkClient = true;
$config->file = new stdclass(); $config->file->dangers = 'php,php3,php4,phtml,php5,jsp,py,rb,asp,aspx,ashx,asa,cer,cdx,aspl,shtm,shtml,html,htm'; $config->file->allowed = 'txt,doc,docx,dot,wps,wri,pdf,ppt,pptx,xls,xlsx,ett,xlt,xlsm,csv,jpg,jpeg,png,psd,gif,ico,bmp,swf,avi,rmvb,rm,mp3,mp4,3gp,flv,mov,movie,rar,zip,bz,bz2,tar,gz,mpp,rp,pdm,vsdx,vsd,sql'; $config->file->storageType = 'fs';
$config->allowedTags = '<p><span><h1><h2><h3><h4><h5><em><u><strong><br><ol><ul><li><img><a><b><font><hr><pre><div><table><td><th><tr><tbody><embed><style><s>'; $config->accountRule = '|^[a-zA-Z0-9_]{1}[a-zA-Z0-9_\.]{1,}[a-zA-Z0-9_]{1}$|'; $config->checkVersion = true;
$config->wideSize = 1400; $config->timeout = 30000; $config->duplicateTime = 30; $config->maxCount = 500; $config->moreLinks = array();
$config->inQuickon = strtolower((string)getenv('IN_QUICKON')) == 'true'; $config->inContainer = strtolower((string)getenv('IS_CONTAINER')) == 'true' || strtolower((string)getenv('IN_CONTAINER')) == 'true'; $config->k8space = 'quickon-system'; $config->demoAccounts = ''; $config->demoAppLife = 30; $config->CNE = new stdclass(); $config->CNE->api = new stdclass(); $config->CNE->api->host = getenv('CNE_API_HOST'); $config->CNE->api->auth = 'X-Auth-Token'; $config->CNE->api->token = getenv('CNE_API_TOKEN'); $config->CNE->api->headers = array('Content-Type: application/json'); $config->CNE->api->channel = 'stable';
$config->CNE->app = new stdclass; $config->CNE->app->domain = 'dev.haogs.cn';
$config->cloud = new stdclass; $config->cloud->api = new stdclass; $config->cloud->api->host = getenv('CLOUD_API_HOST'); $config->cloud->api->auth = 'X-Auth-Token'; $config->cloud->api->token = getenv('CLOUD_API_TOKEN'); $config->cloud->api->headers = array('Content-Type: application/json'); $config->cloud->api->channel = getenv('CLOUD_DEFAULT_CHANNEL') ? getenv('CLOUD_DEFAULT_CHANNEL') : 'stable'; $config->cloud->api->switchChannel = false;
$filterConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'filter.php'; if(file_exists($filterConfig)) include $filterConfig;
$dbConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'db.php'; if(file_exists($dbConfig)) include $dbConfig;
$cacheConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'cache.php'; if(file_exists($cacheConfig)) include $cacheConfig;
if($config->inContainer || $config->inQuickon) { $webRoot = getenv('ZT_WEB_ROOT') ? trim(getenv('ZT_WEB_ROOT'), '/') : ''; $config->installed = strtolower((string)getenv('ZT_INSTALLED')) == 'true'; $config->debug = (int)getenv('ZT_DEBUG'); $config->requestType = getenv('ZT_REQUEST_TYPE'); $config->timezone = getenv('ZT_TIMEZONE'); $config->db->driver = getenv('ZT_DB_DRIVER'); $config->db->host = getenv('ZT_DB_HOST'); $config->db->port = getenv('ZT_DB_PORT'); $config->db->name = getenv('ZT_DB_NAME'); $config->db->user = getenv('ZT_DB_USER'); $config->db->encoding = getenv('ZT_DB_ENCODING'); $config->db->password = getenv('ZT_DB_PASSWORD'); $config->db->prefix = getenv('ZT_DB_PREFIX'); $config->webRoot = $webRoot ? "/{$webRoot}/" : '/'; $config->default->lang = getenv('ZT_DEFAULT_LANG'); }
$myConfigRoot = (defined('RUN_MODE') and in_array(RUN_MODE, array('test', 'uitest'))) ? dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'test' . DIRECTORY_SEPARATOR . 'config' : dirname(__FILE__); $myConfig = $myConfigRoot . DIRECTORY_SEPARATOR . 'my.php'; if(file_exists($myConfig)) include $myConfig;
$zentaopmsConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'zentaopms.php'; if(file_exists($zentaopmsConfig)) include $zentaopmsConfig;
$actionsMapConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'actionsmap.php'; if(file_exists($actionsMapConfig)) include $actionsMapConfig;
$routesConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'routes.php'; if(file_exists($routesConfig)) include $routesConfig;
$extConfigFiles = glob(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'ext/*.php'); if($extConfigFiles) foreach($extConfigFiles as $extConfigFile) include $extConfigFile;
if($config->edition != 'open') { $config->version = $config->edition . $config->{$config->edition . 'Version'}; if($config->edition != 'max') unset($config->maxVersion); if($config->edition != 'ipd') unset($config->ipdVersion); } else { unset($config->bizVersion); unset($config->maxVersion); unset($config->ipdVersion); }
|