當前位置: 首頁>>代碼示例>>PHP>>正文


PHP astercrm::deleteRecord方法代碼示例

本文整理匯總了PHP中astercrm::deleteRecord方法的典型用法代碼示例。如果您正苦於以下問題:PHP astercrm::deleteRecord方法的具體用法?PHP astercrm::deleteRecord怎麽用?PHP astercrm::deleteRecord使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在astercrm的用法示例。


在下文中一共展示了astercrm::deleteRecord方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: placeCall

function placeCall($campaignid)
{
    global $config;
    $myAsterisk = new Asterisk();
    $row =& astercrm::getDialNumber($campaignid);
    // 待撥號碼為空
    if (!$row) {
        return false;
    }
    //print_r($row);
    $id = $row['id'];
    $groupid = $row['groupid'];
    $campaignid = $row['campaignid'];
    $phoneNum = $row['dialnumber'];
    $trytime = $row['trytime'];
    $assign = $row['assign'];
    $pdcontext = $row['incontext'];
    $outcontext = $row['outcontext'];
    if ($row['inexten'] != "") {
        $pdextension = $row['inexten'];
    } else {
        if ($row['assign'] != "") {
            $pdextension = $row['assign'];
        } else {
            $pdextension = $row['dialnumber'];
        }
    }
    $res = astercrm::deleteRecord($id, "diallist");
    $f['dialednumber'] = $phoneNum;
    $f['dialedby'] = $_SESSION['curuser']['username'];
    $f['groupid'] = $groupid;
    $f['trytime'] = $trytime + 1;
    $f['assign'] = $assign;
    $f['campaignid'] = $campaignid;
    $res = astercrm::insertNewDialedlist($f);
    $actionid = md5(uniqid(""));
    $strChannel = "local/" . $phoneNum . "@" . $outcontext . "/n";
    if ($config['system']['allow_dropcall'] == true) {
        $myAsterisk->dropCall($actionid, array('Channel' => "{$strChannel}", 'WaitTime' => 30, 'Exten' => $pdextension, 'Context' => $pdcontext, 'Variable' => "{$strVariable}", 'Priority' => 1, 'MaxRetries' => 0, 'CallerID' => $phoneNum));
    } else {
        $myAsterisk->config['asmanager'] = $config['asterisk'];
        $res = $myAsterisk->connect();
        $myAsterisk->sendCall($strChannel, $pdextension, $pdcontext, 1, NULL, NULL, 30, $phoneNum, NULL, NULL, NULL, $actionid);
    }
    return true;
}
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:46,代碼來源:predictivedialer.server.php

示例2: deleteByButton

function deleteByButton($f, $searchFormValue)
{
    $objResponse = new xajaxResponse();
    if (is_array($f['ckb'])) {
        foreach ($f['ckb'] as $vaule) {
            $res_customer = astercrm::deleteRecord($vaule, 'diallist');
        }
    }
    $searchContent = $searchFormValue['searchContent'];
    //搜索內容 數組
    $searchField = $searchFormValue['searchField'];
    //搜索條件 數組
    $numRows = $searchFormValue['numRows'];
    $limit = $searchFormValue['limit'];
    $html = createGrid($numRows, $limit, $searchField, $searchContent, $searchField, 'grid');
    $objResponse->addAssign('grid', "innerHTML", $html);
    return $objResponse->getXML();
}
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:18,代碼來源:diallist.server.php

示例3: skipDiallist

function skipDiallist($dialnumber, $diallistid)
{
    global $locate;
    $objResponse = new xajaxResponse();
    $row = astercrm::getRecordByID($diallistid, 'diallist');
    if ($row['dialnumber'] != '') {
        $row['callresult'] = 'skip';
        astercrm::deleteRecord($row['id'], "diallist");
        $row['dialednumber'] = $phoneNum;
        $row['dialedby'] = $_SESSION['curuser']['extension'];
        $row['trytime'] = $row['trytime'] + 1;
        astercrm::insertNewDialedlist($row);
    } else {
        $objResponse->addAlert($locate->translate("Option failed"));
        return $objResponse;
    }
    $objResponse->addScript("xajax_clearPopup()");
    $objResponse->loadXML(getPrivateDialListNumber($_SESSION['curuser']['extension']));
    return $objResponse;
}
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:20,代碼來源:portal.server.php

