当前位置: 首页>>代码示例>>PHP>>正文


PHP display_button函数代码示例

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


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

示例1: session_start

<?php

include 'book_sc_fns.php';
// The shopping cart needs sessions, so start one
session_start();
do_html_header("Welcome to Book-O-Rama");
echo "<p>Please choose a category:</p>";
// get categories out of database
$cat_array = get_categories();
// display as links to cat pages
display_categories($cat_array);
// if logged in as admin, show add, delete, edit cat links
if (isset($_SESSION['admin_user'])) {
    display_button("admin.php", "admin-menu", "Admin Menu");
}
do_html_footer();
开发者ID:kmfb21,项目名称:A290CGI-PHP,代码行数:16,代码来源:index.php

示例2: values

        if ($i == 1) {
            $destination = "archive/{$list}/{$mailid}/index.html";
        } else {
            $destination = "archive/{$list}/{$mailid}/" . $HTTP_POST_FILES['userfile']['name'][$i];
            $query = "insert into images values ({$mailid}, \n                             '" . $HTTP_POST_FILES['userfile']['name'][$i] . "',\n                             '" . $HTTP_POST_FILES['userfile']['type'][$i] . "')";
            $result = mysql_query($query);
        }
    }
    //if we are using PHP version >= 4.03
    if (!is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'][$i])) {
        // possible file upload attack detected
        echo 'Something funny happening with ' . $HTTP_POST_FILES['userfile']['name'] . ', not uploading.';
        do_html_footer();
        exit;
    }
    move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'][$i], $destination);
    /*
        // if version <= 4.02
        copy ($userfile[$i], $destination);
        
        unlink($userfile[$i]);
    */
    $i++;
}
display_preview_button($list, $mailid, 'preview-html');
display_preview_button($list, $mailid, 'preview-text');
display_button('send', "&id={$mailid}");
echo '<br /><br /><br /><br /><br />';
do_html_footer();
?>
  
开发者ID:sjaviel,项目名称:programacao_internet_2015_2,代码行数:30,代码来源:upload.php

示例3: do_html_header

function do_html_header($title)
{
    if (@(!$_SESSION['items'])) {
        $_SESSION['items'] = '0';
    }
    if (@(!$_SESSION['total_price'])) {
        $_SESSION['total_price'] = '0.00';
    }
    ?>

    <html>
    <head>
        <title><?php 
    echo $title;
    ?>
</title>
    </head>
    <body>
    <table>
        <tr>
            <td><img src="logo.png"></td>

            <td>Total books: <?php 
    echo $_SESSION['items'];
    ?>
 <br/>
                Total price: <?php 
    echo $_SESSION['total_price'];
    ?>
</td>

            <td>
                <?php 
    if (isset($_SESSION['admin_user'])) {
        display_button("logout.php", "log-out", "Log Out");
    } else {
        display_button("show_cart.php", "show-cart", "Show Cart");
    }
    ?>
            </td>
        </tr>
    </table>
    <h1><?php 
    echo $title;
    ?>
</h1>


    <?php 
}
开发者ID:Carteor,项目名称:shoppingcart-php,代码行数:50,代码来源:output_fns.php

示例4: session_start

<?php

include 'book_sc_fns.php';
// The shopping cart needs sessions, so start one
session_start();
$catid = $HTTP_GET_VARS['catid'];
$name = get_category_name($catid);
do_html_header($name);
// get the book info out from db
$book_array = get_books($catid);
display_books($book_array);
// if logged in as admin, show add, delete book links
if (isset($HTTP_SESSION_VARS['admin_user'])) {
    display_button('index.php', 'continue', 'Continue Shopping');
    display_button('admin.php', 'admin-menu', 'Admin Menu');
    display_button("edit_category_form.php?catid={$catid}", 'edit-category', 'Edit Category');
} else {
    display_button('index.php', 'continue-shopping', 'Continue Shopping');
}
do_html_footer();
开发者ID:sjaviel,项目名称:programacao_internet_2015_2,代码行数:20,代码来源:show_cat.php

示例5: display_toolbar

function display_toolbar($button, $extra_parameters = '')
{
    // draw on of our toolbars
    global $table_width;
    echo "<table width=\"" . $table_width . "\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n        <tr>\n        <td bgcolor=\"#ccccc\" align=\"center\">";
    for ($i = 0; $i < 5; $i++) {
        if ($button[$i]) {
            display_button($button[$i], $extra_parameters);
        } else {
            display_spacer();
        }
    }
    echo "</td>\n        </tr>\n        </table>";
}
开发者ID:kai-cn,项目名称:bookcode-php-mysql-web-development,代码行数:14,代码来源:output_fns.php

