update modules to be inline with main gallery3-contrib-master

This commit is contained in:
Stian Lund 2024-03-29 10:46:54 +01:00
parent 2e375358e1
commit 55207a627a
24 changed files with 534 additions and 522 deletions

View File

@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2013 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
<?php //defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2010 Bharat Mediratta
* Copyright (C) 2000-2013 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2013 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2010 Bharat Mediratta
* Copyright (C) 2000-2013 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -19,18 +19,110 @@
*/
class navcarousel_theme_Core {
static function head($theme) {
if ($theme->page_type == "item") {
return $theme->script("jquery.jcarousel.min.js")
. $theme->css("skin.css");
if ($theme->page_type == "item") {
return
$theme->script("jquery.jcarousel.js")
. $theme->css("skin.css");
}
}
static function photo_bottom($theme) {
$content = '';
if ($theme->page_type == "item") {
if (locales::is_rtl()) {
$rtl_support = "rtl: true,\n";
} else {
$rtl_support = "rtl: false,\n";
}
$carouselwidth = module::get_var("navcarousel", "carouselwidth", "600");
if ($carouselwidth == 0) {
$carouselwidth = "100%";
$containerwidth = "";
} else {
$carouselwidth = $carouselwidth ."px";
$containerwidth = ".jcarousel-skin-tango .jcarousel-container-horizontal {\n
width: ". $carouselwidth .";\n
}\n";
}
$thumbsize = module::get_var("navcarousel", "thumbsize", "50");
$showelements = module::get_var("navcarousel", "showelements", "7");
$childcount = $theme->item->parent()->viewable()->children_count();
$itemoffset = intval(floor($showelements / 2));
if ($childcount <= $showelements) {
$itemoffset = 1;
} else {
$itempos = $theme->item->parent()->get_position($theme->item);
$itemoffset = $itempos - $itemoffset;
if ($itemoffset < 1) {
$itemoffset = 1;
}
if (($itemoffset + $showelements) > $childcount) {
$itemoffset = $childcount - $showelements + 1;
}
}
if (module::get_var("navcarousel", "noajax", false)) {
$ajaxhandler = "";
} else {
$ajaxhandler = "itemLoadCallback: navcarousel_itemLoadCallback,\n";
}
if (module::get_var("navcarousel", "showondomready", false)) {
$onwinload = "";
} else {
$onwinload = "});\n
$(window).load(function () {\n";
}
$content = "\n<!-- Navcarousel -->
<style type=\"text/css\">\n
". $containerwidth ."
.jcarousel-skin-tango .jcarousel-clip-horizontal {\n
width: ". $carouselwidth .";\n
height: ". ($thumbsize + 25) ."px;\n
}\n
.jcarousel-skin-tango .jcarousel-item {\n
width: ". ($thumbsize + 25) ."px;\n
height: ". ($thumbsize + 25) ."px;\n
}\n
#navcarousel-loader {\n
height: ". ($thumbsize + 25) ."px;\n
}\n
.jcarousel-skin-tango .jcarousel-next-horizontal {
top: ". (intval(floor($thumbsize / 2.8))) ."px;
}
.jcarousel-skin-tango .jcarousel-prev-horizontal {
top: ". (intval(floor($thumbsize / 2.8))) ."px;
}
</style>\n
<script type=\"text/javascript\">\n
jQuery(document).ready(function() {\n
jQuery('#navcarousel').jcarousel({\n
". $ajaxhandler ."
itemFallbackDimension: ". ($thumbsize + 25) .",\n
start: ". $itemoffset .",\n
size: ". $childcount .",\n
visible: ". $showelements .",\n
". $rtl_support ."
scroll: ". module::get_var("navcarousel", "scrollsize", "7") ."\n
});\n
". $onwinload ."
$(\".jcarousel-prev-horizontal\").css(\"visibility\", \"visible\");\n
$(\".jcarousel-next-horizontal\").css(\"visibility\", \"visible\");\n
$(\"#navcarousel\").css(\"visibility\", \"visible\");\n
$(\"#navcarousel-wrapper\").css(\"background\", \"none\");\n
$(\"#navcarousel-wrapper\").css(\"float\", \"left\");\n
});\n
</script>\n
<!-- Navcaoursel -->";
}
if (!module::get_var("navcarousel", "abovephoto", false)) {
if ($theme->page_type == "item") {
return new View("navcarousel.html");
$content .= new View("navcarousel.html");
}
}
return $content;
}
static function photo_top($theme) {

View File

@ -205,10 +205,12 @@
if (this.options.initCallback != null)
this.options.initCallback(this, 'init');
/*
if (!windowLoaded && $.browser.safari) {
this.buttons(false, false);
$(window).bind('load.jcarousel', function() { self.setup(); });
} else
*/
this.setup();
};
@ -894,6 +896,7 @@
var el = e.jquery != undefined ? e[0] : e;
/*
if (p == 'marginRight' && $.browser.safari) {
var old = {'display': 'block', 'float': 'none', 'width': 'auto'}, oWidth, oWidth2;
@ -904,6 +907,7 @@
return oWidth2 - oWidth;
}
*/
return $jc.intval($.css(el, p));
},

View File

@ -1,3 +1,7 @@
name = "Navigation Carousel"
description = "Adds a navigation carousel under the photo."
version = 4
author_name = ""
author_url = ""
info_url = "http://codex.gallery2.org/Gallery3:Modules:navcarousel"
discuss_url = "http://gallery.menalto.com/forum_module_navcarousel"

View File

@ -1,88 +1,4 @@
<?php defined("SYSPATH") or die("No direct script access.");
if (locales::is_rtl()) {
$rtl_support = "rtl: true,\n";
} else {
$rtl_support = "rtl: false,\n";
}
$carouselwidth = module::get_var("navcarousel", "carouselwidth", "600");
if ($carouselwidth == 0) {
$carouselwidth = "100%";
$containerwidth = "";
} else {
$carouselwidth = $carouselwidth ."px";
$containerwidth = ".jcarousel-skin-tango .jcarousel-container-horizontal {\n
width: ". $carouselwidth .";\n
}\n";
}
$thumbsize = module::get_var("navcarousel", "thumbsize", "50");
$showelements = module::get_var("navcarousel", "showelements", "7");
$childcount = $theme->item->parent()->viewable()->children_count();
$itemoffset = intval(floor($showelements / 2));
if ($childcount <= $showelements) {
$itemoffset = 1;
} else {
$itempos = $theme->item->parent()->get_position($theme->item);
$itemoffset = $itempos - $itemoffset;
if ($itemoffset < 1) {
$itemoffset = 1;
}
if (($itemoffset + $showelements) > $childcount) {
$itemoffset = $childcount - $showelements + 1;
}
}
if (module::get_var("navcarousel", "noajax", false)) {
$ajaxhandler = "";
} else {
$ajaxhandler = "itemLoadCallback: navcarousel_itemLoadCallback,\n";
}
if (module::get_var("navcarousel", "showondomready", false)) {
$onwinload = "";
} else {
$onwinload = "});\n
$(window).load(function () {\n";
}
echo "\n<!-- Navcaoursel -->
<style type=\"text/css\">\n
". $containerwidth ."
.jcarousel-skin-tango .jcarousel-clip-horizontal {\n
width: ". $carouselwidth .";\n
height: ". ($thumbsize + 25) ."px;\n
}\n
.jcarousel-skin-tango .jcarousel-item {\n
width: ". ($thumbsize + 25) ."px;\n
height: ". ($thumbsize + 25) ."px;\n
}\n
#navcarousel-loader {\n
height: ". ($thumbsize + 25) ."px;\n
}\n
.jcarousel-skin-tango .jcarousel-next-horizontal {
top: ". (intval(floor($thumbsize / 2.8))) ."px;
}
.jcarousel-skin-tango .jcarousel-prev-horizontal {
top: ". (intval(floor($thumbsize / 2.8))) ."px;
}
</style>\n
<script type=\"text/javascript\">\n
jQuery(document).ready(function() {\n
jQuery('#navcarousel').jcarousel({\n
". $ajaxhandler ."
itemFallbackDimension: ". ($thumbsize + 25) .",\n
start: ". $itemoffset .",\n
size: ". $childcount .",\n
visible: ". $showelements .",\n
". $rtl_support ."
scroll: ". module::get_var("navcarousel", "scrollsize", "7") ."\n
});\n
". $onwinload ."
$(\".jcarousel-prev-horizontal\").css(\"visibility\", \"visible\");\n
$(\".jcarousel-next-horizontal\").css(\"visibility\", \"visible\");\n
$(\"#navcarousel\").css(\"visibility\", \"visible\");\n
$(\"#navcarousel-wrapper\").css(\"background\", \"none\");\n
$(\"#navcarousel-wrapper\").css(\"float\", \"left\");\n
});\n
</script>\n
<!-- Navcaoursel -->";
$thumbsize = module::get_var("navcarousel", "thumbsize", "50");
$parent = $item->parent();
$item_counter = 0;

View File

@ -23,12 +23,12 @@
<fieldset>
<legend><?= t("Confirmation policy") ?></legend>
<ul>
<? foreach ($policy_list as $policy => $text): ?>
<?php foreach ($policy_list as $policy => $text): ?>
<li>
<?= form::radio("policy", $policy, $policy == $form["policy"]) ?>
<?= form::label("policy", $text) ?>
</li>
<? endforeach ?>
<?php endforeach ?>
<li>
<?= form::checkbox("email_verification", "true", !empty($form["email_verification"]), $disable_email) ?>
<?= form::label("email_verification", t("Require e-mail verification when a visitor creates an account")) ?>
@ -42,12 +42,12 @@
<?= form::label("subject_prefix", t("Email subject line prefix, with trailing spaces as needed (e.g. '[Gallery3] ')")) ?>
</li>
<li>
<? if (!empty($group_list)): ?>
<?php if (!empty($group_list)): ?>
<label for="group" class="g-left"> <?= t("Default group: ") ?></label>
<?= form::dropdown(array("name" => "group"), $group_list, $form["group"]) ?></label>
<? else: ?>
<?php else: ?>
<?= form::hidden("group", $form["group"]) ?></label>
<? endif ?>
<?php endif ?>
</li>
<li>
<?= form::submit(array("id" => "g-registration-admin", "name" => "save", "class" => "submit", "style" => "clear:both!important"), t("Update")) ?>
@ -56,7 +56,7 @@
</fieldset>
</form>
</div>
<? if (count($pending)): ?>
<?php if (count($pending)): ?>
<div id="g-activate-pending-users">
<?= form::open($activate, array("method" => "post"), $hidden) ?>
<fieldset>
@ -73,14 +73,14 @@
<th><?= t("Email") ?></th>
<th><?= t("Registered") ?></th>
</tr>
<? foreach ($pending as $user): ?>
<?php foreach ($pending as $user): ?>
<tr class="<?= text::alternate("g-odd", "g-even") ?>">
<td>
<? if ($user->state != 2): ?>
<?php if ($user->state != 2): ?>
<?= form::checkbox("activate[]", $user->id) ?>
<? else: ?>
<?php else: ?>
&nbsp;
<? endif ?>
<?php endif ?>
</td>
<td><?= register::format_registration_state($user->state) ?></td>
<td><?= t($user->name) ?></td>
@ -88,11 +88,11 @@
<td><a href="mailto:<?= t($user->email) ?>"><?= t($user->email) ?></a></td>
<td><?= t(gallery::date_time($user->request_date)) ?></td>
</tr>
<? endforeach ?>
<?php endforeach ?>
</table>
<?= form::submit(array("id" => "g-registration-activate", "name" => "activate_users", "class" => "submit"), t("Activate selected")) ?>
</fieldset>
</form>
</div>
<? endif ?>
<?php endif ?>
</div>

View File

@ -1,17 +1,17 @@
#g-content fieldset {
display: block;
}
#g-content fieldset.g-tag-cloud-html5-admin-form-top {
width: 80%;
clear: both;
}
#g-content fieldset.g-tag-cloud-html5-admin-form-left {
width: 45%;
float: left;
clear: left;
margin-right: 2%
}
#g-content fieldset.g-tag-cloud-html5-admin-form-right {
width: 45%;
clear: right;
#g-content fieldset {
display: block;
}
#g-content fieldset.g-tag-cloud-html5-admin-form-top {
width: 80%;
clear: both;
}
#g-content fieldset.g-tag-cloud-html5-admin-form-left {
width: 45%;
float: left;
clear: left;
margin-right: 2%
}
#g-content fieldset.g-tag-cloud-html5-admin-form-right {
width: 45%;
clear: right;
}

View File

@ -1,106 +1,106 @@
/* Tag cloud - sidebar ~~~~~~~~~~~~~~~~~~~~~~~ */
/* comment out this first block to make the inline tags appear if the cloud doesn't load */
#g-tag-cloud-html5-tags {
display: none;
}
#g-tag-cloud-html5-tags ul {
text-align: justify;
}
#g-tag-cloud-html5-tags ul li {
display: inline;
text-align: justify;
}
#g-tag-cloud-html5-tags ul li a {
text-decoration: none;
}
#g-tag-cloud-html5-tags ul li span {
display: none;
}
#g-tag-cloud-html5-page ul li a:hover {
text-decoration: underline;
}
/* Tag cloud - whole cloud page ~~~~~~~~~~~~~~~~~~~~~~~ */
#g-tag-cloud-html5-page-canvas {
display: block;
margin: 0 auto;
}
#g-tag-cloud-html5-page-tags ul {
font-size: 1.2em;
text-align: justify;
}
#g-tag-cloud-html5-page-tags ul li {
display: inline;
line-height: 1.5em;
text-align: justify;
}
#g-tag-cloud-html5-page-tags ul li a {
text-decoration: none;
}
#g-tag-cloud-html5-page-tags ul li span {
display: none;
}
#g-tag-cloud-html5-page-tags ul li.size0 a {
color: #9cf;
font-size: 70%;
font-weight: 100;
}
#g-tag-cloud-html5-page-tags ul li.size1 a {
color: #9cf;
font-size: 80%;
font-weight: 100;
}
#g-tag-cloud-html5-page-tags ul li.size2 a {
color: #69f;
font-size: 90%;
font-weight: 300;
}
#g-tag-cloud-html5-page-tags ul li.size3 a {
color: #69c;
font-size: 100%;
font-weight: 500;
}
#g-tag-cloud-html5-page-tags ul li.size4 a {
color: #369;
font-size: 110%;
font-weight: 700;
}
#g-tag-cloud-html5-page-tags ul li.size5 a {
color: #0e2b52;
font-size: 120%;
font-weight: 900;
}
#g-tag-cloud-html5-page-tags ul li.size6 a {
color: #0e2b52;
font-size: 130%;
font-weight: 900;
}
#g-tag-cloud-html5-page-tags ul li.size7 a {
color: #0e2b52;
font-size: 140%;
font-weight: 900;
}
#g-tag-cloud-html5-page-tags ul li a:hover {
color: #f30;
text-decoration: underline;
}
/* Tag cloud - sidebar ~~~~~~~~~~~~~~~~~~~~~~~ */
/* comment out this first block to make the inline tags appear if the cloud doesn't load */
#g-tag-cloud-html5-tags {
display: none;
}
#g-tag-cloud-html5-tags ul {
text-align: justify;
}
#g-tag-cloud-html5-tags ul li {
display: inline;
text-align: justify;
}
#g-tag-cloud-html5-tags ul li a {
text-decoration: none;
}
#g-tag-cloud-html5-tags ul li span {
display: none;
}
#g-tag-cloud-html5-page ul li a:hover {
text-decoration: underline;
}
/* Tag cloud - whole cloud page ~~~~~~~~~~~~~~~~~~~~~~~ */
#g-tag-cloud-html5-page-canvas {
display: block;
margin: 0 auto;
}
#g-tag-cloud-html5-page-tags ul {
font-size: 1.2em;
text-align: justify;
}
#g-tag-cloud-html5-page-tags ul li {
display: inline;
line-height: 1.5em;
text-align: justify;
}
#g-tag-cloud-html5-page-tags ul li a {
text-decoration: none;
}
#g-tag-cloud-html5-page-tags ul li span {
display: none;
}
#g-tag-cloud-html5-page-tags ul li.size0 a {
color: #9cf;
font-size: 70%;
font-weight: 100;
}
#g-tag-cloud-html5-page-tags ul li.size1 a {
color: #9cf;
font-size: 80%;
font-weight: 100;
}
#g-tag-cloud-html5-page-tags ul li.size2 a {
color: #69f;
font-size: 90%;
font-weight: 300;
}
#g-tag-cloud-html5-page-tags ul li.size3 a {
color: #69c;
font-size: 100%;
font-weight: 500;
}
#g-tag-cloud-html5-page-tags ul li.size4 a {
color: #369;
font-size: 110%;
font-weight: 700;
}
#g-tag-cloud-html5-page-tags ul li.size5 a {
color: #0e2b52;
font-size: 120%;
font-weight: 900;
}
#g-tag-cloud-html5-page-tags ul li.size6 a {
color: #0e2b52;
font-size: 130%;
font-weight: 900;
}
#g-tag-cloud-html5-page-tags ul li.size7 a {
color: #0e2b52;
font-size: 140%;
font-weight: 900;
}
#g-tag-cloud-html5-page-tags ul li a:hover {
color: #f30;
text-decoration: underline;
}

