当前位置: 首页>>代码示例>>PHP>>正文


PHP Clients类代码示例

本文整理汇总了PHP中Clients的典型用法代码示例。如果您正苦于以下问题:PHP Clients类的具体用法?PHP Clients怎么用?PHP Clients使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Clients类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getCalendarResources

 public function getCalendarResources($connection, $group)
 {
     $personnel = new Personnel();
     $clients = new Clients();
     $personnel_list = $personnel->find(null, $connection);
     $client_list = $clients->find(null, $connection);
     $resources = [];
     switch ($group) {
         case 'Client':
             foreach ($client_list as $clientRecord) {
                 foreach ($personnel_list as $personnelRecord) {
                     $r = [];
                     $r["id"] = $personnelRecord["id"];
                     $r["clientName"] = $clientRecord["name"];
                     $r["title"] = $personnelRecord["name"];
                     $resources[] = $r;
                 }
             }
             break;
         default:
             foreach ($personnel_list as $personnelRecord) {
                 foreach ($client_list as $clientRecord) {
                     $r = [];
                     $r["id"] = $clientRecord["id"];
                     $r["personnelName"] = $personnelRecord["name"];
                     $r["title"] = $clientRecord["name"];
                     $resources[] = $r;
                 }
             }
             break;
     }
     $resources = json_encode($resources);
     return $resources;
 }
开发者ID:nopoku,项目名称:kosmas_api,代码行数:34,代码来源:Schedules.php

示例2: update

function update(Clients $obj)
{
    $dir = realpath(root . DIRECTORY_SEPARATOR . "assets" . DIRECTORY_SEPARATOR . "images" . DIRECTORY_SEPARATOR . "clients");
    $file = new File($dir);
    $columns = array('name', 'about');
    $data = array($_REQUEST['name'], $_REQUEST['about']);
    if (isset($_FILES['logo']['name']) && !empty($_FILES['logo']['name'])) {
        $unique_name = uniqid() . "." . pathinfo(basename($_FILES['logo']['name']), PATHINFO_EXTENSION);
        $images = $unique_name;
        $file->uploadFile($unique_name, $_FILES['logo']['tmp_name']);
        $columns[] = 'logo';
        $data[] = $unique_name;
    }
    return $obj->updateClient($_REQUEST['id'], $columns, $data);
}
开发者ID:janruls1,项目名称:WomensLine,代码行数:15,代码来源:clients.php

示例3: getClient

 public function getClient($id)
 {
     if (empty($id)) {
         return NULL;
     }
     $dept_id = Clients::model()->getScaler('client_name', '`id`=:t1', array(':t1' => $id));
     return !empty($dept_id) ? $dept_id : NULL;
 }
开发者ID:jacjimus,项目名称:furahia_mis,代码行数:8,代码来源:Syncorder.php

示例4: getClientsState

 public static function getClientsState($state)
 {
     if (!isset(self::$_client_states_arr)) {
         self::$_client_states_arr = self::getClientsStatesArray();
     }
     if (array_key_exists($state, self::$_client_states_arr)) {
         return self::$_client_states_arr[$state];
     }
     return null;
 }
开发者ID:barricade86,项目名称:raui,代码行数:10,代码来源:Clients.php

示例5: check_auth

 /**
  * Check Auth_Code rule
  */
 public function check_auth() {
     $client = Clients::model()->findByPk($this->Client_ID);
     if($client) {
         $company = Companies::model()->findByPk($client->Company_ID);
         if ($company->Auth_Code != $this->Auth_Code) {
             $this->addError('Auth_Code','Invalid Authorization Code');
         }
     } else {
         $this->addError('Auth_Code',"Company with this Authorization Code doesn't exists");
     }
 }
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:14,代码来源:RegisterAsClientAdminForm.php

示例6: actionActivateClientState

 public function actionActivateClientState()
 {
     $field = isset($_GET['field']) ? $_GET['field'] : 'state';
     $this->scenario = 'update_client_state';
     $action = Yii::app()->request->getParam('value', null);
     $id = Yii::app()->request->getParam('id', null);
     $availableStates = Clients::getClientsStatesArray();
     if (!array_key_exists($action, $availableStates)) {
         $action = 0;
     }
     if (!(!$id && $action === null)) {
         $model = $this->loadModel($id);
         if ($this->scenario) {
             $model->scenario = $this->scenario;
         }
         if ($model) {
             $model->{$field} = $action;
             $model->save(false);
         }
     }
     echo CHtml::link($availableStates[$action]);
 }
开发者ID:barricade86,项目名称:raui,代码行数:22,代码来源:MainController.php

