本文整理汇总了PHP中main::LoadList方法的典型用法代码示例。如果您正苦于以下问题:PHP main::LoadList方法的具体用法?PHP main::LoadList怎么用?PHP main::LoadList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类main
的用法示例。
在下文中一共展示了main::LoadList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view
public function view()
{
global $user;
$cfg = new config();
$main = new main();
if (empty($_GET['detail'])) {
if (isset($_GET['type'])) {
$type = intval($_GET['type']);
} else {
$type = 0;
}
if (isset($_GET['sort'])) {
$sort = intval($_GET['sort']);
} else {
$sort = 1;
}
if ($type > 0 && $type < 3) {
$href = "index.php?a=list&type=" . $type;
} else {
$href = "index.php?a=list";
}
$sortto = 'desc';
if (isset($_GET['sortto']) && ($_GET['sortto'] == "desc" || $_GET['sortto'] == "asc")) {
if (isset($_GET['last']) && $_GET['last'] == $sort) {
$_GET['sortto'] == "desc" ? $sortto = 'asc' : ($sortto = 'desc');
}
}
$mass = array(1 => array("30px", "#"), 2 => array("513px", "Заголовок"), 3 => array("120px", "Отправитель"), 4 => array("100px", "Прогресс"), 5 => array("100px", "Статус"), 6 => array("100px", "Приоритет"));
$text = '
<table height="100%" border="0" cellpadding="0" cellspacing="0" align="left">
<tr>';
for ($i = 1; $i < count($mass) + 1; $i++) {
if ($i == 4 && $cfg->get("progressbar") || $i != 4) {
$text .= '<td style="width:' . $mass[$i][0] . ';background-color:#666;" onClick="window.location.href=\'' . $href . '&sort=' . $i . '&sortto=' . $sortto . '&last=' . $sort . '\';" onMouseover="this.style.cursor=\'pointer\';this.style.backgroundColor=\'#777\';" onMouseout="this.style.cursor=\'default\';this.style.backgroundColor=\'#666\';"><div class="pad"><b>' . $mass[$i][1] . '</b></div></td>';
if ($i != count($mass)) {
$text .= '<td width="1px" style="background-color: #000;"></td>';
}
}
}
$text .= '
</tr>
</table>';
$this->blocknot($text);
$text = '<table width="100%" height="19px" border="0" cellpadding="0" cellspacing="0" align="left">';
$psort = '';
if (isset($_GET['sort']) && intval($_GET['sort']) > 0 && $_GET['sort'] > "0" && $_GET['sort'] < "6") {
if ($_GET['sortto'] == "desc") {
$psort = 'desc_' . $sort;
} else {
if ($_GET['sortto'] == "asc") {
$psort = 'asc_' . $sort;
}
}
}
if ($type == 1) {
$result = $main->LoadList("new", $psort);
} else {
if ($type == 2) {
$result = $main->LoadList("my", $psort);
} else {
$result = $main->LoadList("all", $psort);
}
}
$m = 0;
$js = "";
$sql = new sql();
while ($row = $sql->fetch($result)) {
if ($m > 0) {
$text .= '
<tr style="height:1px;background-color: #000;">
<td></td><td></td><td></td>
<td></td><td></td><td></td>
<td></td><td></td><td></td>';
if ($cfg->get("progressbar")) {
$text .= '
<td></td><td></td>';
}
$text .= '
</tr>';
}
$all = $main->SelectMessage($row['id']);
$opt = $main->SelectOptions($row['id']);
$title = $all['title'];
$pcn = $main->GetPercent($all);
$pix = str_replace("%", "", $pcn);
$stream = 'stream' . $row['id'];
$width = $cfg->get("anim") == true ? 0 : $pix;
$img = '<div id="stream' . $m . '" style="height:19px;width:' . $width . 'px;background-color:#006400;"></div>';
$text .= '
<tr style="background-color: #666;" onClick="if(tr_select)window.location.href=\'index.php?a=admin&edit=' . $row['id'] . '\';else window.location.href=\'index.php?a=list&detail=' . $row['id'] . '\';" onMouseover="this.style.cursor=\'pointer\';this.style.backgroundColor=\'#888\';" onMouseout="this.style.cursor=\'default\';this.style.backgroundColor=\'#666\';">
<td width="' . $mass[1][0] . '" class="view"><div class="pad">' . $row['id'] . '</div></td>
<td width="1px" style="background-color: #000;"></td>
<td width="' . $mass[2][0] . '" class="view"><div class="pad">' . $title . '</div></td>
<td width="1px" style="background-color: #000;"></td>
<td width="' . $mass[3][0] . '" class="view"><div class="pad">' . $main->GetNameByGUID(intval($row['sender'])) . '</div></td>
<td width="1px" style="background-color: #000;"></td>';
if ($cfg->get("progressbar")) {
$text .= '
<td width="' . $mass[4][0] . '" class="view" style="padding:0;margin:0;">' . $img . '</td>
<td width="1px" style="background-color: #000;"></td>';
//.........这里部分代码省略.........