/** * Returns classic grid element for a given product * * @param object $post Product post object * @param string $archive_template * @return string */ function get_grid_archive_theme($post, $archive_template = null) { $archive_template = isset($archive_template) ? $archive_template : get_product_listing_template(); $return = ''; if ($archive_template == 'grid') { $image_id = get_post_thumbnail_id($post->ID); $thumbnail_product = wp_get_attachment_image_src($image_id, 'classic-grid-listing'); $product_name = get_product_name(); if ($thumbnail_product) { $img_class['alt'] = $product_name; $img_class['class'] = 'classic-grid-image'; $image = wp_get_attachment_image($image_id, 'classic-grid-listing', false, $img_class); } else { $url = default_product_thumbnail_url(); $image = '<img src="' . $url . '" class="classic-grid-image" alt="' . $product_name . '" >'; } $archive_price = apply_filters('archive_price_filter', '', $post); $classic_grid_settings = get_classic_grid_settings(); $row_class = get_row_class($classic_grid_settings); $return = '<div class="archive-listing product-' . $post->ID . ' classic-grid ' . $row_class . ' ' . product_class($post->ID) . '">'; $return .= '<a href="' . get_permalink() . '">'; //$return .= '<div style="background-image:url(\'' . $url . '\');" class="classic-grid-element"></div>'; $return .= '<div class="classic-grid-image-wrapper"><div class="pseudo"></div><div class="image">' . $image . '</div></div>'; $return .= '<h3 class="product-name">' . $product_name . '</h3>' . $archive_price . '</a></div>'; } return $return; }
function check_firmware_version() { global $g; $post = "platform=" . rawurlencode($g['fullplatform']) . "&version=" . rawurlencode(get_product_version()); $rfd = @fsockopen("www." . get_product_url(), 80, $errno, $errstr, 3); if ($rfd) { $hdr = "POST /checkversion.php HTTP/1.0\r\n"; $hdr .= "Content-Type: application/x-www-form-urlencoded\r\n"; $hdr .= "User-Agent: " . get_product_name() . "-webGUI/1.0\r\n"; $hdr .= "Host: " . get_product_url() . "\r\n"; $hdr .= "Content-Length: " . strlen($post) . "\r\n\r\n"; fwrite($rfd, $hdr); fwrite($rfd, $post); $inhdr = true; $resp = ""; while (!feof($rfd)) { $line = fgets($rfd); if ($inhdr) { if (trim($line) === "") { $inhdr = false; } } else { $resp .= $line; } } fclose($rfd); return $resp; } return null; }
public function ydf_excel($date = NULL) { header("Content-Type: text/html; charset=gb2312"); if ($date == NULL) { $date = date('Y-m-d'); } $orders = $this->get_ydf_order($date); $head = array('Sales Record Number', 'Buyer Fullname', 'Buyer Company', 'Buyer Address 1', 'Buyer Address 2', 'Buyer City', 'Buyer State', 'Buyer Zip', 'Buyer Phone Number', 'Buyer Country', 'Custom Label', 'Description EN', 'Description CN', 'HS Code', 'Quantity', 'Sale Price', 'Country of Manufacture', 'Mark', 'weight', 'Length', 'Width', 'Height', 'Shipping Service', 'Shipping Service Name', 'Track Number'); foreach ($orders as $order) { $skus = explode(',', $order->sku_str); $qties = explode(',', $order->qty_str); $shipping_method = shipping_method($order->is_register); //echo $order->id."<br>"; $count = count($skus); $product_name = ''; $product_name_en = ''; $qty = 0; $weight = 0; $rmb = price($this->order_model->calc_currency($order->currency, $order->gross)); for ($i = 0; $i < $count; $i++) { if ($i == 0) { $product_name .= iconv("UTF-8", "GB2312//IGNORE", get_product_name($skus[$i])); $product_name_en .= iconv("UTF-8", "GB2312//IGNORE", get_product_name_en($skus[$i])); } $qty += $qties[$i]; $weight += get_weight_by_sku($skus[$i]) * $skus[$i]; } $shipping_method_name_cn = iconv("UTF-8", "GB2312//IGNORE", $shipping_method->name_cn); $data[] = array($order->id, $order->name, " ", $order->address_line_1, $order->address_line_2, $order->town_city, $order->state_province, $order->zip_code, $order->contact_phone_number, $order->country, $skus[0], $product_name_en, $product_name, " ", $qty, $rmb, " ", " ", $weight, " ", " ", " ", $shipping_method->ydf_code, $shipping_method_name_cn, $order->track_number); } $this->excel->array_to_excel($data, $head, 'ydf_list_' . $date); }
function say_hello() { output_api_header(); echo "<response>\n"; echo " <status>0</status>\n"; echo " <message>OK</message>\n"; echo " <product>" . get_product_name() . "</product>\n"; echo " <version>" . get_product_version() . "</version>\n"; echo "</response>\n"; exit; }
function get_list_archive_theme($post, $archive_template = null) { $archive_template = isset($archive_template) ? $archive_template : get_product_listing_template(); $return = ''; if ($archive_template == 'list') { $thumbnail_product = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'classic-list-listing'); if ($thumbnail_product) { $url = $thumbnail_product[0]; } else { $url = default_product_thumbnail_url(); } $product_name = get_product_name(); $return = '<div class="archive-listing product-' . $post->ID . ' list ' . product_class($post->ID) . '">'; $return .= '<a href="' . get_permalink() . '"><span class="div-link"></span></a>'; $return .= '<div class="classic-list-image-wrapper"><div class="pseudo"></div><img src="' . $url . '" class="classic-list-image" alt="' . $product_name . '" ></div>'; $return .= '<div class="product-name">' . $product_name . '</div>'; $return .= '<div class="product-short-descr"><p>' . c_list_desc($post->ID) . '</p></div></div>'; } return $return; }
</tr> <?php } else { ?> <tr> <td class="list" colspan="3" height="10"></td> </tr> <?php } ?> </table> <div id="submit"> <input name="Submit" type="submit" class="formbtn" value="<?php echo gettext("Save"); ?> " /> </div> <div id="remarks"> <?php html_remark("warning", gettext("Warning"), sprintf(gettext("After you click "Save", you must reboot %s to make the changes take effect. You may also have to do one or more of the following steps before you can access your NAS again: <ul><li><span class='vexpl'>change the IP address of your computer</span></li><li><span class='vexpl'>access the webGUI with the new IP address</span></li></ul>"), get_product_name())); ?> </div> <?php include "formend.inc"; ?> </form> </td> </tr> </table> <?php include "fend.inc";
.sty1{ width:20px; height:20px; border:1px solid #000000; font-size:20px; font-weight:bold; float:right;} </style> </head> <body> TEXT; $i = 0; foreach ($orders as $order) { foreach ($order as $order) { $i++; $sku_arr = explode(',', $order->sku_str); $ship_confirm_date = date('Y-m-d', strtotime($order->ship_confirm_date)); $ship_weight = "{$order->ship_weight}" / 1000 . 'Kg'; $shipping_cost = '¥' . "{$order->shipping_cost}"; $product_names = ''; foreach ($sku_arr as $sku) { $product_names .= get_product_name($sku) . '(' . get_product_name_en($sku) . ')' . br(); } if ($i != 1) { $page = <<<TEXT <div style="margin-left:auto; margin-right:auto; width : 210mm; height:303mm; clear:both; page-break-before: always;"> TEXT; } else { $page = <<<TEXT <div style="margin-left:auto; margin-right:auto; width : 210mm; height:303mm; clear:both;"> TEXT; } $html .= <<<TEXT {$page} \t<table width="100%" style="height:35mm;" border="0" cellspacing="0" cellpadding="0"> <tr> <td style=" width:105mm;font-size:12px;">
<?php echo gettext("Daemon events"); ?> <br /> </td> </tr> </table> <div id="submit"> <input name="Submit" type="submit" class="formbtn" value="<?php echo gettext("Save"); ?> " onclick="enable_change(true)" /> </div> <div id="remarks"> <?php html_remark("note", gettext("Note"), sprintf(gettext("Syslog sends UDP datagrams to port 514 on the specified remote syslog server. Be sure to set syslogd on the remote server to accept syslog messages from %s."), get_product_name())); ?> </div> <?php include "formend.inc"; ?> </form> </td> </tr> </table> <script type="text/javascript"> <!-- enable_change(false); //--> </script> <?php
$hr = ""; //Set horizontal line $bs = ""; //Set bold start $be = ""; //Set bold end $cs = "Error or code:"; //Set code end $ce = ""; //Set code end // Get system and hardware informations $cpuinfo = system_get_cpu_info(); $meminfo = system_get_ram_info(); $hwinfo = trim(exec("/sbin/sysctl -a | /usr/bin/awk -F:\\ '/controller|interface/ &&! /AT|VGA|Key|inet|floppy/{!u[\$2]++}END{for(i in u) a=a OFS i;print a}'")); mwexec2("sysctl -n dev.acpi.0.%desc", $mbinfo); $sys_summary = sprintf("%s %s (revision %s) %s; %s %s %sMiB RAM", get_product_name(), get_product_version(), get_product_revision(), get_platform_type(), $mbinfo[0], $cpuinfo['model'], round($meminfo['real'] / 1024 / 1024)); ?> <form action="<?php echo $_SERVER['SCRIPT_NAME']; ?> " method="post" enctype="multipart/form-data" name="iform"> <table> <tr> <td class="label" align="right"><?php echo gettext("Info"); ?> </td> <td class="text" align="left"><?php echo $sys_summary; ?> </td>
} } } } } $item_sku_html .= '<div style="margin: 5px;">'; $config = array('name' => 'item_id_' . $order->id . '_' . $i, 'id' => 'item_id_' . $order->id . '_' . $i, 'value' => !empty($order->invoice_number) ? $order->invoice_number : element($i, $item_ids), 'maxlength' => '20', 'size' => '10', 'readonly' => TRUE); $item_sku_html .= '<a target="_blank" href="' . $ebay_url . element($i, $item_ids) . '">' . wrap_color('Item ID', 'red', in_array($skus[$i], $waiting_skus)) . '</a>: ' . form_input($config); $config = array('name' => 'sku_' . $order->id . '_' . $i, 'id' => 'sku_' . $order->id . '_' . $i, 'value' => isset($skus[$i]) ? $skus[$i] : '', 'maxlength' => '20', 'size' => '8'); $item_sku_html .= wrap_color(' SKU: ', 'red', in_array($skus[$i], $waiting_skus)) . form_input($config); $config = array('name' => 'qty_' . $order->id . '_' . $i, 'id' => 'qty_' . $order->id . '_' . $i, 'value' => isset($qties[$i]) ? $qties[$i] : '', 'maxlength' => '8', 'size' => '6'); if (isset($skus[$i])) { if (!$this->product_model->fetch_product_id(strtoupper($skus[$i]))) { $product_name .= wrap_color($skus[$i], 'blue', !$this->product_model->fetch_product_id(strtoupper($skus[$i]))) . ': ' . get_product_name($skus[$i]) . '<br/>'; } else { $product_name .= $skus[$i] . ': ' . get_product_name($skus[$i]) . '<br/>'; } } if (strlen(element($i, $item_ids)) == 12) { $salesrecordnumber = 'SRN:' . get_salesrecordnumber($order->transaction_id, element($i, $item_ids), $skus[$i]); } else { $salesrecordnumber = ''; } $item_sku_html .= ' Qty: ' . form_input($config) . $salesrecordnumber . "<img width=120 height=120 src='" . $img_url . "'> {$delete_span} "; if ($i == $count - 1) { $item_sku_html .= $this->block->generate_add_icon_only("add_item('{$base_url}', {$order->id});"); } $item_sku_html .= '</div>'; } $item_sku_html .= '</div>'; $shipping_type = lang('shipping_way') . ': ';
$row[] = $readable_time['days'] . lang('day') . $readable_time['hours'] . lang('hour'); $item_info = <<<ITEM <div style='padding: 10px;'> {$order->item_no}<br/> </div> ITEM; $row[] = $item_info; $skus = explode(',', $order->sku_str); $qties = explode(',', $order->qty_str); $count = count($skus); $item_sku_html = ''; for ($i = 0; $i < $count; $i++) { if (isset($product_names[$skus[$i]])) { $product_name = $product_names[$skus[$i]]; } else { $product_name = get_product_name($skus[$i]); $product_names[$skus[$i]] = $product_name; } $item_sku_html .= '<div style="margin: 5px;">'; $item_sku_html .= $skus[$i] . '【' . $product_name . '】'; $item_sku_html .= ' Qty: ' . $qties[$i]; $item_sku_html .= '</div>'; } $item_sku_html .= '</div>'; $product_info = <<<PRODUCT <div style='padding: 10px;'> {$item_sku_html}<br/> </div> PRODUCT; $row[] = $product_info; $name = lang('receiver');
function approved_resending_orders() { $CI =& get_instance(); $CI->load->model('order_model'); $login_name = get_current_login_name(); $type = array('not_received_approved_resending', 'received_approved_resending'); $orders = $CI->order_model->fetch_default_orders($login_name, $type); $url = site_url('order/regular_order/view_order'); $head = array(lang('item_information'), lang('product_information'), lang('gathering_transaction_remark'), lang('shipping_info'), lang('order_status'), lang('import_date') . anchor($url, lang('add_more'), array('style' => 'float:right;'))); $data = array(); $ebay_url = 'http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item='; $statuses = fetch_statuses('order_status'); $purchasers = array(); foreach ($orders as $order) { $row = array(); $gross = empty($order->gross) ? $order->net : $order->gross; $rmb = price($CI->order_model->calc_currency($order->currency, $gross)); $lang_name = lang('name_en'); $lang_address = lang('address_en'); $lang_town_city = lang('town_city_en'); $lang_state_province = lang('state_province_en'); $lang_countries = lang('country_en'); $lang_zip_code = lang('postal_code_en'); $name = $order->name . (empty($order->buyer_id) ? '' : "({$order->buyer_id})"); $phone = ''; if (!empty($order->contact_phone_number)) { $phone = lang('phone') . ':'; $phone .= $order->contact_phone_number; } $item_info = <<<ITEM <div style='padding: 10px;'> {$order->item_no}<br/> {$lang_name} : {$name} <br/> {$lang_address} : {$order->address_line_1} {$order->address_line_2}<br/> {$lang_town_city} :{$order->town_city}<br/> {$lang_state_province} : {$order->state_province}<br/> {$lang_countries} :{$order->country}<br/> {$lang_zip_code} : {$order->zip_code}<br/> {$phone} </div> ITEM; $row[] = $item_info; $item_ids = explode(',', $order->item_id_str); $skus = explode(',', $order->sku_str); $qties = explode(',', $order->qty_str); $count = count($skus); $item_sku_html = ''; $product_name = ''; $item_sku_html .= "<div id='item_div_{$order->id}'>"; for ($i = 0; $i < $count; $i++) { $item_id = element($i, $item_ids); if (strlen($item_id) == 12) { $link = '<a target="_blank" href="' . $ebay_url . $item_id . '">' . $item_id . '</a>'; } else { $link = $item_id; } $item_sku_html .= '<div style="margin-top: 5px;">'; if ($item_id) { $item_sku_html .= "Item ID: {$link}<br/>"; } $purchaser_name = ''; if (isset($purchasers[$skus[$i]])) { $purchaser_name = $purchasers[$skus[$i]]; } else { $purchaser_name = get_purchaser_name_by_sku($skus[$i]); $purchasers[$skus[$i]] = $purchaser_name; } $item_sku_html .= ' SKU: ' . (isset($skus[$i]) ? $skus[$i] . ' * ' . element($i, $qties) . ' (' . get_product_name($skus[$i]) . ')' : '') . ' ' . $purchaser_name . '<br/>'; $item_sku_html .= '</div>'; } $item_sku_html .= '</div>'; $shipping_type = lang('shipping_way') . ': '; $shipping_type .= $order->is_register; $item_title_str = str_replace(',', '<br/>', $order->item_title_str); $product_info = <<<PRODUCT <div style='padding: 10px;'> {$item_title_str}<br/> {$item_sku_html} </div> PRODUCT; $status_name = $CI->order_model->fetch_status_name('order_status', $order->order_status); $order_status_arr = array('not_received_apply_for_partial_refund', 'not_received_apply_for_full_refund', 'received_apply_for_partial_refund', 'received_apply_for_full_refund', 'not_received_apply_for_resending', 'received_apply_for_resending'); if (isset($power) && $power >= 2 && in_array($status_name, $order_status_arr)) { $anchor = anchor(site_url('order/special_order/view_return_order', array($order->item_no, 'auditing')), lang('pending') . '>>'); } $make_pi_html = ''; if (true) { $anchor = anchor(site_url('order/special_order/view_return_order', array($order->item_no)), lang('make_pi') . '>>'); $make_pi_html = form_label($anchor); $make_pi_html .= '<br/>'; } $status_nrar = $CI->order_model->fetch_status_id('order_status', 'not_received_approved_resending'); $status_rar = $CI->order_model->fetch_status_id('order_status', 'received_approved_resending'); if ($order->order_status == $status_nrar || $order->order_status == $status_rar) { $anchor = anchor(site_url('order/special_order/again', array($order->item_no)), lang('again') . '>>'); } $row[] = $product_info; $lang_remark = lang('remark'); $other_info = <<<OTHER {$order->currency}: {$gross}, RMB : {$rmb}<br/><br/> {$order->transaction_id} <br/><br/> {$order->track_number} OTHER; $row[] = $other_info; $lang_confirm_date = lang('ship_confirm_date'); $lang_weight = lang('weight') . '(g)'; $lang_confirm_user = lang('ship_confirm_user'); $lang_ship_remark = lang('ship_remark'); $lang_receive_date = lang('receive_date'); $lang_sys_remark = lang('sys_remark'); $ship_info = <<<SHIP {$lang_confirm_date} : {$order->ship_confirm_date} <br/> {$lang_weight} : {$order->ship_weight} <br/> {$lang_confirm_user} : {$order->ship_confirm_user} <br/> {$lang_ship_remark} : {$order->ship_remark} <br/> | {$order->descript} <br/> {$lang_receive_date} : {$order->order_receive_date} <br/> <abbr title="{$order->sys_remark}">{$lang_sys_remark}</abbr> SHIP; $row[] = $ship_info; $row[] = lang(element($order->order_status, $statuses)) . '<br/><br/>'; $row[] = $order->input_date; $data[] = $row; } // echo 'hello'; die(); return array($head, $data); }
public function download_order_info() { $head = array(lang('item_number'), lang('ship_remark'), lang('customer_remark'), lang('is_register'), lang('track_number'), lang('total_weight'), lang('shipping_cost'), lang('total_cost'), lang('total_profit_rate'), lang('product_information'), lang('ship_confirm_date'), lang('receipt'), lang('transaction_number'), lang('input_user'), lang('cost_date')); if (!$this->input->is_post()) { return; } $order_ids_str = trim($this->input->post('order_ids_str'), ','); if (empty($order_ids_str)) { $content = lang('select_one_download'); echo "<script >alert('{$content}'); history.back();</script>"; return; } $order_ids = array(); foreach (explode(',', $order_ids_str) as $id) { $order_ids[] = $id; } $orders = $this->accounting_cost_model->fetch_costs_by_cost_user_to_array($order_ids); $show_data = array(); foreach ($orders as $order) { $receipt = $order->currency . ' : ' . $order->net && $order->net != 0 ? $order->net : $order->gross; $item_ids = explode(',', $order->item_id_str); $skus = explode(',', $order->sku_str); $qties = explode(',', $order->qty_str); $item_title = explode(',', $order->item_title_str); $product_cost_string = explode(',', $order->product_cost); $count = count($skus); $product_information = ''; $product_name = ''; $total_product_cost = 0; for ($i = 0; $i < $count; $i++) { $item_id = element($i, $item_ids); $title = element($i, $item_title); $product_information .= $title . ' '; if ($item_id) { $product_information .= "Item ID: {$item_id} "; } $purchaser_name = ''; if (isset($purchasers[$skus[$i]])) { $purchaser_name = $purchasers[$skus[$i]]; } else { $purchaser_name = get_purchaser_name_by_sku($skus[$i]); $purchasers[$skus[$i]] = $purchaser_name; } $product_cost = get_cost_by_sku($skus[$i]); if ($product_cost == 0) { $product_cost = ''; } $price_html = $product_cost; if (element($i, $product_cost_string)) { $cost = $product_cost_string[$i]; } else { $cost = $product_cost; } // if(isset ($action) && $action =='cost_view_list') // { $price_html = $cost; // } $total_product_cost += $cost * element($i, $qties); $product_information .= ' SKU: ' . (isset($skus[$i]) ? $skus[$i] . ' * ' . element($i, $qties) . ' (' . get_product_name($skus[$i]) . ')' : '') . ' ' . $purchaser_name . ' ' . lang('cost_price') . ' : ' . $price_html; } $default = isset($product_cost_string[$count]) ? $product_cost_string[$count] : '0.65'; $product_information .= ' ' . lang('other_cost_price') . ' : ' . $default; $top = $order->product_cost_all == 0 ? $total_product_cost : $order->product_cost_all; $product_information .= ' ' . lang('total_cost') . ' : ' . $top; $show_data[] = array('item_number' => $order->item_no, 'ship_remark' => $order->ship_remark, 'customer_remark' => $order->descript, 'is_register' => $order->is_register, 'track_number' => $order->track_number, 'total_weight' => $order->ship_weight, 'shipping_cost' => $order->shipping_cost, 'total_cost' => $top, 'total_profit_rate' => $order->profit_rate, 'product_information' => $product_information, 'ship_confirm_date' => $order->ship_confirm_date, 'receipt' => $receipt . "({$order->currency})", 'transaction_number' => $order->transaction_id, 'input_user' => $order->input_user, 'cost_date' => $order->cost_date); } $this->excel->array_to_excel($show_data, $head, 'Order_info_' . date('Y-m-d')); }
echo system_get_language_code(); ?> " lang="<?php echo system_get_language_code(); ?> "> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo system_get_language_codeset(); ?> " /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <link href="gui.css" rel="stylesheet" type="text/css" /> <title><?php echo get_product_name(); ?> </title> <style type="text/css"> html,body { height: 100%; width: 100%; } </style> </head> <body onload='document.iform.username.focus();'> <div id="loginpage"> <table height="100%" width="100%" cellspacing="0" cellpadding="0" border="0"> <tbody> <tr>
<input name="Submit" type="submit" class="formbtn" value="<?php echo isset($uuid) && FALSE !== $cnid ? gettext("Save") : gettext("Add"); ?> " onclick="enable_change(true)" /> <input name="Cancel" type="submit" class="formbtn" value="<?php echo gettext("Cancel"); ?> " /> <input name="uuid" type="hidden" value="<?php echo $pconfig['uuid']; ?> " /> </div> <div id="remarks"> <?php html_remark("warning", gettext("Warning"), sprintf(gettext("You can't mount the partition '%s' where the config file is stored.<br />"), htmlspecialchars($cfdevice)) . sprintf(gettext("UFS and variants are the NATIVE file format for FreeBSD (the underlying OS of %s). Attempting to use other file formats such as FAT, FAT32, EXT2, EXT3, or NTFS can result in unpredictable results, file corruption, and loss of data!"), get_product_name())); ?> </div> <?php include "formend.inc"; ?> </form> </td> </tr> </table> <script type="text/javascript"> <!-- type_change(); <?php if (isset($uuid) && FALSE !== $cnid) { ?>
function get_latest_file($rss) { global $g; $product = get_product_name(); $platform = $g['fullplatform']; $version = get_product_version(); $revision = get_product_revision(); if (preg_match("/^(.*?)(\\d+)\$/", $revision, $m)) { $revision = $m[2]; } $ext = "img"; $ext2 = "xz"; $resp = ""; $xml = @simplexml_load_file($rss); if (empty($xml)) { return $resp; } if (empty($xml->channel)) { return $resp; } foreach ($xml->channel->item as $item) { $link = $item->link; $title = $item->title; $pubdate = $item->pubDate; $parts = pathinfo($title); // convert to local time $date = preg_replace('/UT$/', 'GMT', $pubdate); $time = strtotime($date); if ($time === FALSE) { // convert error $date = $pubdate; } else { $date = date("D, d M Y H:i:s T", $time); } if (empty($parts['extension'])) { continue; } if (strcasecmp($parts['extension'], $ext) != 0 && strcasecmp($parts['extension'], $ext2) != 0) { continue; } $filename = $parts['filename']; $fullname = $parts['filename'] . "." . $parts['extension']; if (preg_match("/^{$product}-{$platform}-(.*?)\\.(\\d+)(\\.img)?\$/", $filename, $m)) { $filever = $m[1]; $filerev = $m[2]; if ($version < $filever || $version == $filever && $revision < $filerev) { $resp .= sprintf("<a href=\"%s\" title=\"%s\" target=\"_blank\">%s</a> (%s)", htmlspecialchars($link), htmlspecialchars($title), htmlspecialchars($fullname), htmlspecialchars($date)); } else { $resp .= sprintf("%s (%s)", htmlspecialchars($fullname), htmlspecialchars($date)); } break; } } return $resp; }
if ($max > 0) { for ($i = 0; $i < $max; $i++) { $pid = $_SESSION['cart'][$i]['productid']; $q = $_SESSION['cart'][$i]['qty']; ?> <tr> <td class="image"> <img src="images/<?php echo get_imgname($pid); ?> " alt="" title="" width="30" height="30" /> </td> <td class="name"> <?php echo get_product_name($pid); ?> </td> <td class="quantity">x <?php echo $q; ?> </td> <td class="total">$<?php echo $q * get_price($pid); ?> </td> <td class="remove"> <a href="javascript:del(<?php echo $pid; ?> )">remove</a>
<h1 align="center">Your Shopping Cart</h1> <input type="button" value="Continue Shopping" onclick="window.location='products.php'" /> </div> <div style="color:#F00"><?php echo $msg; ?> </div> <table border="0" cellpadding="5px" cellspacing="1px" style="font-family:Verdana, Geneva, sans-serif; font-size:11px; background-color:#E1E1E1" width="100%"> <?php if (is_array($_SESSION['cart'])) { echo '<tr bgcolor="#FFFFFF" style="font-weight:bold"><td>Serial</td><td>Name</td><td>Price</td><td>Qty</td><td>Amount</td><td>Options</td></tr>'; $max = count($_SESSION['cart']); for ($i = 0; $i < $max; $i++) { $pid = $_SESSION['cart'][$i]['productid']; $q = $_SESSION['cart'][$i]['qty']; $pname = get_product_name($pid); if ($q == 0) { continue; } ?> <tr bgcolor="#FFFFFF"><td><?php echo $i + 1; ?> </td><td><?php echo $pname; ?> </td> <td>$ <?php echo get_price($pid); ?> </td>
/** * Shows product name * * @param type $atts * @return string */ function ic_product_name($atts) { $args = shortcode_atts(array('product' => get_the_ID()), $atts); return get_product_name($args['product']); }
function get_latest_file($rss) { global $g; $product = get_product_name(); $platform = $g['fullplatform']; $version = get_product_version(); $revision = get_product_revision(); if (preg_match("/^(.*?)(\\d+)\$/", $revision, $m)) { $revision = $m[2]; } $ext = "img"; $resp = ""; $xml = @simplexml_load_file($rss); if (empty($xml)) { return $resp; } foreach ($xml->channel->item as $item) { $link = $item->link; $title = $item->title; $date = $item->pubDate; $parts = pathinfo($title); if (empty($parts['extension']) || strcasecmp($parts['extension'], $ext) != 0) { continue; } $filename = $parts['filename']; $fullname = $parts['filename'] . "." . $parts['extension']; if (preg_match("/^{$product}-{$platform}-(.*?)-(.*?)-r(\\d+)\$/", $filename, $m)) { $filever = $m[1]; $filerev = $m[3]; if ($version < $filever || $version == $filever && $revision < $filerev) { $resp .= sprintf("<a href=\"%s\" title=\"%s\" target=\"_blank\">%s</a> (%s)", htmlspecialchars($link), htmlspecialchars($title), htmlspecialchars($fullname), htmlspecialchars($date)); } else { $resp .= sprintf("%s (%s)", htmlspecialchars($fullname), htmlspecialchars($date)); } break; } } return $resp; }
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ require "auth.inc"; require "guiconfig.inc"; require_once "XML/Serializer.php"; require_once "XML/Unserializer.php"; $pgtitle = array(gettext("Network"), gettext("Firewall")); $pconfig['enable'] = isset($config['system']['firewall']['enable']); if ($_POST['export']) { $options = array(XML_SERIALIZER_OPTION_XML_DECL_ENABLED => true, XML_SERIALIZER_OPTION_INDENT => "\t", XML_SERIALIZER_OPTION_LINEBREAKS => "\n", XML_SERIALIZER_OPTION_XML_ENCODING => "UTF-8", XML_SERIALIZER_OPTION_ROOT_NAME => get_product_name(), XML_SERIALIZER_OPTION_ROOT_ATTRIBS => array("version" => get_product_version(), "revision" => get_product_revision()), XML_SERIALIZER_OPTION_DEFAULT_TAG => "rule", XML_SERIALIZER_OPTION_MODE => XML_SERIALIZER_MODE_DEFAULT, XML_SERIALIZER_OPTION_IGNORE_FALSE => true, XML_SERIALIZER_OPTION_CONDENSE_BOOLS => true); $serializer =& new XML_Serializer($options); $status = $serializer->serialize($config['system']['firewall']['rule']); if (PEAR::isError($status)) { $errormsg = $status->getMessage(); } else { $ts = date("YmdHis"); $fn = "firewall-{$config['system']['hostname']}.{$config['system']['domain']}-{$ts}.rules"; $data = $serializer->getSerializedData(); $fs = strlen($data); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename={$fn}"); header("Content-Length: {$fs}"); header("Pragma: hack"); echo $data; exit;
html_textarea("privatekey", gettext("Private key"), $pconfig['privatekey'], gettext("Paste an private key in PEM format here."), true, 65, 7, false, false); ?> <?php html_languagecombobox("language", gettext("Language"), $pconfig['language'], gettext("Select the language of the WebGUI."), "", false); ?> <?php html_separator(); ?> <tr> <td colspan="2" valign="top" class="listtopic"><?php echo gettext("Hostname"); ?> </td> </tr> <?php html_inputbox("hostname", gettext("Hostname"), $pconfig['hostname'], sprintf(gettext("Name of the NAS host, without domain part e.g. %s."), "<em>" . strtolower(get_product_name()) . "</em>"), true, 40); ?> <?php html_inputbox("domain", gettext("Domain"), $pconfig['domain'], sprintf(gettext("e.g. %s"), "<em>com, local</em>"), false, 40); ?> <?php html_separator(); ?> <?php html_titleline(gettext("DNS settings")); ?> <tr> <td width="22%" valign="top" class="vncell"><?php echo gettext("IPv4 DNS servers"); ?> </td>
" onclick="return confirm('<?php echo gettext("Do you really want to format this disk? All data will be lost!"); ?> ')" /> </div> <?php if (count($disks) > 0) { foreach ($disks as $key => $disk) { if ($do_format[$key]) { echo sprintf("<div id='cmdoutput'>%s</div>", sprintf(gettext("Command output") . " for disk %s :", $disk)); echo '<pre class="cmdoutput">'; disks_format($disk, $type, $notinitmbr, $minspace, $_volumelabels[$key], $aft4k); echo '</pre><br/>'; } } } ?> <div id="remarks"> <?php html_remark("Warning", gettext("Warning"), sprintf(gettext("UFS and ZFS are the NATIVE filesystems of FreeBSD (the underlying OS of %s). Attempting to use other filesystems such as FAT, FAT32, EXT2, EXT3, EXT4 or NTFS can result in unpredictable results, file corruption, and loss of data!"), get_product_name())); ?> </div> </td> </tr> </table> <?php include "formend.inc"; ?> </form> <?php include "fend.inc";
function create_print_label_content($order) { $CI =& get_instance(); $chinese_name = $CI->mixture_model->get_country_name_in_chinese(strtoupper($order->country)); $skus = explode(',', $order->sku_str); $qties = explode(',', $order->qty_str); $count = count($skus); $item_sku_html = ''; for ($i = 0; $i < $count; $i++) { $item_sku_html .= '【' . $skus[$i] . ' ' . get_shelf_code($skus[$i]) . '】x ' . '<strong>' . $qties[$i] . '</strong>' . ' ' . get_product_name($skus[$i]) . '|'; } $item_sku_html = trim($item_sku_html, '|'); if (!empty($order->descript)) { $item_sku_html .= ' (' . $order->descript . ')'; } $phone = ''; if (!empty($order->contact_phone_number)) { $phone = "<br/>Phone:{$order->contact_phone_number}"; } $html = <<<HTML {$order->name} {$order->address_line_1} {$order->address_line_2} City:{$order->town_city} State:{$order->state_province} Country:{$order->country}[{$chinese_name}] Post:{$order->zip_code} {$phone} {$order->item_no} {$item_sku_html} HTML; return $html; }
$item_sku_html .= $title . '<br/>'; if ($item_id) { $item_sku_html .= "Item ID: {$link}<br/>"; } $purchaser_name = ''; if (isset($purchasers[$skus[$i]])) { $purchaser_name = $purchasers[$skus[$i]]; } else { $purchaser_name = get_purchaser_name_by_sku($skus[$i]); $purchasers[$skus[$i]] = $purchaser_name; } $cost = get_cost_by_sku($skus[$i]); if ($cost == 0) { $cost = ''; } $item_sku_html .= ' SKU: ' . (isset($skus[$i]) ? $skus[$i] . ' * ' . element($i, $qties) . ' (' . get_product_name($skus[$i]) . ')' : '') . ' ' . $purchaser_name . '<br>'; $item_sku_html .= '</div>'; } $item_sku_html .= '</div>'; $shipping_type = lang('shipping_way') . ': '; $shipping_type .= $order->is_register; $product_info = <<<PRODUCT <div style='padding: 10px;'> {$item_sku_html} </div> PRODUCT; $item_id_arr = explode(',', $order->item_id_str); $item_id_html = ''; foreach ($item_id_arr as $value) { $item_id_html .= '<a target="_blank" href="' . $ebay_url . $value . '">' . $value . '</a><br/><br/>'; }
" <?php if ($vals[$j] == $pconfig['timesrv']) { echo "selected=\"selected\""; } ?> > <?php echo htmlspecialchars($types[$j]); ?> </option> <?php } ?> </select> <br /><?php echo sprintf(gettext("%s advertises itself as a time server to Windows clients."), get_product_name()); ?> </td> </tr> <tr id="winssrv_tr"> <td width="22%" valign="top" class="vncell"><?php echo gettext("WINS server"); ?> </td> <td width="78%" class="vtable"> <input name="winssrv" type="text" class="formfld" id="winssrv" size="30" value="<?php echo htmlspecialchars($pconfig['winssrv']); ?> " /> <br /><?php echo gettext("WINS server IP address (e.g. from MS Active Directory server).");
html_checkbox("disableconsolemenu", gettext("Console menu"), $pconfig['disableconsolemenu'] ? true : false, gettext("Disable console menu"), gettext("Changes to this option will take effect after a reboot.")); ?> <?php html_checkbox("enableserialconsole", gettext("Serial Console"), $pconfig['enableserialconsole'] ? true : false, gettext("Enable serial console"), sprintf("<span class='red'><strong>%s</strong></span><br />%s", gettext("The COM port in BIOS has to be enabled before enabling this option."), gettext("Changes to this option will take effect after a reboot."))); ?> <?php html_checkbox("sysconsaver", gettext("Console screensaver"), $pconfig['sysconsaver'] ? true : false, gettext("Enable console screensaver"), "", false, "sysconsaver_change()"); ?> <?php html_inputbox("sysconsaverblanktime", gettext("Blank time"), $pconfig['sysconsaverblanktime'], gettext("Turn the monitor to standby after N seconds."), true, 5); ?> <?php if ("full" !== $g['platform']) { ?> <?php html_checkbox("disablefirmwarecheck", gettext("Firmware version check"), $pconfig['disablefirmwarecheck'] ? true : false, gettext("Disable firmware version check"), sprintf(gettext("This will cause %s not to check for newer firmware versions when the <a href='%s'>%s</a> page is viewed."), get_product_name(), "system_firmware.php", gettext("System") . ": " . gettext("Firmware"))); ?> <?php } ?> <?php html_checkbox("disablebeep", gettext("System Beep"), $pconfig['disablebeep'] ? true : false, gettext("Disable speaker beep on startup and shutdown")); ?> <?php html_checkbox("tune_enable", gettext("Tuning"), $pconfig['tune_enable'] ? true : false, gettext("Enable tuning of some kernel variables")); ?> <?php html_checkbox("powerd", gettext("Power Daemon"), $pconfig['powerd'] ? true : false, gettext("Enable the system power control utility"), gettext("The powerd utility monitors the system state and sets various power control options accordingly.")); ?> <?php html_checkbox("zeroconf", gettext("Zeroconf/Bonjour"), $pconfig['zeroconf'] ? true : false, gettext("Enable Zeroconf/Bonjour to advertise services of this device"));
<th>Name</th> <th>Price</th> <th>Quantity</th> <th>Amount</th> <th>Option</th> </tr> </thead> <tbody> <?php if (is_array($_SESSION['cart'])) { $max = count($_SESSION['cart']); for ($i = 0; $i < $max; $i++) { $product_id = $_SESSION['cart'][$i]['product_id']; $quantity = $_SESSION['cart'][$i]['quantity']; $product_name = get_product_name($product_id); if ($quantity == 0) { continue; } ?> <tr> <td><?php echo $i + 1; ?> </td> <td><?php echo $product_name; ?> </td> <td><?php
$readable_time = secs_to_readable($order->delay_times); $row[] = $readable_time['days'] . lang('day') . $readable_time['hours'] . lang('hour'); $rmb = price($this->order_model->calc_currency($order->currency, $order->gross)); $item_info = <<<ITEM <div style='padding: 10px;'> {$order->item_no}<br/> </div> ITEM; $row[] = $item_info; $skus = explode(',', $order->sku_str); $qties = explode(',', $order->qty_str); $count = count($skus); $item_sku_html = ''; for ($i = 0; $i < $count; $i++) { $item_sku_html .= '<div style="margin: 5px;">'; $item_sku_html .= $skus[$i] . '【' . get_product_name($skus[$i]) . '】'; $item_sku_html .= ' Qty: ' . $qties[$i]; $item_sku_html .= '</div>'; } $item_sku_html .= '</div>'; $product_info = <<<PRODUCT <div style='padding: 10px;'> {$item_sku_html}<br/> </div> PRODUCT; $row[] = $product_info; $name = lang('receiver'); $town_city = lang('town_city'); $state_province = lang('state_province'); $country = lang('country'); $zip_code = lang('zip_code');
$data = array('have_to_wait_for_the_result' => lang('have_to_wait_for_the_result'), 'determined_through_a' => lang('determined_through_a'), 'sure_is_lost' => lang('sure_is_lost'), 'obtain_compensation' => lang('obtain_compensation')); $collection = to_js_array($data); $head = array(array('text' => lang('select')), array('text' => lang('order_check_date'), 'sort_key' => 'submit_date ', 'id' => 'sale_orders_check'), array('text' => lang('not_the_time'), 'sort_key' => 'delay_times'), array('text' => lang('old_order_address_info'), 'sort_key' => 'item_no'), array('text' => lang('old_order_list_or_gross'), 'sort_key' => 'gross'), lang('detail'), array('text' => lang('order_check_state'), 'sort_key' => 'state'), array('text' => lang('find_a_note'), 'sort_key' => 'submit_remark'), array('text' => lang('feedback_remarks'), 'sort_key' => 'answer_remark')); $data = array(); $shipping_order_url = site_url('order/order_check/verify_shipping_order_check'); //echo '<pre>'; //var_dump($shipping_orders);die; foreach ($shipping_orders as $shipping_order) { $item_html = '<div style="margin: 5px;">'; $item_html .= lang('item_number') . ' : ' . $shipping_order->item_no . '<br>'; $item_html .= lang('item_id') . ' : ' . $shipping_order->item_id_str . '<br>'; $skus = explode(',', $shipping_order->sku_str); $qtys = explode(',', $shipping_order->qty_str); $skus_count = count($skus); for ($i = 0; $i < $skus_count; $i++) { $item_html .= 'SKU : ' . $skus[$i] . ' ' . ' * ' . $qtys[$i] . ' (' . get_product_name($skus[$i]) . ')' . '<br>'; } $item_html .= lang('address_line_1') . ' : ' . $shipping_order->address_line_1 . '<br>'; $item_html .= lang('address_line_2') . ' : ' . $shipping_order->address_line_2 . '<br>'; $item_html .= lang('weight') . ' : ' . $shipping_order->ship_weight . '<br>'; $item_html .= lang('track_number') . ' : ' . $shipping_order->track_number . '<br>'; $item_html .= '</div>'; $detal_html = '<div style="margin: 5px;">'; $detal_html .= lang('customer_name') . ' : ' . $shipping_order->name . '<br>'; $detal_html .= lang('zip_code') . ' : ' . $shipping_order->zip_code . '<br>'; $detal_html .= lang('telephone') . ' : ' . $shipping_order->contact_phone_number . '<br>'; $detal_html .= lang('shipping_time') . ' : ' . $shipping_order->ship_confirm_date . '<br>'; $detal_html .= '</div>'; $delay_time = secs_to_readable($shipping_order->delay_times); $which_table = $this->order_check_model->check_exists('order_list', array('id' => $shipping_order->id, 'transaction_id' => $shipping_order->transaction_id)); // $table_order_id = ($which_table > 0) ? 'o_l_' . $shipping_order->id : 'o_l_c_' . $shipping_order->id;