当前位置: 首页>>代码示例>>PHP>>正文


PHP SizeOf函数代码示例

本文整理汇总了PHP中SizeOf函数的典型用法代码示例。如果您正苦于以下问题:PHP SizeOf函数的具体用法?PHP SizeOf怎么用?PHP SizeOf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SizeOf函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

         case 'array':
             break;
         default:
             return ERROR | @Trigger_Error(101);
     }
     #-------------------------------------------------------------------------------
     foreach ($DomainSchemes as $DomainScheme) {
         if (isset($DomainScheme['ID'])) {
             $Zones[$DomainScheme['ID']] = array('Name' => $DomainScheme['Name'], 'CostOrder' => $DomainScheme['CostOrder']);
         }
     }
     #-------------------------------------------------------------------------------
 }
 #-------------------------------------------------------------------------------
 #-------------------------------------------------------------------------------
 if (!$Settings['IsSchemesOnly'] || SizeOf($Zones) == 0) {
     #-------------------------------------------------------------------------------
     $DomainZones = System_XML('config/DomainZones.xml');
     if (Is_Error($DomainZones)) {
         return ERROR | @Trigger_Error(500);
     }
     #-------------------------------------------------------------------------------
     foreach ($DomainZones as $DomainZone) {
         $Zones[$DomainZone['Name']] = array('Name' => $DomainZone['Name'], 'CostOrder' => '-');
     }
     #-------------------------------------------------------------------------------
 }
 #-------------------------------------------------------------------------------
 #-------------------------------------------------------------------------------
 $Row = $Scripts = $JsonOut = array();
 #-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:DomainWhoIs.comp.php

示例2: Debug

        case 'array':
            #-------------------------------------------------------------------------------
            $Owner[] = $Order;
            #-------------------------------------------------------------------------------
            break;
            #-------------------------------------------------------------------------------
        #-------------------------------------------------------------------------------
        default:
            return ERROR | @Trigger_Error(101);
    }
    #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# если не найден владелец - валим
if (SizeOf($Owner) < 1) {
    #-------------------------------------------------------------------------------
    Debug(SPrintF('[comp/www/API/ISPswSettingURL]: License owner not found'));
    #-------------------------------------------------------------------------------
    return new gException('LICENSE_OWNER_NOT_FOUND', 'Владелец лицензии не найден');
    #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# массив, с элементами выходной XML
$Array = array();
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# настройки сети из которой можно выполнять команды
if ($Settings['xset-up-param']['IsActive']) {
    $Array[] = SPrintF('<func name="xset.up.param"><arg name="ip">%s</arg></func>', $Settings['xset-up-param']['LAN']);
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:ISPswSettingURL.comp.php

示例3: foreach

}
#return $ExecuteTime;
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# перебираем полученные данные
foreach (Array_Keys($TUsages) as $ServerID) {
    #-------------------------------------------------------------------------------
    # достаём юзеров из биллинга, и их лимиты
    $Array = array();
    #-------------------------------------------------------------------------------
    foreach (Array_Keys($TUsages[$ServerID]['BUsages']) as $Login) {
        $Array[] = SPrintF("'%s'", $Login);
    }
    #-------------------------------------------------------------------------------
    # однако, массив может получиться пустой
    if (SizeOf($Array) == 0) {
        continue;
    }
    #-------------------------------------------------------------------------------
    $Where = SPrintF('`ServerID` = %u AND `Login` IN (%s)', $ServerID, Implode(',', $Array));
    #-------------------------------------------------------------------------------
    $Columns = array('ID', 'Login', 'UserID', 'Domain', '(SELECT `QuotaCPU` FROM `HostingSchemes` WHERE `HostingSchemes`.`ID` = `HostingOrdersOwners`.`SchemeID`) as `QuotaCPU`', '(SELECT `Name` FROM `HostingSchemes` WHERE `HostingSchemes`.`ID` = `HostingOrdersOwners`.`SchemeID`) as `Scheme`', '(SELECT `Params` FROM `Servers` WHERE `Servers`.`ID` = `HostingOrdersOwners`.`ServerID`) as `Params`');
    #-------------------------------------------------------------------------------
    $HostingOrders = DB_Select('HostingOrdersOwners', $Columns, array('Where' => $Where));
    #-------------------------------------------------------------------------------
    switch (ValueOf($HostingOrders)) {
        case 'error':
            return ERROR | @Trigger_Error(500);
        case 'exception':
            # No more...
            break;
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:HostingCPUUsage.comp.php

示例4: foreach

                        default:
                            return ERROR | @Trigger_Error(101);
                    }
                    #---------------------------------------------------------------
                }
                #---------------------------------------------------------------
                #---------------------------------------------------------------
                foreach ($Employers as $Employer) {
                    $UserIDs[] = $Employer['ID'];
                }
                #---------------------------------------------------------------
                ASort($UserIDs);
                #---------------------------------------------------------------
                $UserIDs = Array_Unique($UserIDs);
                #---------------------------------------------------------------
                Debug(SPrintF("[comp/www/Administrator/PersonalStatistics]: найдено %s сотрудников", SizeOf($UserIDs)));
                break;
            default:
                return ERROR | @Trigger_Error(101);
        }
        break;
    default:
        return ERROR | @Trigger_Error(101);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Table = array();
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# строим шапочку таблицы
$Span = new Tag('SPAN', 'Статистика за период с ' . Date('Y-m-d', $StartDate) . ' по ' . Date('Y-m-d', $FinishDate));
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:PersonalStatistics.comp.php

