Пример #1
0
             $form .= '</table></div>';
             $form .= '<div style="margin-top:10px;text-align:right;"><input type="submit" name="submit" value="Confirm" class="blue" /></div>';
             $form .= '</form>';
         }
     } else {
         $link_select = '<a href="?open=order-create-1&amp;confirm=%s">';
         foreach ($customers as $ckey => $row) {
             if ($cfield == 'name') {
                 $customers[$ckey]['name'] = str_replace($cdata, "<strong>{$cdata}</strong>", $row['name']);
             } elseif ($cfield == 'email') {
                 $customers[$ckey]['email'] = str_replace($cdata, "<strong>{$cdata}</strong>", $row['email']);
             }
             $cid = $row['id'];
             foreach ($row as $key => $r) {
                 if ($key == 'status') {
                     $customers[$ckey][$key] = customerStatus($r);
                 } else {
                     $customers[$ckey][$key] = sprintf($link_select, $cid) . $r . '</a>';
                 }
             }
         }
         $header = array();
         $header['id'] = 'ID';
         $header['email'] = 'Email';
         $header['name'] = 'Name';
         $header['status'] = 'Status';
         array_unshift($customers, $header);
         $form .= tep_draw_table('', $customers);
     }
     $form .= '<div style="clear:left;padding-top:10px;font-weight:bold;">OR <a href="?open=order-create-1&amp;search=true">Click here to search another</a></div>';
 }
