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


PHP Customer::events方法代碼示例

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


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

示例1: elseif

 function &getRecordsFilteredMorewithstype($start, $limit, $filter, $content, $stype = null, $order, $table, $ordering = "")
 {
     global $db;
     $joinstr = astercrm::createSqlWithStype($filter, $content, $stype);
     if ($_SESSION['curuser']['usertype'] == 'admin') {
         $sql = "SELECT * FROM credithistory WHERE ";
     } elseif ($_SESSION['curuser']['usertype'] == 'groupadmin') {
         $sql = "SELECT * FROM credithistory WHERE groupid = '" . $_SESSION['curuser']['groupid'] . "'";
     } elseif ($_SESSION['curuser']['usertype'] == 'reseller') {
         $sql = "SELECT * FROM credithistory WHERE resellerid = '" . $_SESSION['curuser']['resellerid'] . "'";
     } elseif ($_SESSION['curuser']['usertype'] == 'clid') {
         $sql = "SELECT * FROM credithistory WHERE clidid = '" . $_SESSION['curuser']['clidid'] . "'";
     }
     if ($joinstr != '') {
         if ($_SESSION['curuser']['usertype'] == 'admin') {
             $joinstr = ltrim($joinstr, 'AND');
             //去掉最左邊的AND
             $sql .= $joinstr . "  ";
         } else {
             $sql .= $joinstr . " ";
         }
     }
     $sql .= " ORDER BY " . $order . " " . $_SESSION['ordering'] . " LIMIT {$start}, {$limit} {$ordering}";
     Customer::events($sql);
     $res =& $db->query($sql);
     return $res;
 }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:27,代碼來源:credithistory.grid.inc.php

示例2: getCountAnswered

 function getCountAnswered($campaignid)
 {
     global $db;
     $query = "SELECT COUNT(*) FROM campaigndialedlist WHERE campaignid = {$campaignid} AND answertime > '0000-00-00 00:00:00'";
     Customer::events($query);
     $res =& $db->getOne($query);
     return $res;
 }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:8,代碼來源:campaign.grid.inc.php

示例3: COUNT

 function &getNumRowsMorewithstype($filter, $content, $stype, $table)
 {
     global $db;
     $joinstr = astercrm::createSqlWithStype($filter, $content, $stype);
     $sql = "SELECT COUNT(*) AS numRows FROM myrate LEFT JOIN accountgroup ON accountgroup.id = myrate.groupid LEFT JOIN resellergroup ON resellergroup.id = myrate.resellerid WHERE";
     if ($_SESSION['curuser']['usertype'] == 'admin') {
         $sql .= " 1 ";
     } elseif ($_SESSION['curuser']['usertype'] == 'reseller') {
         $sql .= " (myrate.resellerid = " . $_SESSION['curuser']['resellerid'] . " OR myrate.resellerid = 0) ";
     } else {
         $sql .= " ( (myrate.groupid = " . $_SESSION['curuser']['groupid'] . " OR myrate.groupid = 0) AND (myrate.resellerid = " . $_SESSION['curuser']['resellerid'] . " OR myrate.resellerid = 0) )";
     }
     if ($joinstr != '') {
         $joinstr = ltrim($joinstr, 'AND');
         //去掉最左邊的AND
         $sql .= " AND " . $joinstr . " ";
     } else {
         $sql .= " 1 ";
     }
     Customer::events($sql);
     $res =& $db->getOne($sql);
     return $res;
 }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:23,代碼來源:rate.grid.inc.php

示例4: ltrim

 function &getRecordsFilteredMorewithstype($start, $limit, $filter, $content, $stype, $order, $table)
 {
     global $db;
     $joinstr = astercrm::createSqlWithStype($filter, $content, $stype);
     //<---- change by your function
     $sql = "SELECT * FROM sms_sents WHERE 1 ";
     if ($joinstr != '') {
         $joinstr = ltrim($joinstr, 'AND');
         //去掉最左邊的AND
         $sql .= " AND " . $joinstr . "  " . " ORDER BY " . $order . " " . $_SESSION['ordering'] . " LIMIT {$start}, {$limit} {$ordering}";
     }
     Customer::events($sql);
     $res =& $db->query($sql);
     return $res;
 }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:15,代碼來源:sms_sents.grid.inc.php

示例5: COUNT

 function &getNumRowsMorewithstype($filter, $content, $stype, $table)
 {
     global $db;
     $joinstr = astercrm::createSqlWithStype($filter, $content, $stype);
     $sql = "SELECT COUNT(*) FROM account_log WHERE ";
     if ($joinstr != '') {
         $joinstr = ltrim($joinstr, 'AND');
         //去掉最左邊的AND
         $sql .= " " . $joinstr;
     } else {
         $sql .= " 1";
     }
     Customer::events($sql);
     $res =& $db->getOne($sql);
     return $res;
 }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:16,代碼來源:account_log.grid.inc.php

