Exemplo n.º 1
0
 public function changeStatus($arrayParam, $option = null)
 {
     if ($option['task'] == 'change-ajax-status') {
         $status = $arrayParam['status'] == 0 ? 1 : 0;
         $id = $arrayParam['id'];
         $query = "UPDATE `{$this->table}` SET `status` = {$status} WHERE `id` = {$id}";
         $this->query($query);
         $result = array('id' => $id, 'status' => $status, 'link' => URL::createLink('admin', 'group', 'ajaxStatus', array('id' => $id, 'status' => $status)));
         //array($id, $status, URL::createLink('admin', 'group', 'ajaxStatus', array('id' => $id, 'status' => $status)));
         return $result;
     }
     if ($option['task'] == 'change-ajax-group-acp') {
         $group_acp = $arrayParam['group_acp'] == 0 ? 1 : 0;
         $id = $arrayParam['id'];
         $query = "UPDATE `{$this->table}` SET `group_acp` = {$group_acp} WHERE `id` = {$id}";
         $this->query($query);
         $result = array('id' => $id, 'group_acp' => $group_acp, 'link' => URL::createLink('admin', 'group', 'ajaxGroupACP', array('id' => $id, 'group_acp' => $group_acp)));
         // return array($id, $group_acp, URL::createLink('admin', 'group', 'ajaxGroupACP', array('id' => $id, 'group_acp' => $group_acp)));
         return $result;
     }
     if ($option['task'] == 'change-status') {
         $status = $arrayParam['type'];
         if (!empty($arrayParam['cid'])) {
             $ids = $this->createWhereDeleteSQL($arrayParam['cid']);
             $query = "UPDATE `{$this->table}` SET `status` = {$status} WHERE `id` IN ({$ids})";
             $this->query($query);
             Session::set('message', array('class' => 'success', 'content' => $this->affectedRows() . ' updated successfully'));
         } else {
             Session::set('message', array('class' => 'error', 'content' => 'Please choose the item that you want to change status !!'));
         }
     }
 }
Exemplo n.º 2
0
 public function changeStatus($arrayParam, $option = null)
 {
     if ($option['task'] == 'change-ajax-status') {
         $status = $arrayParam['status'] == 0 ? 1 : 0;
         $modified = date('Y-m-d', time());
         $modified_by = $this->_userInfo['username'];
         $id = $arrayParam['id'];
         $query = "UPDATE `{$this->table}` SET `status` = {$status}, `modified` = '{$modified}', `modified_by` = '{$modified_by}' WHERE `id` = {$id}";
         $this->query($query);
         $result = array('id' => $id, 'status' => $status, 'link' => URL::createLink('admin', 'category', 'ajaxStatus', array('id' => $id, 'status' => $status)));
         //array($id, $status, URL::createLink('admin', 'group', 'ajaxStatus', array('id' => $id, 'status' => $status)));
         return $result;
     }
     if ($option['task'] == 'change-status') {
         $status = $arrayParam['type'];
         $modified = date('Y-m-d', time());
         $modified_by = $this->_userInfo['username'];
         if (!empty($arrayParam['cid'])) {
             $ids = $this->createWhereDeleteSQL($arrayParam['cid']);
             $query = "UPDATE `{$this->table}` SET `status` = {$status}, `modified` = '{$modified}', `modified_by` = '{$modified_by}' WHERE `id` IN ({$ids})";
             $this->query($query);
             Session::set('message', array('class' => 'success', 'content' => $this->affectedRows() . ' updated successfully'));
         } else {
             Session::set('message', array('class' => 'error', 'content' => 'Please choose the item that you want to change status !!'));
         }
     }
 }
Exemplo n.º 3
0
 public function internalAction()
 {
     $this->_view->_title = 'Internal Group Management';
     if (isset($_GET['team']) && trim($_GET['team']) != '') {
         if (isset($_POST['group_form']) && !empty($_POST['group_form'])) {
             $this->_view->colUser = $this->_model->listTeamUser($_GET['team'], $_POST['group_form']);
         } else {
             if (!isset($_GET['date_from']) && !isset($_GET['date_to'])) {
                 $arrayDefault = array('date_from' => date("d/m/Y"), 'date_to' => date("d/m/Y"));
                 $this->_view->colUser = $this->_model->listTeamUser($_GET['team'], $arrayDefault);
                 $this->_view->duration = $this->_model->getDuration('2', $arrayDefault, 'standard_duration');
                 $this->_view->chart = $this->_model->createChart($_GET['team'], $arrayDefault);
             } else {
                 if (isset($_GET['date_from']) && isset($_GET['date_to'])) {
                     $arrayDate = array('date_from' => $_GET['date_from'], 'date_to' => $_GET['date_to']);
                     $this->_view->colUser = $this->_model->listTeamUser($_GET['team'], $arrayDate);
                     $this->_view->duration = $this->_model->getDuration('2', $arrayDate, 'standard_duration');
                     $this->_view->chart = $this->_model->createChart($_GET['team'], $arrayDate);
                 } else {
                     $this->_view->colUser = $this->_model->listTeamUser($_GET['team']);
                 }
             }
         }
     } else {
         URL::redirect(URL::createLink('default', 'index', 'index'));
     }
     // CREATE CHART
     if (isset($_POST['group_form'])) {
         $this->_view->duration = $this->_model->getDuration('2', $_POST['group_form'], 'standard_duration');
         $this->_view->chart = $this->_model->createChart($_GET['team'], $_POST['group_form']);
     }
     $this->_view->render('group/internal');
 }
