本文整理汇总了PHP中check_cells函数的典型用法代码示例。如果您正苦于以下问题:PHP check_cells函数的具体用法?PHP check_cells怎么用?PHP check_cells使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了check_cells函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gl_inquiry_controls
function gl_inquiry_controls()
{
$dim = get_company_pref('use_dimension');
start_form();
start_table(TABLESTYLE_NOBORDER);
$date = today();
if (!isset($_POST['TransFromDate'])) {
$_POST['TransFromDate'] = begin_month($date);
}
if (!isset($_POST['TransToDate'])) {
$_POST['TransToDate'] = end_month($date);
}
date_cells(_("From:"), 'TransFromDate');
date_cells(_("To:"), 'TransToDate');
if ($dim >= 1) {
dimensions_list_cells(_("Dimension") . " 1:", 'Dimension', null, true, " ", false, 1);
}
if ($dim > 1) {
dimensions_list_cells(_("Dimension") . " 2:", 'Dimension2', null, true, " ", false, 2);
}
check_cells(_("No zero values"), 'NoZero', null);
check_cells(_("Only balances"), 'Balance', null);
submit_cells('Show', _("Show"), '', '', 'default');
end_table();
end_form();
}
示例2: gl_inquiry_controls
function gl_inquiry_controls()
{
start_form();
start_table("class='tablestyle_noborder'");
date_cells(tr("From:"), 'TransFromDate', null, -30);
date_cells(tr("To:"), 'TransToDate');
check_cells(tr("No zero values"), 'NoZero', null);
submit_cells('Show', tr("Show"));
end_table();
end_form();
}
示例3: tax_inquiry_controls
function tax_inquiry_controls()
{
start_form();
start_table(TABLESTYLE_NOBORDER);
start_row();
date_cells(_("from:"), 'TransFromDate', '', null, -30);
date_cells(_("to:"), 'TransToDate');
check_cells(_("Net Output/Input:"), 'NetAmounts', null);
submit_cells('Show', _("Show"), '', '', 'default');
end_row();
end_table();
end_form();
}
示例4: render
function render($id, $title)
{
global $path_to_root;
include_once $path_to_root . "/includes/ui.inc";
$end_date = date2sql(add_days(Today(), $this->days_future));
$role_id = $_SESSION["wa_current_user"]->access;
$sql = "SELECT id, description, next_date FROM " . TB_PREF . "dashboard_reminders " . " WHERE next_date < '{$end_date}'" . " AND role_id = '{$role_id}'";
if ($this->data_filter != '') {
$sql .= ' AND ' . $this->data_filter;
}
$sql .= " ORDER BY next_date";
$result = db_query($sql);
br();
$th = array(_("Actioned"), _("Date"), _("Description"));
start_table(TABLESTYLE, "id='reminder' width=98%");
table_header($th);
$k = 0;
//row colour counter
while ($myrow = db_fetch($result)) {
$nextdate = sql2date($myrow["next_date"]);
if (date1_greater_date2(Today(), $nextdate)) {
$extra = "class='reminder_overdue'";
} elseif (Today() == $nextdate) {
$extra = "class='reminder_due'";
} else {
$extra = "class='reminder'";
}
alt_table_row_color($k);
$js = 'setTimeout(function(){updateToDoData(' . $myrow["id"] . ');}, 0);';
check_cells(null, null, null, $js);
label_cell($nextdate, $extra);
label_cell("<pre>" . $myrow["description"] . "</pre>", $extra);
end_row();
}
end_table(1);
}
示例5: company_extensions
function company_extensions($id)
{
start_table(TABLESTYLE);
$th = array(_("Extension"), _("Modules provided"), _("Options provided"), _("Active"));
$mods = get_company_extensions();
$exts = get_company_extensions($id);
foreach ($mods as $key => $ins) {
foreach ($exts as $ext) {
if ($ext['name'] == $ins['name']) {
$mods[$key]['active'] = @$ext['active'];
continue 2;
}
}
}
$mods = array_natsort($mods, null, 'name');
table_header($th);
$k = 0;
foreach ($mods as $i => $mod) {
if ($mod['type'] != 'extension') {
continue;
}
alt_table_row_color($k);
label_cell($mod['name']);
$entries = fmt_titles(@$mod['entries']);
$tabs = fmt_titles(@$mod['tabs']);
label_cell($tabs);
label_cell($entries);
check_cells(null, 'Active' . $i, @$mod['active'] ? 1 : 0, false, false, "align='center'");
end_row();
}
end_table(1);
submit_center('Refresh', _('Update'), true, false, 'default');
}
示例6: page
page(_($help_context = "Customer Allocation Inquiry"), false, false, "", $js);
if (isset($_GET['customer_id'])) {
$_POST['customer_id'] = $_GET['customer_id'];
}
//------------------------------------------------------------------------------------------------
if (!isset($_POST['customer_id'])) {
$_POST['customer_id'] = get_global_customer();
}
start_form();
start_table(TABLESTYLE_NOBORDER);
start_row();
customer_list_cells(_("Select a customer: "), 'customer_id', $_POST['customer_id'], true);
date_cells(_("from:"), 'TransAfterDate', '', null, -30);
date_cells(_("to:"), 'TransToDate', '', null, 1);
cust_allocations_list_cells(_("Type:"), 'filterType', null);
check_cells(" " . _("show settled:"), 'showSettled', null);
submit_cells('RefreshInquiry', _("Search"), '', _('Refresh Inquiry'), 'default');
set_global_customer($_POST['customer_id']);
end_row();
end_table();
//------------------------------------------------------------------------------------------------
function check_overdue($row)
{
return $row['OverDue'] == 1 && abs($row["TotalAmount"]) - $row["Allocated"] != 0;
}
function order_link($row)
{
return $row['order_'] > 0 ? get_customer_trans_view_str(ST_SALESORDER, $row['order_']) : "";
}
function systype_name($dummy, $type)
{
示例7: start_form
}
$Ajax->activate('orders_tbl');
}
//--------------------------------------------------------------------------------------
if (isset($_GET["stock_id"])) {
$_POST['SelectedStockItem'] = $_GET["stock_id"];
}
//--------------------------------------------------------------------------------------
start_form(false, false, $_SERVER['PHP_SELF'] . "?outstanding_only={$outstanding_only}");
start_table(TABLESTYLE_NOBORDER);
start_row();
ref_cells(_("Reference:"), 'OrderNumber', '', null, '', true);
locations_list_cells(_("at Location:"), 'StockLocation', null, true);
check_cells(_("Only Overdue:"), 'OverdueOnly', null);
if ($outstanding_only == 0) {
check_cells(_("Only Open:"), 'OpenOnly', null);
}
stock_manufactured_items_list_cells(_("for item:"), 'SelectedStockItem', null, true);
submit_cells('SearchOrders', _("Search"), '', _('Select documents'), 'default');
end_row();
end_table();
//-----------------------------------------------------------------------------
function check_overdue($row)
{
return !$row["closed"] && date_diff2(Today(), sql2date($row["required_by"]), "d") > 0;
}
function view_link($dummy, $order_no)
{
return get_trans_view_str(ST_WORKORDER, $order_no);
}
function view_stock($row)
示例8: submit_center
submit_center('submit', _("Add New Customer"), true, '', 'default');
} else {
submit_center_first('submit', _("Update Customer"), _('Update customer data'), @$_REQUEST['popup'] ? true : 'default');
submit_return('select', $selected_id, _("Select this customer and return to document entry."));
submit_center_last('delete', _("Delete Customer"), _('Delete customer data if have been never used'), true);
}
div_end();
}
//--------------------------------------------------------------------------------------------
check_db_has_sales_types(_("There are no sales types defined. Please define at least one sales type before adding a customer."));
start_form();
if (db_has_customers()) {
start_table(TABLESTYLE_NOBORDER);
start_row();
customer_list_cells(_("Select a customer: "), 'customer_id', null, _('New customer'), true, check_value('show_inactive'));
check_cells(_("Show inactive:"), 'show_inactive', null, true);
end_row();
end_table();
if (get_post('_show_inactive_update')) {
$Ajax->activate('customer_id');
set_focus('customer_id');
}
} else {
hidden('customer_id');
}
if (!$selected_id) {
unset($_POST['_tabs_sel']);
}
// force settings tab for new customer
tabbed_content_start('tabs', array('settings' => array(_('&General settings'), $selected_id), 'contacts' => array(_('&Contacts'), $selected_id), 'transactions' => array(_('&Transactions'), $selected_id), 'orders' => array(_('Sales &Orders'), $selected_id)));
switch (get_post('_tabs_sel')) {
示例9: date_cells
date_cells(_("from:"), 'OrdersAfterDate', '', null, -30);
date_cells(_("to:"), 'OrdersToDate', '', null, 1);
}
locations_list_cells(_("Location:"), 'StockLocation', null, true);
if ($show_dates) {
end_row();
end_table();
start_table(TABLESTYLE_NOBORDER);
start_row();
}
stock_items_list_cells(_("Item:"), 'SelectStockFromList', null, true);
if (!@$_GET['popup']) {
customer_list_cells(_("Select a customer: "), 'customer_id', null, true);
}
if ($trans_type == ST_SALESQUOTE) {
check_cells(_("Show All:"), 'show_all');
}
submit_cells('SearchOrders', _("Search"), '', _('Select documents'), 'default');
hidden('order_view_mode', $_POST['order_view_mode']);
hidden('type', $trans_type);
end_row();
end_table(1);
//---------------------------------------------------------------------------------------------
// Orders inquiry table
//
$sql = get_sql_for_sales_orders_view($selected_customer, $trans_type, $_POST['OrderNumber'], $_POST['order_view_mode'], @$selected_stock_item, @$_POST['OrdersAfterDate'], @$_POST['OrdersToDate'], @$_POST['OrderReference'], $_POST['StockLocation'], $_POST['customer_id']);
if ($trans_type == ST_SALESORDER) {
$cols = array(_("Order #") => array('fun' => 'view_link'), _("Ref"), _("Customer"), _("Branch"), _("Cust Order Ref"), _("Order Date") => 'date', _("Required By") => array('type' => 'date', 'ord' => ''), _("Delivery To"), _("Order Total") => array('type' => 'amount', 'ord' => ''), 'Type' => 'skip', _("Currency") => array('align' => 'center'));
} else {
$cols = array(_("Quote #") => array('fun' => 'view_link'), _("Ref"), _("Customer"), _("Branch"), _("Cust Order Ref"), _("Quote Date") => 'date', _("Valid until") => array('type' => 'date', 'ord' => ''), _("Delivery To"), _("Quote Total") => array('type' => 'amount', 'ord' => ''), 'Type' => 'skip', _("Currency") => array('align' => 'center'));
}
示例10: start_form
//
if (get_post('Search')) {
$Ajax->activate('journal_tbl');
}
//--------------------------------------------------------------------------------------
if (!isset($_POST['filterType'])) {
$_POST['filterType'] = -1;
}
start_form();
start_table(TABLESTYLE_NOBORDER);
start_row();
ref_cells(_("Reference:"), 'Ref', '', null, _('Enter reference fragment or leave empty'));
journal_types_list_cells(_("Type:"), "filterType");
date_cells(_("From:"), 'FromDate', '', null, 0, -1, 0);
date_cells(_("To:"), 'ToDate');
check_cells(_("Show closed:"), 'AlsoClosed', null);
submit_cells('Search', _("Search"), '', '', 'default');
end_row();
start_row();
ref_cells(_("Memo:"), 'Memo', '', null, _('Enter memo fragment or leave empty'));
end_row();
end_table();
function journal_pos($row)
{
return $row['gl_seq'] ? $row['gl_seq'] : '-';
}
function systype_name($dummy, $type)
{
global $systypes_array;
return $systypes_array[$type];
}
示例11: get_item_tax_type_exemptions
$exemptions = get_item_tax_type_exemptions($selected_id);
if (db_num_rows($exemptions) > 0) {
while ($exmp = db_fetch($exemptions)) {
$_POST['ExemptTax' . $exmp["tax_type_id"]] = 1;
}
}
}
hidden('selected_id', $selected_id);
}
text_row_ex(_("Description:"), 'name', 50);
yesno_list_row(_("Is Fully Tax-exempt:"), 'exempt', null, "", "", true);
end_table(1);
if (!isset($_POST['exempt']) || $_POST['exempt'] == 0) {
display_note(_("Select which taxes this item tax type is exempt from."), 0, 1);
start_table(TABLESTYLE2);
$th = array(_("Tax Name"), _("Rate"), _("Is exempt"));
table_header($th);
$tax_types = get_all_tax_types_simple();
while ($myrow = db_fetch($tax_types)) {
alt_table_row_color($k);
label_cell($myrow["name"]);
label_cell(percent_format($myrow["rate"]) . " %", "nowrap align=right");
check_cells("", 'ExemptTax' . $myrow["id"], null);
end_row();
}
end_table(1);
}
submit_add_or_update_center($selected_id == -1, '', 'both');
end_form();
//------------------------------------------------------------------------------------
end_page();
示例12: foreach
foreach ($installers as $i => $inst) {
alt_table_row_color($k);
start_row();
label_cell($inst->version);
label_cell($inst->description);
label_cell($inst->sql ? $inst->sql : '<i>' . _('None') . '</i>', 'align=center');
// this is checked only for first (site admin) company,
// but in fact we should always upgrade all data sets after
// source upgrade.
$check = $inst->installed(TB_PREF);
if ($check === true) {
label_cell(_("Installed"));
} else {
if (!$check) {
check_cells(null, 'install_' . $i, 0);
} else {
label_cell("<span class=redfg>" . sprintf(_("Partially installed (%s)"), $check) . "</span>");
$partial++;
}
}
check_cells(null, 'force_' . $i, 0);
end_row();
}
end_table(1);
if ($partial != 0) {
display_note(_("Database upgrades marked as partially installed cannot be installed automatically.\nYou have to clean database manually to enable them, or try to perform forced upgrade."));
br();
}
submit_center('Upgrade', _('Upgrade system'), true, _('Save database and perform upgrade'), 'process');
end_form();
end_page();
示例13: label_row
continue;
}
$newsec = $parms[0] >> 8 & 0xff;
$newext = $parms[0] >> 16;
if ($newsec != $sec || $newext != $ext && $newsec > 99) {
// features set selection
$ext = $newext;
$sec = $newsec;
$m = $parms[0] & ~0xff;
// if(!isset($security_sections[$m]))
// display_error(sprintf("Bad section %X:", $m));
label_row($security_sections[$m] . ':', checkbox(null, 'Section' . $m, null, true, _("On/off set of features")), "class='tableheader2'", "class='tableheader'");
}
if (check_value('Section' . $m)) {
alt_table_row_color($k);
check_cells($parms[1], 'Area' . $parms[0], null, false, '', "align='center'");
end_row();
} else {
hidden('Area' . $parms[0]);
}
}
end_table(1);
div_end();
div_start('controls');
if ($new_role) {
submit_center_first('Update', _("Update view"), '', null);
submit_center_last('addupdate', _("Insert New Role"), '', 'default');
} else {
submit_center_first('addupdate', _("Save Role"), '', 'default');
submit('Update', _("Update view"), true, '', null);
submit('clone', _("Clone This Role"), true, '', true);
示例14: start_form
}
if (isset($_GET['ToDate'])) {
$_POST['TransToDate'] = $_GET['ToDate'];
}
//------------------------------------------------------------------------------------------------
start_form(false, true);
if (!isset($_POST['supplier_id'])) {
$_POST['supplier_id'] = get_global_supplier();
}
start_table("class='tablestyle_noborder'");
start_row();
supplier_list_cells(tr("Select a supplier: "), 'supplier_id', $_POST['supplier_id'], true);
date_cells(tr("From:"), 'TransAfterDate', null, -30);
date_cells(tr("To:"), 'TransToDate', null, 1);
supp_allocations_list_cells("filterType", null);
check_cells(tr("show settled:"), 'showSettled', null);
submit_cells('Refresh Inquiry', tr("Search"));
set_global_supplier($_POST['supplier_id']);
end_row();
end_table();
end_form();
//------------------------------------------------------------------------------------------------
function get_transactions()
{
global $db;
$date_after = date2sql($_POST['TransAfterDate']);
$date_to = date2sql($_POST['TransToDate']);
// Sherifoz 22.06.03 Also get the description
$sql = "SELECT supp_trans.type, supp_trans.trans_no,\n \tsupp_trans.tran_date, supp_trans.reference, supp_trans.supp_reference,\n \t(supp_trans.ov_amount + supp_trans.ov_gst + supp_trans.ov_discount) AS TotalAmount, supp_trans.alloc AS Allocated,\n\t\t((supp_trans.type = 20 OR supp_trans.type = 21) AND supp_trans.due_date < '" . date2sql(Today()) . "') AS OverDue,\n\t\tsuppliers.curr_code, suppliers.supp_name, supp_trans.due_date\n \tFROM supp_trans, suppliers\n \tWHERE suppliers.supplier_id = supp_trans.supplier_id\n \tAND supp_trans.tran_date >= '{$date_after}'\n \tAND supp_trans.tran_date <= '{$date_to}'";
if ($_POST['supplier_id'] != reserved_words::get_all()) {
$sql .= " AND supp_trans.supplier_id = '" . $_POST['supplier_id'] . "'";