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


PHP NNull函数代码示例

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


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

示例1: error_reporting

<?php

include "../include/functions.php";
include "../include/db.php";
include "../include/params.php";
include "../include/dictionary2.php";
?>

<?php 
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
opendb();
$id = (int) NNull($_GET['id'], 0);
$type = (int) dlookup("select type from pointsofinterest where id=" . $id);
if ($type == 1) {
    $lat = dlookup("select st_y(st_transform(geom,4326)) lat from pointsofinterest where id=" . $id);
    $lon = dlookup("select st_x(st_transform(geom,4326)) lon from pointsofinterest where id=" . $id);
} else {
    $lon = dlookup("select st_y(st_centroid(geom)) lon from pointsofinterest where id=" . $id);
    $lat = dlookup("select st_x(st_centroid(geom)) lat from pointsofinterest where id=" . $id);
}
echo $lon . '@' . $lat;
closedb();
?>

开发者ID:hew86i,项目名称:panorama,代码行数:23,代码来源:GetLonLat.php

示例2: opendb

<?php

include "../include/functions.php";
include "../include/db.php";
include "../include/params.php";
include "../include/dictionary2.php";
?>

<?php 
opendb();
$imeMaterijal = str_replace("'", "''", NNull($_GET['materijalIme'], ''));
$posledno = dlookup("select Max(id)+1 from route_material");
$proverka = dlookup("SELECT count(*) FROM route_material WHERE name = '" . $imeMaterijal . "' and clientid = " . Session("client_id"));
if ($proverka > 0) {
    echo 1;
} else {
    $vnesi = query("INSERT into route_material(id,name,clientid) values ('" . $posledno . "','" . $imeMaterijal . "'," . Session("client_id") . "); ");
    echo 0;
}
closedb();
开发者ID:hew86i,项目名称:panorama,代码行数:20,代码来源:__InsertMaterialName.php

示例3: dic

    <div id="div-add" style="display:none" title=""></div>
    <div id="dialog-message" title="<?php 
echo dic("Reports.Message");
?>
" style="display:none">
         <p>
	        <span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>
	        <div id="div-msgbox" style="font-size:14px"></div>
        </p>
    </div>
  <?php 
$id = getQUERY('id');
opendb();
$code = NNull(DlookUP("select Code from organisation where id=" . $id), "");
$name = NNull(DlookUP("select Name from organisation where id=" . $id), "");
$desc = NNull(DlookUP("select Description from organisation where id=" . $id), "");
?>

              
             <table style="padding-left:20px;" class="text2_" width=50%>
                  <tr style="height:10px"></tr>
                  <tr >
                      <td width=20% style="font-weight:bold"><?php 
dic("Fm.Code");
?>
:</td>
                      <td width=30% style="padding-left:10px"><input id="code" value="<?php 
echo $code;
?>
" type="text" size=22 style="color: #2F5185; font-family: Arial,Helvetica,sans-serif; font-size: 11px; height:25px; border: 1px solid #CCCCCC; border-radius: 5px 5px 5px 5px; width:161px; padding-left:5px"/></td>
                  </tr>
开发者ID:hew86i,项目名称:panorama,代码行数:31,代码来源:ModifyOrgUnit.php