Exemplo n.º 4
0
 public function deleteAction()
 {
     $permission = isset($_SESSION['user']) && $_SESSION['user']['info']['admin_control'] == true ? true : false;
     if ($permission == true) {
         $this->_view->_title = 'Delete | User';
         $this->_view->message = '';
         if (isset($_GET['id'])) {
             $this->_view->message = $this->_model->processDelete($_GET['id']);
         }
         $this->_view->render('user/delete', true);
     } else {
         URL::redirect(URL::createLink('default', 'error', 'index', array('type' => 'not-url')));
     }
 }
Exemplo n.º 5
0
 public function editAction()
 {
     $permission = isset($_SESSION['user']) && $_SESSION['user']['info']['admin_control'] == true ? true : false;
     if ($permission == true) {
         $this->_view->_title = 'Edit | Team';
         if (isset($_GET['id'])) {
             $this->_view->_arrayTeam = $this->_model->arrayEdit($_GET['id']);
         }
         if (isset($_POST['editTeam']) && isset($_GET['id'])) {
             $this->_view->_result = $this->_model->processEdit($_POST['editTeam'], $_GET['id']);
             URL::redirect(URL::createLink('default', 'team', 'edit', array('id' => $_GET['id'])));
         }
         $this->_view->render('team/edit', true);
     } else {
         URL::redirect(URL::createLink('default', 'error', 'index', array('type' => 'not-url')));
     }
 }
Exemplo n.º 6
0
 private function callMethod()
 {
     $actionName = $this->_params['action'] . 'Action';
     if (method_exists($this->_controllerObject, $actionName) == true) {
         $module = $this->_params['module'];
         $controller = $this->_params['controller'];
         $action = $this->_params['action'];
         $requestURL = $module . "-" . $controller . "-" . $action;
         $userInfo = Session::get('user');
         $logged = $userInfo['login'] == true && $userInfo['time'] + TIME_LOGIN >= time();
         // MODULE ADMIN
         if ($logged == true) {
             $this->_controllerObject->{$actionName}();
         } else {
             $this->callLoginAction();
         }
         //$this->_controllerObject->$actionName();
     } else {
         //$this->_error();
         URL::redirect(URL::createLink('default', 'error', 'index', array('type' => 'not-url')));
     }
 }
Exemplo n.º 7
0
 public function indexAction()
 {
     $this->_view->_title = 'Personal Management';
     $totalItems = $this->_model->countItem($this->_arrParam, null);
     $configPagination = array('totalItemsPerPage' => 5, 'pageRange' => 2);
     $this->setPagination($configPagination);
     $this->_view->pagination = new Pagination($totalItems, $this->_pagination);
     //$this->_view->Items    				= 		$this->_model->listItems($this->_arrParam, null);
     // Process Maintenance Data
     //$this->_view->arrayMaintenance 		= 		$this->_model->processMaintenance();
     // Process Newton Data
     //$this->_view->arrayNewtonDetail 	=		$this->_model->processNewtonDetail();
     //$this->_view->arrayNewton 			=		$this->_model->processNewton();
     // Process Newcoding Detail
     //$this->_view->arrayNewCodingDetail 	=		$this->_model->processNewCodingDetail();
     //$this->_view->arrayNewCoding 			=		$this->_model->processNewCoding();
     // Process Domestic Data
     //$this->_view->arrayDomestic 			=		$this->_model->processDomestic();
     // Process FC Data
     //$this->_view->arrayFcDetail 			=		$this->_model->processFcDetail();
     //$this->_view->arrayFc 					=		$this->_model->processFc();
     // Process Other
     //$this->_view->arrayOther 				=		$this->_model->processOther();
     // Process Research
     //$this->_view->arrayResearch 			=		$this->_model->processResearch();
     // Process Worktime
     //$this->_view->arrayWorktime 			=		$this->_model->processWorkTime();
     $this->_model->importMaintenance();
     $this->_model->importNewton();
     $this->_model->importDomestic();
     $this->_model->importFC();
     $this->_model->importOther();
     $this->_model->importResearch();
     $this->_model->importNewCoding();
     $this->_model->importWorkTime();
     URL::redirect(URL::createLink('default', 'index', 'index'));
     $this->_view->render('import/index', true);
 }
Exemplo n.º 8
0
<?php

$linkCategory = URL::createLink('admin', 'category', 'index');
$linkBook = URL::createLink('admin', 'user', 'index');
?>
<div id="submenu-box">
	<div class="m">
		<ul id="submenu">
			<li><a href="<?php 
echo $linkCategory;
?>
" class="active">Category</a></li>
			<li><a href="<?php 
