• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP FormLib类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: preprocess

 function preprocess()
 {
     if (FormLib::get_form_value('start', False) !== False) {
         $pdf = new FPDF('P', 'in', 'Letter');
         $pdf->SetMargins(0.5, 0.5, 0.5);
         $pdf->SetAutoPageBreak(False, 0.5);
         $pdf->AddPage();
         $start = FormLib::get_form_value('start');
         $x = 0.5;
         $y = 0.5;
         $pdf->AddFont('Gill', '', 'GillSansMTPro-Medium.php');
         $pdf->SetFont('Gill', '', 16);
         for ($i = 0; $i < 40; $i++) {
             $current = $start + $i;
             $pdf->SetXY($x, $y);
             $pdf->Cell(1.75, 0.5, $current, 0, 0, 'C');
             $pdf->Cell(1.75, 0.5, $current, 0, 0, 'C');
             if ($i % 2 == 0) {
                 $x += 1.75 * 2 + 0.5;
             } else {
                 $x = 0.5;
                 $y += 0.5;
             }
         }
         $pdf->Close();
         $pdf->Output("mem stickers {$start}.pdf", "I");
         return False;
     }
     return True;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:30,代码来源:MemberStickerPage.php


示例2: preprocess

 public function preprocess()
 {
     $acct = FormLib::get('id');
     $this->header = 'Loan Schedule' . ' : ' . $acct;
     $this->title = 'Loan Schedule' . ' : ' . $acct;
     return parent::preprocess();
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:7,代码来源:GumSchedulePage.php


示例3: ajaxCallback

 private function ajaxCallback()
 {
     $dbc = $this->connection;
     $dbc->selectDB($this->config->get('OP_DB'));
     $m = FormLib::get('month', 1);
     $y = FormLib::get('year', date('Y'));
     if (!is_numeric($y)) {
         return "Error: Invalid year";
     } elseif (!is_numeric($m)) {
         return "Error: Invalid month";
     }
     $ret = "<form action=\"SalePerformanceReport.php\" method=\"get\">\n                <p>\n                <button type=submit class=\"btn btn-default\">Get Report</button>\n                </p>";
     $ret .= sprintf("<input type=hidden name=month value=%d />\n                <input type=hidden name=year value=%d />", $m, $y);
     $ret .= "<table class=\"table\">";
     $ret .= "<tr><th>&nbsp;</th><th>Batch</th><th>Start</th><th>End</th></tr>";
     $q = $dbc->prepare_statement("SELECT batchID,batchName,startDate,endDate FROM\n                                batches WHERE discounttype <> 0 AND (\n                                (year(startDate)=? and month(startDate)=?) OR\n                                (year(endDate)=? and month(endDate)=?)\n                                ) ORDER BY startDate,batchType,batchName");
     $r = $dbc->exec_statement($q, array($y, $m, $y, $m));
     while ($w = $dbc->fetch_row($r)) {
         list($start, $time) = explode(' ', $w[2], 2);
         list($end, $time) = explode(' ', $w[3], 2);
         $ret .= sprintf("<tr>\n                    <td><input type=checkbox name=ids[] value=%d id=\"batch-checkbox-%d\" /></td>\n                    <td><label for=\"batch-checkbox-%d\">%s</label></td>\n                    <td>%s</td><td>%s</td>\n                    <input type=hidden name=bnames[] value=\"%s\" /></tr>", $w['batchID'], $w['batchID'], $w['batchID'], $w['batchName'], $start, $end, $w['batchName'] . " (" . $start . " " . $end . ")");
     }
     $ret .= "</table>\n                <p>\n                <button type=submit class=\"btn btn-default\">Get Report</button>\n                </p>\n            </form>";
     return $ret;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:25,代码来源:SalePerformanceReport.php


示例4: preprocess

 function preprocess()
 {
     global $FANNIE_OP_DB;
     if (FormLib::get_form_value('deptStart', False) !== false) {
         $start = FormLib::get_form_value('deptStart');
         $end = FormLib::get_form_value('deptEnd');
         $pageID = FormLib::get_form_value('sID', 0);
         $dbc = FannieDB::get($FANNIE_OP_DB);
         $prodP = $dbc->prepare_statement("\n                SELECT p.upc\n                FROM products AS p\n                WHERE p.department BETWEEN ? AND ?\n            ");
         $prodR = $dbc->exec_statement($prodP, array($start, $end));
         $tag = new ShelftagsModel($dbc);
         $product = new ProductsModel($dbc);
         while ($row = $dbc->fetch_row($prodR)) {
             $product->upc($row['upc']);
             $info = $product->getTagData();
             $tag->id($pageID);
             $tag->upc($row['upc']);
             $tag->setData($info);
             $tag->save();
         }
         $this->msgs = sprintf('<em>Created tags for departments #%d through #%d</em>
                 <br /><a href="ShelfTagIndex.php">Home</a>', $start, $end);
     }
     return true;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:25,代码来源:CreateTagsByDept.php


示例5: preprocess

 function preprocess()
 {
     global $FANNIE_OP_DB;
     $this->title = _("Fannie") . ' : ' . _("Manufacturer Shelf Tags");
     $this->header = _("Manufacturer Shelf Tags");
     if (FormLib::get_form_value('manufacturer', False) !== false) {
         $manu = FormLib::get_form_value('manufacturer');
         $pageID = FormLib::get_form_value('sID', 0);
         $cond = "";
         if (is_numeric($_REQUEST['manufacturer'])) {
             $cond = " p.upc LIKE ? ";
         } else {
             $cond = " p.brand LIKE ? ";
         }
         $dbc = FannieDB::get($FANNIE_OP_DB);
         $prodP = $dbc->prepare_statement("\n                SELECT\n                    p.upc\n                FROM\n                    products AS p\n                WHERE {$cond}\n            ");
         $prodR = $dbc->exec_statement($prodP, array('%' . $manu . '%'));
         $tag = new ShelftagsModel($dbc);
         $product = new ProductsModel($dbc);
         while ($prodW = $dbc->fetch_row($prodR)) {
             $product->upc($prodW['upc']);
             $info = $product->getTagData();
             $tag->id($pageID);
             $tag->upc($prodW['upc']);
             $tag->setData($info);
             $tag->save();
         }
         $this->msgs = '<em>Created tags for manufacturer</em>
                 <br /><a href="ShelfTagIndex.php">Home</a>';
     }
     return true;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:32,代码来源:CreateTagsByManu.php


示例6: saveFormData

 function saveFormData($memNum)
 {
     /* entry blank. do not save */
     $note = FormLib::get_form_value('Notes_text');
     if ($note == "") {
         return "";
     }
     /* entry has note changed. this means it's already
        in memberNotes as the most recent entry */
     $current = FormLib::get_form_value('Notes_current');
     if ($note == base64_decode($current)) {
         return "";
     }
     $dbc = $this->db();
     $insertNote = $dbc->prepare_statement("INSERT into memberNotes\n                (cardno, note, stamp, username)\n                VALUES (?, ?, " . $dbc->now() . ", 'Admin')");
     // convert newlines back to br tags
     // so displayed notes have user's
     // paragraph formatting
     $note = str_replace("\n", '<br />', $note);
     $test1 = $dbc->exec_statement($insertNote, array($memNum, $note));
     if ($test1 === False) {
         return "Error: problem saving Notes<br />";
     } else {
         return "";
     }
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:26,代码来源:Notes.php


示例7: preprocess

 function preprocess()
 {
     global $FANNIE_OP_DB, $FANNIE_PLUGIN_SETTINGS;
     $ts_db = FannieDB::get($FANNIE_PLUGIN_SETTINGS['TimesheetDatabase']);
     $this->emp_no = FormLib::get_form_value('emp_no', 0);
     $this->periodID = FormLib::get_form_value('periodID', 0);
     if (!headers_sent() && ($this->emp_no == 0 || $this->periodID == 0 || $this->emp_no < 0)) {
         header('Location: TsAdminMain.php');
         return False;
     }
     if ($_GET['function'] == 'edit' && isset($_GET['submitted']) && isset($_GET['emp_no']) && isset($_GET['periodID']) && isset($_GET['id'])) {
         $oneP = $ts_db->prepare_statement("UPDATE timesheet\n                SET time_in=?, time_out=?, area=?\n                WHERE ID=?");
         $twoP = $ts_db->prepare_statement("UPDATE timesheet\n                SET time_in=?\n                WHERE ID=?");
         foreach ($_GET['id'] as $key => $id) {
             $area = (int) $_GET['area'][$id];
             $date = $_GET['date'][$id];
             $timein = $this->parseTime($_GET['time_in'][$id], $_GET['inmeridian'][$id]);
             $timeout = $this->parseTime($_GET['time_out'][$id], $_GET['outmeridian'][$id]);
             $result = False;
             if ($area != 0) {
                 $args = array($date . ' ' . $timein, $date . ' ' . $timeout, $area, $id);
                 $result = $ts_db->exec_statement($oneP, $args);
             } else {
                 $args = array('2008-01-01 ' . $timein, $id);
                 $result = $ts_db->exec_statement($twoP, $args);
             }
             if (!$result) {
                 $this->errors[] = "<p>Query: {$query}</p>";
                 $this->errors[] = "<p>MySQL Error: " . $ts_db->error() . "</p>";
             }
         }
     }
     return True;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:34,代码来源:TsAdminView.php


示例8: fetch_report_data

 public function fetch_report_data()
 {
     global $FANNIE_PLUGIN_SETTINGS, $FANNIE_OP_DB;
     $dbc = FannieDB::get($FANNIE_PLUGIN_SETTINGS['GiveUsMoneyDB']);
     $month = FormLib::get('month', date('n'));
     $year = FormLib::get('year', date('Y'));
     $end_of_last_month = mktime(0, 0, 0, $month, 0, $year);
     $ts = mktime(0, 0, 0, $month, 1, $year);
     $end_of_next_month = mktime(0, 0, 0, $month, date('t', $ts), $year);
     $end_last_dt = new DateTime(date('Y-m-d', $end_of_last_month));
     $end_next_dt = new DateTime(date('Y-m-d', $end_of_next_month));
     $loans = new GumLoanAccountsModel($dbc);
     $data = array();
     foreach ($loans->find('loanDate') as $loan) {
         $record = array($loan->accountNumber(), number_format($loan->principal(), 2), number_format($loan->interestRate() * 100, 2) . '%', $loan->termInMonths(), date('Y-m-d', strtotime($loan->loanDate())));
         $loanDT = new DateTime(date('Y-m-d', strtotime($loan->loanDate())));
         $days1 = $loanDT->diff($end_last_dt)->format('%r%a');
         $days2 = $loanDT->diff($end_next_dt)->format('%r%a');
         $bal_before = $loan->principal() * pow(1.0 + $loan->interestRate(), $days1 / 365.25);
         if ($days1 < 0) {
             $bal_before = $loan->principal();
         }
         $bal_after = $loan->principal() * pow(1.0 + $loan->interestRate(), $days2 / 365.25);
         if ($days2 < 0) {
             $bal_after = $loan->principal();
         }
         $record[] = number_format($bal_before, 2);
         $record[] = number_format($bal_after, 2);
         $record[] = number_format($bal_after - $bal_before, 2);
         $data[] = $record;
     }
     return $data;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:33,代码来源:GumInterestReport.php


示例9: fetch_report_data

 public function fetch_report_data()
 {
     $dbc = $this->connection;
     $dbc->selectDB($this->config->get('OP_DB'));
     $upc = $this->form->upc;
     $upc = BarcodeLib::padUPC($upc);
     $query = 'SELECT i.sku, i.quantity, i.unitCost, i.caseSize,
                     i.quantity * i.unitCost * i.caseSize AS ttl,
                     o.vendorInvoiceID, v.vendorName, o.placedDate
                     FROM PurchaseOrderItems AS i
                         LEFT JOIN PurchaseOrder AS o ON i.orderID=o.orderID
                         LEFT JOIN vendors AS v ON o.vendorID=v.vendorID
                     WHERE i.internalUPC = ?
                         AND o.placedDate >= ?
                     ORDER BY o.placedDate';
     $prep = $dbc->prepare($query);
     $args = array($upc);
     if (FormLib::get('all')) {
         $args[] = '1900-01-01 00:00:00';
     } else {
         $args[] = date('Y-m-d', strtotime('92 days ago'));
     }
     $result = $dbc->execute($prep, $args);
     $data = array();
     while ($row = $dbc->fetch_row($result)) {
         $record = array($row['placedDate'], $row['vendorName'], $row['vendorInvoiceID'], $row['sku'], $row['quantity'], $row['caseSize'], $row['unitCost'], $row['ttl']);
         $data[] = $record;
     }
     return $data;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:30,代码来源:ItemOrderHistoryReport.php


示例10: form_content

    public function form_content()
    {
        ob_start();
        ?>
<form method ="get" action="CashierRecordsReport.php">
<div class="col-sm-4">
    <div class="form-group">
    <label>Date Start</label>
    <input type=text id=date1 name=date1 class="form-control date-field" />
    </div>
    <div class="form-group">
    <label>Date End</label>
    <input type=text id=date2 name=date2 class="form-control date-field" />
    </div>
    <p>
    <button type=submit name=submit class="btn btn-default btn-core">Submit</button>
    <button type=reset name=reset class="btn btn-default btn-reset">Start Over</button>
    </p>
</div>
<div class="col-sm-4">
    <?php 
        echo FormLib::date_range_picker();
        ?>
</div>
</form>
<?php 
        return ob_get_clean();
    }
开发者ID:phpsmith,项目名称:IS4C,代码行数:28,代码来源:CashierRecordsReport.php


示例11: saveFormData

 function saveFormData($memNum)
 {
     $dbc = $this->db();
     /**
       Use primary member for default column values
     */
     $account = self::getAccount();
     if (!$account) {
         return "Error: Problem saving household members<br />";
     }
     $json = array('cardNo' => $memNum, 'customerTypeID' => $account['customerTypeID'], 'memberStatus' => $account['memberStatus'], 'activeStatus' => $account['activeStatus'], 'customers' => array());
     $primary = array('discount' => 0, 'staff' => 0, 'lowIncomeBenefits' => 0, 'chargeAllowed' => 0, 'checksAllowed' => 0);
     foreach ($account['customers'] as $c) {
         if ($c['accountHolder']) {
             $primary = $c;
             break;
         }
     }
     $fns = FormLib::get_form_value('HouseholdMembers_fn', array());
     $lns = FormLib::get_form_value('HouseholdMembers_ln', array());
     $ids = FormLib::get('HouseholdMembers_ID', array());
     for ($i = 0; $i < count($lns); $i++) {
         $json['customers'][] = array('customerID' => $ids[$i], 'firstName' => $fns[$i], 'lastName' => $lns[$i], 'accountHolder' => 0, 'discount' => $primary['discount'], 'staff' => $primary['staff'], 'lowIncomeBenefits' => $primary['lowIncomeBenefits'], 'chargeAllowed' => $primary['chargeAllowed'], 'checksAllowed' => $primary['checksAllowed']);
     }
     $resp = \COREPOS\Fannie\API\member\MemberREST::post($memNum, $json);
     if ($resp['errors'] > 0) {
         return "Error: Problem saving household members<br />";
     }
     return '';
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:30,代码来源:HouseholdMembers.php


示例12: post_upc_description_department_cost_price_qty_reason_handler

 public function post_upc_description_department_cost_price_qty_reason_handler()
 {
     global $FANNIE_TRANS_DB, $FANNIE_EMP_NO, $FANNIE_REGISTER_NO;
     $dbc = FannieDB::get($FANNIE_TRANS_DB);
     $record = DTrans::$DEFAULTS;
     $record['emp_no'] = $FANNIE_EMP_NO;
     $record['register_no'] = $FANNIE_REGISTER_NO;
     $record['trans_no'] = DTrans::getTransNo($dbc, $FANNIE_EMP_NO, $FANNIE_REGISTER_NO);
     $record['trans_id'] = 1;
     $record['upc'] = $this->upc;
     $record['description'] = $this->description;
     $record['department'] = $this->department;
     $record['trans_type'] = 'I';
     $record['quantity'] = $this->qty;
     $record['ItemQtty'] = $this->qty;
     $record['unitPrice'] = $this->price;
     $record['regPrice'] = $this->price;
     $record['total'] = $this->qty * $this->price;
     $record['cost'] = $this->qty * $this->cost;
     $record['numflag'] = $this->reason;
     $record['charflag'] = strlen(FormLib::get('type')) > 0 ? strtoupper(substr(FormLib::get('type'), 0, 1)) : '';
     $record['trans_status'] = 'Z';
     $info = DTrans::parameterize($record, 'datetime', $dbc->now());
     $query = 'INSERT INTO dtransactions
         (' . $info['columnString'] . ')
         VALUES
         (' . $info['valueString'] . ')';
     $prep = $dbc->prepare($query);
     $result = $dbc->execute($prep, $info['arguments']);
     header('Location: ' . $_SERVER['PHP_SELF'] . '?msg=1');
     return false;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:32,代码来源:ShrinkTool.php


示例13: form_content

 public function form_content()
 {
     ob_start();
     ?>
     <form method=get class="form-horizontal">
     <div class="row">
         <div class="col-sm-6">
             <p>
                 <label>Start Date</label>
                 <input class="form-control date-field" required type=text id=date1 name=date1 />
             </p>
             <p>
                 <label>End Date</label>
                 <input class="form-control date-field" required type=text id=date2 name=date2 />
             </p>
         </div>
         <div class="col-sm-6">
             <p>
             <?php 
     echo FormLib::date_range_picker();
     ?>
             </p>
         </div>
     </div>
     <p>
         <button type=submit name=submit value="Submit" class="btn btn-default">Submit</button>
         <label><input type=checkbox name=excel /> Excel</label>
     </p>
     </form>
     <?php 
     return ob_get_clean();
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:32,代码来源:SiteUsageReport.php


示例14: post_download_handler

 public function post_download_handler()
 {
     header('Content-Type: application/ms-excel');
     header('Content-Disposition: attachment; filename="PDFasCSV.csv"');
     echo FormLib::get('download');
     return false;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:7,代码来源:PDFtoCSVPage.php


示例15: post_handler

 public function post_handler()
 {
     global $FANNIE_OP_DB;
     $dbc = FannieDB::get($FANNIE_OP_DB);
     $amount = FormLib::get('amount');
     $paid = FormLib::get('paid') / 100.0;
     $retained = FormLib::get('retained') / 100.0;
     $netQ = '
         SELECT SUM(p.net_purch) AS ttl
         FROM patronage_workingcopy AS p
             INNER JOIN custdata AS c ON p.cardno=c.CardNo AND c.personNum=1
         WHERE c.Type=\'PC\'';
     $netR = $dbc->query($netQ);
     $netW = $dbc->fetch_row($netR);
     $purchases = $netW['ttl'];
     $personQ = '
         SELECT p.net_purch,
             c.cardno
         FROM patronage_workingcopy AS p
             INNER JOIN custdata AS c ON p.cardno=c.CardNo AND c.personNum=1
         WHERE c.Type=\'PC\'';
     $personR = $dbc->query($personQ);
     $this->insertRecords($dbc, $personR, $purchases, $paid, $retained, $amount);
     $finishQ = '
         INSERT INTO patronage
         (cardno, purchase, discounts, rewards, net_purch, tot_pat, cash_pat, equit_pat, FY)
         SELECT 
             p.cardno, purchase, discounts, rewards, net_purch, tot_pat, cash_pat, equit_pat, FY
         FROM patronage_workingcopy AS p
             INNER JOIN custdata AS c ON p.cardno=c.CardNo AND c.personNum=1
         WHERE c.Type=\'PC\'';
     $dbc->query($finishQ);
     return true;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:34,代码来源:AllocatePatronagePage.php


示例16: fetch_report_data

 public function fetch_report_data()
 {
     $dbc = $this->connection;
     $dbc->selectDB($this->config->get('OP_DB'));
     $FANNIE_URL = $this->config->get('URL');
     $super = $this->form->submit == "by_sd" ? 1 : 0;
     $join = "";
     $where = "";
     $args = array();
     if ($super == 1) {
         $superID = FormLib::get('superdept');
         $join = "LEFT JOIN superdepts AS s ON d.dept_no=s.dept_ID\n                LEFT JOIN superDeptNames AS m ON s.superID=m.superID ";
         $where = "s.superID = ?";
         $args[] = $superID;
     } else {
         $d1 = FormLib::get('dept1');
         $d2 = FormLib::get('dept2');
         $join = " LEFT JOIN MasterSuperDepts AS m ON d.dept_no=m.dept_ID";
         $where = "d.dept_no BETWEEN ? AND ?";
         $args = array($d1, $d2);
     }
     $query = $dbc->prepare_statement("SELECT d.dept_no,d.dept_name,d.salesCode,d.margin,\n            CASE WHEN d.dept_tax=0 THEN 'NoTax' ELSE t.description END as tax,\n            CASE WHEN d.dept_fs=1 THEN 'Yes' ELSE 'No' END as fs,\n            m.super_name\n            FROM departments AS d \n                LEFT JOIN taxrates AS t ON d.dept_tax = t.id \n            {$join}\n            WHERE {$where}\n            ORDER BY d.dept_no");
     $result = $dbc->exec_statement($query, $args);
     $data = array();
     while ($row = $dbc->fetch_row($result)) {
         $record = array($row[0], isset($_REQUEST['excel']) ? $row[1] : "<a href=\"{$FANNIE_URL}item/departments/DepartmentEditor.php?did={$row['0']}\">{$row['1']}</a>", $row['super_name'], $row[2], sprintf('%.2f%%', $row[3] * 100), $row[4], $row[5]);
         if (empty($row['super_name'])) {
             $record['meta'] = FannieReportPage::META_COLOR;
             $record['meta_background'] = '#ff9999';
         }
         $data[] = $record;
     }
     return $data;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:34,代码来源:DeptSettingsReport.php


示例17: post_id_superID_growth_handler

 public function post_id_superID_growth_handler()
 {
     $lib_class = $this->lib_class;
     $dbc = $lib_class::getDB();
     $map = $lib_class::getCategoryMap($dbc);
     for ($i = 0; $i < count($this->id); $i++) {
         if (!isset($this->superID[$i])) {
             continue;
         }
         $map->obfCategoryID($this->id[$i]);
         $map->superID($this->superID[$i]);
         $map->growthTarget(isset($this->growth[$i]) ? $this->growth[$i] / 100.0 : 0);
         $map->save();
     }
     $delete = FormLib::get('delete', array());
     if (is_array($delete)) {
         foreach ($delete as $ids) {
             list($cat, $super) = explode(':', $ids, 2);
             $map->obfCategoryID($cat);
             $map->superID($super);
             $map->delete();
         }
     }
     header('Location: ' . filter_input(INPUT_SERVER, 'PHP_SELF'));
     return false;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:26,代码来源:ObfMappingPage.php


示例18: fetch_report_data

 public function fetch_report_data()
 {
     global $FANNIE_PLUGIN_SETTINGS, $FANNIE_OP_DB;
     $dbc = FannieDB::get($FANNIE_PLUGIN_SETTINGS['GiveUsMoneyDB']);
     $dt = FormLib::get('endDate', date('Y-m-d'));
     $dividends = new GumDividendsModel($dbc);
     $dividends->yearEndDate($dt);
     $map = new GumDividendPayoffMapModel($dbc);
     $check = new GumPayoffsModel($dbc);
     $data = array();
     foreach ($dividends->find('card_no') as $dividend) {
         $record = array($dividend->card_no(), sprintf('%.2f', $dividend->equityAmount()), $dividend->daysHeld(), sprintf('%.2f%%', $dividend->dividendRate() * 100), sprintf('%.2f', $dividend->dividendAmount()));
         $checkID = false;
         $map->reset();
         $map->gumDividendID($dividend->gumDividendID());
         foreach ($map->find('gumPayoffID', true) as $obj) {
             $checkID = $obj->gumPayoffID();
         }
         if (!$checkID) {
             $record[] = '?';
         } else {
             $check->gumPayoffID($checkID);
             $check->load();
             $record[] = $check->checkNumber();
         }
         $data[] = $record;
     }
     return $data;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:29,代码来源:GumIssuedDividendReport.php


示例19: post_id_handler

 function post_id_handler()
 {
     global $FANNIE_OP_DB;
     $dbc = FannieDB::get($FANNIE_OP_DB);
     $upc = BarcodeLib::padUPC($this->id);
     $model = new ProductsModel($dbc);
     $model->upc($upc);
     $model->store_id(1);
     $model->discounttype(0);
     $model->special_price(0);
     $model->modified(date('Y-m-d H:i:s'));
     $model->save();
     $batchID = FormLib::get_form_value('batchID');
     $batchUPC = FormLib::get_form_value('batchUPC');
     if ($batchID !== '' && $batchUPC !== '') {
         if (substr($batchUPC, 0, 2) != 'LC') {
             $batchUPC = BarcodeLib::padUPC($batchUPC);
         }
         $batchP = $dbc->prepare_statement('DELETE FROM batchList
                 WHERE upc=? AND batchID=?');
         $batchR = $dbc->exec_statement($batchP, array($batchUPC, $batchID));
     }
     require 'laneUpdates.php';
     updateProductAllLanes($upc);
     header('Location: ItemEditorPage.php?searchupc=' . $upc);
     return False;
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:27,代码来源:EndItemSale.php


示例20: draw_page

 public function draw_page()
 {
     include dirname(__FILE__) . '/../../config.php';
     $dbc = FannieDB::get($FANNIE_TRANS_DB);
     $id = FormLib::get('id', 0);
     $prep = $dbc->prepare('SELECT filetype, filecontents FROM CapturedSignature WHERE capturedSignatureID=?');
     $result = $dbc->execute($prep, array($id));
     if ($dbc->num_rows($result) > 0) {
         $row = $dbc->fetch_row($result);
         switch (strtoupper($row['filetype'])) {
             case 'BMP':
                 header('Content-type: image/bmp');
                 break;
             case 'PNG':
                 header('Content-type: image/png');
                 break;
             case 'JPG':
                 header('Content-type: image/jpeg');
                 break;
             case 'GIF':
                 header('Content-type: image/gif');
                 break;
             default:
                 // Content-type: application/octet-stream
                 // may be helpful in this scenario but appears
                 // to be technically incorrect. in any event
                 // it really should not occur
                 break;
         }
         echo $row['filecontents'];
     }
 }
开发者ID:phpsmith,项目名称:IS4C,代码行数:32,代码来源:SigImage.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP FormMail类代码示例发布时间:2022-05-23
下一篇:
PHP FormItem类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap