广告和图片选择的便捷化功能开发

hotfix/paypal-note
尹诚诚 4 years ago
parent 75df6a8a64
commit 7e8874dc62

@ -26,7 +26,7 @@ class Tips extends CI_Controller
$infoTip = new StdClass; $infoTip = new StdClass;
$infoTip->it_title = '新广告'; $infoTip->it_title = '新广告';
$infoTip->it_expires = time(); $infoTip->it_expires = time();
$infoTip->it_content = ''; $infoTip->it_content = $this->load->view('templates', false,true);;
$infoTip->it_code = '<!--@TIPS--@-->'; $infoTip->it_code = '<!--@TIPS--@-->';
$infoTip->it_datetime = time(); $infoTip->it_datetime = time();
$infoTip->it_sitecode = $this->config->item('site_code'); $infoTip->it_sitecode = $this->config->item('site_code');

@ -4,7 +4,7 @@
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
<h4>广告管理</h4> <h4>广告管理 <small><a href="<?php echo site_url('thirdparty/recommend/tips/add'); ?>">添加广告</a></small></h4>
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
@ -16,8 +16,9 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach ($tipsList as $key=>$item){ ?> <?php foreach ($tipsList as $key=>$item){ ?>
<tr> <tr class="<?php if($item->it_expires<time()){echo 'warning';} ?>">
<td><?php echo ++$key; ?></td> <td><?php echo ++$key; ?></td>
<td> <td>
<a href="<?php echo site_url('thirdparty/recommend/tips/edit/'.$item->it_id); ?>"><?php echo $item->it_title; ?></a> <a href="<?php echo site_url('thirdparty/recommend/tips/edit/'.$item->it_id); ?>"><?php echo $item->it_title; ?></a>
@ -26,13 +27,7 @@
<td><?php echo date('m/d/Y', $item->it_expires); ?></td> <td><?php echo date('m/d/Y', $item->it_expires); ?></td>
</tr> </tr>
<?php } ?> <?php } ?>
<tr>
<td></td>
<td></td>
<td></td>
<td><a href="<?php echo site_url('thirdparty/recommend/tips/add'); ?>">添加广告</a></td>
</tr>
<tr>
</tbody> </tbody>

@ -89,8 +89,8 @@
var use_pictures = $("#use_pictures").val(); var use_pictures = $("#use_pictures").val();
if (result != null) { if (result != null) {
for (var key in result.Pinfo) { for (var key in result.Pinfo) {
if ('<?php echo $this->config->item('site_code') ?>' == 'cht') { if ('<?php echo $this->config->item('site_code') ?>' == 'ah') {
editor.insertHtml('<div class="photoBlock300 autowidht" id="yonglaidingweitupian"> <img class="img-responsive" src="' + site_image_url + result.Pinfo[key].PUrl + '" alt="' + result.Pinfo[key].Sinfo + '" width="' + result.Pinfo[key].Width + '" height="' + result.Pinfo[key].Height + '" />' + result.Pinfo[key].Sinfo + '</div>'); editor.insertHtml('<div class="infoimage"> <img alt="' + result.Pinfo[key].Sinfo + '" class="img-responsive" loader="lazy" originalsrc="' + site_image_url + result.Pinfo[key].PUrl + '" src="https://data.asiahighlights.com/image/grey.gif" /> <span class="photoTxt">' + result.Pinfo[key].Sinfo + '</span></div>');
} else if ('<?php echo $this->config->item('site_code') ?>' == 'ch') { } else if ('<?php echo $this->config->item('site_code') ?>' == 'ch') {
editor.insertHtml('<div class="infoimage"><img src="' + site_image_url + result.Pinfo[key].PUrl + '" alt="' + result.Pinfo[key].Sinfo + '" class="img-responsive" width="' + result.Pinfo[key].Width + '" height="' + result.Pinfo[key].Height + '"><span class="infoimagetitle">' + result.Pinfo[key].Sinfo + '</span></div>'); editor.insertHtml('<div class="infoimage"><img src="' + site_image_url + result.Pinfo[key].PUrl + '" alt="' + result.Pinfo[key].Sinfo + '" class="img-responsive" width="' + result.Pinfo[key].Width + '" height="' + result.Pinfo[key].Height + '"><span class="infoimagetitle">' + result.Pinfo[key].Sinfo + '</span></div>');
} else { } else {

@ -42,8 +42,8 @@ CKEDITOR.editorConfig = function( config ) {
{ name: 'others', groups: [ 'others' ] }, { name: 'others', groups: [ 'others' ] },
{ name: 'about', groups: [ 'about' ] } { name: 'about', groups: [ 'about' ] }
]; ];
//,NumberedList,BulletedList,SpecialChar //,NumberedList,BulletedList,SpecialChar ,Templates
config.removeButtons = 'Print,Preview,NewPage,Save,Templates,SelectAll,TextField,Textarea,Select,Button,HiddenField,Form,Checkbox,Radio,CreateDiv,Language,Anchor,Flash,HorizontalRule,Smiley,PageBreak,Iframe,ShowBlocks,About,BidiLtr,BidiRtl,searchCode,Copy,Cut'; config.removeButtons = 'Print,Preview,NewPage,Save,SelectAll,TextField,Textarea,Select,Button,HiddenField,Form,Checkbox,Radio,CreateDiv,Language,Anchor,Flash,HorizontalRule,Smiley,PageBreak,Iframe,ShowBlocks,About,BidiLtr,BidiRtl,searchCode,Copy,Cut';

Loading…
Cancel
Save