本文整理汇总了PHP中html_href_link函数的典型用法代码示例。如果您正苦于以下问题:PHP html_href_link函数的具体用法?PHP html_href_link怎么用?PHP html_href_link使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了html_href_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Output
function Output($params)
{
global $db, $currencies;
if (count($params) != $this->size_params) {
//upgrading
$params = $this->Upgrade($params);
}
$list_length = array();
$contents = '';
$control = '';
for ($i = 0; $i <= $this->max_length; $i++) {
$list_length[] = array('id' => $i, 'text' => $i);
}
$list_order = array(array('id' => 'asc', 'text' => TEXT_ASC), array('id' => 'desc', 'text' => TEXT_DESC));
$list_limit = array(array('id' => '0', 'text' => TEXT_NO), array('id' => '1', 'text' => TEXT_YES));
// Build control box form data
$control = '<div class="row">';
$control .= ' <div style="white-space:nowrap">';
$control .= TEXT_SHOW . TEXT_SHOW_NO_LIMIT . ' ' . html_pull_down_menu('po_status_field_0', $list_length, $params['num_rows']) . '<br />';
$control .= CP_PO_STATUS_SORT_ORDER . ' ' . html_pull_down_menu('po_status_field_1', $list_order, $params['order']) . '<br />';
$control .= CP_PO_STATUS_HIDE_FUTURE . ' ' . html_pull_down_menu('po_status_field_2', $list_limit, $params['limit']);
$control .= html_submit_field('sub_po_status', TEXT_SAVE);
$control .= ' </div>';
$control .= '</div>';
if (count($params) != $this->size_params) {
$this->update();
}
// Build content box
$sql = "select id, post_date, purchase_invoice_id, bill_primary_name, total_amount, currencies_code, currencies_value \n\t\t from " . TABLE_JOURNAL_MAIN . " where journal_id = 4 and closed = '0'";
if ($params['limit'] == '1') {
$sql .= " and post_date <= '" . date('Y-m-d') . "'";
}
if ($params['order'] == 'desc') {
$sql .= " order by post_date desc";
}
if ($params['num_rows']) {
$sql .= " limit " . $params['num_rows'];
}
$result = $db->Execute($sql);
if ($result->RecordCount() < 1) {
$contents = ACT_NO_RESULTS;
} else {
while (!$result->EOF) {
$contents .= '<div style="float:right">';
$contents .= html_button_field('invoice_' . $result->fields['id'], TEXT_RECEIVE, 'onclick="window.open(\'' . html_href_link(FILENAME_DEFAULT, 'module=phreebooks&page=orders&oID=' . $result->fields['id'] . '&jID=6&action=prc_so', 'SSL') . '\',\'_blank\')"') . " ";
$contents .= $currencies->format_full($result->fields['total_amount'], true, $result->fields['currencies_code'], $result->fields['currencies_value']);
$contents .= '</div>';
$contents .= '<div>';
$contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, 'module=phreebooks&page=orders&oID=' . $result->fields['id'] . '&jID=4&action=edit', 'SSL') . '">';
$contents .= $result->fields['purchase_invoice_id'] . ' - ';
$contents .= gen_locale_date($result->fields['post_date']);
$contents .= ' ' . htmlspecialchars(gen_trim_string($result->fields['bill_primary_name'], 20, true));
$contents .= '</a>';
$contents .= '</div>' . chr(10);
$result->MoveNext();
}
}
return $this->build_div('', $contents, $control);
}
示例2: Output
function Output($params)
{
global $db, $currencies;
if (count($params) != $this->size_params) {
//upgrading
$params = $this->Upgrade($params);
}
$list_length = array();
$contents = '';
$control = '';
for ($i = 0; $i <= $this->max_length; $i++) {
$list_length[] = array('id' => $i, 'text' => $i);
}
// Build control box form data
$control = '<div class="row">';
$control .= '<div style="white-space:nowrap">' . TEXT_SHOW . TEXT_SHOW_NO_LIMIT;
$control .= html_pull_down_menu('to_receive_inv_field_0', $list_length, $params['num_rows']);
$control .= html_submit_field('sub_to_receive_inv', TEXT_SAVE);
$control .= '</div></div>';
// Build content box
$total = 0;
$sql = "select id, purchase_invoice_id, total_amount, bill_primary_name, currencies_code, currencies_value, post_date, journal_id \n\t\t from " . TABLE_JOURNAL_MAIN . " \n\t\t where journal_id in (6,7) and waiting = '1' order by post_date DESC, purchase_invoice_id DESC";
if ($params['num_rows']) {
$sql .= " limit " . $params['num_rows'];
}
$result = $db->Execute($sql);
if ($result->RecordCount() < 1) {
$contents = ACT_NO_RESULTS;
} else {
while (!$result->EOF) {
$inv_balance = $result->fields['total_amount'] - fetch_partially_paid($result->fields['id']);
if ($result->fields['journal_id'] == 7) {
$inv_balance = -$inv_balance;
}
$total += $inv_balance;
$contents .= '<div style="float:right">' . $currencies->format_full($inv_balance, true, $result->fields['currencies_code'], $result->fields['currencies_value']) . '</div>';
$contents .= '<div>';
$contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, "module=phreebooks&page=orders&oID={$result->fields['id']}&jID={$result->fields['journal_id']}&action=edit", 'SSL') . '">';
$contents .= gen_locale_date($result->fields['post_date']) . ' - ';
if ($result->fields['purchase_invoice_id'] != '') {
$contents .= $result->fields['purchase_invoice_id'] . ' - ';
}
$contents .= htmlspecialchars($result->fields['bill_primary_name']);
$contents .= '</a></div>' . chr(10);
$result->MoveNext();
}
}
if (!$params['num_rows'] && $result->RecordCount() > 0) {
$contents .= '<div style="float:right">' . $currencies->format_full($total, true, DEFAULT_CURRENCY, 1) . '</div>';
$contents .= '<div><b>' . TEXT_TOTAL . '</b></div>' . chr(10);
}
return $this->build_div('', $contents, $control);
}
示例3: selection
/**
* Display Credit Card Information Submission Fields on the Checkout Payment Page
*
* @return array
*/
function selection()
{
global $order;
for ($i = 1; $i < 13; $i++) {
$j = $i < 10 ? '0' . $i : $i;
$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => $j . '-' . strftime('%B', mktime(0, 0, 0, $i, 1, 2000)));
}
$today = getdate();
for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
$expires_year[] = array('id' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)), 'text' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)));
}
$selection = array('id' => $this->code, 'page' => $this->title, 'fields' => array(array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_OWNER, 'field' => html_input_field('nova_xml_field_0', $this->field_0)), array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_NUMBER, 'field' => html_input_field('nova_xml_field_1', $this->field_1)), array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES, 'field' => html_pull_down_menu('nova_xml_field_2', $expires_month, $this->field_2) . ' ' . html_pull_down_menu('nova_xml_field_3', $expires_year, $this->field_3)), array('title' => MODULE_PAYMENT_CC_TEXT_CVV, 'field' => html_input_field('nova_xml_field_4', $this->field_4, 'size="4" maxlength="4"' . ' id="' . $this->code . '-cc-cvv"') . ' ' . '<a href="javascript:popupWindow(\'' . html_href_link(FILENAME_POPUP_CVV_HELP) . '\')">' . TEXT_MORE_INFO . '</a>')));
return $selection;
}
示例4: assets_tabs
function assets_tabs()
{
global $db, $messageStack;
$this->security_id = $_SESSION['admin_security'][SECURITY_ASSET_MGT_TABS];
$this->db_table = TABLE_ASSETS_TABS;
$this->title = BOX_ASSET_MODULE_TABS;
$this->extra_buttons = false;
$this->help_path = '';
// make sure the module is installed
$result = $db->Execute("SHOW TABLES LIKE '" . TABLE_ASSETS . "'");
if ($result->RecordCount() == 0) {
$messageStack->add_session(ASSET_MGR_NOT_INSTALLED, 'caution');
gen_redirect(html_href_link(FILENAME_DEFAULT, 'cat=assets&module=admin', 'SSL'));
}
}
示例5: Output
function Output($params)
{
global $db, $currencies;
if (count($params) != $this->size_params) {
//upgrading
$params = $this->Upgrade($params);
}
$list_length = array();
$contents = '';
$control = '';
for ($i = 0; $i <= $this->max_length; $i++) {
$list_length[] = array('id' => $i, 'text' => $i);
}
// Build control box form data
$control = '<div class="row">';
$control .= '<div style="white-space:nowrap">' . TEXT_SHOW . TEXT_SHOW_NO_LIMIT;
$control .= html_pull_down_menu('todays_s_quotes_field_0', $list_length, $params['num_rows']);
$control .= html_submit_field('sub_todays_s_quotes', TEXT_SAVE);
$control .= '</div></div>';
// Build content box
$total = 0;
$sql = "select id, purchase_invoice_id, total_amount, bill_primary_name, currencies_code, currencies_value \n\t\t from " . TABLE_JOURNAL_MAIN . " \n\t\t where journal_id = 9 and post_date = '" . date('Y-m-d') . "' order by purchase_invoice_id";
if ($params['num_rows']) {
$sql .= " limit " . $params['num_rows'];
}
$result = $db->Execute($sql);
if ($result->RecordCount() < 1) {
$contents = ACT_NO_RESULTS;
} else {
while (!$result->EOF) {
$total += $result->fields['total_amount'];
$contents .= '<div style="float:right">' . $currencies->format_full($result->fields['total_amount'], true, $result->fields['currencies_code'], $result->fields['currencies_value']) . '</div>';
$contents .= '<div>';
// $contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, 'module=phreebooks&page=orders&oID=' . $result->fields['id'] . '&jID=10&action=edit', 'SSL') . '">';
$contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, 'module=phreebooks&page=orders&oID=' . $result->fields['id'] . '&jID=9&action=edit', 'SSL') . '">';
// $contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, 'cat=orders&module=orders&oID=' . $result->fields['id'] . '&jID=9&action=edit', 'SSL') . '">';
$contents .= $result->fields['purchase_invoice_id'] . ' - ';
$contents .= htmlspecialchars($result->fields['bill_primary_name']);
$contents .= '</a></div>' . chr(10);
$result->MoveNext();
}
}
if (!$params['num_rows'] && $result->RecordCount() > 0) {
$contents .= '<div style="float:right">' . $currencies->format_full($total, true, $result->fields['currencies_code'], $result->fields['currencies_value']) . '</div>';
$contents .= '<div><b>' . TEXT_TOTAL . '</b></div>' . chr(10);
}
return $this->build_div('', $contents, $control);
}
示例6: Output
function Output($params)
{
global $db, $currencies;
// Build control box form data
$control = '<div class="row">';
$control .= '<div style="white-space:nowrap">' . TEXT_SHOW . TEXT_SHOW_NO_LIMIT;
$control .= '<select name="num_rows" onchange="">';
for ($i = 0; $i <= 20; $i++) {
$control .= '<option value="' . $i . '"' . ($params['num_rows'] == $i ? ' selected="selected"' : '') . '>' . $i . '</option>';
}
$control .= '</select> ' . TEXT_ITEMS . ' ';
$control .= '<input type="submit" value="' . TEXT_SAVE . '" />';
$control .= '</div></div>';
// Build content box
$total = 0;
$sql = "select id, purchase_invoice_id, total_amount, bill_primary_name, currencies_code, currencies_value \r\n\t from " . TABLE_JOURNAL_MAIN . " \r\n\t where journal_id = 12 and post_date = '" . date('Y-m-d', time()) . "' order by purchase_invoice_id";
if ($params['num_rows']) {
$sql .= " limit " . $params['num_rows'];
}
$result = $db->Execute($sql);
if ($result->RecordCount() < 1) {
$contents = CP_TODAYS_SALES_NO_RESULTS;
} else {
while (!$result->EOF) {
$total += $result->fields['total_amount'];
$contents .= '<div style="float:right">' . $currencies->format_full($result->fields['total_amount'], true, $result->fields['currencies_code'], $result->fields['currencies_value']) . '</div>';
$contents .= '<div>';
$contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, 'cat=orders&module=orders&oID=' . $result->fields['id'] . '&jID=12&action=edit', 'SSL') . '">';
$contents .= $result->fields['purchase_invoice_id'] . ' - ';
$contents .= $result->fields['bill_primary_name'];
$contents .= '</a></div>' . chr(10);
$result->MoveNext();
}
}
if (!$params['num_rows']) {
$contents .= '<div style="float:right">' . $currencies->format_full($total, true, $result->fields['currencies_code'], $result->fields['currencies_value']) . '</div>';
$contents .= '<div><b>' . TEXT_TOTAL . '</b></div>' . chr(10);
}
return $this->build_div($this->title, $contents, $control);
}
示例7: Output
function Output($params)
{
global $db, $currencies;
// Build control box form data
$control = '<div class="row">';
$control .= '<div style="white-space:nowrap">' . TEXT_SHOW . TEXT_SHOW_NO_LIMIT;
$control .= '<select name="num_rows" onchange="">';
for ($i = 0; $i < MAX_NUM_SO_LIST; $i++) {
$control .= '<option value="' . $i . '"' . ($params['num_rows'] == $i ? ' selected="selected"' : '') . '>' . $i . '</option>';
}
$control .= '</select> ' . TEXT_ITEMS . ' ';
$control .= '<input type="submit" value="' . TEXT_SAVE . '" />';
$control .= '</div></div>';
// Build content box
$sql = "select id, post_date, purchase_invoice_id, bill_primary_name, total_amount, currencies_code, currencies_value \r\n\t\t\tfrom " . TABLE_JOURNAL_MAIN . " \r\n\t\t\twhere journal_id = 10 and closed = '0' order by post_date DESC";
if ($params['num_rows']) {
$sql .= " limit " . $params['num_rows'];
}
$result = $db->Execute($sql);
if ($result->RecordCount() < 1) {
$contents = CP_SO_STATUS_NO_RESULTS;
} else {
while (!$result->EOF) {
$contents .= '<div style="float:right">' . $currencies->format_full($result->fields['total_amount'], true, $result->fields['currencies_code'], $result->fields['currencies_value']) . '</div>';
$contents .= '<div>';
$contents .= '<a href="' . html_href_link(FILENAME_DEFAULT, 'cat=orders&module=orders&oID=' . $result->fields['id'] . '&jID=10&action=edit', 'SSL') . '">';
$contents .= $result->fields['purchase_invoice_id'] . ' - ';
$contents .= gen_spiffycal_db_date_short($result->fields['post_date']);
$name = strlen($result->fields['bill_primary_name']) > 20 ? substr($result->fields['bill_primary_name'], 0, 20) . '...' : $result->fields['bill_primary_name'];
$contents .= ' ' . htmlspecialchars($name);
$contents .= '</a></div>' . chr(10);
$result->MoveNext();
}
}
return $this->build_div($this->title, $contents, $control);
}
示例8: array
$order->item_rows[0] = array('pstd' => '1', 'id' => '', 'desc' => db_prepare_input($_POST['desc_1']), 'total' => $currencies->clean_value(db_prepare_input($_POST['total_1'])), 'acct' => db_prepare_input($_POST['acct_1']));
$post_credit = $order->post_ordr($action);
if (!$post_credit) {
$order = new objectInfo($_POST);
$order->post_date = gen_db_date_short($_POST['post_date']);
// fix the date to original format
$order->id = $_POST['id'] != '' ? $_POST['id'] : '';
// will be null unless opening an existing purchase/receive
$messageStack->add(GL_ERROR_NO_POST, 'error');
}
gen_add_audit_log(AUDIT_LOG_DESC, $order->purchase_invoice_id, $order->total_amount);
if (DEBUG) {
$messageStack->write_debug();
}
if ($action == 'save') {
gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')), 'SSL'));
}
// else print or print_update, fall through and load javascript to call form_popup and clear form
} else {
// else there was a post error, display and re-display form
$order = new objectInfo($_POST);
$order->post_date = gen_db_date_short($_POST['post_date']);
// fix the date to original format
$order->id = $_POST['id'] != '' ? $_POST['id'] : '';
// will be null unless opening an existing purchase/receive
$messageStack->add(GL_ERROR_NO_POST, 'error');
}
break;
default:
}
/***************** prepare to display templates *************************/
示例9: foreach
// pull in extra toolbar overrides and additions
if (count($extra_toolbar_buttons) > 0) {
foreach ($extra_toolbar_buttons as $key => $value) {
$toolbar->icon_list[$key] = $value;
}
}
// add the help file index and build the toolbar
$toolbar->add_help('');
echo $toolbar->build_toolbar();
// Build the page
?>
<div class="pageHeading"><?php
echo HEADING_TITLE_CRASH_TITLE;
?>
</div>
<table width="400" align="center" border="0" cellspacing="10" cellpadding="10">
<tr>
<td><?php
echo HEADING_TITLE_CRASH_INFORMATION;
?>
</td>
</tr>
<tr>
<td align="center"><?php
echo html_button_field('download', HEADING_TITLE_CRASH_BUTTON, 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, 'cat=general&module=debug', 'SSL') . '\'"');
?>
</td>
</tr>
</table>
</form>
示例10: html_form
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | The license that is bundled with this package is located in the |
// | file: /doc/manual/ch01-Introduction/license.html. |
// | If not, see http://www.gnu.org/licenses/ |
// +-----------------------------------------------------------------+
// Path: /modules/inventory/pages/cat_inv/template_id.php
//
echo html_form('inventory', FILENAME_DEFAULT, gen_get_all_get_params(array('action')));
echo html_hidden_field('todo', '') . chr(10);
// customize the toolbar actions
$toolbar->icon_list['cancel']['params'] = 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action', 'module')) . '&module=main', 'SSL') . '\'"';
$toolbar->icon_list['open']['show'] = false;
$toolbar->icon_list['delete']['show'] = false;
$toolbar->icon_list['save']['show'] = false;
$toolbar->icon_list['print']['show'] = false;
$toolbar->add_icon('continue', 'onclick="submitToDo(\'create\')"', $order = 10);
$toolbar->add_help('07.04.01.01');
echo $toolbar->build_toolbar();
?>
<div class="pageHeading"><?php
echo INV_HEADING_NEW_ITEM;
?>
</div>
<table width="500" align="center" cellspacing="0" cellpadding="1">
<tr>
<th nowrap="nowrap" colspan="2"><?php
示例11: gen_redirect
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | The license that is bundled with this package is located in the |
// | file: /doc/manual/ch01-Introduction/license.html. |
// | If not, see http://www.gnu.org/licenses/ |
// +-----------------------------------------------------------------+
// Path: /modules/banking/pages/popup_bills_accts/pre_process.php
//
/************** Check user security *****************************/
$security_level = (int) $_SESSION['admin_id'];
// for popups, just make sure they are logged in
if ($security_level == 0) {
// no permission to enter page, error and redirect to home page
$messageStack->add_session(ERROR_NO_PERMISSION, 'error');
gen_redirect(html_href_link(FILENAME_DEFAULT, '', 'SSL'));
}
/************** include page specific files *********************/
require DIR_FS_WORKING . 'language/' . $_SESSION['language'] . '/language.php';
require DIR_FS_WORKING . 'functions/banking.php';
/************** page specific initialization *************************/
define('JOURNAL_ID', $_GET['jID']);
define('ACCOUNT_TYPE', $_GET['type']);
switch (JOURNAL_ID) {
default:
case 18:
$terms_type = 'AR';
$default_purchase_invoice_id = 'DP' . date('Ymd', time());
break;
case 20:
$terms_type = 'AP';
示例12: define
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// +-----------------------------------------------------------------+
// Path: /modules/rma/config.php
//
// Release History
// 3.0 - Converted from PhreeBooks module
// 3.3 => 2011-11-15 - Bug fixes, themeroller changes
// 3.6 => More bug fixes, inventory not filling properly, changes for R3.6 table paging
// Module software version information
define('MODULE_RMA_VERSION', 3.6);
// Menu Sort Positions
define('BOX_RMA_MODULE_ORDER', 70);
// Menu Security id's
define('SECURITY_RMA_MGT', 180);
// New Database Tables
define('TABLE_RMA', DB_PREFIX . 'rma_module');
if (defined('MODULE_RMA_STATUS')) {
/*
// Set the title menu
define('MENU_HEADING_RMA_ORDER', 77);
$pb_headings[MENU_HEADING_RMA_ORDER] = array(
'text' => MENU_HEADING_RMA,
'link' => html_href_link(FILENAME_DEFAULT, 'module=phreedom&page=index&mID=cat_rma', 'SSL'),
);
*/
// Set the menu
$mainmenu["customers"]['submenu']['rma'] = array('text' => BOX_RMA_MODULE, 'order' => BOX_RMA_MODULE_ORDER, 'security_id' => SECURITY_RMA_MGT, 'link' => html_href_link(FILENAME_DEFAULT, 'module=rma&page=main', 'SSL'), 'show_in_users_settings' => true, 'params' => '');
}
示例13: define
// | The license that is bundled with this package is located in the |
// | file: /doc/manual/ch01-Introduction/license.html. |
// | If not, see http://www.gnu.org/licenses/ |
// +-----------------------------------------------------------------+
// Path: /my_files/custom/extra_menus/oscommerce.php
//
// REMEMBER TO CHECK PERMISSIONS AFTER ADDING A NEW MENU ITEM. THEY DEFAULT TO NO ACCESS AND
// DO NOT SHOW UP ON THE MENU UNITL PERMISSION HAS BEEN GRANTED AND THE USER HAS RE-LOGGED IN
// include the language definition for the menu items
if (file_exists(DIR_FS_MY_FILES . 'custom/oscommerce/language/' . $_SESSION['language'] . '/menu.php')) {
include_once DIR_FS_MY_FILES . 'custom/oscommerce/language/' . $_SESSION['language'] . '/menu.php';
} else {
include_once DIR_FS_MY_FILES . 'custom/oscommerce/language/en_us/menu.php';
}
// Set the menu order, if using osCommerce title menu option (after Customers and before Vendors)
define('MENU_HEADING_OSCOMMERCE_ORDER', 16);
// Security id's
define('SECURITY_ID_OSCOMMERCE_ADMIN', 208);
define('SECURITY_ID_OSCOMMERCE_INTERFACE', 209);
// Uncomment below to set the title menu for the osCommerce interface, otherwsie it will be parts of the Tools mennu
/*
$pb_headings[MENU_HEADING_OSCOMMERCE_ORDER] = array(
'text' => MENU_HEADING_OSCOMMERCE,
'link' => html_href_link(FILENAME_DEFAULT, 'cat=general&module=index&tpl=cat_osc', 'SSL'),
);
*/
// Menu Locations
$menu[] = array('text' => BOX_OSCOMMERCE_ADMIN, 'heading' => MENU_HEADING_TOOLS, 'rank' => 40, 'security_id' => SECURITY_ID_OSCOMMERCE_ADMIN, 'link' => html_href_link(FILENAME_DEFAULT, 'cat=oscommerce&module=admin', 'SSL'));
$menu[] = array('text' => BOX_OSCOMMERCE_MODULE, 'heading' => MENU_HEADING_TOOLS, 'rank' => 41, 'security_id' => SECURITY_ID_OSCOMMERCE_INTERFACE, 'link' => html_href_link(FILENAME_DEFAULT, 'cat=oscommerce&module=main', 'SSL'));
// New Database Tables
// None
示例14: session_id
$translator->extractRelease($_POST['id']);
$temproot = $translator->getTempRoot();
} else {
$temproot = $translator->getTempRoot(true);
}
$translator->searchModules($temproot, $_POST['source_lang']);
break;
case 'p_install':
$translator->addRelease($_POST);
if ($_POST['id'] != 'current_installation') {
$translator->delete_directory(INSTALL_TEMP_DIR . session_id());
}
header('Location:index.php?cat=translator&module=main');
exit;
case 'mod':
$toolbar->icon_list['cancel']['params'] = 'onclick="location.href = \'' . html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('action')) . 'action=releases', 'SSL') . '\'"';
$toolbar->icon_list['save']['show'] = true;
$toolbar->icon_list['save']['params'] = 'onclick="javascript:document.translator.submit()"';
$toolbar->icon_list['delete']['params'] = 'onclick="document.translator.action.value=\'p_delete\'; document.translator.submit()"';
$toolbar->icon_list['delete']['show'] = true;
$include_template = 'template_mod.php';
$release = $translator->getReleaseData($_GET['id']);
break;
case 'p_mod':
$translator->updateRelease($_POST);
header('Location:index.php?cat=translator&module=main');
exit;
case 'p_delete':
if (strstr($_POST['remove'], 'm_') !== false) {
$id = str_replace('m_', '', $_POST['remove']);
//exit;
示例15: gen_add_audit_log
gen_add_audit_log(PRICE_SHEETS_LOG . ($_REQUEST['action'] == 'save') ? TEXT_SAVE : TEXT_UPDATE, $sheet_name);
gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('psID', 'action')), 'SSL'));
break;
case 'delete':
validate_security($security_level, 4);
$id = (int) db_prepare_input($_GET['psID']);
$result = $db->Execute("select sheet_name, type, default_sheet from " . TABLE_PRICE_SHEETS . " where id = " . $id);
$sheet_name = $result->fields['sheet_name'];
$type = $result->fields['type'];
if ($result->fields['default_sheet'] == '1') {
$messageStack->add(PRICE_SHEET_DEFAULT_DELETED, 'caution');
}
$db->Execute("delete from " . TABLE_PRICE_SHEETS . " where id = '{$id}'");
$db->Execute("delete from " . TABLE_INVENTORY_SPECIAL_PRICES . " where price_sheet_id = '{$id}'");
gen_add_audit_log(PRICE_SHEETS_LOG . TEXT_DELETE, $sheet_name);
gen_redirect(html_href_link(FILENAME_DEFAULT, gen_get_all_get_params(array('psID', 'action')) . '&type=' . $type, 'SSL'));
break;
case 'revise':
validate_security($security_level, 2);
$old_id = db_prepare_input($_GET['psID']);
$result = $db->Execute("select * from " . TABLE_PRICE_SHEETS . " where id = {$old_id}");
$old_rev = $result->fields['revision'];
$output_array = array('sheet_name' => $result->fields['sheet_name'], 'type' => $type, 'revision' => $result->fields['revision'] + 1, 'effective_date' => gen_specific_date($result->fields['effective_date'], 1), 'default_sheet' => $result->fields['default_sheet'], 'default_levels' => $result->fields['default_levels']);
db_perform(TABLE_PRICE_SHEETS, $output_array, 'insert');
$id = db_insert_id();
// this is used by the edit function later on.
// expire the old sheet
$db->Execute("UPDATE " . TABLE_PRICE_SHEETS . " SET expiration_date='" . gen_specific_date($result->fields['effective_date'], 1) . "' WHERE id={$old_id}");
// Copy special pricing information to new sheet
$levels = $db->Execute("select inventory_id, price_levels from " . TABLE_INVENTORY_SPECIAL_PRICES . " where price_sheet_id = {$old_id}");
while (!$levels->EOF) {