mirror of
https://github.com/itflow-org/itflow
synced 2026-03-23 05:55:38 +00:00
Commented unused code. Converted to 4 spaces
This commit is contained in:
@@ -40,7 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if(isset($_GET['client_id'])){ ?>
|
<?php if (isset($_GET['client_id'])) { ?>
|
||||||
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
|
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Contact <strong class="text-danger">*</strong></label>
|
<label>Contact <strong class="text-danger">*</strong></label>
|
||||||
@@ -51,21 +51,17 @@
|
|||||||
<select class="form-control select2" name="contact" required>
|
<select class="form-control select2" name="contact" required>
|
||||||
<option value="">- Contact -</option>
|
<option value="">- Contact -</option>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli,"SELECT * FROM contacts WHERE contact_client_id = $client_id ORDER BY contact_name ASC");
|
$sql = mysqli_query($mysqli,"SELECT * FROM contacts WHERE contact_client_id = $client_id ORDER BY contact_name ASC");
|
||||||
while($row = mysqli_fetch_array($sql)){
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
$contact_id = $row['contact_id'];
|
$contact_id = $row['contact_id'];
|
||||||
$contact_name = htmlentities($row['contact_name']);
|
$contact_name = htmlentities($row['contact_name']); ?>
|
||||||
?>
|
<option value="<?php echo $contact_id; ?>" <?php if ($primary_contact == $contact_id) { echo "selected"; } ?>><?php echo "$contact_name"; ?></option>
|
||||||
<option value="<?php echo $contact_id; ?>" <?php if($primary_contact == $contact_id){ echo "selected"; } ?>><?php echo "$contact_name"; ?></option>
|
|
||||||
|
|
||||||
<?php
|
<?php } ?>
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php }else{ ?>
|
<?php } else { ?>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Client <strong class="text-danger">*</strong></label>
|
<label>Client <strong class="text-danger">*</strong></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -77,21 +73,18 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli,"SELECT * FROM clients WHERE company_id = $session_company_id ORDER BY client_name ASC");
|
$sql = mysqli_query($mysqli,"SELECT * FROM clients WHERE company_id = $session_company_id ORDER BY client_name ASC");
|
||||||
while($row = mysqli_fetch_array($sql)){
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
$client_id = $row['client_id'];
|
$client_id = $row['client_id'];
|
||||||
$client_name = htmlentities($row['client_name']);
|
$client_name = htmlentities($row['client_name']); ?>
|
||||||
?>
|
|
||||||
<option value="<?php echo $client_id; ?>"><?php echo "$client_name"; ?></option>
|
<option value="<?php echo $client_id; ?>"><?php echo "$client_name"; ?></option>
|
||||||
|
|
||||||
<?php
|
<?php } ?>
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if(isset($_GET['client_id'])){ ?>
|
<?php if (isset($_GET['client_id'])) { ?>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Asset</label>
|
<label>Asset</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -103,15 +96,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sql_assets = mysqli_query($mysqli,"SELECT * FROM assets WHERE asset_client_id = $client_id ORDER BY asset_name ASC");
|
$sql_assets = mysqli_query($mysqli,"SELECT * FROM assets WHERE asset_client_id = $client_id ORDER BY asset_name ASC");
|
||||||
while($row = mysqli_fetch_array($sql_assets)){
|
while ($row = mysqli_fetch_array($sql_assets)) {
|
||||||
$asset_id_select = $row['asset_id'];
|
$asset_id_select = $row['asset_id'];
|
||||||
$asset_name_select = htmlentities($row['asset_name']);
|
$asset_name_select = htmlentities($row['asset_name']); ?>
|
||||||
?>
|
<option <?php if (!empty($asset_id) && $asset_id == $asset_id_select) { echo "selected"; } ?> value="<?php echo $asset_id_select; ?>"><?php echo $asset_name_select; ?></option>
|
||||||
<option <?php if(!empty($asset_id) && $asset_id == $asset_id_select){ echo "selected"; } ?> value="<?php echo $asset_id_select; ?>"><?php echo $asset_name_select; ?></option>
|
|
||||||
|
|
||||||
<?php
|
<?php } ?>
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -127,22 +117,17 @@
|
|||||||
<option value="0">Not Assigned</option>
|
<option value="0">Not Assigned</option>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
//$sql = mysqli_query($mysqli,"SELECT * FROM users, user_companies WHERE users.user_id = user_companies.user_id AND user_archived_at IS NULL AND user_companies.company_id = $session_company_id ORDER BY user_name ASC");
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT users.user_id, user_name FROM users
|
$sql = mysqli_query($mysqli, "SELECT users.user_id, user_name FROM users
|
||||||
LEFT JOIN user_companies ON users.user_id = user_companies.user_id
|
LEFT JOIN user_companies ON users.user_id = user_companies.user_id
|
||||||
LEFT JOIN user_settings on users.user_id = user_settings.user_id
|
LEFT JOIN user_settings on users.user_id = user_settings.user_id
|
||||||
WHERE user_companies.company_id = $session_company_id
|
WHERE user_companies.company_id = $session_company_id
|
||||||
AND user_role > 1 AND user_archived_at IS NULL ORDER BY user_name ASC"
|
AND user_role > 1 AND user_archived_at IS NULL ORDER BY user_name ASC"
|
||||||
);
|
);
|
||||||
while($row = mysqli_fetch_array($sql)){
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
$user_id = $row['user_id'];
|
$user_id = $row['user_id'];
|
||||||
$user_name = htmlentities($row['user_name']);
|
$user_name = htmlentities($row['user_name']); ?>
|
||||||
?>
|
<option <?php if ($session_user_id == $user_id) { echo "selected"; } ?> value="<?php echo $user_id; ?>"><?php echo $user_name; ?></option>
|
||||||
<option <?php if($session_user_id == $user_id){ echo "selected"; } ?> value="<?php echo $user_id; ?>"><?php echo $user_name; ?></option>
|
<?php } ?>
|
||||||
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user