示例4: str_replace

     }
 }
 //   5-TA KOMBINACIJA AKO E ODBRAN ALARM BEZ DOPOLNITELNI POLINJA  //
 if ($tipNaAlarm != 7 && $tipNaAlarm != 8 && $tipNaAlarm != 9 && $tipNaAlarm != 10 && $tipNaAlarm != 17 && $tipNaAlarm != 18 && $tipNaAlarm != 19 && $tipNaAlarm != 20) {
     if ($vnesiAlertZa == 1) {
         $ednoVozilo = str_replace("'", "''", NNull($_GET['voziloOdbrano2'], ''));
         $posledno = dlookup("select Max(id)+1 from alarms");
         $brisi = query("delete from alarms where id = " . $id . " and clientid = " . $cid . "");
         $ret = query("insert into alarms values('" . $posledno . "','" . $tipNaAlarm . "','','" . $dostapno . "','" . $emails . "','" . $sms . "','" . $zvukot . "',1," . Session("client_id") . " , '" . $ednoVozilo . "', null, null, null, null, null)");
         //RunSQL("update alarms set alarmtypeid = '" . $tipNaAlarm . "', available ='" . $dostapno . "', emails ='" . $emails . "', sms = '" .$sms. "',soundid = '" .$zvukot. "',vehicleid = ".$ednoVozilo.",speed = null,poiid = null,timeofpoi = null,uniqid = null  where id = '" . $id . "' and clientid =" .$cid);
     }
     ///////////////
     if ($vnesiAlertZa == 2) {
         $today = getdate();
         $q = '' . $today[0];
         $orgEdinica = str_replace("'", "''", NNull($_GET['orgEdinica2'], ''));
         $najdiVozila = query("select * from vehicles where organisationid = " . $orgEdinica . " and clientid = " . $cid);
         $brisi = query("delete from alarms where id = " . $id . " and clientid = " . $cid . "");
         while ($row = pg_fetch_array($najdiVozila)) {
             $data[] = $row;
         }
         foreach ($data as $row) {
             $posledno = dlookup("select Max(id)+1 from alarms");
             $ret = query("insert into alarms values('" . $posledno . "','" . $tipNaAlarm . "','" . $orgEdinica . "','" . $dostapno . "','" . $emails . "','" . $sms . "','" . $zvukot . "',1," . Session("client_id") . " , '" . $row["id"] . "',NULL,NULL,NULL,'" . $q . "', 2)");
             //RunSQL("update alarms set alarmtypeid = '" . $tipNaAlarm . "',settings = ".$orgEdinica." , available ='" . $dostapno . "', emails ='" . $emails . "', sms = '" .$sms. "',soundid = '" .$zvukot. "',vehicleid = ".$row["id"].",speed = null,poiid = null,timeofpoi = null,uniqid = ".$q.",typeofgroup = 2  where id = '" . $id . "' and clientid =" .$cid);
         }
     }
     if ($vnesiAlertZa == 3) {
         $today = getdate();
         $q = '' . $today[0];
         $najdiVozila = query("select * from vehicles where clientid = " . $cid);
开发者ID:hew86i,项目名称:panorama,代码行数:31,代码来源:__UpAlert2.php

示例5: opendb

<?php

include "../include/functions.php";
include "../include/db.php";
include "../include/params.php";
include "../include/dictionary2.php";
?>

<?php 
opendb();
$imeKultura = str_replace("'", "''", NNull($_GET['kulturaIme'], ''));
$posledno = dlookup("select Max(id)+1 from route_culture");
$proverka = dlookup("SELECT count(*) FROM route_culture WHERE name = '" . $imeKultura . "' and clientid = " . Session("client_id"));
if ($proverka > 0) {
    echo 1;
} else {
    $vnesi = query("INSERT into route_culture(id,name,clientid) values ('" . $posledno . "','" . $imeKultura . "'," . Session("client_id") . "); ");
    echo 0;
}
closedb();
开发者ID:hew86i,项目名称:panorama,代码行数:20,代码来源:__InsertCultureName.php

示例6: GetCurrentPosition

function GetCurrentPosition($RoleID, $ClientID, $UserID)
{
    //if($RoleID == "2")
    $sqlV = "";
    if ($RoleID == "2") {
        $sqlV = "select id from vehicles where clientid=" . $ClientID;
    } else {
        $sqlV = "select vehicleid from uservehicles where userid=" . $UserID . "";
    }
    $ClientTypeID = dlookup("select clienttypeid from clients where id=" . $ClientID);
    $sqlStyles = "";
    $sqlStyles .= "SELECT c1.name engineon, c2.name engineoff, c3.name engineoffpassengeron, c4.name satelliteoff, c5.name taximeteron, c6.name taximeteroffpassengeron, c7.name passiveon, c8.name activeoff ";
    $sqlStyles .= "from users us ";
    $sqlStyles .= "left outer join statuscolors c1 on c1.id=us.engineon ";
    $sqlStyles .= "left outer join statuscolors c2 on c2.id=us.engineoff ";
    $sqlStyles .= "left outer join statuscolors c3 on c3.id=us.engineoffpassengeron ";
    $sqlStyles .= "left outer join statuscolors c4 on c4.id=us.satelliteoff ";
    $sqlStyles .= "left outer join statuscolors c5 on c5.id=us.taximeteron ";
    $sqlStyles .= "left outer join statuscolors c6 on c6.id=us.taximeteroffpassengeron ";
    $sqlStyles .= "left outer join statuscolors c7 on c7.id=us.passiveon ";
    $sqlStyles .= "left outer join statuscolors c8 on c8.id=us.activeoff ";
    $sqlStyles .= "where us.id=" . $UserID;
    $dsStyles = query($sqlStyles);
    //$dsStyles = query("SELECT [c1].[name] [EngineON] from [UserSettings] [us] left outer join [Colors] [c1] on [c1].[id] = [us].[EngineON] where [us].[id]=506");
    //echo "select * from (SELECT c1.name EngineON from UserSettings us left outer join Colors c1 on c1.id=us.EngineON where us.UserId=506) t";
    //echo  odbc_field_name($dsStyles, 1) ;
    //exit;
    $sql = "";
    //$sql .= "select  v.numberofvehicle, v.registration, geonet.dbo.fn_seats_goran(seats) sedista, cp.* ";
    $sql .= "select cast(v.code as integer), v.registration, '1' sedista, cp.* ";
    $sql .= "from currentposition cp ";
    $sql .= "left outer join vehicles v on v.id=cp.vehicleid ";
    $sql .= "where vehicleid in (" . $sqlV . ") order by cast(v.code as integer) asc";
    $ds = query($sql);
    $str = "";
    if ($ClientTypeID == 2) {
        //ako e taksi kompanija
        while ($row = pg_fetch_array($ds)) {
            $lon = $row["longitude"];
            $lat = $row["latitude"];
            //if($row["LongOrientation"] == "W") $lon = "-" . $lon;
            //if($row["LatOrientation"] == "S") $lat = "-" . $lat;
            $stil = "";
            $row["sedista"] = NNull($row["sedista"], 0);
            /*if($row["Ignition"]."" == "0" && $row["sedista"]."" == "0")*/
            $stil = pg_fetch_result($dsStyles, 0, "EngineOFF");
            //if($row["Ignition"]."" == "0" && $row["sedista"]."" <> "0") $stil = pg_fetch_result($dsStyles, 0, "EngineOFFPassengerON");
            //if($row["Ignition"]."" == "1" && $row["sedista"]."" <> "0" &&  $row["Taximeter"]."" == "0") $stil = pg_fetch_result($dsStyles, 0, "TaximeterOFFPassengerON");
            //if($row["Ignition"]."" == "1" && $row["Taximeter"]."" == "1") $stil = pg_fetch_result($dsStyles, 0, "TaximeterON");
            //if($row["Ignition"]."" == "1" && $row["sedista"]."" == "0" and $row["Taximeter"]."" == "0") $stil = pg_fetch_result($dsStyles, 0, "EngineON");
            //if($row["passive"]."" == "1") $stil = pg_fetch_result($dsStyles, 0, "PassiveON");
            if ($row["status"] . "" == "0") {
                $stil = pg_fetch_result($dsStyles, 0, "SatelliteOFF");
            }
            $str .= "#" . $row["code"] . "|" . $lon . "|" . $lat . "|" . "Gray" . "|" . $row["registration"];
        }
    } else {
        // Ostanati
        while ($row = pg_fetch_array($ds)) {
            $lon = $row["longitude"];
            $lat = $row["latitude"];
            //if($row["LongOrientation"] == "W") $lon = "-" . $lon;
            //if($row["LatOrientation"] == "S") $lat = "-" . $lat;
            $stil = "";
            /*if($row["Ignition"]."" == "0") */
            $stil = pg_fetch_result($dsStyles, 0, "EngineON");
            //if($row["Ignition"]."" == "1") $stil = pg_fetch_result($dsStyles, 0, "EngineOFF");
            //if($row["status"] == "1") $stil = pg_fetch_result($dsStyles, 0, "SatelliteOFF");
            $str .= "#" . $row["code"] . "|" . $lon . "|" . $lat . "|" . "Gray" . "|" . $row["registration"];
        }
    }
    return $str;
}
开发者ID:hew86i,项目名称:panorama,代码行数:73,代码来源:params.php

示例7: opendb

<?php

include "../include/functions.php";
include "../include/db.php";
include "../include/params.php";
include "../include/dictionary2.php";
?>

<?php 
opendb();
$vehicleid = str_replace("'", "''", NNull($_GET['id'], ''));
$km = str_replace("'", "''", NNull($_GET['odometarVrednost'], ''));
/*$informacii = query("select * from currkm WHERE vehicleid = ". $vehicleid);
	$datumVnesenVeke = pg_fetch_result($informacii, 0, "datetime");
	$datumVnesenRacno = DateTimeFormat($datum, "Y-m-d 23:59:59");
	$datumVnesenRacnoSPOREDBA = DateTimeFormat($datum, "Y-m-d");
	
	$denesSporedba = strstr(now("Y-m-d H:i:s"), ' ', true);*/
$DENES = now("Y-m-d H:i:s");
$updateCurrKm = query("update currkm set km=" . $km . ", datetime = '" . $DENES . "' where vehicleid=" . $vehicleid);
$updateOdometer = query("update odometer set datetime = '" . $DENES . "', km=cast((select calculatecurrkm('" . $vehicleid . "', cast(now() as timestamp))) as numeric(19,6)) where vehicleid=" . $vehicleid);
closedb();
开发者ID:hew86i,项目名称:panorama,代码行数:22,代码来源:UpdateOdometar2.php

示例8: session_start

<?php

include "../include/functions.php";
include "../include/db.php";
?>

<?php 
include "../include/params.php";
include "../include/dictionary2.php";
session_start();
$un = str_replace("'", "''", NNull($_GET['un'], ''));
$proverka = query("SELECT * FROM users WHERE username = '" . $un . "'");
closedb();
开发者ID:hew86i,项目名称:panorama,代码行数:13,代码来源:CheckUser.php

示例9: session_start

<?php

include "../include/db.php";
include "../include/functions.php";
include "../include/params.php";
include "../include/dictionary2.php";
session_start();
header("Content-type: text/html; charset=utf-8");
$pocetok = DateTimeFormat(getQUERY("pocetok"), 'Y-m-d');
$kraj = DateTimeFormat(getQUERY("kraj"), 'Y-m-d');
$kopce = str_replace("'", "''", NNull($_GET['input'], ''));
$cid = Session("client_id");
opendb();
$zaId = dlookup("select Max(id)+1 from drivers");
$proverka = query("select * from vehicleslicense");
$LicenseCheck = dlookup("SELECT count(*) FROM vehicleslicense WHERE vehicleid = '" . $kopce . "' and userid = " . $zaId . "");
if ($LicenseCheck > 0) {
    echo 1;
} else {
    if (pg_num_rows($proverka) == 0) {
        $posledno = 1;
        RunSQL("INSERT INTO vehicleslicense(id, vehicleid, clientid, begining, ending, userid) VALUES(" . $posledno . ", " . $kopce . "," . $cid . ",\n  \t\t'" . DateTimeFormat($pocetok, "Y-m-d") . "',\n  \t\t'" . DateTimeFormat($kraj, "Y-m-d") . "' , " . $zaId . ")");
    } else {
        $posledno = dlookup("select Max(id)+1 from vehicleslicense");
        RunSQL("INSERT INTO vehicleslicense(id, vehicleid, clientid, begining, ending, userid) VALUES(" . $posledno . ", " . $kopce . "," . $cid . ",\n  \t\t'" . DateTimeFormat($pocetok, "Y-m-d") . "',\n  \t\t'" . DateTimeFormat($kraj, "Y-m-d") . "' , " . $zaId . ")");
    }
}
closedb();
开发者ID:hew86i,项目名称:panorama,代码行数:28,代码来源:AddUserVehicleLic.php

示例10: session_start

<?php

include "../include/functions.php";
include "../include/db.php";
include "../include/params.php";
include "../include/dictionary2.php";
session_start();
opendb();
$TIMEFROM = str_replace("'", "''", NNull($_GET['WorkTimeFrom'], ''));
$TIMEFROM1 = str_replace("'", "''", NNull($_GET['WorkTimeFrom1'], ''));
$TIMETO = str_replace("'", "''", NNull($_GET['WorkTimeTo'], ''));
$TIMETO1 = str_replace("'", "''", NNull($_GET['WorkTimeTo1'], ''));
$TIMESHIFT = str_replace("'", "''", NNull($_GET['WorkTimeShift'], ''));
$TIMETYPE = str_replace("'", "''", NNull($_GET['WorkTimeType'], ''));
$posledno = dlookup("select Max(id)+1 from worktime");
if ($TIMETYPE == 9) {
    $workCheck1 = dlookup("SELECT count(*) FROM worktime WHERE daytype = 6 and shift = '" . $TIMESHIFT . "' and clientid = " . Session("client_id"));
    $workCheck2 = dlookup("SELECT count(*) FROM worktime WHERE daytype = 7 and shift = '" . $TIMESHIFT . "' and clientid = " . Session("client_id"));
    if ($workCheck1 || $workCheck2 > 0) {
        echo 1;
        exit;
    } else {
        $vnesi11 = query("INSERT into worktime(clientid,shift,daytype,timefrom,timeto) values (" . Session("client_id") . ",'" . $TIMESHIFT . "',6,'" . $TIMEFROM . "" . $TIMEFROM1 . "' ,'" . $TIMETO . "" . $TIMETO1 . "'); ");
        $vnesi22 = query("INSERT into worktime(clientid,shift,daytype,timefrom,timeto) values (" . Session("client_id") . ",'" . $TIMESHIFT . "',7,'" . $TIMEFROM . "" . $TIMEFROM1 . "' ,'" . $TIMETO . "" . $TIMETO1 . "'); ");
        exit;
    }
}
if ($TIMETYPE == 10) {
    $workCheck3 = dlookup("SELECT count(*) FROM worktime WHERE daytype = 1 and shift = '" . $TIMESHIFT . "' and clientid = " . Session("client_id"));
    $workCheck4 = dlookup("SELECT count(*) FROM worktime WHERE daytype = 2 and shift = '" . $TIMESHIFT . "' and clientid = " . Session("client_id"));
    $workCheck5 = dlookup("SELECT count(*) FROM worktime WHERE daytype = 3 and shift = '" . $TIMESHIFT . "' and clientid = " . Session("client_id"));
开发者ID:hew86i,项目名称:panorama,代码行数:31,代码来源:SaveWorkTime.php

示例11: session_start

<?php 
session_start();
header("Content-type: text/html; charset=utf-8");
$ua = getBrowser();
$yourbrowser = (bool) strpos($ua['userAgent'], "iPad");
$yourbrowser1 = (bool) strpos($ua['userAgent'], "Macintosh");
opendb();
$Allow = getPriv("privilegesuser", session("user_id"));
if ($Allow == False) {
    echo header('Location: ../permission/?l=' . $cLang);
}
if (is_numeric(nnull(session("user_id"))) == false) {
    echo header("Location: ../sessionexpired/?l=" . $cLang);
}
$userID = str_replace("'", "''", NNull($_GET['uid'], ''));
$dsUsers = query("select id, fullname, roleid from users where id=" . $userID);
$ds = query("select allowedrouting, allowedfm from clients where id=" . session("client_id"));
$allowedR = pg_fetch_result($ds, 0, "allowedrouting");
$allowedF = pg_fetch_result($ds, 0, "allowedfm");
$reports = "checked='checked'";
$settings = "checked='checked'";
$routes = "checked='checked'";
$insertpoi = "checked='checked'";
$viewpoi = "checked='checked'";
$insertzone = "checked='checked'";
$viewzone = "checked='checked'";
$livetracking = "checked='checked'";
$dashboard = "checked='checked'";
$fleetreport = "checked='checked'";
$overview = "checked='checked'";
开发者ID:hew86i,项目名称:panorama,代码行数:30,代码来源:Privileges.php

示例12: session_start

<?php 
include "../include/functions.php";
include "../include/db.php";
?>

<?php 
include "../include/params.php";
include "../include/dictionary2.php";
session_start();
header("Expires: Mon, 20 Jul 2000 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", FALSE);
header("Pragma: no-cache");
set_time_limit(0);
$name = str_replace("'", "''", NNull($_GET['name'], ''));
print SearchLocation($name);
开发者ID:hew86i,项目名称:panorama,代码行数:17,代码来源:searchGeocode.php

示例13: session_start

<?php 
include "../include/functions.php";
include "../include/db.php";
?>

<?php 
include "../include/params.php";
include "../include/dictionary2.php";
session_start();
header("Expires: Mon, 20 Jul 2000 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", FALSE);
header("Pragma: no-cache");
set_time_limit(0);
$_lon1 = str_replace("'", "''", NNull($_GET['lon1'], ''));
$_lat1 = str_replace("'", "''", NNull($_GET['lat1'], ''));
$_lon2 = str_replace("'", "''", NNull($_GET['lon2'], ''));
$_lat2 = str_replace("'", "''", NNull($_GET['lat2'], ''));
/*$_lon1 = "21.424884";
  $_lat1 = "41.995976";
  $_lon2 = "21.42207";
  $_lat2 = "42.002685";*/
$lonlat = getLineCoords($_lon1, $_lat1, $_lon2, $_lat2);
print $lonlat;
//Response.Write("&nbsp;")
开发者ID:hew86i,项目名称:panorama,代码行数:26,代码来源:getLinePoints.php

示例14: opendb

<?php

include "../include/functions.php";
include "../include/db.php";
?>

<?php 
include "../include/params.php";
include "../include/dictionary2.php";
?>

<?php 
opendb();
$id = str_replace("'", "''", NNull($_GET['id1'], ''));
$name = str_replace("'", "''", NNull($_GET['GroupName'], ''));
$color = str_replace("'", "''", NNull($_GET['ColorName'], ''));
$image = str_replace("'", "''", NNull($_GET['image'], '0'));
echo "update pointsofinterestgroups set fillcolor = '" . $color . "', name ='" . $name . "', strokecolor = '#000000', image = " . (int) $image . " where id = '" . $id . "' and clientid =" . Session("client_id");
RunSQL("update pointsofinterestgroups set fillcolor = '" . $color . "', name ='" . $name . "', strokecolor = '#000000', image = " . (int) $image . " where id = '" . $id . "' and clientid =" . Session("client_id"));
closedb();
开发者ID:hew86i,项目名称:panorama,代码行数:20,代码来源:UpGroup.php

示例15: header

<?php

include "../include/functions.php";
include "../include/db.php";
?>

<?php 
include "../include/params.php";
include "../include/dictionary2.php";
?>

<?php 
header("Expires: Mon, 20 Jul 2000 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", FALSE);
header("Pragma: no-cache");
set_time_limit(0);
opendb();
$_pass = str_replace("'", "''", NNull($_GET['pass'], ''));
$ds = query("select password from users where id=" . session("user_id"));
$_passServer = pg_fetch_result($ds, 0, "password");
if ($_pass == $_passServer) {
    echo 1;
} else {
    echo 0;
}
closedb();
开发者ID:hew86i,项目名称:panorama,代码行数:28,代码来源:checkPassword2.php


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