echo $linkBook;
?>
">Book</a></li>
		</ul>
		<div class="clr"></div>
	</div>
</div>
Exemplo n.º 9
0
$linkOrdering = URL::createLink('admin', $controller, 'ordering', array('type' => 0));
$btnOrdering = Helper::cmsButton('Ordering', 'toolbar-checkin', $linkOrdering, 'icon-32-checkin', 'submit');
// Trash
$linkTrash = URL::createLink('admin', $controller, 'trash');
$btnTrash = Helper::cmsButton('Trash', 'toolbar-trash', $linkTrash, 'icon-32-trash', 'submit');
// Save
$linkSave = URL::createLink('admin', $controller, 'form', array('type' => 'save'));
$btnSave = Helper::cmsButton('Save', 'toolbar-apply', $linkSave, 'icon-32-apply', 'submit');
// Save & Close
$linkSaveClose = URL::createLink('admin', $controller, 'form', array('type' => 'save-close'));
$btnSaveClose = Helper::cmsButton('Save & Close', 'toolbar-save', $linkSaveClose, 'icon-32-save', 'submit');
// Save & New
$linkSaveNew = URL::createLink('admin', $controller, 'form', array('type' => 'save-new'));
$btnSaveNew = Helper::cmsButton('Save & New', 'toolbar-save-new', $linkSaveNew, 'icon-32-save-new', 'submit');
// Cancel
$linkCancel = URL::createLink('admin', $controller, 'index');
$btnCancel = Helper::cmsButton('Cancel', 'toolbar-cancel', $linkCancel, 'icon-32-cancel');
switch ($this->arrayParams['action']) {
    case 'index':
        if ($controller == 'group') {
            $strButton = $btnPublish . $btnUnPublish . $btnOrdering;
        } else {
            $strButton = $btnNew . $btnPublish . $btnUnPublish . $btnOrdering . $btnTrash;
        }
        break;
    case 'form':
        $strButton = $btnSave . $btnSaveClose . $btnSaveNew . $btnCancel;
        break;
    case 'profile':
        $strButton = $btnSave . $btnSaveClose . $btnCancel;
        break;
Exemplo n.º 10
0
" />
                  </div>
                  <div class="form-group">
                     <label class="form-label" for="team_number">Team Number</label>
                     <input id="team_number" type="text" data-required="1" class="form-control" name="editTeam[team_number]" placeholder="Full Name" value="<?php 
echo $teamNumber;
?>
" />
                  </div>
                  <button class="btn btn-success" type="submit"><i class="fa fa-check-square-o"></i> Submit</button>
                  <a href="<?php 
echo URL::createLink('default', 'team', 'insert');
?>
&type=insert" class="btn btn-danger"><i class="fa fa-times"></i> Cancel</a>
                  <a href="<?php 
echo URL::createLink('default', 'team', 'index');
?>
" class="btn btn-primary"><i class="fa fa-backward"></i> Go Back</a>
                </fieldset>
              </form>
        
            </div>
        </div>
    </div>

</div>
<!-- END CONTAINER -->
 <!-- //////////////////////////////////////////////////////////////////////////// --> 

<?php 
include_once MODULE_PATH . 'default/views/footer.php';
Exemplo n.º 11
0
    public function listGoogleLink()
    {
        $arraySource = $this->listProjectLink();
        $arrayProject = $this->listProject();
        $d = 1;
        $xhtml = '';
        for ($i = 0; $i < count($arraySource); $i++) {
            $class = $d % 2 == 0 ? 'even' : 'odd';
            foreach ($arrayProject as $key => $value) {
                if ($arraySource[$i]['project_link'] == $value['id']) {
                    $arraySource[$i]['project_link'] = $value['project_type'];
                }
            }
            $xhtml .= '<tr class="gradeA">';
            $xhtml .= '<td class="text-center">' . $arraySource[$i]['id'] . '</td>
							 <td class="text-center">' . $arraySource[$i]['link'] . '</td>
							 <td class="text-center">' . $arraySource[$i]['link_month'] . '</td>
							 <td class="text-center">' . $arraySource[$i]['link_year'] . '</td>
							 <td class="text-center">' . $arraySource[$i]['project_link'] . '</td>
							 <td class="text-center"><a class="btn btn-mini btn-primary" href="' . URL::createLink('default', 'google', 'insert') . '&type=edit&idLink=' . $arraySource[$i]['id'] . '">Edit</a> <a class="btn btn-mini btn-danger" href="' . URL::createLink('default', 'google', 'delete') . '&idLink=' . $arraySource[$i]['id'] . '" onclick="return ConfirmDelete();">Delete</a></td>';
            $xhtml .= '</tr>';
            $d++;
        }
        return $xhtml;
    }
Exemplo n.º 12
0
        $name = $value['name'];
        $picturePath = UPLOAD_PATH . 'category' . DS . '60x90-' . $value['picture'];
        if (file_exists($picturePath) == true) {
            $picture = '<img src="' . UPLOAD_URL . 'category' . DS . '60x90-' . $value['picture'] . '" />';
        } else {
            $picture = '<img src="' . UPLOAD_URL . 'category' . DS . '60x90-default.jpg" />';
        }
        $row = $i % 2 == 0 ? 'row0' : 'row1';
        // index.php?module=admin&controller=category&action=ajaxStatus&id=2&status=0
        $status = Helper::cmsStatus($value['status'], URL::createLink('admin', 'category', 'ajaxStatus', array('id' => $id, 'status' => $value['status'])), $id);
        $ordering = '<input type="text" name="order[' . $id . ']" size="5" value="' . $value['ordering'] . '" class="text-area-order">';
        $created = Helper::formatDate('d-m-Y', $value['created']);
        $created_by = $value['created_by'];
        $modified = Helper::formatDate('d-m-Y', $value['modified']);
        $modified_by = $value['modified_by'];
        $linkEdit = URL::createLink('admin', 'category', 'form', array('id' => $id));
        echo '<tr class="' . $row . '">
									<td class="center">' . $ckb . '</td>
									<td><a href="' . $linkEdit . '">' . $name . '</a></td>
									<td class="center">' . $picture . '</td>
									<td class="center">' . $status . '</td>
									<td class="center">' . $ordering . '</td>
									<td class="center">' . $created . '</td>
									<td class="center">' . $created_by . '</td>
									<td class="center">' . $modified . '</td>
									<td class="center">' . $modified_by . '</td>
									<td class="center">' . $id . '</td>
								</tr>';
        $i++;
    }
}
Exemplo n.º 13
0
if (!empty($this->Items)) {
    $i = 0;
    foreach ($this->Items as $key => $value) {
        $id = $value['id'];
        $ckb = '<input type="checkbox" name="cid[]" value="' . $id . '" />';
        $name = $value['name'];
        $row = $i % 2 == 0 ? 'row0' : 'row1';
        // index.php?module=admin&controller=group&action=ajaxStatus&id=2&status=0
        $status = Helper::cmsStatus($value['status'], URL::createLink('admin', 'group', 'ajaxStatus', array('id' => $id, 'status' => $value['status'])), $id);
        $group_acp = Helper::cmsGroupACP($value['group_acp'], URL::createLink('admin', 'group', 'ajaxGroupACP', array('id' => $id, 'group_acp' => $value['group_acp'])), $id);
        $ordering = '<input type="text" name="order[' . $id . ']" size="5" value="' . $value['ordering'] . '" class="text-area-order">';
        $created = Helper::formatDate('d-m-Y', $value['created']);
        $created_by = $value['created_by'];
        $modified = Helper::formatDate('d-m-Y', $value['modified']);
        $modified_by = $value['modified_by'];
        $linkEdit = URL::createLink('admin', 'group', 'form', array('id' => $id));
        echo '<tr class="' . $row . '">
									<td class="center">' . $ckb . '</td>
									<td><a href="' . $linkEdit . '">' . $name . '</a></td>
									<td class="center">' . $status . '</td>
									<td class="center">' . $group_acp . '</td>
									<td class="center">' . $ordering . '</td>
									<td class="center">' . $created . '</td>
									<td class="center">' . $created_by . '</td>
									<td class="center">' . $modified . '</td>
									<td class="center">' . $modified_by . '</td>
									<td class="center">' . $id . '</td>
								</tr>';
        $i++;
    }
}
Exemplo n.º 14
0
$linkOrdering = URL::createLink('admin', 'book', 'ordering', array('type' => 0));
$btnOrdering = Helper::cmsButton('Ordering', 'toolbar-checkin', $linkOrdering, 'icon-32-checkin', 'submit');
// Trash
$linkTrash = URL::createLink('admin', 'book', 'trash');
$btnTrash = Helper::cmsButton('Trash', 'toolbar-trash', $linkTrash, 'icon-32-trash', 'submit');
// Save
$linkSave = URL::createLink('admin', 'book', 'form', array('type' => 'save'));
$btnSave = Helper::cmsButton('Save', 'toolbar-apply', $linkSave, 'icon-32-apply', 'submit');
// Save & Close
$linkSaveClose = URL::createLink('admin', 'book', 'form', array('type' => 'save-close'));
$btnSaveClose = Helper::cmsButton('Save & Close', 'toolbar-save', $linkSaveClose, 'icon-32-save', 'submit');
// Save & New
$linkSaveNew = URL::createLink('admin', 'book', 'form', array('type' => 'save-new'));
$btnSaveNew = Helper::cmsButton('Save & New', 'toolbar-save-new', $linkSaveNew, 'icon-32-save-new', 'submit');
// Cancel
$linkCancel = URL::createLink('admin', 'book', 'index');
$btnCancel = Helper::cmsButton('Cancel', 'toolbar-cancel', $linkCancel, 'icon-32-cancel');
switch ($this->arrayParams['action']) {
    case 'index':
        $strButton = $btnNew . $btnPublish . $btnUnPublish . $btnOrdering . $btnTrash;
        break;
    case 'form':
        $strButton = $btnSave . $btnSaveClose . $btnSaveNew . $btnCancel;
        break;
}
?>
<div id="toolbar-box">
	<div class="m">
		<!-- TOOLBAR -->
		<div class="toolbar-list" id="toolbar">
			<ul>
