Example #1
0
} else {
    $total_count = $db->counter($met_sms, "{$serch_sql}", "*");
}
require_once 'include/pager.class.php';
$page = (int) $page;
if ($page_input) {
    $page = $page_input;
}
$list_num = 20;
$rowset = new Pager($total_count, $list_num, $page);
$from_record = $rowset->_offset();
$query = "SELECT * FROM {$met_sms} {$serch_sql} order by time desc LIMIT {$from_record}, {$list_num}";
$result = $db->query($query);
while ($list = $db->fetch_array($result)) {
    $list['text'] = utf8substr($list['content'], 0, 15);
    $total_tels = explode(',', $list['tel']);
    $telsnum = count($total_tels);
    $list['telnum'] = $telsnum;
    $list['teltext'] = utf8substr($list['tel'], 0, 11);
    $list['type'] = sedsmstype($list['type']);
    $list['time'] = date('Y-m-d H:i:s', $list['time']);
    $list['remark'] = sedsmserrtype($list['remark'], 1);
    $record_list[] = $list;
}
$page_list = $rowset->link("smsnotes.php?anyid={$anyid}&lang={$lang}&notes_type={$notes_type}&page=");
$css_url = $depth . "../templates/" . $met_skin . "/css";
$img_url = $depth . "../templates/" . $met_skin . "/images";
include template('app/sms/smsnotes');
footer();
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
<?php

# MetInfo Enterprise Content Management System
# Copyright (C) MetInfo Co.,Ltd (http://www.metinfo.cn). All rights reserved.
$depth = '../';
require_once $depth . '../login/login_check.php';
require_once ROOTPATH . 'include/export.func.php';
$sms_list = $db->get_one("SELECT * FROM {$met_sms} WHERE id='{$id}'");
if (!$sms_list) {
    metsave('-1', $lang_dataerror);
}
$total_tels = explode(',', $sms_list['tel']);
$telsnum = count($total_tels);
$sms_list['telnum'] = $telsnum;
$sms_list['tel'] = str_replace(",", "\n", $sms_list['tel']);
$sms_list['type'] = sedsmstype($sms_list['type']);
$sms_list['time'] = date('Y-m-d H:i:s', $sms_list['time']);
$sms_list['remark'] = sedsmserrtype($sms_list['remark'], 1);
$css_url = $depth . "../templates/" . $met_skin . "/css";
$img_url = $depth . "../templates/" . $met_skin . "/images";
include template('app/sms/smsnotes_detail');
footer();
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.