Пример #1
0
<?php

include "includes/notifications/storekeeper.php";
get_main_menu("storekeeper", $notification_store_keeper);
mysql_select_db($database_birus_conn, $birus_conn);
$query_get_site_req_item = "\r\n\t   SELECT unit_of_measure.name as unit_name,\r\n       site_req_item.qty_required,\r\n       site_req_item.qty_issued,\r\n       site_req_item.id,\r\n       site_req_item.item_id,\r\n       site_req_item.site_req_id,\r\n       site_req_item.unit_of_measure_id,\r\n       site_req_item.deleted_by,\r\n       site_req_item.delete_date,\r\n       site_req_item.created_by,\r\n       site_req_item.created_date,\r\n       site_req_item.record_status,\r\n       item.name as item_name\r\n  FROM    (   birus.site_req_item site_req_item\r\n           INNER JOIN\r\n              birus.item item\r\n           ON (site_req_item.item_id = item.id))\r\n       INNER JOIN\r\n          birus.unit_of_measure unit_of_measure\r\n       ON (site_req_item.unit_of_measure_id = unit_of_measure.id)\r\n\t  Where site_req_item.site_req_id='" . $_REQUEST['site_req_id'] . "'";
$get_site_req_item = mysql_query($query_get_site_req_item, $birus_conn) or die(mysql_error());
$row_get_site_req_item = mysql_fetch_assoc($get_site_req_item);
$totalRows_get_site_req_item = mysql_num_rows($get_site_req_item);
include "includes/table_settings.php";
?>
 
<div><a href=".?site_req_view"><img src="images/back-button.png" width="30" height="30" title="Back" /></a></div>
              <table cellpadding="0" cellspacing="0" border="0" id="dataTable">
                <thead>
                  <tr>
                    <th>Id</th>
                    <th>Item</th>
                    <th>Unit</th>
                    <th>Qty Required</th>
                    <th>Qty Issued</th>
                    <th></th>
                  </tr>
                </thead>
                <tbody>
                  <!--Loop start, you could use a repeat region here-->
  <?php 