Exemplo n.º 15
0
  <!-- Start Page Header -->
  
  <!-- End Page Header -->
 <!-- //////////////////////////////////////////////////////////////////////////// --> 
<!-- START CONTAINER -->
<div class="panel-body">
		<div class="container-padding">


  <!-- Start Row -->
  <div class="row">

    <!-- Start Panel -->
    <div class="col-md-12">
      <p class="text-right"><a href="<?php 
echo URL::createLink('default', 'team', 'insert');
?>
" class="btn btn-success"><i class="fa fa-plus"></i> Insert</a></p>
      <div class="panel panel-default">
        <div class="panel-title"><?php 
echo $this->_title;
?>
</div>
        <div class="panel-body table-responsive">

          <table class="table table-hover">
            <thead>
              <tr>
              	<td>ID</td>
                <td>Team</td>
                <td>Team Name</td>
Exemplo n.º 16
0
<?php

$imageURL = $this->_dirImg;
$xhtml = '';
$arrMenu = array(array('link' => URL::createLink('admin', 'book', 'add'), 'name' => 'Add new book', 'image' => 'icon-48-article-add'), array('link' => URL::createLink('admin', 'book', 'index'), 'name' => 'Book manager', 'image' => 'icon-48-article'), array('link' => URL::createLink('admin', 'category', 'index'), 'name' => 'Category manager', 'image' => 'icon-48-category'), array('link' => URL::createLink('admin', 'group', 'index'), 'name' => 'Group Manager', 'image' => 'icon-48-groups'), array('link' => URL::createLink('admin', 'user', 'index'), 'name' => 'User Manager', 'image' => 'icon-48-user'));
foreach ($arrMenu as $key => $value) {
    $image = $imageURL . '/header/' . $value['image'] . '.png';
    $xhtml .= '<div class="icon-wrapper">
                        <div class="icon">
                            <a href="' . $value['link'] . '">
                                <img alt="" src="' . $image . '">
                                <span>' . $value['name'] . '</span>
                            </a>
                        </div>
                    </div>';
}
?>
<div id="element-box">
	<div class="m">
        <div class="adminform">
            <div class="cpanel-left">
                <div class="cpanel">
					<?php 
