} if ($ppage == "") { $ppage = 0; } if ($limit_length == "") { $limit_length = 20; } if ($p_id == "" || $t_id == "") { sys_exit("参数错误"); } conProjDB($p_id, $t_id); $p_cname = $proj_data[p_cname]; $t_cname = $temp_data[$t_id][cname]; $nav_str .= " > <a href=templist.php?p_id={$p_id}>{$p_cname}</a> > {$t_cname}(文档列表)"; $fenlei_flag = 0; if (getTF('id', 'f_name') != "" && getTF('pid', 'f_name') != "" && getTF('cname', 'f_name') != "") { $fenlei_flag = 1; } $poly_list = ""; foreach ($poly_data as $pmid => $row) { $poly_list .= sprintf("<option value=\"%d\" %s>%s\n", $pmid, $poly == $pmid ? "selected" : "", $row[pm_name]); } $t_name = $temp_data[$t_id][t_name]; $field_tag = $temp_data[$t_id][field_tag]; if ($fenlei_flag) { $fenlei_nav_str = get_fenlei_nav($t_name, $parent_id); } $field_tag_name = array(); $field_tag_cname = array(); if (field_tag != "") { $sp = explode(",", $field_tag);
function getMultiPage($t_id) { global $proj_mysql; $sqlstr = sprintf("select arithmetic, f_name from tempdef where t_id=%d and type='Multi_Page'", $t_id); $res = mysql_query($sqlstr, $proj_mysql) or exit(mysql_error() . "\n" . $sqlstr . "\n"); $row = mysql_fetch_array($res, MYSQL_ASSOC); if($row == "") { printf("模板%d 没有Multi_Page模板域<br>\n", $t_id); return ""; } $arithmetic = $row[arithmetic]; $f_name = $row[f_name]; $this_TF = getTF($f_name, "f_name"); if($this_TF == "") { $error_message = sprintf("%s not found in TF.", $f_name); return ""; } $method = $this_TF[f_value]; $fieldname = readFieldData($arithmetic, "#fieldname"); if($fieldname == "") { $error_message = sprintf("fieldname not found in %s !", $arithmetic); return ""; } $length = readFieldData($arithmetic, "#length"); if($length == "") { $error_message = sprintf("length not found in %s !", $arithmetic); return ""; } $max_length = readFieldData($arithmetic, "#max_length"); if($max_length == "") { $error_message = sprintf("max_length not found in %s !", $arithmetic); return ""; } $mp = array(); $mp['length'] = $length; $mp['max_length'] = $max_length; $this_TF = getTF($fieldname, "cname"); if($this_TF == "") { $error_message = sprintf("%s not found in TF.", $fieldname); return ""; } $mp[cname] = $this_TF[cname]; $mp[f_name] = $this_TF[f_name]; $mp[data] = $this_TF[f_value]; $mp[method] = $method; // print_r($mp); return $mp; }