-
Notifications
You must be signed in to change notification settings - Fork 0
/
cont-incl.php
executable file
·63 lines (59 loc) · 1.78 KB
/
cont-incl.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/*
Copyright © 2009,2015,2022 Siggi Bjarnason.
Licensed under GNU GPL v3 and later. Check out LICENSE.TXT for details
or see <https://www.gnu.org/licenses/gpl-3.0-standalone.html>
Modular code to insert contact information into any page
*/
print "<div class=\"SmallCenterBox\">\n";
$strQuery = "SELECT * FROM tblContactInfo WHERE vcType = 'Address' ORDER BY iSequence";
$QueryData = QuerySQL($strQuery);
if($QueryData[0] > 0)
{
printPg("Address","tmh2");
foreach($QueryData[1] as $Row)
{
print $Row["vcValue"] . "<br>\n";
}
}
else
{
$strMsg = Array2String($QueryData[1]);
error_log("Query of $strQuery did not return data. Rowcount: $QueryData[0] Msg:$strMsg");
printPg($ErrMsg,"error");
}
$strQuery = "SELECT * FROM tblContactInfo WHERE vcType = 'Email' ORDER BY iSequence";
$QueryData = QuerySQL($strQuery);
if($QueryData[0] > 0)
{
printPg("Electronic mail","tmh2");
foreach($QueryData[1] as $Row)
{
print $Row["vcLabel"] . ": <a href=\"mailto:" . $Row["vcValue"] . "\">" .
$Row["vcValue"] . "</a><br>\n";
}
}
else
{
$strMsg = Array2String($QueryData[1]);
error_log("Query of $strQuery did not return data. Rowcount: $QueryData[0] Msg:$strMsg");
printPg($ErrMsg,"error");
}
$strQuery = "SELECT * FROM tblContactInfo WHERE vcType = 'Phone' ORDER BY iSequence";
$QueryData = QuerySQL($strQuery);
if($QueryData[0] > 0)
{
printPg("Phone Numbers","tmh2");
foreach($QueryData[1] as $Row)
{
print $Row["vcLabel"] . ": " . $Row["vcValue"] . "<br>\n";
}
}
else
{
$strMsg = Array2String($QueryData[1]);
error_log("Query of $strQuery did not return data. Rowcount: $QueryData[0] Msg:$strMsg");
printPg($ErrMsg,"error");
}
print "</div>\n";
?>