Skip to content

Commit 83e15e9

Browse files
authored
Merge pull request #1216 from itflow-org/develop
Develop to Master 25.03.6
2 parents b69a70c + b309081 commit 83e15e9

File tree

6 files changed

+74
-15
lines changed

6 files changed

+74
-15
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
This file documents all notable changes made to ITFlow.
44

5+
## [25.03.6]
6+
7+
### Fixed
8+
- Set default to date to 2035-12-31 as 9999-12-31 and 2999-12-31 broke certain browsers.
9+
- Update Client PDF Export, add header added company logo.
10+
- Present Larger clearer Warning about updates on update page.
11+
- Allow to search by project reference.
12+
513
## [25.03.5]
614

715
### Fixed

admin_update.php

+26-4
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@
3232
<?php } ?>
3333

3434
<?php if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) { ?>
35-
<div class="alert alert-warning">
36-
<strong>Ensure you have a current <a href="https://docs.itflow.org/backups">app & database backup</a> before updating!</strong>
35+
<div class="alert alert-danger">
36+
<h1 class="font-weight-bold text-center">⚠️ DANGER ⚠️</h1>
37+
<h2 class="font-weight-bold text-center">Do NOT run updates without first taking a backup</h2>
38+
<p>VM Snapshots are highly recommended over other methods - see the <a href="https://docs.itflow.org/backups" class="alert-link" target="_blank">docs</a>. Review the <a href="https://github.com/itflow-org/itflow/blob/master/CHANGELOG.md" class="alert-link" target="_blank">changelog</a> for breaking changes that may require manual remediation.</p>
39+
<p class="text-center font-weight-bold">Ignore this warning at your own risk.</p>
3740
</div>
3841
<br>
3942
<a class="btn btn-dark btn-lg my-4" href="post.php?update_db"><i class="fas fa-fw fa-4x fa-download mb-1"></i><h5>Update Database</h5></a>
@@ -46,16 +49,35 @@
4649

4750
<?php } else {
4851
if (!empty($git_log)) { ?>
52+
<div class="alert alert-danger">
53+
<h1 class="font-weight-bold text-center">⚠️ DANGER ⚠️</h1>
54+
<h2 class="font-weight-bold text-center">Do NOT run updates without first taking a backup</h2>
55+
<p>VM Snapshots are highly recommended over other methods - see the <a href="https://docs.itflow.org/backups" class="alert-link" target="_blank">docs</a>. Review the <a href="https://github.com/itflow-org/itflow/blob/master/CHANGELOG.md" class="alert-link" target="_blank">changelog</a> for breaking changes that may require manual remediation.</p>
56+
<p class="text-center font-weight-bold">Ignore this warning at your own risk.</p>
57+
</div>
58+
59+
<a class="btn btn-primary btn-lg my-4 confirm-link" href="post.php?no"><i class="fas fa-fw fa-4x fa-download mb-1"></i><h5>TEST</h5></a>
4960

50-
<a class="btn btn-primary btn-lg my-4" href="post.php?update"><i class="fas fa-fw fa-4x fa-download mb-1"></i><h5>Update App</h5></a>
51-
<a class="btn btn-danger btn-lg" href="post.php?update&force_update=1"><i class="fas fa-fw fa-4x fa-hammer mb-1"></i><h5>FORCE Update App</h5></a>
61+
<a class="btn btn-primary btn-lg my-4 confirm-link" href="post.php?update"><i class="fas fa-fw fa-4x fa-download mb-1"></i><h5>Update App</h5></a>
62+
<a class="btn btn-danger btn-lg confirm-link" href="post.php?update&force_update=1"><i class="fas fa-fw fa-4x fa-hammer mb-1"></i><h5>FORCE Update App</h5></a>
5263

5364
<?php } else { ?>
5465
<p><strong>Application Release Version:<br><strong class="text-dark"><?php echo APP_VERSION; ?></strong></p>
5566
<p class="text-secondary">Database Version:<br><strong class="text-dark"><?php echo CURRENT_DATABASE_VERSION; ?></strong></p>
5667
<p class="text-secondary">Code Commit:<br><strong class="text-dark"><?php echo $current_version; ?></strong></p>
5768
<p class="text-muted">You are up to date!<br>Everything is going to be alright</p>
5869
<i class="far fa-3x text-dark fa-smile-wink"></i><br>
70+
71+
<?php if (rand(1,10) == 1) { ?>
72+
<br>
73+
<div class="alert alert-info alert-dismissible fade show" role="alert">
74+
You're up to date, but when was the last time you checked your ITFlow backup works?
75+
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
76+
<span aria-hidden="true">&times;</span>
77+
</button>
78+
</div>
79+
<?php } ?>
80+
5981
<?php }
6082
}
6183

includes/app_version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* Update this file each time we merge develop into master. Format is YY.MM (add a .v if there is more than one release a month.
66
*/
77

8-
DEFINE("APP_VERSION", "25.03.5");
8+
DEFINE("APP_VERSION", "25.03.6");

includes/filter_header.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
$dtt = date('Y-m-d', strtotime("last day of december last year"));
101101
} else {
102102
$dtf = "NULL";
103-
$dtt = '9999-12-31';
103+
$dtt = '2035-12-31';
104104
}
105105

106106
// Archived

post/user/client.php

+37-8
Original file line numberDiff line numberDiff line change
@@ -597,14 +597,23 @@
597597
enforceUserPermission("module_sales", 1);
598598
enforceUserPermission("module_financial", 1);
599599

