本文整理汇总了PHP中simple_queryall函数的典型用法代码示例。如果您正苦于以下问题:PHP simple_queryall函数的具体用法?PHP simple_queryall怎么用?PHP simple_queryall使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了simple_queryall函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadTickets
protected function loadTickets($login)
{
$login = mysql_real_escape_string($login);
$query = "SELECT `id`,`date`,`status`,`text` from `ticketing` WHERE `to` IS NULL AND `replyid` IS NULL AND `from`='" . $login . "' ORDER BY `date` DESC";
$result = simple_queryall($query);
return $result;
}
示例2: zb_StorageFindKeys
/**
* Returns array of keys in ubstorage if they contains search pattern
*
* @param string $keypattern
* @return array
*/
function zb_StorageFindKeys($keypattern)
{
$keypattern = mysql_real_escape_string($keypattern);
$query = "SELECT `key` from `ubstorage` WHERE `key` LIKE '%" . $keypattern . "%'";
$result = simple_queryall($query);
return $result;
}
示例3: web_MessagesShowPrevious
function web_MessagesShowPrevious($login)
{
$login = mysql_real_escape_string($login);
$query = "SELECT * from `ticketing` WHERE `to`='" . $login . "' AND `from`='NULL' AND `status`='1' ORDER BY `date` DESC";
$allmessages = simple_queryall($query);
$result = '<table width="100%" class="sortable">';
$result .= '
<tr class="row1">
<td>' . __('Date') . '</td>
<td>' . __('Text') . '</td>
</tr>
';
if (!empty($allmessages)) {
foreach ($allmessages as $io => $eachmessage) {
$result .= '
<tr class="row3">
<td>' . $eachmessage['date'] . '</td>
<td>' . $eachmessage['text'] . '</td>
</tr>
';
}
}
$result .= '</table>';
show_window(__('Previous messages'), $result);
}
示例4: renderList
/**
* Returns available time rules grid
*
* @return string
*/
public function renderList()
{
$messages = new UbillingMessageHelper();
$allTariffs = zb_TariffGetPricesAll();
$query = "SELECT * from `dshape_time` ORDER BY `id` ASC";
$allrules = simple_queryall($query);
$cells = wf_TableCell(__('ID'));
$cells .= wf_TableCell(__('Tariff'));
$cells .= wf_TableCell(__('Time from'));
$cells .= wf_TableCell(__('Time to'));
$cells .= wf_TableCell(__('Speed'));
$cells .= wf_TableCell(__('Actions'));
$rows = wf_TableRow($cells, 'row1');
if (!empty($allrules)) {
foreach ($allrules as $io => $eachrule) {
$rowClass = isset($allTariffs[$eachrule['tariff']]) ? 'row3' : 'sigdeleteduser';
$tariffControl = cfr('TARIFFSPEED') ? wf_Link('?module=tariffspeeds&tariff=' . $eachrule['tariff'], $eachrule['tariff'], false) : $eachrule['tariff'];
$cells = wf_TableCell($eachrule['id']);
$cells .= wf_TableCell($tariffControl);
$cells .= wf_TableCell($eachrule['threshold1']);
$cells .= wf_TableCell($eachrule['threshold2']);
$cells .= wf_TableCell($eachrule['speed']);
$actions = wf_JSAlert('?module=dshaper&delete=' . $eachrule['id'], web_delete_icon(), $messages->getDeleteAlert());
$actions .= wf_JSAlert('?module=dshaper&edit=' . $eachrule['id'], web_edit_icon(), $messages->getEditAlert());
$cells .= wf_TableCell($actions);
$rows .= wf_TableRow($cells, $rowClass);
}
}
$result = wf_TableBody($rows, '100%', '0', 'sortable');
return $result;
}
示例5: zbs_AnnouncementsShow
function zbs_AnnouncementsShow()
{
$query = "SELECT * from `zbsannouncements` WHERE `public`='1' ORDER by `id` DESC";
$all = simple_queryall($query);
$result = '';
if (!empty($all)) {
foreach ($all as $io => $each) {
if (!isset($_COOKIE['zbsanread_' . $each['id']])) {
$readControl = la_Link('?module=announcements&anmarkasread=' . $each['id'], la_img('iconz/anunread.gif', __('Mark as read'))) . ' ';
} else {
$readControl = la_Link('?module=announcements&anmarkasunread=' . $each['id'], la_img('iconz/anread.gif', __('Mark as unread'))) . ' ';
}
$result .= la_tag('h3', false, 'row1', '') . $readControl . $each['title'] . ' ' . la_tag('h3', true);
$result .= la_delimiter();
if ($each['type'] == 'text') {
$eachtext = strip_tags($each['text']);
$result .= nl2br($eachtext);
}
if ($each['type'] == 'html') {
$result .= $each['text'];
}
$result .= la_delimiter();
}
} else {
show_window(__('Sorry'), __('There are not any announcements.'));
}
show_window('', $result);
}
示例6: paymaster_form
function paymaster_form($customer_id, $debug, $method, $action_url, $merchant_id, $lang, $good_url, $bad_url, $merchant_currency, $db, $tariff)
{
$tariff_cost = '';
$form_tariffs = '';
$form = '<p> <form action="' . $action_url . '" method="' . $method . '">';
$arr = simple_queryall("SELECT name,Fee FROM tariffs ORDER BY Fee");
if ($arr) {
foreach ($arr as $k => $v) {
if ($tariff == $v['name']) {
$tariff_cost = $v['Fee'];
}
//не забываем что суммы в копейках
$form_tariffs .= "<input type='radio' name='amount' value='{$v['Fee']}'><span id='tariff_{$v['Fee']}'>{$v['Fee']} {$merchant_currency} ({$v['name']})</span><br>";
}
}
/* else {
$form.='<input type="text" name="LMI_PAYMENT_AMOUNT"> '.$merchant_currency;
} */
$form .= "<input type='radio' name='amount' value='0' CHECKED><input type='number' name='amount_val' min='1' max='3000' value='{$tariff_cost}'> {$merchant_currency}<br>";
$form .= $form_tariffs;
//передаем прочие нужные параметры
$form .= '<input type="hidden" name="LMI_PAYMENT_NO" value="' . $customer_id . '">';
$form .= '<input type="hidden" name="LMI_PAYMENT_AMOUNT" value="' . $tariff_cost . '">';
// $form.='<input type="hidden" name="good" value="'.$good_url.'">';
// $form.='<input type="hidden" name="bad" value="'.$bad_url.'">';
$form .= '<input type="hidden" name="LMI_PAYMENT_DESC">';
$form .= '<input type="hidden" name="LMI_MERCHANT_ID" value="' . $merchant_id . '">';
if ($debug) {
$form .= '<input type="hidden" name="LMI_PAYMENT_SYSTEM" value="18">';
}
$form .= '<br> <input type="submit" value="Оплатить">';
$form .= '</form> </p>';
return $form;
}
示例7: zbs_TicketGetReplies
/**
* Returns array of all replies available for ticket
*
* @param int $ticketid
* @return array
*/
function zbs_TicketGetReplies($ticketid)
{
$ticketid = vf($ticketid, 3);
$query = "SELECT * from `ticketing` WHERE `replyid`='" . $ticketid . "' ORDER by `id` ASC";
$result = simple_queryall($query);
return $result;
}
示例8: loadForeverCredits
protected function loadForeverCredits()
{
$query = "SELECT `login`,`Tariff`,`Cash`,`Credit`,`CreditExpire` from `users` WHERE `CreditExpire`='0' AND `Credit`!='0'";
$all = simple_queryall($query);
if (!empty($all)) {
$this->forever = $all;
}
}
示例9: loadPayments
/**
* gets all user payments by current month and stores it into payments prop
*
* @return void
*/
protected function loadPayments()
{
$query = "SELECT * from `payments` WHERE `date` LIKE '" . $this->year . '-' . $this->month . "-%' AND `summ`>0;";
$all = simple_queryall($query);
if (!empty($all)) {
$this->payments = $all;
}
}
示例10: zb_plchecknethost
function zb_plchecknethost($login)
{
$login = vf($login);
$ip = zb_UserGetIP($login);
$query = "SELECT `id` from `nethosts` where `ip`='" . $ip . "'";
$result = simple_queryall($query);
$return = !empty($result);
return $return;
}
示例11: loadHistory
/**
* Loads existing subscribers data
*
* @return void
*/
protected function loadHistory()
{
$query = "SELECT * from `mg_history`";
$all = simple_queryall($query);
if (!empty($all)) {
foreach ($all as $io => $each) {
$this->allHistory[$each['id']] = $each;
}
}
}
示例12: loadMultinetNets
/**
* Loads all of multinet networks for further usage
*
* @return void
*/
protected function loadMultinetNets()
{
$query = "SELECT * from `networks` ORDER BY `id` ASC";
$all = simple_queryall($query);
if (!empty($all)) {
foreach ($all as $io => $each) {
$this->allMultinetNets[$each['id']] = $each;
}
}
}
示例13: loadUsers
/**
* loads user bindings from database and store it into private prop users
*
* @return void
*/
protected function loadUsers()
{
$query = "SELECT * from `corp_users`";
$all = simple_queryall($query);
if (!empty($all)) {
foreach ($all as $io => $each) {
$this->users[$each['login']] = $each['corpid'];
}
}
}
示例14: loadData
protected function loadData()
{
$query = "SELECT * from `zbsannouncements` ORDER by `id` DESC;";
$all = simple_queryall($query);
if (!empty($all)) {
foreach ($all as $io => $each) {
$this->data[$each['id']] = $each;
}
}
}
示例15: loadFrozen
private function loadFrozen()
{
$query = "SELECT `login` from `users` WHERE `Passive`='1'";
$all = simple_queryall($query);
if (!empty($all)) {
foreach ($all as $io => $each) {
$this->frozen[$each['login']] = $each['login'];
}
}
}