本文整理汇总了PHP中isLive函数的典型用法代码示例。如果您正苦于以下问题:PHP isLive函数的具体用法?PHP isLive怎么用?PHP isLive使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isLive函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: have_right
function have_right($right)
{
$self = $_SERVER['PHP_SELF'];
if (isLive()) {
$index1 = strpos($self, '/clients/');
$index2 = strpos($self, '/', $index1 + 9);
$client = substr($self, $index1 + 9, $index2 - ($index1 + 9));
$self = str_replace("/clients/{$client}/", '../', $self);
} else {
$self = str_replace('/corpus/', '../', $self);
}
return have_right_on($right, $self);
}
示例2: dumpFile
function dumpFile(&$var, $info = FALSE, $mode = 'a')
{
if (isLive()) {
// do not create dumps for LIVE application
return;
}
ob_start();
dump($var, $info);
$out = ob_get_contents();
ob_end_clean();
$fp = fopen('dump.htm', $mode);
if ($mode == 'w') {
$str = "<html><head><title>DUMP</title></head><body>";
fwrite($fp, $str);
}
fwrite($fp, $out);
fclose($fp);
}
示例3: mysql_query
}
echo $sql . "<br/>";
$result = mysql_query($sql) or die("Couldn t execute query." . mysql_error());
$_key = -1;
if (strlen($voucher_detail_id) > 0) {
$_key = $voucher_detail_id;
} else {
$_key = mysql_insert_id();
}
$data["id_" . $i] = $_key;
}
}
/* start auditing on add, update, delete */
$voucher_id = $parent_key;
$voucher_aud_id = d_mysql_query("INSERT INTO voucher_master_aud SELECT NULL, vm.*, '{$oper}', {$_SESSION['user_id']}, now() FROM voucher_master vm WHERE vm.voucher_id = {$voucher_id}", true);
d_mysql_query("INSERT INTO voucher_detail_aud SELECT NULL, vd.*, {$voucher_aud_id} FROM voucher_detail vd WHERE vd.voucher_id = {$voucher_id}");
/* end auditing on add, update, delete */
}
$json = new Services_JSON();
$output = $json->encode($data);
print $output;
$out = ob_get_contents();
ob_end_clean();
if (!isLive()) {
$fp = fopen('voucher_cud.htm', 'w');
fwrite($fp, "<html><head><title>VOUCHER CUD</title></head><body>");
fwrite($fp, $out);
fwrite($fp, "</body></html>");
fclose($fp);
}
print $output;
示例4: function
centerFrame();
setTimeout('checkDcChallan()', delay);
},
failure: function(o) { }
};
var transaction = YAHOO.util.Connect.asyncRequest('GET', '../transaction/dc.php?user=<?php
echo $_SESSION['user_id'];
?>
', callback);
}
</script>
<script type="text/javascript">
jQuery(document).ready(function(){
$("#gears").hide();
<?php
if (isLive()) {
?>
_checkHtml5Db();<?php
}
?>
});
$("#btnGear").click(function() {
document.location.href = '../transaction/gears.php';
return false;
});
function _checkHtml5Db() {
if (document.location.href.endsWith('gears.php')) {
//do not check if already on gears.php page
} else {
示例5: getDBCell
$cols = getDBCell("pgn_gallery", "COLS", "GALLERY_ID = " . $gallery);
$imFolder = getDBCell("pgn_gallery", "IMAGE_FOLDER_ID", "GALLERY_ID = " . $gallery);
// write header...
echo "<gallery rows='{$cols}' cols='{$rows}'>\n";
// prepare conent..
$imagePGNId = getDBCell("modules", "MODULE_ID", "UPPER(MODULE_NAME) ='IMAGE'");
$imageList = createDBCArray("content", "CID", "MODULE_ID = {$imagePGNId} AND CATEGORY_ID = {$imFolder}");
if ($live) {
$impath = $c["livefilesdocroot"];
} else {
$impath = $c["devfilesdocroot"];
//todo: versioning.
}
// create content-list.
for ($i = 0; $i < count($imageList); $i++) {
$cid = $imageList[$i];
if ($live == isLive($cid)) {
$fkid = getDBCell("content_variations", "FK_ID", "CID = {$cid} AND DELETED=0 AND VARIATION_ID = {$variation}");
$filename = getDBCell("pgn_image", "FILENAME", "FKID={$fkid}");
echo "\t<photo furl='{$impath}" . $filename . "' purl='{$impath}" . "t" . $filename . "' comment=''/>\n";
}
}
// write footer
echo "</gallery>\n";
function isLive($id)
{
if (getDBCell("state_translation", "OUT_ID", "OUT_ID={$id}") != "") {
return true;
}
return false;
}
示例6: currentServiceLink
function currentServiceLink()
{
$output = false;
if (isLive()) {
$output = site_url() . '/live';
} else {
$output = site_url() . '/watch';
}
return $output;
}