echo $xhtml;
?>
                </div>
            </div>
            
        </div>
        <div class="clr"></div>
    </div>
Exemplo n.º 17
0
<?php

$dataForm = $this->arrParam['form'];
// Input
$inputSubmit = Helper::cmsInput('submit', 'form[submit]', 'submit', 'register', 'register');
$inputToken = Helper::cmsInput('hidden', 'form[token]', 'token', time());
// Row
$rowUserName = Helper::cmsRow('Username', Helper::cmsInput('text', 'form[username]', 'username', $dataForm['username'], 'contact_input'));
$rowFullName = Helper::cmsRow('Full Name', Helper::cmsInput('text', 'form[fullname]', 'fullname', $dataForm['fullname'], 'contact_input'));
$rowPassword = Helper::cmsRow('Password', Helper::cmsInput('text', 'form[password]', 'password', $dataForm['password'], 'contact_input'));
$rowEmail = Helper::cmsRow('Email', Helper::cmsInput('text', 'form[email]', 'email', $dataForm['email'], 'contact_input'));
$rowSubmit = Helper::cmsRow('Submit', $inputToken . $inputSubmit, true);
$linkAction = URL::createLink('default', 'index', 'register');
?>
<div class="title">
	<span class="title_icon"><img src="<?php 
echo $imageURL;
?>
/bullet1.gif"/></span>Đăng ký thành viên
</div>

<div class="feat_prod_box_details">
	<div class="contact_form">
		<div class="form_subtitle">create new account</div>
		<?php 
echo $this->errors;
?>
		<form name="adminform" action="<?php 
echo $linkAction;
?>
" method="POST">
Exemplo n.º 18
0
<?php

$cart = Session::get('cart');
$totalItem = 0;
$totalPrices = 0;
if (!empty($cart)) {
    $totalItem = array_sum($cart['quantity']);
    $totalPrices = array_sum($cart['price']);
}
$linkViewCart = URL::createLink('default', 'user', 'cart');
?>
<div class="cart">
  <div class="title"><span class="title_icon"><img src="<?php 
echo $imageURL;
?>
/cart.gif" alt="" title="" /></span>My cart</div>
  <div class="home_cart_content">
  <?php 
echo $totalItem;
?>
 x items | <span class="red">TOTAL: <?php 
echo number_format($totalPrices);
?>
$</span>
  </div>
  <a href="<?php 
echo $linkViewCart;
?>
" class="view_cart">view cart</a>

