Example #1
0
    setcookie("currentview", "year");
    DisplayMenu($year, $month, $day, "year");
    DisplayYear($year, $currentcal);
} elseif ($action == "month") {
    setcookie("currentview", "month");
    DisplayMenu($year, $month, $day, "month");
    DisplayMonth($year, $month, $holidays, $currentcal);
} elseif ($action == "day") {
    setcookie("currentview", "day");
    DisplayMenu($year, $month, $day, "day");
    DisplayDay($year, $month, $day, $holidays, $currentcal);
} elseif ($action == "manage") {
    DisplayManagementMenu();
} elseif ($action == "" || $action == "week") {
    setcookie("currentview", "week");
    DisplayMenu($year, $month, $day, "week");
    DisplayWeek($year, $month, $day, $holidays, $currentcal);
}
/* ----------------------------------------------- */
/* --------- DisplayMenu ------------------------- */
/* ----------------------------------------------- */
function DisplayMenu($year, $month, $day, $menuitem)
{
    global $currentcal;
    global $currentcalname;
    $caldate = mktime(0, 0, 0, $month, $day, $year);
    ?>
		<style>
			.menuitem { color: blue; text-align: center; padding-left: 5px; padding-right: 5px }
			.menuitemhighlight { text-align: center; padding: 5px; background-color: lightyellow; border: 1pt solid orange; border-radius: 3px }
			.title { color: darkblue; font-size: 16pt; font-weight: bold }
Example #2
0
        DisplayAllImportReceived();
        break;
    case 'viewtransactions':
        DisplayMenu();
        DisplayTransactions();
        break;
    case 'viewsingletransaction':
        DisplayMenu();
        DisplaySingleTransaction($transactionid);
        break;
    case 'viewuploadblocks':
        DisplayMenu();
        DisplayUploadBlocks($transactionid);
        break;
    default:
        DisplayMenu();
        //DisplayAllImportLog($orderby,$groupby);
}
/* ------------------------------------ functions ------------------------------------ */
/* -------------------------------------------- */
/* ------- DisplayMenu ------------------------ */
/* -------------------------------------------- */
function DisplayMenu()
{
    $urllist['Administration'] = "importlog.php";
    $urllist['Import Log'] = "importlog.php";
    NavigationBar("Admin", $urllist);
    ?>
		View import <a href="importlog.php?action=viewtransactions">transactions</a><br>
		<!--View <a href="importlog.php?action=viewreceived">received</a><br>
		View <a href="importlog.php?action=viewimported">imported</a><br>-->
function add_header($title)
{
    global $keywords;
    global $description;
    ?>
<html lang="en">
       <head>
           <meta  charset="utf-8"/>
           <meta name ="keywords"  content="<?php 
    echo $keywords;
    ?>
"/>
           <meta name ="description"  content="<?php 
    echo $description;
    ?>
"/>
           <meta name="author" content="Emmanuel Alcime">
           <meta name="viewport" content="width=device-width, initial-scale=1.0">
           <link rel="apple-touch-icon" sizes="57x57" href="http://time-box.tk/icons/apple-icon-57x57.png">
          <link rel="apple-touch-icon" sizes="60x60" href="http://time-box.tk/icons/apple-icon-60x60.png">
          <link rel="apple-touch-icon" sizes="72x72" href="http://time-box.tk/icons/apple-icon-72x72.png">
          <link rel="apple-touch-icon" sizes="76x76" href="http://time-box.tk/icons/apple-icon-76x76.png">
          <link rel="apple-touch-icon" sizes="114x114" href="http://time-box.tk/icons/apple-icon-114x114.png">
          <link rel="apple-touch-icon" sizes="120x120" href="http://time-box.tk/icons/apple-icon-120x120.png">
          <link rel="apple-touch-icon" sizes="144x144" href="http://time-box.tk/icons/apple-icon-144x144.png">
          <link rel="apple-touch-icon" sizes="152x152" href="http://time-box.tk/icons/apple-icon-152x152.png">
          <link rel="apple-touch-icon" sizes="180x180" href="http://time-box.tk/icons/apple-icon-180x180.png">
          <link rel="icon" type="image/png" sizes="192x192"  href="http://time-box.tk/icons/android-icon-192x192.png">
          <link rel="icon" type="image/png" sizes="32x32" href="http://time-box.tk/icons/favicon-32x32.png">
          <link rel="icon" type="image/png" sizes="96x96" href="http://time-box.tk/icons/favicon-96x96.png">
          <link rel="icon" type="image/png" sizes="16x16" href="http://time-box.tk/icons/favicon-16x16.png">
          <link rel="manifest" href="/manifest.json">
          <meta name="msapplication-TileColor" content="#ffffff">
          <meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
          <meta name="theme-color" content="#ffffff">

           <title><?php 
    echo $title;
    ?>
</title>
           <link type="text/css" rel="stylesheet" href="styles/site.css" media="all" />
           <link type="text/css" rel="stylesheet" href="styles/bootstrap-theme.min.css" media="all" />
           <link type="text/css" rel="stylesheet" href="styles/bootstrap.css" media="all" />
           <link type="text/css" rel="stylesheet" href="styles/leaflet.css" />
           <noscript>
           	<?php 
    echo "<div>";
    echo "This site requires Javascript enable to work";
    echo "</div>";
    ?>
           </noscript>
           <script language="JavaScript" type="text/javascript" src="scripts/jquery-1.11.3.js"></script>
           <script type="text/javascript" src="scripts/bootstrap.min.js"></script>
           <script type="text/javascript" src="scripts/effects.js"></script>  
            <script type="text/javascript" src="scripts/functions.js"></script> 
        
               
       </head>
           <body>
           	     <nav class="navbar navbar-default">
           	     <div class="wrapper">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" 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 class="wrapper">
      <a class="navbar-brand " id="logo" href="http://www.time-box.tk/">Time-Box </a>
    </div>
    <?php 
    if (isset($_SESSION['valid_user'])) {
        ?>
    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
      <?php 
        $buttons = array('Home' => 'http://www.time-box.tk/index.php', 'TodoList' => 'http://www.time-box.tk/todo_lists/');
        function DisplayMenu($buttons)
        {
            //calculate button size
            $width = 100 / count($buttons);
            while (list($name, $url) = each($buttons)) {
                DisplayButton($width, $name, $url, !IsURLCurrentPage($url));
            }
        }
        DisplayMenu($buttons);
        ?>
      </ul>
      
      <ul class="nav navbar-nav navbar-right">
        <li><a href="http://localhost/ajax_loader/profile?user=">Profile</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Settings <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="#">Change Password</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="#">Messages</a></li>
          </ul>
        </li>
        <?php 
        $not_root = "/";
        $url = "logout.php";
        if (!strpos($_SERVER['HTTP_USER_AGENT'], $not_root)) {
            ?>
       
              <li><a href="http://www.time-box.tk/logout.php">Logout</a></li>
          <?php 
        } else {
            ?>
               <li><a href="<?php 
            echo $url;
            ?>
">Logout</a></li>
               
          <?php 
        }
        ?>
     
          </ul>

        <?php 
    } else {
        ?>
                
      <?php 
    }
    ?>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
  </div>
</nav>

<?php 
    return $title;
}