Exemplo n.º 1
0
function print_tabbar($maxwidth = 4)
{
    global $page;
    if ($page['tabs']) {
        $tabbar = $page['tabs'];
        $len = count($tabbar);
        $selected = $page['tabselected'];
        $tabbar2 = array();
        for ($i = 0; $i < $len; $i++) {
            $tabbar2[] = $i != $selected ? "<li><a href=\"" . safe_htmlspecialchars($tabbar[$i]['link']) . "\">" . safe_htmlspecialchars($tabbar[$i]['title']) . "</a></li>\n" : "<li class=\"active\"><a href=\"#\">" . safe_htmlspecialchars($tabbar[$i]['title']) . "</a></li>\n";
        }
        if ($len > $maxwidth) {
            // && $len - $selected > $maxwidth
            if ($selected < $maxwidth) {
                $tabbar = array_splice($tabbar2, 0, $maxwidth);
                array_splice($tabbar2, count($tabbar2), 0, $tabbar);
            }
            // else 3 rows menu
        }
        echo "<ul class=\"tabs\">\n";
        $i = 0;
        foreach ($tabbar2 as $v) {
            if ($i > 0 && ($len - $i) % $maxwidth == 0) {
                echo "</ul><br clear=\"all\"><ul class=\"tabs\">\n";
            }
            echo $v;
            $i++;
        }
        echo "</ul>";
    }
}
Exemplo n.º 2
0
function tpl_menu()
{
    global $page, $mibewroot, $errors, $current_locale;
    ?>
			<li>
				<h2><b><?php 
    echo getlocal("lang.choose");
    ?>
</b></h2>
				<ul class="locales">
<?php 
    foreach ($page['localeLinks'] as $id => $title) {
        ?>
					<li<?php 
        menuloc($id);
        ?>
 ><a href="?locale=<?php 
        echo urlencode($id);
        ?>
"><?php 
        echo safe_htmlspecialchars($title);
        ?>
</a></li>
<?php 
    }
    ?>
				</ul>
			</li>
<?php 
}
Exemplo n.º 3
0
function format_rss_text($text)
{
    $text = format_text(trim($text), 1, 0, 1);
    $text = strip_tags($text);
    $text = safe_htmlspecialchars($text);
    $text = cut_at_word($text, 250);
    return $text;
}
Exemplo n.º 4
0
function get_user_addr($addr)
{
    global $settings;
    if ($settings['geolink'] && preg_match("/(\\d+\\.\\d+\\.\\d+\\.\\d+)/", $addr, $matches)) {
        $userip = $matches[1];
        return get_popup(safe_htmlspecialchars(str_replace("{ip}", $userip, $settings['geolink'])), '', safe_htmlspecialchars($addr), "GeoLocation", safe_htmlspecialchars("ip{$userip}"), safe_htmlspecialchars($settings['geolinkparams']));
    }
    return safe_htmlspecialchars($addr);
}
Exemplo n.º 5
0
/**
 * Sanitize message body and make it a safe HTML string.
 *
 * @param array $msg Message object
 * @return array Message object with sanitized body.
 */
