@@ -81,7 +81,7 @@ button+button{margin-left:10px} | |||
function addList(files){ | |||
var files_sum = files.length; | |||
var vDom = document.createDocumentFragment(); | |||
for(let i=0;i<files_sum;i++){ | |||
for (let i=0;i<files_sum;i++) { | |||
let file = files[i]; | |||
if (!isFileImage(file)) { | |||
alert("选择非图片文件无法上传") | |||
@@ -119,10 +119,10 @@ button+button{margin-left:10px} | |||
if (!(dropfiles.length>0)){return false;} | |||
var exts=axupimgs.axupimgs_filetype.replace(/(\s)+/g,'').toLowerCase().split(','); | |||
var files=[]; | |||
for( let file of dropfiles ){ | |||
for ( let file of dropfiles ) { | |||
ext = file.name.split('.'); | |||
ext = '.'+ext[ext.length-1]; | |||
for(let s of exts){ | |||
for (let s of exts) { | |||
if (s==ext){ | |||
files.push(file); | |||
break; | |||
@@ -7,7 +7,7 @@ if (BROWSER.safari) { | |||
BROWSER.opera = BROWSER.opera ? opera.version() : 0; | |||
function browserVersion(types) { | |||
var other = 1; | |||
for(i in types) { | |||
for (i in types) { | |||
var v = types[i] ? types[i] : i; | |||
if (USERAGENT.indexOf(v) != -1) { | |||
var re = new RegExp(v + '(\\/|\\s)([\\d\\.]+)', 'ig'); | |||
@@ -1,8 +1,7 @@ | |||
function selAll() | |||
{ | |||
var celements = document.getElementsByName('aids[]'); | |||
for(i=0;i<celements.length;i++) | |||
{ | |||
for (i=0;i<celements.length;i++) { | |||
if (!celements[i].checked) celements[i].checked = true; | |||
else celements[i].checked = false; | |||
} | |||
@@ -10,50 +9,43 @@ function selAll() | |||
function noselAll() | |||
{ | |||
var celements = document.getElementsByName('aids[]'); | |||
for(i=0;i<celements.length;i++) | |||
{ | |||
if (celements[i].checked = true) | |||
{ | |||
for (i=0;i<celements.length;i++) { | |||
if (celements[i].checked = true) { | |||
celements[i].checked = false; | |||
} | |||
} | |||
} | |||
function delkey() | |||
{ | |||
if (window.confirm("您确定要删除选定的关键字吗")) | |||
{ | |||
if (window.confirm("您确定要删除选定的关键字吗")) { | |||
document.form3.dopost.value = 'del'; | |||
document.form3.submit(); | |||
} | |||
} | |||
function diskey() | |||
{ | |||
if (window.confirm("您确定要禁用选定的关键字吗")) | |||
{ | |||
if (window.confirm("您确定要禁用选定的关键字吗")) { | |||
document.form3.dopost.value = 'dis'; | |||
document.form3.submit(); | |||
} | |||
} | |||
function enakey() | |||
{ | |||
if (window.confirm("您确定要启用选定的关键字吗")) | |||
{ | |||
if (window.confirm("您确定要启用选定的关键字吗")) { | |||
document.form3.dopost.value = 'ena'; | |||
document.form3.submit(); | |||
} | |||
} | |||
function urlkey() | |||
{ | |||
if (window.confirm("您确定要更新选定的关键字的网址吗")) | |||
{ | |||
if (window.confirm("您确定要更新选定的关键字的网址吗")) { | |||
document.form3.dopost.value = 'url'; | |||
document.form3.submit(); | |||
} | |||
} | |||
function rankey() | |||
{ | |||
if (window.confirm("您确定要改变选定的关键字的频率吗")) | |||
{ | |||
if (window.confirm("您确定要改变选定的关键字的频率吗")) { | |||
document.form3.dopost.value = 'ran'; | |||
document.form3.submit(); | |||
} | |||
@@ -61,8 +53,7 @@ function rankey() | |||
//批量删除搜多关键字 | |||
function delall() | |||
{ | |||
if (window.confirm("您确定要删除选定的关键字吗")) | |||
{ | |||
if (window.confirm("您确定要删除选定的关键字吗")) { | |||
document.form3.dopost.value = 'delall'; | |||
document.form3.submit(); | |||
} |
@@ -5,8 +5,7 @@ function viewArc(aid){ | |||
function kwArc(aid){ | |||
var qstr=getCheckboxItem(); | |||
if (aid==0) aid = getOneItem(); | |||
if (qstr=='') | |||
{ | |||
if (qstr=='') { | |||
ShowMsg('需要选择一个或多个文档'); | |||
return; | |||
} | |||
@@ -28,8 +27,7 @@ function checkArc(aid){ | |||
} | |||
function moveArc(e, obj, cid){ | |||
var qstr=getCheckboxItem(); | |||
if (qstr=='') | |||
{ | |||
if (qstr=='') { | |||
ShowMsg('需要选择一个或多个文档'); | |||
return; | |||
} | |||
@@ -45,8 +43,7 @@ function cAtts(jname, e, obj) | |||
{ | |||
var qstr=getCheckboxItem(); | |||
var screeheight = document.body.clientHeight + 20; | |||
if (qstr=='') | |||
{ | |||
if (qstr=='') { | |||
ShowMsg('需要选择一个或多个文档'); | |||
return; | |||
} | |||
@@ -68,7 +65,7 @@ function getCheckboxItem() | |||
{ | |||
var allSel=""; | |||
if (document.form2.arcID.value) return document.form2.arcID.value; | |||
for(i=0;i<document.form2.arcID.length;i++) | |||
for (i=0;i<document.form2.arcID.length;i++) | |||
{ | |||
if (document.form2.arcID[i].checked) | |||
{ | |||
@@ -85,12 +82,11 @@ function getOneItem() | |||
{ | |||
var allSel=""; | |||
if (document.form2.arcID.value) return document.form2.arcID.value; | |||
for(i=0;i<document.form2.arcID.length;i++) | |||
for (i=0;i<document.form2.arcID.length;i++) | |||
{ | |||
if (document.form2.arcID[i].checked) | |||
{ | |||
allSel = document.form2.arcID[i].value; | |||
break; | |||
if (document.form2.arcID[i].checked) { | |||
allSel = document.form2.arcID[i].value; | |||
break; | |||
} | |||
} | |||
return allSel; | |||
@@ -100,10 +96,8 @@ function selAll() | |||
if (typeof document.form2.arcID.length === "undefined") { | |||
document.form2.arcID.checked = true; | |||
} | |||
for(i=0;i<document.form2.arcID.length;i++) | |||
{ | |||
if (!document.form2.arcID[i].checked) | |||
{ | |||
for (i=0;i<document.form2.arcID.length;i++) { | |||
if (!document.form2.arcID[i].checked) { | |||
document.form2.arcID[i].checked=true; | |||
} | |||
} | |||
@@ -113,10 +107,8 @@ function noSelAll() | |||
if (typeof document.form2.arcID.length === "undefined") { | |||
document.form2.arcID.checked = false; | |||
} | |||
for(i=0;i<document.form2.arcID.length;i++) | |||
{ | |||
if (document.form2.arcID[i].checked) | |||
{ | |||
for (i=0;i<document.form2.arcID.length;i++) { | |||
if (document.form2.arcID[i].checked) { | |||
document.form2.arcID[i].checked=false; | |||
} | |||
} |
@@ -1,5 +1,4 @@ | |||
if (moz == null) | |||
{ | |||
if (moz == null) { | |||
var ie = document.all != null; | |||
var moz = !ie && document.getElementById != null && document.layers == null; | |||
} | |||
@@ -13,10 +12,9 @@ function getCheckboxItem() | |||
{ | |||
var allSel=""; | |||
if (document.form2.mid.value) return document.form2.mid.value; | |||
for(i=0;i<document.form2.mid.length;i++) | |||
for (i=0;i<document.form2.mid.length;i++) | |||
{ | |||
if (document.form2.mid[i].checked) | |||
{ | |||
if (document.form2.mid[i].checked) { | |||
if (allSel=="") | |||
allSel=document.form2.mid[i].value; | |||
else | |||
@@ -30,10 +28,8 @@ function getOneItem() | |||
{ | |||
var allSel=""; | |||
if (document.form2.mid.value) return document.form2.mid.value; | |||
for(i=0;i<document.form2.mid.length;i++) | |||
{ | |||
if (document.form2.mid[i].checked) | |||
{ | |||
for (i=0;i<document.form2.mid.length;i++) { | |||
if (document.form2.mid[i].checked) { | |||
allSel = document.form2.mid[i].value; | |||
break; | |||
} | |||
@@ -42,20 +38,22 @@ function getOneItem() | |||
} | |||
function selAll() | |||
{ | |||
for(i=0;i<document.form2.mid.length;i++) | |||
{ | |||
if (!document.form2.mid[i].checked) | |||
{ | |||
if (typeof document.form2.mid.length === "undefined") { | |||
document.form2.mid.checked = true; | |||
} | |||
for (i=0;i<document.form2.mid.length;i++) { | |||
if (!document.form2.mid[i].checked) { | |||
document.form2.mid[i].checked=true; | |||
} | |||
} | |||
} | |||
function noSelAll() | |||
{ | |||
for(i=0;i<document.form2.mid.length;i++) | |||
{ | |||
if (document.form2.mid[i].checked) | |||
{ | |||
if (typeof document.form2.mid.length === "undefined") { | |||
document.form2.mid.checked = false; | |||
} | |||
for (i=0;i<document.form2.mid.length;i++) { | |||
if (document.form2.mid[i].checked) { | |||
document.form2.mid[i].checked=false; | |||
} | |||
} |
@@ -16,8 +16,8 @@ | |||
<script src="../static/web/js/moment.min.js"></script> | |||
<script src="../static/web/js/daterangepicker.js"></script> | |||
<script src="../static/web/js/bootstrap.bundle.min.js"></script> | |||
<script src="js/main.js"></script> | |||
<script src="../static/web/js/cropper.min.js"></script> | |||
<script src="js/main.js"></script> | |||
<style>table{border-collapse:inherit}</style> | |||
<script> | |||
function checkSubmit() { | |||
@@ -16,8 +16,8 @@ | |||
<script src="../static/web/js/webajax.js"></script> | |||
<script src="../static/web/js/moment.min.js"></script> | |||
<script src="../static/web/js/daterangepicker.js"></script> | |||
<script src="js/main.js"></script> | |||
<script src="../static/web/js/cropper.min.js"></script> | |||
<script src="js/main.js"></script> | |||
<style>table{border-collapse:inherit}</style> | |||
<script> | |||
function checkSubmit() | |||
@@ -202,7 +202,7 @@ | |||
</td> | |||
<td align="center"><button type="button" name="" id="add" class="btn btn-danger btn-sm">删除</button></td> | |||
</tr> | |||
<?php for($i=2;$i<=10;$i++) {?> | |||
<?php for ($i=2;$i<=10;$i++) {?> | |||
<tr class="repeat" align="center"> | |||
<td class="rank"> | |||
<input type="hidden" name="posttype<?php echo $i;?>" value="<?php echo $i;?>"> | |||
@@ -232,7 +232,7 @@ | |||
</td> | |||
<td align="center"><button type="button" name="" id="add" class="btn btn-danger btn-sm">删除</button></td> | |||
</tr> | |||
<?php for($i=2;$i<=10;$i++) {?> | |||
<?php for ($i=2;$i<=10;$i++) {?> | |||
<tr class="repeat" align="center"> | |||
<td class="rank"> | |||
<input type="hidden" name="posttype<?php echo $i;?>" value="<?php echo $i;?>"> | |||
@@ -20,7 +20,7 @@ | |||
var itemname = theform.itemname.value; | |||
var dtype = 'text'; | |||
var enums = document.getElementsByName('dtype'); | |||
for(i=0;i<enums.length;i++) | |||
for (i=0;i<enums.length;i++) | |||
{ | |||
if (enums[i].checked) dtype = enums[i].value; | |||
} | |||
@@ -20,7 +20,7 @@ | |||
var itemname = theform.itemname.value; | |||
var dtype = 'text'; | |||
var enums = document.getElementsByName('dtype'); | |||
for(i=0;i<enums.length;i++) | |||
for (i=0;i<enums.length;i++) | |||
{ | |||
if (enums[i].checked) dtype = enums[i].value; | |||
} | |||
@@ -16,8 +16,8 @@ | |||
<script src="../static/web/js/webajax.js"></script> | |||
<script src="../static/web/js/moment.min.js"></script> | |||
<script src="../static/web/js/daterangepicker.js"></script> | |||
<script src="js/main.js"></script> | |||
<script src="../static/web/js/cropper.min.js"></script> | |||
<script src="js/main.js"></script> | |||
<style>table{border-collapse:inherit}</style> | |||
<script> | |||
function checkSubmit() { | |||
@@ -16,8 +16,8 @@ | |||
<script src="../static/web/js/webajax.js"></script> | |||
<script src="../static/web/js/moment.min.js"></script> | |||
<script src="../static/web/js/daterangepicker.js"></script> | |||
<script src="js/main.js"></script> | |||
<script src="../static/web/js/cropper.min.js"></script> | |||
<script src="js/main.js"></script> | |||
<style>table{border-collapse:inherit}</style> | |||
<script> | |||
function checkSubmit() { | |||
@@ -16,8 +16,8 @@ | |||
<script src="../static/web/js/moment.min.js"></script> | |||
<script src="../static/web/js/daterangepicker.js"></script> | |||
<script src="../static/web/js/bootstrap.bundle.min.js"></script> | |||
<script src="js/main.js"></script> | |||
<script src="../static/web/js/cropper.min.js"></script> | |||
<script src="js/main.js"></script> | |||
<style>table{border-collapse:inherit}</style> | |||
<script> | |||
function checkSubmit() { | |||
@@ -283,7 +283,7 @@ | |||
<?php | |||
$speclisttmp = GetSysTemplets("spec_arclist.htm"); | |||
$nodename = $nodeid = ''; | |||
for($i=1;$i<=$cfg_specnote;$i++) | |||
for ($i=1;$i<=$cfg_specnote;$i++) | |||
{ | |||
if ($i==1) { | |||
$nodename = '默认节点'; | |||
@@ -16,8 +16,8 @@ | |||
<script src="../static/web/js/moment.min.js"></script> | |||
<script src="../static/web/js/daterangepicker.js"></script> | |||
<script src="../static/web/js/bootstrap.bundle.min.js"></script> | |||
<script src="js/main.js"></script> | |||
<script src="../static/web/js/cropper.min.js"></script> | |||
<script src="js/main.js"></script> | |||
<style>table{border-collapse:inherit}</style> | |||
<script> | |||
function SelectTemplets(fname) { | |||
@@ -363,7 +363,7 @@ | |||
$i++; | |||
}} | |||
$dtp->Clear(); | |||
for($i;$i<=$cfg_specnote;$i++) | |||
for ($i;$i<=$cfg_specnote;$i++) | |||
{ | |||
?> | |||
<tr bgcolor="#e9ecef"> | |||
@@ -103,7 +103,7 @@ | |||
<td width="17%">操作</td> | |||
</tr> | |||
<?php | |||
for($i=0; isset($dedeSysTables[$i]); $i++) | |||
for ($i=0; isset($dedeSysTables[$i]); $i++) | |||
{ | |||
$t = $dedeSysTables[$i]; | |||
echo "<tr align='center'>"; | |||
@@ -150,7 +150,7 @@ | |||
<td>操作</td> | |||
</tr> | |||
<?php | |||
for($i=0; isset($otherTables[$i]); $i++) | |||
for ($i=0; isset($otherTables[$i]); $i++) | |||
{ | |||
$t = $otherTables[$i]; | |||
echo "<tr align='center'>"; | |||
@@ -74,7 +74,7 @@ | |||
<td colspan="4">发现的备份文件:<?php if (count($filelists)==0) echo " 没找到任何备份文件 ";?></td> | |||
</tr> | |||
<?php | |||
for($i=0;$i<count($filelists);$i++) | |||
for ($i=0;$i<count($filelists);$i++) | |||
{ | |||
echo "<tr align='center'>"; | |||
$mtd = "<td width='10%'><input name='bakfile' id='bakfile' type='checkbox' value='".$filelists[$i]."' checked='1'></td><td width='40%'>{$filelists[$i]}</td>"; | |||
@@ -29,14 +29,13 @@ if ($tagid !='') | |||
$dtp2->LoadString($row['innertext']); | |||
$GLOBALS['autoindex'] = 0; | |||
$ids = array(); | |||
for($i=0; $i<$line; $i++) | |||
for ($i=0; $i<$line; $i++) | |||
{ | |||
if ($col>1) $artlist .= "<tr>\r\n"; | |||
for($j=0; $j<$col; $j++) | |||
for ($j=0; $j<$col; $j++) | |||
{ | |||
if ($col>1) $artlist .= " <td width='$colWidth'>\r\n"; | |||
if ($row = $dsql->GetArray("al")) | |||
{ | |||
if ($col>1) $artlist .= "<td width='$colWidth'>\r\n"; | |||
if ($row = $dsql->GetArray("al")) { | |||
$ids[] = $row['id']; | |||
//处理一些特殊字段 | |||
$row['info'] = $row['infos'] = cn_substr($row['description'],$infolen); | |||
@@ -8,8 +8,7 @@ function selNext(oj, v) | |||
oj.remove(0); | |||
} | |||
clear(oj); | |||
if(selv==0) | |||
{ | |||
if (selv==0) { | |||
aOption = document.createElement('OPTION'); | |||
aOption.text = '具体地区'; | |||
aOption.value = '0'; | |||
@@ -22,9 +21,8 @@ function selNext(oj, v) | |||
oj.options.add(aOption); | |||
} | |||
var str = ''; | |||
for(i=selv+1; i < maxv; i++) | |||
{ | |||
if(!em_nativeplaces[i]) continue; | |||
for (i=selv+1; i < maxv; i++) { | |||
if (!em_nativeplaces[i]) continue; | |||
aOption = document.createElement('OPTION'); | |||
aOption.text = em_nativeplaces[i]; | |||
aOption.value = i; | |||
@@ -36,8 +34,7 @@ function ChangeSon() | |||
{ | |||
//由于支持3级联动,所以这里需要对自己改变进行重构 | |||
var emname = this.name.replace('_son', ''); | |||
if( document.getElementById(emname+'_sec') ) | |||
{ | |||
if ( document.getElementById(emname+'_sec') ) { | |||
var oj = document.getElementById(emname + '_sec'); | |||
} else { | |||
var oj = document.createElement('select'); | |||
@@ -55,8 +52,7 @@ function ChangeSon() | |||
i = 0; | |||
while(newobj && newobj.length > 0) oj.remove(0); | |||
clear(oj); | |||
if(selv == 0) | |||
{ | |||
if (selv == 0) { | |||
aOption = document.createElement('OPTION'); | |||
aOption.text = '请选择..'; | |||
aOption.value = '0'; | |||
@@ -70,16 +66,15 @@ function ChangeSon() | |||
} | |||
var str = ''; | |||
var j=0; | |||
for(i = selv + 0.001; i < maxv; i = FloatAdd(i, 0.001)) | |||
{ | |||
if(!selarr[i]) continue; | |||
for (i = selv + 0.001; i < maxv; i = FloatAdd(i, 0.001)) { | |||
if (!selarr[i]) continue; | |||
aOption = document.createElement('OPTION'); | |||
aOption.text = selarr[i]; | |||
aOption.value = i; | |||
oj.options.add(aOption); | |||
j++; | |||
} | |||
if(j > 0) document.getElementById('span_'+emname+'_sec').appendChild(oj); | |||
if (j > 0) document.getElementById('span_'+emname+'_sec').appendChild(oj); | |||
else document.getElementById('span_'+emname+'_sec').innerHTML = ""; | |||
} | |||
//改变第三级的事件 | |||
@@ -87,7 +82,7 @@ function ChangeSec() | |||
{ | |||
var emname = this.name.replace('_sec', ''); | |||
var topSelObj = document.getElementById(emname+'_top'); | |||
if(this.options[this.selectedIndex].value==0) { | |||
if (this.options[this.selectedIndex].value==0) { | |||
document.getElementById('hidden_'+emname).value = topSelObj.options[topSelObj.selectedIndex].value; | |||
} else { | |||
document.getElementById('hidden_'+emname).value = this.options[this.selectedIndex].value; | |||
@@ -97,8 +92,7 @@ function ChangeSec() | |||
function selNextSon() | |||
{ | |||
var emname = this.name.replace('_top', ''); | |||
if( document.getElementById(emname+'_son') ) | |||
{ | |||
if ( document.getElementById(emname+'_son') ) { | |||
var oj = document.getElementById(emname + '_son'); | |||
} else { | |||
var oj = document.createElement('select'); | |||
@@ -115,8 +109,7 @@ function selNextSon() | |||
var maxv = parseInt(v) + 500; | |||
while(newobj && newobj.length > 0) oj.remove(0); | |||
clear(oj); | |||
if(selv==0) | |||
{ | |||
if (selv==0) { | |||
aOption = document.createElement('OPTION'); | |||
aOption.text = '请选择..'; | |||
aOption.value = '0'; | |||
@@ -129,9 +122,8 @@ function selNextSon() | |||
oj.options.add(aOption); | |||
} | |||
var str = ''; | |||
for(i=selv+1; i < maxv; i++) | |||
{ | |||
if(!selarr[i]) continue; | |||
for (i=selv+1; i < maxv; i++) { | |||
if (!selarr[i]) continue; | |||
aOption = document.createElement('OPTION'); | |||
aOption.text = selarr[i]; | |||
aOption.value = i; | |||
@@ -157,12 +149,11 @@ function MakeTopSelect(emname, selvalue) | |||
aOption.text = '请选择..'; | |||
aOption.value = 0; | |||
selObj.options.add(aOption); | |||
if(selvalue % 500 == 0 ) | |||
{ | |||
if (selvalue % 500 == 0 ) { | |||
topvalue = selvalue; | |||
} | |||
//如果是小数,则依次取出顶级数值,二级数值以及三级数值 | |||
else if(!!(selvalue % 1)) | |||
else if (!!(selvalue % 1)) | |||
{ | |||
secvalue = selvalue; | |||
sonvalue = Math.floor(selvalue); | |||
@@ -172,11 +163,10 @@ function MakeTopSelect(emname, selvalue) | |||
sonvalue = selvalue; | |||
topvalue = selvalue - (selvalue % 500); | |||
} | |||
for(i = 500; i <= selarr.length; i += 500) | |||
{ | |||
if(!selarr[i]) continue; | |||
for (i = 500; i <= selarr.length; i += 500) { | |||
if (!selarr[i]) continue; | |||
aOption = document.createElement('OPTION'); | |||
if(i == topvalue) { | |||
if (i == topvalue) { | |||
aOption = document.createElement('OPTION'); | |||
aOption.text = selarr[i]; | |||
aOption.value = i; | |||
@@ -201,15 +191,14 @@ function MakeTopSelect(emname, selvalue) | |||
aOption.value = 0; | |||
selObj.options.add(aOption); | |||
//当大类有值输出子类 | |||
if(topvalue > 0) | |||
if (topvalue > 0) | |||
{ | |||
var selv = topvalue; | |||
var maxv = parseInt(topvalue) + 500; | |||
for(i = selv + 1; i < maxv; i++) | |||
{ | |||
if(!selarr[i]) continue; | |||
for (i = selv + 1; i < maxv; i++) { | |||
if (!selarr[i]) continue; | |||
aOption = document.createElement('OPTION'); | |||
if(i == sonvalue) { | |||
if (i == sonvalue) { | |||
aOption = document.createElement('OPTION'); | |||
aOption.text = selarr[i]; | |||
aOption.value = i; | |||
@@ -225,8 +214,7 @@ function MakeTopSelect(emname, selvalue) | |||
} | |||
document.getElementById('span_'+emname+'_son').appendChild(selObj); | |||
//若存在第三级则创建 | |||
if(secvalue > 0) | |||
{ | |||
if (secvalue > 0) { | |||
selObj = document.createElement("select"); | |||
selObj.name = emname + '_sec'; | |||
selObj.id = emname + '_sec'; | |||
@@ -239,11 +227,10 @@ function MakeTopSelect(emname, selvalue) | |||
var selv = sonvalue; | |||
var maxv = parseInt(sonvalue) + 0.5; | |||
i = 0; | |||
for(i = selv + 0.001; i < maxv; i = FloatAdd(i, 0.001)) | |||
{ | |||
if(!selarr[i]) continue; | |||
for (i = selv + 0.001; i < maxv; i = FloatAdd(i, 0.001)) { | |||
if (!selarr[i]) continue; | |||
aOption = document.createElement('OPTION'); | |||
if(i == secvalue) { | |||
if (i == secvalue) { | |||
aOption = document.createElement('OPTION'); | |||
aOption.text = selarr[i]; | |||
aOption.value = i; | |||
@@ -272,7 +259,7 @@ function FloatAdd(arg1, arg2) | |||
function clear(o) | |||
{ | |||
l=o.length; | |||
for (i = 0; i< l; i++){ | |||
for (i = 0; i< l; i++) { | |||
o.options[1]=null; | |||
} | |||
} |
@@ -1,15 +1,15 @@ | |||
function checkSubmit() | |||
{ | |||
if(document.form1.title.value=='') { | |||
if (document.form1.title.value=='') { | |||
alert("图片标题不能为空"); | |||
document.form1.title.focus(); | |||
return false; | |||
} | |||
if(document.form1.typeid.value==0) { | |||
if (document.form1.typeid.value==0) { | |||
alert("所属栏目必须选择"); | |||
return false; | |||
} | |||
if(document.form1.typeid.options[document.form1.typeid.selectedIndex].className!='option3') | |||
if (document.form1.typeid.options[document.form1.typeid.selectedIndex].className!='option3') | |||
{ | |||
alert("所属栏目必须选择白色背景的项目"); | |||
return false; | |||
@@ -21,7 +21,7 @@ function checkSubmit() | |||
function CheckSelTable(nnum){ | |||
var cbox = document.getElementById('isokcheck'+nnum); | |||
var seltb = document.getElementById('seltb'+nnum); | |||
if(!cbox.checked) seltb.style.display = 'none'; | |||
if (!cbox.checked) seltb.style.display = 'none'; | |||
else seltb.style.display = 'block'; | |||
} | |||
var startNum = 1; | |||
@@ -33,12 +33,12 @@ function MakeUpload(mnum) | |||
var fhtml = ""; | |||
var dsel = " checked='checked' "; | |||
var dplay = "display:none"; | |||
if(mnum==0) endNum = startNum + Number(pnumObj.value); | |||
if (mnum==0) endNum = startNum + Number(pnumObj.value); | |||
else endNum = mnum; | |||
if(endNum>120) endNum = 120; | |||
for(startNum;startNum < endNum;startNum++) | |||
if (endNum>120) endNum = 120; | |||
for (startNum;startNum < endNum;startNum++) | |||
{ | |||
if(startNum==1){ | |||
if (startNum==1){ | |||
dsel = " checked='checked' "; | |||
dplay = "block"; | |||
} else { | |||
@@ -74,12 +74,12 @@ function LoadTestDiv() | |||
var newobj = document.getElementById('_myhtml'); | |||
document.getElementById('imagebody').value = document.getElementById('copyhtml').innerHTML; | |||
var dfstr = '粘贴到这里...'; | |||
if(document.getElementById('imagebody').value.length <= dfstr.length) | |||
if (document.getElementById('imagebody').value.length <= dfstr.length) | |||
{ | |||
alert('您还没有粘贴任何东西在编辑框'); | |||
return; | |||
} | |||
if(!newobj){ | |||
if (!newobj){ | |||
newobj = document.createElement("DIV"); | |||
newobj.id = '_myhtml'; | |||
newobj.style.position='absolute'; | |||
@@ -105,21 +105,21 @@ function LoadTestDiv() | |||
} | |||
function checkMuList(psid,cmid) | |||
{ | |||
if(document.getElementById('pagestyle3').checked) | |||
if (document.getElementById('pagestyle3').checked) | |||
{ | |||
document.getElementById('spagelist').style.display = 'none'; | |||
} | |||
else if(document.getElementById('pagestyle1').checked) | |||
else if (document.getElementById('pagestyle1').checked) | |||
{ | |||
document.getElementById('spagelist').style.display = 'block'; | |||
} else { | |||
document.getElementById('spagelist').style.display = 'none'; | |||
} | |||
} | |||
//图片,显示与隐藏zip文件选项 | |||
//图片显示与隐藏zip文件选项 | |||
function ShowZipField(formitem,zipid,upid) | |||
{ | |||
if(formitem.checked){ | |||
if (formitem.checked){ | |||
document.getElementById(zipid).style.display = 'block'; | |||
document.getElementById(upid).style.display = 'none'; | |||
document.getElementById('formhtml').checked = false; | |||
@@ -128,14 +128,14 @@ function ShowZipField(formitem,zipid,upid) | |||
document.getElementById(zipid).style.display = 'none'; | |||
} | |||
} | |||
//图片,显示与隐藏Html编辑框 | |||
//图片显示与隐藏Html编辑框 | |||
function ShowHtmlField(formitem,htmlid,upid) | |||
{ | |||
if($Nav()!="IE"){ | |||
if ($Nav()!="IE"){ | |||
alert("该方法不适用于非IE浏览器"); | |||
return ; | |||
} | |||
if(formitem.checked){ | |||
if (formitem.checked){ | |||
document.getElementById(htmlid).style.display = 'block'; | |||
} else { | |||
document.getElementById(htmlid).style.display = 'none'; | |||
@@ -5,15 +5,12 @@ function $DE(id) { | |||
//读写cookie函数 | |||
function GetCookie(c_name) | |||
{ | |||
if (document.cookie.length > 0) | |||
{ | |||
if (document.cookie.length > 0) { | |||
c_start = document.cookie.indexOf(c_name + "=") | |||
if (c_start != -1) | |||
{ | |||
if (c_start != -1) { | |||
c_start = c_start + c_name.length + 1; | |||
c_end = document.cookie.indexOf(";",c_start); | |||
if (c_end == -1) | |||
{ | |||
if (c_end == -1) { | |||
c_end = document.cookie.length; | |||
} | |||
return unescape(document.cookie.substring(c_start,c_end)); | |||
@@ -715,7 +715,7 @@ class SgListView | |||
$optionlen = strlen($totalpage); | |||
$optionlen = $optionlen*10+18; | |||
$optionlist = "<li><select name='sldd' style='width:{$optionlen}px' onchange='location.href=this.options[this.selectedIndex].value;'>\r\n"; | |||
for($mjj=1;$mjj<=$totalpage;$mjj++) | |||
for ($mjj=1;$mjj<=$totalpage;$mjj++) | |||
{ | |||
if ($mjj==$this->PageNo) | |||
{ | |||
@@ -5,16 +5,14 @@ function SpHtml2Text($str) | |||
$str = preg_replace("/<sty(.*)\\/style>|<scr(.*)\\/script>|<!--(.*)-->/isU","",$str); | |||
$alltext = ""; | |||
$start = 1; | |||
for($i=0;$i<strlen($str);$i++) | |||
for ($i=0;$i<strlen($str);$i++) | |||
{ | |||
if ($start==0 && $str[$i]==">") | |||
{ | |||
if ($start==0 && $str[$i]==">") { | |||
$start = 1; | |||
} | |||
else if ($start==1) | |||
{ | |||
if ($str[$i]=="<") | |||
{ | |||
if ($str[$i]=="<") { | |||
$start = 0; | |||
$alltext .= " "; | |||
} | |||
@@ -31,7 +31,7 @@ if (!defined('DEDEINC')) exit('dedebiz'); | |||
$len = count($frame); | |||
foreach ($frame as &$frameLine) { | |||
for($i=0; $i<$len; $i++) { | |||
for ($i=0; $i<$len; $i++) { | |||
$frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; | |||
} | |||
} | |||
@@ -116,8 +116,8 @@ if (!defined('DEDEINC')) exit('dedebiz'); | |||
public static function dumpMask($frame) | |||
{ | |||
$width = count($frame); | |||
for($y=0;$y<$width;$y++) { | |||
for($x=0;$x<$width;$x++) { | |||
for ($y=0;$y<$width;$y++) { | |||
for ($x=0;$x<$width;$x++) { | |||
echo ord($frame[$y][$x]).','; | |||
} | |||
} | |||
@@ -31,7 +31,7 @@ | |||
$dsql->SetQuery("SELECT * FROM `#@__flink` WHERE ischeck>0 ORDER BY sortrank ASC"); | |||
$dsql->Execute(); | |||
$revalue = ""; | |||
for($i=1;$i<=$row;$i++) | |||
for ($i=1;$i<=$row;$i++) | |||
{ | |||
if ($dbrow=$dsql->GetObject()) | |||
{ | |||