PHP phpcms

install_package -> phpcms -> languages(语言包)
-> libs(系统的类)
-> model(模型)
-> plugin(插件)
-> templates(模板文件夹*) -> default(系统默认模板文件夹)-> content(主要使用的内容)
install_package -> statics(*) -> css/js/images/plugin
install_package -> uploadfile(上传的文件)
install_package -> caches(缓存文件)

文件存放位置

           

header.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{if isset($SEO[‘title‘]) && !empty($SEO[‘title‘])}{$SEO[‘title‘]}{/if}{$SEO[‘site_title‘]}</title>

<meta name="keywords" content="{$SEO[‘keyword‘]}">
<meta name="description" content="{$SEO[‘description‘]}">

<link href="{CSS_PATH}web_css/top.css" rel="stylesheet" type="text/css" />
<script src="{JS_PATH}web_js/jquery-1.11.2.min.js"></script>
</head>
<body>
    <div class="logo">
        <img src="{IMG_PATH}web_img/logo.png" width="200"/>
    </div>
    <div class="ming">
        天启网络发展有限公司
    </div>
    <div style="clear:both"></div>
    <div class="menu">
        <a href="{siteurl($siteid)}" class="ab"><div class="list" id="list">首页</div></a>
        {pc:content action="category" catid="0" num="5" siteid="$siteid" order="listorder ASC"}

            {loop $data $r}
            <div class="menus">
                <a href="{$r[url]}" class="ab"><div class="list">{$r[catname]}</div></a>
                <div class="erji">

                    {pc:content action="category" catid="$r[catid]" num="3" siteid="$siteid" order="listorder ASC" return="data1"}

                        {loop $data1 $v}
                            <a href="{$v[url]}" class="ab"><div class="erjis">{$v[catname]}</div></a>
                        {/loop}

                    {/pc}

                </div>
            </div>
            {/loop}
        {/pc}
        <div style="clear:both"></div>
    </div>
</body>
<script>
$(document).ready(function(e) {

       $(".menus").mouseenter(function(){

        $(".erji").css("display","none");

        $(this).children(".erji").css("display","block");

    })
    $(".menus").mouseleave(function(){

        $(this).children(".erji").css("display","none");

        })
});
</script>
</html>

top.css

@charset "utf-8";
/* CSS Document */
.logo
{
    float:left;
    width:200px;
    height:80px;
    margin-left:30px;
    margin-top:10px;}