</div>
Exemplo n.º 19
0
    public function createTableGroup($arrayDate)
    {
        $xhtml = '';
        $queryTeam = "SELECT DISTINCT `team` FROM `user` WHERE `team` != '' GROUP BY `team`";
        // "SELECT DISTINCT `team` FROM `user` GROUP BY `team`"
        $sumStandard = 0;
        $sumReal = 0;
        $avgPerformance = 0;
        $numberTeam = count($this->fetchAll($queryTeam));
        for ($i = 1; $i <= $numberTeam; $i++) {
            if ($i % 2 != 0) {
                $xhtml .= '<div class="row" style="margin-bottom: 30px;">';
            }
            $xhtml .= '<div class="col-md-6">';
            $xhtml .= '<div class="panel-title">
					  Team <span class="label label-warning">' . $i . '</span>
					</div>';
            $xhtml .= '<table class="table table-hover table-striped">
							<thead>
							  <tr>
								<td>No</td>
								<td>Group Leader</td>
								<td>Name</td>
								<td>Project</td>
								<td>Standard dur</td>
								<td>Real dur</td>
								<td>Performance</td>
							  </tr>
							</thead>
						';
            $xhtml .= '<tbody>';
            $j = 0;
            foreach ($this->createTableTeam($i) as $key => $value) {
                $xhtml .= '<tr>';
                $xhtml .= '<td>' . $key . '</td>';
                $xhtml .= '<td>' . ucwords($value['position']) . '</td>';
                $xhtml .= '<td><a href="' . URL::createLink('default', 'group', 'internal', array('team' => $value['team'], 'date_from' => $arrayDate['date_from'], 'date_to' => $arrayDate['date_to'])) . '">' . $value['fullname'] . '<a/></td>';
                $xhtml .= '<td>' . $this->listProjectUser($value['id'], $arrayDate) . '</td>';
                $xhtml .= '<td>' . $this->createLabelDuration($this->getDuration($value['id'], $arrayDate, 'standard_duration')) . '</td>';
                $xhtml .= '<td>' . $this->createLabelDuration($this->getDuration($value['id'], $arrayDate, 'real_duration')) . '</td>';
                $xhtml .= '<td>' . $this->getPerformance($this->getDuration($value['id'], $arrayDate, 'standard_duration'), $this->getDuration($value['id'], $arrayDate, 'real_duration')) . '</td>';
                $xhtml .= '</tr>';
                $sumStandard += $this->getDuration($value['id'], $arrayDate, 'standard_duration');
                $sumReal += $this->getDuration($value['id'], $arrayDate, 'real_duration');
                $avgPerformance += $this->getPerformance($this->getDuration($value['id'], $arrayDate, 'standard_duration'), $this->getDuration($value['id'], $arrayDate, 'real_duration'));
                $j++;
            }
            $xhtml .= '<tr>
							<td colspan="4" class="text-center text-bold">Sum</td>
							<td>' . $this->createLabelDuration($sumStandard) . '</td>
							<td>' . $this->createLabelDuration($sumReal) . '</td>
							<td>' . round($avgPerformance / $j, 2) . '%</td>
						</tr>';
            $xhtml .= '</tbody>';
            $xhtml .= '</table>';
            $xhtml .= '</div>';
            if ($i % 2 == 0) {
                $xhtml .= '</div>';
            }
            $sumStandard = 0;
            $sumReal = 0;
            $avgPerformance = 0;
            $j = 0;
        }
        return $xhtml;
    }
Exemplo n.º 20
0
  <!-- Start Page Header -->
  
  <!-- End Page Header -->
 <!-- //////////////////////////////////////////////////////////////////////////// --> 
<!-- START CONTAINER -->
<div class="panel-body">
		<div class="container-padding">


  <!-- Start Row -->
  <div class="row">

    <!-- Start Panel -->
    <div class="col-md-12">
      <p class="text-right"><a href="<?php 
echo URL::createLink('default', 'user', 'insert');
?>
" class="btn btn-success"><i class="fa fa-plus"></i> Insert</a></p>
      <div class="panel panel-default">
        <div class="panel-title"><?php 
echo $this->_title;
?>
</div>
        <div class="panel-body table-responsive">

          <table class="table table-hover">
            <thead>
              <tr>
              	<td>ID</td>
                <td>Username</td>
                <td>Fullname</td>
Exemplo n.º 21
0
<?php

$linkAction = URL::createLink('admin', 'index', 'login');
?>
<div id="border-top" class="h_blue">
    <span class="title"><a href="index.php">Administration</a></span>
</div>
<div id="content-box">
    <div id="element-box" class="login">
        <div class="m wbg">
            <h1>Administration Login</h1>
            <!-- ERROR -->
            <?php 
echo @$this->errors;
?>
            
            <div id="section-box">
                <div class="m">
                    <form action="<?php 
echo $linkAction;
?>
" method="post" id="form-login">
                        <fieldset class="loginform">
                            <!-- USERNAME -->
                            <label>User Name</label>
                            <input name="form[username]" id="mod-login-username" type="text" class="inputbox" size="15" />
                            
                            <!-- PASSWORD -->
                            <label id="mod-login-password-lbl" for="mod-login-password">Password</label>
                            <input name="form[passwd]" id="mod-login-password" type="password" class="inputbox" size="15" />
                            
Exemplo n.º 22
0
<?php