示例7: Header

    function Header()
    {
        $client =  Clients::model()->with('company')->findByPk(Yii::app()->user->clientID);
        $project = Projects::model()->findByPk(Yii::app()->user->projectID);
        $projectId = Yii::app()->user->projectID;

        //Logo
        //$this->Image('logo_pb.png',10,8,33);
        //Arial bold 15
        $this->SetFont('Arial','',12);
        $this->SetXY(5,5);
        //$this->Cell(20,10,$client->company->Company_Name.' - '.$project->Project_Name ,0,0,'L');
        $this->SetXY(5,5);
        $this->SetFont('Arial','B',12);
        $this->Cell(0,0, Helper::shortenString($client->company->Company_Name,30).' - '.Helper::shortenString($project->Project_Name,20),0,1,'L');
        $this->SetFont('Arial','',12);
        $this->SetXY(5,10);
        $this->Cell(0,0,"Export Summary:",0,1,'L');

       // $this->Text(0,10,"AP Batch Summary Report:  ");
        $this->SetFont('Arial','B',12);
        $this->SetXY(140,5);
        if($this->doc_type == 'AP') {
            $this->Cell(0,0,"AP Batch Summary Report:",0,1,'R');
        } else {
            $this->Cell(0,0,"PO Batch Summary Report:",0,1,'R');
        }
        $this->SetFont('Arial','',12);
        $this->SetXY(140,10);
        $this->Cell(0,0,"Batch ".$this->batch_id,0,1,'R');

        //$this->SetXY(120,5);
        //$this->Cell(0,0,"AP Batch Summary Report: ",0,0,'R');
        $this->Line(5,14,205,14);
        $this->Ln(5);

    }
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:37,代码来源:FpdfForBatchSummary.php

示例8: appendCompany

    public function appendCompany($client_id){
        $client = Clients::model()->with('company.adreses')->findByPk($client_id);

        $company = $client->company;

        $xml_company = $this->xml->createElement("company");
        $xml_row = $this->xml->createElement("row");

        foreach ($company->attributes as $key => $value) {
            $xml_field = $this->xml->createElement("field",htmlentities($value,ENT_QUOTES | 'ENT_XML1'));
            $xml_field->setAttribute('name', $key);
            $xml_row->appendChild($xml_field);
        }

        $xml_company->appendChild($xml_row);

        $xml_adreses = $this->xml->createElement("addresses");

        foreach ($company->adreses as $address) {

            $xml_address = $this->xml->createElement("address");
            $xml_row = $this->xml->createElement("row");
            foreach ($address->attributes as $key=>$value) {
                $xml_field = $this->xml->createElement("field",htmlentities($value,ENT_QUOTES | 'ENT_XML1'));
                $xml_field->setAttribute('name', $key);
                $xml_row->appendChild($xml_field);
            }
            $xml_address->appendChild($xml_row);

        }
        $xml_adreses->appendChild($xml_address);

        $xml_company->appendChild($xml_adreses);

        $this->wrapper->appendChild($xml_company);
    }
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:36,代码来源:XmlHelper.php

示例9: array

	<div class="row">
		<?php 
echo $form->labelEx($model, 'name');
?>
		<?php 
echo $form->textField($model, 'name', array('size' => 60, 'maxlength' => 255));
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'client_id');
?>
		<?php 
echo $form->dropDownList($model, 'client_id', CHtml::listData(Clients::model()->findAll(), 'id', 'name'));
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'status');
?>
		<?php 
echo $form->dropDownList($model, 'status', Orders::model()->itemAlias('status'));
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'date');
开发者ID:ASDAFF,项目名称:its-crm,代码行数:30,代码来源:_form.php

示例10: getClientname

function getClientname($vid)
{
    return Clients::model()->findByPk($vid)->FirstName;
}
开发者ID:Deepab23,项目名称:clinic,代码行数:4,代码来源:view.php