示例5: switch

 }
 #-------------------------------------------------------------------------------
 #-------------------------------------------------------------------------------
 $Templates = $VPSServer->GetDiskTemplates();
 #-------------------------------------------------------------------------------
 switch (ValueOf($Templates)) {
     case 'error':
         # No more...
         break;
     case 'exception':
         # No more...
         break;
     case 'array':
         Debug(print_r($Templates, true));
         #-------------------------------------------------------------------------------
         if (SizeOf($Templates) < 1) {
             continue 2;
         }
         #-------------------------------------------------------------------------------
         $iServer['Params']['DiskTemplate'] = Implode("\n", $Templates);
         #-------------------------------------------------------------------------------
         $IsUpdate = DB_Update('Servers', array('Params' => $iServer['Params']), array('ID' => $iServer['ID']));
         if (Is_Error($IsUpdate)) {
             return ERROR | @Trigger_Error(500);
         }
         #-------------------------------------------------------------------------------
         break;
         #-------------------------------------------------------------------------------
     #-------------------------------------------------------------------------------
     default:
         return ERROR | @Trigger_Error(101);
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:UpdateDiskTemplates.comp.php

示例6: array

     #-------------------------------------------------------------------------------
     #Debug("[comp/Statistics/ServersIncome]: debug - 3");
     $Params[] = $Income['SummRemainded'] / $Income['DaysRemainded'] * $PaidAccounts * 30;
     $Labels[] = $Server['Address'];
     #-------------------------------------------------------------------------------
     #Debug("[comp/Statistics/ServersIncome]: debug - 4");
     $Balance += $Income['SummRemainded'] / $Income['DaysRemainded'] * $PaidAccounts * 30;
     $Accounts += $NumAccounts;
     $NumPaid += $PaidAccounts;
     #-------------------------------------------------------------------------------
     #Debug("[comp/Statistics/ServersIncome]: cycle complete");
     #-------------------------------------------------------------------------------
 }
 #-------------------------------------------------------------------------------
 #-------------------------------------------------------------------------------
 if (SizeOf($Servers) > 1) {
     #-------------------------------------------------------------------------------
     $Comp = Comp_Load('Formats/Currency', $Balance);
     if (Is_Error($Comp)) {
         return ERROR | @Trigger_Error(500);
     }
     #----------------------------------------------------------------------------
     $Table[] = array(new Tag('TD', array('colspan' => 5, 'class' => 'Standard'), SPrintF('Общий доход от серверов группы: %s', $Comp)));
     #----------------------------------------------------------------------------
     $Table[] = array(new Tag('TD', array('colspan' => 5, 'class' => 'Standard'), SPrintF('Число аккаунтов в группе: %s / %s', $Accounts, $NumPaid)));
     #----------------------------------------------------------------------------
     # средняя стоимость аккаунта
     $Comp = Comp_Load('Formats/Currency', $Balance / $NumPaid);
     if (Is_Error($Comp)) {
         return ERROR | @Trigger_Error(500);
     }
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:ServersIncome.comp.php

示例7: eval

eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
$Where = array('`StatusID` = "Suspended"', '`StatusDate` + 2592000 - UNIX_TIMESTAMP() <= 0');
#-------------------------------------------------------------------------------
$DSOrders = DB_Select('DSOrders', 'ID', array('Where' => $Where));
#-------------------------------------------------------------------------------
switch (ValueOf($DSOrders)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        # No more...
        break;
    case 'array':
        #-------------------------------------------------------------------------------
        $GLOBALS['TaskReturnInfo'] = array('Deleted' => array(SizeOf($DSOrders)));
        #-------------------------------------------------------------------------------
        foreach ($DSOrders as $DSOrder) {
            #-------------------------------------------------------------------------------
            $Comp = Comp_Load('www/API/StatusSet', array('ModeID' => 'DSOrders', 'StatusID' => 'Deleted', 'RowsIDs' => $DSOrder['ID'], 'Comment' => 'Срок блокировки заказа окончен'));
            #-------------------------------------------------------------------------------
            switch (ValueOf($Comp)) {
                case 'error':
                    return ERROR | @Trigger_Error(500);
                case 'exception':
                    return ERROR | @Trigger_Error(400);
                case 'array':
                    # No more...
                    break;
                default:
                    return ERROR | @Trigger_Error(101);
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:DSForDelete.comp.php

示例8: Implode

        default:
            return ERROR | @Trigger_Error(101);
    }
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#Debug(SPrintF('[comp/Tasks/Dispatch]: SendToIDs = %s; SendedIDs = %s;',Implode(',',$SendToIDs),Implode(',',$SendedIDs)));
#-------------------------------------------------------------------------------
# сохраняем параметры задачи
$Task['Params']['SendToIDs'] = Implode(',', Array_Filter($SendToIDs));
$Task['Params']['SendedIDs'] = Implode(',', Array_Filter($SendedIDs));
$UTasks = array('Params' => $Task['Params']);
$IsUpdate = DB_Update('Tasks', $UTasks, array('ID' => $Task['ID']));
#-------------------------------------------------------------------------------
if (Is_Error($IsUpdate)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$GLOBALS['TaskReturnInfo']['Sended'] = array(SizeOf(Array_Filter($SendedIDs)));
$GLOBALS['TaskReturnInfo']['New'] = array($Count);
$GLOBALS['TaskReturnInfo']['Estimated'] = array(SizeOf(Array_Filter($SendToIDs)));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
if (SizeOf($SendToIDs) > 0) {
    return $ExecuteTime;
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
return TRUE;
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Dispatch.comp.php

示例9: foreach

design/bild1.jpg" width="173" height="85" />
        <img class="bild2" src="<?php 
echo $this->config->item('base_url');
?>
design/bild2.jpg" width="173" height="85" />
        <h1><?php 
echo $this->lang->line('register_title');
?>
</h1>
        <p class="desc"><?php 
echo $this->lang->line('register_text');
?>
</p>

<?php 
if (SizeOf($this->session->flashdata('errors')) > 0) {
    ?>
        <div>
<?php 
    foreach ($this->session->flashdata('errors') as $error) {
        ?>
        <div class="warning"><?php 
        echo $error;
        ?>
</div>
<?php 
    }
    ?>
        </div>
<?php 
}
开发者ID:bobkhan,项目名称:MyIkariam,代码行数:31,代码来源:register.php

示例10: Tag

        #-------------------------------------------------------------------------------
        $Row[] = new Tag('TD', array('align' => 'center'), $Comp);
        #-------------------------------------------------------------------------------
    }
    #-------------------------------------------------------------------------------
    $Table[] = $Row;
    #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Form/Input', array('type' => 'button', 'onclick' => 'UserNotifiesSet();', 'value' => 'Сохранить'));
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Table[] = array(new Tag('TD', array('colspan' => SizeOf($Methods) + 1, 'align' => 'right'), $Comp));
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Tables/Extended', $Table);
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Tab', 'User/Settings', new Tag('FORM', array('name' => 'UserNotifiesSetForm', 'onsubmit' => 'return false;'), $Comp));
if (Is_Error($Comp)) {
    return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddChild('Into', $Comp);
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Build(FALSE))) {
    return ERROR | @Trigger_Error(500);
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:UserNotifiesSet.comp.php

示例11: switch

 switch (ValueOf($PaymentSystems)) {
     case 'error':
         return ERROR | @Trigger_Error(500);
     case 'exception':
         #return ERROR | @Trigger_Error(400);
         Debug("[comp/www/Administrator/PaymentsSystemsStatistics]: нет платёжных систем");
         break;
     case 'array':
         Debug("[comp/www/Administrator/PaymentsSystemsStatistics]: num payment systems is " . SizeOf($PaymentSystems));
         break;
     default:
         return ERROR | @Trigger_Error(101);
 }
 #-------------------------------------------------------------------------------
 $Tr = new Tag('TR');
 $Tr->AddChild(new Tag('TD', array('class' => 'Separator', 'colspan' => SizeOf($PaymentSystems) + 3), new Tag('SPAN', 'Статистика за ' . $Year . ' год')));
 $Table[] = $Tr;
 #-------------------------------------------------------------------------------
 #-------------------------------------------------------------------------------
 $Tr = new Tag('TR');
 #-------------------------------------------------------------------------------
 $Comp = Comp_Load('Formats/String', 'Дата', 6);
 if (Is_Error($Comp)) {
     return ERROR | @Trigger_Error(500);
 }
 $Tr->AddChild(new Tag('TD', array('class' => 'Head', 'align' => 'center'), $Comp));
 #-------------------------------------------------------------------------------
 $Comp = Comp_Load('Formats/String', 'Всего оплачено', 6);
 if (Is_Error($Comp)) {
     return ERROR | @Trigger_Error(500);
 }
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:PaymentsSystemsStatistics.comp.php

示例12: replaceSelect

"));
            replaceSelect(Dom.get("tradeRouteEnd<?php 
        echo $trade->id;
        ?>
"));
            replaceSelect(Dom.get("tradegood<?php 
        echo $trade->id;
        ?>
"));
            replaceSelect(Dom.get("time<?php 
        echo $trade->id;
        ?>
"));
        <?php 
    }
}
?>
        <?php 
if (SizeOf($this->Player_Model->trade_routes) == 0 or $param1 == 'new') {
    ?>
            replaceSelect(Dom.get("tradeRouteStart0"));
            replaceSelect(Dom.get("tradeRouteEnd0"));
            replaceSelect(Dom.get("tradegood0"));
            replaceSelect(Dom.get("time0"));
        <?php 
}
?>
        });
        //-->
    </script>
</div>
开发者ID:nofilenamed,项目名称:IZARIAM,代码行数:31,代码来源:tradeAdvisorTradeRoute.php

示例13: Debug

             Debug(SPrintF('[comp/Triggers/GLOBAL]: Additional not match with regulars'));
             #-------------------------------------------------------------------------------
         }
         #-------------------------------------------------------------------------------
     }
     #-------------------------------------------------------------------------------
 }
 #-------------------------------------------------------------------------------
 $AdditionalParams = $Array;
 #-------------------------------------------------------------------------------
 #-------------------------------------------------------------------------------
 # проверяем наличие такой услуги у юзера
 $Where = array(SprintF('`UserID` = %u', $Order['Row']['UserID']), SPrintF('`SchemeID` = %u', $SchemeID), '`StatusID` = "Active" OR `StatusID` = "Waiting"');
 #-------------------------------------------------------------------------------
 # добавляем к условию дополнительные параметры
 if (Is_Array($AdditionalParams) && SizeOf($AdditionalParams) > 0) {
     foreach (Array_Keys($AdditionalParams) as $Key) {
         $Where[] = SPrintF('`%s` = "%s"', $Key, $AdditionalParams[$Key]);
     }
 }
 #-------------------------------------------------------------------------------
 $ExistsOrder = DB_Select(SPrintF('%sOrdersOwners', $Service['Code']), '*', array('UNIQ', 'Where' => $Where, 'Limits' => array(0, 1)));
 switch (ValueOf($ExistsOrder)) {
     case 'error':
         return ERROR | @Trigger_Error(500);
     case 'exception':
         break;
     case 'array':
         #-------------------------------------------------------------------------------
         if ($IsNoDuplicate && $ExistsOrder['StatusID'] == 'Active') {
             #-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:GLOBAL.comp.php

示例14: isset

}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Table = isset($Row2) ? array($Row2, $Row) : array($Row);
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$Types = $Notifies['Types'];
#-------------------------------------------------------------------------------
foreach (Array_Keys($Types) as $TypeID) {
    #-------------------------------------------------------------------------------
    #Debug(SPrintF('[comp/www/UserNotifiesSet]: TypeID = %s',$TypeID));
    $Type = $Types[$TypeID];
    #-------------------------------------------------------------------------------
    #-------------------------------------------------------------------------------
    if (isset($Type['Title'])) {
        $Table[] = array(new Tag('TD', array('colspan' => SizeOf(Array_Keys($Methods)) + 1, 'class' => 'Separator'), $Type['Title']));
    }
    #-------------------------------------------------------------------------------
    $Row = array(new Tag('TD', array('class' => 'Comment'), $Type['Name']));
    #-------------------------------------------------------------------------------
    foreach (Array_Keys($Methods) as $MethodID) {
        #-------------------------------------------------------------------------------
        $Method = $Methods[$MethodID];
        #-------------------------------------------------------------------------------
        #if(!$Method['IsActive'])
        #	continue;
        #-------------------------------------------------------------------------------
        $UseName = SPrintF('Use%s', $MethodID);
        #-------------------------------------------------------------------------------
        $Comp = Comp_Load('Form/Input', array('name' => SPrintF('Notifies/Types/%s/%s', $TypeID, $UseName), 'type' => 'checkbox', 'value' => 1, 'prompt' => isset($Type[$UseName]) && !$Type[$UseName] ? 'Данная настройка отключена администратором' : 'Настройка уведомления', 'onChange' => SPrintF("ConfigChange('Notifies/Types/%s/%s',(checked?1:0));", $TypeID, $UseName)));
        if (Is_Error($Comp)) {
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:GlobalNotifiesSet.comp.php

示例15: foreach

    <div id="fleetMovements" class="contentBox">
        <h3 class="header"><span class="textLabel">Di chuyển của Chiến hạm / Quân đội</span></h3>
        <div class="content">
            <table width="100%" cellpadding="0" cellspacing="0" class="locationEvents">
                <tr style="font-weight: bold; background-color: #faeac6; background-repeat: repeat-x;">
                    <td style="background-repeat: repeat-x; width: 35px; padding: 0"></td>
                    <td style="width: 50px;"></td>
                    <td style="width: 150px;">	Quân lính</td>
                    <td>Xuất xứ</td>
                    <td colspan="3" style="width: 80px; text-align: center;">Nhiệm vụ</td>
                    <td>Mục tiêu</td>
                    <td style="width: 42px">Hành động</td>
                </tr>
<?php 
$mission_id = 0;
if (isset($this->Player_Model->missions) && SizeOf($this->Player_Model->missions) > 0) {
    foreach ($this->Player_Model->missions as $mission) {
        $all_resources = $mission->wood + $mission->wine + $mission->marble + $mission->crystal + $mission->sulfur + $mission->peoples;
        require APPPATH . 'models/mission_data.php';
        if ($mission->user == $this->Player_Model->user->id or $mission->return_start == 0 and $mission->user != $this->Player_Model->user->id) {
            ?>
	<tr  <?php 
            if ($mission_id % 2 == 1) {
                ?>
class='alt'<?php 
            }
            ?>
>
            <td><img src="<?php 
            echo $this->config->item('style_url');
            ?>
开发者ID:bobkhan,项目名称:MyIkariam,代码行数:31,代码来源:militaryAdvisorMilitaryMovements.php


注:本文中的SizeOf函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。