600+
$sql = mysqli_query($mysqli, "SELECT * FROM companies, settings WHERE companies.company_id = settings.company_id AND companies.company_id = 1");
601+
$row = mysqli_fetch_array($sql);
602+
$company_name = nullable_htmlentities($row['company_name']);
603+
$company_phone_country_code = nullable_htmlentities($row['company_phone_country_code']);
604+
$company_phone = nullable_htmlentities(formatPhoneNumber($row['company_phone'], $company_phone_country_code));
605+
$company_email = nullable_htmlentities($row['company_email']);
606+
$company_website = nullable_htmlentities($row['company_website']);
607+
$company_logo = nullable_htmlentities($row['company_logo']);
608+
600609
$client_id = intval($_POST["client_id"]);
601610
$export_contacts = intval($_POST["export_contacts"]);
602611
$export_locations = intval($_POST["export_locations"]);
603612
$export_assets = intval($_POST["export_assets"]);
604613
$export_software = intval($_POST["export_software"]);
605614
$export_credentials = 0;
606615
if (lookupUserPermission("module_credential") >= 1) {
607-
$export_credentials = intval($_POST["export_credentials"]);
616+
$export_credentials = intval($_POST["export_credentials"] ?? 0);
608617
}
609618
$export_networks = intval($_POST["export_networks"]);
610619
$export_certificates = intval($_POST["export_certificates"]);
@@ -747,6 +756,10 @@
747756
$pdf->SetAuthor($session_company_name);
748757
$pdf->SetTitle("$client_name - IT Documentation");
749758

759+
// TODO: Add page numbers to footer, but can't work out how to do it without the ugly line
760+
// $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
761+
// $pdf->setFooterData();
762+
750763
// Enable auto page breaks with a margin from the bottom
751764
$pdf->SetAutoPageBreak(true, 15);
752765

@@ -779,17 +792,27 @@
779792
";
780793

781794
// Cover page section (for main content, not the TOC)
795+
$html .= '<div class="cover">';
796+
if (!empty($company_logo)) {
797+
$pdf->Image('uploads/settings/' . $company_logo, '', '', 35, 35, '', '', 'L', false, 300, '', false, false, 1, false, false, false);
798+
}
782799
$html .= "
783-
<div class='cover'>
784-
<h1>$client_name</h1>
785-
<h2>IT Documentation</h2>
786-
<p>Export Date: " . date("F j, Y") . "</p>
800+
<h1>IT Documentation</h1>
801+
<h2>$client_name</h2>
802+
<h4>Prepared by $session_name on " . date("F j, Y") . "</h4>
787803
</div>
788-
<hr>";
804+
";
805+
$html .= "
806+
<br>
807+
<h4>$session_company_name</h4>
808+
$company_phone<br>$company_email<br>
809+
<hr>
810+
";
789811

790812
// Client header information (non-table)
791813
$html .= "
792814
<div class='client-header'>
815+
<h3>$client_name</h3>
793816
<p><strong>Address:</strong> $location_address</p>
794817
<p><strong>City State Zip:</strong> $location_city $location_state $location_zip</p>
795818
<p><strong>Phone:</strong> $contact_phone</p>
@@ -1203,6 +1226,8 @@
12031226
<th>Type</th>
12041227
<th>License</th>
12051228
<th>License Key</th>
1229+
<th>Purchase Date</th>
1230+
<th>Expiration Date</th>
12061231
<th>Notes</th>
12071232
</tr>
12081233
</thead>
@@ -1212,13 +1237,17 @@
12121237
$software_type = nullable_htmlentities($row["software_type"]);
12131238
$software_license_type = nullable_htmlentities($row["software_license_type"]);
12141239
$software_key = nullable_htmlentities($row["software_key"]);
1240+
$software_purchase = nullable_htmlentities($row['software_purchase']);
1241+
$software_expire = nullable_htmlentities($row['software_expire']);
12151242
$software_notes = nullable_htmlentities($row["software_notes"]);
12161243
$html .= "
12171244
<tr style='page-break-inside: avoid;'>
12181245
<td>$software_name</td>
12191246
<td>$software_type</td>
12201247
<td>$software_license_type</td>
12211248
<td>$software_key</td>
1249+
<td>$software_purchase</td>
1250+
<td>$software_expire</td>
12221251
<td>$software_notes</td>
12231252
</tr>";
12241253
}
@@ -1326,7 +1355,7 @@
13261355
<thead>
13271356
<tr>
13281357
<th>Domain Name</th>
1329-
<th>Expire</th>
1358+
<th>Expiration Date</th>
13301359
</tr>
13311360
</thead>
13321361
<tbody>";
@@ -1383,4 +1412,4 @@
13831412
// Output the PDF document for download
13841413
$pdf->Output(strtoAZaz09($client_name) . "-IT_Documentation-" . date("Y-m-d") . ".pdf", "D");
13851414
exit;
1386-
}
1415+
}

projects.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
LEFT JOIN clients ON client_id = project_client_id
4949
LEFT JOIN users ON user_id = project_manager
5050
WHERE DATE(project_created_at) BETWEEN '$dtf' AND '$dtt'
51-
AND (project_name LIKE '%$q%' OR project_description LIKE '%$q%' OR user_name LIKE '%$q%')
51+
AND (CONCAT(project_prefix,project_number) LIKE '%$q%' OR project_name LIKE '%$q%' OR project_description LIKE '%$q%' OR user_name LIKE '%$q%')
5252
AND project_completed_at $status_query
5353
$project_permission_snippet
5454
AND project_$archive_query

0 commit comments

Comments
 (0)