示例6: do_html_header

<?php

// The shopping cart needs sessions, so start one
//session_start();
do_html_header('Checkout');
if (isset($_SESSION['cart']) && array_count_values($_SESSION['cart'])) {
    display_cart($_SESSION['cart'], false, 0);
    display_checkout_form();
} else {
    echo '<p>There are no items in your cart</p>';
}
display_button(base_url("index.php") . '/cart/show_cart', 'continue-shopping', 'Continue Shopping');
开发者ID:jamaBHacker,项目名称:cart,代码行数:12,代码来源:checkout.php

示例7: session_start

<?php

include 'book_sc_fns.php';
// The shopping cart needs sessions, so start one
session_start();
do_html_header('Checkout');
$card_type = $HTTP_POST_VARS['card_type'];
$card_number = $HTTP_POST_VARS['card_number'];
$card_month = $HTTP_POST_VARS['card_month'];
$card_year = $HTTP_POST_VARS['card_year'];
$card_name = $HTTP_POST_VARS['card_name'];
if ($HTTP_SESSION_VARS['cart'] && $card_type && $card_number && $card_month && $card_year && $card_name) {
    //display cart, not allowing changes and without pictures
    display_cart($HTTP_SESSION_VARS['cart'], false, 0);
    display_shipping(calculate_shipping_cost());
    if (process_card($HTTP_POST_VARS)) {
        //empty shopping cart
        session_destroy();
        echo 'Thankyou for shopping with us.  Your order has been placed.';
        display_button('index.php', 'continue-shopping', 'Continue Shopping');
    } else {
        echo 'Could not process your card. ';
        echo 'Please contact the card issuer or try again.';
        display_button('purchase.php', 'back', 'Back');
    }
} else {
    echo 'You did not fill in all the fields, please try again.<hr />';
    display_button('purchase.php', 'back', 'Back');
}
do_html_footer();
开发者ID:andersonbporto,项目名称:programacao_internet_2015_1,代码行数:30,代码来源:process.php

示例8: send


