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


PHP isNum函数代码示例

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


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

示例1: chkLogin2

function chkLogin2()
{
    global $db;
    $m_id = getCookie('adminid');
    ckSql($m_id);
    $m_name = getCookie('adminname');
    ckSql($m_name);
    $m_check = getCookie('admincheck');
    ckSql($m_check);
    $index = 'index.php';
    if (strpos($_SERVER['PHP_SELF'], 'editor') > -1) {
        $index = "../" . $index;
    }
    if (!isN($m_name) && !isNum($m_id)) {
        $row = $db->getRow('SELECT * FROM {pre}manager WHERE m_name=\'' . mysql_real_escape_string($m_name) . '\' AND m_id= \'' . $m_id . '\' AND m_status=1');
        if ($row) {
            $loginValidate = md5($row['m_random'] . $row['m_name'] . $row['m_id']);
            if ($m_check != $loginValidate) {
                sCookie('admincheck', '');
                redirect($index . '?m=admin-login', 'top.');
            }
        } else {
            sCookie('admincheck', '');
            redirect($index . '?m=admin-login', 'top.');
        }
    } else {
        redirect($index . '?m=admin-login', 'top.');
    }
}
开发者ID:klarclm,项目名称:sgv,代码行数:29,代码来源:admin_conn.php

示例2: editall

function editall()
{
    global $db;
    $t_id = be("arr", "t_id");
    $ids = explode(",", $t_id);
    foreach ($ids as $id) {
        $t_name = be("post", "t_name" . $id);
        $t_enname = be("post", "t_enname" . $id);
        $t_sort = be("post", "t_sort" . $id);
        //		$t_template = be("post","t_template" .$id);
        //		$t_vodtemplate = be("post","t_vodtemplate" .$id);
        //		$t_playtemplate = be("post","t_playtemplate" .$id);
        //		$t_key = be("post","t_key" .$id);
        //		$t_des = be("post","t_des" .$id);
        if (isN($t_name)) {
            echo "名称不能为空";
            exit;
        }
        if (isN($t_enname)) {
            echo "别名不能为空";
            exit;
        }
        if (!isNum($t_sort)) {
            echo "排序号不能为空或不是数字";
            exit;
        }
        //		if (isN($t_template)) { $t_template = "vodlist.html";}
        //		if (isN($t_vodtemplate)) { $t_vodtemplate = "vod.html";}
        //		if (isN($t_playtemplate)) { $t_playtemplate = "vodplay.html";}
        $db->Update("{pre}vod_type", array("t_name", "t_enname", "t_sort"), array($t_name, $t_enname, $t_sort), "t_id=" . $id);
    }
    updateCacheFile();
    echo "修改完毕";
}
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:34,代码来源:admin_vod_type.php

示例3: cell

 function cell($i = null, $j = null)
 {
     if (isNum($i)) {
         return _(_($this->_('tr'))->eq($i));
     } else {
         return _(_($this->O)->_('tr'));
     }
     if (isNum($j) && isNum($i)) {
         return _($this->cell($i)->eq($j));
     }
 }
开发者ID:hoangsoft90,项目名称:hw-sudoku-wordpress,代码行数:11,代码来源:hphp.table.php

示例4: comboBox_range

