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


PHP Is_Integer函数代码示例

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


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

示例1: SQLSelect

global $save_qry;
if ($save_qry) {
    $qry = $session->data['veraproperties_qry'];
} else {
    $session->data['veraproperties_qry'] = $qry;
}
if (!$qry) {
    $qry = "1";
}
// FIELDS ORDER
global $sortby_veraproperties;
if (!$sortby_veraproperties) {
    $sortby_veraproperties = $session->data['veraproperties_sort'];
} else {
    if ($session->data['veraproperties_sort'] == $sortby_veraproperties) {
        if (Is_Integer(strpos($sortby_veraproperties, ' DESC'))) {
            $sortby_veraproperties = str_replace(' DESC', '', $sortby_veraproperties);
        } else {
            $sortby_veraproperties = $sortby_veraproperties . " DESC";
        }
    }
    $session->data['veraproperties_sort'] = $sortby_veraproperties;
}
if (!$sortby_veraproperties) {
    $sortby_veraproperties = "TITLE";
}
$out['SORTBY'] = $sortby_veraproperties;
// SEARCH RESULTS
$res = SQLSelect("SELECT * FROM veraproperties WHERE {$qry} ORDER BY " . $sortby_veraproperties);
if ($res[0]['ID']) {
    colorizeArray($res);
开发者ID:sergejey,项目名称:majordomo-veralite,代码行数:31,代码来源:veraproperties_search.inc.php

示例2: SQLSelect

global $save_qry;
if ($save_qry) {
    $qry = $session->data['system_errors_qry'];
} else {
    $session->data['system_errors_qry'] = $qry;
}
if (!$qry) {
    $qry = "1";
}
// FIELDS ORDER
global $sortby_system_errors;
if (!$sortby_system_errors) {
    $sortby_system_errors = $session->data['system_errors_sort'];
} else {
    if ($session->data['system_errors_sort'] == $sortby_system_errors) {
        if (Is_Integer(strpos($sortby_system_errors, ' DESC'))) {
            $sortby_system_errors = str_replace(' DESC', '', $sortby_system_errors);
        } else {
            $sortby_system_errors = $sortby_system_errors . " DESC";
        }
    }
    $session->data['system_errors_sort'] = $sortby_system_errors;
}
$sortby_system_errors = "ACTIVE DESC, LATEST_UPDATE DESC, CODE";
$out['SORTBY'] = $sortby_system_errors;
// SEARCH RESULTS
$res = SQLSelect("SELECT * FROM system_errors WHERE {$qry} ORDER BY " . $sortby_system_errors);
if ($res[0]['ID']) {
    colorizeArray($res);
    $total = count($res);
    for ($i = 0; $i < $total; $i++) {
开发者ID:cdkisa,项目名称:majordomo,代码行数:31,代码来源:system_errors_search.inc.php

示例3: SQLSelect

global $save_qry;
if ($save_qry) {
    $qry = $session->data['elements_qry'];
} else {
    $session->data['elements_qry'] = $qry;
}
if (!$qry) {
    $qry = "1";
}
// FIELDS ORDER
global $sortby_elements;
if (!$sortby_elements) {
    $sortby_elements = $session->data['elements_sort'];
} else {
    if ($session->data['elements_sort'] == $sortby_elements) {
        if (Is_Integer(strpos($sortby_elements, ' DESC'))) {
            $sortby_elements = str_replace(' DESC', '', $sortby_elements);
        } else {
            $sortby_elements = $sortby_elements . " DESC";
        }
    }
    $session->data['elements_sort'] = $sortby_elements;
}
if (!$sortby_elements) {
    $sortby_elements = "TITLE";
}
$out['SORTBY'] = $sortby_elements;
// SEARCH RESULTS
$res = SQLSelect("SELECT * FROM elements WHERE {$qry} ORDER BY " . $sortby_elements);
if ($res[0]['ID']) {
    colorizeArray($res);
开发者ID:cdkisa,项目名称:majordomo,代码行数:31,代码来源:elements_search.inc.php

示例4: SQLUpdate

 if ($ok) {
  if ($rec['ID']) {
   SQLUpdate($table_name, $rec); // update
  } else {
   $new_rec=1;
   $rec['ID']=SQLInsert($table_name, $rec); // adding new record
  }
 //updating 'ICON' (image)
 global $icon;
 global $icon_name;
 global $delete_icon;
 if ($icon!="" && file_exists($icon) && (!$delete_icon)) {
   $filename=strtolower(basename($icon_name));
   $ext=strtolower(end(explode(".",basename($icon_name))));
   if (
       (filesize($icon)<=(0*1024) || 0==0) && (Is_Integer(strpos('gif jpg png', $ext)))
      ) {
         $filename=$rec["ID"]."_icon_".time().".".$ext;
         if ($rec["ICON"]!='') {
          @Unlink(ROOT.'./cms/calendar/'.$rec["ICON"]);
         }
         Copy($icon, ROOT.'./cms/calendar/'.$filename);
         $rec["ICON"]=$filename;
         SQLUpdate($table_name, $rec);
        }
 } elseif ($delete_icon) {
    @Unlink(ROOT.'./cms/calendar/'.$rec["ICON"]);
    $rec["ICON"]='';
    SQLUpdate($table_name, $rec);
 }
  $out['OK']=1;
开发者ID:novozhenets,项目名称:majordomo,代码行数:31,代码来源:calendar_categories_edit.inc.php

示例5: SQLSelect

global $save_qry;
if ($save_qry) {
    $qry = $session->data['patterns_qry'];
} else {
    $session->data['patterns_qry'] = $qry;
}
if (!$qry) {
    $qry = "1";
}
// FIELDS ORDER
global $sortby_patterns;
if (!$sortby_patterns) {
    $sortby_patterns = $session->data['patterns_sort'];
} else {
    if ($session->data['patterns_sort'] == $sortby_patterns) {
        if (Is_Integer(strpos($sortby_patterns, ' DESC'))) {
            $sortby_patterns = str_replace(' DESC', '', $sortby_patterns);
        } else {
            $sortby_patterns = $sortby_patterns . " DESC";
        }
    }
    $session->data['patterns_sort'] = $sortby_patterns;
}
$sortby_patterns = "PRIORITY DESC, TITLE";
// SEARCH RESULTS
$res = SQLSelect("SELECT * FROM patterns WHERE {$qry} ORDER BY " . $sortby_patterns);
if ($res[0]['ID']) {
    //colorizeArray($res);
    $total = count($res);
    for ($i = 0; $i < $total; $i++) {
        // some action for every record if required
开发者ID:cdkisa,项目名称:majordomo,代码行数:31,代码来源:patterns_search.inc.php

示例6: Crypt_Decode1

function Crypt_Decode1($String, $Key = HOST_ID)
{
    /****************************************************************************/
    $__args_types = array('string', 'string');
    #-----------------------------------------------------------------------------
    $__args__ = Func_Get_Args();
    eval(FUNCTION_INIT);
    /****************************************************************************/
    $String = Base64_Decode($String);
    #-----------------------------------------------------------------------------
    if (empty($String)) {
        return $String;
    }
    #-----------------------------------------------------------------------------
    if (Extension_Loaded('mcrypt')) {
        #---------------------------------------------------------------------------
        $Module = @MCrypt_Module_Open(MCRYPT_DES, '', MCRYPT_MODE_ECB, '');
        if (!Is_Resource($Module)) {
            return ERROR | @Trigger_Error('[Crypt_Decode]: не удалось открыть дескриптор');
        }
        #-------------------------------------------------------------------------
        $Iv = @MCrypt_Create_Iv(MCrypt_Enc_Get_Iv_Size($Module), MCRYPT_RAND);
        if (!$Iv) {
            return ERROR | @Trigger_Error('[Crypt_Decode]: не удалось создать IV');
        }
        #-------------------------------------------------------------------------
        $Key = SubStr($Key, 0, MCrypt_Enc_Get_Key_Size($Module));
        Debug(SPrintF("[Crypt_Decode1]: Decode Key = %s", $Key));
        #-------------------------------------------------------------------------
        $IsInit = @MCrypt_Generic_Init($Module, $Key, $Iv);
        if (!Is_Integer($IsInit)) {
            return ERROR | @Trigger_Error('[Crypt_Decode]: не удалось инициализовать модуль дешифрования');
        }
        #-------------------------------------------------------------------------------
    }
    #---------------------------------------------------------------------------
    $String = @MDecrypt_Generic($Module, $String);
    if (!Is_String($String)) {
        return ERROR | @Trigger_Error('[Crypt_Decode]: не удалось дешифровать данные');
    }
    #---------------------------------------------------------------------------
    MCrypt_Generic_DeInit($Module);
    #---------------------------------------------------------------------------
    $String = Trim($String);
    #---------------------------------------------------------------------------
    return $String;
    #-------------------------------------------------------------------------------
}
开发者ID:carriercomm,项目名称:jbs,代码行数:48,代码来源:1000011.php

示例7: SQLSelect

global $save_qry;
if ($save_qry) {
    $qry = $session->data['gpsdevices_qry'];
} else {
    $session->data['gpsdevices_qry'] = $qry;
}
if (!$qry) {
    $qry = "1";
}
// FIELDS ORDER
global $sortby_gpsdevices;
if (!$sortby_gpsdevices) {
    $sortby_gpsdevices = $session->data['gpsdevices_sort'];
} else {
    if ($session->data['gpsdevices_sort'] == $sortby_gpsdevices) {
        if (Is_Integer(strpos($sortby_gpsdevices, ' DESC'))) {
            $sortby_gpsdevices = str_replace(' DESC', '', $sortby_gpsdevices);
        } else {
            $sortby_gpsdevices = $sortby_gpsdevices . " DESC";
        }
    }
    $session->data['gpsdevices_sort'] = $sortby_gpsdevices;
}
if (!$sortby_gpsdevices) {
    $sortby_gpsdevices = "TITLE";
}
$out['SORTBY'] = $sortby_gpsdevices;
// SEARCH RESULTS
$res = SQLSelect("SELECT * FROM gpsdevices WHERE {$qry} ORDER BY " . $sortby_gpsdevices);
if ($res[0]['ID']) {
    colorizeArray($res);
开发者ID:cdkisa,项目名称:majordomo,代码行数:31,代码来源:gpsdevices_search.inc.php

示例8: SQLSelect

global $save_qry;
if ($save_qry) {
    $qry = $session->data['blockly_code_qry'];
} else {
    $session->data['blockly_code_qry'] = $qry;
}
if (!$qry) {
    $qry = "1";
}
// FIELDS ORDER
global $sortby_blockly_code;
if (!$sortby_blockly_code) {
    $sortby_blockly_code = $session->data['blockly_code_sort'];
} else {
    if ($session->data['blockly_code_sort'] == $sortby_blockly_code) {
        if (Is_Integer(strpos($sortby_blockly_code, ' DESC'))) {
            $sortby_blockly_code = str_replace(' DESC', '', $sortby_blockly_code);
        } else {
            $sortby_blockly_code = $sortby_blockly_code . " DESC";
        }
    }
    $session->data['blockly_code_sort'] = $sortby_blockly_code;
}
if (!$sortby_blockly_code) {
    $sortby_blockly_code = "ID DESC";
}
$out['SORTBY'] = $sortby_blockly_code;
// SEARCH RESULTS
$res = SQLSelect("SELECT * FROM blockly_code WHERE {$qry} ORDER BY " . $sortby_blockly_code);
if ($res[0]['ID']) {
    paging($res, 50, $out);
开发者ID:cdkisa,项目名称:majordomo,代码行数:31,代码来源:blockly_code_search.inc.php

示例9: SQLSelect

global $save_qry;
if ($save_qry) {
    $qry = $session->data['zwave_properties_qry'];
} else {
    $session->data['zwave_properties_qry'] = $qry;
}
if (!$qry) {
    $qry = "1";
}
// FIELDS ORDER
global $sortby_zwave_properties;
if (!$sortby_zwave_properties) {
    $sortby_zwave_properties = $session->data['zwave_properties_sort'];
} else {
    if ($session->data['zwave_properties_sort'] == $sortby_zwave_properties) {
        if (Is_Integer(strpos($sortby_zwave_properties, ' DESC'))) {
            $sortby_zwave_properties = str_replace(' DESC', '', $sortby_zwave_properties);
        } else {
            $sortby_zwave_properties = $sortby_zwave_properties . " DESC";
        }
    }
    $session->data['zwave_properties_sort'] = $sortby_zwave_properties;
}
if (!$sortby_zwave_properties) {
    $sortby_zwave_properties = "TITLE";
}
$out['SORTBY'] = $sortby_zwave_properties;
// SEARCH RESULTS
$res = SQLSelect("SELECT * FROM zwave_properties WHERE {$qry} ORDER BY " . $sortby_zwave_properties);
if ($res[0]['ID']) {
    colorizeArray($res);
开发者ID:vasvlad,项目名称:majordomo,代码行数:31,代码来源:zwave_properties_search.inc.php

示例10: SQLSelect

global $save_qry;
if ($save_qry) {
    $qry = $session->data['readit_urls_qry'];
} else {
    $session->data['readit_urls_qry'] = $qry;
}
if (!$qry) {
    $qry = "1";
}
// FIELDS ORDER
global $sortby_readit_urls;
if (!$sortby_readit_urls) {
    $sortby_readit_urls = $session->data['readit_urls_sort'];
} else {
    if ($session->data['readit_urls_sort'] == $sortby_readit_urls) {
        if (Is_Integer(strpos($sortby_readit_urls, ' DESC'))) {
            $sortby_readit_urls = str_replace(' DESC', '', $sortby_readit_urls);
        } else {
            $sortby_readit_urls = $sortby_readit_urls . " DESC";
        }
    }
    $session->data['readit_urls_sort'] = $sortby_readit_urls;
}
if (!$sortby_readit_urls) {
    $sortby_readit_urls = "ID DESC";
}
$out['SORTBY'] = $sortby_readit_urls;
// SEARCH RESULTS
$res = SQLSelect("SELECT * FROM readit_urls WHERE {$qry} ORDER BY " . $sortby_readit_urls);
if ($res[0]['ID']) {
    paging($res, 50, $out);
开发者ID:cdkisa,项目名称:majordomo,代码行数:31,代码来源:readit_urls_search.inc.php

示例11: DBSafe

<?php

global $session;
global $name;
if ($name != '') {
    $qry .= " AND TITLE LIKE '%" . DBSafe($name) . "%'";
    $out['TITLE'] = $name;
}
// FIELDS ORDER
global $sortby_event;
if (!$sortby_event) {
    $sortby_event = $session->data['telegram_sort_event'];
} else {
    if ($session->data['telegram_sort_event'] == $sortby_event) {
        if (Is_Integer(strpos($sortby_event, ' DESC'))) {
            $sortby_event = str_replace(' DESC', '', $sortby_event);
        } else {
            $sortby_event = $sortby_event . " DESC";
        }
    }
    $session->data['telegram_sort_event'] = $sortby_event;
}
if (!$sortby_event) {
    $sortby_event = "TITLE";
}
$out['SORTBY'] = $sortby_event;
// SEARCH RESULTS
$res = SQLSelect("SELECT * FROM tlg_event ORDER BY " . $sortby_event);
if ($res[0]['ID']) {
    paging($res, 20, $out);
    // search result paging
开发者ID:Anisan,项目名称:majordomo-telegram,代码行数:31,代码来源:tlg_events.inc.php

示例12: SQLSelect

global $save_qry;
if ($save_qry) {
    $qry = $session->data['scenes_qry'];
} else {
    $session->data['scenes_qry'] = $qry;
}
if (!$qry) {
    $qry = "1";
}
// FIELDS ORDER
global $sortby_scenes;
if (!$sortby_scenes) {
    $sortby_scenes = $session->data['scenes_sort'];
} else {
    if ($session->data['scenes_sort'] == $sortby_scenes) {
        if (Is_Integer(strpos($sortby_scenes, ' DESC'))) {
            $sortby_scenes = str_replace(' DESC', '', $sortby_scenes);
        } else {
            $sortby_scenes = $sortby_scenes . " DESC";
        }
    }
    $session->data['scenes_sort'] = $sortby_scenes;
}
if (!$sortby_scenes) {
    $sortby_scenes = "PRIORITY DESC, TITLE";
}
$out['SORTBY'] = $sortby_scenes;
// SEARCH RESULTS
$res = SQLSelect("SELECT * FROM scenes WHERE {$qry} ORDER BY " . $sortby_scenes);
if ($this->action != 'admin') {
    $total = count($res);
开发者ID:vasvlad,项目名称:majordomo,代码行数:31,代码来源:scenes_search.inc.php

示例13: SQLSelect

global $save_qry;
if ($save_qry) {
    $qry = $session->data['watchesmenu_qry'];
} else {
    $session->data['watchesmenu_qry'] = $qry;
}
if (!$qry) {
    $qry = "1";
}
// FIELDS ORDER
global $sortby_watchesmenu;
if (!$sortby_watchesmenu) {
    $sortby_watchesmenu = $session->data['watchesmenu_sort'];
} else {
    if ($session->data['watchesmenu_sort'] == $sortby_watchesmenu) {
        if (Is_Integer(strpos($sortby_watchesmenu, ' DESC'))) {
            $sortby_watchesmenu = str_replace(' DESC', '', $sortby_watchesmenu);
        } else {
            $sortby_watchesmenu = $sortby_watchesmenu . " DESC";
        }
    }
    $session->data['watchesmenu_sort'] = $sortby_watchesmenu;
}
if (!$sortby_watchesmenu) {
    $sortby_watchesmenu = "PRIORITY DESC, TITLE";
}
$out['SORTBY'] = $sortby_watchesmenu;
// SEARCH RESULTS
$res = SQLSelect("SELECT * FROM watchesmenu WHERE {$qry} ORDER BY " . $sortby_watchesmenu);
if ($res[0]['ID']) {
    colorizeArray($res);
开发者ID:sergejey,项目名称:majordomo-watchesmenu,代码行数:31,代码来源:watchesmenu_search.inc.php

示例14: SQLSelect

global $save_qry;
if ($save_qry) {
    $qry = $session->data['gpslocations_qry'];
} else {
    $session->data['gpslocations_qry'] = $qry;
}
if (!$qry) {
    $qry = "1";
}
// FIELDS ORDER
global $sortby_gpslocations;
if (!$sortby_gpslocations) {
    $sortby_gpslocations = $session->data['gpslocations_sort'];
} else {
    if ($session->data['gpslocations_sort'] == $sortby_gpslocations) {
        if (Is_Integer(strpos($sortby_gpslocations, ' DESC'))) {
            $sortby_gpslocations = str_replace(' DESC', '', $sortby_gpslocations);
        } else {
            $sortby_gpslocations = $sortby_gpslocations . " DESC";
        }
    }
    $session->data['gpslocations_sort'] = $sortby_gpslocations;
}
if (!$sortby_gpslocations) {
    $sortby_gpslocations = "TITLE";
}
$out['SORTBY'] = $sortby_gpslocations;
// SEARCH RESULTS
$res = SQLSelect("SELECT * FROM gpslocations WHERE {$qry} ORDER BY " . $sortby_gpslocations);
if ($res[0]['ID']) {
    colorizeArray($res);
开发者ID:cdkisa,项目名称:majordomo,代码行数:31,代码来源:gpslocations_search.inc.php

示例15: SQLSelect

global $save_qry;
if ($save_qry) {
    $qry = $session->data['gpslog_qry'];
} else {
    $session->data['gpslog_qry'] = $qry;
}
if (!$qry) {
    $qry = "1";
}
// FIELDS ORDER
global $sortby_gpslog;
if (!$sortby_gpslog) {
    $sortby_gpslog = $session->data['gpslog_sort'];
} else {
    if ($session->data['gpslog_sort'] == $sortby_gpslog) {
        if (Is_Integer(strpos($sortby_gpslog, ' DESC'))) {
            $sortby_gpslog = str_replace(' DESC', '', $sortby_gpslog);
        } else {
            $sortby_gpslog = $sortby_gpslog . " DESC";
        }
    }
    $session->data['gpslog_sort'] = $sortby_gpslog;
}
if (!$sortby_gpslog) {
    $sortby_gpslog = "gpslog.ID DESC";
}
$out['SORTBY'] = $sortby_gpslog;
// SEARCH RESULTS
$res = SQLSelect("SELECT gpslog.*, gpsdevices.TITLE as DEVICE_TITLE, gpslocations.TITLE as LOCATION_TITLE FROM gpslog LEFT JOIN gpsdevices ON gpsdevices.ID=gpslog.DEVICE_ID LEFT JOIN gpslocations ON gpslocations.ID=gpslog.LOCATION_ID WHERE {$qry} ORDER BY " . $sortby_gpslog);
if ($res[0]['ID']) {
    paging($res, 50, $out);
开发者ID:vasvlad,项目名称:majordomo,代码行数:31,代码来源:gpslog_search.inc.php


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