Browse Source

page

master
林一峰 8 years ago
parent
commit
ee6675cece
  1. 18
      app/Common/function.php
  2. 2
      resources/views/admin/searchword/index.blade.php

18
app/Common/function.php

@ -56,9 +56,14 @@ function get_front_url($param='')
else if($param['type'] == 'page')
{
//单页面
$url .= '/'.$param['pagename'].'.html';
$url .= '/page/'.$param['pagename'];
}
else if($param['type'] == 'search')
{
//tags页面
$url .= '/s'.$param['searchid'];
}
return $url;
}
@ -85,7 +90,12 @@ function get_wap_front_url(array $param)
else if($param['type'] == 'page')
{
//单页面
$url .= '/'.$param['pagename'].'.html';
$url .= '/page/'.$param['pagename'];
}
else if($param['type'] == 'search')
{
//tags页面
$url .= '/s'.$param['searchid'];
}
return $url;
@ -862,7 +872,7 @@ function object_to_array($object, $get=0)
$res[$key] = (array)$value;
}
}
else
elseif($get==1)
{
$res = (array)$object;
}

2
resources/views/admin/searchword/index.blade.php

@ -21,7 +21,7 @@
<td><?php echo $row->id; ?></td>
<td><a href="/fladmin/searchword/edit?id=<?php echo $row->id; ?>"><?php echo $row->name; ?></a></td>
<td><?php echo date('Y-m-d',$row->pubdate); ?></td>
<td><a target="_blank" href="<?php echo get_front_url(array("type"=>"tags","tagid"=>$row->id)); ?>">预览</a>&nbsp;<a href="/fladmin/searchword/edit?id=<?php echo $row->id; ?>">修改</a>&nbsp;<a onclick="delconfirm('/fladmin/searchword/del?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a></td>
<td><a target="_blank" href="<?php echo get_front_url(array("type"=>"search","searchid"=>$row->id)); ?>">预览</a>&nbsp;<a href="/fladmin/searchword/edit?id=<?php echo $row->id; ?>">修改</a>&nbsp;<a onclick="delconfirm('/fladmin/searchword/del?id=<?php echo $row->id; ?>')" href="javascript:;">删除</a></td>
</tr>
<?php } ?>
</tbody>

Loading…
Cancel
Save