示例#1
0
function updateBillingtime($id, $billingtime)
{
    $objResponse = new xajaxResponse();
    global $locate;
    astercrm::updateField("accountgroup", "billingtime", $billingtime, $id);
    astercrm::updateField("accountgroup", "addtime", date("Y-m-d H:i:s"), $id);
    $objResponse->addScript("xajax_edit('" . $id . "')");
    return $objResponse;
}
示例#2
0
文件: upload.php 项目: ljhcj/IRISCC
            $filename = 'callshoplogo_' . $_REQUEST['group_id'] . '.' . $file_ext;
            $filepath = $config['system']['upload_file_path'] . '/callshoplogo/';
            if (!is_dir($filepath)) {
                if (!mkdir($filepath)) {
                    echo "<script>alert('" . $locate->Translate("Logo upload faild please check your upload directory") . "');</script>";
                    exit;
                }
            }
            if (!move_uploaded_file($_FILES['callshopLogo']['tmp_name'], $filepath . $filename)) {
                echo "<script>alert('" . $locate->Translate("Logo upload faild1") . "');</script>";
            } else {
                echo "<script>alert('" . $locate->Translate("Logo upload success") . "');</script>";
                $group_row = astercrm::getRecord($_REQUEST['group_id'], 'accountgroup');
                if ($group_row['grouplogo'] != $filename) {
                    unlink($filepath . $group_row['grouplogo']);
                    astercrm::updateField('accountgroup', 'grouplogo', $filename, $_REQUEST['group_id'], 'id');
                }
                //echo "<script>window.parent.location.reload();</script>";
            }
        } else {
            echo "<script>alert('" . $locate->Translate("Logo file must be a image file") . "');</script>";
        }
    }
    exit;
}
//for import
if (isset($_POST['CHECK']) && trim($_POST['CHECK']) == '1') {
    $upload_msg = '';
    $is_vaild = 0;
    if ($_FILES['excel']['name'] != '') {
        //上传的文件
示例#3
0
 function setSurveyEnable($surveyid, $surveyenable = 1, $groupid = 0)
 {
     //$table,$field,$value,$id
     if ($surveyid == 0) {
         global $db;
         $sql = "UPDATE survey SET enable = 0 WHERE groupid = {$groupid}";
         $res = $db->query($sql);
     } else {
         $res = astercrm::updateField('survey', 'enable', $surveyenable, $surveyid);
     }
     return;
 }