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


PHP nvl函数代码示例

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


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

示例1: makeTask

function makeTask(&$frm)
{
    global $session;
    /* frist feld formatieren */
    $frist = "0000-00-00";
    if (isset($frm['frist']) && $frm['frist'] != "JJJJ-MM-TT") {
        $frist = $frm['frist'];
    }
    // Überprüfung ob Task mit Language schon vorhanden
    /////////////
    // neuen Text anlegen
    $ntextid = sql_addNewText(sqlv($frm['title']), sqlv(nvl($frm['abstract'])), 0, $frm['lang'], nvl($frm['cat'], 0), nvl($frm['filetyp'], 0), $session['userid'], $frm['textID']);
    if (!isset($ntextid) or $ntextid == 0) {
        $session['notice'] = "error making Task. Cannot generate new Text! Please contact the administrator via contact-link<br>Errorcode: tid={$frm['textID']}";
        return 0;
    }
    // neuen Task anlegen
    $taskID = sql_addNewTask($frm['textID'], $ntextid, $session['userid'], $frist);
    return 1;
}
开发者ID:BackupTheBerlios,项目名称:otmp,代码行数:20,代码来源:task.php

示例2: numProductos

 public function numProductos()
 {
     $num = 0;
     for ($p = 0; $p < $this->nf; $p++) {
         if (nvl($this->carro['estado'][$p])) {
             $num++;
         }
     }
     return $num;
 }
开发者ID:GioKungFu,项目名称:aprovechando,代码行数:10,代码来源:carrito.php

示例3: democonsent

 static function democonsent($params)
 {
     $server = $params['cortodata']['server'];
     if ($params['cortofirstcall']) {
         $response = $params['cortodata']['response'];
         $attributes = attributes2array($response['saml:Assertion']['saml:AttributeStatement'][0]['saml:Attribute']);
         print $server->renderTemplate('consent', array('action' => $params['cortolocation'], 'attributes' => $attributes, 'cortopassthru' => $params['cortopassthru'], 'cortoentityid' => $params['cortoentityid'], 'cortoservice' => $params['cortoservice']));
         exit;
     }
     if (nvl($_POST, 'consent') !== 'yes') {
         print $server->renderTemplate('noconsent');
         exit;
     }
 }
开发者ID:rchavik,项目名称:atrocious-saml-dragon,代码行数:14,代码来源:DemoFilter.php

示例4: getAttributes

 /**
  * Returns attributes for route's callback
  * @param Request $request
  * @param string[]|callable $controller
  * @return array
  */
 public function getAttributes($request, $controller)
 {
     if (is_array($controller)) {
         //if controller's class and function names
         $reflection = new \ReflectionMethod($controller[0], $controller[1]);
     } else {
         //if callable
         $reflection = new \ReflectionFunction($controller);
     }
     // Get function's params
     $params = $reflection->getParameters();
     $attributes = [];
     // Filter required attributes
     foreach ($params as $param) {
         $attributes[] = nvl($request->attributes, $param->getName(), null);
     }
     return $attributes;
 }
开发者ID:pavgra,项目名称:2nova-test,代码行数:24,代码来源:ControllerResolver.php

示例5: demoapp

