Changeset 104 for trunk/wp-content/plugins/xpressme/include
- Timestamp:
- Mar 13, 2009, 10:25:32 PM (16 years ago)
- Location:
- trunk/wp-content/plugins/xpressme/include
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/xpressme/include/xpress_common_functions.php
r100 r104 4 4 require_once dirname(dirname(dirname(dirname(dirname( __FILE__ ))))) .'/include/config_from_xoops.class.php' ; 5 5 $xoops_config = new ConfigFromXoops; 6 } 7 8 function get_xoops_config($config_name,$module_dir){ 9 global $xoops_db; 10 11 $modules_db = get_xoops_prefix() . 'modules'; 12 $config_db = get_xoops_prefix() . 'config'; 13 14 $moduleID = $xoops_db->get_var("SELECT mid FROM $modules_db WHERE dirname = '$module_dir'"); 15 if (empty($moduleID)) return null; 16 $conf_value = $xoops_db->get_var("SELECT conf_value FROM $config_db WHERE (conf_modid = $moduleID) AND (conf_name = '$config_name')"); 17 if (empty($conf_value)) return null; 18 return $conf_value; 6 19 } 7 20 … … 31 44 global $xoops_config; 32 45 $ret =$xoops_config->xoops_db_prefix . '_'; 46 return $ret; 47 } 48 49 function get_xoops_trust_path() 50 { 51 global $xoops_config; 52 $ret =$xoops_config->xoops_trust_path; 33 53 return $ret; 34 54 } … … 62 82 return $wp_db_version; 63 83 } 84 85 function is_xpress_mobile() 86 { 87 //ktai_style 88 if (function_exists('is_ktai')){ 89 if (is_ktai()) { 90 // $file_path = $GLOBALS['xoopsModuleConfig']["ktai_style_tmpdir"] . '/comments.php'; 91 return true; 92 } 93 } 94 95 //mobg 96 if (function_exists('is_mobile')) { 97 if (is_mobile()){ 98 return true; 99 } 100 } 101 if ( 102 preg_match("/DoCoMo/", $_SERVER['HTTP_USER_AGENT']) || 103 preg_match("/softbank/", $_SERVER['HTTP_USER_AGENT']) || 104 preg_match("/vodafone/", $_SERVER['HTTP_USER_AGENT']) || 105 preg_match("/J-PHONE/", $_SERVER['HTTP_USER_AGENT']) || 106 preg_match("/UP\.Browser/", $_SERVER['HTTP_USER_AGENT']) || 107 preg_match("/ASTEL/", $_SERVER['HTTP_USER_AGENT']) || 108 preg_match("/PDXGW/", $_SERVER['HTTP_USER_AGENT']) 109 ) 110 { 111 return true; 112 } else { 113 return false; 114 } 115 116 } 117 64 118 65 119 function is_block_cache_found($block_name)
Note: See TracChangeset
for help on using the changeset viewer.