function comboBox_range($from, $to, $assign = '', $opt = 0)
{
    if (isNum($from) && isNum($to) && $from <= $to) {
        if (!isStr($assign)) {
            $assign = '';
        }
        $list = createForm()->select->create(array());
        for ($i = $from; $i <= $to; $i++) {
            $list->add_option($i, $opt <= 0 ? $assign . $i : $i . $assign);
        }
        return $list;
    }
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:13,代码来源:hphp.plugin_Element.php

示例5: sendMessage

function sendMessage($user_id, $other_user_id, $msg_text)
{
    if (userExistsById($user_id) === true && userExistsById($other_user_id) === true) {
        $msg_text = trim($msg_text);
        if ($msg_text === "") {
            return false;
        }
        $msg_id = insertMsg($msg_text);
        if (isNum($msg_id)) {
            insertUserMessage($msg_id, $user_id, $other_user_id, "Sent");
            insertUserMessage($msg_id, $other_user_id, $user_id, "Inbox");
            return true;
        }
        return false;
    } else {
        return false;
    }
}
开发者ID:rw00,项目名称:tutorme,代码行数:18,代码来源:Messaging.php

示例6: editall

function editall()
{
    global $db;
    $t_id = be("arr", "t_id");
    $ids = explode(",", $t_id);
    foreach ($ids as $id) {
        $status = be("post", "status" . $id);
        $disp_order = be("post", "disp_order" . $id);
        if (isN($disp_order)) {
            $t_sort = $db->getOne("SELECT MAX(disp_order) FROM apk_master_items ") + 1;
        }
        if (!isNum($disp_order)) {
            echo "信息填写不完整!";
            exit;
        }
        $db->Update("apk_master_items", array("status", "disp_order"), array($status, $disp_order), "id=" . $id);
    }
    updateCacheFile();
    echo "修改完毕";
}
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:20,代码来源:admin_apk_items.php

示例7: c_cell

 function c_cell($d = null)
 {
     $o = array();
     $a = optimize_args(func_get_args());
     if (count($a) && ($c = isset($a[0]) ? $a[0] : false)) {
         if (isNum($c)) {
             unset($a[0]);
             for ($i = 0; $i < $c; $i++) {
                 $o[] = $this->c_cell($a);
             }
         } else {
             foreach ($a as $v) {
                 if (isDrw($v)) {
                     $o[] = $this->c_cell($v);
                 }
             }
         }
         return count($o) == 1 ? $o[0] : $o;
     } else {
         return cEle($this->child_type)->do_method(array('class' => 'frame_cell'), $a)->O;
     }
 }
开发者ID:hoangsoft90,项目名称:hw-sudoku-wordpress,代码行数:22,代码来源:hphp.frame.php

示例8: updateLetvVideoUrl

function updateLetvVideoUrl($pagenum, $endPage)
{
    global $db;
    $sql = "SELECT count(*)  FROM {pre}vod WHERE webUrls IS not NULL and webUrls != ''  and d_hide =0 and d_type in (1,2,3,131)  and d_status = 0 and d_playfrom like '%letv%'  ";
    $nums = $db->getOne($sql);
    $app_pagenum = 10;
    $pagecount = ceil($nums / $app_pagenum);
    if (!isNum($endPage)) {
        $endPage = $pagecount;
    } else {
        $endPage = intval($endPage);
    }
    //	 $pagecount=2;
    for ($i = $pagenum; $i <= $pagecount && $i <= $endPage; $i++) {
        writetofile("updateLetvVideoUrl.log", 'check item for vod type{=}' . $nums . '{=}Total{=}' . $pagecount . '{=}' . $i);
        $sql = "SELECT webUrls,d_downurl, d_playfrom,d_id FROM {pre}vod WHERE webUrls IS not NULL and webUrls != '' and d_hide =0 and d_type in (1,2,3,131)   and d_playfrom like '%letv%' and d_status = 0 order by d_play_num desc limit " . $app_pagenum * ($i - 1) . "," . $app_pagenum;
        //	    var_dump($sql);
        $rs = $db->query($sql);
        parseVodPad($rs);
        unset($rs);
        //sleep(60);
    }
}
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:23,代码来源:collectLetvVideoUrl.php

示例9: make

function make()
{
    global $template;
    $file = be("get", "file");
    $fname = be("get", "fname");
    $file = be("get", "file");
    $template->html = file_get_contents($file);
    $template->mark();
    $template->vodpagelist();
    $num = $template->page_count;
    if (isNum($template->par_maxpage)) {
        if ($num >= $template->par_maxpage) {
            $num = $template->par_maxpage;
            $template->page_count = intval($num);
        }
    }
    $template->pageshow();
    $template->ifEx();
    $template->run("other");
    $fname = replaceStr($fname, "label_", "");
    $fname = replaceStr($fname, "\$\$", "/");
    fwrite(fopen("../" . $fname, "wb"), $template->html);
    echo " 生成完毕 <a target='_blank' href='" . "../" . $fname . "'>&nbsp;&nbsp;<font color=red>浏览</font></a><br>";
}
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:24,代码来源:admin_templates.php

示例10: main

function main()
{
    global $db, $cache;
    $tv_id = be("all", "tv_id");
    $day = be("all", "day");
    if (!isNum($tv_id)) {
        $tv_id = 0;
    } else {
        $tv_id = intval($tv_id);
    }
    if (isN($day)) {
        $day = date('Y-m-d', time());
    }
    $where = " 1=1 ";
    $where .= " AND tv_id =" . $tv_id;
    $where .= " AND day ='" . $day . "'";
    $pagenum = be("all", "page");
    if (!isNum($pagenum)) {
        $pagenum = 1;
    } else {
        $pagenum = intval($pagenum);
    }
    if ($pagenum < 1) {
        $pagenum = 1;
    }
    $sql = "SELECT count(*) FROM {pre}tv_program_item as a " . " where " . $where;
    $nums = $db->getOne($sql);
    $pagecount = ceil($nums / app_pagenum);
    $sql1 = "SELECT * FROM {pre}tv_program_item  where  " . $where . " and play_time<='12:00'  order by play_time asc ";
    $sql2 = "SELECT * FROM {pre}tv_program_item  where  " . $where . " and play_time>'12:00'  order by play_time asc ";
    //	var_dump($sql);
    $rs1 = $db->query($sql1);
    $rs2 = $db->query($sql2);
    ?>
<script language="javascript">
function filter(){
	var tv_id=$("#tv_id").val();
	var day  =$("#date").val();
	if(day ==''){
		var url = "admin_program_items_day.php?tv_id="+tv_id+"&day="+day;
	}else {
		var url = "admin_program_items.php?tv_id="+tv_id+"&day="+day;
	}
	
	
	window.location.href=url;
}

function collecProgram(){
	var tv_id=$("#tv_id").val();
	var day  =$("#date").val();
	var url = "admin_program_items.php?action=collecProgram&tv_id="+tv_id+"&day="+day;
	$.get(url,"", function(obj) {
		alert(obj);
	});
	
}

$(document).ready(function(){
	
	$('#form1').form({
		onSubmit:function(){
			if(!$("#form1").valid()) {return false;}
		},
	    success:function(data){
	        $.messager.alert('系统提示', data, 'info',function(){
	        	location.href=location.href;
	        });
	    }
	});
	
	$("#btnDel").click(function(){
			if(confirm('确定要删除吗')){
				$("#form1").attr("action","admin_ajax.php?action=del&flag=batch&tab={pre}vod_topic_items");
				$("#form1").submit();
			}
			else{return false}
	});
	$("#btnEdit").click(function(){
		$("#form1").attr("action","?action=editall");
		$("#form1").submit();
	});
	$("#btnAdd").click(function(){
		$('#form2').form('clear');
		$("#flag").val("add");
		$('#win1').window('open');
		
	});
	$("#btnAdd_down").click(function(){
		$('#form2').form('clear');
		$("#flag").val("add");
		$('#win1').window('open');
		
	});

	$('#form2').form({
		onSubmit:function(){
			if(!$("#form2").valid()) {return false;}
		},
	    success:function(data){
//.........这里部分代码省略.........
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:101,代码来源:admin_program_items.php

示例11: main

function main()
{
    global $db, $template, $cache;
    $loginname = getCookie("adminname");
    $keyword = be("all", "keyword");
    $stype = be("all", "stype");
    $area = be("all", "area");
    $topic = be("all", "topic");
    $level = be("all", "level");
    $from = be("all", "from");
    $sserver = be("all", "sserver");
    $sstate = be("all", "sstate");
    $repeat = be("all", "repeat");
    $repeatlen = be("all", "repeatlen");
    $order = be("all", "order");
    $pagenum = be("all", "page");
    $sort = be("all", "sort");
    $spic = be("all", "spic");
    $hide = be("all", "hide");
    $d_status = be("all", "d_status");
    $douban_score = be("all", "douban_score");
    $ipadpic = be("all", "ipadpic");
    $d_douban_id = be("all", "d_douban_id");
    $can_search_device = be("all", "can_search_device");
    if (!isNum($level)) {
        $level = 0;
    } else {
        $level = intval($level);
    }
    if (!isNum($sstate)) {
        $sstate = 0;
    } else {
        $sstate = intval($sstate);
    }
    if (!isNum($stype)) {
        $stype = 0;
    } else {
        $stype = intval($stype);
    }
    if (!isNum($area)) {
        $area = 0;
    } else {
        $area = intval($area);
    }
    if (!isNum($topic)) {
        $topic = 0;
    } else {
        $topic = intval($topic);
    }
    if (!isNum($spic)) {
        $spic = 0;
    } else {
        $spic = intval($spic);
    }
    if (!isNum($ipadpic)) {
        $ipadpic = 0;
    } else {
        $ipadpic = intval($ipadpic);
    }
    if (!isNum($hide)) {
        $hide = -1;
    } else {
        $hide = intval($hide);
    }
    if (!isNum($douban_score)) {
        $douban_score = 0;
    } else {
        $douban_score = intval($douban_score);
    }
    if (!isNum($repeatlen)) {
        $repeatlen = 0;
    }
    if (!isNum($d_status)) {
        $d_status = -1;
    } else {
        $d_status = intval($d_status);
    }
    if (isNum($d_douban_id)) {
        $d_douban_id = intval($d_douban_id);
    }
    if (!isNum($pagenum)) {
        $pagenum = 1;
    } else {
        $pagenum = intval($pagenum);
    }
    if ($pagenum < 1) {
        $pagenum = 1;
    }
    $where = " d_type in (1,2,3,131) ";
    $keyword_col = be("all", "keyword_col");
    if (!isN($keyword)) {
        $keyword = trim($keyword);
        if (isN($keyword_col)) {
            $where .= " AND ( d_directed like '%" . $keyword . "%' or d_starring like '%" . $keyword . "%' or d_name like '%" . $keyword . "%' or d_enname like '%" . $keyword . "%'   ) ";
        } else {
            $where .= " AND " . $keyword_col . " like '%" . $keyword . "%' ";
        }
    }
    if ($stype > 0) {
        $typearr = getValueByArray($cache[0], "t_id", $stype);
//.........这里部分代码省略.........
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:101,代码来源:admin_online_subscribe.php

示例12: author

+--------------------------------------------------------+
| Filename: embed.php
| Author: Domi & fetloser 
| www.venue.nu		
| Embed player functions by Wain Glaister    
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../../maincore.php";
if (isset($url) && !isNum($url)) {
    redirect("index.php");
}
if (!isset($p)) {
    require_once THEMES . "templates/header.php";
} else {
    require_once THEME . "theme.php";
    echo "<link rel='stylesheet' href='" . THEME . "styles.css' type='text/css'>";
}
include INFUSIONS . "the_kroax/functions.php";
if ($kroaxsettings['kroax_set_keepalive'] == "1") {
    //add_to_head("<script type='text/javascript' src=".INFUSIONS."the_kroax/onlinestatus.js'></script>");
    echo "<script type='text/javascript' src='" . INFUSIONS . "the_kroax/onlinestatus.js'></script>";
    echo "<body onload=\"ajax(page,'onlinestatus','" . $url . "')\"></body>";
}
function RemoveExtension($strName)
开发者ID:simplyianm,项目名称:clububer,代码行数:31,代码来源:embed.php

示例13: prp_render_cats

    }
    prp_render_cats($catid, $review->id, $path, $cats);
    unset($path, $cats);
    if (!is_null($access_group)) {
        if ($prp->settings['hide_cats']) {
            fallback("error.php?type=access");
        }
        show_info('<img src="icons/lock.png" alt="' . $locale['prp_locked'] . '" /> ' . str_replace('%s', getgroupname($access_group), $locale['PRP215']));
    }
}
/***************************************************************************
 *  DOWNLOADS                                                              *
 ***************************************************************************/
if (is_null($access_group) && !$review->id && (!isset($catid) || $catid != 0)) {
    $rowstart = 0;
    if (isset($_GET['rowstart']) && isNum($_GET['rowstart'])) {
        $rowstart = $_GET['rowstart'];
    }
    $downs = array();
    if (isset($catid)) {
        $get = array('type' => 'cat', 'data' => $catid);
    } else {
        $get = array('type' => 'none');
    }
    $count = prpCore::get_reviews($get, $prp_sorting, $rowstart, $prp->settings['per_page'], false, $downs);
    $link = FUSION_SELF . "?" . (isset($catid) ? "catid={$catid}&amp;" : "");
    prp_render_downs($downs, $rowstart, $prp->settings['per_page'], $count, $link);
    unset($downs);
}
if (is_null($access_group) && $review->id) {
    include 'did.php';
开发者ID:simplyianm,项目名称:clububer,代码行数:31,代码来源:review.php

示例14: main

function main()
{
    global $db;
    $pagenum = be("get", "page");
    if (isN($pagenum) || !isNum($pagenum)) {
        $pagenum = 1;
    }
    if ($pagenum < 1) {
        $pagenum = 1;
    }
    $pagenum = intval($pagenum);
    $project = be("get", "{pre}cj_vod_projects");
    $sql = "select * from {pre}cj_change where c_sys=0 ";
    if ($project != "") {
        $sql = $sql . " and c_pid = " . $project;
    }
    $rscount = $db->query($sql);
    $nums = $db->num_rows($rscount);
    //总记录数
    $pagecount = ceil($nums / app_pagenum);
    //总页数
    $sql = $sql . " limit " . app_pagenum * ($pagenum - 1) . "," . app_pagenum;
    $rs = $db->query($sql);
    ?>
<script language="javascript">
$(document).ready(function(){
	$("#form2").validate({
		rules:{
			name:{
				required:true,
				maxlength:32
			},
			toid:{
				required:true
			},
			pid:{
				required:true
			}
		}
	});
	
	$("#btnDel").click(function(){
		if(confirm('确定要删除吗')){
			$("#form1").attr("action","collect_vod_change.php?action=del");
			$("#form1").submit();
		}
		else{return false}
	});
	$("#btnEdit").click(function(){
		if(confirm('确定要保存修改吗')){
			$("#form1").attr("action","collect_vod_change.php?action=save");
			$("#form1").submit();
		}
		else{return false}
	});
	$("#btnAdd").click(function(){
		$('#form2').form('clear');
		$('#win1').window('open'); 
	});
	$("#btnCancel").click(function(){
		location.href = location.href ;
	});	
});
</script>
<table width="96%" border="0" align="center" cellpadding="3" cellspacing="1">
	<tr>
	<td>
		菜单:<a href="collect_vod_manage.php?action=">采集规则列表</a> | <a href="collect_vod_manage.php?action=upexp">导入采集规则</a> | <a href="collect_vod_change.php">分类转换</a> | <a href="collect_vod_filters.php">信息过滤</a>  
	&nbsp; 按项目查看:<select onchange=javascript:window.location.href=this.options[this.selectedIndex].value>
	<option value="?action=">所有转换</option>
	<option value="?action=&{pre}cj_vod_projects=0" <?php 
    if ($project == "0") {
        echo "selected";
    }
    ?>
>全局转换</option>
	<?php 
    echo makeSelect("{pre}cj_vod_projects", "p_id", "p_name", "", "collect_vod_change.php", "&nbsp;|&nbsp;&nbsp;", $project);
    ?>
	</select>
	</td>
	</tr>
</table>

<form id="form1" name="form1" method="post">
<table class="tb">
<tr>
	<td width="10%" >ID</td>
	<td width="30%" >采集分类</td>
	<td width="30%" >系统分类</td>
	<td width="30%" >所属项目</td>
</tr>
	<?php 
    if (!$rs) {
        ?>
	<tr><td align="center" colspan="5">没有任何记录!</td></tr>
    <?php 
    } else {
        $i = 0;
        while ($row = $db->fetch_array($rs)) {
//.........这里部分代码省略.........
开发者ID:andyongithub,项目名称:joyplus-cms,代码行数:101,代码来源:collect_vod_change.php

示例15: Jones

| Author: Nick Jones (Digitanium)
| Co Author: WEC
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";
if (!checkrights("P") || !defined("iAUTH") || !isset($_GET['aid']) || $_GET['aid'] != iAUTH) {
    redirect("../index.php");
}
if (!isset($_GET['panel_side']) || !isNum($_GET['panel_side']) || $_GET['panel_side'] > 4) {
    $panel_side = 1;
} else {
    $panel_side = $_GET['panel_side'];
}
require_once THEMES . "templates/admin_header.php";
include LOCALE . LOCALESET . "admin/panels.php";
$temp = opendir(INFUSIONS);
while ($folder = readdir($temp)) {
    if (!in_array($folder, array(".", "..")) && strstr($folder, "_panel")) {
        if (is_dir(INFUSIONS . $folder)) {
            $panel_list[] = $folder;
        }
    }
}
closedir($temp);
开发者ID:necrophcodr,项目名称:Muks,代码行数:31,代码来源:panel_editor.php


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