示例11: findARsToEntry

    /**
     * Find ARs to entry data
     */
    public static function findARsToEntry()
    {
        $queryString = $_SESSION['last_ar_to_entry_search']['query'];
        $options =  $_SESSION['last_ar_to_entry_search']['options'];

        $condition = new CDbCriteria();
        $condition->join = "LEFT JOIN documents ON documents.Document_ID=t.Document_ID";
        $condition->condition = "t.Invoice_Number = '0'";

        $countCond = 0;
        if (count($options) > 0 && trim($queryString) != '') {
            $search_condition = new CDbCriteria();


            if ($options['search_option_com_name']) {
                $search_condition->compare('t.Company_Name', $queryString, true, 'OR');
                $countCond++;
            }

            if ($options['search_option_inv_num']) {
                $search_condition->compare('t.Invoice_Number', $queryString, true, 'OR');
                $countCond++;
            }

            if ($options['search_option_inv_date']) {
                $search_condition->compare('t.Invoice_Date', $queryString, true, 'OR');
                $countCond++;
            }

            if ($options['search_option_inv_amount']) {
                $search_condition->compare('t.Invoice_Amount', $queryString, true, 'OR');
                $countCond++;
            }

            if ($options['search_option_descr']) {
                $search_condition->compare('t.Description', $queryString, true, 'OR');
                $countCond++;
            }

            if ($options['search_option_terms']) {
                $search_condition->compare('t.Terms', $queryString, true, 'OR');
                $countCond++;
            }
        }



        if (Yii::app()->user->userType == UsersClientList::PROCESSOR || Yii::app()->user->userType == UsersClientList::APPROVER
            || Yii::app()->user->userType == UsersClientList::CLIENT_ADMIN) {
            $condition->addCondition("documents.Client_ID='" . Yii::app()->user->clientID . "'");
        }

        if (Yii::app()->user->userType == UsersClientList::PROCESSOR || ((Yii::app()->user->userType == UsersClientList::APPROVER
            || Yii::app()->user->userType == UsersClientList::CLIENT_ADMIN) && is_numeric(Yii::app()->user->projectID))) {
            $condition->addCondition("documents.Project_ID='" . Yii::app()->user->projectID . "'");
        }

        if (Yii::app()->user->userType == UsersClientList::USER
            && is_numeric(Yii::app()->user->projectID)) {
            $condition->addCondition("documents.Project_ID='" . Yii::app()->user->projectID . "'");
            $condition->addCondition("documents.User_ID='" . Yii::app()->user->userID . "'");
        }

        if (Yii::app()->user->userType == Users::DATA_ENTRY_CLERK) {
            //adding condition to allow DEC see only documents of clients that he has access
            $cli_array = Clients::getClientsIDList(Yii::app()->user->userID);
            $condition->addInCondition('documents.Client_ID', $cli_array);
        }

        $condition->order = "documents.Created ASC";

        if( $countCond > 0 ) $condition->mergeWith($search_condition);

        $ars = Ars::model()->findAll($condition);

        return $ars;
    }
开发者ID:ranvijayj,项目名称:htmlasa,代码行数:80,代码来源:Ars.php

示例12: ClientsLogin

<?php

require_once '../common/config/config.inc.php';
require_once '../classes/class.client.php';
require_once '../classes/class.clients_login.php';
require_once '../classes/class.extra.php';
$objClientsLogin = new ClientsLogin();
$objClientsLogin->isValidClients();
$objClients = new Clients();
$objExtra = new Extra();
$arrClmn = array('ClientExtra1', 'ClientExtra2');
$extra = $objExtra->getExtraListing(TABLE_EXTRA_SETTINGS, $arrClmn, '');
$clientID = $_SESSION['sessClientID'];
$varWhr = "AND pkClientID = '" . $_SESSION['sessClientID'] . "'";
$arrResult = $objClientsLogin->getClientsEmail($varWhr);
$varExtraWhr = "1 AND pkClientID =" . $_SESSION['sessClientID'];
$arrClmn = array('ClientExtra1', 'ClientExtra2');
$arrExtraRecord = $objClients->getUsersListing(TABLE_CLIENTS, $arrClmn, '', $varExtraWhr);
if ($_SESSION["arrPost"] != '') {
    @extract($_SESSION["arrPost"]);
    $varAdminEmail = $frmAdminEmail;
    $varAdminSupportEmail = $frmSupportEmail;
}
if ($arrResult) {
    $varClientEmailAddress = $arrResult[0]['ClientEmailAddress'];
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
开发者ID:saurabhs4,项目名称:niches,代码行数:31,代码来源:settings_frm_uil.php

示例13: function

                                    border-bottom: 1px solid #d9d9d9;
                                    padding: 8px 11px;
                                    text-align:left;
                                    font-size: 11px;
                                    color: #222;
                                    line-height: 12px;'), 'value' => function ($data) {
    return '<span class="circle ' . $data->color . '">circle</span>' . $data->name;
}), array('name' => 'id', 'header' => 'Количество клиентов', 'headerHtmlOptions' => array('style' => '   height: 12px;
                                    border-right: 1px solid #d9d9d9;
                                    border-bottom: 1px solid #d9d9d9;
                                    padding: 8px 11px;
                                    text-align:left;
                                    font-size: 11px;
                                    color: #222;
                                    line-height: 12px;'), 'type' => 'raw', 'value' => function ($data) {
    return count(Clients::model()->findAll('priority_id=' . $data->id . ' and company_id=' . Users::model()->findByPk(Yii::app()->user->id)->company_id));
}))));
?>
        <div class="settings-footer">
            <div class="help-dropdown open">
                <dl>
                    <dt class="dt simple"><i class="icon-help">help</i>Справка</dt>
                    <dd class="dd">
                        <ul>
                            <li>
                                <strong>Приоритет клиента</strong> определяет важность клиента для компании.<br> Изменять или удалять приоритеты на данный момент невозможно. Сейчас доступно три приоритета: важный, средний и низки.
                                Важный приоритет - это наиболее платежеспособные клиенты, на которых необходимо обратить внимание в первую очередь.
                                Средний приоритет - это перспективные клиенты, с которыми нужно развивать взаимоотношения.
                                Низкий приоритет - это клиенты, у которых нет или мало интереса к товарам или услугам компании.
                            </li>
                        </ul>
