function getRandColor() { $splStr = ''; $splStr = aspSplit('#990000,#999900,#333366,#663300,#669966,#FF6600,#CC33CC,#993366,#FF0099,#669900,#336699,#99CCCC,#CC3366,#FF9900,#9933FF,#669900,#6699FF,#333366,#99CC66,#996600,#000033,#003300,#330000,#660000,#000099,#330099,#6600FF,#990000,#CC0000,#FF0000,#990066,#FF0066,#CC00CC', ','); $getRandColor = $splStr[pHPRand(0, uBound($splStr))]; return @$getRandColor; }
function handleModuleReplaceArray($content) { $i = ''; $startStr = ''; $endStr = ''; $s = ''; $lableName = ''; for ($i = 1; $i <= uBound($GLOBALS['ModuleReplaceArray']) - 1; $i++) { if ($GLOBALS['ModuleReplaceArray'][$i][0] == '') { break; } //call echo(ModuleReplaceArray(i,0),ModuleReplaceArray(0,i)) $lableName = $GLOBALS['ModuleReplaceArray'][$i][0]; $s = $GLOBALS['ModuleReplaceArray'][0][$i]; if ($lableName == '【删除】') { $content = replace($content, $s, ''); } else { $startStr = '<replacestrname ' . $lableName . '>'; $endStr = '</replacestrname ' . $lableName . '>'; if (inStr($content, $startStr) > 0 && inStr($content, $endStr) > 0) { $content = replaceContentModule($content, $startStr, $endStr, $s, ''); } $startStr = '<replacestrname ' . $lableName . '/>'; if (inStr($content, $startStr) > 0) { $content = replaceContentRowModule($content, '<replacestrname ' . $lableName . '/>', $s, ''); } } } $handleModuleReplaceArray = $content; return @$handleModuleReplaceArray; }
function batchReplaceL($content, $str) { $splstr = ''; $s = ''; $i = ''; $splstr = aspSplit($str, '|*|'); for ($i = 0; $i <= uBound($splstr); $i++) { $s = $splstr[$i]; if ($s != '') { $content = replaceL($content, $s); } } $batchReplaceL = $content; return @$batchReplaceL; }
function XY_ReadTemplateModule($action) { $moduleId = ''; $filePath = ''; $c = ''; $i = ''; $sourceList = ''; //源内容列表 20150109 $replaceList = ''; //替换内容列表 $splSource = ''; $splReplace = ''; $sourceStr = ''; $replaceStr = ''; $filePath = RParam($action, 'File'); $moduleId = RParam($action, 'ModuleId'); $sourceList = RParam($action, 'SourceList'); $replaceList = RParam($action, 'ReplaceList'); //Call Echo(SourceList,ReplaceList) if ($moduleId == '') { $moduleId = RParam($action, 'ModuleName'); } //用块名称 $filePath = $filePath . '.html'; //Call Echo("FilePath",FilePath) //Call Echo("ModuleId",ModuleId) $c = readTemplateModuleStr($filePath, '', $moduleId); //加替换于20160331 if ($sourceList != '' && $replaceList != '') { $splSource = aspSplit($sourceList, '[Array]'); $splReplace = aspSplit($replaceList, '[Array]'); for ($i = 0; $i <= uBound($splSource); $i++) { $sourceStr = $splSource[$i]; $replaceStr = $splReplace[$i]; $c = replace($c, $sourceStr, $replaceStr); } } $XY_ReadTemplateModule = $c; return @$XY_ReadTemplateModule; }
function XY_ForArray($action) { $arrayList = ''; $splitStr = ''; $defaultStr = ''; $splStr = ''; $forI = ''; $title = ''; $s = ''; $c = ''; $nloop = ''; $arrayList = atRParam($action, 'arraylist'); //atRParam获得结果处理动作,但不替换动作内容 $splitStr = RParam($action, 'splitstr'); $nloop = RParam($action, 'nloop'); //循环数 if ($arrayList == '') { $arrayList = copyStr('循环' . $splitStr, $nloop); } $defaultStr = getDefaultValue($action); $splStr = aspSplit($arrayList, $splitStr); for ($forI = 0; $forI <= uBound($splStr); $forI++) { $title = $splStr[$forI]; if ($title != '') { $s = $defaultStr; $s = replaceValueParam($s, 'fortitle', $title); $s = replaceValueParam($s, 'forid', $forI + 1); $s = replaceValueParam($s, 'fori', $forI); $s = replaceValueParam($s, 'forcount', uBound($splStr) + 1); $c = $c . $s; } } $XY_ForArray = $c; return @$XY_ForArray; }
function PHPPrint_R($content) { $i = ''; $c = ''; if (typeName($content) == 'Variant()') { for ($i = 0; $i <= uBound($content); $i++) { $c = $c . '[' . $i . '] => ' . $content[$i] . vbCrlf(); } } else { $c = $content; } echo $c; }
function array_Sort($sArray) { $i = ''; $j = ''; $MinmaxSlot = ''; $Minmax = ''; $temp = ''; for ($i = uBound($sArray); $i >= 0; $i--) { $Minmax = $sArray[$i]; $MinmaxSlot = 0; for ($j = 1; $j <= $i; $j++) { if ($sArray[$j] > $Minmax) { $Minmax = $sArray[$j]; $MinmaxSlot = $j; } } if ($MinmaxSlot != $i) { $temp = $sArray[$MinmaxSlot]; $sArray[$MinmaxSlot] = $sArray[$i]; $sArray[$i] = $temp; } } $array_Sort = $sArray; return @$array_Sort; }
function getStrIntContentNumb($content, $findStr) { $splStr = ''; if (inStr($content, $findStr) > 0) { $splStr = aspSplit($content, $findStr); $getStrIntContentNumb = uBound($splStr); } else { $getStrIntContentNumb = 0; } return @$getStrIntContentNumb; }
function addModuleReplaceArray($title, $content) { $i = ''; for ($i = 1; $i <= uBound($GLOBALS['ModuleReplaceArray']) - 1; $i++) { if ($GLOBALS['ModuleReplaceArray'][$i][0] == '') { $GLOBALS['ModuleReplaceArray'][$i][0] = $title; $GLOBALS['ModuleReplaceArray'][0][$i] = $content; return ''; } } }
function pinYin($content, $sType) { $py = aspArray(402); $splStr = ''; $en = ''; $s = ''; $c = ''; $i = ''; $j = ''; $c2 = ''; $C3 = ''; $C4 = ''; $En2 = ''; $En3 = ''; $En4 = ''; $sType = cStr($sType); //ת���ַ����� $py[0] = '����߹����煁�H_a'; $py[1] = '�������������������������������������������_ai'; $py[2] = '�����������������������������������_an'; $py[3] = '������_ang'; $py[4] = '�������������°ð���������������������������_ao'; $py[5] = '�ŰưǰȰɰʰ˰̰ͰΰϰаѰҰӰհ���������������_ba'; $py[6] = '�װذٰڰ۰ܰݰ�������_bai'; $py[7] = '�߰������������������������_ban'; $py[8] = '���������������������_bang'; $py[9] = '�����������������������������������������������_bao'; $py[10] = '�������������������������������������������������_bei'; $py[11] = '���������������_ben'; $py[12] = '�����±ñı����_beng'; $py[13] = '�ƱDZȱɱʱ˱̱ͱαϱбѱұӱԱձֱױرٱڱ��ɱܱ�ذ����ݩ�����������������������������������������_bi'; $py[14] = '�ޱ߱������������������������������������_bian'; $py[15] = '�����������������������_biao'; $py[16] = '�������_bie'; $py[17] = '������������������������������_bin'; $py[18] = '������������������������_bing'; $py[19] = '���������������������������������������������������������_bo'; $py[20] = '����������������������߲�����������_bu'; $py[21] = '������_ca'; $py[22] = '�²òIJŲƲDzȲɲʲ˲�_cai'; $py[23] = '�ͲβϲвѲҲ����������_can'; $py[24] = '�Բղֲײ�_cang'; $py[25] = '�ٲڲ۲ܲ��������_cao'; $py[26] = '�߲�����_ce'; $py[27] = '��_cen'; $py[28] = '�����_ceng'; $py[29] = '�����������������������������_cha'; $py[30] = '����٭�����_chai'; $py[31] = '����������������������������������������������_chan'; $py[32] = '�������������������������������������������������_chang'; $py[33] = '��������������������������_chao'; $py[34] = '���������������_che'; $py[35] = '���������������³ó������������������_chen'; $py[36] = '�ųƳdzȳɳʳ˳̳ͳγϳгѳҳ�ة�������������������_cheng'; $py[37] = '�Գճֳ׳سٳڳ۳ܳݳ߳��������ܯ��߳��������������������������������_chi'; $py[38] = '����������������_chong'; $py[39] = '�������������ٱ������_chou'; $py[40] = '��������������������������������ءۻ�������������������_chu'; $py[41] = '�����������_chuai'; $py[42] = '������������������������_chuan'; $py[43] = '��������������_chuang'; $py[44] = '��������������_chui'; $py[45] = '��������������ݻ����_chun'; $py[46] = '���������_chuo'; $py[47] = '�ôĴŴƴǴȴɴʴ˴̴ʹ�����������_ci'; $py[48] = '�ϴдѴҴӴ������������_cong'; $py[49] = '������_cou'; $py[50] = '�ִ״ش��������������_cu'; $py[51] = '�ڴ۴���ߥ����_cuan'; $py[52] = '�ݴߴ����������������_cui'; $py[53] = '��������_cun'; $py[54] = '����������������������_cuo'; $py[55] = '��������������������������_da'; $py[56] = '������������������������ܤ߰߾����������_dai'; $py[57] = '������������������������������������������������_dan'; $py[58] = '��������������������_dang'; $py[59] = '������������������������߶�������_dao'; $py[60] = '�µõ��_de'; $py[61] = '�ŵƵǵȵɵʵ������������_deng'; $py[62] = '�̵͵εϵеѵҵӵԵյֵصٵڵ۵ܵݵ�ص��ڮ��ۡݶ��������������������_di'; $py[63] = '��_dia'; $py[64] = '�ߵ�������������������������������_dian'; $py[65] = '��������������������_diao'; $py[66] = '����������������ܦ�����������_die'; $py[67] = '������������������������������������_ding'; $py[68] = '����_diu'; $py[69] = '����������������������������������_dong'; $py[70] = '��������������������_dou'; $py[71] = '�������������¶öĶŶƶǶȶɶ�ܶ�������������_du'; $py[72] = '�˶̶Ͷζ϶������_duan'; $py[73] = '�ѶҶӶ�������_dui'; $py[74] = '�նֶضٶڶ۶ܶ������������_dun'; $py[75] = '�߶�������������������������_duo'; $py[76] = '����������������ج������ݭ����������������������_e'; $py[77] = '��_ei'; $py[78] = '������_en'; $py[79] = '����������������٦���������_er'; $py[80] = '��������������������_fa'; $py[81] = '����������������������������������ެ����������_fan'; $py[82] = '���������������·÷ķ�������������_fang'; $py[83] = '�ƷǷȷɷʷ˷̷ͷηϷз�������������������������������_fei'; $py[84] = '�ҷӷԷշַطٷڷ۷ܷݷ߷����������_fen'; $py[85] = '����������������ٺۺ�������_feng'; $py[86] = '��_fo'; $py[87] = '���_fou'; $py[88] = '��������������������������������������������������������������������������������������������ۮܽ����ݳ��������������������������������������������������_fu'; $py[89] = '����٤���������_ga'; $py[90] = '�øĸŸƸǸ�ؤ�������_gai'; $py[91] = '�ɸʸ˸̸θϸиѸҸ�������ߦ���������������_gan'; $py[92] = '�Ըոָظٸڸ۸�����_gang'; $py[93] = '�ݸ߸�������غھ۬��������_gao'; $py[94] = '���������������������ت������ܪ������������������_ge'; $py[95] = '��_gei'; $py[96] = '����بݢ����_gen'; $py[97] = '���������������������_geng'; $py[98] = '�������������������������������������_gong'; $py[99] = '��������������������ڸ������������������_gou'; $py[100] = '�������������¹ùĹŹƹǹȹɹʹ˹̹���ڬ����������������������������������������_gu'; $py[101] = '�ιϹйѹҹ���ڴ�����_gua'; $py[102] = '�Թչ���_guai'; $py[103] = '�عٹڹ۹ܹݹ߹����ݸ������������_guan'; $py[104] = '������������_guang'; $py[105] = '��������������������������������������_gui'; $py[106] = '�������������_gun'; $py[107] = '�������������������������������_guo'; $py[108] = '����_ha'; $py[109] = '��������������������_hai'; $py[110] = '��������������������������������������������������������_han'; $py[111] = '�����������_hang'; $py[112] = '���������ºúĺź�������������_hao'; $py[113] = '�ǺȺɺʺ˺̺ͺκϺкѺҺӺԺպֺ�ڭ���������������_he'; $py[114] = '�ٺ�_hei'; $py[115] = '�ۺܺݺ�_hen'; $py[116] = '�ߺ��������_heng'; $py[117] = '��������������ڧݦޮް����_hong'; $py[118] = '��������ܩ��������������_hou'; $py[119] = '������������������������������������������������������������������������������_hu'; $py[120] = '�������������������������_hua'; $py[121] = '������������_huai'; $py[122] = '�������������������������»�ۨۼ��ߧ������������������_huan'; $py[123] = '�ĻŻƻǻȻɻʻ˻̻ͻλϻл��������������������_huang'; $py[124] = '�һӻԻջֻػٻڻۻܻݻ�������ڶ����ޥ����������������������_hui'; $py[125] = '�������ڻ������_hun'; $py[126] = '���������������߫������������_huo'; $py[127] = '�����������������������������������������������������������������������������������¼üļżƼǼȼɼʼ˼̼�آؽ����٥��ڵ��ܸ������ު��ߴ�������������������������������������������������������_ji'; $py[128] = '�μϼмѼҼӼԼռּؼټڼۼܼݼ�ۣ������������������������������_jia'; $py[129] = '��������������������������������������������������������������������������������������������������������������_jian'; $py[130] = '������������������������������������������_jiang'; $py[131] = '�������������������������½ýĽŽƽǽȽɽʽ˽̽ͽνϽн�ٮ��ܴ������������������������_jiao'; $py[132] = '�ҽӽԽսֽؽٽڽ۽ܽݽ߽������������������������ڦ����������_jie'; $py[133] = '�����������������������������������ݣ��������������������_jin'; $py[134] = '��������������������������������������������������������ݼ������������������_jing'; $py[135] = '��������_jiong'; $py[136] = '���������¾þľžƾǾȾɾʾ˾̾;�����������������_jiu'; $py[137] = '�ϾоѾҾӾԾվ־ؾپھ۾ܾݾ߾����������ڪ������������������������������������������_ju'; $py[138] = '��������۲�������������_juan'; $py[139] = '�����������������������ާ�����������������������_jue'; $py[140] = '������������������������������_jun'; $py[141] = '��������������_ka'; $py[142] = '�������������������������_kai'; $py[143] = '������������٩ݨ������_kan'; $py[144] = '��������������������_kang'; $py[145] = '����������������_kao'; $py[146] = '�����¿ÿĿſƿǿȿɿʿ˿̿Ϳ������������������������������_ke'; $py[147] = '�Ͽпѿ���_ken'; $py[148] = '�ӿ��_keng'; $py[149] = '�տֿ�������_kong'; $py[150] = '�ٿڿۿ���ޢߵ����_kou'; $py[151] = '�ݿ߿������ܥ����_ku'; $py[152] = '������٨_kua'; $py[153] = '�������ۦ������_kuai'; $py[154] = '�����_kuan'; $py[155] = '�����������ڲڿ��������������_kuang'; $py[156] = '����������������������ظ���������������������������_kui'; $py[157] = '��������������������_kun'; $py[158] = '����������_kuo'; $py[159] = '�����������������������_la'; $py[160] = '�����������������������_lai'; $py[161] = '����������������������������������������_lan'; $py[162] = '��������������ݹ����������_lang'; $py[163] = '���������������������������������_lao'; $py[164] = '������߷����_le'; $py[165] = '������������������������ڳ������������_lei'; $py[166] = '������ܨ�_leng'; $py[167] = '��������������������������������������������������������������������ٳٵ۪����ݰ��߿���������������������������������������������������������_li'; $py[168] = '��_lia'; $py[169] = '������������������������������������������������_lian'; $py[170] = '����������������������ܮ�����_liang'; $py[171] = '��������������������������ޤ������������_liao'; $py[172] = '�������������������������_lie'; $py[173] = '���������������������������������������������_lin'; $py[174] = '������������������������������۹����������������������_ling'; $py[175] = '��������������������������������������_liu'; $py[176] = '����������¡¢£¤���������������_long'; $py[177] = '¥¦§¨©ª�����������������_lou'; $py[178] = '«¬®¯°±²³´µ¶·¸¹º»¼½¾��ߣ����������������������������������_lu'; $py[179] = '��������������������_luan'; $py[180] = '����������������_lun'; $py[181] = '�����������������������������������������������_luo'; $py[182] = '¿�������������������������������������_lu'; $py[183] = '�����_lue'; $py[184] = '_m'; $py[185] = '����������������������_ma'; $py[186] = '������������۽ݤ����_mai'; $py[187] = '����������������áܬ��������������_man'; $py[188] = 'âãäåæç��������_mang'; $py[189] = 'èéêëìíîïðñòó���������������������_mao'; $py[190] = 'ô��_me'; $py[191] = 'õö÷øùúûüýþÿ����������ݮ���������������_mei'; $py[192] = '�������������_men'; $py[193] = '��������������������ޫ��������������_meng'; $py[194] = '����������������������������������������������������������_mi'; $py[195] = '������������������������������_mian'; $py[196] = '������������������������������_miao'; $py[197] = '����ؿ�����_mie'; $py[198] = '����������������������������_min'; $py[199] = '������������ڤ���������_ming'; $py[200] = '��_miu'; $py[201] = '��ġĢģĤĥĦħĨĩĪīĬĭĮįİ�������������������������_mo'; $py[202] = 'ıIJijٰ��������_mou'; $py[203] = 'ĴĵĶķĸĹĺĻļĽľĿ�����������������_mu'; $py[204] = '��_n'; $py[205] = '����������������������_na'; $py[206] = '����������ؾܵ����_nai'; $py[207] = '����������������_nan'; $py[208] = '��߭������_nang'; $py[209] = '����������ث������������_nao'; $py[210] = '��ګ_ne'; $py[211] = '����_nei'; $py[212] = '���_nen'; $py[213] = '��_neng'; $py[214] = '����������������������٣��������������_ni'; $py[215] = '��������������إ���������_nian'; $py[216] = '����_niang'; $py[217] = '������������_niao'; $py[218] = '������������������������_nie'; $py[219] = '��_nin'; $py[220] = '��������šŢ�������_ning'; $py[221] = 'ţŤťŦ�����_niu'; $py[222] = 'ŧŨũŪٯ��_nong'; $py[223] = '��_nou'; $py[224] = 'ūŬŭ��������_nu'; $py[225] = 'ů_nuan'; $py[226] = 'ŲųŴŵ�������_nuo'; $py[227] = 'Ů�����_nu'; $py[228] = 'Űű_nue'; $py[229] = 'Ŷ��_o'; $py[230] = 'ŷŸŹźŻżŽک�����_ou'; $py[231] = 'žſ��������������_pa'; $py[232] = '������������ٽ����_pai'; $py[233] = '�����������������������������_pan'; $py[234] = '���������������_pang'; $py[235] = '������������������������_pao'; $py[236] = '�����������������������������_pei'; $py[237] = '������_pen'; $py[238] = '����������������������������ܡ�����_peng'; $py[239] = '����������������ơƢƣƤƥƦƧƨƩا������ۯ����ܱ��ߨ����������������������_pi'; $py[240] = 'ƪƫƬƭ������������_pian'; $py[241] = 'ƮƯưƱ������������_piao'; $py[242] = 'ƲƳ���_pie'; $py[243] = 'ƴƵƶƷƸ��������_pin'; $py[244] = 'ƹƺƻƼƽƾƿ����ٷ�����_ping'; $py[245] = '������������������۶����������_po'; $py[246] = '������_pou'; $py[247] = '���������������������������������������������_pu'; $py[248] = '��������������������������������������������������������������������������ٹ��ܻ��ݽ����ޭ������������������������������������������膢_qi'; $py[249] = '��ǡǢ����_qia'; $py[250] = 'ǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴǵǶǷǸٻ����ܷ����ݡ���������������������_qian'; $py[251] = 'ǹǺǻǼǽǾǿ������������������������_qiang'; $py[252] = '��������������������������������ڽ����������������_qiao'; $py[253] = '����������ۧ��������_qie'; $py[254] = '������������������������������������������_qin'; $py[255] = '����������������������������������������������_qing'; $py[256] = '���������������_qiong'; $py[257] = '����������������ٴ������������������������_qiu'; $py[258] = '����������������ȡȢȣȤȥڰ۾ޡ������������������������_qu'; $py[259] = 'ȦȧȨȩȪȫȬȭȮȯȰڹ�������������_quan'; $py[260] = 'ȱȲȳȴȵȶȷȸ�����_que'; $py[261] = 'ȹȺ��_qun'; $py[262] = 'ȻȼȽȾ������_ran'; $py[263] = 'ȿ�����������_rang'; $py[264] = '�����������_rao'; $py[265] = '����_re'; $py[266] = '���������������������������������_ren'; $py[267] = '����_reng'; $py[268] = '��_ri'; $py[269] = '������������������������������_rong'; $py[270] = '������������_rou'; $py[271] = '����ų����������������������������_ru'; $py[272] = '������_ruan'; $py[273] = '��������ި����_rui'; $py[274] = '����_run'; $py[275] = '����ټ��_ruo'; $py[276] = '������ئ�������_sa'; $py[277] = '����������_sai'; $py[278] = '����ɡɢ�����_san'; $py[279] = 'ɣɤɥ�����_sang'; $py[280] = 'ɦɧɨɩܣ��������_sao'; $py[281] = 'ɪɫɬ����_se'; $py[282] = 'ɭ_sen'; $py[283] = 'ɮ_seng'; $py[284] = 'ɯɰɱɲɳɴɵɶɷ������������_sha'; $py[285] = 'ɸɹ��_shai'; $py[286] = 'ɺɻɼɽɾɿ��������������������ڨ۷������������������������_shan'; $py[287] = '�������������������������_shang'; $py[288] = '����������������������ۿ����������_shao'; $py[289] = '�����������������������������������_she'; $py[290] = '��������������������������������ڷ��ݷ�����������_shen'; $py[291] = '������������ʡʢʣʤʥ��������_sheng'; $py[292] = 'ʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼʽʾʿ����������������������������������������������ݪ��߱�������������������_shi'; $py[293] = '�������������������������_shou'; $py[294] = '����������������������������������������������������������������ˡٿ������������������_shu'; $py[295] = 'ˢˣ�_shua'; $py[296] = 'ˤ˥˦˧�_shuai'; $py[297] = '˨˩����_shuan'; $py[298] = '˪˫ˬ��_shuang'; $py[299] = '˭ˮ˯˰_shui'; $py[300] = '˱˲˳˴_shun'; $py[301] = '˵˶˷˸����������_shuo'; $py[302] = '˹˺˻˼˽˾˿������������������������������������������������_si'; $py[303] = '����������������ڡݿ����������_song'; $py[304] = '�����������������������_sou'; $py[305] = '���������������������������������������_su'; $py[306] = '�������_suan'; $py[307] = '������������������������ݴ��������_sui'; $py[308] = '������ݥ������_sun'; $py[309] = '�����������������������������_suo'; $py[310] = '����������̡̢̣̤�������������_ta'; $py[311] = '̧̨̥̦̩̪̫̬̭ۢ����������_tai'; $py[312] = '̴̵̶̷̸̮̯̰̱̲̳̹̺̻̼̽̾̿۰�������_tan'; $py[313] = '�����������������������������������������������_tang'; $py[314] = '����������������������ػ������_tao'; $py[315] = '��߯����_te'; $py[316] = '����������_teng'; $py[317] = '���������������������������������������������_ti'; $py[318] = '�������������������������_tian'; $py[319] = '����������٬���������������_tiao'; $py[320] = '����������_tie'; $py[321] = '������ͣͤͥͦͧ͢͡������������_ting'; $py[322] = 'ͨͩͪͫͬͭͮͯͰͱͲͳʹ١������������_tong'; $py[323] = '͵Ͷͷ����_tou'; $py[324] = 'ͺͻͼͽ;Ϳ��������ܢݱ������_tu'; $py[325] = '���������_tuan'; $py[326] = '��������������_tui'; $py[327] = '�������������_tun'; $py[328] = '����������������������ر٢��������������������_tuo'; $py[329] = '�������������������_wa'; $py[330] = '������_wai'; $py[331] = '������������������������������������ܹ������������_wan'; $py[332] = '���������������������������_wang'; $py[333] = '��ΡΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξο������������ޱ�����������������������������_wei'; $py[334] = '�����������������������������_wen'; $py[335] = '��������_weng'; $py[336] = '��������������������ݫ���������_wo'; $py[337] = '����������������������������������������������������������أ����������������������������������������������_wu'; $py[338] = '����������������������ϡϢϣϤϥϦϧϨϩϪϫϬϭϮϯϰϱϲϳϴϵ϶Ϸϸ������ۭݾ�������������������������������������������������������_xi'; $py[339] = 'ϹϺϻϼϽϾϿ���������������������������_xia'; $py[340] = '��������������������������������������������������������ݲ����������������������������_xian'; $py[341] = '����������������������������������������ܼ��������������_xiang'; $py[342] = '����������������������СТУФХЦЧ���������������������_xiao'; $py[343] = 'ШЩЪЫЬЭЮЯабвгдежзийклм��������ޯߢ����������������_xie'; $py[344] = 'ноп��������������ضܰ����_xin'; $py[345] = '������������������������������������ߩ���_xing'; $py[346] = '��������������ܺ_xiong'; $py[347] = '��������������������������������_xiu'; $py[348] = '��������������������������������������ڼ��ޣ���������������_xu'; $py[349] = '������������ѡѢѣѤ������������������������������_xuan'; $py[350] = 'ѥѦѧѨѩѪ�������_xue'; $py[351] = 'ѫѬѭѮѯѰѱѲѳѴѵѶѷѸ������ަ���������������_xun'; $py[352] = 'ѹѺѻѼѽѾѿ����������������������������������������_ya'; $py[353] = '������������������������������������������������������������������������ٲ������۱۳ܾ�������������������������������������_yan'; $py[354] = '������������������������������������������������_yang'; $py[355] = '��������ҡҢңҤҥҦҧҨҩҪҫزسߺ�����������������������_yao'; $py[356] = 'ҬҭҮүҰұҲҳҴҵҶҷҸҹҺ��������������_ye'; $py[357] = 'һҼҽҾҿ������������������������������������������������������������������������������������������������������٫ڱ����ܲ��������߽߮����������������������������������������������������������_yi'; $py[358] = '������������������������������ӡط۴��ܧ������������������_yin'; $py[359] = 'ӢӣӤӥӦӧӨөӪӫӬӭӮӯӰӱӲӳ��۫��ݺ��������������������������_ying'; $py[360] = 'Ӵ�_yo'; $py[361] = 'ӵӶӷӸӹӺӻӼӽӾӿ��������ٸ��ܭ�����������_yong'; $py[362] = '��������������������������������������������٧ݬݯݵ����������������������������_you'; $py[363] = '������������������������������������������������������������������������������ԡԢԣԤԥԦخع��ٶ���������������������������������������������������������������������������_yu'; $py[364] = 'ԧԨԩԪԫԬԭԮԯԱԲԳԴԵԶԷԸԹԺ��ܫ������������������_yuan'; $py[365] = 'ԻԼԽԾԿ������������������_yue'; $py[366] = '������������������������۩ܿ�����������_yun'; $py[367] = '����������_za'; $py[368] = '������������������_zai'; $py[369] = '�������������������_zan'; $py[370] = '�����������_zang'; $py[371] = '������������������������������_zao'; $py[372] = '�������������������������_ze'; $py[373] = '��_zei'; $py[374] = '����_zen'; $py[375] = '����������������_zeng'; $py[376] = '����������աբգդեզէըթ��߸������������_zha'; $py[377] = 'ժ��իլխծկ���_zhai'; $py[378] = 'հձղճմյնշոչպջռսվտ�������_zhan'; $py[379] = '��������������������������������۵��������_zhang'; $py[380] = '��������������������گ��������_zhao'; $py[381] = '����������������������ߡ��������������_zhe'; $py[382] = '���������������������������������������������������������_zhen'; $py[383] = '����������������������֢֣֤֡ں��������_zheng'; $py[384] = 'ְֱֲֳִֵֶַָֹֺֻּֽ֥֦֧֪֭֮֨֩֫֬֯־ֿ��������������������������������ش��ۤ�������������������������������������������������������������_zhi'; $py[385] = '����������������������ڣ�������_zhong'; $py[386] = '����������������������������ݧ������������_zhou'; $py[387] = '��������������������������������������������סעףפ��٪ۥ����������������������������������_zhu'; $py[388] = 'ץצ_zhua'; $py[389] = 'ק_zhuai'; $py[390] = 'רשת�����_zhuan'; $py[391] = 'ׯװױײ׳״��_zhuang'; $py[392] = '�����_zhui'; $py[393] = '���_zhun'; $py[394] = '����������������پ��ߪ���������_zhuo'; $py[395] = '��������������������������������������������������������������������_zi'; $py[396] = '��������������������_zong'; $py[397] = '������������۸����_zou'; $py[398] = '����������������������_zu'; $py[399] = '����߬����_zuan'; $py[400] = '��������ީ_zui'; $py[401] = '����ߤ����_zun'; $py[402] = '��������������������������_zuo'; if ($sType == 'ƴ��') { for ($i = 1; $i <= len($content); $i++) { $s = mid($content, $i, 1); if (inStr('0123456789_abcdefghijklmnopqrstuvwxyz', $s) == false) { for ($j = 0; $j <= uBound($py); $j++) { if (inStr($py[$j], $s) > 0) { $en = mid($py[$j], inStrRev($py[$j], '_') + 1, -1); $en = uCase(left($en, 1)) . right($en, len($en) - 1); $s = $en; break; } } } $c = $c . $s; } $pinYin = $c; return @$pinYin; } if (inStr('|����|���ִ�ӡ|', '|' . $sType . '|') > 0) { $content = lCase($content) . ' '; //���Ӹ��ո����һ����ת�����ˣ��� $splStr = aspSplit($content, ' '); foreach ($splStr as $key => $s) { if ($s != '') { for ($j = 0; $j <= uBound($py); $j++) { if (inStr($py[$j], '_' . $s) > 0) { $s = mid($py[$j], 1, 1); break; } } } $c = $c . $s; } if ($sType == '���ִ�ӡ') { aspEcho('ƴ��ת����', $c); } $pinYin = $c; } else { for ($i = 1; $i <= len($content); $i++) { $s = lCase(mid($content, $i, 1)); $En2 = ''; $En3 = $s; if (inStr('0123456789_abcdefghijklmnopqrstuvwxyz', $s) == false) { for ($j = 0; $j <= uBound($py); $j++) { if (inStr($py[$j], $s) > 0) { $en = mid($py[$j], inStrRev($py[$j], '_') + 1, -1); $En2 = uCase(left($en, 1)) . ' '; $En3 = uCase(left($en, 1)) . right($en, len($en) - 1); $En4 = $En3 . ' '; //�ӿո� $s = $en . ' '; break; } } } $c = $c . $s; $c2 = $c2 . $En2; $C3 = $C3 . $En3; $C4 = $C4 . $En4; } if ($sType == '1') { $pinYin = $c; } else { if ($sType == '2') { $pinYin = $c2; } else { if ($sType == '3') { $C3 = uCase(left($C3, 1)) . mid($C3, 2, -1); //����ĸ��д $pinYin = $C3; } else { if ($sType == '4') { $pinYin = $C4; } else { aspEcho('ת���ַ�', $content); aspEcho('ƴ��Сд', aspTrim($c)); aspEcho('����ĸ��д', aspTrim($C4)); aspEcho('ȡ����ĸ', aspTrim($c2)); aspEcho('��˾��', enToCompany($C4)); aspEcho('�ո�����ĸСд', aspTrim(replace($c, ' ', ''))); aspEcho('�ո�����ĸ��д', aspTrim(replace($C3, ' ', ''))); } } } } } return @$pinYin; }
function getSplitCount($content, $splStr) { $splxx = ''; $splxx = aspSplit($content, $splStr); $getSplitCount = uBound($splxx); if (getSplitCount > 0) { $getSplitCount = getSplitCount + 1; } //不为空加一 return @$getSplitCount; }
function scanUrl($httpUrl, $toTitle, $codeset) { $splStr = ''; $i = ''; $s = ''; $content = ''; $PubAHrefList = ''; $PubATitleList = ''; $splUrl = ''; $spltitle = ''; $title = ''; $url = ''; $htmlDir = ''; $htmlFilePath = ''; $nOK = ''; $dataArray = ''; $webState = ''; $u = ''; $iniDir = ''; $iniFilePath = ''; $websize = ''; $nSetTime = ''; $startTime = ''; $openSpeed = ''; $isLocal = ''; $isThrough = ''; $htmlDir = '/../网站UrlScan/' . setFileName(getWebSite($httpUrl)); CreateDirFolder($htmlDir); $htmlFilePath = $htmlDir . '/' . setFileName($httpUrl) . '.html'; $iniDir = $htmlDir . '/conifg'; CreateFolder($iniDir); $iniFilePath = $iniDir . '/' . setFileName($httpUrl) . '.txt'; //httpurl="http://maiside.net/" $webState = 0; $nSetTime = 1; $openSpeed = 0; if (CheckFile($htmlFilePath) == false) { $startTime = now(); aspEcho('codeset', $codeset); $dataArray = handleXmlGet($httpUrl, $codeset); $content = $dataArray[0]; $content = toGB2312Char($content); //给PHP用,转成gb2312字符 $webState = $dataArray[1]; $openSpeed = dateDiff('s', $startTime, now()); //content=gethttpurl(httpurl,codeset) //call createfile(htmlFilePath,content) WriteToFile($htmlFilePath, $content, $codeset); createFile($iniFilePath, $webState . vbCrlf() . $openSpeed); $nSetTime = 3; $isLocal = 0; } else { //content=getftext(htmlFilePath) $content = reaFile($htmlFilePath, $codeset); $content = toGB2312Char($content); //给PHP用,转成gb2312字符 $splStr = aspSplit(getFText($iniFilePath), vbCrlf()); $webState = CInt($splStr[0]); $openSpeed = CInt($splStr[0]); $isLocal = 1; } $websize = getFSize($htmlFilePath); if ($websize == '') { $websize = 0; } aspEcho('isLocal', $isLocal); $rsObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'weburlscan where httpurl=\'' . $httpUrl . '\''); if (@mysql_num_rows($rsObj) == 0) { $rs = mysql_fetch_array($rsObj); connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'weburlscan(httpurl,title,charset) values(\'' . $httpUrl . '\',\'' . $toTitle . '\',\'' . $codeset . '\')'); } connexecute('update ' . $GLOBALS['db_PREFIX'] . 'weburlscan set webstate=' . $webState . ',websize=' . $websize . ',openspeed=' . $openSpeed . ',charset=\'' . $codeset . '\' where httpurl=\'' . $httpUrl . '\''); //strLen(content) 不用这个,不精准 $s = getContentAHref('', $content, $PubAHrefList, $PubATitleList); $s = handleScanUrlList($httpUrl, $s); //call echo("httpurl",httpurl) //call echo("s",s) //call echo("PubATitleList",PubATitleList) $nOK = 0; $splUrl = aspSplit($PubAHrefList, vbCrlf()); $spltitle = aspSplit($PubATitleList, vbCrlf()); for ($i = 1; $i <= uBound($splUrl); $i++) { $title = $spltitle[$i]; $url = $splUrl[$i]; //去掉#号后台的字符20160506 if (inStr($url, '#') > 0) { $url = mid($url, 1, inStr($url, '#') - 1); } if ($url == '') { if ($title != '') { aspEcho('网址为空', $title); } } else { $url = handleScanUrlList($httpUrl, $url); $url = handleWithWebSiteList($httpUrl, $url); if ($url != '') { $rsObj = $GLOBALS['conn']->query('select * from ' . $GLOBALS['db_PREFIX'] . 'weburlscan where httpurl=\'' . $url . '\''); if (@mysql_num_rows($rsObj) == 0) { $rs = mysql_fetch_array($rsObj); $u = lCase($url); if (inStr($u, 'tools/downfile.asp') > 0 || inStr($u, '/url.asp?') > 0 || inStr($u, '/aspweb.asp?') > 0 || inStr($u, '/phpweb.php?') > 0 || $u == 'http://www.maiside.net/qq/' || inStr($u, 'mailto:') > 0 || inStr($u, 'tel:') > 0 || inStr($u, '.html?replytocom') > 0) { //.html?replytocom 王通网站 $isThrough = 0; } else { $isThrough = 1; //不用true 因为写入数据会有问题 } connexecute('insert into ' . $GLOBALS['db_PREFIX'] . 'weburlscan(tohttpurl,totitle,httpurl,title,isthrough,charset) values(\'' . $httpUrl . '\',\'' . $toTitle . '\',\'' . $url . '\',\'' . left($title, 255) . '\',' . $isThrough . ',\'' . $codeset . '\')'); $nOK = $nOK + 1; aspEcho($i, $url); } else { aspEcho($title, $url); } } } } $scanUrl = $nSetTime; return @$scanUrl; }
function unHTMLToAscChr($content) { $i = ''; $s = ''; $c = ''; $splStr = ''; $temp = ''; $c = $content; $temp = ''; $c = replace($c, 'Chr(', ''); $c = replace($c, ')&', ' '); $c = replace($c, ')', ' '); $splStr = aspSplit($c, ' '); for ($i = 0; $i <= uBound($splStr) - 1; $i++) { $s = $splStr[$i]; $temp = $temp . chr($s); } $unHTMLToAscChr = $temp; return @$unHTMLToAscChr; }
function checkHtmlFormatting($content) { $splStr = ''; $s = ''; $c = ''; $splxx = ''; $nLable = ''; $lableStr = ''; $content = lCase($content); $splStr = aspSplit('ul|li|dt|dd|dl|div|span', '|'); foreach ($splStr as $key => $s) { $s = PHPTrim($s); if ($s != '') { $nLable = 0; $lableStr = '<' . $s . ' '; if (inStr($content, $lableStr) > 0) { $splxx = aspSplit($content, $lableStr); $nLable = $nLable + uBound($splxx); } $lableStr = '<' . $s . '>'; if (inStr($content, $lableStr) > 0) { $splxx = aspSplit($content, $lableStr); $nLable = $nLable + uBound($splxx); } $lableStr = '</' . $s . '>'; if (inStr($content, $lableStr) > 0) { $splxx = aspSplit($content, $lableStr); $nLable = $nLable - uBound($splxx); } //call echo(ShowHtml(lableStr),nLable) if ($nLable != 0) { $checkHtmlFormatting = false; return @$checkHtmlFormatting; } } } $checkHtmlFormatting = true; return @$checkHtmlFormatting; }
function twoDimensionalArrayDesc($splStr) { $i = ''; $j = ''; $t = ''; for ($i = 0; $i <= uBound($splStr); $i++) { if (isNul($splStr[$i][0]) == false) { for ($j = $i; $j <= uBound($splStr); $j++) { if ($splStr[$i][0] < $splStr[$j][0]) { $t = $splStr[$i][0]; $splStr[$i][0] = $splStr[$j][0]; $splStr[$j][0] = $t; $t = $splStr[$i][1]; $splStr[$i][1] = $splStr[$j][1]; $splStr[$j][1] = $t; } } } } $twoDimensionalArrayDesc = $splStr; return @$twoDimensionalArrayDesc; }
function JsEncode__($s) { if (isNul($s)) { $JsEncode__ = ''; return @$JsEncode__; } $arr1 = ''; $arr2 = ''; $i = ''; $j = ''; $c = ''; $p = ''; $t = ''; $arr1 = array(chr(34), chr(92), chr(47), chr(8), chr(12), chr(10), chr(13), chr(9)); //34|",92|\,47|/,8|,12|,10| ,13| ,9| , $arr2 = array(chr(34), chr(92), chr(47), chr(98), chr(102), chr(110), chr(114)); //34|",92|\,47|/,98|b,102|f,110|n,114|r,1865|, for ($i = 1; $i <= len($s); $i++) { $p = true; $c = mid($s, $i, 1); for ($j = 0; $j <= uBound($arr1); $j++) { if ($c == $arr1[$j]) { $t = $t . '\\' . $arr2[$j]; $p = false; break; } } if ($p) { $t = $t . $c; } } $JsEncode__ = $t; return @$JsEncode__; }
function getDetailList($action, $content, $actionName, $lableTitle, $fieldNameList, $nPageSize, $nPage, $addSql) { $GLOBALS['conn='] = OpenConn(); $defaultStr = ''; $i = ''; $s = ''; $c = ''; $tableName = ''; $j = ''; $splxx = ''; $sql = ''; $x = ''; $url = ''; $nCount = ''; $pageInfo = ''; $modI = ''; $startStr = ''; $endStr = ''; $fieldName = ''; //字段名称 $splFieldName = ''; //分割字段 $replaceStr = ''; //替换字符 $tableName = lCase($actionName); //表名称 $listFileName = ''; //列表文件名称 $listFileName = RParam($action, 'listFileName'); $abcolorStr = ''; //A加粗和颜色 $atargetStr = ''; //A链接打开方式 $atitleStr = ''; //A链接的title20160407 $anofollowStr = ''; //A链接的nofollow $id = ''; $idPage = ''; $id = rq('id'); checkIDSQL(@$_REQUEST['id']); if ($fieldNameList == '*') { $fieldNameList = getHandleFieldList($GLOBALS['db_PREFIX'] . $tableName, '字段列表'); } $fieldNameList = specialStrReplace($fieldNameList); //特殊字符处理 $splFieldName = aspSplit($fieldNameList, ','); //字段分割成数组 $defaultStr = getStrCut($content, '<!--#body start#-->', '<!--#body end#-->', 2); $pageInfo = getStrCut($content, '[page]', '[/page]', 1); if ($pageInfo != '') { $content = replace($content, $pageInfo, ''); } //call eerr("pageInfo",pageInfo) $sql = 'select * from ' . $GLOBALS['db_PREFIX'] . $tableName . ' ' . $addSql; //检测SQL if (checkSql($sql) == false) { errorLog('出错提示:<br>sql=' . $sql . '<br>'); return ''; } $rsObj = $GLOBALS['conn']->query($sql); $rs = mysql_fetch_array($rsObj); $nCount = @mysql_num_rows($rsObj); //为动态翻页网址 if ($GLOBALS['isMakeHtml'] == true) { $url = ''; if (len($listFileName) > 5) { $url = mid($listFileName, 1, len($listFileName) - 5) . '[id].html'; $url = urlAddHttpUrl($GLOBALS['cfg_webSiteUrl'], $url); } } else { $url = getUrlAddToParam(getUrl(), '?page=[id]', 'replace'); } $content = replace($content, '[$pageInfo$]', webPageControl($nCount, $nPageSize, $nPage, $url, $pageInfo)); if (EDITORTYPE == 'asp') { $x = getRsPageNumber($rs, $nCount, $nPageSize, $nPage); //获得Rs页数 '记录总数 } else { if ($nPage != '') { $nPage = $nPage - 1; } $sql = 'select * from ' . $GLOBALS['db_PREFIX'] . '' . $tableName . ' ' . $addSql . ' limit ' . $nPageSize * $nPage . ',' . $nPageSize; $rsObj = $GLOBALS['conn']->query($sql); $rs = mysql_fetch_array($rsObj); $x = @mysql_num_rows($rsObj); } //call echo("sql",sql) for ($i = 1; $i <= $x; $i++) { $rs = mysql_fetch_array($rsObj); //给PHP用,因为在 asptophp转换不完善 $startStr = '[list-' . $i . ']'; $endStr = '[/list-' . $i . ']'; //在最后时排序当前交点20160202 if ($i == $x) { $startStr = '[list-end]'; $endStr = '[/list-end]'; } //例[list-mod2] [/list-mod2] 20150112 for ($modI = 6; $modI >= 2; $modI--) { if (inStr($defaultStr, $startStr) == false && $i % $modI == 0) { $startStr = '[list-mod' . $modI . ']'; $endStr = '[/list-mod' . $modI . ']'; if (inStr($defaultStr, $startStr) > 0) { break; } } } //没有则用默认 if (inStr($defaultStr, $startStr) == false || $startStr == '') { $startStr = '[list]'; $endStr = '[/list]'; } if (inStr($defaultStr, $startStr) > 0 && inStr($defaultStr, $endStr) > 0) { $s = StrCut($defaultStr, $startStr, $endStr, 2); //s = defaultStr $s = replace($s, '[$id$]', $rs['id']); for ($j = 0; $j <= uBound($splFieldName); $j++) { if ($splFieldName[$j] != '') { $splxx = aspSplit($splFieldName[$j] . '|||', '|'); $fieldName = $splxx[0]; $replaceStr = $rs[$fieldName] . ''; $s = replaceValueParam($s, $fieldName, $replaceStr); } if ($GLOBALS['isMakeHtml'] == true) { $url = getHandleRsUrl($rs['filename'], $rs['customaurl'], '/detail/detail' . $rs['id']); } else { $url = handleWebUrl('?act=detail&id=' . $rs['id']); if ($rs['customaurl'] != '') { $url = $rs['customaurl']; } } //A链接添加颜色 $abcolorStr = ''; if (inStr($fieldNameList, ',titlecolor,') > 0) { //A链接颜色 if ($rs['titlecolor'] != '') { $abcolorStr = 'color:' . $rs['titlecolor'] . ';'; } } if (inStr($fieldNameList, ',flags,') > 0) { //A链接加粗 if (inStr($rs['flags'], '|b|') > 0) { $abcolorStr = $abcolorStr . 'font-weight:bold;'; } } if ($abcolorStr != '') { $abcolorStr = ' style="' . $abcolorStr . '"'; } //打开方式2016 if (inStr($fieldNameList, ',target,') > 0) { $atargetStr = IIF($rs['target'] != '', ' target="' . $rs['target'] . '"', ''); } //A的title if (inStr($fieldNameList, ',title,') > 0) { $atitleStr = IIF($rs['title'] != '', ' title="' . $rs['title'] . '"', ''); } //A的nofollow if (inStr($fieldNameList, ',nofollow,') > 0) { $anofollowStr = IIF($rs['nofollow'] != 0, ' rel="nofollow"', ''); } $s = replaceValueParam($s, 'url', $url); $s = replaceValueParam($s, 'abcolor', $abcolorStr); //A链接加颜色与加粗 $s = replaceValueParam($s, 'atitle', $atitleStr); //A链接title $s = replaceValueParam($s, 'anofollow', $anofollowStr); //A链接nofollow $s = replaceValueParam($s, 'atarget', $atargetStr); //A链接打开方式 } } //call echo("tableName",tableName) $idPage = getThisIdPage($GLOBALS['db_PREFIX'] . $tableName, $rs['id'], 10); //【留言】 if ($tableName == 'guestbook') { $url = WEB_ADMINURL . '?act=addEditHandle&actionType=GuestBook&lableTitle=留言&nPageSize=10&parentid=&searchfield=bodycontent&keyword=&addsql=&page=' . $idPage . '&id=' . $rs['id'] . '&n=' . getRnd(11); //【默认显示文章】 } else { $url = WEB_ADMINURL . '?act=addEditHandle&actionType=ArticleDetail&lableTitle=分类信息&nPageSize=10&page=' . $idPage . '&parentid=' . $rs['parentid'] . '&id=' . $rs['id'] . '&n=' . getRnd(11); } $s = handleDisplayOnlineEditDialog($url, $s, '', 'div|li|span'); $c = $c . $s; } $content = replace($content, '<!--#body start#-->' . $defaultStr . '<!--#body end#-->', $c); if ($GLOBALS['isMakeHtml'] == true) { $url = ''; if (len($listFileName) > 5) { $url = mid($listFileName, 1, len($listFileName) - 5) . '[id].html'; $url = urlAddHttpUrl($GLOBALS['cfg_webSiteUrl'], $url); } } else { $url = getUrlAddToParam(getUrl(), '?page=[id]', 'replace'); } $getDetailList = $content; return @$getDetailList; }
function getParamValue($content, $paramName) { $LCaseContent = ''; $s = ''; $splStart = ''; $splEnd = ''; $i = ''; $startStr = ''; $endStr = ''; $LCaseContent = lCase($content); $splStart = array('="', '=\'', '='); $splEnd = array('"', '\'', '>'); for ($i = 0; $i <= uBound($splStart); $i++) { $startStr = $paramName . $splStart[$i]; $endStr = $splEnd[$i]; if (inStr($LCaseContent, $startStr) > 0 && inStr($LCaseContent, $endStr) > 0) { $s = StrCut($content, $startStr, $endStr, 2); if ($s != '') { $getParamValue = $s; return @$getParamValue; } } } return @$getParamValue; }
function sortHandle($actionType) { $splId = ''; $splValue = ''; $i = ''; $id = ''; $sortrank = ''; $tableName = ''; $url = ''; $tableName = lCase($actionType); //表名称 $splId = aspSplit(@$_REQUEST['id'], ','); $splValue = aspSplit(@$_REQUEST['value'], ','); for ($i = 0; $i <= uBound($splId); $i++) { $id = $splId[$i]; $sortrank = $splValue[$i]; $sortrank = getNumber($sortrank . ''); if ($sortrank == '') { $sortrank = 0; } connexecute('update ' . $GLOBALS['db_PREFIX'] . $tableName . ' set sortrank=' . $sortrank . ' where id=' . $id); } $url = getUrlAddToParam(getThisUrl(), '?act=dispalyManageHandle', 'replace'); Rw(getMsg1('更新排序完成,正在返回列表...', $url)); writeSystemLog($tableName, '排序' . @$_REQUEST['lableTitle']); //系统日志 }
function fullHttpUrl($httpUrl, $url) { //On Error Resume Next //清除错误 要不然会报错 $rootUrl = ''; $thisUrl = ''; $splStr = ''; $i = ''; $s = ''; $c = ''; $parentUrl = ''; $parentParentUrl = ''; $parentParentParentUrl = ''; $rootWebSite = ''; $thisWebSite = ''; $handleYes = ''; $lCaseUrl = ''; $styleStart = ''; $styleEnd = ''; $httpUrl = PHPTrim($httpUrl); //清除两边空格 $url = PHPTrim($url); //清除两边空格 $lCaseUrl = lCase($url); if ($url == '') { $fullHttpUrl = ''; return @$fullHttpUrl; } //网址为空退出(20150805) if (aspTrim($httpUrl) == '') { $fullHttpUrl = $url; return @$fullHttpUrl; } //主网址为空退出 返回网址 $httpUrl = replace($httpUrl, '\\', '/'); //把网址\转/符号 $url = replace($url, '\\', '/'); //把网址\转/符号 //网址前两个字符为//则退出 if (left($url, 2) == '//') { $fullHttpUrl = 'http:' . $url; return @$fullHttpUrl; } //处理style样式里背景图片 $url = hanldeStyleBackgroundUrl($url, $styleStart, $styleEnd); $rootUrl = getWebSite($httpUrl); //主域名,也就是主网址 $rootWebSite = $rootUrl; $thisWebSite = getWebSite($url); if (right($rootUrl, 1) == '/') { $rootUrl = left($rootUrl, len($rootUrl) - 1); } $thisUrl = left($httpUrl, inStrRev($httpUrl, '/')); //当前网址 $splStr = aspSplit($httpUrl, '/'); for ($i = 0; $i <= uBound($splStr); $i++) { if ($i + 1 == uBound($splStr)) { $parentUrl = $c; } if ($i + 2 == uBound($splStr)) { $parentParentUrl = $c; } if ($i + 3 == uBound($splStr)) { $parentParentParentUrl = $c; } $s = $splStr[$i]; $c = $c . $s . '/'; } $url = aspTrim($url); //去除网址左右空格 $handleYes = false; //操作为假 if ($url != '' && inStr(left($url, 10), 'www.') == false && inStr(left($url, 10), 'http://') == false && inStr(left($url, 10), 'https://') == false) { $handleYes = true; if ($rootWebSite != $thisWebSite) { if ($rootWebSite == replace($thisWebSite, 'http://', 'http://www.')) { $handleYes = false; if (inStr(lCase($url), 'http://') > 0) { $url = 'http://www.' . right($url, len($url) - 7); } else { $url = 'http://www.' . $url; } } } } //操作是否为真 if ($handleYes == true) { if (left($url, 1) == '/') { $url = $rootUrl . $url; } else { if (left($url, 9) == '../../../') { $url = $parentParentParentUrl . right($url, len($url) - 9); } else { if (left($url, 6) == '../../') { $url = $parentParentUrl . right($url, len($url) - 6); } else { if (left($url, 3) == '../') { $url = $parentUrl . right($url, len($url) - 3); } else { if (left($url, 2) == './') { $url = $thisUrl . mid($url, 3, -1); } else { $url = $thisUrl . $url; } } } } } } if (inStr(lCase($url), 'http://') == false && inStr(lCase($url), 'https://') == false) { if (inStr(lCase($httpUrl), 'http://') > 0 && inStr(lCase($url), 'http://') == false) { $url = 'http://' . $url; } else { if (inStr(lCase($httpUrl), 'https://') > 0 && inStr(lCase($url), 'https://') == false) { $url = 'https://' . $url; } } } $fullHttpUrl = $styleStart . $url . $styleEnd; return @$fullHttpUrl; }
function foundInArr($strArr, $strToFind, $strSplit) { $arrTemp = ''; $i = ''; $foundInArr = false; if (inStr($strArr, $strSplit) > 0) { $arrTemp = aspSplit($strArr, $strSplit); for ($i = 0; $i <= uBound($arrTemp); $i++) { if (lCase(aspTrim($arrTemp[$i])) == lCase(aspTrim($strToFind))) { $foundInArr = true; break; } } } else { if (lCase(aspTrim($strArr)) == lCase(aspTrim($strToFind))) { $foundInArr = true; } } return @$foundInArr; }