示例4: insertNewCustomerLead

 /**
  *  insert a record to customer_leads table
  *
  *	@param $customerID			(int)		customer id fields.
  *	@param $customerLead		(varchar)	customer_leads
  *	@param $saveNote			boolean		if save note
  *	@return $customerid	(object) 	id number for the record just inserted.
  */
 function insertNewCustomerLead($customerID, $customerLead, $saveNote)
 {
     global $db, $config;
     $sql = "SELECT * FROM customer WHERE id={$customerID}";
     $f =& $db->getRow($sql);
     $query = "INSERT INTO customer_leads SET " . "customer='" . addslashes($f['customer']) . "', " . "customertitle='" . addslashes($f['customertitle']) . "', " . "website='" . addslashes($f['website']) . "', " . "country='" . addslashes($f['country']) . "', " . "address='" . addslashes($f['address']) . "', " . "zipcode='" . addslashes($f['zipcode']) . "', " . "city='" . addslashes($f['city']) . "', " . "state='" . addslashes($f['state']) . "', " . "contact='" . addslashes($f['contact']) . "', " . "contactgender='" . addslashes($f['contactgender']) . "', " . "phone='" . $f['phone'] . "', " . "phone_ext='" . addslashes($f['phone_ext']) . "', " . "category='" . $f['category'] . "', " . "bankname='" . addslashes($f['bankname']) . "', " . "bankzip='" . addslashes($f['bankzip']) . "', " . "bankaccount='" . addslashes($f['bankaccount']) . "', " . "bankaccountname='" . addslashes($f['bankaccountname']) . "', " . "fax='" . addslashes($f['fax']) . "', " . "fax_ext='" . addslashes($f['fax_ext']) . "', " . "mobile='" . $f['mobile'] . "', " . "email='" . addslashes($f['email']) . "', " . "cretime=now(), " . "groupid = " . $f['groupid'] . ", " . "last_note_id = 0, " . "creby='" . $f['creby'] . "'";
     $res =& $db->query($query);
     $customerid = mysql_insert_id();
     if ($customerid) {
         if ($saveNote) {
             $note_sql = "SELECT * FROM note WHERE id=" . $f['last_note_id'] . " ";
             $noteResult =& $db->getRow($note_sql);
             if (!empty($noteResult)) {
                 $noteSql = "INSERT INTO note_leads SET `note`='" . addslashes($noteResult['note']) . "',`callerid`='" . addslashes($noteResult['callerid']) . "',`priority`=" . $noteResult['priority'] . ",`attitude`=" . $noteResult['attitude'] . ",`cretime`=now(),`creby`='" . $noteResult['creby'] . "',`customerid`=" . $customerid . ",`contactid`=0,`groupid`=" . $noteResult['groupid'] . ",`codes`='" . addslashes($noteResult['codes']) . "',`private`=" . $noteResult['private'] . " ";
                 $note =& $db->query($noteSql);
                 $last_note_id = mysql_insert_id();
                 //更新customer_leads對應數據的last_note_id值
                 $update_sql = "UPDATE customer_leads SET last_note_id={$last_note_id} WHERE id={$customerid} ";
                 $res =& $db->query($update_sql);
             }
         }
     }
     if ($customerLead == 'move' || $customerLead == 'default_move') {
         astercrm::deleteRecord($customerID, 'customer');
         astercrm::deleteRecords("customerid", $customerID, 'note');
         //astercrm::deleteRecords("customerid",$customerID,'contact');
         //$deleteSql = "DELETE FROM customer WHERE id=$customerID";
         //astercrm::events($deleteSql);
         //$res =& $db->query($deleteSql);
     }
     return $customerID;
 }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:40,代碼來源:astercrm.class.php


注:本文中的astercrm::deleteRecord方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。