function demoapp()
{
    $sharedkey = 'abrakadabra';
    $corto = join("/", array_slice(explode("/", 'http' . (nvl($_SERVER, 'HTTPS') ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']), 0, -1));
    $self = $corto . '/index.php';
    $corto = $corto . '/corto.php';
    if (isset($_POST['doslo'])) {
        $request = array('__t' => 'samlp:LogoutRequest', '_ID' => ID(), '_Version' => '2.0', '_IssueInstant' => gmdate('Y-m-d\\TH:i:s\\Z', time()), '_Destination' => "{$corto}/sp/Mads/SLO", 'saml:Issuer' => array('__v' => $self), 'saml:NameID' => json_decode(stripcslashes($_POST['subject']), 1), '_NotOnOrAfter' => timeStamp(10));
        $location = $request['_Destination'];
        $location .= "?SAMLRequest=" . urlencode(base64_encode(gzdeflate(json_encode($request))));
        print render('redirect', array('location' => $location, 'message' => $request));
        exit;
    }
    if (isset($_POST['doit'])) {
        $idp = empty($_POST['idp']) ? NULL : $_POST['idp'];
        if (!$idp) {
            $idp = "sp";
        }
        $request = array('_ID' => ID(), '_Version' => '2.0', '_IssueInstant' => gmdate('Y-m-d\\TH:i:s\\Z', time()), '_Destination' => "{$corto}/{$idp}/Mads", '_ForceAuthn' => !empty($_REQUEST['ForceAuthn']) ? 'true' : 'false', '_IsPassive' => !empty($_REQUEST['IsPassive']) ? 'true' : 'false', 'AssertionConsumerServiceIndex' => 0, '_AttributeConsumingServiceIndex' => 5, '_ProtocolBinding' => 'JSON-Redirect', 'saml:Issuer' => array('__v' => $self));
        if (!empty($_REQUEST['IDPList'])) {
            foreach ((array) $_REQUEST['IDPList'] as $idp) {
                $idpList[] = array('_ProviderID' => $idp);
                $request['samlp:Scoping']['samlp:IDPList']['samlp:IDPEntry'] = $idpList;
            }
        }
        $relayState = 'Dummy RelayState ...';
        #$request['samlp:Scoping']['_ProxyCount'] = 2;
        $location = $request['_Destination'];
        $location .= "?SAMLRequest=" . urlencode(base64_encode(gzdeflate(json_encode($request)))) . ($relayState ? '&RelayState=' . urlencode($relayState) : '');
        print render('redirect', array('location' => $location, 'message' => $request));
        exit;
    }
    $relayState = $rs = $message = null;
    $response = nvl($_GET, 'SAMLResponse');
    $SAMLResponse = json_decode(gzinflate(base64_decode($response)), 1);
    if (isset($_POST['RelayState']) && ($rs = $_POST['RelayState'])) {
        $rs = '&RelayState=' . $rs;
    }
    print render('demo', array('action' => $self, 'SAMLResponse' => $SAMLResponse, 'message' => "RelayState: " . nvl($_GET, 'RelayState'), 'self' => $self));
}
开发者ID:rchavik,项目名称:atrocious-saml-dragon,代码行数:40,代码来源:index.php

示例6: nvl

  <img src="http://www.kpnuts.com/email/unsubscribe/images/kp_btm.jpg" width="650" height="92" alt="You're a winner!" style="display:block" />
  
  <div id="form_area">
		<?php 
if ($usConfirm == "confirm") {
    echo "<div class=\"newsletter_intro\">You have been removed from the mailing list</div>\r\n";
} else {
    echo "<div class=\"newsletter_intro\">Please click the button below to unsubscribe from the United Biscuits mailing list</div>\r\n";
    ?>
  		<form style="width:650px; margin:0 auto; text-align:center;" name="us_form" id="us_form" method="post" action="http://www.kpnuts.com/email/unsubscribe/unsubscribe.php">
	 			<input type="hidden" name="us_confirm" value="confirm" />
				<input type="hidden" name="c" value="<?php 
    echo nvl($campaign);
    ?>
" />
  		  <input type="hidden" name="u" value="<?php 
    echo nvl($uid);
    ?>
" />
    		<input type="hidden" name="email" value="<?php 
    echo nvl($email);
    ?>
" /><br /><br />
		  	<input type="submit" value="Unsubscribe" />
	  	</form> 
		<?php 
}
?>
    <br /><br /><br /><br />
  </div>
</div>
开发者ID:barbercraig,项目名称:KP-nuts,代码行数:31,代码来源:newsletter_us.php

示例7: startSession

 /**
  * Initialize corto session - to be able to handle multiple federations
  * and entities the session name is a hash of entityID concatenated with the federation name
  *
  * @return void
  */
 public function startSession()
 {
     $cookie_path = $_SERVER['SCRIPT_NAME'];
     $secure_cookie = nvl($_SERVER, 'HTTPS');
     // IIS returns 'off' if not https
     $secure_cookie = isset($secure_cookie) && $secure_cookie != 'off';
     session_write_close();
     // @todo remember general alert for non-https requests ...
     // @todo what about INTERNAL bindings ???
     session_set_cookie_params(0, $cookie_path, '', $secure_cookie);
     session_name(sha1($this->_metadata['current']['entityID']));
     session_start();
     #$_SESSION['__entity__'] = $this->_metadata['current']['entityID'];
 }
开发者ID:rchavik,项目名称:atrocious-saml-dragon,代码行数:20,代码来源:ProxyServer.php

示例8: NOW

 $update[] = "CONTENT_DETAIL_ENG= '" . $_POST['txtDetailEng'] . "'";
 $update[] = "BRIEF_LOC= '" . $_POST['txtBriefDescLoc'] . "'";
 $update[] = "BRIEF_ENG= '" . $_POST['txtBriefDescEng'] . "'";
 $update[] = "LAST_UPDATE_USER = '" . $_SESSION['user_name'] . "'";
 $update[] = "LAST_UPDATE_DATE = NOW()";
 $update[] = "CAT_ID = '" . $CID . "'";
 ///$_POST['cmbCategory'] . "'";
 $update[] = "SUB_CAT_ID = '" . $subCatID . "'";
 $update[] = "EVENT_START_DATE = '" . ConvertDateToDB($_POST['txtStartDate']) . "'";
 $update[] = "EVENT_END_DATE = '" . ConvertDateToDB($_POST['txtEndDate']) . "'";
 $update[] = "PLACE_DESC_LOC = '" . nvl($_POST['txtPlaceLoc'], "") . "'";
 $update[] = "PLACE_DESC_ENG = '" . nvl($_POST['txtPlaceEng'], "") . "'";
 $update[] = "LAT = '" . nvl($_POST['txtLat'], "") . "'";
 $update[] = "LON  = '" . nvl($_POST['txtLon'], "") . "'";
 $update[] = "EVENT_START_TIME = '" . nvl($_POST['cmbHourStart'], '') . ':' . nvl($_POST['cmbMinuteStart'], '') . "'";
 $update[] = "EVENT_END_TIME = '" . nvl($_POST['cmbHourEnd'], '') . ':' . nvl($_POST['cmbMinuteEnd'], '') . "'";
 $update[] = "PRICE_RATE_LOC = '" . $_POST['txtPriceLoc'] . "'";
 $update[] = "PRICE_RATE_ENG = '" . $_POST['txtPriceEng'] . "'";
 $sql = "UPDATE trn_content_detail SET  " . implode(",", $update) . " WHERE CONTENT_ID = " . $conid;
 mysql_query($sql, $conn);
 if (count($_POST['photo_file']) > 0) {
     $sql_max = "SELECT MAX(ORDER_ID) AS MAX_ORDER FROM trn_content_picture WHERE CONTENT_ID = " . $conid . " AND CAT_ID = " . $CID;
     //$_POST['cmbCategory'];
     $query_max = mysql_query($sql_max, $conn) or die($sql_max);
     $row_max = mysql_fetch_array($query_max);
     $max = $row_max['MAX_ORDER'];
     $max++;
     foreach ($_POST['photo_file'] as $k => $file) {
         $filename = admin_move_image_upload_dir('content_' . $CID, end(explode('/', $file)), 1000, '', false, 150, 150);
         unset($insert);
         $insert['CONTENT_ID'] = $conid;
开发者ID:noppolgap,项目名称:museumsiam,代码行数:31,代码来源:content_action.php

示例9: while

								,sb.SUB_CONTENT_CAT_DESC_ENG
							FROM trn_content_category cc
							LEFT OUTER JOIN trn_content_sub_category sb ON sb.CONTENT_CAT_ID = cc.CONTENT_CAT_ID
							WHERE cc.REF_MODULE_ID = $MID 
								AND cc.flag <> 2 
								AND cc.CONTENT_CAT_ID  = $CID ";
								if (isset($SCID) && nvl($SCID, '0') != '0') {
				$sql .= "	AND sb.SUB_CONTENT_CAT_ID = $SCID ";
			}
				$sql .="    ORDER BY cc.ORDER_DATA DESC 
								,sb.order_data DESC
							) a
						LEFT JOIN trn_content_detail cd ON a.CONTENT_CAT_ID = cd.CAT_ID 
						where cd.CONTENT_STATUS_FLAG <>  2 ";
						
						if (isset($SCID) && nvl($SCID, '0') != '0') {
				$sql .= "	AND cd.SUB_CAT_ID = $SCID ";
			}
								
						$sql .= " ORDER BY cd.ORDER_DATA desc ";

			     $query = mysql_query($sql,$conn);
			     while($row = mysql_fetch_array($query)) {
			     	
			 
		?>

		<li class="ui-state-default" data-order="<?=$row['ORDER_DATA'] ?>" data-id="<?=$row['CONTENT_ID'] ?>"><?=$row['CONTENT_DESC_LOC'] ?></li>
	<? } ?>  
	</ul>
</div>	
开发者ID:noppolgap,项目名称:museumsiam,代码行数:31,代码来源:content_order.php

示例10: ConvertDate

					$textLocation = ' class="text-des"  style="height: 15px;" ';

				$textTicket = ' class="text-ticket" ';
				if (nvl($row['PRICE_RATE'], '') == '')
					$textTicket = ' class="text-des"  style="height: 15px;" ';
			?>
				
				<div class="box-when">
					<h3>WHEN</h3>
					<p class="text-date"><? echo ConvertDate($row['EVENT_START_DATE']) ?> - <? echo ConvertDate($row['EVENT_END_DATE']) ?></p>
					<p class="text-time"><? echo $row['EVENT_START_TIME'] ?> - <? echo $row['EVENT_END_TIME'] ?></p>
					<p <?=$textLocation ?>><? echo nvl($row['PLACE_DESC'], '')  ?></p>
				</div>
				<div class="box-ticket">
					<h3>TICKET</h3>
					<p <?=$textTicket ?>><?= nvl($row['PRICE_RATE'], '') ?></p>
				</div>
				<div class="box-news-text">
					<p>
						<?=nl2br(strip_tags($row['CONTENT_DETAIL'], $allowTag)); ?>
					</p>
				</div>

<?php
	$SqlFile = "SELECT * FROM trn_content_picture WHERE CONTENT_ID = ".$CONID." AND CAT_ID = ".$CID." AND DIV_NAME =  'Other' ORDER BY ORDER_ID ASC";
	$QueryFile = mysql_query($SqlFile) or die(mysql_error());
	$numFile = mysql_num_rows($QueryFile);
	if($numFile > 0){
?>
				<div class="box-otherfile-main">
					<div class="box-title cf">
开发者ID:noppolgap,项目名称:museumsiam,代码行数:31,代码来源:event-detail.php

示例11: mysql_query

<?php

include "/nfslocal/www/include/db/dbconnect.php";
//get vars
$uid = $_REQUEST["u"];
//person unique ID
$url_id = $_REQUEST["r"];
//url_id for link in URL table
//get url details
$urlsql = "SELECT url, description, code, alert, personalise, active, campaign \n\t\t \t\t\t  FROM url\n          \tWHERE url_id='{$url_id}' and active = 'true' LIMIT 1";
$geturl = mysql_query($urlsql);
$url = mysql_fetch_array($geturl);
//set campaign code
// use posted campaign code, or the one from the table, this means that landing pages can have the came link, but log to different campaigns
$campaign = nvl($_REQUEST["c"], $url[6]);
$campaigntable = $campaign . "_log";
//log click through
//$mysqltime = strftime ("%y/%m/%d %H:%M:%S" , time());
$logsql = "INSERT INTO {$campaigntable}(log_date, campaign, uid, action, details) VALUES (now(), '{$campaign}', '{$uid}', '{$url['2']}', '{$url['1']}')";
$dolog = mysql_query($logsql);
//get passthrough details (if personalise = true)
if ($url[4] == "true") {
    $campaignemail = $campaign . "_email";
    $dsql = "SELECT * FROM {$campaignemail} WHERE uid = '{$uid}'";
    $getd = mysql_query($dsql);
    //personalise the link
    $d = mysql_fetch_array($getd);
    foreach ($d as $k => $v) {
        $url[0] = str_replace("#={$k}=#", $v, $url[0]);
    }
}
开发者ID:barbercraig,项目名称:KP-nuts,代码行数:31,代码来源:redir.php

示例12: getCatBread

function getCatBread($cid, $mid, &$breadArr)
{
    $sqlStr = "select * from trn_content_category where CONTENT_CAT_ID = " . $cid;
    $rs = mysql_query($sqlStr) or die(mysql_error());
    if ($_SESSION['LANG'] == 'TH') {
        $selectedColName = 'CONTENT_CAT_DESC_LOC';
    } else {
        $selectedColName = 'CONTENT_CAT_DESC_ENG';
    }
    while ($row = mysql_fetch_array($rs)) {
        //	echo count($breadArr);
        if (count($breadArr) == 0) {
            $breadArr[] = '<li class="active">' . $row[$selectedColName] . '</li>';
        } else {
            if (nvl($row['IS_LAST_NODE'], 'Y') == 'Y') {
                $breadArr[] = '<li ><a href="da-all-black.php?MID=' . $mid . '&CID=' . $row['CONTENT_CAT_ID'] . '">' . $row[$selectedColName] . '&nbsp;&nbsp;&nbsp;>&nbsp;&nbsp;</a></li>';
            } else {
                $breadArr[] = '<li ><a href="da-category-black.php?MID=' . $mid . '&CID=' . $row['CONTENT_CAT_ID'] . '">' . $row[$selectedColName] . '&nbsp;&nbsp;&nbsp;>&nbsp;&nbsp;</a></li>';
            }
        }
    }
}
开发者ID:noppolgap,项目名称:museumsiam,代码行数:22,代码来源:inc-da-black-breadcrumbs.php

示例13: mysql_query

														LINK_URL
													FROM
														trn_content_sub_category
													WHERE
														CONTENT_CAT_ID = " . $categoryRow['CONTENT_CAT_ID'];
					$sqlSubCategory .= " AND flag  = 0
													ORDER BY
														ORDER_DATA desc";

					$rsSubMenu = mysql_query($sqlSubCategory) or die(mysql_error());
					$subCount = 1;
					echo '<ul class="submenu-left">';
					while ($subCategoryRow = mysql_fetch_array($rsSubMenu)) {

						$subLink = "ve-category.php?c=" . $categoryRow['CONTENT_CAT_ID'] . "&SCID=" . $subCategoryRow['SUB_CONTENT_CAT_ID'];
						if (nvl($subCategoryRow['LINK_URL'], '') != '')
							$subLink = $subCategoryRow['LINK_URL'];

						echo '<li class="submenu' . $subCount . '"><a href="' . $subLink . '">' . $subCategoryRow['SUB_CONTENT_DESC'] . '</a></li>';
						$subCount++;
					}
					echo '</ul>';

				}

				echo '</li>';
				$mainMenuCount++;

			}
			?>
			
开发者ID:noppolgap,项目名称:museumsiam,代码行数:30,代码来源:inc-left-content-ve.php

示例14: nvl

        ?>
/opt.php?debug=<?php 
        echo nvl($session['mode_debug']) == 1 ? 0 : 1;
        ?>
">Debug Modus <?php 
        echo nvl($session['mode_debug']) == 1 ? "Aus" : "An";
        ?>
</A>&nbsp;&nbsp;
    |&nbsp;&nbsp;<a href="<?php 
        echo $CFG->wwwroot;
        ?>
/opt.php?admin=<?php 
        echo nvl($session['mode_admin']) == 1 ? 0 : 1;
        ?>
">Admin Modus <?php 
        echo nvl($session['mode_admin']) == 1 ? "Aus" : "An";
        ?>
</A>&nbsp;&nbsp;
    |&nbsp;&nbsp;<a href="<?php 
        echo $CFG->wwwroot;
        ?>
/admin/admin.php">Admin Seite</A>&nbsp;&nbsp;
    <?php 
    }
    ?>
  <?php 
} else {
    ?>
  <a href="<?php 
    echo $CFG->wwwroot;
    ?>
开发者ID:BackupTheBerlios,项目名称:otmp,代码行数:31,代码来源:footer.php

示例15:

 ?>
		<?
		$MID = $_GET['MID'];
		$id = $_GET['conid'];

		$CID = $_GET['cid'];
		$LV = $_GET['LV'];
		$SCID = $_GET['SCID'];
		$subfixAddAndEdit = '&cid=' . $CID . '&LV=' . $LV;
		if (isset($SCID) && nvl($SCID, '0') != '0') {
			$subfixAddAndEdit .= '&SCID=' . $SCID;
		}

		$navigateBackPage = '';
		$navigateBackPage = 'content_view.php?cid=' . $CID . '&MID=' . $MID . '&LV=' . $LV;
		if (nvl($SCID, '0') != '0')
			$navigateBackPage .= '&SCID=' . $SCID;

		$sql = "SELECT cd.*
										,cc.CONTENT_CAT_DESC_ENG
										,cc.CONTENT_CAT_DESC_LOC
										,cc.IS_LAST_NODE
										,sc.SUB_CONTENT_CAT_DESC_ENG
										,sc.SUB_CONTENT_CAT_DESC_LOC
									FROM trn_content_detail cd
									LEFT JOIN trn_content_category cc ON cc.CONTENT_CAT_ID = cd.CAT_ID
									LEFT OUTER JOIN trn_content_sub_category sc ON sc.SUB_CONTENT_CAT_ID = cd.SUB_CAT_ID";
									
									if($MID == $contact_us){
										$sql .= " where cd.CONTENT_STATUS_FLAG =  2 " ;
									}else{
开发者ID:noppolgap,项目名称:museumsiam,代码行数:31,代码来源:contact_edit.php


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