$linkControlPanel = URL::createLink('admin', 'control', 'index');
$linkMyProfile = URL::createLink('admin', 'profile', 'index');
$linkUserManager = URL::createLink('admin', 'user', 'index');
$linkAddUser = URL::createLink('admin', 'user', 'add');
$linkAddGroup = URL::createLink('admin', 'group', 'add');
?>
<div id="border-top" class="h_blue">
	<span class="title"><a href="#">Administration</a></span>
</div>

<!-- HEADER -->
<div id="header-box">
	<div id="module-status">
		<span class="no-unread-messages"><a href="#">Log out</a></span>
	</div>
	<div id="module-menu">
		<!-- MENU -->
		<ul id="menu">
			<li class="node"><a href="#">Site</a>
				<ul>
					<li><a class="icon-16-cpanel" href="<?php 
echo $linkControlPanel;
?>
">Control Panel</a></li>
					<li class="separator"><span></span></li>
					<li><a class="icon-16-profile" href="<?php 
echo $linkMyProfile;
?>
">My Profile</a></li>
Exemplo n.º 23
0
$xhtml = '';
$imageURL = $this->_dirImg;
$linkHome = URL::createLink('default', 'index', 'index');
$userObj = Session::get('user');
$arrayMenu = array();
$arrayMenu[] = array('class' => 'index-index', 'link' => URL::createLink('default', 'index', 'index'), 'name' => 'Home');
$arrayMenu[] = array('class' => 'category-index', 'link' => URL::createLink('default', 'category', 'index'), 'name' => 'Categories');
if ($userObj['login'] == true) {
    $arrayMenu[] = array('class' => 'user-index', 'link' => URL::createLink('default', 'user', 'index'), 'name' => 'My Account');
    $arrayMenu[] = array('class' => 'index-logout', 'link' => URL::createLink('default', 'index', 'logout'), 'name' => 'Logout');
} else {
    $arrayMenu[] = array('class' => 'index-register', 'link' => URL::createLink('default', 'index', 'register'), 'name' => 'Register');
    $arrayMenu[] = array('class' => 'index-login', 'link' => URL::createLink('default', 'index', 'login'), 'name' => 'Login');
}
if ($userObj['group_acp'] == true) {
    $arrayMenu[] = array('class' => '', 'link' => URL::createLink('admin', 'index', 'index'), 'name' => 'Admin Control Panel');
}
foreach ($arrayMenu as $key => $value) {
    $xhtml .= '<li class="' . $value['class'] . '"><a href="' . $value['link'] . '">' . $value['name'] . '</a></li>';
}
?>
<div class="header">
	<div class="logo">
		<a href="<?php 
echo $linkHome;
?>
"><img src="<?php 
echo $imageURL;
?>
/logo.gif" /></a>
	</div>
Exemplo n.º 24
0
 public function orderingAction()
 {
     $this->_model->ordering($this->_arrParam);
     URL::redirect(URL::createLink('admin', 'group', 'index'));
 }
Exemplo n.º 25
0
	<span class="title_icon"></span><img src="<?php 
echo $imageURL;
?>
/bullet1.gif" />My cart
</div>

<!-- LIST BOOKS -->
<div class="feat_prod_box_details">
	<?php 
