当前位置: 首页>>代码示例>>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;未经允许,请勿转载。