103 |
- |
1 |
<?php
|
|
|
2 |
echo showSectionHead($spTextPanel["Connections"]);
|
|
|
3 |
|
|
|
4 |
if ($successMsg) {
|
|
|
5 |
showSuccessMsg($successMsg, false);
|
|
|
6 |
}
|
|
|
7 |
|
|
|
8 |
if ($errorMsg) {
|
|
|
9 |
showErrorMsg($errorMsg, false);
|
|
|
10 |
}
|
|
|
11 |
?>
|
|
|
12 |
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list">
|
|
|
13 |
<tr class="listHead">
|
|
|
14 |
<td class="leftid"><?php echo $spText['common']['Id']?></td>
|
|
|
15 |
<td><?php echo $spText['label']['Name']?></td>
|
|
|
16 |
<td><?php echo $spText['common']['Status']?></td>
|
|
|
17 |
<td class="right"><?php echo $spText['common']['Action']?></td>
|
|
|
18 |
</tr>
|
|
|
19 |
<?php
|
|
|
20 |
$colCount = 4;
|
|
|
21 |
if (count($list) > 0) {
|
|
|
22 |
$catCount = count($list);
|
|
|
23 |
|
|
|
24 |
foreach ($list as $i => $listInfo) {
|
|
|
25 |
$class = ($i % 2) ? "blue_row" : "white_row";
|
|
|
26 |
if ($catCount == ($i + 1)) {
|
|
|
27 |
$leftBotClass = "tab_left_bot";
|
|
|
28 |
$rightBotClass = "tab_right_bot";
|
|
|
29 |
} else {
|
|
|
30 |
$leftBotClass = "td_left_border td_br_right";
|
|
|
31 |
$rightBotClass = "td_br_right";
|
|
|
32 |
}
|
|
|
33 |
?>
|
|
|
34 |
<tr class="<?php echo $class?>">
|
|
|
35 |
<td class="<?php echo $leftBotClass?>"><?php echo $i + 1;?></td>
|
|
|
36 |
<td class="td_br_right left"><?php echo ucfirst($listInfo['name'])?></td>
|
|
|
37 |
<td class="td_br_right">
|
|
|
38 |
<?php
|
|
|
39 |
if ($listInfo['status']) {
|
|
|
40 |
echo "<b class='success'>{$spTextMyAccount['Connected']}</b>";
|
|
|
41 |
} else {
|
|
|
42 |
echo "<b class='error'>{$spTextMyAccount['Disconnected']}</b>";
|
|
|
43 |
}
|
|
|
44 |
?>
|
|
|
45 |
</td>
|
|
|
46 |
<td class="<?php echo $rightBotClass?>">
|
|
|
47 |
<?php
|
|
|
48 |
if ($listInfo['status']) {
|
|
|
49 |
$disconnectFun = SP_DEMO ? "alertDemoMsg()" : "confirmLoad('connections.php', 'content', 'action=disconnect&category={$listInfo['name']}')";
|
|
|
50 |
?>
|
|
|
51 |
<a onclick="<?php echo $disconnectFun?>" href="javascript:void(0);"><?php echo $spTextMyAccount['Disconnect']?></a>
|
|
|
52 |
<?php
|
|
|
53 |
} else {
|
|
|
54 |
|
|
|
55 |
// check whether auth url set
|
|
|
56 |
if ($listInfo['auth_url_info']['auth_url']) {
|
|
|
57 |
?>
|
|
|
58 |
<a href="<?php echo $listInfo['auth_url_info']['auth_url']?>"><?php echo $spTextMyAccount['Connect']?></a>
|
|
|
59 |
<?php
|
|
|
60 |
} else {
|
|
|
61 |
echo "<b class='error'>{$listInfo['auth_url_info']['msg']}</b>";
|
|
|
62 |
}
|
|
|
63 |
|
|
|
64 |
}
|
|
|
65 |
?>
|
|
|
66 |
</td>
|
|
|
67 |
</tr>
|
|
|
68 |
<?php
|
|
|
69 |
}
|
|
|
70 |
}else{
|
|
|
71 |
echo showNoRecordsList($colCount-2);
|
|
|
72 |
}
|
|
|
73 |
?>
|
|
|
74 |
<tr class="listBot">
|
|
|
75 |
<td class="left" colspan="<?php echo ($colCount-1)?>"></td>
|
|
|
76 |
<td class="right"></td>
|
|
|
77 |
</tr>
|
|
|
78 |
</table>
|