Example #1
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 
}
Example #2
0
function tpl_content()
{
    global $page, $webimroot, $errors;
    ?>

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

<?php 
    if ($page['canmodify']) {
        ?>
<div class="tabletool">
	<img src='<?php 
        echo $webimroot;
        ?>
/images/buttons/createagent.gif' border="0" alt="" />
	<a href='<?php 
        echo $webimroot;
        ?>
/operator/operator.php' title="<?php 
        echo getlocal("page_agents.new_agent");
        ?>
">
		<?php 
        echo getlocal("page_agents.new_agent");
        ?>
	</a>
</div>
<br clear="all"/>
<?php 
    }
    ?>

<table class="list">
<thead>
<tr class="header">
<th>
	<?php 
    echo getlocal("page_agents.login");
    ?>
</th><th>
	<?php 
    echo getlocal("page_agents.agent_name");
    ?>
</th><th>
	<?php 
    echo getlocal("page_agents.status");
    if ($page['canmodify']) {
        ?>
</th><th>
<?php 
    }
    ?>
</th>
</tr>
</thead>
<tbody>
<?php 
    foreach ($page['allowedAgents'] as $a) {
        ?>
<tr>
	<td class="notlast">
   		<a id="ti<?php 
        echo $a['operatorid'];
        ?>
" href="<?php 
        echo $webimroot;
        ?>
/operator/operator.php?op=<?php 
        echo $a['operatorid'];
        ?>
" class="man">
   			<?php 
        echo htmlspecialchars(topage($a['vclogin']));
        ?>
   		</a>
	</td>
	<td class="notlast">
   		<?php 
        echo htmlspecialchars(topage($a['vclocalename']));
        ?>
 / <?php 
        echo htmlspecialchars(topage($a['vccommonname']));
        ?>
	</td>
	<td class="notlast">
<?php 
        if (operator_is_available($a)) {
            ?>
		<?php 
            echo getlocal("page_agents.isonline");
        } else {
            if (operator_is_away($a)) {
                ?>
		<?php 
                echo getlocal("page_agents.isaway");
            } else {
                ?>
		<?php 
                echo date_to_text(time() - $a['time']);
            }
        }
        ?>
	</td>
<?php 
        if ($page['canmodify']) {
            ?>
	<td>
  <a class="removelink" id="i<?php 
            echo $a['operatorid'];
            ?>
" href="<?php 
            echo $webimroot;
            ?>
/operator/operators.php?act=del&amp;id=<?php 
            echo $a['operatorid'];
            print_csrf_token_in_url();
            ?>
">
			remove
		</a>
	</td>
<?php 
        }
        ?>
	
</tr>
<?php 
    }
    ?>
</tbody>
</table>
<script type="text/javascript" language="javascript"><!--
$('a.removelink').click(function(){
	var login = $("#t"+this.id).text();
	return confirm("<?php 
    echo getlocalforJS("page_agents.confirm", array('"+$.trim(login)+"'));
    ?>
");
});
//--></script>

<?php 
}
Example #3
0
function tpl_content()
{
    global $page, $mibewroot, $errors;
    ?>

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

<form name="avatarForm" method="post" action="<?php 
    echo $mibewroot;
    ?>
/operator/avatar.php" enctype="multipart/form-data">
<?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>

	<div class="fieldForm">

<?php 
    if ($page['avatar']) {
        ?>
		<div class="field">
			<div class="flabel"><?php 
        echo getlocal('form.field.avatar.current');
        ?>
</div>
			<div class="fvalue">
				<img src="<?php 
        echo safe_htmlspecialchars($page['avatar']);
        ?>
?<?php 
        echo rand();
        ?>
" alt="<?php 
        echo safe_htmlspecialchars(getlocal("page_avatar.cannot_load_avatar"));
        ?>
"/><br/>
<?php 
        if ($page['canmodify']) {
            ?>
                <a class="formauth" href="<?php 
            echo $mibewroot;
            ?>
/operator/avatar.php?op=<?php 
            echo urlencode($page['opid']);
            ?>
&amp;act=del<?php 
            print_csrf_token_in_url();
            ?>
">
                    <?php 
            echo getlocal("page_agent.clear_avatar");
            ?>
                </a>
<?php 
        }
        ?>
			</div>
			<div class="fdescr"> &mdash; <?php 
        echo getlocal('form.field.avatar.current.description');
        ?>
</div>
			<br clear="all"/>
		</div>
<?php 
    } else {
        if (!$page['canmodify']) {
            ?>
		<div class="field">
			<div class="fvaluenodesc">
				<?php 
            echo getlocal('page_avatar.no_avatar');
            ?>
			</div>
		</div>
<?php 
        }
    }
    ?>

<?php 
    if ($page['canmodify']) {
        ?>
		<div class="field">
			<div class="flabel"><?php 
        echo getlocal('form.field.avatar.upload');
        ?>
<span class="required">*</span></div>
			<div class="fvalue">
				<input type="file" name="avatarFile" size="40" value="<?php 
        echo form_value('avatarFile');
        ?>
" class="formauth"/>
			</div>
			<div class="fdescr"> &mdash; <?php 
        echo getlocal('form.field.avatar.upload.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>
<?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 
}
Example #4
0
function tpl_content()
{
    global $page, $webimroot, $errors;
    ?>

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

<form name="cannedForm" method="get" action="<?php 
    echo $webimroot;
    ?>
/operator/canned.php">
	
	<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">

	<div class="packedFormField">
		<?php 
    echo getlocal("canned.locale");
    ?>
<br/>
		<select name="lang" onchange="this.form.submit();"><?php 
    foreach ($page['locales'] as $k) {
        echo "<option value=\"" . $k["id"] . "\"" . ($k["id"] == form_value("lang") ? " selected=\"selected\"" : "") . ">" . $k["name"] . "</option>";
    }
    ?>
</select>
	</div>
	
<?php 
    if ($page['showgroups']) {
        ?>
	<div class="packedFormField">
		<?php 
        echo getlocal("canned.group");
        ?>
<br/>
		<select name="group" onchange="this.form.submit();"><?php 
        foreach ($page['groups'] as $k) {
            echo "<option value=\"" . $k["groupid"] . "\"" . ($k["groupid"] == form_value("group") ? " selected=\"selected\"" : "") . ">" . $k["vclocalname"] . "</option>";
        }
        ?>
</select>
	</div>
<?php 
    }
    ?>
	
	<br clear="all"/>
	
	</div><div class="formbottom"><div class="formbottomi"></div></div></div>
</form>
<br/>

<div class="tabletool">
	<img src="<?php 
    echo $webimroot;
    ?>
/images/buttons/createban.gif" border="0" alt=""/>
	<a href="<?php 
    echo $webimroot;
    ?>
/operator/cannededit.php?lang=<?php 
    echo form_value("lang");
    ?>
&amp;group=<?php 
    echo form_value("group");
    ?>
" target="_blank" 
				onclick="this.newWindow = window.open('<?php 
    echo $webimroot;
    ?>
/operator/cannededit.php?lang=<?php 
    echo form_value("lang");
    ?>
&amp;group=<?php 
    echo form_value("group");
    ?>
', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;">
		<?php 
    echo getlocal("canned.add");
    ?>
	</a>
</div>
<br clear="all"/>

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

<table class="translate">
<thead>
	<tr class="header"><th>
		<?php 
        echo getlocal("cannededit.message");
        ?>
	</th><th>
		<?php 
        echo getlocal("canned.actions");
        ?>
	</th></tr>
</thead>
<tbody>
<?php 
        if ($page['pagination.items']) {
            foreach ($page['pagination.items'] as $localstr) {
                ?>
	<tr>
		<td>
			<?php 
                echo str_replace("\n", "<br/>", htmlspecialchars(topage($localstr['vcvalue'])));
                ?>
		</td>
		<td>
			<a href="<?php 
                echo $webimroot;
                ?>
/operator/cannededit.php?key=<?php 
                echo $localstr['id'];
                ?>
" target="_blank" 
				onclick="this.newWindow = window.open('<?php 
                echo $webimroot;
                ?>
/operator/cannededit.php?key=<?php 
                echo $localstr['id'];
                ?>
', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php 
                echo getlocal("canned.actions.edit");
                ?>
</a>, 
			<a href="<?php 
                echo $webimroot;
                ?>
/operator/canned.php?act=delete&amp;key=<?php 
                echo $localstr['id'];
                ?>
&amp;lang=<?php 
                echo form_value("lang");
                ?>
&amp;group=<?php 
                echo form_value("group");
                print_csrf_token_in_url();
                ?>
"><?php 
                echo getlocal("canned.actions.del");
                ?>
</a>
		</td>
	</tr>
<?php 
            }
        } else {
            ?>
	<tr>
	<td colspan="3">
		<?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 
}
Example #5
0
function tpl_content()
{
    global $page, $mibewroot, $errors;
    ?>

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

<?php 
    if ($page['canmodify']) {
        ?>
<div class="tabletool">
	<img src="<?php 
        echo $mibewroot;
        ?>
/images/buttons/createdep.gif" border="0" alt="" />
	<a href="<?php 
        echo $mibewroot;
        ?>
/operator/group.php" title="<?php 
        echo getlocal("page.groups.new");
        ?>
">
		<?php 
        echo getlocal("page.groups.new");
        ?>
	</a>
</div>
<br clear="all"/>
<?php 
    }
    ?>

<table class="list">
<thead>
<tr class="header">
<th>
	<?php 
    echo getlocal("form.field.groupname");
    ?>
</th><th>
	<?php 
    echo getlocal("form.field.groupdesc");
    ?>
</th><th>
	<?php 
    echo getlocal("page_agents.status");
    ?>
</th><th>
	<?php 
    echo getlocal("page.group.membersnum");
    if ($page['canmodify']) {
        ?>
</th><th>
<?php 
    }
    ?>
</th>
</tr>
</thead>
<tbody>
<?php 
    if (count($page['groups']) > 0) {
        foreach ($page['groups'] as $grp) {
            ?>
<tr>
	<td class="notlast">
		<a href="<?php 
            echo $mibewroot;
            ?>
/operator/group.php?gid=<?php 
            echo urlencode($grp['groupid']);
            ?>
" id="ti<?php 
            echo safe_htmlspecialchars($grp['groupid']);
            ?>
" class="man">
			<?php 
            echo safe_htmlspecialchars(topage($grp['vclocalname']));
            ?>
		</a>
	</td>
	<td class="notlast">
		<?php 
            echo $grp['vclocaldescription'] ? safe_htmlspecialchars(topage($grp['vclocaldescription'])) : "&lt;" . getlocal("page.groups.none") . "&gt;";
            ?>
	</td>
	<td class="notlast">
<?php 
            if (is_online($grp)) {
                ?>
		<?php 
                echo getlocal("page.groups.isonline");
            } else {
                if (is_away($grp)) {
                    ?>
		<?php 
                    echo getlocal("page.groups.isaway");
                } else {
                    ?>
		<?php 
                    echo date_to_text(time() - ($grp['ilastseen'] ? $grp['ilastseen'] : time()));
                }
            }
            ?>
	</td>
	<td>
		<a href="<?php 
            echo $mibewroot;
            ?>
/operator/groupmembers.php?gid=<?php 
            echo urlencode($grp['groupid']);
            ?>
">
			<?php 
            echo safe_htmlspecialchars(topage($grp['inumofagents']));
            ?>
		</a>
	</td>
<?php 
            if ($page['canmodify']) {
                ?>
	<td>
		<a href="<?php 
                echo $mibewroot;
                ?>
/operator/groups.php?act=del&amp;gid=<?php 
                echo urlencode($grp['groupid']);
                print_csrf_token_in_url();
                ?>
" id="i<?php 
                echo safe_htmlspecialchars($grp['groupid']);
                ?>
" class="removelink">
			<?php 
                echo getlocal("page.groups.remove");
                ?>
		</a>
	</td>
<?php 
            }
            ?>
</tr>
<?php 
        }
    } else {
        ?>
	<tr>
	<td colspan="4">
		<?php 
        echo getlocal("tag.pagination.no_items.elements");
        ?>
	</td>
	</tr>
<?php 
    }
    ?>
</tbody>
</table>
<script type="text/javascript" language="javascript"><!--
$('a.removelink').click(function(){
	var groupname = $("#t"+this.id).text();
	return confirm("<?php 
    echo getlocalforJS("page.groups.confirm", array('"+$.trim(groupname)+"'));
    ?>
");
});
//--></script>

<?php 
}