Files
OMS/app/taoexlib/lib/finder/sms/sample.php
2026-01-04 19:08:31 +08:00

54 lines
2.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright 2012-2026 ShopeX (https://www.shopex.cn)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
class taoexlib_finder_sms_sample
{
var $column_confirm='操作';
var $column_confirm_width = "120";
var $detail_basic = '历史详细列表';
function detail_basic($id){
$render = app::get('taoexlib')->render();
$oItem = app::get('taoexlib')->model('sms_sample_items');
$items = $oItem->getList('*',
array('id' => $id), 0, -1);
foreach ($items as $k=>$item ) {
$items[$k]['createtime'] = $item['createtime']!=0 ? date('Y-m-d H:i:s',$item['createtime']) : '-';
$items[$k]['approvedtime'] = $item['approvedtime']!=0 ? date('Y-m-d H:i:s',$item['approvedtime']) : '-';
}
$render->pagedata['items'] = $items;
$render->display('admin/sms/sample_items.html');
//return 'detail';
}
function column_confirm($row){
$find_id = $_GET['_finder']['finder_id'];
$url= urlencode("index.php?app=taoexlib&ctl=admin_sms_items&act=list_sample&p[0]={$row['id']}&finder_id=".$_GET['_finder']['finder_id']."");
$edit = "<a href='index.php?app=taoexlib&ctl=admin_sms_sample&act=edit_sample&p[0]="
.$row['id'].
"&finder_id=$find_id' target=dialog::{width:900,height:500,title:''}>编辑</a> ";
if($row['status']){
$stop = "<a href='javascript:void(0);' target='download' onclick='if(confirm(\"你确定要暂时停止指定模板的使用吗???\\n\\n注意你还可以随时启用指定模板。\")) {href=\"index.php?app=taoexlib&ctl=admin_sms_sample&act=setStatus&p[0]={$row['id']}&p[1]=$row[status]&finder_id={$_GET['_finder']['finder_id']}\";}'>暂停</a>";
}else{
$stop = "<a href='javascript:void(0);' target='download' onclick='if(confirm(\"你确定要暂时停止指定模板的使用吗???\\n\\n注意你还可以随时启用指定模板。\")) {href=\"index.php?app=taoexlib&ctl=admin_sms_sample&act=setStatus&p[0]={$row['id']}&p[1]=$row[status]&finder_id={$_GET['_finder']['finder_id']}\";}'>开启</a>";
}
return $edit.'&nbsp;'.$stop;
}
}