Functions: Enhance img_spacer() function.
Dialplan Edit: Integrate img_spacer() to fix row divider. Default/Domain/User Settings: Use img_spacer() function for color swatches. Contact Times: Adjust for recent changes on img_spacer() function.
This commit is contained in:
parent
6213c1ab6e
commit
4a4517a5ab
|
|
@ -61,18 +61,18 @@ else {
|
|||
|
||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<th id='th_filler' style='display: none; padding: 0px;'>".img_spacer('21px', '1px', 'none')."</th>\n";
|
||||
echo "<th id='th_filler' style='display: none; padding: 0px;'>".img_spacer('21px', '1px')."</th>\n";
|
||||
echo "<th width='20%'>".$text['label-time_user']."</th>\n";
|
||||
echo "<th width='20%'>".$text['label-time_start']."</th>\n";
|
||||
echo "<th width='20%'>".$text['label-time_duration']."</th>\n";
|
||||
echo "<th width='40%'>".$text['label-time_description']."</th>\n";
|
||||
echo "<td class='list_control_icons' nowrap>";
|
||||
echo img_spacer('25px', '1px', 'none');
|
||||
echo img_spacer('25px', '1px');
|
||||
if (permission_exists('contact_time_add')) {
|
||||
echo "<a href='contact_time_edit.php?contact_uuid=".$_GET['id']."' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
}
|
||||
else {
|
||||
echo img_spacer('25px', '1px', 'none');
|
||||
echo img_spacer('25px', '1px');
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
|
|
|||
|
|
@ -760,7 +760,7 @@ else {
|
|||
//end the row
|
||||
echo "</tr>\n";
|
||||
if ($index != 999) {
|
||||
echo "<tr><td colspan='7' style='margin: 0; padding: 0;'><img src='about:blank;' style='width: 100%; height: 1px; border-bottom: 1px solid #e5e9f0; margin: 0; padding: 0; display: block;'></td></tr>";
|
||||
echo "<tr><td colspan='7' style='margin: 0; padding: 0;'>".(img_spacer('100%', '1px', 'border-bottom: 1px solid #e5e9f0; margin: 0; padding: 0; display: block;'))."</td></tr>";
|
||||
}
|
||||
//increment the value
|
||||
$x++;
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ else {
|
|||
}
|
||||
else {
|
||||
if ($category == "theme" && substr_count($subcategory, "_color") > 0 && ($name == "text" || $name == 'array')) {
|
||||
echo " <img src='data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' style='background: ".$row['default_setting_value']."; width: 15px; height: 15px; margin-right: 4px; vertical-align: middle; border: 1px solid ".(color_adjust($row['default_setting_value'], -0.18))."; padding: -1px;'>";
|
||||
echo " ".(img_spacer('15px', '15px', 'background: '.$row['default_setting_value'].'; margin-right: 4px; vertical-align: middle; border: 1px solid '.(color_adjust($row['default_setting_value'], -0.18)).'; padding: -1px;'));
|
||||
echo "<span style=\"font-family: 'Courier New'; line-height: 6pt;\">".htmlspecialchars($row['default_setting_value'])."</span>\n";
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -224,13 +224,13 @@ if (sizeof($_REQUEST) > 1) {
|
|||
echo $sub_row["menu_language"]." - ".$sub_row["menu_name"]."\n";
|
||||
}
|
||||
}
|
||||
elseif ($category == "domain" && $subcategory == "template" && $name == "name" ) {
|
||||
else if ($category == "domain" && $subcategory == "template" && $name == "name" ) {
|
||||
echo " ".ucwords($row['domain_setting_value']);
|
||||
}
|
||||
else if ($category == "domain" && $subcategory == "time_format" && $name == "text" ) {
|
||||
switch ($row['domain_setting_value'] == '12h') {
|
||||
case '12h': echo " ".$text['label-12-hour']; break;
|
||||
case '24h': echo " ".$text['label-24-hour']; break;
|
||||
switch ($row['domain_setting_value']) {
|
||||
case '12h': echo $text['label-12-hour']; break;
|
||||
case '24h': echo $text['label-24-hour']; break;
|
||||
}
|
||||
}
|
||||
else if (
|
||||
|
|
@ -247,16 +247,13 @@ if (sizeof($_REQUEST) > 1) {
|
|||
}
|
||||
else {
|
||||
if ($category == "theme" && substr_count($subcategory, "_color") > 0 && ($name == "text" || $name == 'array')) {
|
||||
$border = (
|
||||
substr_count(strtolower($row['domain_setting_value']), '#fff') > 0 ||
|
||||
substr_count(strtolower($row['domain_setting_value']), '#ffffff') > 0 ||
|
||||
substr_count(str_replace(' ','',strtolower($row['domain_setting_value'])), '255,255,255,') > 0
|
||||
) ? "border: 1px solid #ccc; padding: -1px;" : null;
|
||||
echo " <img src='data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' style='background: ".$row['domain_setting_value']."; width: 15px; height: 15px; margin-right: 4px; vertical-align: middle; ".$border."'>";
|
||||
echo " ".(img_spacer('15px', '15px', 'background: '.$row['domain_setting_value'].'; margin-right: 4px; vertical-align: middle; border: 1px solid '.(color_adjust($row['domain_setting_value'], -0.18)).'; padding: -1px;'));
|
||||
echo "<span style=\"font-family: 'Courier New'; line-height: 6pt;\">".htmlspecialchars($row['domain_setting_value'])."</span>\n";
|
||||
}
|
||||
else {
|
||||
echo " ".htmlspecialchars($row['domain_setting_value'])."\n";
|
||||
}
|
||||
echo " ".htmlspecialchars($row['domain_setting_value']);
|
||||
}
|
||||
echo " \n";
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='text-align: center;'>\n";
|
||||
echo " <a href='?domain_id=".$row['domain_uuid']."&id[]=".$row['domain_setting_uuid']."&enabled=".(($row['domain_setting_enabled'] == 'true') ? 'false' : 'true')."'>".$text['label-'.$row['domain_setting_enabled']]."</a>\n";
|
||||
|
|
|
|||
|
|
@ -200,8 +200,8 @@ else {
|
|||
}
|
||||
else if ($category == "domain" && $subcategory == "time_format" && $name == "text" ) {
|
||||
switch ($row['user_setting_value']) {
|
||||
case '12h': echo " ".$text['label-12-hour']; break;
|
||||
case '24h': echo " ".$text['label-24-hour']; break;
|
||||
case '12h': echo $text['label-12-hour']; break;
|
||||
case '24h': echo $text['label-24-hour']; break;
|
||||
}
|
||||
}
|
||||
else if (
|
||||
|
|
@ -218,16 +218,13 @@ else {
|
|||
}
|
||||
else {
|
||||
if ($category == "theme" && substr_count($subcategory, "_color") > 0 && ($name == "text" || $name == 'array')) {
|
||||
$border = (
|
||||
substr_count(strtolower($row['user_setting_value']), '#fff') > 0 ||
|
||||
substr_count(strtolower($row['user_setting_value']), '#ffffff') > 0 ||
|
||||
substr_count(str_replace(' ','',strtolower($row['user_setting_value'])), '255,255,255,') > 0
|
||||
) ? "border: 1px solid #ccc; padding: -1px;" : null;
|
||||
echo " <img src='data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' style='background: ".$row['user_setting_value']."; width: 15px; height: 15px; margin-right: 4px; vertical-align: middle; ".$border."'>";
|
||||
echo " ".(img_spacer('15px', '15px', 'background: '.$row['user_setting_value'].'; margin-right: 4px; vertical-align: middle; border: 1px solid '.(color_adjust($row['user_setting_value'], -0.18)).'; padding: -1px;'));
|
||||
echo "<span style=\"font-family: 'Courier New'; line-height: 6pt;\">".htmlspecialchars($row['user_setting_value'])."</span>\n";
|
||||
}
|
||||
else {
|
||||
echo " ".htmlspecialchars($row['user_setting_value'])."\n";
|
||||
}
|
||||
echo " ".htmlspecialchars($row['user_setting_value']);
|
||||
}
|
||||
echo " \n";
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='text-align: center;'>\n";
|
||||
echo " <a href='?user_id=".$row['user_uuid']."&id[]=".$row['user_setting_uuid']."&enabled=".(($row['user_setting_enabled'] == 'true') ? 'false' : 'true')."'>".$text['label-'.$row['user_setting_enabled']]."</a>\n";
|
||||
|
|
|
|||
|
|
@ -1566,8 +1566,8 @@ function number_pad($number,$n) {
|
|||
|
||||
//transparent gif
|
||||
if (!function_exists('img_spacer')) {
|
||||
function img_spacer($width = '1px', $height = '1px', $border = 'none') {
|
||||
return "<img src='data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' style='width: ".$width."; height: ".$height."; border: ".$border.";'>";
|
||||
function img_spacer($width = '1px', $height = '1px', $custom = null) {
|
||||
return "<img src='data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' style='width: ".$width."; height: ".$height."; ".$custom."'>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue