Ver código fonte

修正外部链接https链接问题和数据优化

tags/6.2.0
xushubieli 2 anos atrás
pai
commit
d9f02150d0
9 arquivos alterados com 225 adições e 227 exclusões
  1. +1
    -1
      src/admin/article_keywords_select.php
  2. +81
    -81
      src/admin/catalog_edit.php
  3. +1
    -1
      src/admin/inc/inc_menu.php
  4. +2
    -2
      src/admin/mychannel_main.php
  5. +1
    -1
      src/admin/templets/catalog_edit.htm
  6. +2
    -4
      src/admin/templets/mychannel_main.htm
  7. +135
    -135
      src/install/sql-dfdata.txt
  8. +1
    -1
      src/system/helpers/channelunit.helper.php
  9. +1
    -1
      src/theme/templets/navbar.htm

+ 1
- 1
src/admin/article_keywords_select.php Ver arquivo

@@ -23,7 +23,7 @@ $dlist->Display();
function GetSta($sta)
{
if ($sta == 1) return "正常";
else return "<span style='color:#dc3545'>禁用</span>";
else return "<span class='text-danger'>禁用</span>";
}
function GetMan($sta)
{


+ 81
- 81
src/admin/catalog_edit.php Ver arquivo

@@ -158,87 +158,87 @@ while ($row = $dsql->GetObject()) {
PutCookie('lastCid', GetTopid($id), 3600 * 24, "/");
if ($dopost == 'time') {
?>
<form name="form1" action="catalog_edit.php" method="post" onSubmit="return checkSubmit();">
<input type="hidden" name="dopost" value="savetime">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<input type="hidden" name="topid" value="<?php echo $myrow['topid']; ?>">
<input type="hidden" name="moresite" value="<?php echo $myrow['moresite']; ?>">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="160" class="bline" height="26" align="center">是否支持投稿:</td>
<td class="bline">
<label><input type='radio' name='issend' value='0' class='np' <?php if ($myrow['issend'] == "0") echo " checked='1' "; ?>>&nbsp;不支持</label>
<label><input type='radio' name='issend' value='1' class='np' <?php if ($myrow['issend'] == "1") echo " checked='1' "; ?>>&nbsp;支持</label>
</td>
</tr>
<tr>
<td class="bline" height="26" align="center">内容模型:</td>
<td class="bline">
<?php
foreach ($channelArray as $k => $arr) {
if ($k == $channelid) echo "{$arr['typename']} | {$arr['nid']}";
}
?>
<a href='catalog_edit.php?id=<?php echo $id; ?>' class='btn btn-success btn-sm'>更多模型</a>
</td>
</tr>
<tr>
<td class="bline" height="26" align="center">栏目名称:</td>
<td class="bline"><input name="typename" type="text" id="typename" value="<?php echo $myrow['typename'] ?>" style="width:260px" class="iptxt"></td>
</tr>
<tr>
<td class="bline" height="26" align="center"> 排列顺序:</td>
<td class="bline"> <input name="sortrank" type="text" value="<?php echo $myrow['sortrank'] ?>" style="width:100px" class="iptxt">(由低 &gt; 高)</td>
</tr>
<tr>
<td class="bline" height="26" align="center">浏览权限:</td>
<td class="bline">
<select name="corank" id="corank" style="width:100px">
<?php
$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank` >= 0");
$dsql->Execute();
while ($row = $dsql->GetObject()) {
if ($myrow['corank'] == $row->rank)
echo "<option value='".$row->rank."' selected>".$row->membername."</option>\r\n";
else
echo "<option value='".$row->rank."'>".$row->membername."</option>\r\n";
}
?>
</select>(仅限制栏目里的文档浏览权限)
</td>
</tr>
<tr>
<td class="bline" height="26" align="center">文件保存目录:</td>
<td class="bline"><input name="typedir" type="text" id="typedir" value="<?php echo $myrow['typedir'] ?>" style="width:260px"class="iptxt"></td>
</tr>
<tr>
<td height="26" align="center" class="bline">栏目列表选项:</td>
<td class="bline">
<label><input type='radio' name='isdefault' value='1' class='np' <?php if ($myrow['isdefault'] == 1) echo " checked='1' "; ?>>&nbsp;链接到默认页</label>
<label><input type='radio' name='isdefault' value='0' class='np' <?php if ($myrow['isdefault'] == 0) echo " checked='1' "; ?>>&nbsp;链接到列表第一页</label>
<label><input type='radio' name='isdefault' value='-1' class='np' <?php if ($myrow['isdefault'] == -1) echo " checked='1' "; ?>>&nbsp;使用动态页</label>
</td>
</tr>
<tr>
<td class="bline" height="26" align="center">默认页的名称:</td>
<td class="bline"><input name="defaultname" type="text" value="<?php echo $myrow['defaultname'] ?>" style="width:260px" class="iptxt"></td>
</tr>
<tr>
<td height="26" class="bline" align="center">栏目属性:</td>
<td class="bline">
<label><input name="ispart" type="radio" id="radio" value="0" class='np' <?php if ($myrow['ispart'] == 0) echo " checked='1' "; ?>>&nbsp;最终列表栏目(允许在本栏目发布文档,并生成文档列表)</label><br>
<label><input name="ispart" type="radio" id="radio2" value="1" class='np' <?php if ($myrow['ispart'] == 1) echo " checked='1' "; ?>>&nbsp;频道封面(栏目本身不允许发布文档)</label><br>
<label><input name="ispart" type="radio" id="radio3" value="2" class='np' <?php if ($myrow['ispart'] == 2) echo " checked='1' "; ?>>&nbsp;外部连接(在"文件保存目录"处填写网址)</label>
</td>
</tr>
<tr>
<td bgcolor="#F8FCF1" colspan="2" align="center" class="py-3">
<button onclick='getSelCat("<?php echo $targetid; ?>");' class='btn btn-success btn-sm'>保存</button>
<button type='button' onclick='CloseMsg()' class='btn btn-success btn-sm'>关闭</button>
</td>
</tr>
</table>
</form>
<form name="form1" action="catalog_edit.php" method="post" onSubmit="return checkSubmit();">
<input type="hidden" name="dopost" value="savetime">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<input type="hidden" name="topid" value="<?php echo $myrow['topid']; ?>">
<input type="hidden" name="moresite" value="<?php echo $myrow['moresite']; ?>">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="160" class="bline" height="26" align="center">是否支持投稿:</td>
<td class="bline">
<label><input type='radio' name='issend' value='0' class='np' <?php if ($myrow['issend'] == "0") echo " checked='1' "; ?>>&nbsp;不支持</label>
<label><input type='radio' name='issend' value='1' class='np' <?php if ($myrow['issend'] == "1") echo " checked='1' "; ?>>&nbsp;支持</label>
</td>
</tr>
<tr>
<td class="bline" height="26" align="center">内容模型:</td>
<td class="bline">
<?php
foreach ($channelArray as $k => $arr) {
if ($k == $channelid) echo "{$arr['typename']} | {$arr['nid']}";
}
?>
<a href='catalog_edit.php?id=<?php echo $id; ?>' class='btn btn-success btn-sm'>更多模型</a>
</td>
</tr>
<tr>
<td class="bline" height="26" align="center">栏目名称:</td>
<td class="bline"><input name="typename" type="text" id="typename" value="<?php echo $myrow['typename'] ?>" style="width:260px" class="iptxt"></td>
</tr>
<tr>
<td class="bline" height="26" align="center"> 排列顺序:</td>
<td class="bline"> <input name="sortrank" type="text" value="<?php echo $myrow['sortrank'] ?>" style="width:100px" class="iptxt">(由低 &gt; 高)</td>
</tr>
<tr>
<td class="bline" height="26" align="center">浏览权限:</td>
<td class="bline">
<select name="corank" id="corank" style="width:100px">
<?php
$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank` >= 0");
$dsql->Execute();
while ($row = $dsql->GetObject()) {
if ($myrow['corank'] == $row->rank)
echo "<option value='".$row->rank."' selected>".$row->membername."</option>\r\n";
else
echo "<option value='".$row->rank."'>".$row->membername."</option>\r\n";
}
?>
</select>(仅限制栏目里的文档浏览权限)
</td>
</tr>
<tr>
<td class="bline" height="26" align="center">文件保存目录:</td>
<td class="bline"><input name="typedir" type="text" id="typedir" value="<?php echo $myrow['typedir'] ?>" style="width:260px"class="iptxt"></td>
</tr>
<tr>
<td height="26" align="center" class="bline">栏目列表选项:</td>
<td class="bline">
<label><input type='radio' name='isdefault' value='1' class='np' <?php if ($myrow['isdefault'] == 1) echo " checked='1' "; ?>>&nbsp;链接到默认页</label>
<label><input type='radio' name='isdefault' value='0' class='np' <?php if ($myrow['isdefault'] == 0) echo " checked='1' "; ?>>&nbsp;链接到列表第一页</label>
<label><input type='radio' name='isdefault' value='-1' class='np' <?php if ($myrow['isdefault'] == -1) echo " checked='1' "; ?>>&nbsp;使用动态页</label>
</td>
</tr>
<tr>
<td class="bline" height="26" align="center">默认页的名称:</td>
<td class="bline"><input name="defaultname" type="text" value="<?php echo $myrow['defaultname'] ?>" style="width:260px" class="iptxt"></td>
</tr>
<tr>
<td height="26" class="bline" align="center">栏目属性:</td>
<td class="bline">
<label><input name="ispart" type="radio" id="radio" value="0" class='np' <?php if ($myrow['ispart'] == 0) echo " checked='1' "; ?>>&nbsp;最终列表栏目(允许在本栏目发布文档,并生成文档列表)</label><br>
<label><input name="ispart" type="radio" id="radio2" value="1" class='np' <?php if ($myrow['ispart'] == 1) echo " checked='1' "; ?>>&nbsp;频道封面(栏目本身不允许发布文档)</label><br>
<label><input name="ispart" type="radio" id="radio3" value="2" class='np' <?php if ($myrow['ispart'] == 2) echo " checked='1' "; ?>>&nbsp;外部连接(在"文件保存目录"处填写网址)</label>
</td>
</tr>
<tr>
<td bgcolor="#F8FCF1" colspan="2" align="center" class="py-3">
<button onclick='getSelCat("<?php echo $targetid; ?>");' class='btn btn-success btn-sm'>保存</button>
<button type='button' onclick='CloseMsg()' class='btn btn-success btn-sm'>关闭</button>
</td>
</tr>
</table>
</form>
<?php
exit();
} else {


+ 1
- 1
src/admin/inc/inc_menu.php Ver arquivo

@@ -116,7 +116,7 @@ $adminMenu1
<m:item name='会员短信管理' link='member_pm.php' rank='member_Type' target='main' />
</m:top>
$adminMenu2
<m:top item='1_5_10_' name='系统帮助' display='none'>
<m:top item='5_10_' name='系统帮助' display='none'>
<m:item name='系统概况' link='$cfg_biz_helpUrl' rank='' target='_blank' />
<m:item name='代码托管' link='$cfg_biz_gitUrl' rank='' target='_blank' />
</m:top>";

+ 2
- 2
src/admin/mychannel_main.php Ver arquivo

@@ -20,9 +20,9 @@ $dlist->display();
function GetSta($sta, $id)
{
if ($sta == 1) {
return ($id != -1 ? "启用 &gt; <a href='mychannel_edit.php?dopost=hide&id=$id'>禁用</a>" : "固定项目");
return ($id != -1 ? "<span class='text-success'>启用</span> &gt; <a href='mychannel_edit.php?dopost=hide&id=$id'>禁用</a>" : "固定项目");
} else {
return "禁用 &gt; <a href='mychannel_edit.php?dopost=show&id=$id'>启用</a>";
return "<span class='text-danger'>禁用</span> &gt; <a href='mychannel_edit.php?dopost=show&id=$id'>启用</a>";
}
}
function IsSystem($s)


+ 1
- 1
src/admin/templets/catalog_edit.htm Ver arquivo

@@ -244,7 +244,7 @@
</tr>
<tr>
<td class="bline" height="26" style="padding-left:10px">文件保存目录:</td>
<td class="bline"><input name="typedir" type="text" id="typedir" value="<?php echo $myrow['typedir']?>" class="iptxt" style="width:260px">(填写{cmspath}/a/b/c生成目录“域名/a/b/c”标签{cmspath}必填)</td>
<td class="bline"><input name="typedir" type="text" id="typedir" value="<?php echo $myrow['typedir']?>" class="iptxt" style="width:260px">(标签{cmspath}必填,请勿删除)</td>
</tr>
<tr>
<td height="26" style="padding-left:10px">栏目列表选项:</td>


+ 2
- 4
src/admin/templets/mychannel_main.htm Ver arquivo

@@ -1,4 +1,4 @@
{dede:config name='pagesize' value='30' /}
{dede:config name='pagesize' value='30'/}
<!DOCTYPE html>
<html>
<head>
@@ -56,9 +56,7 @@
</tr>'}
<tr height="26" align="center" onmousemove="javascript:this.bgColor='#F8FCF1';" onmouseout="javascript:this.bgColor='#ffffff';">
<td>{dede:field.id /}</td>
<td>
<a href='mychannel_edit.php?id={dede:field.id/}&dopost=edit'>{dede:field.typename /}</a>
</td>
<td><a href='mychannel_edit.php?id={dede:field.id/}&dopost=edit'>{dede:field.typename /}</a></td>
<td>{dede:field.nid /}</td>
<td>{dede:field.addtable function="str_replace('#@__',$cfg_dbprefix,@me)" /}</td>
<td>{dede:field.isshow function="GetSta(@me,$fields['id'])" /}</td>


+ 135
- 135
src/install/sql-dfdata.txt
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 1
- 1
src/system/helpers/channelunit.helper.php Ver arquivo

@@ -375,7 +375,7 @@ function GetSonIdsLogic($id, $sArr, $channel = 0, $addthis = false)
*/
function MfTypedir($typedir)
{
if (preg_match("/^http:|^ftp:/i", $typedir)) return $typedir;
if (preg_match("/^(http|https|ftp):/i", $typedir)) return $typedir;
$typedir = str_replace("{cmspath}", $GLOBALS['cfg_cmspath'], $typedir);
$typedir = preg_replace("/\/{1,}/", "/", $typedir);
return $typedir;


+ 1
- 1
src/theme/templets/navbar.htm Ver arquivo

@@ -11,7 +11,7 @@
</li>
{dede:channel type='top' row='10' currentstyle="<li class='nav-item'><a class='nav-link active' href='~typelink~' ~rel~><span>~typename~</span></a></li>"}
<li class="nav-item">
<a class="nav-link" href="[field:typeurl/]" typeid=[field:id/]>[field:typename/]</a>
<a class="nav-link" href="[field:typeurl/]">[field:typename/]</a>
</li>
{/dede:channel}
</ul>


Carregando…
Cancelar
Salvar