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


PHP table::init方法代码示例

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


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

示例1: getSubTickets

 private function getSubTickets(&$ticket)
 {
     $subs = $this->query("SELECT * from subtickets WHERE ticket_id='{$ticket['id']}'");
     $addButton .= button::init()->isModalLauncher()->text('Add Task')->url('#addTask')->addStyle('btn-inverse')->addStyle('btn-block')->withGroup(false)->icon('plus')->render();
     $data = "<div class='row-fluid'>\n\t\t\t\t<div class='span6'>";
     $headers = ['Task', 'Assigned', 'Author', 'Last Updated'];
     foreach ($subs as $sub) {
         $color = $sub['subticket_isclosed'] ? "red" : "green";
         $ss = $sub['subticket_isclosed'] ? "<s>" : null;
         $se = $sub['subticket_isclosed'] ? "</s>" : null;
         $rows[] = ["<a class='get' href='/ticket/{$ticket['id']}/{$sub['id']}/'>{$ss}{$sub['subticket_title']}{$se}</a>", $sub['subticket_assigned'] ? "<a class='get' href='/assign/sub/{$sub['id']}/'>" . $this->getUserById($sub['subticket_assigned']) . "</a>" : "<a class='get' href='/assign/sub/{$sub['id']}/'>Unassigned</a>", $this->getUserById($sub['subticket_creator']), $this->fbTime($sub['subticket_lastupdated']), $color];
     }
     if (!$subs) {
         $data .= "<h4>No tasks found</h4>";
     } else {
         $data .= table::init()->id('tasks')->headers($headers)->rows($rows)->render();
     }
     $data .= "{$addButton}</div>";
     // Start Viewer on the next 6 span.
     $data .= "<div class='span6'>";
     $data .= widget::init()->header("<span class='viewportTitle'>Task Viewport</span>")->content("<div id='viewport'></div>")->icon('tasks')->render();
     $data .= "</div>";
     // end span6
     $data .= "</div>";
     // end rowfluid
     $save = button::init()->addStyle('mpost')->addStyle('btn-primary')->icon('ok')->text('Create Task')->formid('addTaskForm')->postVar('addTask')->id($ticket['id'])->render();
     $this->exportModal(modal::init()->header('Add Task')->content($this->addTaskForm())->id('addTask')->footer($save)->render());
     return $data;
 }
开发者ID:carriercomm,项目名称:atikit,代码行数:29,代码来源:ticket.php

示例2: customerMain

 private function customerMain()
 {
     // Show tabs for all queues the agent has access to based on access level.
     $headers = ['#', 'Subject', 'Status', 'Last Updated', 'Assigned', 'Queue'];
     $tickets = $this->query("SELECT * from tickets WHERE company_id='{$this->company->id}' and ticket_isclosed = false");
     $rows = [];
     foreach ($tickets as $ticket) {
         $rows[] = [$ticket['id'], "<a href='/ticket/{$ticket['id']}/'>{$ticket['ticket_title']}</a>", $ticket['ticket_status'], $this->fbTime($ticket['ticket_lastupdated']), $ticket['ticket_assigned'] ? $this->getUserByID($ticket['ticket_assigned']) : "Awaiting Assignment", $this->returnFieldFromTable("queue_name", "queues", "id='{$ticket['queue_id']}'")];
     }
     $table = table::init()->headers($headers)->rows($rows)->render();
     $createTicket = button::init()->isModalLauncher()->url('#newTicket')->text('Create New Ticket')->addStyle('btn-inverse')->icon('tasks')->render();
     $widget = widget::init()->span(12)->header('Ticket List')->content($table)->isTable(true)->rightHeader($createTicket)->render();
     $data = base::row($widget);
     $save = button::init()->formid('newTicketForm')->addStyle('mpost')->postVar('createTicket')->text('Create Ticket')->addStyle('btn-success')->icon('ok')->render();
     $this->exportModal(modal::init()->id('newTicket')->header('Create New Ticket')->content($this->createTicketForm())->footer($save)->render());
     return $data;
 }
开发者ID:carriercomm,项目名称:atikit,代码行数:17,代码来源:index.php

示例3: showInvoices

 public function showInvoices()
 {
     $nav = $this->billingNav('invoices');
     // Default to Credit.
     $data = base::span(4, $nav);
     //Just a simple table with a download button for downloading the invoices.
     $headers = ['Ticket', 'Date', 'Description', 'Type', 'Download'];
     $rows = [];
     $transactions = $this->query("SELECT * from transactions WHERE company_id='{$this->company->id}'");
     foreach ($transactions as $transaction) {
         switch ($transaction['transaction_source']) {
             case 'stripe':
                 $source = "Credit Card";
                 break;
             case 'dwolla':
                 $source = "Checking Draft";
                 break;
             case 'check':
                 $source = "Posted Check";
                 break;
             case 'cash':
                 $source = "Cash";
                 break;
         }
         $row = ["<a href='/ticket/{$transaction['ticket_id']}/'>{$transaction['ticket_id']}</a>", date("m/d/y", $transaction['transaction_ts']), $transaction['transaction_desc'], $source, button::init()->url("/billing/invoice/{$transaction['id']}/")->text("Download Invoice")->addStyle('btn-small')->addStyle('btn-info')->icon('arrow-down')->render()];
         $rows[] = $row;
     }
     $table = table::init()->rows($rows)->headers($headers)->render();
     $data .= widget::init()->span(8)->isTable()->header("Processed Transactions")->content($table)->render();
     $data = base::row($data);
     $this->export($data);
 }