示例6: ltrim

 function &getRecordsFilteredMorewithstype($start, $limit, $filter, $content, $stype, $order, $table)
 {
     global $db;
     $joinstr = astercrm::createSqlWithStype($filter, $content, $stype, 'astercrm_account');
     $sql = "SELECT astercrm_account.*, groupname FROM astercrm_account LEFT JOIN astercrm_accountgroup ON astercrm_accountgroup.id = astercrm_account.groupid WHERE ";
     if ($_SESSION['curuser']['usertype'] == 'admin') {
         $sql .= " 1 ";
     } else {
         $sql .= " astercrm_account.groupid = " . $_SESSION['curuser']['groupid'] . " ";
     }
     if ($joinstr != '') {
         $joinstr = ltrim($joinstr, 'AND');
         //去掉最左邊的AND
         $sql .= " AND " . $joinstr . "  " . " ORDER BY " . $order . " " . $_SESSION['ordering'] . " LIMIT {$start}, {$limit} {$ordering}";
     }
     Customer::events($sql);
     $res =& $db->query($sql);
     return $res;
 }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:19,代碼來源:agent.grid.inc.php

示例7: COUNT

 function &getNumRowsMorewithstype($filter, $content, $stype, $table)
 {
     global $db;
     $joinstr = astercrm::createSqlWithStype($filter, $content, $stype);
     $sql = "SELECT COUNT(*) FROM note LEFT JOIN customer ON customer.id = note.customerid LEFT JOIN contact ON contact.id = note.contactid  WHERE ";
     if ($_SESSION['curuser']['usertype'] == 'admin') {
         $sql .= " ";
     } else {
         $sql .= " note.groupid = " . $_SESSION['curuser']['groupid'] . " AND ";
     }
     if ($joinstr != '') {
         $joinstr = ltrim($joinstr, 'AND');
         //去掉最左邊的AND
         $sql .= " " . $joinstr;
     } else {
         $sql .= " 1";
     }
     Customer::events($sql);
     $res =& $db->getOne($sql);
     return $res;
 }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:21,代碼來源:note.grid.inc.php

示例8: COUNT

 function &getNumRowsMorewithstype($filter, $content, $stype, $table)
 {
     global $db, $config;
     $updateTimeInterval = $config['system']['update_online_interval'] * 60;
     $joinstr = astercrm::createSqlWithStype($filter, $content, $stype, "diallist");
     $sql = "SELECT COUNT(*) FROM astercrm_account WHERE (UNIX_TIMESTAMP(now())-UNIX_TIMESTAMP(last_update_time)) < {$updateTimeInterval} ";
     if ($_SESSION['curuser']['usertype'] == 'admin') {
         $sql .= " ";
     } else {
         $sql .= " AND groupid = " . $_SESSION['curuser']['groupid'] . " AND ";
     }
     if ($joinstr != '') {
         $joinstr = ltrim($joinstr, 'AND');
         //去掉最左邊的AND
         $sql .= " AND " . $joinstr;
     } else {
         $sql .= " 1";
     }
     Customer::events($sql);
     $res =& $db->getOne($sql);
     return $res;
 }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:22,代碼來源:useronline.grid.inc.php

示例9: formDiallist

    function formDiallist($dialedlistid)
    {
        global $locate, $db;
        $sql = "SELECT dialednumber, customername,memo,campaignid FROM dialedlist WHERE id = {$dialedlistid}";
        Customer::events($sql);
        $row =& $db->getRow($sql);
        $html = '';
        if ($row) {
            $html = Table::Top($locate->Translate("Customer from Diallist"), "formDiallistPopup");
            // <-- Set the title for your form.
            $html .= '<table border="1" width="100%" class="adminlist" id="d" name="d">
						<tr><td width="45%">&nbsp;' . $locate->Translate("Customer Name") . ':&nbsp;</td><td>' . $row['customername'] . '</td></tr>
						<tr><td>&nbsp;' . $locate->Translate("Pone Number") . ':&nbsp;</td><td>' . $row['dialednumber'] . '</td></tr>
						<tr><td>&nbsp;' . $locate->Translate("Memo") . ':&nbsp;</td><td>' . $row['memo'] . '</td></tr>';
            if ($row['campaignid'] != 0 && $row['campaignid'] != '') {
                //獲取撥號計劃的備注
                $CampaignNote = Customer::getCampaignNote($row['campaignid']);
                $html .= '<tr><td>&nbsp;' . $locate->Translate("Campaign Memo") . ':&nbsp;</td><td>' . $CampaignNote . '</td></tr>';
            }
            $html .= '
					</table>';
            // <-- Change by your method
            $html .= Table::Footer();
        }
        return $html;
    }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:26,代碼來源:portal.grid.inc.php