View File

@ -1,177 +1,177 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2013 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class tag_cloud_html5_installer {
static function install() {
// clear and reset default values. this is also called in the admin menu for
// 'reset all to default values' and if the upgrader sees variables missing.
module::clear_all_vars("tag_cloud_html5");
module::set_var("tag_cloud_html5", "show_wholecloud_link", true);
module::set_var("tag_cloud_html5", "show_add_tag_form", true);
module::set_var("tag_cloud_html5", "show_wholecloud_list", true);
module::set_var("tag_cloud_html5", "maxtags_sidebar", 30);
module::set_var("tag_cloud_html5", "width_sidebar", 1.00);
module::set_var("tag_cloud_html5", "height_sidebar", 0.8);
module::set_var("tag_cloud_html5", "maxtags_wholecloud", 500);
module::set_var("tag_cloud_html5", "width_wholecloud", 0.95);
module::set_var("tag_cloud_html5", "height_wholecloud", 0.75);
module::set_var("tag_cloud_html5", "options_sidebar", json_encode(array(
"maxSpeed" => 0.05,
"deadZone" => 0.25,
"initial" => array(0.8,-0.3),
"initialDecel" => true,
"zoom" => 1.25,
"depth" => 0.5,
"outlineMethod" => "colour",
"outlineOffset" => 8,
"outlineColour" => "#eeeeee",
"textColour" => "",
"textFont" => "",
"textHeight" => 12,
"frontSelect" => true,
"wheelZoom" => false,
"shape" => "sphere",
"lock" => "",
"stretchX" => 1.0,
"stretchY" => 1.0,
"decel" => 0.92,
"physModel" => true,
"maxInputZone" => 0.25,
"minSpeed" => 0.002
)));
module::set_var("tag_cloud_html5", "options_wholecloud", json_encode(array(
"maxSpeed" => 0.05,
"deadZone" => 0.25,
"initial" => array(0.8,-0.3),
"initialDecel" => true,
"zoom" => 1.25,
"depth" => 0.5,
"outlineMethod" => "colour",
"outlineOffset" => 8,
"outlineColour" => "#eeeeee",
"textColour" => "",
"textFont" => "",
"textHeight" => 13,
"frontSelect" => true,
"wheelZoom" => false,
"shape" => "sphere",
"lock" => "",
"stretchX" => 1.0,
"stretchY" => 1.0,
"decel" => 0.92,
"physModel" => true,
"maxInputZone" => 0.15,
"minSpeed" => 0.002
)));
module::set_version("tag_cloud_html5", 7);
}
static function upgrade() {
if (is_null(module::get_var("tag_cloud_html5", "options_sidebar")) ||
is_null(module::get_var("tag_cloud_html5", "options_wholecloud")) ||
(module::get_version("tag_cloud_html5") < 1) ) {
module::install("tag_cloud_html5");
}
if (module::get_version("tag_cloud_html5") < 2) {
// added wheelZoom, which is not accessible from admin menu
$options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true);
$options["wheelZoom"] = false;
module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options));
$options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true);
$options["wheelZoom"] = false;
module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options));
}
if (module::get_version("tag_cloud_html5") < 3) {
// added deadZone, initial, and initialDecel
module::set_var("tag_cloud_html5", "show_add_tag_form", true);
$options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true);
$options["deadZone"] = 0.25;
$options["initial"] = array(0.8,-0.3);
$options["initialDecel"] = true;
module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options));
$options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true);
$options["deadZone"] = 0.25;
$options["initial"] = array(0.8,-0.3);
$options["initialDecel"] = true;
module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options));
}
if (module::get_version("tag_cloud_html5") < 4) {
// added height_sidebar, then scaled back zoom and textHeight for consistency
module::set_var("tag_cloud_html5", "height_sidebar", 0.8);
$options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true);
$options["zoom"] = $options["zoom"] / 0.8;
$options["textHeight"] = $options["textHeight"] * 0.8;
module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options));
}
if (module::get_version("tag_cloud_html5") < 5) {
// added lots of options that are on admin menu
// added physModel, lock, and initialDecel as options not on admin menu
// (previously initialDecel was on menu, so reset here)
module::set_var("tag_cloud_html5", "width_sidebar", 1.00);
module::set_var("tag_cloud_html5", "width_wholecloud", 0.95);
module::set_var("tag_cloud_html5", "height_wholecloud", 0.75);
$options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true);
$options["deadZone"] = $options["deadZone"];
$options["shape"] = "sphere";
$options["lock"] = "";
$options["stretchX"] = 1.0;
$options["stretchY"] = 1.0;
$options["decel"] = 0.92;
$options["physModel"] = true;
$options["maxInputZone"] = 0.25;
$options["minSpeed"] = 0.002;
$options["initialDecel"] = true;
module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options));
$options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true);
$options["deadZone"] = $options["deadZone"];
$options["shape"] = "sphere";
$options["lock"] = "";
$options["stretchX"] = 1.0;
$options["stretchY"] = 1.0;
$options["decel"] = 0.92;
$options["physModel"] = true;
$options["maxInputZone"] = 0.15;
$options["minSpeed"] = 0.002;
$options["initialDecel"] = true;
module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options));
}
// note: there are no variable changes for v6 and v7 upgrades
module::set_version("tag_cloud_html5", 7);
}
static function uninstall() {
module::clear_all_vars("tag_cloud_html5");
}
}
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2013 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class tag_cloud_html5_installer {
static function install() {
// clear and reset default values. this is also called in the admin menu for
// 'reset all to default values' and if the upgrader sees variables missing.
module::clear_all_vars("tag_cloud_html5");
module::set_var("tag_cloud_html5", "show_wholecloud_link", true);
module::set_var("tag_cloud_html5", "show_add_tag_form", true);
module::set_var("tag_cloud_html5", "show_wholecloud_list", true);
module::set_var("tag_cloud_html5", "maxtags_sidebar", 30);
module::set_var("tag_cloud_html5", "width_sidebar", 1.00);
module::set_var("tag_cloud_html5", "height_sidebar", 0.8);
module::set_var("tag_cloud_html5", "maxtags_wholecloud", 500);
module::set_var("tag_cloud_html5", "width_wholecloud", 0.95);
module::set_var("tag_cloud_html5", "height_wholecloud", 0.75);
module::set_var("tag_cloud_html5", "options_sidebar", json_encode(array(
"maxSpeed" => 0.05,
"deadZone" => 0.25,
"initial" => array(0.8,-0.3),
"initialDecel" => true,
"zoom" => 1.25,
"depth" => 0.5,
"outlineMethod" => "colour",
"outlineOffset" => 8,
"outlineColour" => "#eeeeee",
"textColour" => "",
"textFont" => "",
"textHeight" => 12,
"frontSelect" => true,
"wheelZoom" => false,
"shape" => "sphere",
"lock" => "",
"stretchX" => 1.0,
"stretchY" => 1.0,
"decel" => 0.92,
"physModel" => true,
"maxInputZone" => 0.25,
"minSpeed" => 0.002
)));
module::set_var("tag_cloud_html5", "options_wholecloud", json_encode(array(
"maxSpeed" => 0.05,
"deadZone" => 0.25,
"initial" => array(0.8,-0.3),
"initialDecel" => true,
"zoom" => 1.25,
"depth" => 0.5,
"outlineMethod" => "colour",
"outlineOffset" => 8,
"outlineColour" => "#eeeeee",
"textColour" => "",
"textFont" => "",
"textHeight" => 13,
"frontSelect" => true,
"wheelZoom" => false,
"shape" => "sphere",
"lock" => "",
"stretchX" => 1.0,
"stretchY" => 1.0,
"decel" => 0.92,
"physModel" => true,
"maxInputZone" => 0.15,
"minSpeed" => 0.002
)));
module::set_version("tag_cloud_html5", 7);
}
static function upgrade() {
if (is_null(module::get_var("tag_cloud_html5", "options_sidebar")) ||
is_null(module::get_var("tag_cloud_html5", "options_wholecloud")) ||
(module::get_version("tag_cloud_html5") < 1) ) {
module::install("tag_cloud_html5");
}
if (module::get_version("tag_cloud_html5") < 2) {
// added wheelZoom, which is not accessible from admin menu
$options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true);
$options["wheelZoom"] = false;
module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options));
$options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true);
$options["wheelZoom"] = false;
module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options));
}
if (module::get_version("tag_cloud_html5") < 3) {
// added deadZone, initial, and initialDecel
module::set_var("tag_cloud_html5", "show_add_tag_form", true);
$options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true);
$options["deadZone"] = 0.25;
$options["initial"] = array(0.8,-0.3);
$options["initialDecel"] = true;
module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options));
$options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true);
$options["deadZone"] = 0.25;
$options["initial"] = array(0.8,-0.3);
$options["initialDecel"] = true;
module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options));
}
if (module::get_version("tag_cloud_html5") < 4) {
// added height_sidebar, then scaled back zoom and textHeight for consistency
module::set_var("tag_cloud_html5", "height_sidebar", 0.8);
$options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true);
$options["zoom"] = $options["zoom"] / 0.8;
$options["textHeight"] = $options["textHeight"] * 0.8;
module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options));
}
if (module::get_version("tag_cloud_html5") < 5) {
// added lots of options that are on admin menu
// added physModel, lock, and initialDecel as options not on admin menu
// (previously initialDecel was on menu, so reset here)
module::set_var("tag_cloud_html5", "width_sidebar", 1.00);
module::set_var("tag_cloud_html5", "width_wholecloud", 0.95);
module::set_var("tag_cloud_html5", "height_wholecloud", 0.75);
$options = json_decode(module::get_var("tag_cloud_html5", "options_sidebar"),true);
$options["deadZone"] = $options["deadZone"];
$options["shape"] = "sphere";
$options["lock"] = "";
$options["stretchX"] = 1.0;
$options["stretchY"] = 1.0;
$options["decel"] = 0.92;
$options["physModel"] = true;
$options["maxInputZone"] = 0.25;
$options["minSpeed"] = 0.002;
$options["initialDecel"] = true;
module::set_var("tag_cloud_html5", "options_sidebar", json_encode($options));
$options = json_decode(module::get_var("tag_cloud_html5", "options_wholecloud"),true);
$options["deadZone"] = $options["deadZone"];
$options["shape"] = "sphere";
$options["lock"] = "";
$options["stretchX"] = 1.0;
$options["stretchY"] = 1.0;
$options["decel"] = 0.92;
$options["physModel"] = true;
$options["maxInputZone"] = 0.15;
$options["minSpeed"] = 0.002;
$options["initialDecel"] = true;
module::set_var("tag_cloud_html5", "options_wholecloud", json_encode($options));
}
// note: there are no variable changes for v6 and v7 upgrades
module::set_version("tag_cloud_html5", 7);
}
static function uninstall() {
module::clear_all_vars("tag_cloud_html5");
}
}

