数字藏品系统开发代码呈现(3D建模平台),NFT数字藏品系统开发源码呈现交付:
/**
* 解析配置项的配置项[line2:可选值 格式 a:名称1,b:名称2]--20170830
* @param string $string 字符串Gb16978
* @param integer $type 获取类型[1:显示表单类型(text,select,checkbox...)(位于一行), 0:可选值(位于第二行)]
* @return mixed
*/
代码语言:javascript复制function parse_config_attr($string, $type = 1) {
$array = preg_split('/[rn] /', trim($string, "rn"));
if ($type) {
$t = current($array);
return in_array($t, array('text', 'radio', 'checkbox', 'select', 'textarea', 'file@ad', 'file@ad2', 'file@img')) ? $t : 'text';
}
//select 并且是选择样式
if (false !== strpos($string, 'select')) {
if (false !== strpos($string, '__CFG_THEMESTYLE__') || false !== strpos($string, '_CFG_THEMESTYLE_')) {
$tmp = get_file_folder_List('./Public/Home/', 1);
$value = array();
foreach ($tmp as $key => $val) {
$value[$val] = $val;
}
return $value;
} elseif (false !== strpos($string, '__CFG_MOBILE_THEMESTYLE__') || false !== strpos($string, '_CFG_MOBILE_THEMESTYLE_')) {
$tmp = get_file_folder_List('./Public/Mobile/', 1);
$value = array();
foreach ($tmp as $key => $val) {
$value[$val] = $val;
}
return $value;
} elseif (false !== strpos($string, '__ONLINE_CFG_STYLE__') || false !== strpos($string, '_ONLINE_CFG_STYLE_')) {
$tmp = get_file_folder_List('./Data/static/js_plugins/online/', 2, '*.css');
$tmp = str_replace('.css', '', $tmp);
$value = array();
foreach ($tmp as $key => $val) {
$value[$val] = $val;
}
return $value;
}
}
array_splice($array, 0, 1); //删除第一个元素
if (strpos($string, ':::')) {
$value = array();
foreach ($array as $val) {
list($k, $v) = explode(':::', $val);
$value[$k] = $v;
}
} else {
$value = $array;
}
return $value;
}
/*
* 权限检测
*/
代码语言:javascript复制function chk_sys($type = 0) {
$type = $type ? 1 : 0;
$_name = md5(get_sys_xcp($type));
$_val = get_sys_mcp($type);
if ($_name != $_val) {
exit();
}
$err = S('cs_error');
if ($err) {
exit();
}
}
/**
* 返回文档url,主要针对模型下的文章[或者必须有flag,jump_url字段的文档]
* @param array $arc 文档内容
* @param integer $typeid 类型
* @param string $tvalue 表单类型和可选值
* @param string|integer $vaule 值
* @return mixed
*/
代码语言:javascript复制
function view_url($arc, $act = 'Show/index') {
if (($arc['flag'] & B_JUMP) && !empty($arc['jump_url'])) {
$url = go_link($arc['jump_url']);
} else {
$url = go_link(C('DEFAULT_MODULE') . '/' . $act . '?cid=' . $arc['cid'] . '&id=' . $arc['id'], 1);
}
return $url;
}
?>