本文整理汇总了PHP中Variable::get_variable_info方法的典型用法代码示例。如果您正苦于以下问题:PHP Variable::get_variable_info方法的具体用法?PHP Variable::get_variable_info怎么用?PHP Variable::get_variable_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Variable
的用法示例。
在下文中一共展示了Variable::get_variable_info方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
} else {
if ($result_element['Element_Type'] == 'Table') {
$table = Table::get_table_info($result_element['Element_ID']);
?>
<li><a href="table_info.php?table_id=<?php
echo $table['Table_ID'];
?>
"><i class="icon-th"></i> <?php
echo $table['Table_Name'];
?>
</a> (table)</li>
<?php
} else {
if ($result_element['Element_Type'] == 'Variable') {
$variable = Variable::get_variable_info($result_element['Element_ID']);
?>
<li><a href="variable_info.php?variable_id=<?php
echo $variable['Variable_ID'];
?>
"><i class="icon-asterisk"></i> <?php
echo $variable['Variable_Name'];
?>
</a> (variable)</li>
<?php
}
}
}
}
?>
</ul>
示例2: header
<?php
include 'classes/database.php';
include 'classes/table.php';
include 'classes/variable.php';
include 'classes/keyword.php';
$variable_info = Variable::get_variable_info($_GET['variable_id']);
//if the user is not logged in and the item isn't public
if (!isset($_COOKIE['user_id']) && $variable_info['Public'] == '0') {
header("Location: " . $_SERVER['HTTP_REFERER']);
}
//add a single view
Variable::add_view($_GET['variable_id']);
//recently viewed link
$recently_viewed_link = '<li><a href="variable_info.php?variable_id=' . $variable_info['Variable_ID'] . '"><i class="icon-asterisk"></i> ' . $variable_info['Variable_Name'] . '</a> (variable)</li>';
if (stripslashes($_COOKIE['recently_viewed'][0]) != $recently_viewed_link) {
//add item to recently viewed
setcookie("recently_viewed[4]", stripslashes($_COOKIE['recently_viewed'][3]));
setcookie("recently_viewed[3]", stripslashes($_COOKIE['recently_viewed'][2]));
setcookie("recently_viewed[2]", stripslashes($_COOKIE['recently_viewed'][1]));
setcookie("recently_viewed[1]", stripslashes($_COOKIE['recently_viewed'][0]));
setcookie("recently_viewed[0]", $recently_viewed_link);
}
include 'include/header.php';
?>
<br />
<div style="font-weight: bold; font-size: 20px; font-family: arial;">
Variable Detail
</div>
<br />
<div id="variable_info_static">