function sanitize_message($msg)
{
    $message_body = $msg['message'];
    // Messages entered by user or operator cannot contain any markup
    if ($msg['kind'] == Thread::KIND_USER || $msg['kind'] == Thread::KIND_AGENT) {
        $message_body = safe_htmlspecialchars($message_body);
    }
    $msg['message'] = sanitize_string($message_body, 'low', 'moderate');
    return $msg;
}
Exemplo n.º 6
0
function generate_button($title, $locale, $style, $group, $inner, $showhost, $forcesecure, $modsecurity)
{
    $link = get_app_location($showhost, $forcesecure) . "/client.php";
    if ($locale) {
        $link = append_query($link, "locale={$locale}");
    }
    if ($style) {
        $link = append_query($link, "style={$style}");
    }
    if ($group) {
        $link = append_query($link, "group={$group}");
    }
    $modsecfix = $modsecurity ? ".replace('http://','').replace('https://','')" : "";
    $jslink = safe_htmlspecialchars(append_query("'" . $link, "url='+escape(document.location.href{$modsecfix})+'&referrer='+escape(document.referrer{$modsecfix})"));
    $temp = get_popup(safe_htmlspecialchars($link), "{$jslink}", $inner, safe_htmlspecialchars($title), "mibew", "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1");
    return "<!-- mibew button -->" . $temp . "<!-- / mibew button -->";
}
Exemplo n.º 7
0
function tpl_content()
{
    global $page, $mibewroot, $errors;
    ?>

<?php 
    echo getlocal("page.notifications.intro");
    ?>
<br />
<br />
<?php 
    require_once 'inc_errors.php';
    ?>

<form name="notifyFilterForm" method="get" action="<?php 
    echo $mibewroot;
    ?>
/operator/notifications.php">

	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">

	<div class="packedFormField">
		<?php 
    echo getlocal("notifications.kind");
    ?>
<br/>
		<select name="kind" onchange="this.form.submit();"><?php 
    foreach ($page['allkinds'] as $k) {
        echo "<option value=\"" . safe_htmlspecialchars($k) . "\"" . ($k == form_value("kind") ? " selected=\"selected\"" : "") . ">" . getlocal("notifications.kind." . ($k ? $k : "all")) . "</option>";
    }
    ?>
</select>
	</div>

	<div class="packedFormField">
		<?php 
    echo getlocal("notifications.locale");
    ?>
<br/>
		<select name="lang" onchange="this.form.submit();"><?php 
    foreach ($page['locales'] as $k) {
        echo "<option value=\"" . safe_htmlspecialchars($k["id"]) . "\"" . ($k["id"] == form_value("lang") ? " selected=\"selected\"" : "") . ">" . safe_htmlspecialchars($k["name"]) . "</option>";
    }
    ?>
</select>
	</div>

	<br clear="all"/>

	</div><div class="formbottom"><div class="formbottomi"></div></div></div>
</form>
<br/>

<?php 
    if ($page['pagination']) {
        ?>

<table class="list">
<thead>
<tr class="header">
<th>
	<?php 
        echo getlocal("notifications.head.to");
        ?>
</th><th>
	<?php 
        echo getlocal("notifications.head.subj");
        ?>
</th><th>
	<?php 
        echo getlocal("notifications.head.msg");
        ?>
</th><th>
	<?php 
        echo getlocal("notifications.head.time");
        ?>
</th>
</tr>
</thead>
<tbody>
<?php 
        if ($page['pagination.items']) {
            foreach ($page['pagination.items'] as $b) {
                ?>
	<tr>
	<td class="notlast">
		<a href="<?php 
                echo $mibewroot;
                ?>
/operator/notification.php?id=<?php 
                echo urlencode($b['id']);
                ?>
" target="_blank" onclick="this.newWindow = window.open('<?php 
                echo $mibewroot;
                ?>
/operator/notification.php?id=<?php 
                echo urlencode($b['id']);
                ?>
', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=720,height=520,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;" class="<?php 
                echo $b['vckind'] == 'xmpp' ? 'xmpp' : 'mail';
                ?>
">
			<?php 
                echo safe_htmlspecialchars(shorten(topage($b['vcto']), 30));
                ?>
		</a>
	</td>
	<td class="notlast">
		<?php 
                echo safe_htmlspecialchars(shorten(topage($b['vcsubject']), 30));
                ?>
	</td>
	<td class="notlast">
		<?php 
                echo safe_htmlspecialchars(shorten(topage($b['tmessage']), 30));
                ?>
	</td>
	<td>
		<?php 
                echo date_to_text($b['created']);
                ?>
	</td>
	</tr>
<?php 
            }
        } else {
            ?>
	<tr>
	<td colspan="4">
		<?php 
            echo getlocal("tag.pagination.no_items.elements");
            ?>
	</td>
	</tr>
<?php 
        }
        ?>
</tbody>
</table>
<?php 
        if ($page['pagination.items']) {
            echo "<br/>";
            echo generate_pagination($page['pagination']);
        }
    }
    ?>

<?php 
}
Exemplo n.º 8
0
function setup_redirect_links($threadid, $token)
{
    global $page, $mibewroot, $settings, $mysqlprefix;
    loadsettings();
    $link = connect();
    $operatorscount = db_rows_count("{$mysqlprefix}chatoperator", array(), "", $link);
    $groupscount = 0;
    $groups = array();
    if ($settings['enablegroups'] == "1") {
        foreach (get_groups($link, true) as $group) {
            if ($group['inumofagents'] == 0) {
                continue;
            }
            $groups[] = $group;
        }
        $groupscount = count($groups);
    }
    prepare_pagination(max($operatorscount, $groupscount), 8);
    $p = $page['pagination'];
    $limit = $p['limit'];
    $operators = select_multi_assoc(db_build_select("operatorid, vclogin, vclocalename, vccommonname, istatus, (unix_timestamp(CURRENT_TIMESTAMP)-unix_timestamp(dtmlastvisited)) as time", "{$mysqlprefix}chatoperator", array(), "order by vclogin " . $limit), $link);
    $groups = array_slice($groups, $p['start'], $p['end'] - $p['start']);
    mysql_close($link);
    $agent_list = "";
    $params = array('thread' => $threadid, 'token' => $token);
    foreach ($operators as $agent) {
        $params['nextAgent'] = $agent['operatorid'];
        $status = $agent['time'] < $settings['online_timeout'] ? $agent['istatus'] == 0 ? getlocal("char.redirect.operator.online_suff") : getlocal("char.redirect.operator.away_suff") : "";
        $agent_list .= "<li><a href=\"" . add_params($mibewroot . "/operator/redirect.php", $params) . "\" title=\"" . safe_htmlspecialchars(topage(get_operator_name($agent))) . "\">" . safe_htmlspecialchars(topage(get_operator_name($agent))) . "</a> {$status}</li>";
    }
    $page['redirectToAgent'] = $agent_list;
    $group_list = "";
    if ($settings['enablegroups'] == "1") {
        $params = array('thread' => $threadid, 'token' => $token);
        foreach ($groups as $group) {
            $params['nextGroup'] = $group['groupid'];
            $status = $group['ilastseen'] !== NULL && $group['ilastseen'] < $settings['online_timeout'] ? getlocal("char.redirect.operator.online_suff") : ($group['ilastseenaway'] !== NULL && $group['ilastseenaway'] < $settings['online_timeout'] ? getlocal("char.redirect.operator.away_suff") : "");
            $group_list .= "<li><a href=\"" . add_params($mibewroot . "/operator/redirect.php", $params) . "\" title=\"" . safe_htmlspecialchars(topage(get_group_name($group))) . "\">" . safe_htmlspecialchars(topage(get_group_name($group))) . "</a> {$status}</li>";
        }
    }
    $page['redirectToGroup'] = $group_list;
}
Exemplo n.º 9
0
function tpl_content()
{
    global $page, $mibewroot, $errors;
    ?>

	<?php 
    if ($page['saved']) {
        ?>
	<?php 
        echo getlocal("page.translate.done");
        ?>

	<script type="text/javascript"><!--
		if(window.opener && window.opener.location) {
			window.opener.location.reload();
		} 
		setTimeout( (function() { window.close(); }), 500 );
	//--></script>
<?php 
    }
    if (!$page['saved']) {
        ?>

<?php 
        echo getlocal("page.translate.one");
        ?>
<br/>
<br/>
<?php 
        require_once 'inc_errors.php';
        ?>

<form name="translateForm" method="post" action="<?php 
        echo $mibewroot;
        ?>
/operator/translate.php">
<?php 
        print_csrf_token_input();
        ?>
<input type="hidden" name="key" value="<?php 
        echo safe_htmlspecialchars($page['key']);
        ?>
"/>
<input type="hidden" name="target" value="<?php 
        echo safe_htmlspecialchars($page['target']);
        ?>
"/>
	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">

	<div class="fieldForm">
		<div class="field">
			<div class="flabel"><?php 
        echo safe_htmlspecialchars($page['title1']);
        ?>
</div>
			<div class="fvaluenodesc">
				<textarea name="original" disabled="disabled" cols="20" rows="5" class="wide"><?php 
        echo form_value('original');
        ?>
</textarea>
			</div>
		</div>

		<div class="field">
			<div class="flabel"><?php 
        echo safe_htmlspecialchars($page['title2']);
        ?>
</div>
			<div class="fvaluenodesc">
				<textarea name="translation" cols="20" rows="5" class="wide"><?php 
        echo form_value('translation');
        ?>
</textarea>
			</div>
		</div>

		<div class="fbutton">
			<input type="image" name="save" value="" src="<?php 
        echo $mibewroot . safe_htmlspecialchars(getlocal("image.button.save"));
        ?>
" alt="<?php 
        echo safe_htmlspecialchars(getlocal("button.save"));
        ?>
"/>
		</div>
	</div>

	</div><div class="formbottom"><div class="formbottomi"></div></div></div>
</form>

<?php 
    }
    ?>

<?php 
}
Exemplo n.º 10
0
        if ($thread['istate'] == $state_chatting) {
            $link = connect();
            commit_thread($threadid, array("istate" => intval($state_waiting), "nextagent" => 0, "groupid" => intval($nextid), "agentId" => 0, "agentName" => "''"), $link);
            post_message_($thread['threadid'], $kind_events, getstring2_("chat.status.operator.redirect", array(get_operator_name($operator)), $thread['locale'], true), $link);
            mysql_close($link);
        } else {
            $errors[] = getlocal("chat.redirect.cannot");
        }
    } else {
        $errors[] = getlocal("chat.redirect.unknown_group");
    }
} else {
    $nextid = verifyparam("nextAgent", "/^\\d{1,10}\$/");
    $nextOperator = operator_by_id($nextid);
    if ($nextOperator) {
        $page['message'] = getlocal2("chat.redirected.content", array(safe_htmlspecialchars(topage(get_operator_name($nextOperator)))));
        if ($thread['istate'] == $state_chatting) {
            $link = connect();
            $threadupdate = array("istate" => intval($state_waiting), "nextagent" => intval($nextid), "agentId" => 0);
            if ($thread['groupid'] != 0) {
                if (FALSE === select_one_row("select groupid from {$mysqlprefix}chatgroupoperator where operatorid = " . intval($nextid) . " and groupid = " . intval($thread['groupid']), $link)) {
                    $threadupdate['groupid'] = 0;
                }
            }
            commit_thread($threadid, $threadupdate, $link);
            post_message_($thread['threadid'], $kind_events, getstring2_("chat.status.operator.redirect", array(get_operator_name($operator)), $thread['locale'], true), $link);
            mysql_close($link);
        } else {
            $errors[] = getlocal("chat.redirect.cannot");
        }
    } else {
Exemplo n.º 11
0
function tpl_content()
{
    global $page, $mibewroot, $errors;
    $notification = $page['notification'];
    ?>

<?php 
    echo getlocal("notification.intro");
    ?>

<br/><br/>

<div class="logpane">
<div class="header">

		<div class="wlabel">
			<?php 
    echo getlocal("notification.label.to");
    ?>
:
		</div> 
		<div class="wvalue">
			<?php 
    echo topage(safe_htmlspecialchars($notification['vcto']));
    ?>
		</div>
		<br clear="all"/>

		<div class="wlabel">
			<?php 
    echo getlocal("notification.label.time");
    ?>
:
		</div>
		<div class="wvalue">
			<?php 
    echo date_to_text($notification['created']);
    ?>
		</div>
		<br clear="all"/>
		
		<div class="wlabel">
			<?php 
    echo getlocal("notification.label.subj");
    ?>
:
		</div>
		<div class="wvalue">
			<?php 
    echo topage(safe_htmlspecialchars($notification['vcsubject']));
    ?>
		</div>
		<br clear="all"/>
</div>

<div class="message">
<?php 
    echo topage(prepare_html_message($notification['tmessage']));
    ?>
</div>
</div>

<br />
<a href="<?php 
    echo $mibewroot;
    ?>
/operator/notifications.php">
	<?php 
    echo getlocal("notification.back_to_list");
    ?>
</a>
<br />


<?php 
}
Exemplo n.º 12
0
function tpl_content()
{
    global $page, $mibewroot;
    ?>

<?php 
    echo getlocal("page.analysis.userhistory.intro");
    ?>
<br />
<br />

<?php 
    if ($page['pagination']) {
        ?>

<table class="list">
<thead>
<tr class="header">
<th>
	<?php 
        echo getlocal("page.analysis.search.head_name");
        ?>
</th><th>
	<?php 
        echo getlocal("page.analysis.search.head_host");
        ?>
</th><th>
	<?php 
        echo getlocal("page.analysis.search.head_operator");
        ?>
</th><th>
	<?php 
        echo getlocal("page.analysis.search.head_time");
        ?>
</th></tr>
</thead>
<tbody>
<?php 
        if ($page['pagination.items']) {
            foreach ($page['pagination.items'] as $chatthread) {
                ?>
	<tr>
		<td>
			<a href="<?php 
                echo $mibewroot;
                ?>
/operator/threadprocessor.php?threadid=<?php 
                echo urlencode($chatthread['threadid']);
                ?>
" target="_blank" onclick="this.newWindow = window.open('<?php 
                echo $mibewroot;
                ?>
/operator/threadprocessor.php?threadid=<?php 
                echo urlencode($chatthread['threadid']);
                ?>
', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=720,height=520,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php 
                echo topage(safe_htmlspecialchars($chatthread['userName']));
                ?>
</a>
		</td>
		<td>
		<?php 
                echo get_user_addr(topage($chatthread['remote']));
                ?>
		</td>
		<td>
		<?php 
                if ($chatthread['agentName']) {
                    echo topage(safe_htmlspecialchars($chatthread['agentName']));
                }
                ?>
		</td>
		<td>
			<?php 
                echo date_diff_to_text($chatthread['modified'] - $chatthread['created']);
                ?>
, <?php 
                echo date_to_text($chatthread['created']);
                ?>
		</td>
	</tr>
<?php 
            }
        } else {
            ?>
	<tr>
	<td colspan="5">
		<?php 
            echo getlocal("tag.pagination.no_items");
            ?>
	</td>
	</tr>
<?php 
        }
        ?>
</tbody>
</table>
<?php 
        if ($page['pagination.items']) {
            echo "<br/>";
            echo generate_pagination($page['pagination']);
        }
    }
    ?>

<?php 
}
Exemplo n.º 13
0
function tpl_content()
{
    global $page, $mibewroot;
    ?>

<?php 
    echo getlocal("updates.intro");
    ?>
<br />
<br />
<div>
	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
	
		<?php 
    echo getlocal("updates.news");
    ?>
<br/>
		<div id="news">
		</div>
		
		<?php 
    echo getlocal("updates.current");
    ?>
<br/>
			<div id="cver"><?php 
    echo safe_htmlspecialchars($page['version']);
    ?>
</div>

		<br/>

		<?php 
    echo getlocal("updates.latest");
    ?>
			<div id="lver"></div>

		<br/>
			
		<?php 
    echo getlocal("updates.installed_locales");
    ?>
<br/>
			<?php 
    foreach ($page['localizations'] as $loc) {
        ?>
				<?php 
        echo safe_htmlspecialchars($loc);
        ?>
			<?php 
    }
    ?>

		<br/><br/>

		<?php 
    echo getlocal("updates.env");
    ?>
<br/>
			PHP <?php 
    echo safe_htmlspecialchars($page['phpVersion']);
    ?>

	</div><div class="formbottom"><div class="formbottomi"></div></div></div>
</div>

<?php 
}
Exemplo n.º 14
0
function tpl_content()
{
    global $page, $mibewroot, $errors;
    ?>

<?php 
    echo getlocal("page_ban.intro");
    ?>
<br />
<br />
<?php 
    require_once 'inc_errors.php';
    ?>

<div class="tabletool">
	<img src="<?php 
    echo $mibewroot;
    ?>
/images/buttons/createban.gif" border="0" alt=""/>
	<a href="<?php 
    echo $mibewroot;
    ?>
/operator/ban.php" title="<?php 
    echo safe_htmlspecialchars(getlocal("page_bans.add"));
    ?>
">
		<?php 
    echo getlocal("page_bans.add");
    ?>
	</a>
</div>
<br clear="all"/>

<?php 
    if ($page['pagination']) {
        ?>

<table class="list">
<thead>
<tr class="header">
<th>
	<?php 
        echo getlocal("form.field.address");
        ?>
</th><th>
	<?php 
        echo getlocal("page_bans.to");
        ?>
</th><th>
	<?php 
        echo getlocal("form.field.ban_comment");
        ?>
</th><th>
</th>
</tr>
</thead>
<tbody>
<?php 
        if ($page['pagination.items']) {
            foreach ($page['pagination.items'] as $b) {
                ?>
	<tr>
	<td class="notlast">
		<a href="ban.php?id=<?php 
                echo urlencode($b['banid']);
                ?>
" class="man" id="ti<?php 
                echo safe_htmlspecialchars($b['banid']);
                ?>
">
		   	<?php 
                echo safe_htmlspecialchars($b['address']);
                ?>
	   	</a>
	</td>
	<td class="notlast">
   		<?php 
                echo date_to_text($b['till']);
                ?>
	</td>
	<td>
<?php 
                if (strlen(topage($b['comment'])) > 30) {
                    echo safe_htmlspecialchars(substr(topage($b['comment']), 0, 30));
                } else {
                    echo safe_htmlspecialchars(topage($b['comment']));
                }
                ?>
	</td>
	<td>
		<a class="removelink" id="i<?php 
                echo safe_htmlspecialchars($b['banid']);
                ?>
" href="<?php 
                echo $mibewroot;
                ?>
/operator/blocked.php?act=del&amp;id=<?php 
                echo urlencode($b['banid']);
                print_csrf_token_in_url();
                ?>
">
			remove
		</a>
	</td>
	</tr>
<?php 
            }
        } else {
            ?>
	<tr>
	<td colspan="4">
		<?php 
            echo getlocal("tag.pagination.no_items.elements");
            ?>
	</td>
	</tr>
<?php 
        }
        ?>
</tbody>
</table>
<?php 
        if ($page['pagination.items']) {
            echo "<br/>";
            echo generate_pagination($page['pagination']);
        }
    }
    ?>
<script type="text/javascript" language="javascript"><!--
$('a.removelink').click(function(){
	var addr = $("#t"+this.id).text();
	return confirm("<?php 
    echo getlocalforJS("page_bans.confirm", array('"+$.trim(addr)+"'));
    ?>
");
});
//--></script>

<?php 
}
Exemplo n.º 15
0
function show_nav_option($title, $url, $extra = "")
{
    global $site_sess;
    $bgcolor = get_navrow_bg();
    echo "<tr><td bgcolor=\"{$bgcolor}\" valign=top onmouseover=\"this.style.backgroundColor='#FFE673';this.style.cursor='hand';\" onclick=\"parent.frames['main'].location='" . $site_sess->url($url) . "'\" onmouseout=\"this.style.backgroundColor='" . $bgcolor . "'\">\n";
    echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tr><td>\n";
    echo "<a href=\"" . $site_sess->url(safe_htmlspecialchars(strip_tags($url))) . "\" class=\"navlink\">" . $title . "</a> {$extra}\n";
    echo "</td></tr></table>\n";
    echo "</td></tr>\n";
    echo "<tr><td bgcolor=\"#FFFFFF\"><img src=\"" . ROOT_PATH . "admin/images/spacer.gif\"></td></tr>\n";
}
Exemplo n.º 16
0
function tpl_content()
{
    global $page, $mibewroot, $errors;
    ?>

<?php 
    echo getlocal("operator.groups.intro");
    ?>
<br />
<br />
<?php 
    require_once 'inc_errors.php';
    if ($page['stored']) {
        ?>
<div id="formmessage"><?php 
        echo getlocal("data.saved");
        ?>
</div>
<?php 
    }
    ?>

<form name="opgroupsForm" method="post" action="<?php 
    echo $mibewroot;
    ?>
/operator/opgroups.php">
<?php 
    print_csrf_token_input();
    ?>
<input type="hidden" name="op" value="<?php 
    echo safe_htmlspecialchars($page['opid']);
    ?>
"/>
	<div>
<?php 
    print_tabbar();
    ?>
	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">

	<p>
		<b><?php 
    echo safe_htmlspecialchars($page['currentop']);
    ?>
&lrm;</b>
	</p>
<?php 
    foreach ($page['groups'] as $pm) {
        ?>
	<div class="field">
		<div class="flabel"><?php 
        echo safe_htmlspecialchars(topage($pm['vclocalname']));
        ?>
</div>
		<div class="fvalue">
			<input type="checkbox" name="group<?php 
        echo safe_htmlspecialchars($pm['groupid']);
        ?>
" value="on"<?php 
        echo form_value_mb('group', $pm['groupid']) ? " checked=\"checked\"" : "";
        echo $page['canmodify'] ? "" : " disabled=\"disabled\"";
        ?>
/>
		</div>
		<div class="fdescr"> &mdash; <?php 
        echo $pm['vclocaldescription'] ? safe_htmlspecialchars(topage($pm['vclocaldescription'])) : getlocal("operator.group.no_description");
        ?>
</div>
		<br clear="all"/>
	</div>
<?php 
    }
    ?>

<?php 
    if ($page['canmodify']) {
        ?>
	<div class="fbutton">
		<input type="image" name="save" value="" src="<?php 
        echo $mibewroot . safe_htmlspecialchars(getlocal("image.button.save"));
        ?>
" alt="<?php 
        echo safe_htmlspecialchars(getlocal("button.save"));
        ?>
"/>
	</div>
<?php 
    }
    ?>
	</div><div class="formbottom"><div class="formbottomi"></div></div></div>
	</div>
</form>

<?php 
}
Exemplo n.º 17
0
function format_text($text, $html = 0, $word_wrap = 0, $bbcode = 0, $bbcode_img = 0)
{
    if ($word_wrap && $text != "") {
        $text = preg_replace("/([^\n\r ?&\\.\\/<>\"\\-]{" . $word_wrap . "})/i", " \\1\n", $text);
    }
    if ($html == 0 || $html == 2) {
        $text = safe_htmlspecialchars($text);
    }
    // Replace { to prevent parsing in templates
    global $site_template;
    $text = preg_replace('=' . preg_quote($site_template->start) . '([A-Z0-9_]+)' . preg_quote($site_template->end) . '=Usi', '&#123;\\1&#125;', $text);
    if ($html !== 2) {
        $text = nl2br(trim($text));
        $text = replace_url($text);
    }
    if ($bbcode == 1) {
        $search_array = array("/(\\[)(list)(=)(['\"]?)([^\"']*)(\\4])(.*)(\\[\\/list)(((=)(\\4)([^\"']*)(\\4]))|(\\]))/siU", "/(\\[)(list)(])(.*)(\\[\\/list\\])/siU", "/(\\[\\*\\])/siU", "/(\\[\\/\\*\\])/siU", "/(\\[)(url)(=)(['\"]?)(www\\.)([^\"']*)(\\4])(.*)(\\[\\/url\\])/siU", "/(\\[)(url)(=)(['\"]?)([^\"']*)(\\4])(.*)(\\[\\/url\\])/siU", "/(\\[)(url)(])(www\\.)([^\"]*)(\\[\\/url\\])/siU", "/(\\[)(url)(])([^\"]*)(\\[\\/url\\])/siU", "/(\\[)(code)(])(\r\n)*(.*)(\\[\\/code\\])/siU", "/javascript:/si", "/about:/si");
        $replace_array = array("<ol type=\"\\5\">\\7</ol>", "<ul>\\4</ul>", "<li>", "</li>", "<a href=\"http://www.\\6\" target=\"_blank\" rel=\"nofollow\">\\8</a>", "<a href=\"\\5\" target=\"_blank\" rel=\"nofollow\">\\7</a>", "<a href=\"http://www.\\5\" target=\"_blank\" rel=\"nofollow\">www.\\5</a>", "<a href=\"\\4\" target=\"_blank\" rel=\"nofollow\">\\4</a>", "<pre>Code:<hr size=1>\\5<hr size=1></pre>", "java script:", "about :");
        $text = preg_replace($search_array, $replace_array, $text);
        if (!$bbcode_img) {
            $text = preg_replace("/(\\[)(img)(])(\r\n)*([^\"]*)(\\[\\/img\\])/siU", "<a href=\"\\5\" target=\"_blank\">\\5</a>", $text);
        } else {
            $text = preg_replace("/(\\[)(img)(])(\r\n)*([^\"]*)(\\[\\/img\\])/siU", "<img src=\"\\5\">", $text);
        }
        $text = preg_replace("/(\\[)(b)(])(\r\n)*([^\"]*)(\\[\\/b\\])/siU", "<b>\\5</b>", $text);
        $text = preg_replace("/(\\[)(i)(])(\r\n)*([^\"]*)(\\[\\/i\\])/siU", "<i>\\5</i>", $text);
        $text = preg_replace("/(\\[)(u)(])(\r\n)*([^\"]*)(\\[\\/u\\])/siU", "<u>\\5</u>", $text);
        $text = replace_badwords($text);
    }
    $text = str_replace("\\'", "'", $text);
    return $text;
}
Exemplo n.º 18
0
function tpl_content()
{
    global $page, $mibewroot, $errors;
    ?>

<?php 
    echo safe_htmlspecialchars(getlocal("page.groupmembers.intro"));
    ?>
<br />
<br />
<?php 
    require_once 'inc_errors.php';
    if ($page['stored']) {
        ?>
<div id="formmessage"><?php 
        echo safe_htmlspecialchars(getlocal("data.saved"));
        ?>
</div>
<?php 
    }
    ?>

<form name="membersForm" method="post" action="<?php 
    echo $mibewroot;
    ?>
/operator/groupmembers.php">
<?php 
    print_csrf_token_input();
    ?>
<input type="hidden" name="gid" value="<?php 
    echo safe_htmlspecialchars($page['groupid']);
    ?>
"/>
	<div>
<?php 
    print_tabbar();
    ?>
	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">

	<p>
		<b><?php 
    echo safe_htmlspecialchars($page['currentgroup']);
    ?>
</b>
	</p>
<?php 
    foreach ($page['operators'] as $pm) {
        ?>
	<div class="field">
		<div class="fvaluenodesc">
			<input type="checkbox" name="op<?php 
        echo safe_htmlspecialchars($pm['operatorid']);
        ?>
" value="on"<?php 
        echo form_value_mb('op', $pm['operatorid']) ? " checked=\"checked\"" : "";
        ?>
/>
			<?php 
        echo safe_htmlspecialchars(topage($pm['vclocalename']));
        ?>
 (<a href="operator.php?op=<?php 
        echo urlencode($pm['operatorid']);
        ?>
"
				><?php 
        echo safe_htmlspecialchars(topage($pm['vclogin']));
        ?>
</a>)
		</div>
	</div>
<?php 
    }
    ?>

	<div class="fbutton">
		<input type="image" name="save" value="" src="<?php 
    echo $mibewroot . safe_htmlspecialchars(getlocal("image.button.save"));
    ?>
" alt="<?php 
    echo safe_htmlspecialchars(getlocal("button.save"));
    ?>
"/>
	</div>

	</div><div class="formbottom"><div class="formbottomi"></div></div></div>
	</div>
</form>

<?php 
}
Exemplo n.º 19
0
function tpl_content()
{
    global $page, $mibewroot, $errors;
    ?>

<?php 
    echo getlocal("page.gen_button.intro");
    ?>
<br />
<br />
<?php 
    require_once 'inc_errors.php';
    ?>

<form name="buttonCodeForm" method="get" action="<?php 
    echo $mibewroot;
    ?>
/operator/gettextcode.php">
	<div>
<?php 
    print_tabbar();
    ?>
	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">

	<div class="fieldForm">

		<div class="fieldinrow">
			<div class="flabel"><?php 
    echo getlocal("page.gen_button.choose_locale");
    ?>
</div>
			<div class="fvaluenodesc">
				<select name="lang" onchange="this.form.submit();"><?php 
    foreach ($page['availableLocales'] as $k) {
        echo "<option value=\"" . safe_htmlspecialchars($k) . "\"" . ($k == form_value("lang") ? " selected=\"selected\"" : "") . ">" . safe_htmlspecialchars($k) . "</option>";
    }
    ?>
</select>
			</div>
		</div>

<?php 
    if ($page['showgroups']) {
        ?>
		<div class="fieldinrow">
			<div class="flabel"><?php 
        echo getlocal("page.gen_button.choose_group");
        ?>
</div>
			<div class="fvaluenodesc">
				<select name="group" onchange="this.form.submit();"><?php 
        foreach ($page['groups'] as $k) {
            echo "<option value=\"" . safe_htmlspecialchars($k['groupid']) . "\"" . ($k['groupid'] == form_value("group") ? " selected=\"selected\"" : "") . ">" . safe_htmlspecialchars($k['vclocalname']) . "</option>";
        }
        ?>
</select>
			</div>
		</div>
<?php 
    }
    ?>
		<br clear="all"/>

		<div class="fieldinrow">
			<div class="flabel"><?php 
    echo getlocal("page.gen_button.choose_style");
    ?>
</div>
			<div class="fvaluenodesc">
				<select name="style" onchange="this.form.submit();"><?php 
    foreach ($page['availableStyles'] as $k => $v) {
        echo "<option value=\"" . safe_htmlspecialchars($k) . "\"" . ($k == form_value("style") ? " selected=\"selected\"" : "") . ">" . safe_htmlspecialchars($v) . "</option>";
    }
    ?>
</select>
			</div>
		</div>
		<br clear="all"/>

		<div class="fieldinrow">
			<div class="flabel"><?php 
    echo getlocal("page.gen_button.include_site_name");
    ?>
</div>
			<div class="fvaluenodesc">
				<input type="checkbox" name="hostname" value="on"<?php 
    echo form_value_cb('hostname') ? " checked=\"checked\"" : "";
    ?>
 onchange="this.form.submit();"/>
			</div>
		</div>

<?php 
    if ($page['formhostname']) {
        ?>

		<div class="fieldinrow">
			<div class="flabel"><?php 
        echo getlocal("page.gen_button.secure_links");
        ?>
</div>
			<div class="fvaluenodesc">
				<input type="checkbox" name="secure" value="on"<?php 
        echo form_value_cb('secure') ? " checked=\"checked\"" : "";
        ?>
 onchange="this.form.submit();"/>
			</div>
		</div>
<?php 
    }
    ?>
		<br clear="all"/>

		<div class="field">
			<div class="flabel"><?php 
    echo getlocal("page.gen_button.modsecurity");
    ?>
</div>
			<div class="fvaluenodesc">
				<input type="checkbox" name="modsecurity" value="on"<?php 
    echo form_value_cb('modsecurity') ? " checked=\"checked\"" : "";
    ?>
 onchange="this.form.submit();"/>
			</div>
		</div>

		<div class="field">
			<div class="flabel"><?php 
    echo getlocal("page.gen_button.code");
    ?>
</div>
			<div class="fvaluewithta" dir="ltr">
				<textarea cols="44" rows="15"><?php 
    echo safe_htmlspecialchars($page['buttonCode']);
    ?>
</textarea>
			</div>
			<div class="fdescr"><?php 
    echo getlocal("page.gen_button.code.description");
    ?>
</div>
			<br clear="all"/>
		</div>

		<div class="field">
			<div class="flabel"><?php 
    echo getlocal("page.gen_button.sample");
    ?>
</div>
			<div class="fvaluenodesc">
				<?php 
    echo $page['buttonCode'];
    ?>
			</div>
		</div>
	</div>
	
	</div><div class="formbottom"><div class="formbottomi"></div></div></div>
	</div>
</form>

<?php 
}
Exemplo n.º 20
0
Arquivo: ban.php Projeto: kuell/chat
 $comment = getparam('comment');
 $threadid = isset($_POST['threadid']) ? getparam('threadid') : "";
 if (!$address) {
     $errors[] = no_field("form.field.address");
 }
 if (!preg_match("/^\\d+\$/", $days)) {
     $errors[] = wrong_field("form.field.ban_days");
 }
 if (!$comment) {
     $errors[] = no_field("form.field.ban_comment");
 }
 $link = connect();
 $existing_ban = ban_for_addr_($address, $link);
 mysql_close($link);
 if (!$banId && $existing_ban || $banId && $existing_ban && $banId != $existing_ban['banid']) {
     $errors[] = getlocal2("ban.error.duplicate", array(safe_htmlspecialchars($address), safe_htmlspecialchars($existing_ban['banid'])));
 }
 if (count($errors) == 0) {
     $link = connect();
     $utime = time() + $days * 24 * 60 * 60;
     if (!$banId) {
         $query = sprintf("insert into {$mysqlprefix}chatban (dtmcreated,dtmtill,address,comment) values (CURRENT_TIMESTAMP,%s,'%s','%s')", "FROM_UNIXTIME(" . intval($utime) . ")", mysql_real_escape_string($address, $link), mysql_real_escape_string($comment, $link));
         perform_query($query, $link);
     } else {
         $query = sprintf("update {$mysqlprefix}chatban set dtmtill = %s,address = '%s',comment = '%s' where banid = %s", "FROM_UNIXTIME(" . intval($utime) . ")", mysql_real_escape_string($address, $link), mysql_real_escape_string($comment, $link), intval($banId));
         perform_query($query, $link);
     }
     mysql_close($link);
     if (!$threadid) {
         header("Location: {$mibewroot}/operator/blocked.php");
         exit;
Exemplo n.º 21
0
 /**
  * {@inheritdoc}
  */
 protected function renderUrl($url)
 {
     return sprintf('<script src="%s"></script>', safe_htmlspecialchars($url));
 }
Exemplo n.º 22
0
function generate_pagination_image($id, $alt)
{
    global $mibewroot;
    return "<img src=\"{$mibewroot}/images/{$id}.gif\" border=\"0\" alt=\"" . safe_htmlspecialchars($alt) . "\"/>";
}
Exemplo n.º 23
0
 /**
  * {@inheritdoc}
  */
 protected function renderUrl($url)
 {
     return sprintf('<link rel="stylesheet" type="text/css" href="%s" />', safe_htmlspecialchars($url));
 }
Exemplo n.º 24
0
function tpl_content()
{
    global $page, $mibewroot;
    ?>

<?php 
    echo getlocal("page_search.intro");
    ?>
<br />
<br />

<form name="searchForm" method="get" action="<?php 
    echo $mibewroot;
    ?>
/operator/history.php">
	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
	
	<div class="fieldForm">
		<div class="field">
			<div class="flabel"><?php 
    echo getlocal("page_analysis.full.text.search");
    ?>
</div>
			<div class="fvaluenodesc">
				<div id="searchtext">
					<input type="text" name="q" size="80" value="<?php 
    echo form_value('q');
    ?>
" class="formauth"/>
				</div>
				<div id="searchbutton">
					<input type="image" name="search" src="<?php 
    echo $mibewroot . safe_htmlspecialchars(getlocal("image.button.search"));
    ?>
" alt="<?php 
    echo safe_htmlspecialchars(getlocal("button.search"));
    ?>
"/>
				</div>
			</div>
			<br clear="all"/>
		</div>
	</div>

	</div><div class="formbottom"><div class="formbottomi"></div></div></div>
</form>
<br/>


<?php 
    if ($page['pagination']) {
        ?>

<table class="list">
<thead>
<tr class="header">
<th>
	<?php 
        echo getlocal("page.analysis.search.head_name");
        ?>
</th><th>
	<?php 
        echo getlocal("page.analysis.search.head_host");
        ?>
</th><th>
	<?php 
        echo getlocal("page.analysis.search.head_operator");
        ?>
</th><th>
	<?php 
        echo getlocal("page.analysis.search.head_messages");
        ?>
</th><th>
	<?php 
        echo getlocal("page.analysis.search.head_time");
        ?>
</th></tr>
</thead>
<tbody>
<?php 
        if ($page['pagination.items']) {
            foreach ($page['pagination.items'] as $chatthread) {
                ?>
	<tr>
		<td>
			<a href="<?php 
                echo $mibewroot;
                ?>
/operator/threadprocessor.php?threadid=<?php 
                echo urlencode($chatthread['threadid']);
                ?>
" target="_blank" onclick="this.newWindow = window.open('<?php 
                echo $mibewroot;
                ?>
/operator/threadprocessor.php?threadid=<?php 
                echo urlencode($chatthread['threadid']);
                ?>
', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=720,height=520,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php 
                echo topage(safe_htmlspecialchars($chatthread['userName']));
                ?>
</a>
		</td>
		<td>
		<?php 
                echo get_user_addr(topage($chatthread['remote']));
                ?>
		</td>
		<td>
		<?php 
                if ($chatthread['agentName']) {
                    echo topage(safe_htmlspecialchars($chatthread['agentName']));
                } else {
                    if ($chatthread['groupid'] && $chatthread['groupid'] != 0 && isset($page['groupName'][$chatthread['groupid']])) {
                        echo "- " . topage(safe_htmlspecialchars($page['groupName'][$chatthread['groupid']])) . " -";
                    }
                }
                ?>
		</td>
		<td>
		<?php 
                echo topage(safe_htmlspecialchars($chatthread['size']));
                ?>
		</td>
		<td>
			<?php 
                echo date_diff_to_text($chatthread['modified'] - $chatthread['created']);
                ?>
, <?php 
                echo date_to_text($chatthread['created']);
                ?>
		</td>
	</tr>
<?php 
            }
        } else {
            ?>
	<tr>
	<td colspan="5">
		<?php 
            echo getlocal("tag.pagination.no_items");
            ?>
	</td>
	</tr>
<?php 
        }
        ?>
</tbody>
</table>
<?php 
        if ($page['pagination.items']) {
            echo "<br/>";
            echo generate_pagination($page['pagination']);
        }
    }
    ?>

<?php 
}
Exemplo n.º 25
0
function tpl_content()
{
    global $page, $mibewroot;
    ?>

<div id="confirmpane">
	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">

		<?php 
    echo getlocal2("confirm.take.message", array(safe_htmlspecialchars($page['user']), safe_htmlspecialchars($page['agent'])));
    ?>
<br/><br/>
		<br/>

		<div>
		<table class="nicebutton"><tr>
			<td><a href="<?php 
    echo safe_htmlspecialchars($page['link']);
    ?>
">
				<img src="<?php 
    echo $mibewroot;
    ?>
/images/submit.gif" width="40" height="35" border="0" alt="" /></a></td>
			<td class="submit"><a href="<?php 
    echo safe_htmlspecialchars($page['link']);
    ?>
">
				<?php 
    echo getlocal("confirm.take.yes");
    ?>
</a></td>
			<td><a href="<?php 
    echo safe_htmlspecialchars($page['link']);
    ?>
">
				<img src="<?php 
    echo $mibewroot;
    ?>
/images/submitrest.gif" width="10" height="35" border="0" alt="" /></a></td>
		</tr></table>

		<table class="nicebutton"><tr>
			<td><a href="javascript:window.close();">
				<img src="<?php 
    echo $mibewroot;
    ?>
/images/submit.gif" width="40" height="35" border="0" alt="" /></a></td>
			<td class="submit"><a href="javascript:window.close();">
				<?php 
    echo getlocal("confirm.take.no");
    ?>
</a></td>
			<td><a href="javascript:window.close();">
				<img src="<?php 
    echo $mibewroot;
    ?>
/images/submitrest.gif" width="10" height="35" border="0" alt="" /></a></td>
		</tr></table>
		
		<br clear="all"/>
		</div>
				
	</div><div class="formbottom"><div class="formbottomi"></div></div></div>
</div>		

<?php 
}
Exemplo n.º 26
0
if ($show == 's1') {
    $allkeys = array_intersect($allkeys, load_idlist('level1'));
} else {
    if ($show == 's2') {
        $allkeys = array_intersect($allkeys, load_idlist('level2'));
    } else {
        if ($show == 's3') {
            $allkeys = array_diff($allkeys, load_idlist('level1'), load_idlist('level2'));
        }
    }
}
foreach ($allkeys as $key) {
    if ($key != 'output_charset') {
        $tsource = safe_htmlspecialchars($lang1[$key]);
        if (isset($lang2[$key])) {
            $value = safe_htmlspecialchars($lang2[$key]);
            if (get_auxiliary($lang2[$key]) != get_auxiliary($lang1[$key])) {
                $value = "<font color=\"#6030c1\"><b>{$value}</b></font> <strong>(wrong formatting)</strong>";
            }
        } else {
            $value = "<font color=\"#c13030\"><b>absent</b></font>";
        }
        $result[] = array('id' => $key, 'l1' => $tsource, 'l2' => $value);
    }
}
$order = verifyparam("sort", "/^(id|l1)\$/", "id");
usort($result, "compare_localization_by_{$order}");
setup_pagination($result, 100);
$page['formtarget'] = $target;
$page['formsource'] = $source;
$page['availableLocales'] = $localesList;
Exemplo n.º 27
0
Arquivo: agent.php Projeto: kuell/chat
function tpl_content()
{
    global $page, $mibewroot, $errors;
    ?>

<?php 
    if ($page['opid']) {
        echo getlocal("page_agent.intro");
    }
    if (!$page['opid']) {
        echo getlocal("page_agent.create_new");
    }
    ?>
<br />
<br />
<?php 
    require_once 'inc_errors.php';
    if ($page['needChangePassword']) {
        ?>
<div id="formmessage"><?php 
        echo getlocal("error.no_password");
        ?>
</div>
<br/>
<?php 
    } else {
        if ($page['stored']) {
            ?>
<div id="formmessage"><?php 
            echo getlocal("data.saved");
            ?>
</div>
<?php 
        }
    }
    ?>



<?php 
    if ($page['opid'] || $page['canmodify']) {
        ?>
<form name="agentForm" method="post" action="<?php 
        echo $mibewroot;
        ?>
/operator/operator.php">
<?php 
        print_csrf_token_input();
        ?>
<input type="hidden" name="opid" value="<?php 
        echo safe_htmlspecialchars($page['opid']);
        ?>
"/>
<?php 
        if (!$page['showjabber']) {
            ?>
<input type="hidden" name="jabber" value="<?php 
            echo form_value('jabber');
            ?>
"/>
<?php 
            if (form_value_cb('jabbernotify')) {
                ?>
<input type="hidden" name="jabbernotify" value="on"/><?php 
            }
        }
        ?>
 
	<div>
<?php 
        if (!$page['needChangePassword']) {
            print_tabbar();
        }
        ?>
	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">

	<div class="fieldForm">
		<div class="field">
			<div class="flabel"><?php 
        echo getlocal('form.field.login');
        ?>
<span class="required">*</span></div>
			<div class="fvalue">
				<input type="text" name="login" size="40" value="<?php 
        echo form_value('login');
        ?>
" class="formauth"<?php 
        echo $page['canmodify'] && !$page['opid'] ? "" : " disabled=\"disabled\"";
        ?>
/>
			</div>
			<div class="fdescr"> &mdash; <?php 
        echo getlocal('form.field.login.description');
        ?>
</div>
			<br clear="all"/>
		</div>

		<div class="field">
			<div class="flabel"><?php 
        echo getlocal('form.field.mail');
        ?>
</div>
			<div class="fvalue">
				<input type="text" name="email" size="40" value="<?php 
        echo form_value('email');
        ?>
" class="formauth"<?php 
        echo $page['canmodify'] ? "" : " disabled=\"disabled\"";
        ?>
/>
			</div>
			<div class="fdescr"> &mdash; <?php 
        echo getlocal('form.field.mail.description');
        ?>
</div>
			<br clear="all"/>
		</div>

		<div class="field">
			<div class="flabel"><?php 
        echo getlocal('form.field.password');
        if (!$page['opid'] || $page['needChangePassword']) {
            ?>
<span class="required">*</span><?php 
        }
        ?>
</div>
			<div class="fvalue">
				<input type="password" name="password" size="40" value="" class="formauth"<?php 
        echo $page['canmodify'] ? "" : " disabled=\"disabled\"";
        ?>
 autocomplete="off"/>
			</div>
			<div class="fdescr"> &mdash; <?php 
        echo getlocal('form.field.password.description');
        ?>
</div>
			<br clear="all"/>
		</div>

		<div class="field">
			<div class="flabel"><?php 
        echo getlocal('form.field.password_confirm');
        if (!$page['opid'] || $page['needChangePassword']) {
            ?>
<span class="required">*</span><?php 
        }
        ?>
</div>
			<div class="fvalue">
				<input type="password" name="passwordConfirm" size="40" value="" class="formauth"<?php 
        echo $page['canmodify'] ? "" : " disabled=\"disabled\"";
        ?>
 autocomplete="off"/>
			</div>
			<div class="fdescr"> &mdash; <?php 
        echo getlocal('form.field.password_confirm.description');
        ?>
</div>
			<br clear="all"/>
		</div>

		<div class="field">
			<div class="flabel"><?php 
        echo getlocal('form.field.agent_name');
        ?>
<span class="required">*</span></div>
			<div class="fvalue">
				<input type="text" name="name" size="40" value="<?php 
        echo form_value('name');
        ?>
" class="formauth"<?php 
        echo $page['canmodify'] ? "" : " disabled=\"disabled\"";
        ?>
/>
			</div>
			<div class="fdescr"> &mdash; <?php 
        echo getlocal('form.field.agent_name.description');
        ?>
</div>
			<br clear="all"/>
		</div>

		<div class="field">
			<div class="flabel"><?php 
        echo getlocal('form.field.agent_commonname');
        ?>
<span class="required">*</span></div>
			<div class="fvalue">
				<input type="text" name="commonname" size="40" value="<?php 
        echo form_value('commonname');
        ?>
" class="formauth"<?php 
        echo $page['canmodify'] ? "" : " disabled=\"disabled\"";
        ?>
/>
			</div>
			<div class="fdescr"> &mdash; <?php 
        echo getlocal('form.field.agent_commonname.description');
        ?>
</div>
			<br clear="all"/>
		</div>

<?php 
        if ($page['showjabber']) {
            ?>
		<div class="field">
			<div class="flabel"><?php 
            echo getlocal('form.field.jabber');
            ?>
</div>
			<div class="fvalue">
				<input type="text" name="jabber" size="40" value="<?php 
            echo form_value('jabber');
            ?>
" class="formauth"<?php 
            echo $page['canmodify'] ? "" : " disabled=\"disabled\"";
            ?>
/>
			</div>
			<div class="fdescr"> &mdash; <?php 
            echo getlocal('form.field.jabber.description');
            ?>
</div>
			<br clear="all"/>
		</div>
		
		<div class="field" style="padding-top:0.3em;">
			<div class="flabel"><?php 
            echo getlocal('form.field.jabbernotify');
            ?>
</div>
			<div class="fvalue">
				<input type="checkbox" name="jabbernotify" value="on"<?php 
            echo form_value_cb('jabbernotify') ? " checked=\"checked\"" : "";
            echo $page['canmodify'] ? "" : " disabled=\"disabled\"";
            ?>
/>
			</div>
			<div class="fdescr"> &mdash; <?php 
            echo getlocal('form.field.jabbernotify.description');
            ?>
</div>
			<br clear="all"/>
		</div>
<?php 
        }
        ?>

<?php 
        if ($page['canmodify']) {
            ?>
		<div class="fbutton">
			<input type="image" name="save" value="" src="<?php 
            echo $mibewroot . safe_htmlspecialchars(getlocal("image.button.save"));
            ?>
" alt="<?php 
            echo safe_htmlspecialchars(getlocal("button.save"));
            ?>
"/>
		</div>
<?php 
        }
        ?>
	</div>
	
	</div><div class="formbottom"><div class="formbottomi"></div></div></div>
	</div>		
	
	<div class="asterisk">
		<?php 
        echo getlocal("common.asterisk_explanation");
        ?>
	</div>

</form>
<?php 
    }
}
Exemplo n.º 28
0
Arquivo: menu.php Projeto: kuell/chat
function tpl_content()
{
    global $page, $mibewroot, $current_locale, $menuItemsCount, $version;
    ?>

<br/>

<?php 
    if ($page['needChangePassword']) {
        ?>
<div id="formmessage"><?php 
        echo getlocal("error.no_password");
        ?>
 <?php 
        echo getlocal2("error.no_password.visit_profile", array(safe_htmlspecialchars($page['profilePage'])));
        ?>
</div>
<br/>
<?php 
    } else {
        if ($page['needUpdate']) {
            ?>
<div id="formmessage"><?php 
            echo getlocal2("install.updatedb", array(safe_htmlspecialchars($page['updateWizard'])));
            ?>
</div>
<br/>
<?php 
        } else {
            if ($page['newFeatures']) {
                ?>
<div><div id="formmessage"><?php 
                echo getlocal2("install.newfeatures", array(safe_htmlspecialchars($page['featuresPage']), safe_htmlspecialchars($version)));
                ?>
</div></div>
<br/>
<?php 
            }
        }
    }
    ?>

<table id="dashboard">
<tr>
	<td class="dashitem">
		<img src="<?php 
    echo $mibewroot;
    ?>
/images/dash/visitors.gif" alt=""/>
		<a href="<?php 
    echo $mibewroot;
    ?>
/operator/users.php">
			<?php 
    echo getlocal('topMenu.users');
    ?>
</a>
		<?php 
    echo getlocal('page_client.pending_users');
    ?>
	</td>

	<td class="dashitem">
		<img src="<?php 
    echo $mibewroot;
    ?>
/images/dash/history.gif" alt=""/>
		<a href="<?php 
    echo $mibewroot;
    ?>
/operator/history.php">
			<?php 
    echo getlocal('page_analysis.search.title');
    ?>
</a>
		<?php 
    echo getlocal('content.history');
    ?>
	</td>
<?php 
    $menuItemsCount = 2;
    ?>

<?php 
    if ($page['showstat']) {
        ?>
	<td class="dashitem">
		<img src="<?php 
        echo $mibewroot;
        ?>
/images/dash/stat.gif" alt=""/>
		<a href="<?php 
        echo $mibewroot;
        ?>
/operator/statistics.php">
			<?php 
        echo getlocal('statistics.title');
        ?>
</a>
		<?php 
        echo getlocal('statistics.description');
        ?>
	</td>
	<?php 
        menuseparator();
    }
    ?>

<?php 
    if ($page['showban']) {
        ?>
	<td class="dashitem">
		<img src="<?php 
        echo $mibewroot;
        ?>
/images/dash/blocked.gif" alt=""/>
		<a href="<?php 
        echo $mibewroot;
        ?>
/operator/blocked.php">
			<?php 
        echo getlocal('menu.blocked');
        ?>
</a>
		<?php 
        echo getlocal('content.blocked');
        ?>
	</td>
	<?php 
        menuseparator();
    }
    ?>

	<td class="dashitem">
		<img src="<?php 
    echo $mibewroot;
    ?>
/images/dash/canned.gif" alt=""/>
		<a href="<?php 
    echo $mibewroot;
    ?>
/operator/canned.php">
			<?php 
    echo getlocal('menu.canned');
    ?>
</a>
		<?php 
    echo getlocal('canned.descr');
    ?>
	</td>
	<?php 
    menuseparator();
    ?>

<?php 
    if ($page['showadmin']) {
        ?>
	<td class="dashitem">
		<img src="<?php 
        echo $mibewroot;
        ?>
/images/dash/getcode.gif" alt=""/>
		<a href="<?php 
        echo $mibewroot;
        ?>
/operator/getcode.php">
			<?php 
        echo getlocal('leftMenu.client_gen_button');
        ?>
</a>
		<?php 
        echo getlocal('admin.content.client_gen_button');
        ?>
	</td>
	<?php 
        menuseparator();
        ?>

	<td class="dashitem">
		<img src="<?php 
        echo $mibewroot;
        ?>
/images/dash/operators.gif" alt=""/>
		<a href="<?php 
        echo $mibewroot;
        ?>
/operator/operators.php">
			<?php 
        echo getlocal('leftMenu.client_agents');
        ?>
</a>
		<?php 
        echo getlocal('admin.content.client_agents');
        ?>
	</td>
	<?php 
        menuseparator();
        ?>

<?php 
        if ($page['showgroups']) {
            ?>
	<td class="dashitem">
		<img src="<?php 
            echo $mibewroot;
            ?>
/images/dash/dep.gif" alt=""/>
		<a href="<?php 
            echo $mibewroot;
            ?>
/operator/groups.php">
			<?php 
            echo getlocal('menu.groups');
            ?>
</a>
		<?php 
            echo getlocal('menu.groups.content');
            ?>
	</td>
	<?php 
            menuseparator();
        }
        ?>

	<td class="dashitem">
		<img src="<?php 
        echo $mibewroot;
        ?>
/images/dash/settings.gif" alt=""/>
		<a href="<?php 
        echo $mibewroot;
        ?>
/operator/settings.php">
			<?php 
        echo getlocal('leftMenu.client_settings');
        ?>
</a>
		<?php 
        echo getlocal('admin.content.client_settings');
        ?>
	</td>
	<?php 
        menuseparator();
    }
    ?>

<?php 
    if (isset($page['currentopid']) && $page['currentopid']) {
        ?>
	<td class="dashitem">
		<img src="<?php 
        echo $mibewroot;
        ?>
/images/dash/profile.gif" alt=""/>
		<a href="<?php 
        echo $mibewroot;
        ?>
/operator/operator.php?op=<?php 
        echo urlencode($page['currentopid']);
        ?>
">
			<?php 
        echo getlocal('menu.profile');
        ?>
</a>
		<?php 
        echo getlocal('menu.profile.content');
        ?>
	</td>
	<?php 
        menuseparator();
    }
    ?>

<?php 
    if (isset($page) && isset($page['localeLinks'])) {
        ?>
	<td class="dashitem">
		<img src="<?php 
        echo $mibewroot;
        ?>
/images/dash/locale.gif" alt=""/>
		<a href="#" id="changelang">
			<?php 
        echo getlocal('menu.locale');
        ?>
</a>
		<?php 
        echo getlocal('menu.locale.content');
        ?>
	</td>
	<?php 
        menuseparator();
    }
    ?>

<?php 
    if ($page['showadmin']) {
        ?>
	<td class="dashitem">
		<img src="<?php 
        echo $mibewroot;
        ?>
/images/dash/updates.gif" alt=""/>
		<a href="<?php 
        echo $mibewroot;
        ?>
/operator/updates.php">
			<?php 
        echo getlocal('menu.updates');
        ?>
</a>
		<?php 
        echo getlocal('menu.updates.content');
        ?>
	</td>
	<?php 
        menuseparator();
    }
    ?>

<?php 
    if ($page['showadmin'] || $page['shownotifications']) {
        ?>
	<td class="dashitem">
		<img src="<?php 
        echo $mibewroot;
        ?>
/images/dash/notifications.gif" alt=""/>
		<a href="<?php 
        echo $mibewroot;
        ?>
/operator/notifications.php">
			<?php 
        echo getlocal('menu.notifications');
        ?>
</a>
		<?php 
        echo getlocal('menu.notifications.content');
        ?>
	</td>
	<?php 
        menuseparator();
    }
    ?>

	<td class="dashitem">
		<img src="<?php 
    echo $mibewroot;
    ?>
/images/dash/exit.gif" alt=""/>
		<a href="<?php 
    echo $mibewroot;
    ?>
/operator/logout.php">
			<?php 
    echo getlocal('topMenu.logoff');
    ?>
</a>
		<?php 
    echo getlocal('content.logoff');
    ?>
	</td>
</tr>

</table>

<?php 
    if (isset($page) && isset($page['localeLinks'])) {
        ?>
<div id="dashlocalesPopup">
	<a href="#" id="dashlocalesPopupClose"><img src="<?php 
        echo $mibewroot;
        ?>
/images/dash/close.gif" alt="X"/></a>
	<h2><img src="<?php 
        echo $mibewroot;
        ?>
/images/dash/locale.gif"  alt=""/>
	<b><?php 
        echo getlocal("lang.choose");
        ?>
</b></h2>
	<ul class="locales">
<?php 
        foreach ($page['localeLinks'] as $id => $title) {
            ?>
		<li<?php 
            echo $current_locale == $id ? " class=\"active\"" : "";
            ?>
 ><a href="?locale=<?php 
            echo urlencode($id);
            ?>
"><?php 
            echo safe_htmlspecialchars($title);
            ?>
</a></li>
<?php 
        }
        ?>
	</ul>
</div>
<div id="backgroundPopup"></div>
<?php 
    }
    ?>

<?php 
}
Exemplo n.º 29
0
Arquivo: group.php Projeto: kuell/chat
function tpl_content()
{
    global $page, $mibewroot, $errors;
    ?>

	<?php 
    if ($page['grid']) {
        echo getlocal("page.group.intro");
    }
    if (!$page['grid']) {
        echo getlocal("page.group.create_new");
    }
    ?>
<br />
<br />
<?php 
    require_once 'inc_errors.php';
    if ($page['stored']) {
        ?>
<div id="formmessage"><?php 
        echo getlocal("data.saved");
        ?>
</div>
<?php 
    }
    ?>

<form name="groupForm" method="post" action="<?php 
    echo $mibewroot;
    ?>
/operator/group.php">
<?php 
    print_csrf_token_input();
    ?>
<input type="hidden" name="gid" value="<?php 
    echo safe_htmlspecialchars($page['grid']);
    ?>
"/>
	<div>
<?php 
    print_tabbar();
    ?>
	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">

	<div class="fieldForm">
		<div class="field">
			<div class="flabel"><?php 
    echo getlocal('form.field.groupname');
    ?>
<span class="required">*</span></div>
			<div class="fvalue">
				<input type="text" name="name" size="40" value="<?php 
    echo form_value('name');
    ?>
" class="formauth"/>
			</div>
			<div class="fdescr"> &mdash; <?php 
    echo getlocal('form.field.groupname.description');
    ?>
</div>
			<br clear="all"/>
		</div>

		<div class="field">
			<div class="flabel"><?php 
    echo getlocal('form.field.groupdesc');
    ?>
</div>
			<div class="fvalue">
				<input type="text" name="description" size="40" value="<?php 
    echo form_value('description');
    ?>
" class="formauth"/>
			</div>
			<div class="fdescr"> &mdash; <?php 
    echo getlocal('form.field.groupdesc.description');
    ?>
</div>
			<br clear="all"/>
		</div>

		<div class="field">
			<div class="flabel"><?php 
    echo getlocal('form.field.groupcommonname');
    ?>
</div>
			<div class="fvalue">
				<input type="text" name="commonname" size="40" value="<?php 
    echo form_value('commonname');
    ?>
" class="formauth"/>
			</div>
			<div class="fdescr"> &mdash; <?php 
    echo getlocal('form.field.groupcommonname.description');
    ?>
</div>
			<br clear="all"/>
		</div>

		<div class="field">
			<div class="flabel"><?php 
    echo getlocal('form.field.groupcommondesc');
    ?>
</div>
			<div class="fvalue">
				<input type="text" name="commondescription" size="40" value="<?php 
    echo form_value('commondescription');
    ?>
" class="formauth"/>
			</div>
			<div class="fdescr"> &mdash; <?php 
    echo getlocal('form.field.groupcommondesc.description');
    ?>
</div>
			<br clear="all"/>
		</div>
		
		<div class="field">
			<div class="flabel"><?php 
    echo getlocal('form.field.mail');
    ?>
</div>
			<div class="fvalue">
				<input type="text" name="email" size="40" value="<?php 
    echo form_value('email');
    ?>
" class="formauth"/>
			</div>
			<div class="fdescr"> &mdash; <?php 
    echo getlocal('form.field.groupemail.description');
    ?>
</div>
			<br clear="all"/>
		</div>
		
		<div class="fbutton">
			<input type="image" name="save" value="" src="<?php 
    echo $mibewroot . safe_htmlspecialchars(getlocal("image.button.save"));
    ?>
" alt="<?php 
    echo safe_htmlspecialchars(getlocal("button.save"));
    ?>
"/>
		</div>
	</div>

	</div><div class="formbottom"><div class="formbottomi"></div></div></div>
	</div>

	<div class="asterisk">
		<?php 
    echo getlocal("common.asterisk_explanation");
    ?>
	</div>

</form>

<?php 
}
Exemplo n.º 30
0
Arquivo: ban.php Projeto: kuell/chat
function tpl_content()
{
    global $page, $mibewroot, $errors;
    ?>

<?php 
    if ($page['saved']) {
        ?>
	<?php 
        echo getlocal2("page_ban.sent", array(safe_htmlspecialchars($page['address'])));
        ?>

	<script type="text/javascript"><!--
		setTimeout( (function() { window.close(); }), 1500 );
	//--></script>
<?php 
    } else {
        ?>

<?php 
        echo getlocal("page_ban.intro");
        ?>
<br/>
<br/>
<?php 
        require_once 'inc_errors.php';
        ?>


<?php 
        if ($page['thread']) {
            ?>
	<?php 
            echo getlocal2("page_ban.thread", array(safe_htmlspecialchars($page['thread'])));
            ?>
<br/>
	<br/>
<?php 
        }
        ?>

<form name="banForm" method="post" action="<?php 
        echo $mibewroot;
        ?>
/operator/ban.php">
<?php 
        print_csrf_token_input();
        ?>
<input type="hidden" name="banId" value="<?php 
        echo safe_htmlspecialchars($page['banId']);
        ?>
"/>
<?php 
        if ($page['threadid']) {
            ?>
<input type="hidden" name="threadid" value="<?php 
            echo safe_htmlspecialchars($page['threadid']);
            ?>
"/>
<?php 
        }
        ?>
	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
	
	<div class="fieldForm">
		<div class="field">
			<div class="flabel"><?php 
        echo getlocal('form.field.address');
        ?>
<span class="required">*</span></div>
			<div class="fvalue">
				<input type="text" name="address" size="40" value="<?php 
        echo form_value('address');
        ?>
" class="formauth"/>
			</div>
			<div class="fdescr"> &mdash; <?php 
        echo getlocal('form.field.address.description');
        ?>
</div>
			<br clear="all"/>
		</div>

		<div class="field">
			<div class="flabel"><?php 
        echo getlocal('form.field.ban_days');
        ?>
<span class="required">*</span></div>
			<div class="fvalue">
				<input type="text" name="days" size="4" value="<?php 
        echo form_value('days');
        ?>
" class="formauth"/>
			</div>
			<div class="fdescr"> &mdash; <?php 
        echo getlocal('form.field.ban_days.description');
        ?>
</div>
			<br clear="all"/>
		</div>

		<div class="field">
			<div class="flabel"><?php 
        echo getlocal('form.field.ban_comment');
        ?>
<span class="required">*</span></div>
			<div class="fvalue">
				<input type="text" name="comment" size="40" value="<?php 
        echo form_value('comment');
        ?>
" class="formauth"/>
			</div>
			<div class="fdescr"> &mdash; <?php 
        echo getlocal('form.field.ban_comment.description');
        ?>
</div>
			<br clear="all"/>
		</div>
		
		<div class="fbutton">
			<input type="image" name="save" value="" src="<?php 
        echo $mibewroot . safe_htmlspecialchars(getlocal("image.button.save"));
        ?>
" alt="<?php 
        echo safe_htmlspecialchars(getlocal("button.save"));
        ?>
"/>
		</div>
	</div>
	
	</div><div class="formbottom"><div class="formbottomi"></div></div></div>
	
	<div class="asterisk">
		<?php 
        echo getlocal("common.asterisk_explanation");
        ?>
	</div>
	
</form>
<?php 
    }
    ?>


<?php 
}