示例10: searchFormSubmit

function searchFormSubmit($searchFormValue, $numRows = null, $limit = null, $id = null, $type = null)
{
    global $locate, $db, $config;
    $objResponse = new xajaxResponse();
    $searchField = array();
    $searchContent = array();
    $optionFlag = $searchFormValue['optionFlag'];
    $searchContent = $searchFormValue['searchContent'];
    //搜索內容 數組
    $searchField = $searchFormValue['searchField'];
    //搜索條件 數組
    $searchType = $searchFormValue['searchType'];
    $ordering = $searchFormValue['ordering'];
    $order = $searchFormValue['order'];
    //	print_r($searchFormValue);exit;
    $divName = "grid";
    if ($optionFlag == "export" || $optionFlag == "exportcsv") {
        if ($config['system']['enable_code']) {
            $sql = Customer::specialGetSql($searchContent, $searchField, $searchType, 'customer', array('customer.*', 'note.note' => 'note', 'note.codes' => 'codes', 'note.creby' => 'last_note_created_by', 'note.cretime' => 'noteCretime'), array('note' => array('note.id', 'customer.last_note_id')));
            //得到要導出的sql語句
        } else {
            $sql = Customer::specialGetSql($searchContent, $searchField, $searchType, 'customer');
            //得到要導出的sql語句
        }
        $_SESSION['export_sql'] = $sql;
        $objResponse->addAssign("hidSql", "value", $sql);
        //賦值隱含域
        $objResponse->addAssign("maintable", "value", 'customer');
        //賦值隱含域
        $objResponse->addAssign("exporttype", "value", $optionFlag);
        $objResponse->addScript("document.getElementById('exportForm').submit();");
    }
    if ($optionFlag == "delete") {
        $customer_ref =& Customer::getRecordsFilteredMorewithstype('', '', $searchField, $searchContent, $searchType, '', 'customer', 'delete');
        while ($customer_ref->fetchInto($row)) {
            Customer::deleteRecord($row['id'], 'customer');
            Customer::deleteRecords("customerid", $row['id'], 'note');
            Customer::deleteRecords("customerid", $row['id'], 'contact');
        }
        $html = createGrid($searchFormValue['numRows'], $searchFormValue['limit'], '', '', $order, $divName, $ordering, '');
        $objResponse->addClear("msgZone", "innerHTML");
        $objResponse->addAssign($divName, "innerHTML", $html);
    } else {
        if ($optionFlag == "move_to_customerleads" || $optionFlag == "copy_to_customerleads") {
            $lead_sql = Customer::specialGetSql($searchContent, $searchField, $searchType, 'customer');
            Customer::events($lead_sql);
            $customer_lead =& $db->query($lead_sql);
            $i = 0;
            while ($customer_lead->fetchInto($row)) {
                $res = astercrm::insertNewCustomerLead($row['id'], $config['system']['customer_leads'], true);
                if ($res) {
                    $i++;
                }
            }
            $html = createGrid($searchFormValue['numRows'], $searchFormValue['limit'], '', '', $order, $divName, $ordering, '');
            //$objResponse->addClear("msgZone", "innerHTML");
            $showHtml = '';
            if ($config['system']['customer_leads'] == 'move' || $config['system']['customer_leads'] == 'default_move') {
                $showHtml = $i . $locate->Translate(" customer was moved to customer_leads");
            } else {
                if ($config['system']['customer_leads'] == 'copy' || $config['system']['customer_leads'] == 'default_copy') {
                    $showHtml = $i . $locate->Translate(" customer was copied to customer_leads");
                }
            }
            $objResponse->addAssign($divName, "innerHTML", $html);
            $objResponse->addAssign("msgZone", "innerHTML", $showHtml);
        } else {
            if ($type == "delete") {
                $res = Customer::deleteRecord($id, 'customer');
                if ($res) {
                    $html = createGrid($searchFormValue['numRows'], $searchFormValue['limit'], $searchField, $searchContent, $order, $divName, $ordering, 1, $searchType);
                    $objResponse = new xajaxResponse();
                    $objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("delete_rec"));
                } else {
                    $objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("rec_cannot_delete"));
                }
            } else {
                $html = createGrid($numRows, $limit, $searchField, $searchContent, $order, $divName, $ordering, 1, $searchType);
            }
            $objResponse->addClear("msgZone", "innerHTML");
            $objResponse->addAssign($divName, "innerHTML", $html);
        }
    }
    return $objResponse->getXML();
}
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:85,代碼來源:customer.server.php

示例11: deleteRate