$linkCategory = URL::createLink('default', 'category', 'index');
$linkSubmitForm = URL::createLink('default', 'user', 'buy');
if (!empty($this->Items)) {
    $xhtml = '';
    $totalPrice = 0;
    foreach ($this->Items as $key => $value) {
        $linkDetailBook = URL::createLink('default', 'book', 'detail', array('book_id' => $value['id']));
        $name = $value['name'];
        $price = number_format($value['price']);
        $priceTotal = number_format($value['totalprice']);
        $quantity = $value['quantity'];
        $totalPrice += $value['totalprice'];
        $picturePath = UPLOAD_PATH . 'book' . DS . '98x150-' . $value['picture'];
        if (file_exists($picturePath) == true) {
            $picture = '<img width="30" height="45" class="thumb" src="' . UPLOAD_URL . 'book' . DS . '98x150-' . $value['picture'] . '" />';
        } else {
            $picture = '<img width="30" height="45" class="thumb" src="' . UPLOAD_URL . 'book' . DS . '98x150-default.jpg" />';
        }
        $inputBookID = Helper::cmsInput('hidden', 'form[bookid][]', 'input_book_' . $value['id'], $value['id']);
        $inputQuantity = Helper::cmsInput('hidden', 'form[quantity][]', 'input_quantity_' . $value['id'], $value['quantity']);
        $inputPrice = Helper::cmsInput('hidden', 'form[price][]', 'input_price_' . $value['id'], $value['price']);
        $inputName = Helper::cmsInput('hidden', 'form[name][]', 'input_name_' . $value['id'], $value['name']);
Exemplo n.º 26
0
?>
</h1>
  </div>
  <!-- End Page Header -->
 <!-- //////////////////////////////////////////////////////////////////////////// --> 
<!-- START CONTAINER -->
<div class="panel-body table-responsive margin-t-20 margin-b-20">
	<div class="panel panel-default">
		
        <div class="panel-title">
          Select Date
        </div>

            <div class="panel-body">
              <form class="form-inline" name="group_form" method="post" action="<?php 
echo URL::createLink('default', 'group', 'internal', array('team' => $_GET['team']));
?>
">
                <div class="form-group">
                  <label class="form-label" for="example1">From</label>
                  <div class="input-prepend input-group">
                     <span class="add-on input-group-addon"><i class="fa fa-calendar"></i></span>
                     <input type="text" value="<?php 
echo $dateFrom;
?>
" class="form-control active" id="date-range200" name="group_form[date_from]" /> 
                   </div>
                </div>
                <div class="form-group">
                  <label class="form-label" for="example2">To</label>
                  <div class="input-prepend input-group">
Exemplo n.º 27
0
  <div class="page-header">
  	<h1 class="title"><?php 
    echo $this->_title;
    ?>
</h1>
  </div>
  <!-- End Page Header -->
 <!-- //////////////////////////////////////////////////////////////////////////// --> 
<!-- START CONTAINER -->
<div class="panel-body table-responsive margin-t-20 margin-b-20">
	<?php 
    echo $this->message;
    ?>
    <p><a href="<?php 
    echo URL::createLink('default', 'google', 'index');
    ?>
" class="btn btn-primary"><i class="fa fa-backward"></i> Go Back</a></p>
</div>
<!-- END CONTAINER -->
 <!-- //////////////////////////////////////////////////////////////////////////// --> 

<?php 
    include_once MODULE_PATH . 'default/views/footer.php';
    ?>
</div>
<!-- End Content -->
 <!-- //////////////////////////////////////////////////////////////////////////// --> 
<?php 
} else {
    URL::redirect(URL::createLink('default', 'google', 'index'));
}
Exemplo n.º 28
0
  <div class="page-header">
  	<h1 class="title"><?php 
    echo $this->_title;
    ?>
</h1>
  </div>
  <!-- End Page Header -->
 <!-- //////////////////////////////////////////////////////////////////////////// --> 
<!-- START CONTAINER -->
<div class="panel-body table-responsive margin-t-20 margin-b-20">
	<?php 
    echo $this->message;
    ?>
    <p><a href="<?php 
    echo URL::createLink('default', 'team', 'index');
    ?>
" class="btn btn-primary"><i class="fa fa-backward"></i> Go Back</a></p>
</div>
<!-- END CONTAINER -->
 <!-- //////////////////////////////////////////////////////////////////////////// --> 

<?php 
    include_once MODULE_PATH . 'default/views/footer.php';
    ?>
</div>
<!-- End Content -->
 <!-- //////////////////////////////////////////////////////////////////////////// --> 
<?php 
} else {
    URL::redirect(URL::createLink('default', 'team', 'index'));
}
Exemplo n.º 29
0
$linkOrdering = URL::createLink('admin', 'user', 'ordering', array('type' => 0));
$btnOrdering = Helper::cmsButton('Ordering', 'toolbar-checkin', $linkOrdering, 'icon-32-checkin', 'submit');
// Trash
$linkTrash = URL::createLink('admin', 'user', 'trash');
$btnTrash = Helper::cmsButton('Trash', 'toolbar-trash', $linkTrash, 'icon-32-trash', 'submit');
// Save
$linkSave = URL::createLink('admin', 'user', 'form', array('type' => 'save'));
$btnSave = Helper::cmsButton('Save', 'toolbar-apply', $linkSave, 'icon-32-apply', 'submit');
// Save & Close
$linkSaveClose = URL::createLink('admin', 'user', 'form', array('type' => 'save-close'));
$btnSaveClose = Helper::cmsButton('Save & Close', 'toolbar-save', $linkSaveClose, 'icon-32-save', 'submit');
// Save & New
$linkSaveNew = URL::createLink('admin', 'user', 'form', array('type' => 'save-new'));
$btnSaveNew = Helper::cmsButton('Save & New', 'toolbar-save-new', $linkSaveNew, 'icon-32-save-new', 'submit');
// Cancel
$linkCancel = URL::createLink('admin', 'user', 'index');
$btnCancel = Helper::cmsButton('Cancel', 'toolbar-cancel', $linkCancel, 'icon-32-cancel');
switch ($this->arrayParams['action']) {
    case 'index':
        $strButton = $btnNew . $btnPublish . $btnUnPublish . $btnOrdering . $btnTrash;
        break;
    case 'form':
        $strButton = $btnSave . $btnSaveClose . $btnSaveNew . $btnCancel;
        break;
}
?>
<div id="toolbar-box">
	<div class="m">
		<!-- TOOLBAR -->
		<div class="toolbar-list" id="toolbar">
			<ul>
Exemplo n.º 30
0
<?php

$linkCategory = URL::createLink('admin', 'category', 'index');
$linkBook = URL::createLink('admin', 'book', 'index');
?>
<div id="submenu-box">
	<div class="m">
		<ul id="submenu">
			<li><a href="<?php 
echo $linkCategory;
?>
" class="active">Category</a></li>
			<li><a href="<?php 
echo $linkBook;
?>
">Book</a></li>
		</ul>
		<div class="clr"></div>
	</div>
</div>