开发者ID:carriercomm,项目名称:atikit,代码行数:32,代码来源:billing.php

示例4: listClients

 public function listClients()
 {
     // At a glance - Let's view the client's basic info, If you can see billing, then show subscription
     // and show total amount collected.  Put in a datatable so we can search.
     $headers = ["Client", "Address", "VIP", "Tickets"];
     if ($this->canSeeBilling()) {
         $billing = ['Subscription', 'Total Income'];
         $headers = array_merge($headers, $billing);
     }
     $rows = [];
     $companies = $this->query("SELECT * from companies ORDER by company_since DESC");
     foreach ($companies as $company) {
         $tcontent = null;
         $ticks = $this->query("SELECT id,ticket_title FROM tickets WHERE company_id='{$company['id']}' ORDER by ticket_opents DESC LIMIT 10");
         foreach ($ticks as $tick) {
             $tcontent .= "<a href='/ticket/{$tick['id']}/'>{$tick['ticket_title']}</a><br/>";
         }
         $ticketblock = base::popover("Ticket History", $tcontent, 'right');
         $row = ["<a href='/client/{$company['id']}/'>{$company['company_name']}</a>", "{$company['company_address']}, {$company['company_city']}, {$company['company_state']}", $company['company_vip'] ? "Yes" : "No", "<a href='#' {$ticketblock}>" . $this->returnCountFromTable("tickets", "company_id='{$company['id']}'") . "</a>"];
         if ($this->canSeeBilling()) {
             $plan = $this->query("SELECT * from plans WHERE id='{$company['company_plan']}'", true)[0];
             if (!$plan) {
                 $plandata = "No Subscription";
             } else {
                 $plandata = "{$plan['plan_name']} ({$plan['plan_amount']})";
             }
             $ttl = 0;
             $transactions = $this->query("SELECT transaction_amount FROM transactions WHERE company_id='{$company['id']}'");
             foreach ($transactions as $transaction) {
                 $ttl += $transaction['transaction_amount'];
             }
             $ttl = "\$" . number_format($ttl, 2);
             $new = [$plandata, $ttl];
             $row = array_merge($row, $new);
         }
         $rows[] = $row;
     }
     $this->exportJS(js::datatable('clientList'));
     $addButton = button::init()->text("Add Account")->icon('plus')->addStyle('btn-success')->url('/clients/create/')->render();
     $table = table::init()->headers($headers)->rows($rows)->id('clientList')->render();
     $widget = widget::init()->header("Customer List")->content($table)->isTable()->icon('user')->rightHeader($addButton)->render();
     $this->export(base::row($widget));
 }
开发者ID:carriercomm,项目名称:atikit,代码行数:43,代码来源:clients.php

示例5: showTransactionLog

 public function showTransactionLog()
 {
     $data = base::span(4, $this->adminNav('billing'));
     $headers = ['Merchant ID', 'Date', 'Amount', 'Fee', 'Net', 'Merchant', 'Description', 'Ticket', 'Company'];
     $transactions = $this->query("SELECT * from transactions ORDER by transaction_ts DESC");
     $rows = [];
     foreach ($transactions as $transaction) {
         $rows[] = [$transaction['transaction_merchant_id'], date("m/d/y h:ia", $transaction['transaction_ts']), number_format($transaction['transaction_amount'], 2), number_format($transaction['transaction_fee'], 2), number_format($transaction['transaction_net'], 2), $transaction['transaction_source'], $transaction['transaction_desc'], "<a href='/ticket/{$transaction['ticket_id']}/'>{$transaction['ticket_id']}</a>", $this->getCompanyById($transaction['company_id'])];
     }
     $table = table::init()->id('tlog')->headers($headers)->rows($rows)->render();
     $data .= widget::init()->span(6)->header('Transaction Log')->content($table)->icon('credit-card')->istable(true)->render();
     $this->exportjs(js::datatable('tlog', 50));
     $headers = ['Payout Schedule', 'Amount'];
     $rows = [];
     $now = time();
     $transfers = $this->query("SELECT * from transfers WHERE transfer_ts > {$now} ORDER by transfer_ts DESC");
     foreach ($transfers as $transfer) {
         $rows[] = [$this->fbTime($transfer['transfer_ts']), number_format($transfer['transfer_amt'] / 100, 2)];
     }
     $table = table::init()->headers($headers)->rows($rows)->render();
     $data .= widget::init()->span(2)->header('Payout Schedule')->icon('truck')->content($table)->istable(true)->render();
     $this->export(base::row($data, true));
 }
开发者ID:carriercomm,项目名称:atikit,代码行数:23,代码来源:admin.php


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