function deleteRate($deleteSql, $historySql)
{
    global $locate, $db, $config;
    $objResponse = new xajaxResponse();
    if (empty($deleteSql)) {
        $objResponse->addAlert($locate->Translate("Can not delete this rate"));
        return $objResponse;
    }
    //if enable the synchronizatioin
    if ($config['synchronize']['delete_by_use_history']) {
        Customer::events($historySql);
        $insertResult = $db->query($historySql);
        if ($insertResult <= 0) {
            $objResponse->addAlert($locate->Translate("delete failed synchronization"));
            return $objResponse;
        }
    }
    Customer::events($deleteSql);
    $result = $db->query($deleteSql);
    if ($result) {
        $objResponse->addAlert($locate->Translate("Delete success") . ',' . $locate->Translate("please remember to restart asterrc"));
        $objResponse->addAssign("searchRateList", "innerHTML", $locate->Translate("page_rate_tips") . '&nbsp;&nbsp;<input type="button" value="' . $locate->Translate("restart asterrc") . '" onclick="restartAsterrc();return false;" />');
    } else {
        $objResponse->addAlert($locate->Translate("Delete failed"));
    }
    return $objResponse;
}
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:27,代碼來源:delete_rate.server.php

示例12: COUNT

 function &getNumRowsByCustomerid($table = 'mycdr', $customerid)
 {
     global $db;
     $sql .= " SELECT COUNT(*) FROM " . $table . " WHERE customerid = {$customerid} AND (groupid > 0 OR resellerid > '0')";
     //echo $sql;exit;
     Customer::events($sql);
     $res =& $db->getOne($sql);
     return $res;
 }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:9,代碼來源:cdr.grid.inc.php

示例13: COUNT

 function &getNumRowsMorewithstype($filter, $content, $stype, $table)
 {
     global $customers_db, $config;
     $joinstr = astercrm::createSqlWithStype($filter, $content, $stype);
     $sql = "SELECT COUNT(*) FROM " . $config['customers']['customertable'] . " WHERE ";
     //if ($_SESSION['curuser']['usertype'] == 'admin'){
     $sql .= " 1 ";
     //}
     if ($joinstr != '') {
         $joinstr = ltrim($joinstr, 'AND');
         //去掉最左邊的AND
         $sql .= " AND " . $joinstr;
     }
     Customer::events($sql);
     $res =& $customers_db->getOne($sql);
     return $res;
 }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:17,代碼來源:customers.grid.inc.php

示例14: deletefromsearch

 function deletefromsearch($searchContent, $searchField, $searchType = "", $table)
 {
     global $db;
     if (empty($_SESSION['curuser']['usertype'])) {
         return;
     }
     $joinstr = astercrm::createSqlWithStype($searchField, $searchContent, $searchType, $table, 'delete');
     if ($joinstr != '') {
         $joinstr = ltrim($joinstr, 'AND');
         if ($_SESSION['curuser']['usertype'] == 'admin') {
             $sql = 'DELETE FROM ' . $table . ' WHERE ' . $joinstr;
         } else {
             $sql = 'DELETE FROM ' . $table . ' WHERE ' . $joinstr . " AND " . $table . ".groupid = '" . $_SESSION['curuser']['groupid'] . "'";
         }
     } else {
         if ($_SESSION['curuser']['usertype'] == 'admin') {
             $sql = 'TRUNCATE table ' . $table;
         } else {
             $sql = "DELETE FROM " . $table . " WHERE " . $table . ".groupid = '" . $_SESSION['curuser']['groupid'] . "'";
         }
     }
     Customer::events($sql);
     $res =& $db->query($sql);
     return $res;
 }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:25,代碼來源:astercrm.class.php

示例15: foreach

 function &getNumRowsMore($filter = null, $content = null, $table)
 {
     global $db;
     $i = 0;
     $joinstr = '';
     foreach ($content as $value) {
         $value = trim($value);
         if (strlen($value) != 0 && strlen($filter[$i]) != 0) {
             $joinstr .= "AND {$filter[$i]} like '%" . $value . "%' ";
         }
         $i++;
     }
     $sql = "SELECT COUNT(*) FROM remindercalls LEFT JOIN astercrm_accountgroup ON astercrm_accountgroup.id = remindercalls.groupid LEFT JOIN asteriskcalls ON asteriskcalls.id = remindercalls.asteriskcallsid WHERE ";
     if ($_SESSION['curuser']['usertype'] == 'admin') {
         $sql .= " ";
     } else {
         $sql .= " remindercalls.groupid = " . $_SESSION['curuser']['groupid'] . " AND ";
     }
     if ($joinstr != '') {
         $joinstr = ltrim($joinstr, 'AND');
         //去掉最左邊的AND
         $sql .= " " . $joinstr;
     } else {
         $sql .= " 1";
     }
     Customer::events($sql);
     $res =& $db->getOne($sql);
     return $res;
 }
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:29,代碼來源:remindercalls.grid.inc.php


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