开发者ID:ArseniyDyupin,项目名称:SimpleCRM2,代码行数:31,代码来源:settings_clients_priority.php

示例14: actionChangeBody

 /**
  * получить данные о договоре для редактора
  */
 public function actionChangeBody()
 {
     if (Yii::app()->request->isAjaxRequest) {
         //printvar($_POST);
         $return_msg = '';
         $order_id = intval($_POST['order_id']);
         if (!is_array($order_pos = Works::model()->worksByOrder($order_id))) {
             $return_msg .= 'Невозможно получить список работ';
         }
         $data['works'] = "<ul>\n";
         foreach ($order_pos as $o_p) {
             $data['works'] .= '<li>' . $o_p->name . ', ' . $o_p->quantity . $o_p->unit . "</li>\n";
         }
         $data['works'] .= "</ul>\n";
         //			echo ($data['works']);die;
         $data['contract']['date'] = $_POST['date'];
         $data['contract']['duedate'] = $_POST['duedate'];
         $data['contract']['name'] = $_POST['name'];
         $data['contract']['num'] = $_POST['num'];
         $data['contract']['sum'] = $_POST['sum'];
         //			echo json_encode(CVarDumper::dump($data));die;//Yii::app()->end;
         if (!is_array($data['client'] = Clients::model()->clientByOrder($order_id))) {
             $return_msg .= 'Невозможно получить данные клиента';
         }
         //			echo CVarDumper::dump($data['client']);die;
         if (!is_array($data['settings'] = Config::model()->get_settings())) {
             $return_msg .= 'Невозможно получить основные параметры';
         }
         //			echo CVarDumper::dump($data['settings']['org.fullname']['value'],10,true);die;
         $body = $this->_tmpl_body($data, Contracts::model()->get_contract_tmpl($_POST['template_id']));
         //			echo $body;die;
         if ($body == '') {
             $return_msg .= 'Невозможно сформировать шаблон';
         }
         if ($return_msg == '') {
             echo $body;
         } else {
             echo $return_msg;
         }
     } else {
         echo 'Некорректный формат запроса';
     }
 }
开发者ID:ASDAFF,项目名称:its-crm,代码行数:46,代码来源:ContractsController.php

示例15: viewTable

function viewTable($data, $count)
{
    $clients = new Clients();
    $paginations = new Paginations();
    $paginations->setLimit(10);
    $paginations->setPage($_REQUEST['page']);
    $paginations->setJSCallback("viewClients");
    $paginations->setTotalPages($count);
    $paginations->makePagination();
    ?>
        <div class="mws-panel-header">
            <span class="mws-i-24 i-table-1">View Client</span>
        </div>
        <div class="mws-panel-body">
        <table cellpadding="0" cellspacing="0" border="0" class="mws-datatable-fn mws-table">
            <thead>
            <tr>
                <th>Client Name</th>
                <th>Client Address</th>
                <th>Client Email</th>
            </tr>
            </thead>
            <tbody>
            <?php 
    if (count($data) > 0) {
        ?>

                <?php 
        for ($i = 0; $i < count($data); $i++) {
            $clients->extractor($data, $i);
            ?>
                    <tr id="row_<?php 
            echo $clients->clientId();
            ?>
">
                        <td><?php 
            echo $clients->clientFirstName() . ' ' . $clients->clientLastName();
            ?>
</td>
                        <td><?php 
            echo $clients->clientAddress();
            ?>
</td>
                        <td><?php 
            echo $clients->clientEmail();
            ?>
</td>
                    </tr>
                <?php 
        }
        ?>

            <?php 
    }
    ?>
            </tbody>
        </table>

        <?php 
    $paginations->drawPagination();
}
开发者ID:jcodesdotme,项目名称:pp,代码行数:61,代码来源:clients-controller.php


注:本文中的Clients类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。