本文整理汇总了PHP中wbRequest类的典型用法代码示例。如果您正苦于以下问题:PHP wbRequest类的具体用法?PHP wbRequest怎么用?PHP wbRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了wbRequest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
public static function main()
{
if (!wbUser::isLoggedIn()) {
$redirecturl = wbModule::url('bds', 'bds', 'main');
wbResponse::Redirect(wbModule::url('base', 'base', 'loginform', array('redirecturl' => urlencode($redirecturl))));
}
$loadjsmod = wbRequest::getVarClean('loadjsmod', 'str', '');
wbPage::setPage('jspage');
$userInfo = wbUser::getSession();
$role = '';
if (isset($userInfo['roles'][0]['role_name'])) {
$role = strtolower($userInfo['roles'][0]['role_name']);
}
$script = <<<HEREDOC
Webi.ROUTE_URL = "ws.php?type=json&module=bds";
var _UNAME = "{$userInfo['user_name']}";
var _RNAME = "{$userInfo['user_realname']}";
var _GNAME = "{$role}";
HEREDOC;
wbPage::addScriptCode($script);
wbPage::addScript('modules/bds/views/script/properties.js');
wbPage::addScript('modules/bds/views/script/GridPanel.js');
wbPage::addScript('modules/bds/views/script/FormPanel.js');
wbPage::addScript('modules/bds/views/script/ModulePanel.js');
wbPage::addScript('modules/base/views/script/roles-jsloader.php');
wbPage::addScript('modules/bds/views/script/jsloader.php');
return array('loadjsmod' => $loadjsmod);
}
示例2: ganti_password
public static function ganti_password($args = array())
{
// Security check
//if (!wbSecurity::check('t_vat_settlement')) return;
// Get arguments from argument array
extract($args);
$email = wbRequest::getVarClean('email', 'str', '');
$npwpd = wbRequest::getVarClean('npwpd', 'str', '');
$user_name = wbRequest::getVarClean('user_name', 'str', '');
$question = wbRequest::getVarClean('question', 'str', '');
$answer = wbRequest::getVarClean('answer', 'str', '');
$data = array('items' => array(), 'total' => 0, 'success' => false, 'message' => '');
try {
$table =& wbModule::getModel('bds', 't_vat_settlement');
$query = "select dbms_random.string('x',10) AS new_password";
$new_password = $table->dbconn->GetOne($query);
$query = "update p_app_user set user_pwd = md5('" . $new_password . "') where app_user_name = '" . $user_name . "'";
$table->dbconn->Execute($query);
$query = "update t_customer_user set user_pwd = md5('" . $new_password . "') where user_name = '" . $user_name . "'";
$table->dbconn->Execute($query);
$data['items'] = '';
$data['total'] = '';
$data['success'] = true;
$data['message'] = $new_password;
} catch (Exception $e) {
$data['message'] = $e->getMessage();
}
return $data;
}
示例3: wbMain
function wbMain()
{
wbCore::init();
list($module, $class, $method) = wbRequest::getController();
// theme override
$theme = wbRequest::getVarClean('theme');
if (!empty($theme)) {
wbPage::setTheme($theme);
}
$page = wbRequest::getVarClean('page');
if (!empty($page)) {
wbPage::setPage($page);
}
ob_start();
$modView = wbModule::getView($module, $class, $method);
if (ob_get_length() > 0) {
$rawOutput = ob_get_contents();
$modView = 'The following lines were printed in raw mode by module, however this
should not happen. The module is probably directly calling functions
like echo, print, or printf. Please modify the module to exclude direct output.
The module is violating Webi architecture principles.<br /><br />' . $rawOutput . '<br /><br />This is the real module output:<br /><br />' . $modView;
}
ob_end_clean();
wbPage::render($modView);
}
示例4: angin
public static function angin()
{
$sort = wbRequest::getVarClean('sort', 'str', 't_cuaca_id');
$dir = wbRequest::getVarClean('dir', 'str', 'DESC');
$query = wbRequest::getVarClean('query', 'str', '');
$tahun = wbRequest::getVarClean('tahun', 'int', 0);
$jenis = wbRequest::getVarClean('jenis', 'int', 0);
try {
$table =& wbModule::getModel('bds', 't_cuaca');
//Set default criteria. You can override this if you want
foreach ($table->fields as $key => $field) {
if (!empty(${$key})) {
// <-- Perhatikan simbol $$
if ($field['type'] == 'str') {
$table->setCriteria($table->getAlias() . $key . $table->likeOperator . '?', array(${$key}));
} else {
$table->setCriteria($table->getAlias() . $key . ' = ?', array(${$key}));
}
}
}
$query = $table->getDisplayFieldCriteria($query);
if (!empty($query)) {
$table->setCriteria($query);
}
$items = $table->getAll(0, -1, $sort, $dir);
} catch (Exception $e) {
$data['message'] = $e->getMessage();
}
$data = array('items' => array(), 'total' => 0, 'success' => false, 'message' => '');
$data['items'] = $items;
$data['success'] = true;
return $data;
}
示例5: show
public static function show()
{
$type_id = wbRequest::getVarClean('type_id', 'int', 0);
$tahun = wbRequest::getVarClean('tahun', 'str', '');
//timestamp
$t = wbRequest::getVarClean('t', 'str', '');
if (empty($type_id) or empty($tahun)) {
exit;
}
try {
$ws_client = self::getNusoap();
$params = array('search' => '', 'getParams' => json_encode($_GET), 'controller' => json_encode(array('module' => 'bds', 'class' => 'statistik_pertanian', 'method' => 'show', 'type' => '')), 'postParams' => json_encode($_POST), 'jsonItems' => '', 'start' => $start, 'limit' => $limit);
$ws_data = self::getResultData($ws_client, $params);
$data['items'] = $ws_data['data'];
$data['total'] = $ws_data['total'];
$data['message'] = $ws_data['message'];
$data['success'] = $ws_data['success'];
} catch (Exception $e) {
$data['message'] = $e->getMessage();
}
$items = $data['items']['items'];
$itemParameter = $data['items']['itemParameter'];
$print = wbRequest::getVarClean('print', 'int', 0);
if (!empty($print)) {
wbUtil::startExcel('rumah_sakit.xls');
}
echo '<div class="body-wrap">';
echo '<div style="float:left;margin:5 5 0 5;">';
echo '<div><h3>PRODUKSI PERTANIAN ' . $itemParameter['param_name'] . ' - TAHUN ' . $tahun . '</h3></div>';
if (!empty($print)) {
echo '<table border="1" width ="100%">';
} else {
echo '<table border="0" class="table-data" width ="100%">';
}
echo '<tr>
<th width="15">No</th>
<th width="200">Jenis Komoditas</th>
<th width="160">Luas Tanaman(Ha)</th>
<th width="160">Luas Panen(Ha) </th>
<th width="160">Produktivitas(Ku/Ha)</th>
<th width="160">Produksi(Ton)</th>
</tr>';
$i = 1;
foreach ($items as $item) {
$params = array('controller' => json_encode(array('module' => 'bds', 'class' => 'statistik_pertanian', 'method' => 'getProduksiKomoditas', 'type' => '')), 'jsonItems' => json_encode(array('tahun' => $tahun, 'd_agr_komiditas_id' => $item['d_agr_komiditas_id'])));
$ws_data = self::getResultData($ws_client, $params);
$itemProduksi = $ws_data['data'];
//if (empty($itemProduksi))continue;
echo '<tr>';
echo '<td>' . $i++ . '</td>';
echo '<td>' . $item['komoditas_name'] . '</td>';
echo '<td align="right">' . wbUtil::numberFormat($itemProduksi['luas_tanam'], 0) . '</td>';
echo '<td align="right">' . wbUtil::numberFormat($itemProduksi['luas_panen'], 0) . '</td>';
echo '<td align="right">' . wbUtil::numberFormat($itemProduksi['productivity'], 0) . '</td>';
echo '<td align="right">' . wbUtil::numberFormat($itemProduksi['produksi'], 0) . '</td>';
echo '</tr>';
}
echo '</table>';
exit;
}
示例6: tampil
public static function tampil()
{
try {
$ws_client = self::getNusoap();
$params = array('search' => '', 'getParams' => json_encode($_GET), 'controller' => json_encode(array('module' => 'bds', 'class' => 'statistik_pbb', 'method' => 'tampil', 'type' => '')), 'postParams' => json_encode($_POST), 'jsonItems' => '', 'start' => $start, 'limit' => $limit);
$ws_data = self::getResultData($ws_client, $params);
$data['items'] = $ws_data['data'];
$data['total'] = $ws_data['total'];
$data['message'] = $ws_data['message'];
$data['success'] = $ws_data['success'];
} catch (Exception $e) {
$data['message'] = $e->getMessage();
}
$items = $data['items'];
$tahun = wbRequest::getVarClean('tahun', 'int', 0);
$print = wbRequest::getVarClean('print', 'int', 0);
if (!empty($print)) {
wbUtil::startExcel('pbb.xls');
}
echo '<div class="body-wrap">';
echo '<div align="center"><h3>DAFTAR JUMLAH SPPT DAN POKOK KETETAPAN PBB MENURUT KECAMATAN DI KOTA BANDUNG TAHUN ' . $tahun . '</h3></div><br>';
if (!empty($print)) {
echo '<table border="1" width ="100%">';
} else {
echo '<table border="0" width ="100%">';
}
$output = "<tr>";
$output .= "<th rowspan=2 style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>NO</th>";
$output .= "<th rowspan=2 style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>Kecamatan</br><div style='font-style: italic;'>District</div></th>";
$output .= "<th colspan=2 style='text-align:center;background-color: rgb(224, 224, 224);border-top: 1px solid black;'>" . $tahun . "</br></th>";
$output .= "</tr>";
$output .= "<tr>";
$output .= "<th style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>PBB</br>(buah)</th>";
$output .= "<th style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>PBB Terhutang</th>";
$output .= "</tr>";
$title = "";
$no = 1;
$t_buah = 0;
$t_terhutang = 0;
foreach ($items as $item) {
$output .= "<tr>";
$output .= "<td width=50 align=center>" . $no . "</td>";
$output .= "<td>" . $item['wilayah_nama'] . "</td>";
$output .= "<td align='center'>" . number_format($item['sppt_pbb_buah'], 0, ',', '.') . "</td>";
$output .= "<td align='center'>" . number_format($item['sppt_pbb_terhutang'], 0, ',', '.') . "</td>";
$output .= "</tr>";
$t_buah += $item['sppt_pbb_buah'];
$t_terhutang += $item['sppt_pbb_terhutang'];
$no++;
}
$output .= "<tr>";
$output .= "<th colspan=2 style='text-align:center;border-bottom: 1px solid black;border-top: 1px solid black;'>Kota Bandung</br><div style='font-style: italic;'>Bandung City</div></th>";
$output .= "<th style='text-align:center;border-bottom: 1px solid black;border-top: 1px solid black;'>" . number_format($t_buah, 0, ',', '.') . "</th>";
$output .= "<th style='text-align:center;border-bottom: 1px solid black;border-top: 1px solid black;'>" . number_format($t_terhutang, 0, ',', '.') . "</th>";
$output .= "</tr>";
$output .= "</table>";
echo $output;
exit;
}
示例7: show
public static function show()
{
try {
$ws_client = self::getNusoap();
$params = array('search' => '', 'getParams' => json_encode($_GET), 'controller' => json_encode(array('module' => 'bds', 'class' => 'statistik_rute_angkutan', 'method' => 'show', 'type' => '')), 'postParams' => json_encode($_POST), 'jsonItems' => '', 'start' => $start, 'limit' => $limit);
$ws_data = self::getResultData($ws_client, $params);
$data['items'] = $ws_data['data'];
$data['total'] = $ws_data['total'];
$data['message'] = $ws_data['message'];
$data['success'] = $ws_data['success'];
} catch (Exception $e) {
$data['message'] = $e->getMessage();
}
$itemsTrayek = $data['items'];
//timestamp
$tahun = wbRequest::getVarClean('tahun', 'int', '');
$print = wbRequest::getVarClean('print', 'int', 0);
if (!empty($print)) {
wbUtil::startExcel('rute_angkutan.xls');
}
echo '<div class="body-wrap">';
echo '<div align="center"><h3>JUMLAH ARMADA ANGKUTAN KOTA DI KOTA BANDUNG TAHUN ' . $tahun . '</h3></div><br/>';
if (!empty($print)) {
echo '<table border="1" width ="90%">';
} else {
echo '<table border="0" class="table-data" width ="90%">';
}
echo '<tr>';
echo '<th>No</th>';
echo '<th>Kode Trayek</th>';
echo '<th>Lintasan Trayek(Route)</th>';
echo '<th>Jarak(Km)</th>';
echo '<th>Jumlah Armada</th>';
echo '<th>Jumlah Angkot</th>';
echo '</tr>';
$no = 1;
foreach ($itemsTrayek as $item) {
$params = array('controller' => json_encode(array('module' => 'bds', 'class' => 'statistik_rute_angkutan', 'method' => 'getItem', 'type' => '')), 'jsonItems' => json_encode(array('tahun' => $tahun, 'trayek_id' => $item['trayek_id'])));
$ws_data = self::getResultData($ws_client, $params);
$itemArmada = $ws_data['data'];
if (empty($itemArmada)) {
continue;
}
echo '<tr>';
echo '<td align=center>' . $no++ . '</td>';
echo '<td>' . $item['trayek_code'] . '</td>';
echo '<td>' . $item['trayek_name'] . '</td>';
echo '<td>' . $item['trayek_panjang'] . '</td>';
echo '<td align="right">' . wbUtil::numberFormat($itemArmada['armada_jml'], 0) . '</td>';
echo '<td align="right">' . wbUtil::numberFormat($itemArmada['armada_jml_angkot'], 0) . '</td>';
echo '</tr>';
}
echo '</table>';
echo '</div>';
echo '</div>';
exit;
}
示例8: show
public static function show()
{
try {
$ws_client = self::getNusoap();
$params = array('search' => '', 'getParams' => json_encode($_GET), 'controller' => json_encode(array('module' => 'bds', 'class' => 'dashboard_puskesmas', 'method' => 'show', 'type' => '')), 'postParams' => json_encode($_POST), 'jsonItems' => '', 'start' => $start, 'limit' => $limit);
$ws_data = self::getResultData($ws_client, $params);
$data['items'] = $ws_data['data'];
$data['total'] = $ws_data['total'];
$data['message'] = $ws_data['message'];
$data['success'] = $ws_data['success'];
} catch (Exception $e) {
$data['message'] = $e->getMessage();
}
$itemsWilayah = $data['items'];
$print = wbRequest::getVarClean('print', 'int', 0);
if (!empty($print)) {
wbUtil::startExcel('puskesmas.xls');
}
echo '<div class="body-wrap">';
echo '<div style="float:left;margin:5 5 0 5;">';
echo '<div><h3>JUMLAH PUSKESMAS BERDASARKAN KECAMATAN</h3></div>';
if (!empty($print)) {
echo '<table border="1" width ="100%">';
} else {
echo '<table border="0" width ="100%">';
}
echo '<tr>
<th width="30">No</th>
<th width="200">Kode Wilayah</th>
<th width="200">Kecamatan</th>
<th width="100">Jumlah</th>
</tr>';
$i = 1;
$total = 0;
$jumlahPuskesmas = 0;
foreach ($itemsWilayah as $item) {
$params = array('controller' => json_encode(array('module' => 'bds', 'class' => 'dashboard_puskesmas', 'method' => 'getJumlahPerKecamatan', 'type' => '')), 'jsonItems' => json_encode(array('wilayah_id' => $item['wilayah_id'])));
$ws_data = self::getResultData($ws_client, $params);
$jumlahPuskesmas = $ws_data['data'];
$total += $jumlahPuskesmas;
echo '<tr>';
echo '<td>' . $i++ . '</td>';
echo '<td>' . $item['wilayah_kode'] . '</td>';
echo '<td>' . $item['wilayah_nama'] . '</td>';
echo '<td align="right">' . wbUtil::numberFormat($jumlahPuskesmas, 0) . '</td>';
echo '</tr>';
}
echo '<tr>';
echo '<td colspan="3" align="center"> <b>TOTAL PUSKESMAS</b> </td>';
echo '<td align="right"> <b>' . wbUtil::numberFormat($total, 0) . '</b> </td>';
echo '</tr>';
echo '</table>';
echo '</div>';
echo '</div>';
exit;
}
示例9: tampil
public static function tampil()
{
try {
$ws_client = self::getNusoap();
$params = array('search' => '', 'getParams' => json_encode($_GET), 'controller' => json_encode(array('module' => 'bds', 'class' => 'statistik_pajak_daerah', 'method' => 'tampil', 'type' => '')), 'postParams' => json_encode($_POST), 'jsonItems' => '', 'start' => $start, 'limit' => $limit);
$ws_data = self::getResultData($ws_client, $params);
$data['items'] = $ws_data['data'];
$data['total'] = $ws_data['total'];
$data['message'] = $ws_data['message'];
$data['success'] = $ws_data['success'];
} catch (Exception $e) {
$data['message'] = $e->getMessage();
}
$items = $data['items'];
$tahun = wbRequest::getVarClean('tahun', 'int', 0);
$print = wbRequest::getVarClean('print', 'int', 0);
if (!empty($print)) {
wbUtil::startExcel('pajak_daerah.xls');
}
echo '<div class="body-wrap">';
echo '<div align="center"><h3>JUMLAH PENERIMAAN PAJAK DAERAH MENURUT JENIS PAJAK DAN PERSENTASE TARGET YANG DICAPAI KOTA BANDUNG </br>TAHUN ANGGARAN ' . $tahun . '</h3></div><br>';
if (!empty($print)) {
echo '<table border="1" width ="100%">';
} else {
echo '<table border="0" width ="100%">';
}
$output = "<tr>";
$output .= "<th style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>NO</th>";
$output .= "<th style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>JENIS PENERIMAAN</br><div style='font-style: italic;'>TYPE OF RECEIPTS</div></th>";
$output .= "<th style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>TARGET</br><div style='font-style: italic;'>TARGET</div>(Rp 000) </th>";
$output .= "<th style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>REALISASI</br><div style='font-style: italic;'>REALISATION</div>(Rp 000) </th>";
$output .= "<th style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>PERSENTASE</br><div style='font-style: italic;'>PERCENTAGE</div>(%)</th>";
$output .= "</tr>";
$title = "";
$no = 1;
$t_persen = 0;
$t_real = 0;
$t_target = 0;
foreach ($items as $item) {
$output .= "<tr>";
$output .= "<td width=50 align=center>" . $no . "</td>";
$output .= "<td>" . $item['param_name'] . "</td>";
$output .= "<td align='center'>" . number_format($item['pjk_daerah_target'], 0, ',', '.') . "</td>";
$output .= "<td align='center'>" . number_format($item['pjk_daerah_realisasi'], 0, ',', '.') . "</td>";
$jumlah = !empty($item['pjk_daerah_target']) ? $item['pjk_daerah_realisasi'] / $item['pjk_daerah_target'] * 100 : 0;
$output .= "<td align='center'>" . number_format($jumlah, 2, ',', '.') . "</td>";
$output .= "</tr>";
$t_persen += $jumlah;
$t_real += $item['pjk_daerah_realisasi'];
$t_target += $item['pjk_daerah_target'];
$no++;
}
$output .= "</table>";
echo $output;
exit;
}
示例10: tampil
public static function tampil()
{
$tahun = wbRequest::getVarClean('tahun', 'int', 0);
$wilayah =& wbModule::getModel('bds', 'p_parameter');
$items = $wilayah->pbb_sppt($tahun);
$data = array('items' => array(), 'total' => 0, 'success' => false, 'message' => '');
$data['items'] = $items;
$data['success'] = true;
return $data;
}
示例11: getItem
public static function getItem()
{
$jsonItems = wbRequest::getVarClean('jsonItems', 'str', '');
$item = wbUtil::jsonDecode($jsonItems);
$tTernak =& wbModule::getModel('bds', 't_ternak');
$itemTernak = $tTernak->getItem($item['tahun'], $item['param_id']);
$data = array('items' => array(), 'total' => 0, 'success' => true, 'message' => '');
$data['items'] = $itemTernak;
return $data;
}
示例12: getJumlahPerKecamatan
public static function getJumlahPerKecamatan()
{
$jsonItems = wbRequest::getVarClean('jsonItems', 'str', '');
$item = wbUtil::jsonDecode($jsonItems);
$tPuskesmas =& wbModule::getModel('bds', 'd_puskesmas');
$jumlah = $tPuskesmas->getJumlahPerKecamatan($item['wilayah_id']);
$data = array('items' => array(), 'total' => 0, 'success' => true, 'message' => '');
$data['items'] = $jumlah;
return $data;
}
示例13: getItem
public static function getItem()
{
$jsonItems = wbRequest::getVarClean('jsonItems', 'str', '');
$item = wbUtil::jsonDecode($jsonItems);
$tArmada =& wbModule::getModel('bds', 't_armada');
$itemArmada = $tArmada->getItem($item['tahun'], $item['trayek_id']);
$data = array('items' => array(), 'total' => 0, 'success' => true, 'message' => '');
$data['items'] = $itemArmada;
return $data;
}
示例14: getJumlahPerJenis
public static function getJumlahPerJenis()
{
$jsonItems = wbRequest::getVarClean('jsonItems', 'str', '');
$item = wbUtil::jsonDecode($jsonItems);
$tRumahSakit =& wbModule::getModel('bds', 'd_rumahsakit');
$jumlah = $tRumahSakit->getJumlahPerJenis($item['param_id']);
$data = array('items' => array(), 'total' => 0, 'success' => true, 'message' => '');
$data['items'] = $jumlah;
return $data;
}
示例15: tampil
public static function tampil()
{
$tahun = wbRequest::getVarClean('tahun', 'int', 0);
$daerah =& wbModule::getModel('bds', 'd_pasar');
$items = $daerah->rekapPasar($tahun);
$data = array('items' => array(), 'total' => 0, 'success' => false, 'message' => '');
$data['items'] = $items;
$data['success'] = true;
return $data;
}