本文整理汇总了PHP中data::getData方法的典型用法代码示例。如果您正苦于以下问题:PHP data::getData方法的具体用法?PHP data::getData怎么用?PHP data::getData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类data
的用法示例。
在下文中一共展示了data::getData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: makeHtml
public function makeHtml($id, $path)
{
self::filter($path);
$array = data::getData($path);
$html = '';
$total = '';
foreach ($array as $k => $v) {
if ($k) {
$t = $id ? $id . '_' . $k : $k;
$name = $v[0] !== '-' ? '<a href="javascript:;" id="a_' . $t . '" path="' . $path . '">' . $v[1] . '</a>' : $v[1];
if ($id) {
$blank = "";
$b_count = count(explode("_", $id));
for ($i = 1; $i < $b_count; $i++) {
$blank .= " ";
}
$name = $blank . $name;
}
$name = $id ? " " . $name : $name;
$html .= "<div id='d_" . $t . "'>\n\t<span class='content' style='width:30px;text-align: center'><input type='checkbox' id='c_" . $t . "'/></span>\n\t<span class='content' style='width:680px;padding-left: 20px'>" . $name . "</span>\n\t<span class='content' style='width:150px'>" . $v[2] . "</span>\n\t<span class='content' style='width:80px;text-align: right'>" . $v[3] . "</span>\n</div>";
} else {
$total_t = $id ? $id . "_total" : "total";
$total = "<div id='d_" . $total_t . "'>\n\t<span class='content' style='width:30px;text-align: center'></span>\n\t<span class='content' style='width:680px;padding-left: 20px'></span>\n\t<span class='content' style='width:150px'></span>\n\t<span class='content' style='width:80px;text-align: right'>总计:" . $v . "</span>\n</div>";
}
}
return $html . $total;
}
示例2: dataDropdown
function dataDropdown($name, $id, $currentValue, $sql)
{
include "test_lib_m.php";
$objThis_S = new data();
$q_data = $objThis_S->getData($sql = $sql);
include "test_lib_v.php";
$objThis_V = new display();
$tmpX = $objThis_V->showBox($name = $name, $id = $id, $q_query = $q_data, $currentValue = $currentValue);
return $tmpX;
}