View File

@ -1,58 +1,58 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2013 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class Form_Input extends Form_Input_Core {
/**
* Custom validation rule: numrange
* 0 args : returns error if not numeric
* 1 arg : returns error if not numeric OR if below min
* 2 args : returns error if not numeric OR if below min OR if above max
*/
protected function rule_numrange($min = null, $max = null) {
if (is_numeric($this->value)) {
if (!is_null($min) && ($this->value < $min)) {
// below min
$this->errors['numrange'] = true;
$this->error_messages['numrange'] = t('Value is below minimum of').' '.$min;
} elseif (!is_null($max) && ($this->value > $max)) {
// above max
$this->errors['numrange'] = true;
$this->error_messages['numrange'] = t('Value is above maximum of').' '.$max;;
}
} else {
// not numeric
$this->errors['numrange'] = true;
$this->error_messages['numrange'] = t('Value is not numeric');
}
}
/**
* Custom validation rule: color
* returns no error if string is formatted as #hhhhhh OR if string is empty
* to exclude the empty case, add "required" as another rule
*/
protected function rule_color() {
if (preg_match("/^#[0-9A-Fa-f]{6}$|^$/", $this->value) == 0) {
$this->errors['color'] = true;
$this->error_messages['color'] = t('Color is not in #hhhhhh format');
}
}
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2013 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class Form_Input extends Form_Input_Core {
/**
* Custom validation rule: numrange
* 0 args : returns error if not numeric
* 1 arg : returns error if not numeric OR if below min
* 2 args : returns error if not numeric OR if below min OR if above max
*/
protected function rule_numrange($min = null, $max = null) {
if (is_numeric($this->value)) {
if (!is_null($min) && ($this->value < $min)) {
// below min
$this->errors['numrange'] = true;
$this->error_messages['numrange'] = t('Value is below minimum of').' '.$min;
} elseif (!is_null($max) && ($this->value > $max)) {
// above max
$this->errors['numrange'] = true;
$this->error_messages['numrange'] = t('Value is above maximum of').' '.$max;;
}
} else {
// not numeric
$this->errors['numrange'] = true;
$this->error_messages['numrange'] = t('Value is not numeric');
}
}
/**
* Custom validation rule: color
* returns no error if string is formatted as #hhhhhh OR if string is empty
* to exclude the empty case, add "required" as another rule
*/
protected function rule_color() {
if (preg_match("/^#[0-9A-Fa-f]{6}$|^$/", $this->value) == 0) {
$this->errors['color'] = true;
$this->error_messages['color'] = t('Color is not in #hhhhhh format');
}
}
}

View File

@ -30,7 +30,7 @@
</script>
<div id="g-tag-cloud-html5">
<canvas id="g-tag-cloud-html5-canvas">
<? echo t('Tag cloud loading...'); ?>
<?php echo t('Tag cloud loading...'); ?>
</canvas>
</div>
<div id="g-tag-cloud-html5-tags">

View File

@ -51,7 +51,7 @@
</script>
<div id="g-tag-cloud-html5-embed">
<canvas id="g-tag-cloud-html5-embed-canvas">
<? echo t('Tag cloud loading...'); ?>
<?php echo t('Tag cloud loading...'); ?>
</canvas>
</div>
<div id="g-tag-cloud-html5-embed-tags" style="display: none">

View File

@ -31,7 +31,7 @@
</div>
<div id="g-tag-cloud-html5-page">
<canvas id="g-tag-cloud-html5-page-canvas">
<? echo t('Tag cloud loading...'); ?>
<?php echo t('Tag cloud loading...'); ?>
</canvas>
</div>
<div id="g-tag-cloud-html5-page-tags">

View File

@ -24,7 +24,7 @@
<?= t("Add captions for photos in <b>%album_title</b>", array("album_title" => $album->title)) ?>
</legend>
<? foreach ($album->viewable()->children() as $child): ?>
<?php foreach ($album->viewable()->children() as $child): ?>
<table>
<tr>
<td style="width: 140px">
@ -40,12 +40,12 @@
<label for="description[<?= $child->id ?>]"> <?= t("Description") ?> </label>
<textarea style="height: 5em" name="description[<?= $child->id ?>]"><?= $child->description ?></textarea>
</li>
<? if ($enable_tags): ?>
<?php if ($enable_tags): ?>
<li>
<label for="tags[<?= $child->id ?>]"> <?= t("Tags (comma separated)") ?> </label>
<input type="text" name="tags[<?= $child->id ?>]" class="ac_input" autocomplete="off" value="<?= html::chars($tags[$child->id]) ?>"/>
</li>
<? endif ?>
<?php endif ?>
<li>
<label for="filename[<?= $child->id ?>]"> <?= t("Filename") ?> </label>
<input type="text" name="filename[<?= $child->id ?>]" class="ac_input" autocomplete="off" value="<?= html::chars($child->name) ?>"/>
@ -58,7 +58,7 @@
</td>
</tr>
</table>
<? endforeach ?>
<?php endforeach ?>
</fieldset>
<fieldset>
<input type="submit" name="cancel" value="<?= t("Cancel") ?>"/>

View File

@ -116,11 +116,11 @@ class latestupdates_Controller extends Controller {
// Set up the previous and next page buttons.
if ($page > 1) {
$previous_page = $page - 1;
$view->previous_page_link = url::site("latestupdates/users/{$str_display_type}/{$user_id}?page={$previous_page}");
# $view->previous_page_link = url::site("latestupdates/users/{$str_display_type}/{$user_id}?page={$previous_page}");
}
if ($page < $max_pages) {
$next_page = $page + 1;
$view->next_page_link = url::site("latestupdates/users/{$str_display_type}/{$user_id}?page={$next_page}");
# $view->next_page_link = url::site("latestupdates/users/{$str_display_type}/{$user_id}?page={$next_page}");
}
// Set up and display the actual page.
@ -201,11 +201,11 @@ class latestupdates_Controller extends Controller {
// Set up the previous and next page buttons.
if ($page > 1) {
$previous_page = $page - 1;
$view->previous_page_link = url::site("latestupdates/albums/{$item->id}?page={$previous_page}");
# $view->previous_page_link = url::site("latestupdates/albums/{$item->id}?page={$previous_page}");
}
if ($page < $max_pages) {
$next_page = $page + 1;
$view->next_page_link = url::site("latestupdates/albums/{$item->id}?page={$next_page}");
# $view->next_page_link = url::site("latestupdates/albums/{$item->id}?page={$next_page}");
}
// Set up breadcrumbs.
@ -290,11 +290,11 @@ class latestupdates_Controller extends Controller {
// Set up the previous and next page buttons.
if ($page > 1) {
$previous_page = $page - 1;
$view->previous_page_link = url::site("latestupdates/updates?page={$previous_page}");
# $view->previous_page_link = url::site("latestupdates/updates?page={$previous_page}");
}
if ($page < $max_pages) {
$next_page = $page + 1;
$view->next_page_link = url::site("latestupdates/updates?page={$next_page}");
# $view->next_page_link = url::site("latestupdates/updates?page={$next_page}");
}
// Set up and display the actual page.
@ -430,7 +430,6 @@ class latestupdates_Controller extends Controller {
$count = $item
->viewable()
->where("type", "!=", "album")
->order_by("created", "DESC")
->descendants_count();
} else {
$count = ORM::factory("item")
@ -525,7 +524,6 @@ class latestupdates_Controller extends Controller {
->viewable()
->merge_where($str_where)
->where($str_orderby_field, ">", $item->$str_orderby_field)
->order_by($str_orderby_field, "DESC")
->count_all();
} else {
if ($str_display_type == "descendants") {
@ -534,7 +532,6 @@ class latestupdates_Controller extends Controller {
->viewable()
->where("type", "!=", "album")
->where("created", ">", $item->created)
->order_by("created", "DESC")
->descendants_count();
} else {
$position = ORM::factory("item")
@ -542,7 +539,6 @@ class latestupdates_Controller extends Controller {
->where("owner_id", "=", $user_id)
->merge_where($str_where)
->where($str_orderby_field, ">", $item->$str_orderby_field)
->order_by($str_orderby_field, "DESC")
->count_all();
}
}

View File

@ -1,10 +1,10 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<ul id="g-update-list">
<? foreach($update_links as $title => $url): ?>
<?php foreach($update_links as $title => $url): ?>
<li style="clear: both;">
<a href="<?= $url ?>">
<?= t($title) ?>
</a>
</li>
<? endforeach ?>
<?php endforeach ?>
</ul>

View File

@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? if (count($items) == 0): ?>
<?php if (count($items) == 0): ?>
<center><?=t("This user hasn't uploaded anything yet."); ?></center>
<? else: ?>
<?php else: ?>
<script>
$(document).ready(function() { setTimeout(LoadCarousel, 100); });
function LoadCarousel() {
@ -18,14 +18,14 @@ function LoadCarousel() {
<a href="#" class="prev">&nbsp</a>
<div class="jCarouselLite">
<ul>
<? foreach ($items as $photo): ?>
<?php foreach ($items as $photo): ?>
<li class="g-item g-photo">
<a href="<?= $photo->url() ?>" title="<?= html::purify($photo->title)->for_html_attr() ?>">
<img <?= photo::img_dimensions($photo->thumb_width, $photo->thumb_height, 100) ?>
src="<?= $photo->thumb_url() ?>" alt="<?= html::purify($photo->title)->for_html_attr() ?>" />
</a>
</li>
<? endforeach ?>
<?php endforeach ?>
</ul>
</div>
<a href="#" class="next">&nbsp</a>
@ -34,4 +34,4 @@ function LoadCarousel() {
</div>
<br />
<div style="width: 510px; text-align: right;"><a href="<?=$str_view_more_url; ?>"><?=$str_view_more_title; ?> >></a></div>
<? endif; ?>
<?php endif; ?>

View File

@ -1,5 +1,5 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? if (module::get_version("gallery") > 31): ?>
<?php if (module::get_version("gallery") > 31): ?>
<script type="text/javascript">
$(function() {
@ -21,16 +21,16 @@
document.moduleorder.submit();
}
</script>
<? endif ?>
<?php endif ?>
<div id="g-block-admin" class="g-block ui-helper-clearfix">
<h1> <?= t("Manage module order") ?> </h1>
<? if (module::get_version("gallery") < 32): ?>
<?php if (module::get_version("gallery") < 32): ?>
<h2> <?= t("Warning") ?> </h2>
<p>
<?= t("You must have Gallery core version of 32 or higher installed to use this module. Please update your installation.") ?>
</p>
<? else: ?>
<?php else: ?>
<p>
<?= t("Select and drag blocks to change the order. Click 'Save' to save your changes.") ?>
</p>
@ -55,5 +55,5 @@
</form>
</div>
<a class="ui-state-default ui-corner-all" style="padding: 5px;" href="javascript: buildmodulelist()">Save</a>
<? endif ?>
<?php endif ?>
</div>

View File

@ -1,10 +1,10 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? $indent_provider = module::get_var("gallery", "identity_provider") ?>
<? foreach ($modules as $ref => $text): ?>
<? $moduleinfo = module::info($text) ?>
<? if ($text == "gallery" || $text == $indent_provider || $moduleinfo->name == ""): ?>
<?php $indent_provider = module::get_var("gallery", "identity_provider") ?>
<?php foreach ($modules as $ref => $text): ?>
<?php $moduleinfo = module::info($text) ?>
<?php if ($text == "gallery" || $text == $indent_provider || $moduleinfo->name == ""): ?>
<li style="background-color:#A8A8A8; margin:0.5em; padding:0.3em 0.8em; display: none" ref="<?= $ref ?>"><?= $text ?></li>
<? else: ?>
<?php else: ?>
<li class="g-draggable" ref="<?= $ref ?>"><?= $moduleinfo->name ?></li>
<? endif ?>
<? endforeach ?>
<?php endif ?>
<?php endforeach ?>

View File

@ -23,13 +23,13 @@
<td><b>Description</b></td>
<td><b>Formats</b></td>
</tr>
<? foreach ($formats as $id => $data): ?>
<?php foreach ($formats as $id => $data): ?>
<tr>
<td><?= $data["name"] ?></td>
<td><?= $data["desc"] ?></td>
<td><?= movie_tools::formats_array_to_string($data["types"]) ?></td>
</tr>
<? endforeach; ?>
<?php endforeach; ?>
</table>
</p>

View File

@ -7,14 +7,14 @@
</div>
<br />
<? if (module::is_active("tag_cloud")) { ?>
<?php if (module::is_active("tag_cloud")) { ?>
<script type="text/javascript">
$("document").ready(function() {
$("#g-tag-cloud-page").gallery_tag_cloud_page({
movie: "<?= url::file("modules/tag_cloud/lib/tagcloud.swf") ?>"
<? foreach ($options as $option => $value) : ?>
<?php foreach ($options as $option => $value) : ?>
, <?= $option ?> : "<?= $value ?>"
<? endforeach ?>
<?php endforeach ?>
});
});
</script>
@ -26,10 +26,10 @@
</div>
</div>
<? } else { ?>
<?php } else { ?>
<div id="g-tag-cloud-page">
<?= tag::cloud(ORM::factory("tag")->count_all()); ?>
</div>
<? } ?>
<?php } ?>
<?= $theme->dynamic_bottom() ?>

View File

@ -11,19 +11,19 @@
<!-- First Row - Displays Number of Records -->
<tr>
<? if ($number_of_records > 0) { ?>
<?php if ($number_of_records > 0) { ?>
<td align="center" colspan="6"><?= t("Number of Records: %number_of_records",array("number_of_records" => $number_of_records)) ?></td>
<? } else { ?>
<?php } else { ?>
<td align="center" colspan="6"><?= t("Number of Records: 0") ?></td>
<? } ?>
<?php } ?>
</tr>
<!--Second Row - List the Page Numbers for Pagination if there are records in the Database -->
<? if ($number_of_records) { ?>
<?php if ($number_of_records) { ?>
<tr>
<td align="center" colspan="6"><?= $pager ?></td>
</tr>
<? } ?>
<?php } ?>
<!--Third Row - Headers -->
<tr>
@ -36,19 +36,19 @@
</tr>
<!--Forth Row etc.. - Lists the actual data -->
<? if ($number_of_records > 0) { ?>
<? foreach($data as $myData) { ?>
<?php if ($number_of_records > 0) { ?>
<?php foreach($data as $myData) { ?>
<tr>
<td><? echo $myData->id ?></td>
<td><?php echo $myData->id ?></td>
<td><? echo $myData->user_id ?></td>
<td><?php echo $myData->user_id ?></td>
<td>
<? if ($myData->user_id){ ?>
<?php if ($myData->user_id){ ?>
<a href="<?= url::site("user_profile/show/$myData->user_id") ?>" target="_blank"><?= html::clean($myData->user_name) ?> </a>
<? } else { ?>
<? echo $myData->user_name ?><br>
<? } ?>
<?php } else { ?>
<?php echo $myData->user_name ?><br>
<?php } ?>
</td>
<td>
@ -56,9 +56,9 @@
</td>
<td>
<? if ($use_default_gallery_date_format == "Yes") { ?>
<?php if ($use_default_gallery_date_format == "Yes") { ?>
<?= gallery::date_time($myData->time_stamp) ?>
<?
<?php
} else {
echo date($date_format,$myData->time_stamp);
}
@ -66,7 +66,7 @@
</td>
<td>
<?
<?php
switch ($myData->action)
{
case "Failed Login":
@ -107,12 +107,12 @@
?>
</td>
</tr>
<? } ?>
<? } else { ?>
<?php } ?>
<?php } else { ?>
<tr>
<td colspan="6"><center><b><?= t("No Records in Database") ?></b></center></td>
</tr>
<? } ?>
<?php } ?>
</table>
</div>