Example #1
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 #2
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 #3
0
function tpl_content()
{
    global $page, $webimroot, $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 $webimroot;
        ?>
/images/buttons/createdep.gif' border="0" alt="" />
	<a href='<?php 
        echo $webimroot;
        ?>
/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 $webimroot;
            ?>
/operator/group.php?gid=<?php 
            echo $grp['groupid'];
            ?>
" id="ti<?php 
            echo $grp['groupid'];
            ?>
" class="man">
   			<?php 
            echo htmlspecialchars(topage($grp['vclocalname']));
            ?>
   		</a>
	</td>
	<td class="notlast">
   		<?php 
            echo $grp['vclocaldescription'] ? htmlspecialchars(topage($grp['vclocaldescription'])) : "&lt;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 $webimroot;
            ?>
/operator/groupmembers.php?gid=<?php 
            echo $grp['groupid'];
            ?>
">
	   		<?php 
            echo htmlspecialchars(topage($grp['inumofagents']));
            ?>
   		</a>
	</td>
<?php 
            if ($page['canmodify']) {
                ?>
	<td>
		<a href="<?php 
                echo $webimroot;
                ?>
/operator/groups.php?act=del&amp;gid=<?php 
                echo $grp['groupid'];
                ?>
" id="i<?php 
                echo $grp['groupid'];
                ?>
" class="removelink">
			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 
}