本文整理汇总了PHP中olc_href_link函数的典型用法代码示例。如果您正苦于以下问题:PHP olc_href_link函数的具体用法?PHP olc_href_link怎么用?PHP olc_href_link使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了olc_href_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: olc_catalog_href_link
function olc_catalog_href_link($page = '', $parameters = '', $connection = NONSSL, $add_session_id = false, $search_engine_safe = false, $create_ajax_link = true)
{
global $use_catalog_link;
$use_catalog_link = true;
return olc_href_link($page, $parameters, $connection, $add_session_id, $search_engine_safe, $create_ajax_link);
$use_catalog_link = false;
}
示例2: olc_create_navigation_links
function olc_create_navigation_links($cart_is_filled, $is_logogff)
{
global $smarty;
$sep = HTML_NBSP . "|" . HTML_NBSP;
$a_end = '">';
$index = "index";
if ($cart_is_filled) {
require_once DIR_FS_INC . 'olc_get_smarty_config_variable.inc.php';
$my_navigation = HTML_A_START . olc_href_link(FILENAME_SHOPPING_CART) . $a_end . olc_get_smarty_config_variable($smarty, $index, "link_cart") . HTML_A_END;
$my_navigation .= $sep . HTML_A_START . olc_href_link(FILENAME_CHECKOUT_SHIPPING) . $a_end . olc_get_smarty_config_variable($smarty, $index, "link_checkout") . HTML_A_END;
}
$login_link = HTML_A_START . olc_href_link(FILENAME_LOGIN) . $a_end . olc_get_smarty_config_variable($smarty, $index, "link_login") . HTML_A_END;
if ($my_navigation) {
$my_navigation .= $sep;
}
if ($is_logogff) {
$my_navigation .= $login_link;
} else {
if (ISSET_CUSTOMER_ID) {
$my_navigation .= HTML_A_START . olc_href_link(FILENAME_LOGOFF) . $a_end . olc_get_smarty_config_variable($smarty, $index, "link_logoff") . HTML_A_END;
if (CUSTOMER_STATUS_ID != DEFAULT_CUSTOMERS_STATUS_ID_GUEST) {
$my_navigation .= $sep . HTML_A_START . olc_href_link(FILENAME_ACCOUNT) . $a_end . olc_get_smarty_config_variable($smarty, $index, "link_account") . HTML_A_END;
}
} else {
$my_navigation .= $login_link;
}
}
$my_navigation .= HTML_NBSP;
$smarty->assign(BOX_NAVIGATION, $my_navigation);
}
示例3: olc_display_banner
function olc_display_banner($action, $identifier)
{
if ($action == 'dynamic') {
$banners_query = olc_db_query(SELECT_COUNT . " as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . APOS);
$banners = olc_db_fetch_array($banners_query);
if ($banners['count'] > 0) {
$banner = olc_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . APOS);
} else {
return '<b>OLC ERROR! (olc_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</b>';
}
} elseif ($action == 'static') {
if (is_array($identifier)) {
$banner = $identifier;
} else {
$banner_query = olc_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . $identifier . APOS);
if (olc_db_num_rows($banner_query)) {
$banner = olc_db_fetch_array($banner_query);
} else {
return '<b>OLC ERROR! (olc_display_banner(' . $action . ', ' . $identifier . ') -> Banner with id \'' . $identifier . '\' not found, or status inactive</b>';
}
}
} else {
return '<b>OLC ERROR! (olc_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\'' . HTML_B_END;
}
if (olc_not_null($banner['banners_html_text'])) {
$banner_string = $banner['banners_html_text'];
} else {
$banner_string = HTML_A_START . olc_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . olc_image(DIR_WS_IMAGES . 'banner/' . $banner['banners_image'], $banner['banners_title']) . HTML_A_END;
}
olc_update_banner_display_count($banner['banners_id']);
return $banner_string;
}
示例4: get_category_tree
function get_category_tree($parent_id = '0', $spacing = EMPTY_STRING, $exclude = EMPTY_STRING, $category_tree_array = EMPTY_STRING, $include_itself = false, $cPath = EMPTY_STRING)
{
if ($parent_id == 0) {
$cPath = EMPTY_STRING;
} else {
$cPath .= $parent_id . '_';
}
if (!is_array($category_tree_array)) {
$category_tree_array = array();
}
if (sizeof($category_tree_array) < 1 && $exclude != '0') {
$category_tree_array[] = array('id' => '0', 'text' => TEXT_TOP);
}
if ($include_itself) {
$category_query = olc_db_query("\n\t\t\tselect cd.categories_name\n\t\t\tfrom " . TABLE_CATEGORIES_DESCRIPTION . " cd\n\t\t\tWHERE c.categories_status = '1' AND cd.language_id = '" . SESSION_LANGUAGE_ID . "'\n\t\t\tand cd.categories_id = '" . $parent_id . APOS);
$category = olc_db_fetch_array($category_query);
$category_tree_array[] = array('id' => $parent_id, 'text' => $category['categories_name']);
}
$categories_query = olc_db_query("\n\t\tselect\n\t\tc.categories_id,\n\t\tcd.categories_name,\n\t\tc.parent_id\n\t\tfrom " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd\n\t\twhere c.categories_id = cd.categories_id\n\t\tand cd.language_id = '" . SESSION_LANGUAGE_ID . "'\n\t\tand c.parent_id = '" . $parent_id . "'\n\t\tand c.categories_status = '1'\n\t\torder by c.sort_order, cd.categories_name");
while ($categories = olc_db_fetch_array($categories_query)) {
$categories_id = $categories['categories_id'];
if ($exclude != $categories_id) {
$category_tree_array[] = array('id' => $categories_id, 'text' => $spacing . $categories['categories_name'], 'link' => olc_href_link(FILENAME_DEFAULT, 'cPath=' . $cPath . $categories_id, NONSSL, false, true, false), 'pcount' => olc_count_products_in_category($categories_id));
$category_tree_array = get_category_tree($categories_id, $spacing . ' ', $exclude, $category_tree_array, false, $cPath);
}
}
return $category_tree_array;
}
示例5: olc_customer_greeting
function olc_customer_greeting()
{
if (CUSTOMER_ID) {
$greeting_string = sprintf(TEXT_GREETING_PERSONAL, trim($_SESSION['customer_first_name'] . BLANK . $_SESSION['customer_last_name']), olc_href_link(FILENAME_PRODUCTS_NEW));
} else {
$greeting_string = sprintf(TEXT_GREETING_GUEST, olc_href_link(FILENAME_LOGIN, EMPTY_STRING, SSL), olc_href_link(FILENAME_CREATE_ACCOUNT, EMPTY_STRING, SSL));
}
return $greeting_string;
}
示例6: olc_create_sort_heading
function olc_create_sort_heading($sortby, $colnum, $heading)
{
$sort_prefix = '';
$sort_suffix = '';
if ($sortby) {
$sort_prefix = HTML_A_START . olc_href_link(CURRENT_SCRIPT, olc_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading . '" class="productListing-heading">';
$sort_suffix = (substr($sortby, 0, 1) == $colnum ? substr($sortby, 1, 1) == 'a' ? '+' : '-' : '') . HTML_A_END;
}
return $sort_prefix . $heading . $sort_suffix;
}
示例7: menuBox
function menuBox($heading, $contents)
{
$this->table_data_parameters = 'class="menuBoxHeading"';
$heading_link = $heading[0]['link'];
$heading_text = $heading[0]['text'];
if ($heading_link) {
$heading_text = HTML_A_START . olc_href_link($heading_link) . '" class="menuBoxHeadingLink">' . $heading_text . HTML_A_END;
}
$heading[0]['text'] = HTML_NBSP . $heading_text . HTML_NBSP;
$this->heading = $this->tableBlock($heading);
$this->table_data_parameters = 'class="menuBoxContent"';
$this->contents = $this->tableBlock($contents);
return $this->heading . $this->contents;
}
示例8: olc_show_category
function olc_show_category($counter, $img = '')
{
global $foo, $categories_string, $id;
$current_entry = $foo[$counter];
if ($current_entry['parent'] == 0) {
$cPath_new = $counter;
} else {
$cPath_new = $current_entry['path'];
}
$cPath_new = 'cPath=' . $cPath_new;
$two_blank = HTML_NBSP . HTML_NBSP;
for ($a = 0; $a < $current_entry['level']; $a++) {
$indent = $two_blank;
}
$link = olc_href_link(FILENAME_DEFAULT, $cPath_new);
$link = HTML_A_START . $link . '" title="' . $current_entry['title'] . '">';
$make_bold = $id && in_array($counter, $id);
if ($make_bold) {
$link .= HTML_B_START;
}
// display category name
$link .= $current_entry['name'];
if ($make_bold) {
$link .= HTML_B_END;
}
$link .= HTML_A_END;
if (SHOW_COUNTS == TRUE_STRING_S) {
$products_in_category = olc_count_products_in_category($counter, false);
if ($products_in_category > 0) {
$link .= HTML_NBSP . ltrim(LPAREN) . $products_in_category . RPAREN;
}
}
if (strlen($categories_string) > 0) {
$categories_string .= HTML_BR;
}
$categories_string .= $indent . $img . $link;
$file = CURRENT_TEMPLATE_IMG . 'img_underline.gif';
if (is_file(DIR_FS_CATALOG . $file)) {
$categories_string .= HTML_BR . olc_image($file);
}
$next_id = $current_entry['next_id'];
if ($next_id) {
olc_show_category($next_id, $img);
}
}
示例9: olc_draw_form
function olc_draw_form($name, $action, $method = 'post', $action_parameters = '', $form_parameters = '')
{
//W. Kaiser - AJAX
//QUOTE='"';
$html_quot = '"';
$form_name = olc_parse_input_field_data($name, array(QUOTE => $html_quot));
$method_par = olc_parse_input_field_data($method, array(QUOTE => $html_quot));
$action_par = olc_parse_input_field_data($action, array(QUOTE => $html_quot));
if (IS_ADMIN_FUNCTION) {
//Note: the admin prog modules use different calling parameter order!
$form = $action_parameters;
$action_parameters = $method_par;
$method_par = $form;
$action_par = olc_href_link($action, $action_parameters, NONSSL, true, true, false);
$action_parameters = EMPTY_STRING;
} else {
$form_parameters = $action_parameters;
}
if ($method_par == EMPTY_STRING) {
$method_par = "post";
}
if ($form_parameters != EMPTY_STRING) {
$form_parameters = BLANK . $form_parameters;
}
if (USE_AJAX) {
//Remove AJAX Javascript routine from "action"-url, as we need it in its original form for the xhttprequest
/*
if ((strpos($action_par, AJAX_REQUEST_FUNC_START) !== false))
{
$action_par = str_replace(AJAX_REQUEST_FUNC_START, EMPTY_STRING, $action_par);
$action_par = str_replace(AJAX_REQUEST_FUNC_END, EMPTY_STRING, $action_par);
}
*/
$onsubmit = "onsubmit";
if (strpos(strtolower($form_parameters), strtolower($onsubmit)) === false) {
$form_parameters .= BLANK . $onsubmit . '="return make_AJAX_Request_POST(\'' . $name . '\',\'' . $action_par . '\');"';
}
$form_name .= '" id="' . $form_name;
}
//W. Kaiser - AJAX
$form = '<form name="' . $form_name . '" action="' . $action_par . '" method="' . $method_par . QUOTE . $form_parameters . '>';
return $form;
}
示例10: display_links
function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
{
if (olc_not_null($parameters) && substr($parameters, -1) != '&') {
$parameters .= '&';
}
// calculate number of pages needing links
$num_pages = ceil($query_numrows / $max_rows_per_page);
$pages_array = array();
for ($i = 1; $i <= $num_pages; $i++) {
$pages_array[] = array('id' => $i, 'text' => $i);
}
if ($num_pages > 1) {
$display_links = olc_draw_form('pages', CURRENT_SCRIPT, '', 'get');
if ($current_page_number > 1) {
$display_links .= HTML_A_START . olc_href_link(CURRENT_SCRIPT, $parameters . $page_name . '=' . ($current_page_number - 1), NONSSL) . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a> ';
} else {
$display_links .= PREVNEXT_BUTTON_PREV . ' ';
}
$display_links .= sprintf(TEXT_RESULT_PAGE, olc_draw_pull_down_menu($page_name, $pages_array, $current_page_number, 'onchange="this.form.submit();"'), $num_pages);
if ($current_page_number < $num_pages && $num_pages != 1) {
$display_links .= ' <a href="' . olc_href_link(CURRENT_SCRIPT, $parameters . $page_name . '=' . ($current_page_number + 1), NONSSL) . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . HTML_A_END;
} else {
$display_links .= ' ' . PREVNEXT_BUTTON_NEXT;
}
if ($parameters != '') {
if (substr($parameters, -1) == '&') {
$parameters = substr($parameters, 0, -1);
}
$pairs = explode('&', $parameters);
while (list(, $pair) = each($pairs)) {
list($key, $value) = explode('=', $pair);
$display_links .= olc_draw_hidden_field(rawurldecode($key), rawurldecode($value));
}
}
if (SID) {
$display_links .= olc_draw_hidden_field(session_name(), session_id());
}
$display_links .= '</form>';
} else {
$display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
}
return $display_links;
}
示例11: olc_show_category_content
function olc_show_category_content($counter)
{
global $foo, $categories_string, $id;
for ($a = 0; $a < $foo[$counter]['level']; $a++) {
$categories_string .= " ";
}
$categories_string .= HTML_A_START;
if ($foo[$counter]['parent'] == 0) {
$cPath = $counter;
} else {
$cPath = $foo[$counter]['path'];
}
$cPath_new = 'cPath=' . $cPath;
$categories_string .= olc_href_link(FILENAME_DEFAULT, $cPath_new) . '">';
if ($id && in_array($counter, $id)) {
$categories_string .= HTML_B_START;
}
// display category name
$categories_string .= $foo[$counter]['name'];
if ($id && in_array($counter, $id)) {
$categories_string .= HTML_B_END;
}
if (olc_has_category_subcategories($counter)) {
$categories_string .= '->';
}
$categories_string .= HTML_A_END;
if (SHOW_COUNTS == TRUE_STRING_S) {
$products_in_category = olc_count_products_in_category($counter);
if ($products_in_category > 0) {
$categories_string .= ' (' . $products_in_category . RPAREN;
}
}
$categories_string .= HTML_BR;
if ($foo[$counter]['next_id']) {
olc_show_category_content($foo[$counter]['next_id']);
}
}
示例12: SPAW_Wysiwyg
</td>
</tr>
<tr>
<td width="10%" valign="top"><?php
echo TEXT_BODY;
?>
</td>
<td width="90%"><?php
$sw = new SPAW_Wysiwyg($control_name = 'newsletter_body', $value = stripslashes($newsletters_data['body']), $lang = EMPTY_STRING, $mode = 'full', $theme = 'default', $width = '100%', $height = '800px', $css_stylesheet = SPAW_STYLESHEET, $dropdown_data = EMPTY_STRING);
$sw->show();
?>
</td>
</tr>
</table>
<a href="<?php
echo olc_href_link(FILENAME_MODULE_NEWSLETTER);
?>
">
<?php
echo olc_image_button('button_back.gif', IMAGE_BACK);
?>
</a>
<right><?php
echo olc_image_submit('button_save.gif', IMAGE_SAVE);
?>
</right>
</form>
<?php
break;
}
// end switch
示例13: olc_db_query
} else {
$smarty->assign('GLOBAL_NOTIFICATION', '1');
}
if ($global['global_product_notifications'] != '1') {
$products_check_query = olc_db_query("select count(*) as total from " . TABLE_PRODUCTS_NOTIFICATIONS . " where customers_id = '" . (int) $_SESSION['customer_id'] . APOS);
$products_check = olc_db_fetch_array($products_check_query);
if ($products_check['total'] > 0) {
$counter = 0;
$notifications_products = '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
$products_query = olc_db_query("select pd.products_id, pd.products_name from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_NOTIFICATIONS . " pn where pn.customers_id = '" . (int) $_SESSION['customer_id'] . "' and pn.products_id = pd.products_id and pd.language_id = '" . SESSION_LANGUAGE_ID . "' order by pd.products_name");
while ($products = olc_db_fetch_array($products_query)) {
$notifications_products .= '
<tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="javascript:checkBox(\'products[' . $counter . ']\')">
<td class="main" width="30">' . olc_draw_checkbox_field('products[' . $counter . ']', $products['products_id'], true, 'onclick="javascript:checkBox(\'products[' . $counter . ']\')"') . '</td>
<td class="main"><b>' . $products['products_name'] . '</b></td>
</tr> ';
$counter++;
}
$notifications_products .= '</table>';
$smarty->assign('PRODUCTS_NOTIFICATION', $notifications_products);
} else {
}
}
$smarty->assign('FORM_ACTION', olc_draw_form('account_notifications', olc_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', SSL)) . olc_draw_hidden_field('action', 'process'));
$smarty->assign('BUTTON_BACK', HTML_A_START . olc_href_link(FILENAME_ACCOUNT, '', SSL) . '">' . olc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . HTML_A_END);
$smarty->assign('BUTTON_CONTINUE', olc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
$main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . 'account_notifications' . HTML_EXT, SMARTY_CACHE_ID);
$smarty->assign(MAIN_CONTENT, $main_content);
require BOXES;
$smarty->display(INDEX_HTML);
示例14: draw_href_link
function draw_href_link($ppURLText, $ppURLParams = '', $ppURL = FILENAME_PAYPAL, $js = true)
{
//$ppURL = olc_href_link(FILENAME_PAYPAL,'action=details&info='.$ppTxnID);
$ppURL = olc_href_link($ppURL, $ppURLParams);
if ($js === true) {
$ppScriptLink = '<script language="javascript" type="text/javascript"><!--
document.write("<a style=\\"color: #0033cc; text-decoration: none;\\" href=\\"javascript:openWindow(\'' . $ppURL . '\');\\" tabindex=\\"-1\\">' . $ppURLText . '</a>");
--></script><noscript><a style="text-decoration: none;" href="' . $ppURL . '" target="PayPal">' . $ppURLText . '</a></noscript>';
} else {
$ppScriptLink = '<a style="text-decoration: none;" href="' . $ppURL . '" target="PayPal">' . $ppURLText . HTML_A_END;
}
return $ppScriptLink;
}
示例15: create_coupon_code
$coupon_code = create_coupon_code();
$insert_query = olc_db_query(INSERT_INTO . TABLE_COUPONS . " (coupon_code, coupon_type, coupon_amount, date_created) values ('" . $coupon_code . "', 'G', '" . NEW_SIGNUP_GIFT_VOUCHER_AMOUNT . "', now())");
$insert_id = olc_db_insert_id($insert_query);
$insert_query = olc_db_query(INSERT_INTO . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $insert_id . "', '0', 'Admin', '" . $customers_email_address . "', now() )");
$html_mail .= '<br/><br/>' . sprintf(EMAIL_GV_INCENTIVE_HEADER, $currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT)) . "<br/><br/>" . sprintf(EMAIL_GV_REDEEM, $coupon_code) . "<br/><br/>" . EMAIL_GV_LINK . olc_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $coupon_code, NONSSL, false) . "<br/><br/>";
$txt_mail .= "\n\n" . sprintf(EMAIL_GV_INCENTIVE_HEADER, $currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT)) . "\n\n" . sprintf(EMAIL_GV_REDEEM, $coupon_code) . "\n\n" . EMAIL_GV_LINK . olc_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $coupon_code, NONSSL, false) . "\n\n";
}
if (NEW_SIGNUP_DISCOUNT_COUPON != '') {
$coupon_code = NEW_SIGNUP_DISCOUNT_COUPON;
$coupon_query = olc_db_query("select * from " . TABLE_COUPONS . " where coupon_code = '" . $coupon_code . APOS);
$coupon = olc_db_fetch_array($coupon_query);
$coupon_id = $coupon['coupon_id'];
$coupon_desc_query = olc_db_query("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $coupon_id . "' and language_id = '" . (int) $_SESSION['languages_id'] . APOS);
$coupon_desc = olc_db_fetch_array($coupon_desc_query);
$insert_query = olc_db_query(INSERT_INTO . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $coupon_id . "', '0', 'Admin', '" . $customers_email_address . "', now() )");
$html_mail .= "<br/><br/>" . EMAIL_COUPON_INCENTIVE_HEADER . HTML_BR . sprintf("%s", $coupon_desc['coupon_description']) . "<br/><br/>" . sprintf(EMAIL_COUPON_REDEEM, $coupon['coupon_code']) . "<br/><br/>" . "<br/><br/>";
$txt_mail .= "\n\n" . EMAIL_COUPON_INCENTIVE_HEADER . NEW_LINE . sprintf("%s", $coupon_desc['coupon_description']) . "\n\n" . sprintf(EMAIL_COUPON_REDEEM, $coupon['coupon_code']) . "\n\n" . "\n\n";
}
// ICW - CREDIT CLASS CODE BLOCK ADDED ******************************************************* END
// GV Code End
// W. Kaiser - eMail-type by customer
olc_php_mail(EMAIL_SUPPORT_ADDRESS, EMAIL_SUPPORT_NAME, $customers_email_address, $name, EMAIL_SUPPORT_FORWARDING_STRING, EMAIL_SUPPORT_REPLY_ADDRESS, EMAIL_SUPPORT_REPLY_ADDRESS_NAME, '', '', EMAIL_SUPPORT_SUBJECT, $html_mail, $txt_mail, $customers_email_type);
// W. Kaiser - eMail-type by customer
if (!isset($mail_error)) {
olc_redirect(olc_href_link(FILENAME_SHOPPING_CART));
}
}
}
// W. Kaiser - Common code for "create_account.php" and "customers.php"
include DIR_FS_INC . 'olc_show_customer_data_form.inc.php';
// W. Kaiser - Common code for "create_account.php" and "customers.php"