本文整理汇总了PHP中showStatus函数的典型用法代码示例。如果您正苦于以下问题:PHP showStatus函数的具体用法?PHP showStatus怎么用?PHP showStatus使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了showStatus函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
if (IS_POST) {
$Category = M('Category');
foreach ($_POST['sort'] as $id => $sort) {
$Category->where(array('cateid' => $id))->save(array('sort' => $sort));
}
$this->success("排序更新成功!");
exit;
}
$categorys = array();
//栏目数据,可以设置为缓存的方式
$result = D('Admins/Category')->getData();
if (!empty($result)) {
foreach ($result as $r) {
$r = getCategory($r['cateid']);
if ($r['child']) {
$r['yesadd'] = '';
} else {
$r['yesadd'] = 'blue';
}
$r['status'] = showStatus($r['status']);
if ($r['child']) {
$r['str_manage'] .= '<a href="' . U("Category/add", array("parentid" => $r['cateid'])) . '">添加子栏目</a> | ';
}
$r['str_manage'] .= '<a href="' . U("Category/edit", array("cateid" => $r['cateid'])) . '">修改</a> | <a class="J_ajax_del" data-msg="确定删除该栏目及栏目下的信息吗?" href="' . U("Category/delete", array("cateid" => $r['cateid'])) . '">删除</a>';
//终极栏目转换
$r['str_manage'] .= ' | <a href="' . U("Category/categoryTochild", array("cateid" => $r['cateid'])) . '">终极属性转换</a> ';
$categorys[$r['cateid']] = $r;
}
}
$str = "<tr><td align='center'><input name='sort[\$id]' type='text' size='3' value='\$sort' class='input'></td>\n\t<td align='center'>\$status</td>\n\t<td align='center'><font color='\$yesadd'>\$id</font></td>\n\t<td >\$spacer\$catename</td>\n\t<td align='center' >\$str_manage</td>\n\t</tr>";
if (!empty($categorys) && is_array($categorys)) {
$this->Tree->icon = array(' │ ', ' ├─ ', ' └─ ');
$this->Tree->nbsp = ' ';
$this->Tree->init($categorys);
$categorydata = $this->Tree->get_tree(0, $str);
} else {
$categorydata = '';
}
$this->assign("categorys", $categorydata);
$this->display();
}
示例2: updateRow_TicketDelivery
function updateRow_TicketDelivery($pDB, $pDB_2, $module_name)
{
$sTicketId = trim(getParameter('ticket_id'));
$pTicket_Delivery = new Ticket_Delivery($pDB);
$pACL = new paloACL($pDB_2);
$arrResult = $pTicket_Delivery->getTicket_DeliveryById($sTicketId);
$img_dir = "modules/{$module_name}/images/";
$value = $arrResult[0];
$ticket = '';
$name = $pACL->getUsers($value['accounting_id']);
$elastix_user = is_null($value['accounting_id']) ? '(Chưa nhận)' : $name[0][1];
// show files
$download = '';
foreach ($value['ticket_attachment'] as $row) {
$url = "/modules/agent_console/ajax-attachments-handler.php?download=" . $row['filepath'] . "&name=" . $row['filename'];
$filename = $row['filename'];
$download .= "*<a href='{$url}' target='_blank' title='{$filename}'>" . shorten($filename) . "</a><br/>";
}
$print = '<a href="javascript:void(0)" onclick="print(\'' . $value['id'] . '\')"><img src="' . $img_dir . 'print.png" title="In phiếu"></a>';
$enable = $value['isActive'] == '1' ? '<a href="javascript:void(0)" onclick="disable(\'' . $value['id'] . '\')"><img src="' . $img_dir . 'disable.png" title="Hủy yêu cầu giao vé"></a> ' : '<a href="javascript:void(0)" onclick="enable(\'' . $value['id'] . '\')"><img src="' . $img_dir . 'enable.png" title="Tạo lại yêu cầu giao vé"></a>';
$print .= ' ' . $enable;
if ($value['isActive'] == '0') {
$value['status'] = 'Đã hủy';
}
// function show base on status
switch ($value['status']) {
case 'Mới':
$function = '<a href="javascript:void(1)" onclick="assign_form(\'' . $value['id'] . '\')"><img src="' . $img_dir . 'assign.png" title="Phân công"></a>';
break;
case 'Đang giao':
$function = '<a href="javascript:void(1)" onclick="assign_form(\'' . $value['id'] . '\')"><img src="' . $img_dir . 'assign.png" title="Đổi phân công"></a>
<a href="javascript:void(1)" onclick="collect_form(\'' . $value['id'] . '\',\'' . $elastix_user . '\')"><img src="' . $img_dir . 'result.png" title="Kết quả"></a>';
break;
case 'Đã nhận tiền':
$function = '<a href="javascript:void(1)" onclick="uncollect_form(\'' . $value['id'] . '\',\'' . $elastix_user . '\')"><img src="' . $img_dir . 'unpaid.png" title="Hủy nhận tiền"></a>';
break;
case 'Chờ xử lý':
$function = '<a href="javascript:void(1)" onclick="assign_form(\'' . $value['id'] . '\')"><img src="' . $img_dir . 'assign.png" title="Phân công"></a>';
break;
default:
$function = '';
}
// show ticket code
foreach ($value['ticket_code'] as $row) {
$ticket .= $row . '<br>';
}
// append html
$html = '';
$html .= '<td class="table_data">' . $value['id'] . '</td>';
$html .= '<td class="table_data">' . $value['customer_name'] . '</td>';
$html .= '<td class="table_data">' . $value['customer_phone'] . '</td>';
$html .= '<td class="table_data"><span title="Chi nhánh: ' . $value['office'] . '">' . $value['agent_name'] . '</span></td>';
$html .= '<td class="table_data">' . '<a href="javascript:void(1)" title="' . $value['deliver_address'] . '"
onclick="view_address(\'' . $value['deliver_address'] . '\')">' . shorten($value['deliver_address']) . '
</a></td>';
$html .= '<td class="table_data">' . $value['pay_amount'] . '</td>';
$html .= '<td class="table_data">' . $ticket . '</td>';
$html .= '<td class="table_data">' . showStatus($value['status']) . '</td>';
$html .= '<td class="table_data">' . $value['delivery_name'] . '</td>';
$html .= '<td class="table_data">' . (is_null($value['delivery_date']) ? '' : date("d-m-Y H:m:s", strtotime($value['delivery_date']))) . '</td>';
$html .= '<td class="table_data">' . $download . '</td>';
$html .= '<td class="table_data">' . (is_null($value['collection_date']) ? '' : date("d-m-Y H:m:s", strtotime($value['collection_date']))) . '</td>';
$html .= '<td class="table_data">' . $function . '</td>';
$html .= '<td class="table_data"><a href="javascript:void(1)" onclick="view_log(\'' . $value['id'] . '\')">
<img src="' . $img_dir . 'extra.png" title="Xem chi tiết"></a></td>';
$html .= '<td class="table_data">' . $print . '</td>';
return $html;
}
示例3: list
</td>
<td width="33%" class="<?php
echo $td_class;
?>
"><?php
list($year, $month, $day) = explode("-", $rsadvert->expiry_date);
//$date = "".$day."/".$month."/".$year;
$date = date("M d, Y", mktime(0, 0, 0, $month, $day, $year));
echo $date;
?>
</td>
<td width="17%" class="<?php
echo $td_class;
?>
"><?php
echo showStatus('code', 'code_id', $rsadvert->code_id, 'status', $rsadvert->status, 'job_voucher_code');
?>
</td>
<td width="25%" class="<?php
echo $td_class;
?>
_end"><a href="code_add.php?action=edit&vid=<?php
echo $rsadvert->code_id;
?>
" class="paging_text">Edit</a> <a href="#" class="paging_text" onClick="return deletebanner(<?php
echo $rsadvert->code_id;
?>
)">Delete </a></td>
</tr>
<?php
$i++;
示例4: showStatus
"><?php
echo $rsadvert->banner_title;
?>
</td>
<td width="33%" class="<?php
echo $td_class;
?>
"><?php
echo $rsadvert->banner_url;
?>
</td>
<td width="17%" class="<?php
echo $td_class;
?>
"><?php
echo showStatus('banner', 'banner_id', $rsadvert->banner_id, 'banner_status', $rsadvert->banner_status, 'job_banner');
?>
</td>
<td width="25%" class="<?php
echo $td_class;
?>
_end"><a href="banner_edit.php?aid=<?php
echo $rsadvert->banner_id;
?>
" class="paging_text">Edit</a> <a href="#" class="paging_text" onClick="return deletebanner(<?php
echo $rsadvert->banner_id;
?>
)">Delete </a></td>
</tr>
<?php
$i++;
示例5: getNodeGroupName
?>
</td>
<td><?php
echo getNodeGroupName($vo['group_id']);
?>
</td>
<td><?php
echo $vo['sequence'];
?>
</td>
<td><?php
echo getStatus($vo['status']);
?>
</td>
<td><?php
echo showStatus($vo['status'], $vo['id'], 'navTabAjaxMenu');
?>
<a href="__URL__/edit/id/<?php
echo $vo['id'];
?>
" target="dialog">编辑</a></td>
</tr><?php
}
}
} else {
echo "";
}
?>
</tbody>
</table>
示例6: U
</td>
<td class="text-center"><input type="checkbox" name="ids" class="j-icheck" value="<?php
echo $vo['id'];
?>
">
</td>
<td>
<a href="<?php
echo U('edit', array('id' => $vo['id']));
?>
" rel="facultyedit<?php
echo $vo['id'];
?>
" class="btn bg-blue small" target="dialog" width="500px" height="280px" ><span class="button-content"><i class="glyph-icon icon-edit"></i> 编辑</span></a>
<?php
echo showStatus($vo['status'], $vo['id']);
?>
<a href="<?php
echo U('foreverdelete', array('id' => $vo['id']));
?>
" class="btn bg-red small" target="ajaxTodo" title="确定要删除该行信息吗?"><span class="button-content"><i class="glyph-icon icon-trash-o"></i> 删除</span></a>
</td>
</tr><?php
}
}
} else {
echo "";
}
?>
</tbody>
</table>
示例7: runSQL
}
$sql = "SELECT a.id, a.customer_name, a.customer_phone, a.purchase_date, b.name as agent, a.status,\n a.pay_amount, c.name as delivery_man, a.delivery_date, a.collection_date, a.isActive\n FROM ticket_delivery a LEFT JOIN agent b ON a.agent_id = b.id\n LEFT JOIN ticket_delivery_user c on a.user_id = c.id\n {$where} {$sort} {$limit}";
$data = runSQL($sql);
//var_dump($sql);
$total = countRec("a.id", $where);
$jsonData = array('page' => $page, 'total' => $total, 'rows' => array());
foreach ($data as $row) {
//If cell's elements have named keys, they must match column names
//Only cell's with named keys and matching columns are order independent.
$ticket_id = $row['id'];
$codes = runSQL("SELECT ticket_code FROM ticket_delivery_code WHERE ticket_id='{$ticket_id}'");
$code_list = '';
foreach ($codes as $code) {
$code_list .= $code['ticket_code'] . '<br/>';
}
$phone = '<a href="javascript:void(0)" onclick="make_call(\'' . $row['customer_phone'] . '\')"' . ">\n <img border=0 src='modules/agent_console/images/call.png' \n\t\ttitle='Gọi số " . $row['customer_phone'] . "'/></a> " . $row['customer_phone'];
// status "Da Huy"
if ($row['isActive'] == '0') {
$row['status'] = 'Đã hủy';
}
//date
$delivery_man = is_null($row['delivery_man']) ? '(Chưa phân công)' : $row['delivery_man'];
$view = '<a href="javascript:void(0)" onclick="view_delivery(\'' . $row['id'] . '\')">' . "<img src='modules/{$module_name}/images/extra.png' title='Xem chi tiết'></a> ";
$edit = '<a href="javascript:void(0)" onclick="edit_delivery(\'' . $row['id'] . '\')">' . "<img src='modules/{$module_name}/images/edit.png' title='Sửa'></a>";
$disable = '<a href="javascript:void(0)" onclick="disable_delivery(\'' . $row['id'] . '\')">' . "<img src='modules/{$module_name}/images/disable.png' title='Hủy vé'></a>";
$enable = '<a href="javascript:void(0)" onclick="enable_delivery(\'' . $row['id'] . '\')">' . "<img src='modules/{$module_name}/images/enable.png' title='Mở vé'></a>";
$action = $row['isActive'] == 0 ? $enable : ($row['status'] == 'Mới' || $row['status'] == 'Chờ xử lý' ? $edit . ' ' . $disable : '');
$entry = array('id' => $row['id'], 'cell' => array('id' => $row['id'], 'agent' => $row['agent'], 'pay_amount' => $row['pay_amount'], 'status' => showStatus($row['status']), 'delivery_man' => $delivery_man, 'delivery_date' => isset($row['delivery_date']) ? date("d-m-Y h:i:s", strtotime($row['delivery_date'])) : '', 'collection_date' => isset($row['collection_date']) ? date("d-m-Y h:i:s", strtotime($row['collection_date'])) : '', 'customer_phone' => $phone, 'customer_name' => $row['customer_name'], 'purchase_date' => isset($row['purchase_date']) ? date("d-m-Y", strtotime($row['purchase_date'])) : '', 'ticket_code' => $code_list, 'action' => $view . ' ' . $action));
$jsonData['rows'][] = $entry;
}
echo $json->encode($jsonData);
示例8: report_CashCollection
function report_CashCollection($smarty, $module_name, $local_templates_dir, &$pDB, $pDB_2)
{
$pCashCollection = new Cash_Collection($pDB);
$pACL = new paloACL($pDB_2);
// get filter parameters
$filter = array('date_start' => trim($_POST['date_start']) == '' ? '' : date("Y-m-d", strtotime($_POST['date_start'])), 'date_end' => trim($_POST['date_end']) == '' ? '' : date("Y-m-d", strtotime($_POST['date_end'])), 'customer_name' => trim($_POST['customer_name']), 'customer_phone' => trim($_POST['customer_number']), 'ticket_code' => trim($_POST['ticket_code']), 'status' => trim($_POST['status']));
//begin grid parameters
$oGrid = new paloSantoGrid($smarty);
$oGrid->setTitle("Thu tiền giao vé");
$oGrid->pagingShow(true);
// show paging section.
$oGrid->enableExport();
// enable export.
$oGrid->setNameFile_Export("Cash_Collection");
$url = array("menu" => $module_name);
$oGrid->setURL($url);
$arrColumns = array("ID", "Tên Khách Hàng", "Số điện thoại", "Ngày mua vé", "Booker", "Địa chỉ", "Tiền trả", "Mã số vé", "Tình trạng", "Nhân viên giao", "Ngày phân công", "Nhân viên nhận tiền", "Ngày nhận tiền", " ");
$oGrid->setColumns($arrColumns);
$total = $pCashCollection->getNumCash_Collection($filter);
$arrData = null;
if ($oGrid->isExportAction()) {
$limit = $total;
// max number of rows.
$offset = 0;
// since the start.
} else {
$limit = 20;
$oGrid->setLimit($limit);
$oGrid->setTotal($total);
$offset = $oGrid->calculateOffset();
}
$arrResult = $pCashCollection->getCash_Collection($limit, $offset, $filter);
if (is_array($arrResult) && $total > 0) {
foreach ($arrResult as $key => $value) {
$ticket = '';
$name = $pACL->getUsers($value['accounting_id']);
$elastix_user = is_null($value['accounting_id']) ? '(Chưa nhận)' : $name[0][1];
foreach ($value['ticket_code'] as $row) {
$ticket .= $row . '<br>';
}
$arrTmp[0] = $value['id'];
$arrTmp[1] = $value['customer_name'];
$arrTmp[2] = $value['customer_phone'];
$arrTmp[3] = is_null($value['purchase_date']) ? '' : date("d-m-Y H:m:s", strtotime($value['purchase_date']));
$arrTmp[4] = $value['agent_name'];
$arrTmp[5] = '<a href="javascript:void(1)" onclick="alert(\'' . $value['deliver_address'] . '\')">Xem</a>';
$arrTmp[6] = $value['pay_amount'];
$arrTmp[7] = $ticket;
$arrTmp[8] = showStatus($value['status']);
$arrTmp[9] = $value['delivery_name'];
$arrTmp[10] = is_null($value['delivery_date']) ? '' : date("d-m-Y H:m:s", strtotime($value['delivery_date']));
$arrTmp[11] = $elastix_user;
$arrTmp[12] = is_null($value['collection_date']) ? '' : date("d-m-Y H:m:s", strtotime($value['collection_date']));
$arrTmp[13] = $value['status'] == 'Đang giao' ? '<a href="javascript:void(1)" onclick="collect_form(\'' . $value['id'] . '\')">Nhận tiền</a>' : '';
$arrData[] = $arrTmp;
}
}
$oGrid->setData($arrData);
//begin section filter
$oFilterForm = new paloForm($smarty, createFieldFilter());
// get delivery man list
$delivery_man_list = $pCashCollection->getDeliveryMan();
$smarty->assign("DELIVERY_MAN_LIST", $delivery_man_list);
$htmlFilter = $oFilterForm->fetchForm("{$local_templates_dir}/filter.tpl", "", $_POST);
//end section filter
$oGrid->showFilter(trim($htmlFilter));
$content = $oGrid->fetchGrid();
//end grid parameters
return $content;
}
示例9: dbarray
}
}
}
} else {
if ($data['tour_finished'] == "0") {
echo "<span class='center'>Please, login for<br />register to tourney.</span>";
} else {
echo "Winners:<br />";
for ($z = 1; $z <= 4; $z++) {
$ui = dbarray(dbquery("SELECT user_name FROM " . DB_USERS . " WHERE user_id='" . $data['tour_w' . $z] . "'"));
echo $z . ". <a href='" . BASEDIR . "profile.php?lookup=" . $data['tour_w' . $z] . "'><strong>" . $ui['user_name'] . "</strong></a><br />";
}
}
}
echo "</td></tr>";
echo "<tr><td class='tbl2'>Status:</td><td class='tbl1'>" . showStatus($data['tour_id']) . "</td></tr>";
echo "<tr><td class='tbl2'>Game:</td><td class='tbl1'>" . $data['tour_game'] . "</td></tr>";
echo "<tr><td class='tbl2'>Players:<br /><i class='small'>(registered/confirmed/max)</i></td><td class='tbl1'>" . $r_ch . "/" . $r_tot . "/" . $data['tour_maxpl'] . "</td></tr>";
echo "<tr><td class='tbl2'>Registration ends:</td><td class='tbl1'>" . date("G:i j-n-Y", $data['tour_date']) . "</td></tr>";
echo "<tr><td class='tbl2'>Check-in start:</td><td class='tbl1'>" . date("G:i j-n-Y", $data['tour_date'] - 1800) . "</td></tr>";
$asd = time() + ($settings['timeoffset'] + $settings['serveroffset']) * 3600;
echo "<tr><td class='tbl2'>Current server time:<br /><i class='small'>(check your offset)</i></td><td class='tbl1'>" . date("G:i j-n-Y", $asd) . "</td></tr>";
if (checkrights("T")) {
echo "<tr><td class='tbl2' colspan='3'>Options: <a href='" . INFUSIONS . "al_tourney/admin/index.php" . $aidlink . "&p=newtour&a=edit&id=" . $data['tour_id'] . "''><img src='" . IMAGES . "edit.png' alt='edit tourney' /></a> <a href='" . INFUSIONS . "al_tourney/admin/index.php" . $aidlink . "&p=bracket&id=" . $data['tour_id'] . "''><img src='" . IMAGES . "arrow.png' alt='edit bracket' /></a> <a href='" . INFUSIONS . "al_tourney/admin/index.php" . $aidlink . "&p=newtour&a=delete&id=" . $data['tour_id'] . "''><img src='" . IMAGES . "no.png' alt='delete tourney' /></a></td></tr>";
}
if ($data['tour_grid'] == "1") {
echo "<tr><td class='tbl2' colspan='3' align='center'><a href='" . BASEDIR . "tourney.php?p=viewbracket&id=" . $data['tour_id'] . "'>Go to brackets</a></td></tr>";
}
echo "<tr><td class='tbl2' colspan='3'>Description:</td></tr>";
echo "<tr><td class='tbl1'>" . nl2br(parseubb($data['tour_desc'])) . "</td></tr>";
echo "</table>";
示例10: showStatus
<?php
$user_path = $record->getUser()->getURL();
?>
<?php
$judger_name = $record->getJudger()->getName();
?>
<?php
$submit_time = $record->getSubmitTime();
?>
<?php
$submit_time_text = $this->formatTime($submit_time);
?>
<?php
$status_text = showStatus($record->getInfo()->status, $record->getInfo()->result_text);
?>
<?php
$record_delete = $this->locator->getURL('admin_record_delete') . '/' . $record_id;
?>
<?php
$record_rejudge = $this->locator->getURL('admin_record_rejudge') . '/record_id/' . $record_id;
?>
<?php
$record_stopjudge = $this->locator->getURL('admin_record_stopjudge') . '/' . $record_id;
?>
<tr>
<td><?php
echo $record_id;
示例11: updateCacheHelper
function updateCacheHelper($recursive, $levelsLeft, $root, $showStatus, $readID3)
{
global $audio_types, $video_types, $ext_graphic, $default_art, $backend, $track_num_seperator, $hierarchy, $protocols;
if ($root !== false) {
$mediapath = $root;
} else {
$mediapath = $this->getFilePath();
}
if ($mediapath == "-") {
// let's find it..
$parent = $this->getParent();
$mediapath = $parent->getFilePath() . "/" . $this->getName();
}
$nodepath = $this->getPath("String");
/* Echo out our current status, if they want it: */
if ($showStatus === true) {
showStatus($mediapath);
} else {
if ($showStatus == "cli") {
echo word("Scanning: ") . $mediapath . "\n";
}
}
// First add $this.
// Was I already cached?
$cache = $this->readCache();
if ($cache[0] == "-") {
$cache[0] = $nodepath;
}
if ($cache[13] == "-") {
$cache[13] = $mediapath;
}
if ($cache[6] == "-") {
$cache[6] = jz_filemtime($mediapath);
}
if ($cache[15] == "-") {
$ptype = findPType($this);
$cache[15] = $ptype;
}
$blankfilecache = blankCache("track");
// Recurse and add $this's media files.
if (!($handle = opendir($mediapath))) {
die("Could not access directory {$mediapath}");
}
// scan for info while going through directory:
$trackcount = 0;
$new_nodes = $cache[7];
$new_tracks = $cache[8];
$bestImage = "";
$bestDescription = "";
while ($file = readdir($handle)) {
$childpath = $nodepath == "" ? $file : $nodepath . "/" . $file;
$fullchildpath = $mediapath . "/" . $file;
if ($file == "." || $file == "..") {
continue;
} else {
if (is_dir($fullchildpath)) {
if ($recursive) {
$next =& new jzMediaNode($childpath);
$next->updateCacheHelper(true, $levelsLeft, $fullchildpath, $showStatus, $readID3);
} else {
if ($levelsLeft === false && $this->getNaturalDepth() > 1) {
$next =& new jzMediaNode($childpath);
$next->updateCacheHelper(false, $this->getNaturalDepth() - 2, $fullchildpath, $showStatus, $readID3);
} else {
if ($levelsLeft > 0) {
$next =& new jzMediaNode($childpath);
$next->updateCacheHelper(false, $levelsLeft - 1, $fullchildpath, $showStatus, $readID3);
}
}
}
if ($new_nodes != array()) {
$key = array_search($file, $new_nodes);
if (false === $key) {
$new_nodes[] = $file;
$next =& new jzMediaNode($childpath);
}
} else {
$new_nodes[] = $file;
$next =& new jzMediaNode($childpath);
}
} else {
if (preg_match("/\\.(txt)\$/i", $file)) {
// TODO: GET THE CORRECT DESCRIPTION IN $bestDescription
// $bestDescription = $fullchildpath;
} else {
if (preg_match("/\\.({$ext_graphic})\$/i", $file) && !stristr($file, ".thumb.")) {
// An image
if (@preg_match("/({$default_art})/i", $file)) {
$bestImage = $fullchildpath;
} else {
if ($bestImage == "") {
$bestImage = $fullchildpath;
}
}
} else {
if (preg_match("/\\.({$audio_types})\$/i", $file) || preg_match("/\\.({$video_types})\$/i", $file)) {
//* * * A track * * * *//
// Add it to the track list.
if ($new_tracks != array()) {
$key = array_search($file, $new_tracks);
//.........这里部分代码省略.........
示例12: array
$messages = array();
$errors = array();
$runTestMethod = TRUE;
if ($EXECUTE) {
if (method_exists($class_name, 'execute')) {
$status = call_user_func_array(array($class_name, 'execute'), array(&$messages, &$errors));
$runTestMethod = FALSE;
} else {
echo "Test " . $test . " doesn't have an 'execute' option.\n";
}
}
if ($runTestMethod) {
$status = call_user_func_array(array($class_name, 'test'), array(&$messages, &$errors));
}
$name = call_user_func_array(array($class_name, 'getName'), array());
showStatus($name, $status, $messages, $errors, $VERBOSE, $COLOURS);
}
//end foreach
// All done, cleaning up
$GLOBALS['SQ_SYSTEM']->restoreCurrentUser();
$GLOBALS['SQ_SYSTEM']->restoreRunLevel();
// Show stats
if ($STATS) {
echo "Memory Usage: " . mem_check(NULL, TRUE) . "\n";
echo "Time taken: ";
speed_check('', FALSE, FALSE);
echo "seconds\n";
}
//end if
exit;
/**
示例13: die
<?php
if (!defined("IN_FUSION")) {
die("access denied");
}
$currents = dbquery("SELECT * FROM " . DB_T_TOURS . " WHERE tour_finished='0'");
opentable("Current tournies");
if (dbrows($currents)) {
echo "<table width='95%' class='center'><tr align='center'><td class='tbl2' width='1%'><strong>#</strong></td><td class='tbl2'><strong>Name</strong></td><td class='tbl2' width='1%'><strong>Status</strong></td><td class='tbl2' width='1%'></td></tr>";
while ($current = dbarray($currents)) {
echo "<tr align='center'><td class='tbl1'>" . $current['tour_id'] . "</td><td class='tbl1'>" . $current['tour_name'] . "</td><td class='tbl1'>" . showStatus($current['tour_id']) . "</td><td class='tbl1'><a href='" . BASEDIR . "tourney.php?p=viewtour&id=" . $current['tour_id'] . "'>View more</a></td></tr>";
}
echo "</table>";
} else {
echo "No opened tournies.";
}
closetable();
$finisheds = dbquery("SELECT tt.*, us.user_name FROM " . DB_T_TOURS . " tt LEFT JOIN " . DB_USERS . " us ON us.user_id=tt.tour_w1 WHERE tour_finished='1'");
opentable("Finished tournies");
if (dbrows($finisheds)) {
echo "<table width='95%' class='center'><tr align='center'><td class='tbl2' width='1%'><strong>#</strong></td><td class='tbl2'><strong>Name</strong></td><td class='tbl2' width='1%'><strong>Winner</strong></td><td class='tbl2' width='1%'></td></tr>";
while ($finished = dbarray($finisheds)) {
echo "<tr align='center'><td class='tbl1'>" . $finished['tour_id'] . "</td><td class='tbl1'>" . $finished['tour_name'] . "</td><td class='tbl1'><a href='" . BASEDIR . "profile.php?lookup=" . $finished['tour_w1'] . "'>" . $finished['user_name'] . "</a></td><td class='tbl1'><a href='" . BASEDIR . "tourney.php?p=viewtour&id=" . $finished['tour_id'] . "'>View more</a></td></tr>";
}
echo "</table>";
} else {
echo "No closed tournies.";
}
closetable();
示例14: showStatus
<td class="key"><?php
echo JText::_('JoomSEF plugin');
?>
</td>
<td><?php
showStatus('plugin');
?>
</td>
</tr>
<tr>
<td class="key"><?php
echo JText::_('Creation of new URLs');
?>
</td>
<td><?php
showStatus('newurls');
?>
</td>
</tr>
</table>
<?php
echo $pane->endPanel();
echo $pane->endPane();
?>
<?php
$sefConfig =& SEFConfig::getConfig();
if ($sefConfig->artioFeedDisplay) {
echo $pane->startPane('feed-pane');
echo $pane->startPanel(JText::_('ARTIO Newsfeed'), 'feed-panel');
示例15: SERVICE_IMPORTMEDIA_filesystem
//.........这里部分代码省略.........
continue;
}
$fullpath = $folder . '/' . $file;
if (is_dir($fullpath)) {
$entry = $be->lookupFile($fullpath);
if ($entry === false || isset($flags['recursive']) && $flags['recursive']) {
$flags2 = $flags;
if (sizeof($flags2['hierarchy']) == 0) {
$val = 'disk';
} else {
$val = array_shift($flags2['hierarchy']);
if ($val == 'track') {
$val = "disk";
}
}
$flags2['path'][$val] = $file;
$flags2['recursive'] = true;
$importerLevel++;
SERVICE_IMPORTMEDIA_filesystem($node, $fullpath, $flags2);
$importerLevel--;
}
} else {
if (preg_match("/\\.({$ext_graphic})\$/i", $file) && !stristr($file, ".thumb.")) {
// An image
if (@preg_match("/({$default_art})/i", $file)) {
$bestImage = $fullpath;
} else {
if ($bestImage == "") {
$bestImage = $fullpath;
}
}
} else {
if (preg_match("/\\.({$playlist_types})\$/i", $file)) {
$ext = substr($file, strrpos($file, '.') + 1);
if (0 == strcasecmp($ext, 'm3u')) {
$m3u_lines = file($fullpath);
$is_local_m3u = false;
foreach ($m3u_lines as $line) {
if ($line == '#') {
// TODO: get metadata.
continue;
} else {
if (false === strpos($line, '://')) {
$is_local_m3u = true;
break;
}
$mediaref = $line;
$medianame = $mediaref;
while ($medianame[strlen($medianame) - 1] == '/') {
$medianame = substr($medianame, 0, strlen($medianame) - 1);
}
$medianame = substr($medianame, strrpos($medianame, '/') + 1);
$mypath = $flags['path'];
$mypath['track'] = $medianame;
$track_paths[] = $mypath;
$track_filenames[] = $mediaref;
$track_metas[] = array();
}
}
}
} else {
if (preg_match("/\\.({$audio_types})\$/i", $file) || preg_match("/\\.({$video_types})\$/i", $file)) {
$entry = $be->lookupFile($fullpath);
if (isset($flags['showstatus']) && !(is_string($flags['showstatus']) && $flags['showstatus'] == "cli")) {
if ($_SESSION['jz_import_full_progress'] % 50 == 0 or $_SESSION['jz_import_full_progress'] == 0 or $_SESSION['jz_import_full_progress'] == 1) {
showStatus();
}
$_SESSION['jz_import_full_progress']++;
}
if (isset($flags['force']) && $flags['force'] || !is_array($entry)) {
$mypath = $flags['path'];
$mypath['track'] = $file;
if (isset($flags['readtags']) && $flags['readtags']) {
$track =& new jzMediaTrack($fullpath);
$track->playpath = $fullpath;
$meta = $track->getMeta("file");
} else {
$meta = false;
}
$track_paths[] = $mypath;
$track_filenames[] = $fullpath;
$track_metas[] = $meta;
}
}
}
}
}
}
$node->bulkInject($track_paths, $track_filenames, $track_metas);
if ($bestImage != "") {
$parent->addMainArt($bestImage);
}
$be->registerFile($folder, $thisPath);
if ($parent->getFilePath() != $folder) {
$parent->setFilePath($folder);
}
if ($importerLevel == 0) {
$be->removeDeadFiles($folder, $flags['recursive']);
}
}