Пример #2
0
    $display = $payment_method == $banktransfer_name ? '' : 'display:none;';
    $banktransfer_info .= '<div id="banktransfer_info" class="ui-widget-content ui-corner-all padding"  style="' . $display . 'margin-top:10px;">';
    $banktransfer_info .= '<h3><strong>Account Info</strong> <small>(retrieved from last order)</small></h3>';
    $banktransfer_info .= '<div><table border="0" cellpadding="0" cellspacing="0">';
    $banktransfer_info .= '<tr><td width="150">Account Owner</td><td>' . $bt_ao . '</td></tr>';
    $banktransfer_info .= '<tr><td>Account Number</td><td>' . $bt_an . '</td></tr>';
    $banktransfer_info .= '<tr><td>Bank Name</td><td>' . $bt_bn . '</td></tr>';
    $banktransfer_info .= '<tr><td>Bank Number/Code</td><td>' . $bt_bc . '</td></tr>';
    $banktransfer_info .= '</table></div>';
    $banktransfer_info .= '</div>';
}
$formtitle = 'STEP-4 &bull; Shipping and Payment Detail';
$form = '<form name="ship-pay-detail" action="?open=order-create-4" method="post">';
$form .= '<input type="hidden" name="me_action" value="CREATEORDERSHIPPINGPAYMENT" />';
$form .= '<div style="margin:10px 0 20px 0;">';
$form .= '<div><strong>' . $customer['name'] . '</strong> (' . customerStatus($customer['status']) . ') &raquo; <a href="?open=order-create-1&amp;search=true">Click here to change customer</a></div>';
$form .= '<div><strong>' . $prototal . ' Products </strong> (' . number_format($subtotal, 2) . ' EUR) &raquo; <a href="?open=order-create-2">Click here to manage products</a></div>';
$form .= '<div><strong>Shipping &amp; Billing address</strong> is confirmed &raquo; <a href="?open=order-create-3&amp;search=true">Click here to manage addresses</a></div>';
$form .= '</div>';
$comment = isset($order_create['info']['comment']) ? $order_create['info']['comment'] : '';
$form .= '<div>Comment:<br /><textarea name="comment" style="height:80px;width:355px;">' . $comment . '</textarea></div>';
$form .= '<div style="margin-top:10px;"><table class="main" border="0" cellpadding="0" cellspacing="0"><tr>';
$form .= '<td width="150"><input type="" name="shipping_text" value="' . $shipping_text . '" /></td>';
$form .= '<td><input type="" name="shipping_cost" value="' . $shipping_cost . '" class="input" /></td>';
$form .= '</tr><tr>';
$form .= '<td>Payment Method:</td>';
$form .= '<td><select id="payment_method" name="payment_method" class="input">';
foreach ($payment_options as $po) {
    $sel = $payment_method == $po ? 'selected="selected"' : '';
    $form .= '<option ' . $sel . '>' . $po . '</option>';
}
Пример #3
0
 function formSearchResult($search_key, $search_field, $search_result, $redirect_to = '')
 {
     $form = '';
     $retrieved_customers = count($search_result);
     if ($retrieved_customers == 0) {
         $form = '<form name="search-customer" action="' . $redirect_to . '" method="post">';
         $form .= '<input type="hidden" name="me_action" value="SEARCHCUSTOMER" />';
         $form .= '<div><table class="main" border="0" cellpadding="0" cellspacing="0">';
         $select_options = '<select name="search_key">';
         $select_options .= '<option value="id">Customers ID</option>';
         $select_options .= '<option value="email">Email Address</option>';
         $select_options .= '<option value="name">Customers Name</option>';
         $select_options .= '</select>';
         $form .= '<tr><td width="100">' . $select_options . '</td><td><input type="text" name="customer_search" value="" /></td></tr>';
         $form .= '</table></div>';
         $form .= '<div style="margin-top:10px;text-align:right;"><input type="submit" class="blue" name="submit" value="Search " title="Click to start searching" /></div>';
     } else {
         $form .= '<form id="search-customer" name="search-customer" action="' . $redirect_to . '" method="post">';
         $form .= '<input type="hidden" id="me_action" name="me_action" value="SEARCHCUSTOMERCONFIRM" />';
         if ($retrieved_customers == 1) {
             foreach ($search_result as $c) {
                 $form .= '<input type="hidden" name="customers_id" value="' . $c['id'] . '" />';
                 $form .= '<input type="hidden" name="customers_name" value="' . $c['name'] . '" />';
                 $form .= '<div><table class="form" border="0" cellpadding="0" cellspacing="0">';
                 $form .= '<tr><td width="150">Customers ID</td><td>' . $c['id'] . '</td></tr>';
                 $form .= '<tr><td>Email Address</td><td>' . $c['email'] . '</td></tr>';
                 $form .= '<tr><td><strong>Customers Name</strong></td><td><strong>' . $c['name'] . '</strong></td></tr>';
                 $form .= '<tr><td>Status</td><td>' . customerStatus($c['status']) . '</td></tr>';
                 $form .= '</table></div>';
                 $form .= '<div style="margin-top:10px;text-align:right;"><input type="submit" name="submit" value="Confirm" class="blue" /></div>';
             }
         } else {
             $this->multi_result = true;
             $form .= '<input type="hidden" id="customers_id" name="customers_id" />';
             $form .= '<input type="hidden" id="customers_name" name="customers_name" />';
             #$link_select = '<a href="'.$redirect_to.'">';
             foreach ($search_result as $ckey => $row) {
                 if ($search_field == 'name') {
                     $search_result[$ckey]['name'] = str_replace($cdata, "<strong>{$cdata}</strong>", $row['name']);
                 } elseif ($search_field == 'email') {
                     $search_result[$ckey]['email'] = str_replace($cdata, "<strong>{$cdata}</strong>", $row['email']);
                 }
                 $cid = $row['id'];
                 foreach ($row as $key => $r) {
                     if ($key == 'status') {
                         $search_result[$ckey][$key] = customerStatus($r);
                     }
                     #else $search_result[$ckey][$key] = sprintf($link_select, $cid).$r.'</a>';
                 }
                 $search_result[$ckey]['action'] = '<input id="' . $cid . '" class="custpick" type="button" value="Pick"/>';
             }
             $header = array();
             $header['id'] = 'ID';
             $header['email'] = 'Email';
             $header['name'] = 'Name';
             $header['status'] = 'Status';
             $header['action'] = 'Action';
             array_unshift($search_result, $header);
             $form .= tep_draw_table('', $search_result);
         }
         $form .= '<div style="clear:left;padding-top:10px;font-weight:bold;">OR <input type="button" id="btn_search_more" value="Click here to search another" /></div>';
         $form .= '</form>';
     }
     return $form;
 }