} ?> <table width="735" border="0" cellspacing="0" cellpadding="0"> <form method="POST" onsubmit="return loaisp_insert(nhomsp.value,ten.value);" id="form" name="form"> <tr> <td colspan="2" class="tieude" align="center">THÊM LOẠI SẢN PHẨM</td> </tr> <tr bgcolor="#FFFFFF"> <td width="250" style="padding-left:80px" height="30">Nhóm sản phẩm:</td> <td width="485"> <select name="nhomsp" style="width:240px;"> <option value="chonmenu">Chọn nhóm sản phẩm...</option> <?php include "connect.php"; print_option("select id_nhom,tennhom from nhomsanpham"); ?> </select> </td> </tr> <tr bgcolor="#FFFFFF"> <td width="250" style="padding-left:80px" height="30">Tên loại sản phẩm:</td> <td width="485"> <input type="text" name="ten" style="width:240px" value="<?php echo "{$ten}"; ?> " /> </td> </tr> <tr> <td align="center" colspan="2" height="35">
.sc-cycle #cycle-prev, .sc-cycle #cycle-next, .nivo-header .nivo-controlNav a.active, .cycle-content-navs a.activeSlide, #ascrail2000 > div, .nivo-header .nivo-controlNav a:hover, .cycle-content-navs a:hover, .nivo-header .nivo-controlNav a:hover, .cycle-content-navs a:hover {<?php print_option("background-color:", load_option("ui_bgcolor"), " !important;"); print_option("color:", load_option("ui_color"), " !important;"); ?> } /* CUSTOM BUTTON */ .sc_button.custom {<?php print_option("background:", load_option("ui_bgcolor"), " !important;"); print_option("color:", load_option("ui_color"), " !important;"); ?> } [class*="icon-"], p.contact_widget + span, ol#filters li.active a, h1 strong, h2 strong, h3 strong h4 strong, h5 strong, h6 strong { <?php print_option("color:", load_option("ui_bgcolor"), " !important;"); ?> } <?php do_action("sevenleague_after_customstyle"); ?> <?php if (load_option("responsive") == "on") { ?>
?> <tr bgcolor="#FFFFFF"> <td width="200" style="padding-left:80px" height="30">Loại sản phẩm:</td> <td width="535"> <?php $n = $_GET["n"]; if (!isset($n)) { echo "\n\t\t\t<div id=loaisanpham>\n\t\t\t<select name=\"loaisp\" style=\"width:240px;\" id='loaisp'>\n\t\t\t\t<option value=\"chonlsp\">-- Chọn loại sản phẩm --</option>\t"; print_option("select id_loai,tenloaisp from loaisanpham order by id_nhom ASC"); echo "</select></div>"; } else { $n = $_GET["n"]; switch ($n) { case menu: echo "<select name=\"menu\" style=\"width:240px;\">\n\t\t\t\t\t\t\t<option value=\"chonmenu\">---------------- Chọn ----------------</option>"; print_option("select id_menu,tenmenu from menu"); echo "</select>"; break; } } ?> </td> </tr> <tr> <td style="padding-left:80px" height="30">Tên sản phẩm:</td> <td><input type="text" name="tensp" style="width:240px" value="<?php echo "{$tensp}"; ?> "></td> </tr> <tr bgcolor="#FFFFFF">
function print_order_editor() { global $wpdb; global $saasta_products; $admin_url = get_bloginfo('template_directory') . '/shop-admin.php'; $id = $_GET['edit_id']; if ($id) { $edit_url = $admin_url . "?edit_id={$id}"; print "<h2>Saasta Order Editor - editing order #{$id}</h2>\n"; check_edit_post_params($id); $o = query_order($id); ?> <table> <tr><td id="oe">First name</td><td id="oe"><?php echo $o->first_name; ?> </td></tr> <tr><td id="oe">Order placed</td><td id="oe"><?php echo $o->timestamp; ?> </td></tr> <tr><td id="oe">Last name</td><td id="oe"><?php echo $o->last_name; ?> </td></tr> <tr><td id="oe">Address</td><td id="oe"><pre><?php echo $o->address; ?> </pre></td></tr> </table> <br/> <h3>Ordered products</h3> <table> <tr><th>Product</th><th>Quantity</th></tr> <?php $ordered_prods = $wpdb->get_results("SELECT product_id,qty FROM saasta_orders_products WHERE order_id = {$id}"); foreach ($ordered_prods as $p) { $prod_name = $saasta_products[$p->product_id]['name']; print "<tr><td id=\"oe\">{$prod_name}</td><td id=\"oe\">{$p->qty}</td></tr>\n"; } ?> </table> <p>Total price: <strong><?php echo $o->price; ?> </strong> EUR</p> <br /> <table> <tr><td id="ord_status">Order status now:</td><td><?php echo $o->order_state; ?> </td></tr> <tr><td id="ord_status">Change to:</td> <form action="<?php echo $edit_url; ?> " method="post"> <td> <select name="order_state"> <?php print_option($o->order_state, "inbox"); ?> <?php print_option($o->order_state, "confirmed"); ?> <?php print_option($o->order_state, "paid"); ?> <?php print_option($o->order_state, "shipped"); ?> </select> </td> <td> <input name="submit" type="submit" value="Save"/> </td> </form> </tr> </table> <?php } else { die("WTF"); } }