$root = $doc->createElement("root");
#创建节点对象实体
$root = $doc->appendChild($root);
#把节点添加进来
if ($action == 'fukuan' || $action == 'shoupiao' || $action == 'supply') {
    $chuzhi = returntablefield("supply", "rowid", $customerid, "yufukuan");
} else {
    $chuzhi = returntablefield("customer", "rowid", $customerid, "yuchuzhi");
}
$chuzhinode = $doc->createElement("chuzhi");
$chuzhinode = $root->appendChild($chuzhinode);
$chuzhinode->appendChild($doc->createTextNode($chuzhi));
global $db;
if (stripos($action, "linkman") !== false) {
    $sql = "select * from linkman where customerid='{$customerid}'";
    $sql = getCustomerRoleByCustID($sql, "customerid");
    $rs = $db->Execute($sql);
    $rs_a = $rs->GetArray();
    if (count($rs_a) != 0) {
        for ($i = 0; $i < count($rs_a); $i++) {
            $linkman = $doc->createElement("linkman");
            $linkman = $root->appendChild($linkman);
            $rowid = $doc->createElement("ROWID");
            $rowid = $linkman->appendChild($rowid);
            $name = $doc->createElement("linkmanname");
            $name = $linkman->appendChild($name);
            $mobile = $doc->createElement("mobile");
            $mobile = $linkman->appendChild($mobile);
            $address = $doc->createElement("address");
            $address = $linkman->appendChild($address);
            $rowid->appendChild($doc->createTextNode($rs_a[$i]['ROWID']));
    }
    $return = FormPageAction("action", "init_default");
    print_infor("<b>审核通过</b>", 'trip', "location='?{$return}'", "?" . $return, 1);
    exit;
}
if ($_POST['action'] == "FouJue") {
    page_css();
    $billid = $_GET['id'];
    $sql = "update crm_shenqingbaobei set state='3',shenheman='" . $_SESSION['LOGIN_USER_ID'] . "',shenhetime=now(),piyu='" . $_POST['piyu'] . "' where id='{$billid}'";
    $rs = $db->Execute($sql);
    $return = FormPageAction("action", "init_default");
    print_infor("<b>审核否决</b>", 'trip', "location='?{$return}'", "?" . $return, 1);
    exit;
}
if ($_GET['action'] == "edit_FouJue") {
    page_css();
    $billid = $_GET['id'];
    $sql = "update crm_shenqingbaobei set state='1',shenheman='',shenhetime=null,piyu='' where id='{$billid}'";
    $rs = $db->Execute($sql);
    deleteMessage("项目报备", $billid);
    $return = FormPageAction("action", "init_default");
    print_infor("<b>撤销审核</b>", 'trip', "location='?{$return}'", "?" . $return, 1);
    exit;
}
addShortCutByDate("createtime", "申请时间");
$SYSTEM_ADD_SQL = getCustomerRoleByCustID($SYSTEM_ADD_SQL, "customerid");
//数据表模型文件,对应Model目录下面的crm_shenqingbaobei_newai.ini文件
//如果是需要复制此模块,则需要修改$parse_filename参数的值,然后对应到Model目录 新文件名_newai.ini文件
$filetablename = 'crm_shenqingbaobei';
$parse_filename = 'crm_shenqingbaobei';
require_once 'include.inc.php';
    $selectid = $_GET['selectid'];
    $selectid = explode(",", $selectid);
    $db->StartTrans();
    for ($i = 0; $i < sizeof($selectid); $i++) {
        if ($selectid[$i] != "") {
            $chukunum = returntablefield("sellplanmain_detail", "id", $selectid[$i], "chukunum");
            if ($chukunum > 0) {
                print "<script language=javascript>alert('错误:已交付数不为零,请先删除交付记录');window.history.back(-1);</script>";
                exit;
            }
            $sql = "delete from sellplanmain_detail where id=" . $selectid[$i];
            $db->Execute($sql);
        }
    }
    if ($db->HasFailedTrans()) {
        print "<script language=javascript>alert('错误:" . str_replace("'", "\\'", $db->ErrorMsg()) . "');window.history.back(-1);</script>";
    } else {
        $return = FormPageAction("action", "init_default");
        print_infor("交付记录已删除", 'trip', "location='?{$return}'", "?{$return}", 0);
    }
    $db->CompleteTrans();
    exit;
}
//数据表模型文件,对应Model目录下面的sellcontract_plan_newai.ini文件
//如果是需要复制此模块,则需要修改$parse_filename参数的值,然后对应到Model目录 新文件名_newai.ini文件
addShortCutByDate("createtime", "创建时间");
$SYSTEM_ADD_SQL = getCustomerRoleByCustID($SYSTEM_ADD_SQL, "supplyid");
$limitEditDelCust = 'supplyid';
$filetablename = 'v_sellcontract_plan';
$parse_filename = 'v_sellcontract_plan';
require_once 'include.inc.php';
if ($customerid != '' && $_GET['action'] == 'add_default') {
    $ADDINIT = array("客户名称" => $customerid);
}
if ($_GET['action'] == "workplan") {
    $crm_servInfo = returntablefield("crm_service", "编号", $_GET['编号'], "服务编号,客户名称,解决人员");
    $servertype = returntablefield("crm_dict_servicetypes", "编号", $crm_servInfo['服务编号'], "名称");
    $custName = returntablefield("customer", "rowid", $crm_servInfo['客户名称'], "supplyname");
    $content = urlencode($crm_servInfo['解决人员']);
    $guanlianurl = urlencode("../JXC/crm_service_newai.php?action=view_default&编号=" . $_GET['编号']);
    $guanlianshiwu = "客户服务";
    $guanlianid = $_GET['编号'];
    $zhuti = "处理{$servertype}-{$custName}";
    print "<script>location.href='../CRM/workplanmain_newai.php?action=add_default&zhuti={$zhuti}&content=" . $content . "&guanlianshiwu={$guanlianshiwu}&guanlianurl={$guanlianurl}&guanlianid={$guanlianid}';</script>";
    exit;
}
$SYSTEM_ADD_SQL = getCustomerRoleByCustID($SYSTEM_ADD_SQL, "客户名称");
$limitEditDelCust = '客户名称';
addShortCutByDate("创建时间", "创建时间");
//数据表模型文件,对应Model目录下面的crm_service_newai.ini文件
//如果是需要复制此模块,则需要修改$parse_filename参数的值,然后对应到Model目录 新文件名_newai.ini文件
$filetablename = 'crm_service';
$parse_filename = 'crm_service';
require_once 'include.inc.php';
/*
版权归属:郑州单点科技软件有限公司;
联系方式:0371-69663266;
公司地址:河南郑州经济技术开发区第五大街经北三路通信产业园四楼西南;
公司简介:郑州单点科技软件有限公司位于中国中部城市-郑州,成立于2007年1月,致力于把基于先进信息技术(包括通信技术)的最佳管理与业务实践普及到教育行业客户的管理与业务创新活动中,全面提供具有自主知识产权的教育管理软件、服务与解决方案,是中部最优秀的高校教育管理软件及中小学校管理软件提供商。目前已经有多家高职和中职类院校使用通达中部研发中心开发的软件和服务;

软件名称:单点科技软件开发基础性架构平台,以及在其基础之上扩展的任何性软件作品;
发行协议:数字化校园产品为商业软件,发行许可为LICENSE方式;单点CRM系统即SunshineCRM系统为GPLV3协议许可,GPLV3协议许可内容请到百度搜索;
<?php

ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
error_reporting(E_WARNING | E_ERROR);
$module_desc = "应收款";
$user_id = $_SESSION['LOGIN_USER_ID'];
$dept_id = $_SESSION['LOGIN_DEPT_ID'];
$user_priv = $_SESSION['LOGIN_USER_PRIV'];
$max_count = "4";
$module_body = "";
$sql = "select * from v_yingshoukuanhuizong where 1=1 ";
$sql = getCustomerRoleByCustID($sql, "rowid");
$sql = $sql . " order by pay_own desc limit 0 ,{$max_count}";
$rs = $db->Execute($sql);
$rs_a = $rs->GetArray();
$count = $max_count - count($rs_a);
$module_body .= "<table border=\"0\"  width=\"100%\">";
if (count($rs_a) > 0) {
    for ($i = 0; $i < count($rs_a); $i++) {
        $rowid = $rs_a[$i]['rowid'];
        $num = $rs_a[$i]['num'];
        $supplyname = $rs_a[$i]['supplyname'];
        $own = number_format($rs_a[$i]['own'], 2);
        $huikuan = number_format($rs_a[$i]['huikuanjine'], 2);
        $pay_own = number_format($rs_a[$i]['pay_own'], 2);
        if (cutStr($supplyname, 6) != $supplyname) {
            $title = $supplyname;
            $supplyname = cutStr($supplyname, 6) . "..";
        }
        $module_body .= "<tr class=\"TableBlock\">\n\t   \t\t\t\t\t<td><img src=\"../images/arrow_r.gif\" align=\"absmiddle\"><a href=../../JXC/customer_newai.php?" . base64_encode("action=view_default&ROWID=" . $rs_a[$i]['rowid']) . " target=_blank title='{$title}'>" . $supplyname . "</td>\n\t\t\t\t\t\t<td><a href='../../JXC/v_yingshoukuanhuizong_mingxi.php?" . base64_encode("supplyid={$rowid}") . "' target='_blank'>单数:" . $num . "</a></td>\n\t\t\t\t\t\t<td valign=\"Middle\" align=\"left\">金额:" . $own . "</td>\n\t\t\t\t\t\t<td valign=\"Middle\" align=\"left\">回款:" . $huikuan . "</td>\n\t\t\t\t\t\t<td valign=\"Middle\" align=\"left\">尚欠:" . $pay_own . "</td>\n\t\t\t\t\t  </tr>";
<?php

ini_set('date.timezone', 'Asia/Shanghai');
global $valueVVVVVVV;
global $db;
$MODULE_BODY = "";
$CUR_DATE = date("m-d", mktime(1, 1, 1, date('m'), date('d') - 1, date('Y')));
$END_DATE = date("m-d", mktime(1, 1, 1, date('m'), date('d') + 7, date('Y')));
$COUNT1 = 0;
$COUNT2 = 0;
$BIRTHDAY_ARRAY1 = $BIRTHDAY_ARRAY2 = array();
$query = "\tSELECT *,b.linkmanname,b.customerid from crm_remember a inner join linkman b on a.linkmanid=b.rowid where  DATE_FORMAT(mem_date,'%m-%d')>='{$CUR_DATE}'\n\t\t\t\tand DATE_FORMAT(mem_date,'%m-%d')<='{$END_DATE}'";
$addquery = getCustomerRoleByCustID($addquery, "b.customerid");
$query = $query . $addquery;
//echo $query;exit;
$rs = $db->CacheExecute(150, $query);
$ROW = $rs->GetArray();
$count = $valueVVVVVVV['显示行数'] - count($ROW);
for ($i = 0; $i < count($ROW); $i++) {
    $linkmanid = $ROW[$i]['linkmanid'];
    $linkmanname = $ROW[$i]['linkmanname'];
    $mem_type = $ROW[$i]['mem_type'];
    $customerName = returntablefield("customer", "rowid", $ROW[$i]['customerid'], "supplyname");
    $BIRTHDAY = $ROW[$i]['mem_date'];
    //echo $BIRTHDAY;
    if (cutStr($customerName, 12) != $customerName) {
        $title = $customerName;
        $customerName = cutStr($customerName, 12) . "..";
    }
    ++$COUNT2;
    $PERSON_STR2 .= "<tr class=TableBlock>\n\t\t\t\t\t\t\t\t<td><img src=\"../images/arrow_r.gif\" align=\"absmiddle\"><a href=../../JXC/customer_newai.php?action=view_default&ROWID=" . $ROW[$i]['customerid'] . " target=_blank title='{$title}'>" . $customerName . "</td>\n\t\t\t\t\t\t\t\t<td><a href=../../JXC/linkman_newai.php?action=view_default&ROWID=" . $ROW[$i]['linkmanid'] . " target=_blank>" . $linkmanname . "</td>\n\t\t\t\t\t\t\t\t<td>" . $mem_type . "(" . date("m-d", strtotime($BIRTHDAY)) . ")</td>\n\t\t\t\t\t\t\t\t<td valign=Middle align=left><a href='../../JXC/sms_sendlist_newai.php?action=add_default&sendlist=" . $ROW[$i]['linkmanid'] . "' target='_blank'><img src='../../../Framework/images/menu/010401.gif' align=absmiddle></a></td></tr>";
<?php

ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
error_reporting(E_WARNING | E_ERROR);
require_once 'lib.inc.php';
$GLOBAL_SESSION = returnsession();
page_css("合同计划交付");
global $db;
$sql = "select * from v_sellcontract_plan where id=" . $_GET["id"];
$sql = getCustomerRoleByCustID($sql, "supplyid");
$rs = $db->Execute($sql);
$rs_a = $rs->GetArray();
$productname = $rs_a[0]['prodname'];
$customername = returntablefield("customer", "rowid", $rs_a[0]['supplyid'], "supplyname");
$hetongzhuti = $rs_a[0]['zhuti'];
$num = $rs_a[0]['num'] - $rs_a[0]['chukunum'];
$price = $rs_a[0]['price'];
?>
<script language = "JavaScript"> 
function clear_jiaofudate()
{
  document.form1.jiaofudate.value="";
}
function FormCheck() 
{
if (document.form1.productid.value == "") {
alert("产品不能为空");
 return false;}
if (document.form1.customerid.value == "") {
alert("客户不能为空");