Example #1
0
 /**
  * Asset clone.
  *
  * @param  int  $assetId
  * @return View
  */
 public function getClone($assetId = null)
 {
     // Check if the asset exists
     if (is_null($asset_to_clone = Asset::find($assetId))) {
         // Redirect to the asset management page
         return Redirect::to('hardware')->with('error', Lang::get('admin/hardware/message.does_not_exist'));
     } else {
         if (!Company::isCurrentUserHasAccess($asset_to_clone)) {
             return Redirect::to('hardware')->with('error', Lang::get('general.insufficient_permissions'));
         }
     }
     // Grab the dropdown lists
     $model_list = modelList();
     $statuslabel_list = statusLabelList();
     $location_list = locationsList();
     $manufacturer_list = manufacturerList();
     $category_list = categoryList();
     $supplier_list = suppliersList();
     $assigned_to = usersList();
     $statuslabel_types = statusTypeList();
     $company_list = Company::getSelectList();
     $asset = clone $asset_to_clone;
     $asset->id = null;
     $asset->asset_tag = '';
     $asset->serial = '';
     $asset->assigned_to = '';
     return View::make('backend/hardware/edit')->with('supplier_list', $supplier_list)->with('model_list', $model_list)->with('statuslabel_list', $statuslabel_list)->with('statuslabel_types', $statuslabel_types)->with('assigned_to', $assigned_to)->with('asset', $asset)->with('location_list', $location_list)->with('manufacturer', $manufacturer_list)->with('category', $category_list)->with('company_list', $company_list);
 }
Example #2
0
     <h2 class="centered_title">Utilisateurs</h2>

      <table>
        <thead>
          <tr>
            <th>ID</th>
            <th>Nom</th>
            <th>Prenom</th>
            <th>Login</th>
            <th colspan="2">Actions</th>
          </tr>
        </thead>
        <tbody>
          <?php 
usersList($bdd);
?>
        </tbody>
      </table>

    </div>

    <div class="section_one_three sidebar">

        <h2 class="centered_title">Gestion des Utilisateurs</h2>
        <div class="panel"><img src="images/users.png" alt="" title="" /></div>
        <p class="centered_text">
        </p>
        <a href="#oModal" class="more">Ajouter</a>

    </div>
Example #3
0
	break;

	case "saveUserEdit":
	case "saveuseredit":
	$oldignoreuserabort = ignore_user_abort(true);
	userSave( $option, (int) cbGetParam( $_POST, 'id', 0 ) );
	break;

	case "userProfile":
	case "userprofile":
	userProfile($option, $_CB_framework->myId(), _UE_UPDATE);
	break;

	case "usersList":
	case "userslist":
	usersList( $_CB_framework->myId() );
	break;

	case "userAvatar":
	case "useravatar":
	userAvatar($option, $uid, _UE_UPDATE);
	break;

	case "lostPassword":
	case "lostpassword":
	lostPassForm( $option );
	break;

	case "sendNewPass":
	case "sendnewpass":
	$oldignoreuserabort = ignore_user_abort(true);
Example #4
0
														<input type='hidden' name="ResponsiblePerson4" class="form-control textUser4"  />
														<ul class="dropdown-menu liUser4">
															<?php 
usersList();
?>
														</ul>
													</div>


													<div class="dropdown" hidden>
														<button class="btn btn-success dropdown-toggle User5" type="button" data-toggle="dropdown">Select User
															<span class="caret"></span></button>
															<input type='hidden' name="ResponsiblePerson5" class="form-control textUser5"  />
															<ul class="dropdown-menu liUser5">
																<?php 
usersList();
?>
															</ul>
														</div>

														<hr />

														<p>Responsibility
															<textarea type='text' name="Responsibility" class="form-control"/></textarea>
														</p>

														Agreed Date
														<div class='input-group date' id='AgreedDate'>
															<input type='text' name="AgreedDate" class="form-control" />
															<span class="input-group-addon">
																<span class="glyphicon glyphicon-calendar"></span>
Example #5
0
                     $message = newBanPoints($_POST['user'], $_POST['lobby'], $id, $_POST['reason'], $_POST['amount'], $_POST['comment']);
                 } else {
                     $error = 'Both comment and amount field must be filled';
                 }
             } else {
                 $message = newBanPoints($_POST['user'], $_POST['lobby'], $id, $_POST['reason'], $_POST['amount'], $_POST['comment']);
             }
         }
         include_once 'includes/pages/adminban.inc';
     } else {
         include_once 'includes/pages/adminban.inc';
     }
     break;
 case "userslist":
     $page = $_GET['page'];
     $userlist = usersList($page);
     include_once 'includes/pages/adminusers.inc';
     break;
 case "banslist":
     include_once 'includes/pages/adminbans.inc';
     break;
 case "forum":
     if ($_GET['action'] == 'newTopic') {
         if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['name']) && isset($_POST['message'])) {
             $topic = newTopic($_POST['name'], $id, $_POST['message']);
             redirect('admin.php?page=forum&topic=' . $topic, 0);
         } else {
             include_once 'includes/pages/adminnewtopic.inc';
         }
     } elseif ($_GET['action'] == 'newPost' && $_GET['topic']) {
         if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['message'])) {