ecshop后台文章加上日期时间的方法
<td class="narrow-label">{$lang.author}</td>
在其下面添加以下代码
找到
"'$add_time', '$file_url', '$open_type', '$_POST[link_url]', '$_POST[description]')";
</tr>
2、打开 /admin/article.php 文件
$add_time = gmtime();
$db->query($sql);
$add_time = local_strtotime($_POST['add_time']);
找到
{
在其下面添加以下代码
<tr>
修改为:
/*初始化*/
$add_time = local_strtotime($_POST['add_time']);
$db->query($sql);
$article['is_open'] = 1;
<link href=http://www.ym97.com/ecshopjc/"../js/calendar/calendar.css" rel="stylesheet" type="text/css" />
<!--新加日期修改 开始-->
找到
/*插入数据*/
<tr>
1、打开 /admin/templates/article_info.htm 文件,加一个修改时间
"author_email, keywords, content, add_time, file_url, open_type, link, description) ".
$article = array();
"'$_POST[author]', '$_POST[author_email]', '$_POST[keywords]', '$_POST[FCKeditor1]', ".
<!--新加日期修改 结束-->
/*插入数据*/
{
if (empty($_POST['cat_id']))
$sql = "INSERT INTO ".$ecs->table('article')."(title, cat_id, article_type, is_open, author, ".
}
找到
修改为:
if ($exc->edit("title='$_POST[title]', cat_id='$_POST[article_cat]', article_type='$_POST[article_type]', is_open='$_POST[is_open]', author='$_POST[author]', add_time='$add_time', author_email='$_POST[author_email]', keywords ='$_POST[keywords]', file_url ='$file_url', open_type='$open_type', content='$_POST[FCKeditor1]', link='$_POST[link_url]', description = '$_POST[description]'", $_POST['id'])) "'$add_time', '$file_url', '$open_type', '$_POST[link_url]', '$_POST[description]')";
<td><input type="text" name="author" maxlength="60" value="{$article.author|escape}" /></td>
在第三行下面加入调用日历JS代码
/* 取文章数据 */
}
"author_email, keywords, content, add_time, file_url, open_type, link, description) ".
$_POST['cat_id'] = 0;
$add_time = gmtime();
if (empty($_POST['cat_id']))
$sql = "INSERT INTO ".$ecs->table('article')."(title, cat_id, article_type, is_open, author, ".
$article['add_time'] = local_date('Y-m-d H:i');
<td class="narrow-label">{$lang.add_time}</td>
$article = $db->GetRow($sql);
"VALUES ('$_POST[title]', '$_POST[article_cat]', '$_POST[article_type]', '$_POST[is_open]', ".
$_POST['cat_id'] = 0;
$article['add_time'] = local_date('Y-m-d H:i',$article['add_time']);
"'$_POST[author]', '$_POST[author_email]', '$_POST[keywords]', '$_POST[FCKeditor1]', ".
<script type="text/javascript" src=http://www.ym97.com/ecshopjc/"../js/calendar.php?lang={$cfg_lang}"></script>
找到
<td><input name="add_time" type="text" id="add_time" size="20" value='{$article.add_time}' readonly="readonly" /><input name="selbtn1" type="button" id="selbtn1" onclick="return showCalendar('add_time', '%Y-%m-%d %H:%M', '24', false, 'selbtn1');" value="{$lang.btn_sel ect}" class="button"/></td>
在其下面添加以下代码
$sql = "SELECT * FROM " .$ecs->table('article'). " WHERE article_id='$_REQUEST[id]'";
"VALUES ('$_POST[title]', '$_POST[article_cat]', '$_POST[article_type]', '$_POST[is_open]', ".
</tr>
本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!
本文地址: https://v30.fanwenzhu.com/jz/ecshop/3633.shtml
相关文章
热门TAG
win10 ecshop 主机 阿里云 解决 配置 C# C++ 解析 SQL语句 命令 Go语言 方法 CSS3 HTML5 CSS win7 MSSQL 服务器配置 IIS7.5 IIS7 IIS6 IIS CentOS 7 Linux oracle数据库 oracle phpcms discuz discuz教程最新文章
-
ecshop中设置顺丰快递支持
时间:2020-12-28
-
ecshop图文安装过程详解
时间:2020-12-28
-
ecshop邮件服务器设置方法
时间:2020-12-23
热门文章
-
ecshop中设置顺丰快递支持货到付款的方法
时间:2020-12-28
-
ecshop邮件服务器设置方法
时间:2020-12-23
-
ecshop图文安装过程详解
时间:2020-12-28