//.........这里部分代码省略.........
    $mail->SMTPAuth = true;
    // enabled SMTP authentication
    $mail->SMTPSecure = "ssl";
    // prefix for secure protocol to connect to the server
    $mail->Host = "smtp.gmail.com";
    //"";192.168.20.202    // setting GMail as our SMTP server
    $mail->Port = 465;
    //;8089                   // SMTP port to connect to GMail
    $mail->Username = "jamalbutcher@gmail.com";
    //"andre.campbell#mcalbds";  // user email address
    $mail->Password = "P4m266a-mlx";
    //"AC#220991";            // password in GMail
    // read in the text version of the newsletter
    $textfilename = APPPATH . "archive\\" . $listid . "\\" . $mailid . "\\text.txt";
    if (file_exists($textfilename)) {
        $tfp = fopen($textfilename, "r");
        $text = fread($tfp, filesize($textfilename));
        fclose($tfp);
    }
    // read in the HTML version of the newsletter
    $htmlfilename = APPPATH . "archive\\" . $listid . "\\" . $mailid . "\\index.html";
    if (file_exists($htmlfilename)) {
        $hfp = fopen($htmlfilename, "r");
        $html = fread($hfp, filesize($htmlfilename));
        fclose($hfp);
    }
    // get the list of images that relate to this message
    $query = "select path, mimetype from images where mailid = {$mailid}";
    $result = $conn->query($query);
    if (!$result) {
        echo '<p>Unable to get image list from database.</p>';
        return false;
    }
    $num = $result->num_rows;
    for ($i = 0; $i < $num; $i++) {
        //load each image from disk
        $row = $result->fetch_array();
        $imgfilename = APPPATH . "archive\\{$listid}\\{$mailid}\\" . $row[0];
        $imgtype = $row[1];
        // add each image to the object
        //$message->addHTMLImage($imgfilename, $imgtype, $imgfilename, true);
        $mail->AddEmbeddedImage($imgfilename);
        // some attached files
        //$mail->AddAttachment("images/phpmailer_mini.gif"); // as many as you want
    }
    // create message body
    //$body = $message->get();
    // create message headers
    $from = '"' . get_real_name($admin_user) . '" <' . $admin_user . '>';
    $hdrarray = array('From' => $from, 'Subject' => $subject);
    //$hdrs = $message->headers($hdrarray);
    if ($status == 'STORED') {
        $mail->isHTML(true);
        $mail->Subject = $subjectf;
        $mail->AddAddress($_POST['emailAddr'], $admin_user);
        $sent = FALSE;
        // send the HTML message to the administrator
        //$sender->send($admin_user, $hdrs, $body);
        if ($html) {
            $mail->Body = $html;
            if (!$mail->Send()) {
                echo "Error sending html version: " . $mail->ErrorInfo;
            }
        } else {
            $sent = TRUE;
        }
        if ($sent) {
            echo "Mail sent to {$admin_user} with email address " . $_POST['emailAddr'];
            // mark newsletter as tested
            $query = "update mail set status = 'TESTED' where mailid = {$mailid}";
            $result = $conn->query($query);
            echo '<p>Press send again to send mail to whole list.<center>';
            display_button('send', "&id={$mailid}");
            echo '</center></p>';
        }
        //$mail->ClearAddresses();
    } else {
        if ($status == 'TESTED') {
            $count = 0;
            $subscribers = get_subscribers($_GET['id']);
            $CI =& get_instance();
            $row = $CI->trimart->get_login_credentials($user, $password);
            // for each subscriber
            /*for($i = 0; $i < count($subscribers); $i++)
            	{
            		
            		$mail->AddAddress(subscriber[$i][0],$CI->trimart->get_real_name(subscriber[$i][0]));		
            	}*/
            $mail->AddAddress('jamalbutcher2@gmail', 'YOU');
            $mail->send();
            $query = "update mail set status = 'SENT', sent = now() \n              where mailid = {$mailid}";
            $result = $conn->query($query);
            echo "<p>A total of {$count} messages were sent.</p>";
        } else {
            if ($status == 'SENT') {
                echo '<p>This mail has already been sent.</p>';
            }
        }
    }
}
开发者ID:jamaBHacker,项目名称:TrimartEmailBlasts,代码行数:101,代码来源:mlm_fns_helper.php

示例9: display_toolbar

function display_toolbar($button, $extra_parameters = '')
{
    // draw on of our toolbars
    global $table_width;
    echo "<table width = {$table_width} cellpadding = 0 cellspacing = 0  border = 0>";
    echo '<tr>';
    echo '<td bgcolor = "#cccccc" align = center>';
    for ($i = 0; $i < 5; $i++) {
        if ($button[$i]) {
            display_button($button[$i], $extra_parameters);
        } else {
            display_spacer();
        }
    }
    echo '</td>';
    echo '</tr>';
    echo '</table>';
}
开发者ID:sjaviel,项目名称:programacao_internet_2015_2,代码行数:18,代码来源:output_fns.php

示例10: display_toolbar

function display_toolbar($buttons)
{
    foreach ($buttons as $item) {
        display_button($item);
    }
}
开发者ID:Carteor,项目名称:warmmail-php,代码行数:6,代码来源:output_fns.php

示例11: calculate_price

            $_SESSION['cart'][$isbn] = $_POST[$isbn];
        }
    }
    $_SESSION['total_price'] = calculate_price($_SESSION['cart']);
    $_SESSION['items'] = calculate_items($_SESSION['cart']);
}
do_html_header('Your shopping cart');
if (isset($_SESSION['cart']) && array_count_values($_SESSION['cart'])) {
    display_cart($_SESSION['cart']);
} else {
    echo '<p>There are no items in your cart</p>';
    echo '<hr />';
}
$target = 'index';
// if we have just added an item to the cart, continue shopping in that category
if ($new) {
    $details = get_book_details($new);
    if ($details['catid']) {
        $target = 'show_cat?catid=' . $details['catid'];
    }
}
display_button($target, 'continue-shopping', 'Continue Shopping');
// use this if SSL is set up
// $path = $_SERVER['PHP_SELF'];
// $server = $_SERVER['SERVER_NAME'];
// $path = str_replace('show_cart.php', '', $path);
// display_button('https://'.$server.$path.'checkout.php',
//                  'go-to-checkout', 'Go To Checkout');
// if no SSL use below code
display_button('checkout', 'go-to-checkout', 'Go To Checkout');
开发者ID:jamaBHacker,项目名称:cart,代码行数:30,代码来源:show_cart.php

