コード例 #1
0
ファイル: recordings.php プロジェクト: gunawanw9/fbilling
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This file is part of FBilling.
recordings.php - Reponsible for managing recordings associated with each hangup cause
*/
include "shared.php";
// get list of recordings and draw rnav
// of course we could name this files cause.php, and whole section whould be cause management, which would be, em, not pretty
// anyways above can be done bit later
$cause_list = fbilling_get_list('causes');
echo "<div class='rnav'><ul>";
foreach ($cause_list as $cause) {
    echo "<li class='current'><a href=/admin/config.php?display={$display}&cat={$cat}&action=edit&id={$cause['id']}>{$cause['name']}</a></li>";
}
echo "</ul></div>";
$recording_list = recordings_list();
if ($action == 'edit') {
    // start edit cause
    $cause_data = fbilling_get_data_by_id('causes', $id);
    ?>

<form name='cause' method='GET'>
    <table>
        <tr>
            <td>
コード例 #2
0
ファイル: extensions.php プロジェクト: boonit/fbilling
	<a class="fbilling" href=/admin/config.php?display=fbilling_admin&cat=extensions&action=update&button=Manage+Extensions>Update Extensions</a><br />
	<?php 
}
// end overview
// start import
if ($action == 'import') {
    if ($_REQUEST['config'] != 'apply') {
        echo "<h5>" . _("Import Extensions") . "</h5>";
        // get all extensions that exist in FreePBX but not in FBilling
        $sql = "SELECT extension,name FROM users WHERE users.extension NOT IN (SELECT sip_num FROM billing_extensions)";
        $extensions = sql($sql, 'getAll', DB_FETCHMODE_ASSOC);
        if (sizeof($extensions) == 0) {
            echo "<h5>" . _("All extensions seem to be present in FBilling...") . "</h5>";
        } else {
            $tenant_list = fbilling_get_list('tenants');
            $permission_list = fbilling_get_list('permissions');
            ?>
			<form name='extension_form' method='GET' onsubmit='return check_extension_form();'>
				<table class="fbilling">
					<th><?php 
            echo _("Value");
            ?>
</th>
					<th><?php 
            echo _("Data");
            ?>
</th>
					<th><?php 
            echo _("Action");
            ?>
</th>
コード例 #3
0
ファイル: shared.php プロジェクト: gunawanw9/fbilling
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This file is part of FBilling
shared.php - Set of functions/code not belonging anywhere otherwise
*/
echo "<h5>Manage {$cat}</h5>";
if ($cat != 'prefixes' and $cat != 'tariffs' and $cat != 'recordings' and $cat != 'extensions') {
    // we need to display rnav in every component page except prefixes and tariffs and recordings and extensions
    $component_list = fbilling_get_list($cat);
    echo "<div class='rnav'><ul>";
    echo "<li class='current'><a href=/admin/config.php?display={$display}&cat={$cat}&action=add>Add {$fbilling_strings[$cat]}</a></li>";
    foreach ($component_list as $component) {
        echo "<li class='current'><a href=/admin/config.php?display={$display}&cat={$cat}&action=edit&id={$component['id']}>{$component['name']}</a></li>";
    }
    echo "</ul></div>";
}
function page($number_of_pages, $page, $cat)
{
    // used int tariffs in prefixes, in future we should move to new function
    $request_inputs = "\n\t\t<input type='hidden' name='display' value='fbilling_admin'>\n\t\t<input type='hidden' name='cat' value='{$cat}'>\n\t\t<input type='hidden' name='prefix' value={$_REQUEST['prefix']} >\n\t\t<input type='hidden' name='prefix_weight_id' value={$_REQUEST['prefix_weight_id']} >\n\t";
    if ($cat == 'prefixes') {
        $request_inputs .= "<input type='hidden' name='action' value='list'>";
        $request_inputs .= "<input type='hidden' name='prefix_is_active' value={$_REQUEST['prefix_is_active']} >";
    }
コード例 #4
0
ファイル: functions.inc.php プロジェクト: gunawanw9/fbilling
function fbilling_applyhooks()
{
    // get needed data prior to loading page
    global $currentcomponent;
    $tenant_list = fbilling_get_list('tenants');
    $permission_list = fbilling_get_list('permissions');
    // select refill
    $currentcomponent->addoptlistitem('fbilling_refill', '1', _('Yes'));
    $currentcomponent->addoptlistitem('fbilling_refill', '0', _('No'));
    $currentcomponent->setoptlistopts('fbilling_refill', 'sort', false);
    // select extension.use_limit
    $currentcomponent->addoptlistitem('fbilling_limit', '1', _('Yes'));
    $currentcomponent->addoptlistitem('fbilling_limit', '0', _('No'));
    $currentcomponent->setoptlistopts('fbilling_limit', 'sort', false);
    // select extension.personal_credit
    $currentcomponent->addoptlistitem('fbilling_extension_use_personal_credit', '1', _('Yes'));
    $currentcomponent->addoptlistitem('fbilling_extension_use_personal_credit', '0', _('No'));
    $currentcomponent->setoptlistopts('fbilling_extension_use_personal_credit', 'sort', false);
    // select extension.is_Active
    $currentcomponent->addoptlistitem('fbilling_extension_is_active', '1', _('Yes'));
    $currentcomponent->addoptlistitem('fbilling_extension_is_active', '0', _('No'));
    $currentcomponent->setoptlistopts('fbilling_extension_is_active', 'sort', false);
    // select tenant
    $currentcomponent->addoptlistitem('fbilling_tenant', '', _('Select'));
    foreach ($tenant_list as $tenant) {
        $currentcomponent->addoptlistitem('fbilling_tenant', $tenant['id'], $tenant['name']);
    }
    $currentcomponent->setoptlistopts('fbilling_tenant', 'sort', false);
    // select permission
    $currentcomponent->addoptlistitem('fbilling_permission', '', _('Select'));
    foreach ($permission_list as $permission) {
        $currentcomponent->addoptlistitem('fbilling_permission', $permission['id'], $permission['name']);
    }
    $currentcomponent->setoptlistopts('fbilling_permission', 'sort', false);
    $currentcomponent->addguifunc('fbilling_configpageload');
}
コード例 #5
0
$day_end = isset($_REQUEST['day_end']) ? $_REQUEST['day_end'] : date('d');
$hour_end = isset($_REQUEST['hour_end']) ? $_REQUEST['hour_end'] : '23';
$minute_end = isset($_REQUEST['minute_end']) ? $_REQUEST['minute_end'] : '59';
$calldate_start = $year_start . "-" . $month_start . "-" . $day_start . " " . $hour_start . ":" . $minute_start;
$calldate_end = $year_end . "-" . $month_end . "-" . $day_end . " " . $hour_end . ":" . $minute_end;
if (!$_REQUEST['page'] or empty($_REQUEST['page'])) {
    $page = '1';
} else {
    $page = $_REQUEST['page'];
}
$cause_id = isset($_REQUEST['cause_id']) ? $_REQUEST['cause_id'] : 'all';
$tenant_id = isset($_REQUEST['tenant_id']) ? $_REQUEST['tenant_id'] : 'all';
$weight_id = isset($_REQUEST['weight_id']) ? $_REQUEST['weight_id'] : 'all';
$cause_list = fbilling_get_list('causes');
$tenant_list = fbilling_get_list('tenants');
$weight_list = fbilling_get_list('weights');
$offset = $page == 1 ? 0 : $page * 20 - 20;
?>

<h3>Fbilling Reports</h3><hr>
<table>
    <tr>
        <td>
            <form method="GET" name="detailed_search">
                <input type="hidden" name="display" value="fbilling_reports">
                <input type="hidden" name="action" value="search">
                <input type="hidden" name="cat" value="detailed_search">
                <input type="submit" tabindex="<?php 
echo ++$tabindex;
?>
" name="report_type_label" value="Detailed Search" />