Home > Backend Development > PHP Tutorial > First introduction to DreamWeaver CMS: Introduction to software functions

First introduction to DreamWeaver CMS: Introduction to software functions

WBOY
Release: 2024-03-29 08:20:01
Original
1264 people have browsed it

First introduction to DreamWeaver CMS: Introduction to software functions

First introduction to Dreamweaver CMS: Introduction to software functions, specific code examples are required

DedeCMS (DedeCMS) is a well-known domestic content management system with a wide range of Used in the construction and maintenance of various types of websites. It has a simple and easy-to-use interface design, a powerful template engine, and rich functional modules, making it the first choice of many website builders. This article will introduce some of the main functions of Dreamweaver CMS, and attach specific code examples to help readers better understand and use this excellent content management system.

1. Article Management
Dreamweaver CMS provides convenient article management functions, and articles can be easily published, edited and deleted in the background. The following is a simple sample code for article publishing:

<?php
require(dirname(__FILE__)."/config.php");
require(DEDEINC."/dedevote.func.php");
CheckRank(0,0);
if(!isset($action)) $action = '';
if($action=='add')
{
    $typeid = intval($typeid);
    $channelid = intval($channelid);
    $sortrank = AddDay("1990-01-01");
    $senddate = time();
    $body = Html2Text($body,-1);
    $pubdate = GetDateMk($pubdate);
    if($pubdate=='0000-00-00') $pubdate=$senddate;
    if(!isset($notpost)) $notpost=1;
    if($dellink==2) $body = RemoveHttp($body);    
    if(empty($title))
    {
        showmsg('标题没填写',"javascript:;","infomsg");
        exit();
    }
    if(empty($channelid))
    {
        showmsg('栏目没选择',"javascript:;","infomsg");
        exit();
    }
    if($sortrank>$senddate) $sortrank = $senddate;
    if(!CheckPopedom(9)) CheckChannel($channelid,0);
    $dosql->Execute("SELECT * FROM `#@__channeltype` WHERE id= $channelid");
    $row = $dosql->GetArray();
    $addtable = trim($row['addtable']);
    ...........
Copy after login

2. Column Management
DreamWeaver CMS supports customized column management. Users can create, edit, and delete columns according to website needs. The following is a sample code for adding a column:

<?php
require(dirname(__FILE__)."/config.php");
CheckPurview('plus_List');
if(empty($typeid)) $typeid = 0;
$createhtmltype = isset($createhtmltype) ? $createhtmltype : 1;
$useexcel = isset($useexcel) ? $useexcel : 0;
$useloadpic = isset($useloadpic) ? $useloadpic : 0;
$getall = isset($getall) ? $getall : 0;
$fenleiid = isset($fenleiid) ? $fenleiid : '';
if(is_uploaded_file($litpic))
{
    if(!CheckImage($litpic_name))
    {
        ShowMsg('上传的图片类型错误,只能上传jpeg、jpg、gif、png格式的图片!','-1');
        exit();
    }
    else
    {
        $file_name = MemberUploads('litpic', $litpic,0);
    }    
}
Copy after login

3. User Management
Dreamweaver CMS provides complete user management functions, including registration, login, permission settings, etc. The following is a sample code for user registration:

<?php
require(dirname(__FILE__)."/config.php");
require(DEDEINC."/membermodel.cls.php");
if(!isset($dopost)) $dopost = '';
$validate = isset($validate) ? RemoveXSS($validate) : '';
$autoreg = isset($autoreg) ? intval($autoreg) : 0;
$from = isset($from) ? RemoveXSS($from) : '';
$gourl = isset($gourl) ? RemoveXSS($gourl) : '';
$xmlcheck = isset($xmlcheck) ? RemoveXSS($xmlcheck) : '';
.............
Copy after login

The above is part of the function introduction and code examples of DreamWeaver CMS. I hope it will be helpful to readers who are new to this content management system. As a powerful and flexible website construction tool, Dreamweaver CMS can meet the needs of various websites, helping users quickly build their own websites and display personalized content. If readers have more questions about Dreamweaver CMS or want to learn more about it, please continue to pay attention to our future articles. We will bring you more practical information and technology sharing about Dreamweaver CMS.

The above is the detailed content of First introduction to DreamWeaver CMS: Introduction to software functions. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template