示例12: session_start

<?php

//include our function set
include 'book_sc_fns.php';
// The shopping cart needs sessions, so start one
session_start();
do_html_header('Checkout');
if ($HTTP_SESSION_VARS['cart'] && array_count_values($HTTP_SESSION_VARS['cart'])) {
    display_cart($HTTP_SESSION_VARS['cart'], false, 0);
    display_checkout_form();
} else {
    echo '<p>There are no items in your cart</p>';
}
display_button('show_cart.php', 'continue-shopping', 'Continue Shopping');
do_html_footer();
开发者ID:andersonbporto,项目名称:programacao_internet_2015_1,代码行数:15,代码来源:checkout.php

示例13: session_start

<?php

//if(!isset($_SESSION)){
session_start();
// }
require_once "book_f.php";
if ($_SESSION['cart']) {
    display_cart($_SESSION['cart'], false, 0);
    display_checkout_form();
} else {
    echo "<p> Không có giỏ hàng </p>";
}
display_button("index.php?dk=show_cart", "continue-shopping", "Continue Shopping");
function display_checkout_form()
{
    ?>
<style>
   .tb_checkout input{width: 85%;
   border: 1px solid #330;
   padding: 5px;
   margin: 5px 0px;
   font-family:Arial, Helvetica, sans-serif;
   font-size:14px;
   color:#333;
   
   }
   .tb_checkout input:hover{
	   border: 2px solid #C30;
	   background-color:#F9C; 
	   
	   }
开发者ID:tlcn11,项目名称:MaiTranThuy,代码行数:31,代码来源:checkout.php

示例14: calculate_price

    }
    $_SESSION['total_price'] = calculate_price($_SESSION['cart']);
    $_SESSION['items'] = calculate_items($_SESSION['cart']);
}
if (isset($_POST['save'])) {
    foreach ($_SESSION['cart'] as $isbn => $qty) {
        if ($_POST[$isbn] == '0') {
            unset($_SESSION['cart'][$isbn]);
        } else {
            $_SESSION['cart'][$isbn] = $_POST[$isbn];
        }
    }
    $_SESSION['total_price'] = calculate_price($_SESSION['cart']);
    $_SESSION['items'] = calculate_items($_SESSION['cart']);
}
do_html_header("Your cart");
if ($_SESSION['cart'] && array_count_values($_SESSION['cart'])) {
    display_cart($_SESSION['cart']);
} else {
    echo "<p>Your cart is empty</p><hr />";
}
$target = "index.php";
if ($new) {
    $details = get_book_details($new);
    if ($details['catid']) {
        $target = "show_cat.php?catid=" . $details['catid'];
    }
}
display_button($target, "continue-shopping", "Continue shopping");
display_button("checkout.php", "go-to-checkout", "Checkout");
do_html_footer();
开发者ID:Carteor,项目名称:shoppingcart-php,代码行数:31,代码来源:show_cart.php

示例15: do_html_header

$month = $_POST['month'];
$year = $_POST['year'];
$name = $_POST['name'];
do_html_header('支付');
do_html_top();
if ($_POST['submit'] && $_SESSION['cart'] && $_POST['order_info_userid'] && $_POST['order_info_orderid'] && $_POST['type'] && $_POST['number'] && $_POST['secure_number'] && $_POST['month'] && $_POST['year'] && $_POST['name']) {
    display_cart($_SESSION['cart'], false, 1, 1);
    if (query_order_pay($order_info_orderid) == PAYED) {
        echo "您的订单已经支付成功,无需再次支付。您的订单号:" . $order_info_orderid;
    }
    if (query_order_pay($order_info_orderid) == UNPAYED) {
        if (process_card()) {
            change_order_status($order_info_orderid);
            $date = date("Y-m-d H:i:s");
            echo "您的订单支付成功。支付时间:" . $date . "。您的订单号:" . $order_info_orderid;
            unset($_SESSION['cart']);
            unset($_SESSION['total_price']);
            unset($_SESSION['items']);
        } else {
            echo "您的信用卡有误。";
        }
    } else {
        echo "错误2<br>";
        echo query_order_pay($order_info_orderid);
    }
} else {
    echo "支付信息请填完整";
    print_r($_POST);
    display_button('purchase.php', '支付');
}
do_html_footer();
开发者ID:jimlucn,项目名称:cart,代码行数:31,代码来源:process.php


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