fMessaging::create('affected', fURL::get(), $c->getId()); fMessaging::create('success', fURL::get(), 'The consumable ' . $c->getName() . ' was successfully updated.'); fURL::redirect(fURL::get()); } } catch (fNotFoundException $e) { fMessaging::create('error', fURL::get(), 'The consumable requested, ID ' . $id . ', could not be found.'); fURL::redirect(fURL::get()); } catch (fExpectedException $e) { fMessaging::create('error', fURL::get(), $e->getMessage()); } // Get manufacturers also for drop-down box #$manufacturers = fRecordSet::build('Manufacturer', NULL, array('name' => 'asc')); // Get list of models $models = Model::getSimple($db); // Get types if (feature('consumable_types')) { $types = Tag::get_by_type('consumable_type'); } include 'views/consumables/addedit.php'; } /** * Delete a consumable */ if ($action == 'delete') { // Get ID $id = fRequest::get('id', 'integer'); try { $c = new Consumable($id); if (fRequest::isPost()) { $c->delete(); fMessaging::create('success', fURL::get(), 'The consumable ' . $c->getName() . ' was successfully deleted.');
<input type="hidden" name="consumable_id" value="<?php echo $c->id; ?> "> <input type="hidden" name="redirect" value="<?php echo $redirect; ?> "> <label for="qty"><strong>How many in this delivery?</strong></label><br> <input type="number" value="1" name="qty" autocomplete="off" size="3" style="width: 90px" autofocus> <br><br> <?php if (feature('costs')) { ?> <label for="qty"><strong>Unit cost?</strong></label><br> <input type="text" value="<?php echo $c->cost; ?> " name="cost" autocomplete="off" style="width: 90px"> <br><br> <?php } ?> <input type="submit" class="btn btn_pos" value="Update"> </form>
print htmlspecialchars($title); ?> </h2> <p><?php print htmlspecialchars($description); ?> </p> <p class="link"><a href="<?php print site_url('feature/' . $name); ?> ">More ...</a></p> </div> <?php } foreach ($features as $feature) { feature($feature); } ?> </div> <div id="floatblock" class="shareblock"> <p title="和<?php print htmlspecialchars($title); ?> 一起推薦 Firefox!">分享</p> <ul> <li><a class="newwindow" title="分享到 Facebook" href="https://www.facebook.com/sharer.php?u=<?php /* Facebook fetches sticker image and description from <head> */ print urlencode(site_url($name)); ?> "><span class="sprite facebook"></span>Facebook</a></li> <li><a class="newwindow" title="噗到 Plurk" href="http://plurk.com/?status=<?php
?> </h2> <p><?php print htmlspecialchars($description); ?> </p> <p class="link"><a href="<?php print site_url('feature/' . $name); ?> ">More ...</a></p> </div> <?php } for ($i = 0; $i < 3; $i++) { if (isset($features[$i])) { feature($features[$i]); } else { ?> <div class="feature box"> <h2> </h2> <p> </p> <p class="link"><a href="#">More ...</a></p> </div> <?php } } ?> </div> <div id="middleblock"> <div id="userinfo"> <h2>關於<span class="title-placeholder">{您的名字}</span></h2>
<?php function feature($actual_value, $required_value) { return ['OK' => $actual_value === $required_value, 'Value' => $actual_value, 'Required Value' => $required_value]; } print json_encode(['hhvm.jit' => feature((bool) ini_get('hhvm.jit'), true), 'hhvm.jit_pseudomain' => feature((bool) ini_get('hhvm.jit_pseudomain'), true), 'libpcre has JIT' => feature((bool) ini_get('hhvm.pcre.jit'), true), 'HHVM build type' => feature(ini_get('hhvm.build_type'), 'Release')], JSON_PRETTY_PRINT) . "\n";
echo '<td>' . $date . '</td>'; if (feature('costs') || feature('chargeback')) { echo '<td class="consumable_cost_col right">'; if (feature('chargeback')) { echo $e->chargeback == 1 ? '<img src="web/img/money.png" width="16" height="16" alt="Chargeback" class="chargeback_img" />' : ' '; } echo $e->cost ? '<span class="consumable_cost_value">' . config_item('currency') . $e->cost . '</span>' : ''; echo '</td>'; } echo '</tr>'; } ?> </tbody> <?php if (feature('costs') && $total_cost > 0) { ?> <tfoot> <tr class="report-total"> <td colspan="5" class="right"><strong>Total:</strong></td> <td class="right"><?php echo config_item('currency') . number_format($total_cost, 2); ?> </td> </tr> </tfoot> <?php } ?> </table>
printf($colour, '0066B3'); } if ($c->col_y) { printf($colour, 'FFCC00'); } if ($c->col_m) { printf($colour, 'CC0099'); } if ($c->col_k) { printf($colour, '000'); } echo '</td>'; echo '<td class="name">' . $c->name . '</td>'; if (feature('costs') || feature('chargeback')) { echo '<td class="consumable_cost_col right">'; if (feature('chargeback')) { echo $c->chargeback == 1 ? '<img src="web/img/money.png" width="16" height="16" alt="Chargeback" class="chargeback_img" />' : ' '; } echo $c->cost ? '<span class="consumable_cost_value">' . config_item('currency') . $c->cost . '</span>' : ''; echo '</td>'; } $qtycol = Consumable::getQtyStatus($c->qty); $qtyinfo = '<span style="background:#%s;padding:3px 6px;-webkit-border-radius:4px;font-weight:bold;color:#000;">%d</span>'; //echo '<td>' . sprintf($qtyinfo, $qtycol, $c->qty) . '</td>'; echo '<td width="20"><span class="js-consumable-qty">' . $c->qty . '</span></td>'; $bar = '<td width="120"><div class="progress-container"><div style="width: %d%%; background: #%s;"></div></div></td>'; printf($bar, $c->qty_percent, $qtycol); echo '<td>' . $c->model . '</td>'; echo '<td>' . $c->printer_count . '</td>'; echo '<td>'; unset($actions);
<?php session_start(); require '../controller/define.php'; require '../controller/adminControl.php'; if (!isset($_SESSION['admin'])) { header('Location: ' . SERVER . '/404'); } else { $feature = feature(); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="description" content="Neon Admin Panel" /> <meta name="author" content="" /> <?php require_once '../includes/head.php'; ?> <link rel="stylesheet" href="assets/js/jquery-ui/css/no-theme/jquery-ui-1.10.3.custom.min.css"> <link rel="stylesheet" href="assets/css/font-icons/entypo/css/entypo.css"> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic"> <link rel="stylesheet" href="assets/css/bootstrap.css"> <link rel="stylesheet" href="assets/css/neon-core.css">
<?php /* * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ require_once 'config_check_base.php'; $opcache_loaded = function_exists('opcache_get_status'); $opcache_enabled = $opcache_loaded && is_array(opcache_get_status()) && opcache_get_status()['opcache_enabled']; print json_encode(array('PHP_VERSION' => PHP_VERSION, 'PHP_VERSION_ID' => PHP_VERSION_ID, 'opcache loaded' => feature($opcache_loaded, true), 'opcache enabled' => feature($opcache_enabled, true)), JSON_PRETTY_PRINT);