Exemple #1
0
function drawTop($headcontent = false)
{
    global $_josh, $page, $user;
    ob_start('browser_output');
    error_debug('starting top', __FILE__, __LINE__);
    if ($_josh['db']['language'] == 'mysql') {
        url_header_utf8();
    }
    if (empty($page['helptext'])) {
        $page['helptext'] = getString('help_empty');
    }
    $return = draw_doctype() . draw_container('head', ($_josh['db']['language'] == 'mysql' ? draw_meta_utf8() : '') . draw_container('title', $page['title']) . draw_favicon(DIRECTORY_WRITE . '/favicon.png') . draw_css_src('/css/global.css', 'screen') . draw_css_src('/css/print.css', 'print') . draw_css_src('/css/ie.css', 'ie') . draw_css_src(DIRECTORY_WRITE . '/screen.css', 'screen') . lib_get('jquery') . draw_javascript_src() . draw_javascript_src('/js/global.js') . draw_css('
				#left table.left td.head, #left div.display div.title { background-color:#' . $page['color'] . '; }
				#left table.table th.table_title, #left form fieldset legend span, #left table.navigation { background-color:#' . $page['color'] . '; }
				#left table.navigation tr, #left form fieldset div.admin, #left table td.hilite { background-color:#' . $page['hilite'] . '; }
			') . draw_javascript('
			function confirmDelete(id) {
				if (confirm("' . getString('are_you_sure') . '")) {
					var newloc = "' . url_query_add(array('action' => 'delete', 'delete_id' => 'replaceme'), false) . '";
					location.href = newloc.replace("replaceme", id);
				}
			}
			function changeDept(id, user_id) {
				location.href="' . $_josh['request']['path_query'] . '&newDeptID=" + id + "&contactID=" + user_id;
			}
			') . drawSyndicateLink('bb') . $headcontent);
    $return .= draw_body_open() . '
		<div id="container">
			' . draw_div('banner', draw_img(DIRECTORY_WRITE . '/banner' . langExt() . '.png', $_SESSION['homepage'])) . '
			<div id="left">
				<div id="help">
					<div id="help_buttons">' . draw_link($_SESSION['homepage'], getString('home'), false, 'left') . draw_link('javascript:helpShow(' . user() . ')', getString('help_show'), false, array('class' => 'right' . ($user['help'] ? ' hidden' : false), 'id' => 'show_help_btn')) . draw_link('javascript:helpHide(' . user() . ')', getString('help_hide'), false, array('class' => 'right' . (!$user['help'] ? ' hidden' : false), 'id' => 'hide_help_btn'));
    if ($_SESSION['is_admin']) {
        if ($page['id']) {
            $return .= draw_link('/a/admin/page.php?id=' . $page['id'], getString('page_edit_info'), false, 'right');
        } else {
            $return .= draw_link('/a/admin/page.php?module_id=' . $page['module_id'] . '&modulette_id=' . $page['modulette_id'] . '&url=' . urlencode($_josh['request']['page']), 'Create Page Here', false, 'right');
        }
    }
    $return .= '</div><div id="help_text"';
    if (!$user['help']) {
        $return .= ' class="hidden"';
    }
    $return .= '>' . $page['helptext'] . '</div></div>';
    if ($_josh['request']['folder'] == 'helpdesk') {
        $return .= drawNavigationHelpdesk();
    }
    $return .= drawNavigation();
    $_josh['drawn']['top'] = true;
    error_debug('finished drawing top', __FILE__, __LINE__);
    return $return;
}
Exemple #2
0
						u.lastname, 
						t.title' . langExt($l['code']) . ' title, 
						t.description' . langExt($l['code']) . ' description, 
						y.title' . langExt($l['code']) . ' type,
						t.created_date
					FROM bb_topics t
					LEFT JOIN bb_topics_types y ON t.type_id = y.id
					JOIN users u ON t.created_user = u.id
					WHERE t.id = ' . $id);
            $channels_text = db_array('SELECT title' . langExt($l['code']) . ' FROM channels WHERE id IN (' . implode(',', $channels) . ')');
            $channels_text = implode(', ', $channels_text);
            $message = '<p style="font-weight:bold;">' . $topic['firstname'] . ' ' . $topic['lastname'] . ' ' . getString('bb_notify', $l['code']) . '</p>
				<p>' . getString('title', $l['code']) . ': ' . draw_link(url_base() . '/bb/topic.php?id=' . $id, $topic['title']) . '</p>
				<p>' . getString('channels_label', $l['code']) . ': ' . $channels_text . '</p>';
            if ($topic['type']) {
                $message .= '<p>' . getString('category', $l['code']) . ': ' . $topic['type'] . '</p>';
            }
            $message .= '<div style="color:#555; border-top:1px dotted #555; padding-top:5px; margin-top:5px;">' . $topic['description'] . '</div>';
            emailUser($addresses, $topic['title'], $message);
        }
    }
    bbDrawRss();
    url_change();
}
echo drawTop(drawSyndicateLink('bb'));
echo draw_div('bb_topics', bbDrawTable(15));
echo draw_javascript('function_attach(setInterval(refreshBB, 60000));');
//add new topic
echo '<a name="bottom"></a>';
echo drawTopicForm();
echo drawBottom();
Exemple #3
0
        $message .= drawThreadTop($r["title"], $r["description"], $r["userID"], $r["firstname"] . " " . $r["lastname"], $r["createdOn"]);
        $message .= '</table>' . drawEmailFooter();
        $headers = "MIME-Version: 1.0\r\n";
        $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
        $headers .= "From: " . $_josh["email_default"] . "\r\n";
        //get addresses & send
        $users = db_query("SELECT email FROM intranet_users WHERE isactive = 1");
        while ($u = db_fetch($users)) {
            mail($u["email"], $r["title"], $message, $headers);
        }
    }
    syndicateBulletinBoard();
    url_change();
}
drawTop();
echo drawSyndicateLink("bb");
?>
<table class="left" id="bb">
	<thead>
	<?php 
echo drawHeaderRow("", 4, "new", "#bottom");
?>
	<tr>
		<th width="320">Topic</th>
		<th width="120">Starter</th>
		<th class="c">Replies</th>
		<th class="r">Last Post</th>
	</tr>
	</thead>
	<tbody>
	<?php 
Exemple #4
0
<?php

include 'include.php';
echo drawTop();
echo drawSyndicateLink('bb');
echo bbDrawTable();
echo drawBottom();