function contentNameSort($content, $sType) { $splStr = ''; $arrayStr = aspArray(99); $fileName = ''; $isOther = ''; $otherStr = ''; $id = ''; $c = ''; $s = ''; $i = ''; $left1 = ''; $splStr = aspSplit($content, vbCrlf()); foreach ($splStr as $key => $s) { if ($s != '') { $fileName = getStrFileName($s); $isOther = true; $left1 = left($fileName, 1); if (inStr($fileName, '、') > 0) { $id = replace(left($fileName, 2), '、', ''); if (isNumber($id)) { $arrayStr[$id] = $arrayStr[$id] . $s . vbCrlf(); $isOther = false; } } if (inStr($sType, $left1) == false && $isOther == true) { $otherStr = $otherStr . $s . vbCrlf(); } } } for ($i = 0; $i <= uBound($arrayStr); $i++) { $c = $c . $arrayStr[$i]; } $contentNameSort = $c . $otherStr; return @$contentNameSort; }
function getFileName($filePath) { return getStrFileName($filePath); }