do {
    ?>
    <!--Loop start, you could use a repeat region here-->
    <tr>
<?php

include "includes/notifications/headofconstruction.php";
get_main_menu("headofconstruction", $notification);
mysql_select_db($database_birus_conn, $birus_conn);
$query_get_purchase_req = "SELECT person.first_name,  person.last_name,        person.id,   purchase_req.id  ,   purchase_req.req_no,        purchase_req.created_date   FROM    (   birus.user user            INNER JOIN               birus.person person            ON (user.person_id = person.id))        INNER JOIN           birus.purchase_req purchase_req        ON (purchase_req.created_by = user.id)\r\nwhere purchase_req.approved_by!='NULL'\r\nAND purchase_req.approved='approved'\r\n";
$get_purchase_req = mysql_query($query_get_purchase_req, $birus_conn) or die(mysql_error());
$row_get_purchase_req = mysql_fetch_assoc($get_purchase_req);
$totalRows_get_purchase_req = mysql_num_rows($get_purchase_req);
include "includes/table_settings.php";
?>
<div><a href="."><img src="images/back-button.png" width="30" height="30" title="Back" /></a></div> 
              <table cellpadding="0" cellspacing="0" border="0" id="dataTable">
                <thead>
                  <tr>
                    <th>Id</th>
                    <th>Req No</th>
                    <th>Created By</th>
                    <th>Created Date</th>
                    <th></th>
                  </tr>
                </thead>
                <tbody>
                  <!--Loop start, you could use a repeat region here-->
  <?php 
do {
    ?>
    <!--Loop start, you could use a repeat region here-->
    <tr>
      <td><?php 
    echo $row_get_purchase_req['id'];
Пример #3
0
<?php

get_main_menu("admin");
?>

   <br/>
   <div style="width:90%; margin-left:auto; margin-right:auto;">
    <div class="form_title">

            <?php 
echo $_REQUEST["action"];
?>
 Activity<?php 
echo $row_get_branch_by_id['name'];
?>
    </div>
    <div class="box"> 
<?php 
$colname_activity_by_id = "-1";
if (isset($_GET['id'])) {
    $colname_activity_by_id = $_GET['id'];
}
mysql_select_db($database_birus_conn, $birus_conn);
$query_activity_by_id = sprintf("SELECT * FROM activity WHERE id = %s", GetSQLValueString($colname_activity_by_id, "int"));
$activity_by_id = mysql_query($query_activity_by_id, $birus_conn) or die(mysql_error());
$row_activity_by_id = mysql_fetch_assoc($activity_by_id);
$totalRows_activity_by_id = mysql_num_rows($activity_by_id);
if (isset($_POST["MM_insert"]) && $_POST["MM_insert"] == "activity_form" && isset($_REQUEST["save"])) {
    $insertSQL = sprintf("INSERT INTO `activity` (name, created_by, created_date, record_status) VALUES (%s, %s, %s, %s)", GetSQLValueString($_POST['name'], "text"), GetSQLValueString($loggedin_id, "int"), GetSQLValueString(date("y-m-d"), "date"), GetSQLValueString($_POST['record_status'], "text"));
    mysql_select_db($database_birus_conn, $birus_conn);
    $Result1 = mysql_query($insertSQL, $birus_conn) or die(mysql_error());
<?php

get_main_menu($_REQUEST["menu_type"]);
mysql_select_db($database_birus_conn, $birus_conn);
$query_site_store = "SELECT site_item_issue.qty_issued,\r\n       site_req_item.qty_recieved,\r\n       site_store.created_by,\r\n       site_store.balance,\r\n       site_store.id,\r\n\t   site_item_returns.qty_returned,\r\n       site_store.created_date,\r\n       item.name as item_name,\r\n       site.name as site_name\r\n  FROM    (   (   (   (   birus.site_store site_store\r\n                       INNER JOIN\r\n                          birus.item item\r\n                       ON (site_store.item_id = item.id))\r\n                   LEFT OUTER JOIN\r\n                      birus.site_item_issue site_item_issue\r\n                   ON (site_store.site_item_issue_id = site_item_issue.id))\r\n               LEFT OUTER JOIN\r\n                  birus.site_req_item site_req_item\r\n               ON (site_store.site_req_item_id = site_req_item.id))\r\n           LEFT OUTER JOIN\r\n              birus.site_item_returns site_item_returns\r\n           ON (site_store.site_item_return_id = site_item_returns.id))\r\n       INNER JOIN\r\n          birus.site site\r\n       ON (site_store.site_id = site.id)\r\n\t   where site_store.site_id='" . $_SESSION["site_id"] . "' \r\n\t   AND site_store.item_id='" . $_REQUEST["item_id"] . "'\r\n\t   AND site_store.record_status='active'\r\n\t   ";
$site_store = mysql_query($query_site_store, $birus_conn) or die(mysql_error());
$row_site_store = mysql_fetch_assoc($site_store);
$totalRows_site_store = mysql_num_rows($site_store);
include "includes/table_settings.php";
?>
<div><a href="?menu_type=<?php 
echo $_REQUEST['menu_type'];
?>
&site_store_view"><img src="images/back-button.png" width="30" height="30" title="Back" /></a></div> 
<div class="module_title"><?php 
echo ucfirst($_REQUEST['item_name']);
?>
 Store Detail For  <?php 
echo ucfirst($row_site_store['site_name']);
?>
 </div>
              <table cellpadding="0" cellspacing="0" border="0" id="dataTable">
                <thead>
                  <tr>
                    <th>Id</th>
                    <th>Date</th>
                    <th>In From Main Store</th>
                    <th>Returns From Site</th>
                    <th>Out</th>
                    <th>Balance</th>
                  </tr>
Пример #5
0
<?php

include "includes/notifications/headofconstruction.php";
get_main_menu($_REQUEST['menu_type'], $notification);
mysql_select_db($database_birus_conn, $birus_conn);
$query_get_pr_item = "\r\nSELECT unit_of_measure.name as unit_name,pr_item.id as pr_id,\r\n       item.name as item_name,\r\n       pr_item.qty_required,\r\n\t   pr_item.qty_recieved,\r\n       pr_item.amount\r\n  FROM    (   birus.pr_item pr_item\r\n           INNER JOIN\r\n              birus.item item\r\n           ON (pr_item.item_id = item.id))\r\n       INNER JOIN\r\n          birus.unit_of_measure unit_of_measure\r\n       ON (pr_item.unit_of_measure_id = unit_of_measure.id)\r\nWhere pr_item.pr_id='" . $_REQUEST['purchase_req_id'] . "'\r\n";
$get_pr_item = mysql_query($query_get_pr_item, $birus_conn) or die(mysql_error());
$row_get_pr_item = mysql_fetch_assoc($get_pr_item);
$totalRows_get_pr_item = mysql_num_rows($get_pr_item);
include "includes/table_settings.php";
?>
  <div><a href=".?<?php 
echo $_REQUEST['back_page'];
?>
"><img src="images/back-button.png" width="30" height="30" title="Back" /></a></div> 
              <table cellpadding="0" cellspacing="0" border="0" id="dataTable">
                <thead>
                  <tr>
                    <th>Id</th>
                    <th>Item</th>
                    <th>Suppler</th>
                    <th>Unit</th>
                    <th>Qty Required</th>
                    <th>Qty Received</th>
                    <th>Amount On Receive</th>
                  </tr>
                </thead>
                <tbody>
                  <!--Loop start, you could use a repeat region here-->
  <?php 
do {
Пример #6
0
<?php

get_main_menu("sitestorekeeper");
mysql_select_db($database_birus_conn, $birus_conn);
$query_get_site_item_issue = "\r\n\tSELECT site_item_issue.qty_issued,\r\n       site_item_issue.created_date,\r\n\t   site_item_issue.id,\r\n       item.name item_name,\r\n       person.first_name,\r\n       person.last_name,\r\n\t   site_item_issue.approve_date\r\n  \tFROM    (   (   (   birus.site_item_issue site_item_issue\r\n                   INNER JOIN\r\n                      birus.user user\r\n                   ON (site_item_issue.created_by = user.id))\r\n               INNER JOIN\r\n                  birus.item item\r\n               ON (site_item_issue.item_id = item.id))\r\n           INNER JOIN\r\n              birus.site site\r\n           ON (site_item_issue.site_id = site.id))\r\n       INNER JOIN\r\n          birus.person person\r\n       ON (user.person_id = person.id)\r\n\t   where site_item_issue.site_id='" . $_SESSION["site_id"] . "' AND site_item_issue.record_status='active'\r\n\t   ";
$get_site_item_issue = mysql_query($query_get_site_item_issue, $birus_conn) or die(mysql_error());
$row_get_site_item_issue = mysql_fetch_assoc($get_site_item_issue);
$totalRows_get_site_item_issue = mysql_num_rows($get_site_item_issue);
?>

<?php 
if ($_REQUEST['site_item_issue_delete'] == true && $_REQUEST['id'] != "") {
    $query_remove_record = "update site_item_issue set record_status='deactivated', deleted_by='" . $loggedin_id . "',  deleted_date='" . date("y-m-d") . "' where site_item_issue.id='" . $_REQUEST["id"] . "'";
    mysql_query($query_remove_record, $birus_conn) or die(mysql_error());
    if (mysql_affected_rows($birus_conn) > 0) {
        redirect_delete("site_item_issue_view", "2", $_REQUEST["id"]);
    }
}
?>

<?php 
include "includes/table_settings.php";
?>
<div><a href="."><img src="images/back-button.png" width="30" height="30" title="Back" /></a></div> 
   <div class="module_title">Site Item Issue</div>
              <table cellpadding="0" cellspacing="0" border="0" id="dataTable">
                <thead>
                  <tr>
                    <th>Id</th>
                    <th>Item</th>
                    <th>Qty Issued</th>
Пример #7
0
    substrRegex = new RegExp(q, 'i');

    // iterate through the pool of strings and for any string that
    // contains the substring `q`, add it to the `matches` array
    $.each(strs, function(i, str) {
      if (substrRegex.test(str)) {
        matches.push(str);
      }
    });

    cb(matches);
  };
};

<?php 
$result = get_main_menu();
?>
																					
											
var states = [<?php 
foreach ($result as $res) {
    echo " '{$res['m_menu_name']}',";
}
?>
];



$('#the-basics .typeahead').typeahead({
  hint: true,
  highlight: true,
<?php

get_main_menu("sitesupervisor");
mysql_select_db($database_birus_conn, $birus_conn);
$query_get_site_to_site_req = "\r\nSELECT person.first_name,\r\n       person.last_name,\r\n       site.name as site_name,\r\n       site_to_site_req.id,\r\n\t   site_to_site_req.req_no,\r\n       site_to_site_req.site_id,\r\n       site_to_site_req.created_date\r\n  FROM    (   (   birus.user user\r\n               INNER JOIN\r\n                  birus.person person\r\n               ON (user.person_id = person.id))\r\n           INNER JOIN\r\n              birus.site_to_site_req site_to_site_req\r\n           ON (site_to_site_req.hoc_approved_by = user.id))\r\n       INNER JOIN\r\n          birus.site site\r\n       ON (site_to_site_req.site_id = site.id)\r\n\t   where site_to_site_req.site_to_id=" . $_SESSION['site_id'] . "\r\n\t   AND\r\n\t   site_to_site_req.recieved_date != '0000-00-00 00:00:00'\r\n\t   AND\r\n\t   site_to_site_req.recieved = 'true'\r\n\t   AND\r\n\t   site_to_site_req.approved_receipt = 'true'\r\n";
$get_site_to_site_req = mysql_query($query_get_site_to_site_req, $birus_conn) or die(mysql_error());
$row_get_site_to_site_req = mysql_fetch_assoc($get_site_to_site_req);
$totalRows_get_site_to_site_req = mysql_num_rows($get_site_to_site_req);
?>

<?php 
if (isset($_REQUEST['site_to_site_issue_approve']) && $_REQUEST['site_to_site_issue_approve'] == true) {
    $approve_update = "UPDATE birus.site_to_site_req SET approved_issue_date = '" . date("y-m-d") . "', approved_issue_by = '" . $loggedin_id . "', approved_issue='approved' WHERE site_to_site_req.id ='" . $_REQUEST['id'] . "';";
    echo $approve_update;
    mysql_query($approve_update, $birus_conn) or die(mysql_error());
    if (mysql_affected_rows($birus_conn) > 0) {
        redirect_birus("site_to_site_issue_approve_view", "2");
    }
}
?>

<?php 
include "includes/table_settings.php";
?>
<div><a href="."><img src="images/back-button.png" width="30" height="30" title="Back" /></a></div> 
<div class="module_title">Site to Site Approve Requsition</div>
              <table cellpadding="0" cellspacing="0" border="0" id="dataTable">
                <thead>
                  <tr>
                    <th>Id</th>
                    <th>Req No</th>
<?php

get_main_menu("sitesupervisor", $notification);
mysql_select_db($database_birus_conn, $birus_conn);
$query_get_site_to_site_req = "\r\nSELECT person.first_name,\r\n       person.last_name,\r\n       site.name as site_name,\r\n       site_to_site_req.id,\r\n\t   site_to_site_req.req_no,\r\n       site_to_site_req.site_id,\r\n       site_to_site_req.created_date\r\n  FROM    (   (   birus.user user\r\n               INNER JOIN\r\n                  birus.person person\r\n               ON (user.person_id = person.id))\r\n           INNER JOIN\r\n              birus.site_to_site_req site_to_site_req\r\n           ON (site_to_site_req.hoc_approved_by = user.id))\r\n       INNER JOIN\r\n          birus.site site\r\n       ON (site_to_site_req.site_id = site.id)\r\n\t   where site_to_site_req.site_to_id=" . $_SESSION['site_id'] . "\r\n\t   AND\r\n\t   site_to_site_req.approved_issue_date ='00-00-00 00:00:00'\r\n\t   AND\r\n\t   site_to_site_req.hoc_approved_date != '0000-00-00 00:00:00'\r\n\t   AND\r\n\t   site_to_site_req.approved_date != '0000-00-00 00:00:00'\r\n";
$get_site_to_site_req = mysql_query($query_get_site_to_site_req, $birus_conn) or die(mysql_error());
$row_get_site_to_site_req = mysql_fetch_assoc($get_site_to_site_req);
$totalRows_get_site_to_site_req = mysql_num_rows($get_site_to_site_req);
?>

<?php 
if (isset($_REQUEST['site_to_site_issue_approve']) && $_REQUEST['site_to_site_issue_approve'] == true) {
    $approve_update = "UPDATE birus.site_to_site_req SET approved_issue_date = '" . date("y-m-d") . "', approved_issue_by = '" . $loggedin_id . "', approved_issue='approved' WHERE site_to_site_req.id ='" . $_REQUEST['id'] . "';";
    mysql_query($approve_update, $birus_conn) or die(mysql_error());
    if (mysql_affected_rows($birus_conn) > 0) {
        redirect_birus("site_to_site_issue_approve_view", "2");
    }
}
?>

<?php 
include "includes/table_settings.php";
?>
<div><a href="."><img src="images/back-button.png" width="30" height="30" title="Back" /></a></div> 
<div class="module_title">Site to Site Approve Requsition</div>
              <table cellpadding="0" cellspacing="0" border="0" id="dataTable">
                <thead>
                  <tr>
                    <th>Id</th>
                    <th>Req No</th>
                    <th>Site Name</th>
Пример #10
0
<?php

get_main_menu("headofconstruction");
?>

   <br/>
   <div style="width:90%; margin-left:auto; margin-right:auto;">
    <div class="form_title">

            <?php 
echo $_REQUEST["action"];
?>
 Purchase Request Item<?php 
echo $row_get_branch_by_id['name'];
?>
    </div>
    <div class="box"> 
<?php 
$colname_get_main_store_by_pr_id = "-1";
if (isset($_GET['pr_item_id'])) {
    $colname_get_main_store_by_pr_id = $_GET['pr_item_id'];
}
mysql_select_db($database_birus_conn, $birus_conn);
$query_get_main_store_by_pr_id = sprintf("SELECT * FROM main_store WHERE pr_item_id = %s", GetSQLValueString($colname_get_main_store_by_pr_id, "int"));
$get_main_store_by_pr_id = mysql_query($query_get_main_store_by_pr_id, $birus_conn) or die(mysql_error());
$row_get_main_store_by_pr_id = mysql_fetch_assoc($get_main_store_by_pr_id);
$totalRows_get_main_store_by_pr_id = mysql_num_rows($get_main_store_by_pr_id);
mysql_select_db($database_birus_conn, $birus_conn);
$query_get_last_record_per_item = "SELECT * FROM main_store where item_id='" . $_REQUEST["item_id"] . "'  ORDER BY id DESC\r\nLIMIT 0 , 1";
$get_last_record_per_item = mysql_query($query_get_last_record_per_item, $birus_conn) or die(mysql_error());
$row_get_last_record_per_item = mysql_fetch_assoc($get_last_record_per_item);
Пример #11
0
	<nav>
		<ul class="side_menu">
			<li><a href="<?php 
echo BASE_ADDRESS . BLOG_F;
?>
">Blog</a></li>
			<?php 
connect();
$menu_res = get_main_menu();
if ($menu_res->num_rows > 0) {
    // output data of each row
    while ($menu_item = $menu_res->fetch_assoc()) {
        ?>
						<li><a href="<?php 
        echo BASE_ADDRESS . "#" . $menu_item["anchor"];
        ?>
"><?php 
        echo $menu_item["anchor"];
        ?>
</a></li>
			<?php 
    }
}
?>
		</ul>
		<hr />
	<?php 
if (isset($_SESSION["uname"]) && $_SESSION["uname"] != "") {
    ?>
		<ul class="side_menu">
			<li><a><small>Logged in as <?php 
<?php

get_main_menu("sitestorekeeper", $notification);
?>
<div style="margin-left:auto; margin-right:auto; width:80%; margin-top:00px;">
	<div class="innertable">
        <?php 
tile_settings("images/tiles/site-req.png", "Site Requsition", ".?site_req_view");
tile_settings("images/tiles/site_to_site-req.png", "Site To Site Requsition", ".?site_to_site_req_view");
tile_settings("images/tiles/icon2.png", "Site To Site Issue", ".?site_to_site_issue_view");
tile_settings("images/tiles/site_item_issue.png", "Item Issues Out", ".?site_item_issue_view");
tile_settings("images/tiles/delivery-icon.png", "Site To Site Rceive Item", ".?site_to_site_req_recieve_view");
tile_settings("images/tiles/delivery-icon2.png", "Site Receives", ".?site_req_recieve_view");
//tile_settings("images/tiles/site_item_returns.png","Item Returns In",".?site_returns_view");
tile_settings("images/tiles/store-icon.png", "Site Store", ".?site_store_view");
tile_settings("images/tiles/store-icon.png", "Main Store", "?menu_type=sitestorekeeper&main_store_site_view");
?>
		</div>
    </div>
</div>
</div>
Пример #13
0
echo esc_attr(get_bloginfo('name', 'display'));
?>
" class="logoLink left" href="<?php 
echo esc_url(home_url('/'));
?>
"></a>
                <div class="navBanner right">
                </div>
                <div class="clear"></div>
            </div><!-- end center -->
            <div class="break"></div>
            <div class="navigation">
                
                <div id="mainNav" class="navigationSimplified">
                    <?php 
get_main_menu();
?>
                    <div class="search-box right">
                        <form action="<?php 
bloginfo('home');
?>
" method="get" id="searchform"> 
                            <input type="text" size="10" value="Nhập nội dung" name="s" class="textfield" id="navsearch" value="Nhập nội dung" onfocus="if (this.value == 'Nhập nội dung') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Nhập nội dung';}"> 
                            <input type="image" border="0" alt="Tìm kiếm" src="<?php 
bloginfo('template_url');
?>
/images/new/nav/search2.gif" name="searchsubmit" id="navsearchbutton">
                        </form>
                    </div>
                    <div class="break"></div>
                </div> <!-- end mainNav -->