X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Findex.php;h=70e1ddd37b5fed12cc92e185a451f3099317ac68;hb=7bccbb21239ca3cecf2914e9b307ab1e1b1aa46e;hp=8e64e8a0769a76aadc56dc44148c9624bfb41b97;hpb=2eb2a4a01946e05b11b5309e1ed75cf7bdc9b7d2;p=brisk.git
diff --git a/web/index.php b/web/index.php
index 8e64e8a..70e1ddd 100644
--- a/web/index.php
+++ b/web/index.php
@@ -237,24 +237,71 @@ function poll_dom() {
return '';
}
-function carousel_top()
+function sidebanners_init($sidebanner_idx)
{
- $what = rand(1,2);
- if ($what == 1) {
- $rn = rand(1, 3);
- return (sprintf('', $rn));
+ for ($i = 0 ; $i < count($sidebanner_idx) ; $i++) {
+ printf(" sidebanner_init(%d);\n", $i);
+ }
+}
+
+function sidebanners_render($sidebanner, $sidebanner_idx)
+{
+ $sb_n = count($sidebanner_idx);
+ if ($sb_n == 0) {
+ return;
+ }
+
+ if ($sb_n == 1) {
+ printf("
");
+ }
+
+ for ($i = 0 ; $i < $sb_n ; $i++) {
+ $idx = $sidebanner_idx[$i];
+ $sb = $sidebanner[$idx];
+ if (!array_key_exists('link', $sb)
+ || !array_key_exists('title', $sb)
+ || !array_key_exists('icon_big', $sb)) {
+ continue;
}
- else {
- return (sprintf(''));
+ $sb_type = (array_key_exists('type', $sb) ? $sb['type'] : 'meeting');
+ if (array_key_exists('icon', $sb)) {
+ $sb_icon = $sb['icon'];
+ }
+ else {
+ if ($sb_type == 'meeting') {
+ if ($sb_n < 3) {
+ $sb_icon = 'img/brisk_meeting60.gif';
+ }
+ else {
+ $sb_icon = 'img/brisk_meeting35.gif';
+ }
+ }
+ else {
+ // no standard icon for other type of events please add them
+ continue;
+ }
+ }
+ $sb_dx = (array_key_exists('dx', $sb) ? $sb['dx'] : 100);
+ $sb_dy = (array_key_exists('dy', $sb) ? $sb['dy'] : -230);
+
+ printf('
\n");
printf($brisk_vertical_menu, '', '');
- if ($G_with_sidebanner xor $G_with_sidebanner2) {
- printf(" "); - } - - if ($G_with_sidebanner) { - printf("%s", $G_sidebanner); - if ($G_with_sidebanner2) { - printf(" "); - } - } - - - if ($G_with_sidebanner2) { - printf("%s", $G_sidebanner2); - } + sidebanners_render($G_sidebanner, $G_sidebanner_idx); printf(" | "); ?> - @@ -1034,19 +1099,21 @@ echo "$body"; ?> var g_lng = " echo $G_lng; ?>"; var g_tables_n = echo TABLES_N; ?>; var g_tables_auth_n = echo TABLES_AUTH_N; ?>; + var g_tables_cert_n = echo TABLES_CERT_N; ?>; var g_prefs, g_prefs_new = null; var g_listen; + var g_is_spawn = 0; + var g_withflash = false; + var g_imgct = 0; + var g_imgtot = g_preload_img_arr.length; + var g_brow = null; + var g_nd = null; var tra = null; var stat = ""; var subst = ""; var gst = new globst(); - var g_is_spawn = 0; var topbanner_sfx, topbanner_dx; // var nonunload = false; - var g_withflash = false; - var g_imgct = 0; - var g_imgtot = g_preload_img_arr.length; - var g_brow = null; var spo_slide, sup_slide; window.onload = function() { @@ -1071,13 +1138,7 @@ else { if ($G_with_topbanner) { printf(" topbanner_init();\n"); } - if ($G_with_sidebanner) { - printf(" sidebanner_init();\n"); - } - if ($G_with_sidebanner2) { - printf(" sidebanner2_init();\n"); - } - + sidebanners_init($G_sidebanner_idx); ?> sess = ""; xstm = new xynt_streaming(window, "", 80, 2, null /* console */, gst, 'index_php', 'sess', sess, $('sandbox'), 'index_rd.php', function(com){eval(com);}); @@ -1111,34 +1172,33 @@ if ($is_login) { //--> + + + + + + |
\n");
- /* printf($brisk_vertical_menu, ' ', - $brisk_donate); - printf($brisk_vertical_menu, ' ', - $brisk_donate);*/ - printf($brisk_vertical_menu, ' ', - $brisk_donate); - + printf($brisk_vertical_menu, '', $brisk_donate); - if ($G_with_sidebanner xor $G_with_sidebanner2) { - printf(" "); - } - - if ($G_with_sidebanner) { - printf("%s", $G_sidebanner); - if ($G_with_sidebanner2) { - printf(" "); - } - } - - - if ($G_with_sidebanner2) { - printf("%s", $G_sidebanner2); - } + sidebanners_render($G_sidebanner, $G_sidebanner_idx); printf(" | "); ?> |