本文整理汇总了PHP中extlib_cpsel函数的典型用法代码示例。如果您正苦于以下问题:PHP extlib_cpsel函数的具体用法?PHP extlib_cpsel怎么用?PHP extlib_cpsel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了extlib_cpsel函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: slctOpt
function slctOpt($errors = "")
{
global $_POST;
extract($_POST);
$fields = array();
$fields["budname"] = "Financial Budget";
foreach ($fields as $var_name => $value) {
if (!isset(${$var_name})) {
${$var_name} = $value;
}
}
global $BUDFOR, $TYPES, $PERIODS;
global $MONPRD, $PRDMON;
$typesel = extlib_mksel("budtype", $TYPES);
$fromprdsel = extlib_cpsel("fromprd", $PERIODS, $PRDMON[1]);
$toprdsel = extlib_cpsel("toprd", $PERIODS, $PRDMON[12]);
if ($budname == "Financial Budget") {
$bud_fin = "checked";
$bud_spec = "";
} else {
$bud_fin = "";
$bud_spec = "checked";
}
// Options Layout
$Opts = "<center>\n\t<h3> New Monthly Budget</h3>\n\t<form action='" . SELF . "' method=post name=form>\n\t<input type=hidden name=key value=details>\n\t<table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "' align=center>\n\t<tr>\n\t\t<td>{$errors}</td>\n\t</tr>\n\t<tr>\n\t\t<th colspan=3>Details</th>\n\t</tr>\n\t<tr class='" . bg_class() . "'>\n\t\t<td>Budget</td>\n\t\t<td>\n\t\t\t<input type='radio' name='budname' value='Financial Budget' {$bud_fin}>Financial Budget<b> | </b>\n\t\t\t<input type='radio' name='budname' value='Special Budget' {$bud_spec}>Special Budget\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan='3'><hr /></td>\n\t</tr>\n\t<tr>\n\t\t<th colspan=3>Create Budget</th>\n\t</tr>\n\t<tr class='" . bg_class() . "'>\n\t\t<td>Budget For</td>\n\t\t<td>\n\t\t\t<input type=radio name=budfor value=cost>Cost Centers \n\t\t\t<input type=radio name=budfor value=acc checked=yes>Accounts\n\t\t</td>\n\t</tr>\n\t<tr class='" . bg_class() . "'>\n\t\t<td>Budget Type</td>\n\t\t<td>{$typesel}</td>\n\t</tr>\n\t<tr class='" . bg_class() . "'>\n\t\t<td>Budget Period</td>\n\t\t<td>{$fromprdsel} to {$toprdsel}</td>\n\t</tr>";
if (PYR_DB) {
$Opts .= "<tr class='" . bg_class() . "'>\n\t\t\t<td>Use Previous Year Figures</td>\n\t\t\t<td><input type='checkbox' name='import' /></td>\n\t\t</tr>\n\t\t" . TBL_BR . "\n\t\t<tr>\n\t\t\t<th colspan='3'>'Use Previous Year Figures' Options</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan='3' class='err'>This option is only used to create a budget for accounts,\n\t\t\t\tnot Cost Centers.</td>\n\t\t</tr>\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<td>Increase Percentage</td>\n\t\t\t<td>\n\t\t\t\t<input type='text' name='incperc' size='3' value='0' /> %\n\t\t\t\t<span class='err'>Use negative value for decrease.</span>\n\t\t\t</td>\n\t\t</tr>";
}
$Opts .= "\n\t" . TBL_BR . "\n\t<tr>\n\t\t<td align=right><input type=button value='« Back' onClick='javascript:history.back()'></td>\n\t\t<td align=right><input type=submit value='Continue »'></td>\n\t</tr>\n\t</table>\n\t</form>\n\t<p>\n\t<table border=0 cellpadding='2' cellspacing='1' width=15%>\n\t\t<tr><th>Quick Links</th></tr>\n\t\t<tr class='bg-odd'><td align=center><a href='budget-view.php'>View Budgets</td></tr>\n\t\t<tr class='bg-odd'><td align=center><a href='../main.php'>Main Menu</td></tr>\n\t</table>";
return $Opts;
}
开发者ID:kumarsivarajan,项目名称:accounting-123,代码行数:31,代码来源:budget-new.php
示例2: enterAllow
function enterAllow($id)
{
# validate input
require_lib("validate");
$v = new validate();
$v->isOk($id, "num", 1, 20, "Invalid allowance ID.");
# display errors, if any
if ($v->isError()) {
$confirmCust = "";
$errors = $v->getErrors();
foreach ($errors as $e) {
$confirmCust .= "<li class=err>" . $e["msg"];
}
$confirmCust .= "<p><input type=button onClick='JavaScript:history.back();' value='« Correct submission'>";
return $confirmCust;
}
# get deduction info
db_connect();
$sql = "SELECT * FROM allowances WHERE id='{$id}' AND div = '" . USER_DIV . "'";
$allowRslt = db_exec($sql) or errDie("Unable to select allowance info from database.");
if (pg_numrows($allowRslt) < 1) {
return "Invalid allowance ID.";
}
$myAllow = pg_fetch_array($allowRslt);
$arrtype = array("Amount" => "Amount", "Percentage" => "Percentage");
$seltype = extlib_cpsel("type", $arrtype, $myAllow["type"]);
# get ledger account name
core_connect();
$sql = "SELECT accname FROM accounts WHERE accid = '{$myAllow['accid']}' AND div = '" . USER_DIV . "'";
$accRslt = db_exec($sql);
$acc = pg_fetch_array($accRslt);
$enterAllow = "<h3>Edit allowance</h3>\n\t<table cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\n\t<form action='" . SELF . "' method=post>\n\t<input type=hidden name=key value=confirm>\n\t<input type=hidden name=id value='{$id}'>\n\t<tr><th>Field</th><th>Value</th></tr>\n\t<tr class='bg-odd'><td>Name of allowance</td><td align=center><input type=text size=20 name=allowance value='{$myAllow['allowance']}'></td></tr>\n\t<tr class='bg-even'><td>Account</td><td align=center>{$acc['accname']}</td></tr>\n\t<tr class='bg-odd'><td>Taxable</td><td align=center><select name=taxable><option value='yes'>Yes</option><option value='no'>No</option></select></td></tr>\n\t<!--<tr class='bg-even'><td>Allowance Type</td><td>{$seltype}</td></tr>//-->\n\t<input type=hidden name=type value='{$myAllow['type']}'>\n\t<tr><td colspan=2 align=right><input type=submit value='Confirm »'></td></tr>\n\t</form>\n\t</table>" . mkQuickLinks(ql("../admin-employee-add.php", "Add Employee"), ql("../admin-employee-view.php", "View Employees"));
return $enterAllow;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:34,代码来源:allowance-edit.php
示例3: enterDeduct
function enterDeduct()
{
# connect to db
db_connect();
# get last inserted id for new ref no
// a little hack to make stoopid postgres not return a 1 as last id, when there is no last id
if (pg_numrows(db_exec("SELECT 1 FROM salded")) < 1) {
$lastid = 1;
} else {
$lastid = pglib_lastid("salded", "id") + 1;
}
$refno = "saldeduct" . sprintf("%02d", $lastid);
$Tp = array("No" => "No", "Yes" => "Yes");
$taxables = extlib_cpsel("taxable", $Tp, "No");
$arrtype = array("Amount" => "Amount", "Percentage" => "Percentage");
$seltype = extlib_cpsel("type", $arrtype, "Percentage");
$check1 = "";
$check2 = "";
if (isset($type) and $type == "Percentage") {
$check2 = "checked='yes'";
} else {
$check1 = "checked='yes'";
}
$enterDeduct = "\n\t\t<script>\n\t\t\tfunction inHouse() {\n\t\t\t\tfrm = getObjectById('dedfrm');\n\t\t\t\tfrm.creditor.value='In House';\n\t\t\t\tfrm.details.value='In House';\n\t\t\t}\n\t\t</script>\n\t\t<h3>New salary deduction</h3>\n\t\t<table " . TMPL_tblDflts . ">\n\t\t<form id='dedfrm' action='" . SELF . "' method='POST'>\n\t\t\t<input type='hidden' name='key' value='confirm'>\n\t\t\t<input type='hidden' name='refno' value='{$refno}'>\n\t\t\t<input type='hidden' name='catid' value='B10'>\n\t\t\t<tr>\n\t\t\t\t<th>Field</th>\n\t\t\t\t<th>Value</th>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>Name of deduction</td>\n\t\t\t\t<td align='center'><input type='text' size='20' name='deduction'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>Creditor name</td>\n\t\t\t\t<td align='center'><input type='text' size='20' name='creditor'></td>\n\t\t\t\t<td><input type='button' value='In House' onClick='inHouse();'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>Reference no.</td>\n\t\t\t\t<td align='center'>{$refno}</td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>Creditor Details/In House</td>\n\t\t\t\t<td align='center'><input type='text' size='20' name='details'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>Before PAYE: Tax Deductable</td>\n\t\t\t\t<td align='center'>{$taxables}</td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>Deduction Type</td>\n\t\t\t\t<td>\n\t\t\t\t\t<input type='radio' name='type' value='Amount' {$check1}> Amount\n\t\t\t\t\t<input type='radio' name='type' value='Percentage' {$check2}> Percent\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan='2' align='right'><input type='submit' value='Confirm »'></td>\n\t\t\t</tr>\n\t\t</form>\n\t\t</table>" . mkQuickLinks(ql("../admin-employee-add.php", "Add Employee"), ql("../admin-employee-view.php", "View Employees"));
return $enterDeduct;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:26,代码来源:salded-add.php
示例4: enter
function enter($err)
{
global $_GET;
extract($_GET);
$fields["privilege_owner"] = "";
$fields["privilege"] = "";
foreach ($fields as $key => $value) {
if (!isset(${$key})) {
${$key} = $value;
}
}
db_conn("cubit");
$sql = "SELECT username FROM users ORDER BY username";
$rslt = db_exec($sql) or errDie("Error reading user list.");
$users = array();
$users["0"] = "SELECT USER";
while ($row = pg_fetch_array($rslt)) {
$users[$row["username"]] = $row["username"];
}
$select_user = extlib_cpsel("privilege_owner", $users, $privilege_owner);
$select_privilege = "\r\n\t\t<select name=privilege>\r\n\t\t\t<option value='R' " . ($privilege == "R" ? "selected" : "") . ">Read</option>\r\n\t\t\t<option value='W' " . ($privilege == "W" ? "selected" : "") . ">Write</option>\r\n\t\t</select>";
$OUTPUT = "\r\n\t<h3>Diary Privileges</h3>\r\n\t{$err}\r\n\t<form method=post action='" . SELF . "'>\r\n\t<input type=hidden name=key value=write>\r\n\t<table cellpadding='2' cellspacing='0' class='shtable'>\r\n\t<tr>\r\n\t\t<th colspan=3>Details</th>\r\n\t</tr>\r\n\t<tr class='bg-odd'>\r\n\t\t<td>{$select_user}</td>\r\n\t\t<td colspan=2>{$select_privilege}</td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<th>Username</th>\r\n\t\t<th>Privilege</th>\r\n\t\t<th>Del</th>\r\n\t</tr>";
db_conn("cubit");
$sql = "SELECT * FROM diary_privileges WHERE diary_owner='" . USER_NAME . "'";
$rslt = db_exec($sql) or errDie("Error reading diary privileges.");
$i = 1;
while ($row = pg_fetch_array($rslt)) {
$OUTPUT .= "\r\n\t\t<tr class='" . bg_class() . "'>\r\n\t\t\t<td>{$row['priv_owner']}</td>\r\n\t\t\t<td>{$row['privilege']}</td>\r\n\t\t\t<td><input type=checkbox name='del[{$row['id']}]'></td>\r\n\t\t</tr>";
}
$OUTPUT .= "\r\n\t</table>\r\n\t<p></p>\r\n\t<input type=submit value='Update'>\r\n\t</form>";
return $OUTPUT;
}
开发者ID:kumarsivarajan,项目名称:accounting-123,代码行数:32,代码来源:diary-privileges.php
示例5: enterFringe
function enterFringe()
{
$arrtype = array("Amount" => "Amount", "Percentage" => "Percentage");
$seltype = extlib_cpsel("type", $arrtype, "Percentage");
$OUTPUT = "<h3>Add Fringe Benefit to system</h3>\n\t<table cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\n\t<form action='" . SELF . "' method=post>\n\t<input type=hidden name=key value=confirm>\n\t<input type=hidden name=type value='Amount'>\n\t<tr><th colspan=2>Fringe Benefit Details</th></tr>\n\t<tr class='bg-odd'><td>Name</td><td align=center><input type=text size=20 name=fringeben></td></tr>\n\t<tr><td colspan=2 align=right><input type=submit value='Confirm »'></td></tr>\n\t</form>\n\t</table>" . mkQuickLinks(ql("../admin-employee-add.php", "Add Employee"), ql("../admin-employee-view.php", "View Employees"));
return $OUTPUT;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:7,代码来源:fringeben-add.php
示例6: enterAllow
function enterAllow()
{
# connect to db
core_connect();
$allcat = "<select name='catid'>";
$sql = "SELECT * FROM expenditure WHERE div = '" . USER_DIV . "'";
$catRslt = db_exec($sql);
if (pg_numrows($catRslt) < 1) {
return "<li> There are no Expenditure Accounts categories yet in Cubit.</li>";
} else {
while ($cat = pg_fetch_array($catRslt)) {
if (!isset($expval) || $cat["catname"] == "Expenditure") {
$expval = $cat["catid"];
}
$allcat .= "<option value='{$cat['catid']}'>{$cat['catname']}</option>";
}
}
$allcat .= "</select>";
$Tp = array("No" => "No", "Yes" => "Yes");
$taxables = extlib_cpsel("taxable", $Tp, "Yes");
$arrtype = array("Amount" => "Amount", "Percentage" => "Percentage");
$seltype = extlib_cpsel("type", $arrtype, "Percentage");
$enterAllow = "\n\t\t\t\t\t<h3>Add allowance to system</h3>\n\t\t\t\t\t<table " . TMPL_tblDflts . ">\n\t\t\t\t\t<form action='" . SELF . "' method='POST'>\n\t\t\t\t\t\t<input type='hidden' name='key' value='confirm' />\n\t\t\t\t\t\t<input type='hidden' name='catid' value='{$expval}' />\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th colspan='2'>Allowance Details</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t\t\t<td>Name of allowance</td>\n\t\t\t\t\t\t\t<td align='center'><input type='text' size='20' name='allowance'></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<!--\n\t\t\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t\t\t<td>Account Category</td>\n\t\t\t\t\t\t\t<td align='center'>{$allcat}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t//-->\n\t\t\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t\t\t<td>Add Before PAYE</td>\n\t\t\t\t\t\t\t<td align='center'>{$taxables}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<input type='hidden' name='type' value='Amount'>\n\t\t\t\t\t\t<!--\n\t\t\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t\t\t<td>Allowance Type</td>\n\t\t\t\t\t\t\t<td>{$seltype}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t//-->\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan='2' align='right'><input type='submit' value='Confirm »'></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</form>\n\t\t\t\t\t</table>\n\t\t\t\t\t<br>" . mkQuickLinks(ql("allowance-add.php", "Add Allowance"), ql("../admin-employee-add.php", "Add Employee"), ql("../admin-employee-view.php", "View Employees"));
return $enterAllow;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:25,代码来源:allowance-add.php
示例7: view
function view($VARS = array(), $err = "")
{
extract($VARS);
if (!isset($accid)) {
$accid = "";
}
$vars = array("bankname", "branchname", "loc", "fcid", "branchcode", "accname", "accnum", "cardnum", "mon", "year", "lastdigits", "cardname", "cardtyp", "details");
$vard = array("cardtyp" => "Visa", "mon" => date("m"), "year" => date("Y"));
foreach ($vars as $key => $val) {
if (!isset(${$val})) {
${$val} = isset($vard[$val]) ? $vard[$val] : "";
}
}
if (strlen($lastdigits) < 1) {
$lastdigits = "000";
}
db_connect();
# Locations drop down
$locs = array("loc" => "Local", "int" => "International");
$locsel = extlib_cpsel("loc", $locs, $loc);
# currency drop down
$currsel = ext_unddbsel("fcid", "currency", "fcid", "descrip", "There are is no currency found in Cubit, please add currency first.", $fcid);
$chm = "";
$chv = "";
$cho = "";
if ($cardtyp == 'Visa') {
$chv = "checked=yes";
} elseif ($cardtyp == 'Mastercard') {
$chm = "checked=yes";
} else {
$cho = "checked=yes";
}
core_connect();
$sql = "SELECT * FROM accounts WHERE acctype = 'B' AND div = '" . USER_DIV . "' ORDER BY accname";
$accRslt = db_exec($sql) or errDie("Could not retrieve accounts from Cubit.", SELF);
if (pg_numrows($accRslt) < 1) {
return "<li> There are no balance accouts in Cubit.";
}
$accs = "<select name='accid'>";
while ($acc = pg_fetch_array($accRslt)) {
if (isbank($acc['accid'])) {
continue;
}
if (isb($acc['accid'])) {
continue;
}
if ($accid == $acc['accid']) {
$accs .= "<option value='{$acc['accid']}' selected>{$acc['accname']}</option>";
} else {
$accs .= "<option value='{$acc['accid']}'>{$acc['accname']}</option>";
}
}
$accs .= "</select>";
//layout
$view = "\n\t\t<h3>Add New Credit Card Account</h3>\n\t\t<table " . TMPL_tblDflts . ">\n\t\t<form action='" . SELF . "' method='POST' name='form'>\n\t\t\t<input type='hidden' name='key' value='confirm'>\n\t\t\t<tr>\n\t\t\t\t<td colspan='2'>{$err}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th>Field</th>\n\t\t\t\t<th>Value</th>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Bank Name</td>\n\t\t\t\t<td><input type='text' size='20' name='bankname' value='{$bankname}'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Type</td>\n\t\t\t\t<td>{$locsel}</td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Currency</td>\n\t\t\t\t<td>{$currsel}</td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Branch Name</td>\n\t\t\t\t<td><input type='text' size='20' name='branchname' value='{$branchname}'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Branch Code</td>\n\t\t\t\t<td><input type='text' size='20' name='branchcode' value='{$branchcode}'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Account Name</td>\n\t\t\t\t<td><input type='text' size='20' name='accname' maxlength='50' value='{$accname}'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Account Number</td>\n\t\t\t\t<td><input type='text' size='20' name='accnum' value='{$accnum}'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Ledger Account</td>\n\t\t\t\t<td>{$accs}</td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Card Number</td>\n\t\t\t\t<td><input type='text' size='25' name='cardnum' maxlength='16' value='{$cardnum}'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Expiry Date</td>\n\t\t\t\t<td>\n\t\t\t\t\t<input type='text' size='2' name='mon' maxlength='2' value='{$mon}'>-\n\t\t\t\t\t<input type='text' size='4' name='year' maxlength='4' value='{$year}'>MM-YYYY\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Last 3 Digits at back of Card</td>\n\t\t\t\t<td><input type='text' size='3' maxlength='3' name='lastdigits' value='{$lastdigits}'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>Card Type</td>\n\t\t\t\t<td><input type='radio' name='cardtyp' value='Visa' {$chv}>Visa <input type='radio' name='cardtyp' value='Mastercard' {$chm}> Mastercard <input type='radio' name='cardtyp' value='other' {$cho}>Other: <input type='text' name='cardname' value='{$cardname}'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Details</td>\n\t\t\t\t<td><textarea cols='20' rows='3' name='details'>{$details}</textarea></td>\n\t\t\t</tr>\n\t\t\t<tr><td><br></td></tr>\n\t\t\t<tr>\n\t\t\t\t<td><input type='button' value='« Cancel' onClick='javascript:history.back();'></td>\n\t\t\t\t<td><input type='submit' value='Confirm »'></td>\n\t\t\t</tr>\n\t\t</form>\n\t\t</table>\n\t\t<p>\n\t\t<table " . TMPL_tblDflts . ">\n\t\t\t<tr>\n\t\t\t\t<th>Quick Links</th>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td><a href='../core/acc-new2.php'>Add Ledger Account</a></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td><a href='../main.php'>Main Menu</a></td>\n\t\t\t</tr>\n\t\t</table>";
return $view;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:57,代码来源:creditcard-new.php
示例8: view
function view($VARS = array(), $err = "")
{
foreach ($VARS as $key => $vals) {
${$key} = $vals;
}
$vars = array("bankname", "branchname", "loc", "fcid", "branchcode", "accname", "accnum", "cardnum", "mon", "year", "lastdigits", "cardname", "cardtyp", "details");
$vard = array("cardtyp" => "Visa", "mon" => date("m"), "year" => date("Y"));
foreach ($vars as $key => $val) {
if (!isset(${$val})) {
${$val} = isset($vard[$val]) ? $vard[$val] : "";
}
}
if (strlen($lastdigits) < 1) {
$lastdigits = "000";
}
db_connect();
# Locations drop down
$locs = array("loc" => "Local", "int" => "International");
$locsel = extlib_cpsel("loc", $locs, $loc);
# currency drop down
$currsel = ext_unddbsel("fcid", "currency", "fcid", "descrip", "There are is no currency found in Cubit, please add currency first.", "");
$chm = "";
$chv = "";
$cho = "";
if ($cardtyp == 'Visa') {
$chv = "checked=yes";
} elseif ($cardtyp == 'Mastercard') {
$chm = "checked=yes";
} else {
$cho = "checked=yes";
}
core_connect();
$sql = "SELECT * FROM accounts WHERE acctype = 'B' AND div = '" . USER_DIV . "' ORDER BY accname";
$accRslt = db_exec($sql) or errDie("Could not retrieve accounts from Cubit.", SELF);
if (pg_numrows($accRslt) < 1) {
return "<li> There are no balance accouts in Cubit.";
}
$accs = "<select name=accid>";
while ($acc = pg_fetch_array($accRslt)) {
if (isbank($acc['accid'])) {
continue;
}
if (isb($acc['accid'])) {
continue;
}
$accs .= "<option value='{$acc['accid']}'>{$acc['accname']}</option>";
}
$accs .= "</select>";
//layout
$view = "\n\t<h3>Add New Petrol Card Account</h3>\n\t<table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\n\t<form action='" . SELF . "' method=post name=form>\n\t<input type=hidden name=key value=confirm>\n\t<tr><td colspan=2>{$err}</td></tr>\n\t<tr><th>Field</th><th>Value</th></tr>\n\t<tr class='bg-odd'><td>" . REQ . "Bank Name</td><td ><input type=text size=20 name=bankname value='{$bankname}'></td></tr>\n\t<tr class='bg-even'><td>" . REQ . "Type</td><td>{$locsel}</td></tr>\n\t<tr class='bg-odd'><td>" . REQ . "Currency</td><td>{$currsel}</td></tr>\n\t<tr class='bg-even'><td>" . REQ . "Branch Name</td><td ><input type=text size=20 name=branchname value='{$branchname}'></td></tr>\n\t<tr class='bg-odd'><td>" . REQ . "Branch Code</td><td ><input type=text size=20 name=branchcode value='{$branchcode}'></td></tr>\n\t<tr class='bg-even'><td>" . REQ . "Account Name</td><td ><input type=text size=20 name=accname maxlength=50 value='{$accname}'></td></tr>\n\t<tr class='bg-odd'><td>" . REQ . "Account Number</td><td ><input type=text size=20 name=accnum value='{$accnum}'></td></tr>\n\t<tr class='bg-even'><td>" . REQ . "Ledger Account</td><td>{$accs}</td></tr>\n\t<tr class='bg-odd'><td>" . REQ . "Card Number</td><td ><input type=text size=25 name=cardnum maxlength=16 value='{$cardnum}'></td></tr>\n\t<tr class='bg-even'><td>" . REQ . "Expiry Date</td><td><input type=text size=2 name=mon maxlength=2 value='{$mon}'>-<input type=text size=4 name=year maxlength=4 value='{$year}'>MM-YYYY</td></tr>\n\t<tr class='bg-odd'><td>" . REQ . "Last 3 Digits at back of Card</td><td ><input type=text size=3 maxlength=3 name=lastdigits value='{$lastdigits}'></td></tr>\n\t<tr class='bg-even'><td>Card Type</td><td><input type=radio name=cardtyp value=Visa {$chv}>Visa <input type=radio name=cardtyp value='Mastercard' {$chm}> Mastercard <input type=radio name=cardtyp value='other' {$cho}>Other: <input type=text name=cardname value='{$cardname}'></td>\n\t<tr class='bg-odd'><td>" . REQ . "Details</td><td ><textarea cols=20 rows=3 name=details>{$details}</textarea></td></tr>\n\t<tr><td><br></td></tr>\n\t<tr><td><input type=button value='« Cancel' onClick='javascript:history.back();'></td><td ><input type=submit value='Confirm »'></td></tr>\n\t</form>\n\t</table>\n\t<p>\n\t<table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\n\t\t<tr><th>Quick Links</th></tr>\n\t\t<tr class='bg-odd'><td><a href='../core/acc-new2.php'>Add Ledger Account</a></td></tr>\n\t\t<tr class='bg-odd'><td><a href='../main.php'>Main Menu</a></td></tr>\n\t</table>";
return $view;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:52,代码来源:petrolcard-new.php
示例9: enter
function enter()
{
$Sl = "SELECT * FROM posround";
$Rs = db_exec($Sl) or errDie("Unable to add supplier to the system.", SELF);
if (pg_numrows($Rs) < 1) {
$Sl = "INSERT INTO posround (setting) VALUES ('No')";
$Rs = db_exec($Sl) or errDie("Unable to add supplier to the system.", SELF);
$Sl = "SELECT * FROM posround";
$Rs = db_exec($Sl) or errDie("Unable to add supplier to the system.", SELF);
}
$Dets = pg_fetch_array($Rs);
$ops = array("5cent" => "Yes(to nearest 5c)", "No" => "No");
$Ops = extlib_cpsel("op", $ops, $Dets['setting']);
$enter = "<h3>Point of Sale Setting</h3>\r\n\t<form action='" . SELF . "' method=post>\r\n\t<table cellpadding=0 cellspacing=0>\r\n\t<tr valign=top><td>\r\n\t\t<table cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\r\n\t\t<input type=hidden name=key value=confirm>\r\n\t\t<tr><th colspan=2>Setting</th></tr>\r\n\t\t<tr class='bg-even'><td>POS rounding</td><td>{$Ops}</td></tr>\r\n\t\t</table>\r\n\t</td></tr>\r\n\t<tr><td valign=bottom><input type=submit value='Confirm »'></td></tr>\r\n\t</table>\r\n\t<p>\r\n\t<table border=0 cellpadding='2' cellspacing='1'>\r\n\t<tr><th>Quick Links</th></tr>\r\n\t<tr class='bg-odd'><td><a href='main.php'>Main Menu</a></td></tr>\r\n\t</table>";
return $enter;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:16,代码来源:pos-setting.php
示例10: enter
function enter()
{
$Sl = "SELECT * FROM possets WHERE div = '" . USER_DIV . "'";
$Rs = db_exec($Sl) or errDie("Unable to add supplier to the system.", SELF);
if (pg_numrows($Rs) < 1) {
$Sl = "INSERT INTO possets (opt,div) VALUES ('Yes','" . USER_DIV . "')";
$Rs = db_exec($Sl) or errDie("Unable to add supplier to the system.", SELF);
$Sl = "SELECT * FROM possets WHERE div = '" . USER_DIV . "'";
$Rs = db_exec($Sl) or errDie("Unable to add supplier to the system.", SELF);
}
$Dets = pg_fetch_array($Rs);
$ops = array("Yes" => "Yes", "No" => "No");
$Ops = extlib_cpsel("op", $ops, $Dets['opt']);
$enter = "<h3>Stock Point of Sale Setting<br>If you say 'No' it would mean for instance that every can of cola has its own bar code.</h3>\r\n\t<form action='" . SELF . "' method=post>\r\n\t<table cellpadding=0 cellspacing=0>\r\n\t<tr valign=top><td>\r\n\t\t<table cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\r\n\t\t<input type=hidden name=key value=confirm>\r\n\t\t<tr><th colspan=2>Setting</th></tr>\r\n\t\t<tr class='bg-even'><td>Each Stock Code has a Bar Code</td><td>{$Ops}</td></tr>\r\n\t\t</table>\r\n\t</td></tr>\r\n\t<tr><td valign=bottom><input type=submit value='Confirm »'></td></tr>\r\n\t</table>\r\n\t<p>\r\n\t<table border=0 cellpadding='2' cellspacing='1'>\r\n\t<tr><th>Quick Links</th></tr>\r\n\t<tr class=datacell><td align=center><a href='stock-settings.php'>Stock Settings</td></tr>\r\n\t<tr class=datacell><td align=center><a href='settings-index.php'>Settings</td></tr>\r\n\t<tr class='bg-odd'><td><a href='main.php'>Main Menu</a></td></tr>\r\n\t</table>";
return $enter;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:16,代码来源:pos-set.php
示例11: enterAllow
function enterAllow()
{
# connect to db
core_connect();
$allcat = "<select name='catid'>";
$sql = "SELECT * FROM expenditure WHERE div = '" . USER_DIV . "'";
$catRslt = db_exec($sql);
if (pg_numrows($catRslt) < 1) {
return "<li> There are no Expenditure Accounts categories yet in Cubit.";
} else {
while ($cat = pg_fetch_array($catRslt)) {
$allcat .= "<option value='{$cat['catid']}'>{$cat['catname']}</option>";
}
}
$allcat .= "</select>";
$Tp = array("No" => "No", "Yes" => "Yes");
$taxables = extlib_cpsel("taxable", $Tp, "Yes");
$enterAllow = "<h3>Add reimbursement to system</h3>\n\t<table cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\n\t<form action='" . SELF . "' method=post>\n\t<input type=hidden name=key value=confirm>\n\t<tr><th colspan=2>Reimbursement Details</th></tr>\n\t<tr class='bg-odd'><td>Name</td><td align=center><input type=text size=20 name=name></td></tr>\n\t<tr class='bg-even'><td>Account Category</td><td align=center>{$allcat}</td></tr>\n\t<tr><td colspan=2 align=right><input type=submit value='Confirm »'></td></tr>\n\t</form>\n\t</table>" . mkQuickLinks(ql("../admin-employee-add.php", "Add Employee"), ql("../admin-employee-view.php", "View Employees"));
return $enterAllow;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:20,代码来源:rbs-add.php
示例12: view
function view()
{
# dates drop downs
$months = array("1" => "January", "2" => "February", "3" => "March", "4" => "April", "5" => "May", "6" => "June", "7" => "July", "8" => "August", "9" => "September", "10" => "October", "11" => "November", "12" => "December");
$fmonth = extlib_cpsel("fmonth", $months, date("m"));
$lmonth = extlib_cpsel("lmonth", $months, date("m"));
// Layout
$view = "\n <h3>View Saved Bank Reconciliations</h3>\n <table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "' width=350>\n <form action='" . SELF . "' method=post name=form>\n <input type=hidden name=key value=viewsaved>\n <tr><th>Field</th><th>Value</th></tr>\n <tr class='bg-odd'><td>Bank Account</td>\n <td valign=center><select name=bankid>";
db_connect();
$sql = "SELECT * FROM bankacct";
$banks = db_exec($sql);
$numrows = pg_numrows($banks);
if (empty($numrows)) {
return "<li class=err> There are no accounts held at the selected Bank.\n <p><input type=button onClick='JavaScript:history.back();' value='« Correct Selection'>";
}
while ($acc = pg_fetch_array($banks)) {
$view .= "<option value={$acc['bankid']}>{$acc['accname']} - {$acc['bankname']}</option>";
}
$view .= "</select></td></tr>\n\t\t<tr class='bg-odd'><td>From :</td><td valign=center><input type=text name=fday size=2 maxlength=2 value='1'> - {$fmonth} - <input type=text name=fyear size=4 maxlength=4 value=" . date("Y") . "></td></tr>\n\t\t<tr class='bg-even'><td>To :</td><td valign=center><input type=text name=lday size=2 maxlength=2 value='" . date("d") . "'> - {$lmonth} - <input type=text name=lyear size=4 maxlength=4 value=" . date("Y") . "></td></tr>\n\t\t<tr><td><br></td></tr>\n\t\t<tr><td align=right><input type=button value='« Back' onClick='javascript:history.back()'></td><td align=right><input type=submit value='View »'></td></tr>\n </table>\n <p>\n\t\t<table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\n\t <tr><th>Quick Links</th></tr>\n <script>document.write(getQuicklinkSpecial());</script>\n\t\t</table>";
return $view;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:21,代码来源:banke-recon-saved.php
示例13: view
function view()
{
# dates drop downs
$months = array("1" => "January", "2" => "February", "3" => "March", "4" => "April", "5" => "May", "6" => "June", "7" => "July", "8" => "August", "9" => "September", "10" => "October", "11" => "November", "12" => "December");
$fmonth = extlib_cpsel("fmonth", $months, date("m"));
$lmonth = extlib_cpsel("lmonth", $months, date("m"));
// main layout
$view = "\n\t\t<h3>View Cash Book</h3>\n\t\t<h4>Select Period</h4>\n\t\t<table " . TMPL_tblDflts . ">\n\t\t<form action='" . SELF . "' method='POST' name='form'>\n\t\t\t<input type='hidden' name='key' value='viewcash' />\n\t\t\t<input type='hidden' name='order' value='' />\n\t\t\t<tr>\n\t\t\t\t<th>Field</th>\n\t\t\t\t<th>Value</th>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>Bank Account</td>\n\t\t\t\t<td valign='center'><select name='bankid'>";
db_connect();
$sql = "SELECT * FROM bankacct WHERE div = '" . USER_DIV . "' ORDER BY accname,bankname";
$banks = db_exec($sql);
$numrows = pg_numrows($banks);
if (empty($numrows)) {
return "<li class='err'> There are no accounts held at the selected Bank.\n\t\t<p><input type='button' onClick='JavaScript:history.back();' value='« Correct Selection'>";
}
while ($acc = pg_fetch_array($banks)) {
$view .= "<option value='{$acc['bankid']}'>{$acc['accname']} - {$acc['bankname']} ({$acc['acctype']})</option>";
}
$view .= "\n\t\t\t\t</select>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<td>From:</td>\n\t\t\t<td valign='center'>" . mkDateSelect("f", DATE_YEAR, DATE_MONTH, 1) . "</td>\n\t\t</tr>\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<td>To:</td>\n\t\t\t<td valign='center'>" . mkDateSelect("l", DATE_YEAR, DATE_MONTH, DATE_DAY) . "</td></tr>\n\t\t<tr>\n\t\t\t<td align='right'></td>\n\t\t\t<td align='right'><input type='submit' value='View »' /></td>\n\t\t</tr>\n\t\t</table>" . mkQuickLinks(ql("../core/acc-new2.php", "Add New Account"));
return $view;
}
开发者ID:kumarsivarajan,项目名称:accounting-123,代码行数:21,代码来源:cashbook-view.php
示例14: view
function view($acctype = "", $bankname = "", $loc = "", $branchname = "", $branchcode = "", $accname = "", $accnum = "", $details = "", $err = "")
{
db_connect();
# Locations drop down
$locs = array("loc" => "Local", "int" => "International");
$locsel = extlib_cpsel("loc", $locs, $loc);
# currency drop down
$currsel = ext_unddbsel("fcid", "currency", "fcid", "descrip", "There are is no currency found in Cubit, please add currency first.", "");
//layout
$view = "\n\t\t<h3>Add New Bank Account</h3>\n\t\t<table " . TMPL_tblDflts . " width='300'>\n\t\t<form action='" . SELF . "' method='POST' name='form'>\n\t\t\t<input type='hidden' name='key' value='confirm'>\n\t\t\t{$err}\n\t\t\t<tr>\n\t\t\t\t<th>Field</th>\n\t\t\t\t<th>Value</th>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Type of Account</td>\n\t\t\t\t<td valign='center'><input type='text' size='20' name='acctype' value='{$acctype}'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Bank Name</td>\n\t\t\t\t<td valign='center'><input type='text' size='20' name='bankname' value='{$bankname}'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Type</td>\n\t\t\t\t<td>{$locsel}</td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Currency</td>\n\t\t\t\t<td>{$currsel}</td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Branch Name</td>\n\t\t\t\t<td valign='center'><input type='text' size='20' name='branchname' value='{$branchname}'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>" . REQ . "Branch Code</td>\n\t\t\t\t<td valign='center'><input type='text' size='20' name='branchcode' value='{$branchcode}'></td>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>"
|
请发表评论