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


PHP company::getCompanies方法代码示例

本文整理汇总了PHP中company::getCompanies方法的典型用法代码示例。如果您正苦于以下问题:PHP company::getCompanies方法的具体用法?PHP company::getCompanies怎么用?PHP company::getCompanies使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在company的用法示例。


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

示例1: get_form_html

function get_form_html($form_id, $id)
{
    ob_start();
    ?>
    <div id="head_div" style="height: 150px; 
         width: 320px; background-color: #ECECEC; 
         border-radius: 5px;margin-left: auto;display: none; ">

        

    </div>
    <div style="margin-top: 10px; background-color:transparent;padding-bottom: 30px;">
        <style>
            div#purchace_items td{
                border: 1px solid #21ACD7;
            }
            div#purchace_items tbody td{
                padding: 5px 0 5px 5px;
            }
            div#purchace_items tbody td input,div#purchace_items tbody td select{
                padding: 0;
                border: 0;
                margin: 0;
                height: 100%;
                width: 100%;
                background-color: transparent;
            }
        </style>
        <div id="purchace_items" style="width: 100%; padding: 10px 0; color: #21ACD7;">           
            <table id="items_table" style="border-collapse: collapse; width: 100%; 
                   background-color: #fff; border-radius: 10px;  color: #21ACD7;">
                <thead style="text-align: center;">
                    <tr status="not_selected">
                        <td>
                            #
                        </td>
                        <td>
                            ID
                        </td>
                        <td>
                            SHOP NAME
                        </td>
                        <td style="">
                            SHOP CODE
                        </td>
                    </tr>
                </thead>
                <tbody style="padding-left: 3px; text-align: center; ">
                    <?php 
    $company = new company();
    $companies = $company->getCompanies();
    $i = 0;
    if ($companies == NULL || sizeof($companies) == 0) {
        echo '<tr><td colspan="8"> No Shop Found </td></tr>';
    } else {
        foreach ($companies as $company) {
            ?>
                        <tr id="<?php 
            echo $company->id;
            ?>
" onclick="select_row(this)">
                            <td style="text-align: center;"><?php 
            echo ++$i;
            ?>
</td>
                            <td id="company_id"><?php 
            echo 'SHOP-' . $company->id;
            ?>
</td>
                            <td id="company_name"><?php 
            echo $company->company_name;
            ?>
</td>
                            <td id="company_code"><?php 
            echo $company->company_code;
            ?>
</td>
                        </tr>
                        <?php 
        }
    }
    ?>
                </tbody>                               
            </table>
        </div>
    </div>
    <script type="text/javascript">
        function select_row(row) {
            var j_row = $(row);
            if(j_row.attr('status') == 'selected'){
                $('table#items_table tr').attr('status', 'not_selected');
                $('table#items_table tr').css('background-color', '#FFF');
                $('img#edit').css('display', 'none');
                $('img#edit_fade').css('display', 'block');
                $('img#delete').css('display', 'none');
                $('img#delete_fade').css('display', 'block');
            }else{            
                $('table#items_table tr').attr('status', 'not_selected');
                $('table#items_table tr').css('background-color', '#FFF');
                j_row.attr('status', 'selected');
//.........这里部分代码省略.........
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:101,代码来源:26.php

示例2: get_form_html

function get_form_html($form_id, $id)
{
    ob_start();
    ?>
    <style>
        .field_name{
            width: 20%;
        }
        .field input{
            width: 100%;
            margin-left: 0px;
        }
        .field .parent{
            padding: 0px 0px;
        }
        .field select{
            width: 100%;
        }
    </style>
    <div id="head_div" style="padding: 5px 0; background-color: #ECECEC;  color: #21ACD7;
         border-radius: 5px;margin-left: auto;display: none; text-align: center; ">
    </div>
    <?php 
    $user = new user();
    if ($id != 0) {
        $user->id = $id;
        $user->getUser();
    }
    ?>
    <div style="margin-top: 10px; background-color:transparent;padding-bottom: 30px;">
        <form action="#" method="post" class="action_form" operation="add" style="width:100%;" >
            <table style="width:100%;">
                <tr>
                    <td class="field_name">                    
                        <font>NAME</font>
                    </td>
                    <td class="field"> 
                        <div  class="parent">
                            <input value="<?php 
    echo $user->name;
    ?>
" type="text" id="name" required />
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="field_name"> 
                        <font>SHOP</font>
                    </td>
                    <td class="field"> 
                        <div class="parent">
                            <select id="shop" required  <?php 
    if ($id != 0) {
        echo 'disabled = "disabled"';
    }
    ?>
 >
                                <option value=""></option>
                                <?php 
    $company = new company();
    $companies = $company->getCompanies();
    if (is_array($companies) and count($companies) != 0) {
        foreach ($companies as $company) {
            echo '<option';
            if ($user->company_id === $company->id) {
                echo ' selected ';
            }
            echo ' value="' . $company->id . '"';
            echo ' >';
            echo $company->company_name . ' - ' . $company->company_code;
            echo '</option>';
        }
    }
    //print_r($companies);
    ?>
                            </select>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="field_name"> 
                        <font>TYPE</font>
                    </td>
                    <td class="field"> 
                        <div class="parent">
                            <select id="type" required ="" <?php 
    if ($id != 0) {
        echo 'disabled = "disabled"';
    }
    ?>
 >
                                <option value=""></option>
                                <?php 
    $user_type = new user_type();
    $user_types = $user_type->getUserTypes();
    if (is_array($user_types) and count($user_types) != 0) {
        foreach ($user_types as $user_type) {
            echo '<option';
            if ($user->user_type_id === $user_type->id) {
                echo ' selected ';
//.........这里部分代码省略.........
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:101,代码来源:29.php

示例3: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $dataView = array();
     $dataView['page_title'] = "Editar un Evento";
     $dataView['event'] = Event::find($id);
     $dataView['venues'] = venue::getVenues();
     $dataView['companies'] = company::getCompanies();
     $dataView['categories'] = category::all();
     // make a array of categories related to this event.
     $categories_inEvent = array();
     foreach (Category_to_Event::getAllRelByEventID($id) as $rel) {
         $categories_inEvent[] = $rel->category_id;
     }
     $dataView['categories_inEvent'] = $categories_inEvent;
     return view('event.edit', $dataView);
 }
开发者ID:lautaruni,项目名称:billboard,代码行数:22,代码来源:DispatchController.php

示例4: get_form_html

function get_form_html($form_id, $date)
{
    ob_start();
    ?>
    <div id="head_div" style="padding: 5px 0; background-color: #ECECEC;  color: #21ACD7;
         border-radius: 5px;margin-left: auto; text-align: center; ">
        DAY END REPORT OF 
        <input id="date_field" value="<?php 
    if ($date == 0) {
        $date = date('d/m/Y', time());
    }
    echo $date;
    ?>
" />
    </div>
    <div id="sales_items_table" style="margin-top: 10px; background-color:transparent;padding-bottom: 30px;">
        <style>
            div#purchace_items td{
                border: 1px solid #21ACD7;
            }
            div#purchace_items tbody td{
                padding: 5px 0 5px 5px;
            }
            div#purchace_items tbody td input,div#purchace_items tbody td select{
                padding: 0;
                border: 0;
                margin: 0;
                height: 100%;
                width: 100%;
                background-color: transparent;
            }
        </style>
        <div id="purchace_items" style="width: 100%; padding: 10px 0; color: #21ACD7;">           
            <table id="sales_items_table" style="border-collapse: collapse; width: 100%; 
                   background-color: #fff; border-radius: 10px;  color: #21ACD7;">
                <thead style="text-align: center;">
                    <tr>
                        <td style="width: 5%;">
                            #
                        </td>
                        <td>
                            SHOP
                        </td>
                        <td style="width: 25%;">
                            INCOME (SALES)
                        </td>
                        <td style="width: 25%;">
                            EXPENSE (PURCHASE) 
                        </td>
                    </tr>
                </thead>
                <tbody style="padding-left: 3px; text-align: center; ">
                    <?php 
    $total_income = 0;
    $total_expense = 0;
    //                    $sale_item = new sales_items();
    //                    $user = new user();
    //                    $user->id = $_SESSION['user_id'];
    //                    $user->getUser();
    $date = str_replace('/', '-', $date);
    $date = date('Y-m-d', strtotime($date));
    $shop = new company();
    $shops = $shop->getCompanies();
    $i = 0;
    if (is_array($shops) and count($shops)) {
        foreach ($shops as $shop) {
            $sale = new sales();
            $sale_income_for_this_shop = $sale->getOneDaySaleIncome($shop->id, $date);
            $total_income += $sale_income_for_this_shop['amount'];
            $purchace = new purchaces();
            $purchace_expence_for_this_shop = $purchace->getOneDayPurchaseExpence($shop->id, $date);
            $total_expense += $purchace_expence_for_this_shop['amount'];
            ?>
                            <tr>
                                <td style="text-align: center;">
                                    <?php 
            echo ++$i;
            ?>
                                </td>
                                <td style="text-align: left;">
                                    <?php 
            echo $shop->company_name . ' - ' . $shop->company_code;
            ?>
                                </td>
                                <td>
                                    <?php 
            echo number_format($sale_income_for_this_shop['amount'], 2, '.', '');
            ?>
                                </td>

                                <td id="tax">
                                    <?php 
            echo number_format($purchace_expence_for_this_shop['amount'], 2, '.', '');
            ?>
                                </td>
                            </tr>
                            <?php 
        }
    } else {
        echo '<tr><td colspan="8"> No Shop Found </td></tr>';
//.........这里部分代码省略.........
开发者ID:sakkeerhussain,项目名称:online_ims,代码行数:101,代码来源:40.php


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