本文整理汇总了PHP中SiteHelpers::getSex方法的典型用法代码示例。如果您正苦于以下问题:PHP SiteHelpers::getSex方法的具体用法?PHP SiteHelpers::getSex怎么用?PHP SiteHelpers::getSex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SiteHelpers
的用法示例。
在下文中一共展示了SiteHelpers::getSex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postDownloads
function postDownloads()
{
if ($this->access['is_excel'] == 0) {
return Redirect::to('')->with('message', SiteHelpers::alert('error', Lang::get('core.note_restric')));
}
$sort = !is_null(Input::get('sort')) ? Input::get('sort') : 'OrderID';
$order = !is_null(Input::get('order')) ? Input::get('order') : 'desc';
$data = DB::table('orders');
if ($_POST['OrderID'] != '') {
$data->where('OrderID', "LIKE", "%" . $_POST['OrderID'] . "%");
}
if ($_POST['name'] != '') {
$data->where('name', "LIKE", "%" . $_POST['name'] . "%");
}
if ($_POST['email'] != '') {
$data->where('email', "LIKE", "%" . $_POST['email'] . "%");
}
if ($_POST['phone'] != '') {
$data->where('phone', "LIKE", "%" . $_POST['phone'] . "%");
}
if ($_POST['address'] != '') {
$data->where('address', "=", $_POST['address']);
}
if ($_POST['status'] != '') {
$data->where('status', "LIKE", "%" . $_POST['status'] . "%");
}
if ($_POST['provinceid'] != '') {
$data->where('provinceid', "=", $_POST['provinceid']);
}
$data = $data->get();
$content = $this->data['pageTitle'];
$content .= '<table border="1">';
$content .= '<tr>';
$content .= '<th style="background:#f9f9f9;">' . Lang::get('core.table_id') . '</th>';
$content .= '<th style="background:#f9f9f9;">' . Lang::get('core.table_name') . '</th>';
$content .= '<th style="background:#f9f9f9;">' . Lang::get('core.table_phone') . '</th>';
$content .= '<th style="background:#f9f9f9;">' . Lang::get('core.table_email') . '</th>';
$content .= '<th style="background:#f9f9f9;">' . Lang::get('core.sex') . '</th>';
$content .= '<th style="background:#f9f9f9;">' . Lang::get('core.table_city') . '</th>';
$content .= '<th style="background:#f9f9f9;">' . Lang::get('core.table_district') . '</th>';
$content .= '<th style="background:#f9f9f9;">' . Lang::get('core.table_ward') . '</th>';
$content .= '<th style="background:#f9f9f9;">' . Lang::get('core.table_date') . '</th>';
$content .= '</tr>';
foreach ($data as $item) {
$content .= '<tr>';
$content .= '<td>' . $item->OrderID . '</td>';
$content .= '<td>' . $item->name . '</td>';
$content .= '<td>' . $item->phone . '</td>';
$content .= '<td>' . $item->email . '</td>';
$content .= '<td>' . SiteHelpers::getSex($item->sex) . '</td>';
$content .= '<td>' . SiteHelpers::getNameaddress($item->provinceid, 'province', "provinceid") . '</td>';
$content .= '<td>' . SiteHelpers::getNameaddress($item->districtid, 'district', "districtid") . '</td>';
$content .= '<td>' . SiteHelpers::getNameaddress($item->wardid, 'ward', "wardid") . '</td>';
$content .= '<td>' . $item->OrderDate . '</td>';
$content .= '</tr>';
}
$content .= '</table>';
@header('Content-Type: application/ms-excel');
@header('Content-Length: ' . strlen($content));
@header('Content-disposition: inline; filename="' . $title . ' ' . date("d/m/Y") . '.xls"');
echo $content;
exit;
}