$inputvalues .= $arrsave . ','; } $inputvalue = substr($inputvalues, 0, -1); } elseif ($row['inputtype'] == '2') { $inputvalue = trim(getGP('' . $row["inputname"] . '', 'P')); } else { $inputvalue = check_str(getGP('' . $row["inputname"] . '', 'P')); } $crm_db = array('content' => $inputvalue); //insert_db('crm_db',$crm_db); update_db('crm_db', $crm_db, array('viewid' => $vid, 'type' => 'crm_care', 'inputname' => $row["inputname"], 'formid' => $row["fid"])); $crm_log .= serialize($crm_db) . '|515158.com|'; } $content = serialize($crm_care); $title = get_realname($_USER->id) . '于' . get_date('Y-m-d H:i:s', PHP_TIME) . '编辑客户关怀信息'; get_logadd($vid, $content, $title, 36, $_USER->id); crm_log($title, $vid, $content, substr($crm_log, 0, -12), 1, 'crm_care'); show_msg('编辑客户关怀信息成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&type=' . getGP('type', 'P')); } else { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_care WHERE id = '" . getGP('id', 'G', 'int') . "' "); if ($_GET['type'] == '2') { get_key("crm_care_edit_2"); } else { get_key("crm_care_edit_1"); } include_once 'company/care_edit.php'; } } elseif ($do == 'view') { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_care WHERE id = '" . getGP('id', 'G', 'int') . "' "); include_once 'company/care_view.php'; }
while ($row = $db->fetch_array($query)) { if ($row['inputtype'] == '4') { $inputvalues = ''; $inputvalue = getGP('' . $row["inputname"] . '', 'P', 'array'); foreach ($inputvalue as $arrsave) { $inputvalues .= $arrsave . ','; } $inputvalue = substr($inputvalues, 0, -1); } elseif ($row['inputtype'] == '2') { $inputvalue = trim(getGP('' . $row["inputname"] . '', 'P')); } else { $inputvalue = check_str(getGP('' . $row["inputname"] . '', 'P')); } $crm_db = array('content' => $inputvalue); //insert_db('crm_db',$crm_db); update_db('crm_db', $crm_db, array('viewid' => $vid, 'type' => 'crm_program', 'inputname' => $row["inputname"], 'formid' => $row["fid"])); $crm_log .= serialize($crm_db) . '|515158.com|'; } $content = serialize($crm_program); $title = get_realname($_USER->id) . '于' . get_date('Y-m-d H:i:s', PHP_TIME) . '编辑解决方案信息'; get_logadd($vid, $content, $title, 36, $_USER->id); crm_log($title, $vid, $content, substr($crm_log, 0, -12), 1, 'crm_program'); show_msg('编辑解决方案信息成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&type=' . getGP('type', 'P')); } else { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_program WHERE id = '" . getGP('id', 'G', 'int') . "' "); include_once 'service/program_edit.php'; } } elseif ($do == 'view') { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_program WHERE id = '" . getGP('id', 'G', 'int') . "' "); include_once 'service/program_view.php'; }
$inputvalues .= $arrsave . ','; } $inputvalue = substr($inputvalues, 0, -1); } elseif ($row['inputtype'] == '2') { $inputvalue = trim(getGP('' . $row["inputname"] . '', 'P')); } else { $inputvalue = check_str(getGP('' . $row["inputname"] . '', 'P')); } $crm_db = array('content' => $inputvalue); //insert_db('crm_db',$crm_db); update_db('crm_db', $crm_db, array('viewid' => $vid, 'type' => 'crm_complaints', 'inputname' => $row["inputname"], 'formid' => $row["fid"])); $crm_log .= serialize($crm_db) . '|515158.com|'; } $content = serialize($crm_complaints); $title = get_realname($_USER->id) . '于' . get_date('Y-m-d H:i:s', PHP_TIME) . '编辑客户投诉信息'; get_logadd($vid, $content, $title, 36, $_USER->id); crm_log($title, $vid, $content, substr($crm_log, 0, -12), 1, 'crm_complaints'); show_msg('编辑客户投诉信息成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&type=' . getGP('type', 'P')); } else { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_complaints WHERE id = '" . getGP('id', 'G', 'int') . "' "); if ($_GET['type'] == '2') { get_key("crm_complaints_edit_2"); } else { get_key("crm_complaints_edit_1"); } include_once 'company/complaints_edit.php'; } } elseif ($do == 'view') { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_complaints WHERE id = '" . getGP('id', 'G', 'int') . "' "); include_once 'company/complaints_view.php'; }
while ($row = $db->fetch_array($query)) { if ($row['inputtype'] == '4') { $inputvalues = ''; $inputvalue = getGP('' . $row["inputname"] . '', 'P', 'array'); foreach ($inputvalue as $arrsave) { $inputvalues .= $arrsave . ','; } $inputvalue = substr($inputvalues, 0, -1); } elseif ($row['inputtype'] == '2') { $inputvalue = trim(getGP('' . $row["inputname"] . '', 'P')); } else { $inputvalue = check_str(getGP('' . $row["inputname"] . '', 'P')); } $crm_db = array('content' => $inputvalue); //insert_db('crm_db',$crm_db); update_db('crm_db', $crm_db, array('viewid' => $vid, 'type' => 'crm_payment', 'inputname' => $row["inputname"], 'formid' => $row["fid"])); $crm_log .= serialize($crm_db) . '|515158.com|'; } $content = serialize($crm_payment); $title = get_realname($_USER->id) . '于' . get_date('Y-m-d H:i:s', PHP_TIME) . '编辑付款信息'; get_logadd($vid, $content, $title, 36, $_USER->id); crm_log($title, $vid, $content, substr($crm_log, 0, -12), 1, 'crm_payment'); show_msg('编辑付款信息成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . ''); } else { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_payment WHERE id = '" . getGP('id', 'G', 'int') . "' "); include_once 'price/payment_edit.php'; } } elseif ($do == 'view') { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_payment WHERE id = '" . getGP('id', 'G', 'int') . "' "); include_once 'price/payment_view.php'; }
foreach ($inputvalue as $arrsave) { $inputvalues .= $arrsave . ','; } $inputvalue = substr($inputvalues, 0, -1); } elseif ($row['inputtype'] == '2') { $inputvalue = trim(getGP('' . $row["inputname"] . '', 'P')); } else { $inputvalue = check_str(getGP('' . $row["inputname"] . '', 'P')); } $crm_db = array('content' => $inputvalue); //insert_db('crm_db',$crm_db); update_db('crm_db', $crm_db, array('viewid' => $vid, 'type' => 'crm_purchase', 'inputname' => $row["inputname"], 'formid' => $row["fid"])); $crm_log .= serialize($crm_db) . '|515158.com|'; } $content = serialize($crm_purchase); $title = get_realname($_USER->id) . '于' . get_date('Y-m-d H:i:s', PHP_TIME) . '编辑采购信息'; get_logadd($vid, $content, $title, 36, $_USER->id); crm_log($title, $vid, $content, substr($crm_log, 0, -12), 1, 'crm_purchase'); show_msg('编辑采购信息成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . ''); } else { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_purchase WHERE id = '" . getGP('id', 'G', 'int') . "' "); $sql = "SELECT * FROM " . DB_TABLEPRE . "crm_prod_view WHERE viewid='" . $view['id'] . "' and type=2 ORDER BY id asc LIMIT 0,50"; $result = $db->fetch_all($sql); include_once 'purchase/purchase_edit.php'; } } elseif ($do == 'view') { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_purchase WHERE id = '" . getGP('id', 'G', 'int') . "' "); $sql = "SELECT * FROM " . DB_TABLEPRE . "crm_prod_view WHERE viewid='" . $view['id'] . "' and type=2 ORDER BY id asc LIMIT 0,50"; $result = $db->fetch_all($sql); include_once 'purchase/purchase_view.php'; }
if ($row['inputtype'] == '4') { $inputvalues = ''; $inputvalue = getGP('' . $row["inputname"] . '', 'P', 'array'); foreach ($inputvalue as $arrsave) { $inputvalues .= $arrsave . ','; } $inputvalue = substr($inputvalues, 0, -1); } elseif ($row['inputtype'] == '2') { $inputvalue = trim(getGP('' . $row["inputname"] . '', 'P')); } else { $inputvalue = check_str(getGP('' . $row["inputname"] . '', 'P')); } $crm_db = array('content' => $inputvalue); //insert_db('crm_db',$crm_db); update_db('crm_db', $crm_db, array('viewid' => $pid, 'type' => 'crm_contact', 'inputname' => $row["inputname"], 'formid' => $row["fid"])); $crm_log .= serialize($crm_db) . '|515158.com|'; } $content = serialize($crm_contact); $title = get_realname($_USER->id) . '于' . get_date('Y-m-d H:i:s', PHP_TIME) . '编辑联系人信息'; get_logadd($pid, $content, $title, 36, $_USER->id); crm_log($title, $pid, $content, substr($crm_log, 0, -12), 1, 'crm_contact'); show_msg('编辑代理商信息成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . ''); } else { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_business WHERE id = '" . getGP('id', 'G', 'int') . "' "); include_once 'company/business_edit.php'; } } elseif ($do == 'view') { get_key("crm_business"); $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_business WHERE id = '" . getGP('id', 'G', 'int') . "' "); include_once 'company/business_view.php'; }
insert_db('crm_stock', $crm_stock); $vid = $db->insert_id(); //写入单项数据 global $db; $query = $db->query("SELECT * FROM " . DB_TABLEPRE . "crm_form where type1='crm_stock' ORDER BY inputnumber Asc"); while ($row = $db->fetch_array($query)) { if ($row['inputtype'] == '4') { $inputvalues = ''; $inputvalue = getGP('' . $row["inputname"] . '', 'P', 'array'); foreach ($inputvalue as $arrsave) { $inputvalues .= $arrsave . ','; } $inputvalue = substr($inputvalues, 0, -1); } elseif ($row['inputtype'] == '2') { $inputvalue = trim(getGP('' . $row["inputname"] . '', 'P')); } else { $inputvalue = check_str(getGP('' . $row["inputname"] . '', 'P')); } $crm_db = array('inputname' => $row["inputname"], 'content' => $inputvalue, 'viewid' => $vid, 'formid' => $row["fid"], 'type' => 'crm_stock'); insert_db('crm_db', $crm_db); $crm_log .= serialize($crm_db) . '|515158.com|'; } $content = serialize($crm_stock); $title = get_realname($_USER->id) . '于' . get_date('Y-m-d H:i:s', PHP_TIME) . '新建库存信息'; get_logadd($vid, $content, $title, 36, $_USER->id); crm_log($title, $vid, $content, substr($crm_log, 0, -12), 1, 'crm_stock'); show_msg('新建库存信息成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&id=' . $pid . '&type=' . $type . '&do=stock'); } else { include_once 'prod/stock_add.php'; } }
while ($row = $db->fetch_array($query)) { if ($row['inputtype'] == '4') { $inputvalues = ''; $inputvalue = getGP('' . $row["inputname"] . '', 'P', 'array'); foreach ($inputvalue as $arrsave) { $inputvalues .= $arrsave . ','; } $inputvalue = substr($inputvalues, 0, -1); } elseif ($row['inputtype'] == '2') { $inputvalue = trim(getGP('' . $row["inputname"] . '', 'P')); } else { $inputvalue = check_str(getGP('' . $row["inputname"] . '', 'P')); } $crm_db = array('content' => $inputvalue); //insert_db('crm_db',$crm_db); update_db('crm_db', $crm_db, array('viewid' => $vid, 'type' => 'crm_order', 'inputname' => $row["inputname"], 'formid' => $row["fid"])); $crm_log .= serialize($crm_db) . '|515158.com|'; } $content = serialize($crm_order); $title = get_realname($_USER->id) . '于' . get_date('Y-m-d H:i:s', PHP_TIME) . '编辑订单信息'; get_logadd($vid, $content, $title, 36, $_USER->id); crm_log($title, $vid, $content, substr($crm_log, 0, -12), 1, 'crm_order'); show_msg('编辑订单信息成功!', 'admin.php?ac=' . $ac . '&fileurl=' . $fileurl . '&type=' . getGP('type', 'P')); } else { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_order WHERE id = '" . getGP('id', 'G', 'int') . "' "); include_once 'service/order_edit.php'; } } elseif ($do == 'view') { $view = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "crm_order WHERE id = '" . getGP('id', 'G', 'int') . "' "); include_once 'service/order_view.php'; }