function topbar($title = "EMuver", $project = false) { ?> <nav id='topbar' class="navbar navbar-inverse"> <div class="container-fluid"> <!-- Mobile Navbar --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-nav" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <!-- Primary nav bar --> <div class="collapse navbar-collapse" id="main-nav"> <ul class="nav navbar-nav"> <li><a class="navbar-brand" href="<?php print sitepath(); ?> home"><i class="fa fa-home" alt="Home"></i></a></li> </ul > <ul class="nav navbar-nav navbar-center"> <li><h3 id='topbar-title'> <?php if ($project) { print "<a href='" . sitepath() . "view'>" . $title . "</a>"; } else { print $title; } ?> </h3></li> </ul> <form class="navbar-form navbar-right" method="post" action="<?php print sitepath(); ?> "> <button type="submit" name="logout" class="btn btn-warning">Logout</button> </form> </div> </div> </nav> <?php }
function head() { $sitepath = sitepath(); ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <!-- jQuery --> <script src="https://code.jquery.com/jquery-1.11.3.min.js" type="text/javascript"></script> <!-- jQuery UI --> <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" /> <!-- Bootstrap CSS --> <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" /> <!-- Bootstrap Theme CSS --> <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css" /> <!-- Bootstrap JS --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" type="text/javascript"></script> <!-- Font Awesome --> <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" /> <!-- Date picker --> <script type="text/javascript" src="<?php print $sitepath; ?> resources/js/bootstrap-datepicker.min.js"></script> <link rel="stylesheet" type="text/css" href="<?php print $sitepath; ?> resources/css/bootstrap-datepicker3.css" /> <!-- Main CSS --> <link rel="stylesheet" type="text/css" href="<?php print $sitepath; ?> resources/css/main.css" /> <?php }
function generateBarcode($text, $w = 9, $h = 9) { /* $barcodeobj = new TCPDFBarcode($text, 'C128'); return $barcodeobj->getBarcodeHTML(2, 30, 'black'); */ $barLoc = sitepath() . "resources/img/barcode"; $text = strtoupper(strval($text)); if (strlen($text) >= 1) { $html = "<div class=\"barcode\">\n\t\t\n\t\t\t\t\t<img src=\"{$barLoc}/!bookend.gif\" width=\"{$w}\" height=\"{$h}\" alt=\"*\"/>"; for ($i = 0; $i < strlen($text); $i++) { $char = $text[$i]; $html .= "\n\t\t\t\t\t\t<img src=\"{$barLoc}/{$char}.gif\" width=\"{$w}\" height=\"{$h}\" alt=\"{$char}\"/>\n\t\t\t"; } $html .= "\n\t\t\t\t\t<img src=\"{$barLoc}/!bookend.gif\" width=\"{$w}\" height=\"{$h}\" alt=\"*\"/>\n\t\t\t<p class=\"barcode-text\">{$text}</p>\n\t\t\n</div>"; return $html; } return null; }
$(this).addClass('pager-active'); return false; }); $('.thumbs a:first').addClass('pager-active'); }); </script> <?php } ?> <?php if (is_page()) { ?> <!-- page --> <script type="text/javascript" src="<?php sitepath('template_url'); ?> /javascripts/instafeed.min.js"></script> <script type="text/javascript"> var userFeed = new Instafeed({ get: 'user', userId: 352047082, //ユーザーIDを指定 accessToken: '352047082.3188d85.83e7c2f58db341eba3c0a9e09386884a', //アクセストークンを指定 template: '<li><a href="{{link}}" target="_blank"><img src="{{image}}" alt="{{caption}}"></a></li>', resolution: 'thumbnail', sortBy: 'random', }); userFeed.run(); </script> <?php }
function IMuTmpImageURL() { return sitepath() . "tmpimgs/"; }
public function sitepath($conn, $cid) { if ($cid) { $sql = "select cid, classname, parentclass from `class` where `cid`='" . $cid . "' limit 1"; if (!($result = $conn->query($sql))) { return ERROR::err(305, 'SQL语句错误!'); } $class = $result->fetch_assoc(); foreach (explode('|', $class['parentclass']) as $value) { if ($value) { $arr = explode(',', $value); $url = "category.php?cid={$arr[0]}"; sitepath($arr[1], $url); } } $url = "category.php?cid={$class['cid']}"; sitepath($class['classname'], $url); return $class; } }
<?php require_once '../config.php'; require_once filepath() . "app/project.php"; require_once filepath() . "app/auth.php"; if (checkAuth()) { } else { redirect(sitepath()); } if (!isset($_SESSION['project'])) { //Return to home redirect(sitepath() . "home/"); } $info = getProjectInfo(); ?> <!DOCTYPE html> <html> <head> <?php head(); ?> <script type="text/javascript" src="search.js"></script> </head> <body> <?php topbar($info['title'], true); ?> <div class='padded'> <ul id="tabs" class="nav nav-tabs" data-tabs="tabs"> <li class="active"><a href="#single" data-toggle="tab">Single Object</a></li> <li ><a href="#holder" data-toggle="tab">Holder</a></li>
define('DIR_IMAGES_THUMBNAILS', PROJECT_ROOT . 'public/uploads/Thumbs/'); /** Ordner in dem die groesseren Bilder abgelegt werden */ define('DIR_IMAGES_BIG', PROJECT_ROOT . 'public/uploads/Big/'); /** * Include config.inc.php * * *Description* Benutzer Konfigurationsdatei laden */ if (file_exists(CONFIG)) { include CONFIG; } else { //Fehler $message = 'File: ' . CONFIG . ' not found '; include_once FUNCTIONS_PATH . 'errorMessage.php'; $html = errorMessage($message); exit($html); } /** * Start Autoloader * * *Description* Alle Funktionen aus Ordner laden */ include CLASSES_PATH . 'autoloader.php'; /** * Define Sitepath * * *Description* Kann ggf. entfern werden. Achtung wird noch im System verwendet!!! * Konstante vorher im Script entfernen oder erstetzen... */ define('SITEPATH', sitepath());
require_once "../config.php"; require_once "projects.php"; require_once filepath() . "app/auth.php"; if (isset($_POST['login'])) { if (authorize($_POST['email'])) { } else { redirect(sitepath()); } } else { if (isset($_POST["register"])) { createAccount($_POST['email'], $_POST['name']); } else { if (checkAuth()) { } else { redirect(sitepath()); } } } if (isset($_POST["projectToDelete"])) { deleteProject($_POST["projectToDelete"]); } ?> <html> <head> <?php head(); ?> <script type="text/javascript" src="project.js"></script> </head>
<?php if (isset($info["sdurl"])) { ?> <a target='_blank' href="<?php print $info["sdurl"]; ?> ">ServiceDesk Project</a> <?php } else { ?> <!-- <button id='btnSD' class="btn btn-success">Create ServiceDesk Ticket</button> --> <?php } ?> <form action='<?php print sitepath(); ?> add'> <button id='btnAdd' type="submit" class="btn btn-info">Add Objects</button> </form> </div> </div> <div id='objects'> <table class="table table-striped"> <thead> <tr> <th>Image</th> <th>Acc. No.</th> <th>Title</th> <th>Delete</th> </tr>
public function sitepath($db, $cid) { if ($cid) { $sql = "select cid, classname, parentclass from `class` where `cid`='" . $cid . "'"; $result = $db->_query($sql); $class = $result->fetch(); foreach (explode('|', $class['parentclass']) as $value) { if ($value) { $arr = explode(',', $value); $url = "category.php?cid={$arr[0]}"; sitepath($arr[1], $url); } } $url = "category.php?cid={$class['cid']}"; sitepath($class['classname'], $url); return $class; } }