.ming
{
    float:left;
    margin-left:10px;
    margin-top:50px;
    font-weight:bold;
    font-size:16px;
    color:#0071ba;}
.menu
{
    text-align:center;
    width:100%;
    height:50px;
    font-size:18px;
    font-weight:bold;
    margin-top:0px;
    color:#FFF;
    background-color:#0071ba;}
.list
{
    line-height:50px;
    vertical-align:middle;
    width:180px;
    height:50px;}
#list
{
    float:left;
    margin-left:200px;}
.menus
{
    float:left;}

.erji
{
    height:105px;
    width:180px;
    position:relative;
    display:none;
    }
.erjis
{
    line-height:35px;
    vertical-align:middle;
    height:35px;
    width:180px;
    font-size:16px;
    background-color:#F30;}
.ab:link
{
    color:#FFF;
    text-decoration:none;}
.ab:visited
{
    color:#FFF;
    text-decoration:none;}
.ab:hover
{
    color:#FF0;
    text-decoration:none;}
.ab:active
{
    color:#FF0;
    text-decoration:none;}

.bottom
{
    width:1350px;
    height:150px;
    background-color:#0071ba;
    text-align:center;
    color:#FFF;}
.a
{
    padding-top:50px;}
.b
{
    padding-top:10px;}

footer.html

<div class="bottom">
    <div class="a">天启网络发展有限公司版权所有 鲁ICP备12345678号</div>
    <div class="b">山东省淄博市张店共青团西路23号(原淄博市房管局大楼)A座4层 电话:0533-3113118</div>
</div>

index.html

{template "content","header"}
<link href="{CSS_PATH}web_css/index.css" rel="stylesheet" type="text/css" />
<script src="{JS_PATH}web_js/jquery-1.11.2.min.js"></script>
<script src="{JS_PATH}web_js/lunbo.js"></script>
    <div class="b">

    {pc:content  action="position" posid="18"  order="listorder DESC" thumb="1" num="3"}

        {loop $data $r}

        <a href="{$r[‘url‘]}"><img class="lunbo" src="{thumb($r[‘thumb‘],1200,300)}" width="1200" height="300" style="display:block" /></a>

        {/loop}
  {/pc}

    </div>
    <div class="c">
        <div class="c1"><div class="c11">最新公告</div></div>

        <div class="c2"><marquee align="left">
            7月12日,天启网络与纵横科技签署合作协议。依据协议,双方 将建立平等互利、优势互补、资源共享、合作共赢的战略合作伙 伴关系,共同推动网络科技产业开放、创新、融合。
        </marquee></div>
    </div>
    <div class="d">
        <div class="d1">
            <div class="d11"><img src="{IMG_PATH}web_img/d11.png" width="390" height="80" /></div>
            <div class="d12"><img src="{IMG_PATH}web_img/d12.png" width="390" height="330" /></div>
        </div>
        <div class="d2">
            <div class="d21">
                <div class="d211">
                    <div class="z">
                        <div class="z1">{$CATEGORYS[10][‘catname‘]}</div>
                        <div class="z2"><a href="{$CATEGORYS[10][‘url‘]}">更多>></a></div>
                        <div style="clear:both"></div>
                    </div>
                    {pc:content  action="lists" catid="10" order="updatetime DESC" num="6" return="info"}

                         {loop $info $n}

                             <a href="{$n[‘url‘]}"><div class="z3">&nbsp; . &nbsp;{str_cut($n[‘title‘],92)}</div></a>

                         {/loop}

                     {/pc}
                </div>
                <div class="d212">
                    <div class="z">
                        <div class="z1">{$CATEGORYS[6][‘catname‘]}</div>
                        <div class="z2"><a href="$CATEGORYS[6][‘url‘]}">更多>></a></div>
                        <div style="clear:both"></div>
                    </div>
                    {pc:content  action="lists" catid="6" order="updatetime DESC" num="6" return="infos"}

                         {loop $infos $m}

                             <a href="{$m[‘url‘]}"><div class="z3">&nbsp; . &nbsp;{str_cut($m[‘title‘],92)}</div></a>

                         {/loop}

                    {/pc}
                </div>
                <div style="clear:both"></div>
             </div>
             <div class="d22">

             {pc:content  action="position" posid="19"  order="listorder DESC" thumb="1" num="3" return="data1"}

                {loop $data1 $v}

                <a href="{$v[‘url‘]}"><img class="lunbos" src="{thumb($v[‘thumb‘],800,165)}" width="800" height="165" style="display:block" /></a>

                {/loop}
              {/pc}
            </div>
          </div>
           <div style="clear:both"></div>
        </div>
        <div class="e">
        <div class="e1">
            <div class="z1">{$CATEGORYS[11][‘catname‘]}</div>
            <div class="z2"><a href="{$CATEGORYS[11][‘url‘]}">更多>></a></div>
        </div>
        <div class="e2">
             {pc:content  action="position" posid="21"  order="listorder DESC" num="4" teturn="dat"}

                {loop $dat $t}

                        <div class="e21">{str_cut($t[‘title‘],32)}</div>
                    <div class="e22"><a href="{$t[‘url‘]}"><img src="{thumb($t[‘thumb‘],250,150)}" width="250" height="150" /></a></div>
                    <div class="e23">{$t[‘description‘]}</div>
                      <div class="e24"><a href="{$t[‘url‘]}">更多>></a></div>    

                {/loop}
              {/pc}

        </div>
        <div style="clear:both"></div>
    </div>
 </div>
{template "content","footer"}

index.css

@charset "utf-8";
/* CSS Document */
.
{
    text-align:center;}
a:link
{
    color:#0071ba;
    text-decoration:none;}
a:visited
{
    color:#0071ba;
    text-decoration:none;}
a:hover
{
    color:#F30;
    text-decoration:none;}
a:active
{
    color:#F30;
    text-decoration:none;}
.b
{
    margin-left:50px;
    width:1200px;
    height:300px;}
.lunbo
{
    display:none;}
.c
{
    margin-left:50px;
    width:1200px;
    height:60px;
    margin-top:10px;}
.c1
{
    width:1200px;
    height:30px;
    color:#0071ba;
    font-weight:bold;
    background-color:#f4f4f4}
.c11
{
    width:100px;
    height:25px;
    padding-top:5px;}
.c2
{}
.d
{
    margin-left:50px;
    width:1200px;
    height:390px;
    margin-top:10px;}
.d1
{
    float:left;
    width:390px;
    height:390px;}
.d11
{
    width:390px;
    height:80px;}
.d12
{
    width:390px;
    height:330px;
    margin-top:3px;}
.d2
{
    float:left;
    width:800px;
    height:390px;
    margin-left:10px;
    text-align:left;}
.d21
{
    width:800px;
    height:230px;}
.d211
{
    float:left;
    width:500px;
    height:230px;}
.d212
{
    float:left;
    width:290px;
    height:230px;
    margin-left:10px;}
.d22
{
    width:800px;
    height:165px;
    margin-top:10px;}
.lunbos
{
    display:none;}
.e
{
    margin-left:50px;
    width:1200px;
    height:300px;
    margin-top:35px;}
.e1
{
    width:1200px;
    height:35px;
    background-color:#f4f4f4;}
.e2
{
    margin-top:10px;
    float:left;
    width:300px;
    height:300px;}
.e21
{
    width:300px;
    height:35px;
    color:#0071ba;
    font-weight:bold;
    font-size:20px;}
.e22
{
    width:300px;
    height:150px;}
.e23
{
    margin-top:15px;
    width:300px;
    height:50px;}
.e24
{
    width:300px;
    height:50px;
    color:#0071ba;
    margin-left:110px;
    font-size:15px;}
.z
{
    height:35px;
    font-size:15px;
    background-color:#f4f4f4;}
.z1
{
    float:left;
    width:100px;
    height:25px;
    font-size:20px;
    margin-top:5px;
    margin-left:10px;
    font-weight:bold;
    color:#0071ba;}
.z2
{
    float:right;
    margin-right:10px;
    width:50px;
    height:25px;
    color:#0071ba;
    font-size:15px;
    margin-top:10px;}
.z3
{
    padding-left:5px;
    height:30px;
    line-height:30px;
    vertical-align:middle;
    margin-top:3px;}

lunbo.js

// JavaScript Document

var n=0;//当前要显示的图片索引
var m=0;

function ShowNow()
{
    var img=$(".lunbo");//找到所有class为lunbo的图片

    //隐藏素有图片
    img.css("display","none");
    //显示第n条
    img.eq(n).css("display","block");

    if(n>=img.length-1)
    {
        n=0;
    }
    else
    {
        n++;
    }

    var imgs=$(".lunbos");//找到所有class为lunbo的图片

    //隐藏素有图片
    imgs.css("display","none");
    //显示第n条
    imgs.eq(m).css("display","block");

    if(m>=imgs.length-1)
    {
        m=0;
    }
    else
    {
        m++;
    }
}
//间隔多久执行一次
window.setInterval("ShowNow()",1000);

category.html

{template "content","header"}

<link href="{CSS_PATH}web_css/list.css" rel="stylesheet" type="text/css" />

<div class="z">
    <div class="a">

         {if $CATEGORYS[$catid][‘parentid‘]==0} <img src="{$CATEGORYS[$catid][image]}" width="1200" height="200" alt="{$catname}" /> {else} <img src="{$CATEGORYS[$CATEGORYS[$catid][‘parentid‘]][image]}" width="1200" height="200" alt="{$catname}" /> {/if} 

    </div>
    <div class="b">
        <div class="b1">栏目列表</div>
        <div class="b2">
            {pc:content action="category" catid="$parentid" num="10" siteid="$siteid" order="listorder ASC" return="data1"}

                {loop $data1 $v}

                    <a href="{$v[url]}"><div>{$v[catname]}</div></a>

                    {pc:content action="category" catid="$v[catid]" num="10" siteid="$siteid" order="listorder ASC" return="data"}

                        {loop $data $r}
                                <a href="{$r[url]}"><div style="margin-left:20px">{$r[catname]}</div></a>
                        {/loop}

                    {/pc}

                {/loop}

            {/pc}
        </div>
    </div>
    <div class="c">
        <div class="c1">{catpos($catid)}文章列表</div>
        <hr />
        <div class="c2">
            {pc:content action="lists" catid="$catid" num="10" order="id DESC" page="$page"}

                {loop $data $r}

                    <a href="{$r[url]}"><div>{date(‘Y-m-d H:i:s‘,$r[inputtime])}--{$r[title]}</div></a>

                {/loop}

                   <div id="pages" class="text-c">{$pages}</div>
            {/pc}
        </div>
    </div>
    <div style="clear:both"></div>
</div>
{template "content","footer"}

list.html

{template "content","header"}

<link href="{CSS_PATH}web_css/list.css" rel="stylesheet" type="text/css" />

<div class="z">
    <div class="a">

         {if $CATEGORYS[$catid][‘parentid‘]==0} <img src="{$CATEGORYS[$catid][image]}" width="1200" height="200" alt="{$catname}" /> {else} <img src="{$CATEGORYS[$CATEGORYS[$catid][‘parentid‘]][image]}" width="1200" height="200" alt="{$catname}" /> {/if} 

    </div>
    <div class="b">
        <div class="b1">栏目列表</div>
        <div class="b2">
            {pc:content action="category" catid="$parentid" num="10" siteid="$siteid" order="listorder ASC" return="data1"}

                {loop $data1 $v}

                    <a href="{$v[url]}"><div>{$v[catname]}</div></a>

                    {pc:content action="category" catid="$v[catid]" num="10" siteid="$siteid" order="listorder ASC" return="data"}

                        {loop $data $r}
                                <a href="{$r[url]}"><div style="margin-left:20px">{$r[catname]}</div></a>
                        {/loop}

                    {/pc}

                {/loop}

            {/pc}
        </div>
    </div>
    <div class="c">
        <div class="c1">{catpos($catid)}文章列表</div>
        <hr />
        <div class="c2">
            {pc:content action="lists" catid="$catid" num="10" order="id DESC" page="$page"}

                {loop $data $r}

                    <a href="{$r[url]}"><div>{date(‘Y-m-d H:i:s‘,$r[inputtime])}--{$r[title]}</div></a>

                {/loop}

                   <div id="pages" class="text-c">{$pages}</div>
            {/pc}
        </div>
    </div>
    <div style="clear:both"></div>
</div>
{template "content","footer"}

list.css

/* CSS Document */
.z
{
    width:1200px;
    height:700px;
    margin-left:70px;}
.a
{
    width:1200px;
    height:200px;}
.b
{
    float:left;
    width:230px;
    line-height:30px;
    margin-top:20px;
    font-weight:bold;}
.b1
{
    height:39px;
    width:235px;
    background-color:#f4f4f4;
    font-size:20px;
    line-height:39px;
    vertical-align:middle;
    font-weight:bold;
    text-align:center;
    color:#0071ba;}
.b2
{
    margin-left:20px;
    line-height:32px;
    vertical-align:middle;
    padding-top:5px;}
.c
{
    padding-left:20px;
    width:950px;
    float:left;
    margin-top:32px;}
.c1
{
    font-weight:bold;}
.c2
{
    width:800px;
    margin-left:50px;
    font-size:22px;}

a:link
{
    color:#0071ba;
    text-decoration:none;}
a:visited
{
    color:#0071ba;
    text-decoration:none;}
a:hover
{
    color:#F30;
    text-decoration:none;}
a:active
{
    color:#F30;
    text-decoration:none;}

show.html

{template "content","header"}

<link href="{CSS_PATH}web_css/show.css" rel="stylesheet" type="text/css" />

<div class="z">
    <div class="a">

         {if $CATEGORYS[$catid][‘parentid‘]==0} <img src="{$CATEGORYS[$catid][image]}" width="1200" height="200" alt="{$catname}" /> {else} <img src="{$CATEGORYS[$CATEGORYS[$catid][‘parentid‘]][image]}" width="1200" height="200" alt="{$catname}" /> {/if} 

    </div>
    <div class="b">
        <div class="b1">相关文章</div>
        <div class="b2">
            {pc:content action="lists" catid="$catid" num="10" order="id DESC" page="$page"}

                {loop $data $r}
                    <a href="{$r[url]}"><div>{$r[title]}</div></a>
                {/loop}

                <div id="pages" class="text-c">{$pages}</div>

            {/pc}
        </div>
    </div>
    <div class="c">
        <div class="c1">{catpos($catid)}正文</div>
        <hr />
        <div class="c2">{$title}</div>
        <div class="c3">来源:{$copyfrom} 发布时间:{$inputtime} 阅读次数:<span id="hits"></span></div>
        <div class="c4">
              <p>{$description}</p>
              <p>{$content}</p>
         </div>
         <div class="c5">{$pages}</div>
    </div>
    <div style="clear:both"></div>
</div>
{template "content","footer"}

show.css

/* CSS Document */
.z
{
    width:1200px;
    margin-left:70px;}
.a
{
    width:1200px;
    height:200px;}
.b
{
    float:left;
    width:235px;
    line-height:30px;
    margin-top:20px;
    font-size:14px;
    font-weight:bold;}
.b1
{
    height:39px;
    width:235px;
    background-color:#f4f4f4;
    font-size:20px;
    line-height:39px;
    vertical-align:middle;
    font-weight:bold;
    text-align:center;
    color:#0071ba;}
.b2
{
    line-height:32px;
    vertical-align:middle;
    padding-top:5px;}
.c
{
    padding-left:15px;
    width:950px;
    float:left;
    margin-top:22px;}
.c1
{
    font-weight:bold;}
.c2
{
    font-weight:bold;
    font-size:30px;
    color:#0071ba;
    text-align:center;}
.c3
{
    color:#999;
    height:60px;
    line-height:60px;
    vertical-align:middle;
    text-align:center;}
.c4
{
    width:950px;
    margin-top:20px;
    text-align:center;}
.c5
{
    width:1200px;
    height:100px;
    margin-left:300px;
    margin-top:35px;}

a:link
{
    color:#0071ba;
    text-decoration:none;}
a:visited
{
    color:#0071ba;
    text-decoration:none;}
a:hover
{
    color:#F30;
    text-decoration:none;}
a:active
{
    color:#F30;
    text-decoration:none;}

时间: 2024-11-05 00:08:52

PHP phpcms的相关文章

phpcms在centos服务器中安装所遇到的问题及相关漏洞补全

phpcmsV9 文件权限设置 以下文件或者目录必须可写 例如访问地址 localhost/phpcms index.html     chmod 777 index.html caches/        chmod -R 777 caches html/          chmod -R 777 html uploadfile/    chmod -R 777 uploadfile phpsso_server/caches/      chmod -R 777 phpsso_server/

phpcms ——模板标签详细使用说明

使用phpcms总是要查询各种标签,实在很烦,只好找个比较全的来备查.因为自己写一个orm来配合调用也没那么容易无缝的嵌入到引擎当中. 获取父分类下面的子分类 {loop subcat(77) $k $v}{php $subcatid[] = $k;}{/loop}<?php $subcatid = implode(',', $subcatid);?>  结果可以用在sql 的in子句中 {template "content","header"} 调用根

phpcms v9采集中遇到的相对路径的问题

一.采集网址时,遇上网址是相对路径的问题.(网上抄的,可用) 修改数据库v9_collection_node,增加两个字段replace_from,replace_to(varchar(200)) 1. /phpcms/modules/collection/templates/node_form.tpl.php第99行后增加(位置在</table></fieldset>之前) <tr> <td width="120">网址替换:</

phpcms v9中 action=&quot;position&quot; 和action=&quot;lists&quot;有什么区别, 以及action 的属性和值

action值的含义: lists 内容数据(文章?)列表 relation 内容相关文章 hits 内容数据点击排行榜 category 内容栏目列表 position 内容推荐位列表 phpcms v9中 action="position" 和action="lists"有什么区别, 以及action 的属性和值,布布扣,bubuko.com

PHPCMS \phpcms\modules\member\index.php 用户登陆SQL注入漏洞分析

catalog 1. 漏洞描述 2. 漏洞触发条件 3. 漏洞影响范围 4. 漏洞代码分析 5. 防御方法 6. 攻防思考 1. 漏洞描述2. 漏洞触发条件 0x1: POC http://localhost/phpcms_v9/index.php?m=member&c=index&a=login dosubmit=1&username=phpcms&password=123456%26username%3d%2527%2bunion%2bselect%2b%25272%2

关于phpcms模板自定义分页

(phpcms模板以下简称pc) pc模板的分页样式往往不是我们所需要的,那么怎么才能改成我们需要的样式呢? 只要修改三个地方 文件目录如下: \phpcms\languages\zh-cn\system.lang.php\phpcms\libs\functions\global.func.php\ phpcms\lib\classes\template_cache.class.php 首先修改(system.lang.php ) 在该文件的28行29行,(这里是已经修改过的) $LANG['p

PHPCMS项目从本地上传到服务器,需要修改哪些地方?

比如根目录文件是phpcms 1,caches/configs/database.php 文件中修改数据库名,账号,密码: 2,caches/configs/system.php 文件中 1)修改'web_path'路径,把'/phpcms/',改为'/'; 2)把所有的 http://localhost/phpcms,替换为域名地址,比如 http://www.phpcms.com; 3,登录后台,设置--站点管理--默认站点,修改为新域名,比如:http://www.phpcms.com/.

PHPCMS网站迁移过程后,添加内容 报500错误解决方案

问题出现原因:1.网站迁移过程中,上传下载文件时文件丢失  2.PHPCMS源码更新升级 解决方法 1.可以到官方下载最新版源码,替换过去.如果对源码有改动,需要先保存改动过的文件,替换过去之后,再替换上改动过的文件. 2.论坛有朋友总结出容易丢失出错的地方: /phpcms/modules/content/fields/video/form.inc.php 可以查看对比一下自己代码中这个文件下面/phpcms/modules/content/fields/video  跟原版源码是否一致,若不

phpcms

利用phpcms制作企业站,首先要将静态的企业主页替换成后台可编辑的动态主页. 在phpcms/install_package/phpcms/templates新建一个英文文件夹 在此文件夹下在创建一个content文件夹 将制作的.html网页文件修改文件名为 index.html 并放入 content文件夹中 然后打开phpcms后台界面,点击界面,启用自己的主页文件夹 1.首先选择一个静态页面 把"头部"和"底部单独拆分出来" "头" &

PHPCMS二次开发教程(转)

转自:http://www.cnblogs.com/semcoding/p/3347600.html PHPCMS V9 结构设计 根目录 |–api  结构文件目录 |–caches 缓存文件目录    |– configs 系统配置文件目录    |– caches_* 系统缓存目录 |–phpcms  phpcms框架主目录    |– languages 框架语言包目录    |– libs 框架主类库.主函数库目录    |– model 框架数据库模型目录    |– modules