本文整理汇总了PHP中core::get_where方法的典型用法代码示例。如果您正苦于以下问题:PHP core::get_where方法的具体用法?PHP core::get_where怎么用?PHP core::get_where使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core
的用法示例。
在下文中一共展示了core::get_where方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: send_by_group
function send_by_group()
{
$this->load->library('form_validation');
$this->form_validation->CI =& $this;
$this->form_validation->set_error_delimiters('<p class="text-alert">', '</p> ');
$this->form_validation->set_rules('group', 'Goup', 'required|xss_clean|htmlspecialchars|trim');
$this->form_validation->set_rules('message', 'Message', 'required|xss_clean|htmlspecialchars|trim');
if ($this->form_validation->run() == FALSE) {
$data['content'] = $this->load->view('send_by_group', '', TRUE);
$this->load->view('/admin/main', $data);
} else {
for ($i = 1; $i <= $this->input->post('total'); $i++) {
$query = core::get_where('pbk', 'gammu', array('GroupID' => $this->input->post('group')));
if ($query != 0) {
foreach ($query->result() as $row) {
core::insert('outbox', 'gammu', array('DestinationNumber' => $row->Number, 'TextDecoded' => $this->input->post('message')));
}
} else {
$query = core::get_where('pbk', 'gammu', array('GroupID !=' => $this->input->post('group')));
foreach ($query->result() as $row) {
core::insert('outbox', 'gammu', array('DestinationNumber' => $row->Number, 'TextDecoded' => $this->input->post('message')));
}
}
}
$this->session->set_flashdata('success', 'success');
$this->session->set_flashdata('TotalSend', $t);
redirect('send_message/send_by_group');
}
}
示例2: check_username
function check_username($username)
{
$query = core::get_where('admin', 'gammu', array('username' => $username, 'id' => $this->session->userdata('id')), 1);
if ($query->num_rows() > 0) {
return TRUE;
} else {
$this->form_validation->set_message('check_username', 'Username lama salah');
return FALSE;
}
}
示例3: check_password
function check_password($password)
{
$password_encrypt = sha1(md5($password));
$query = core::get_where('admin', 'gammu', array('password' => $password_encrypt, 'username' => $this->session->userdata('username')), 1);
if ($query->num_rows() > 0) {
return TRUE;
} else {
$this->form_validation->set_message('check_password', 'Password lama salah');
return FALSE;
}
}
示例4: foreach
<div class='row-fluid'>
<div class="span12">
<?php
echo $this->load->view('_layouts/menus');
?>
<table class='table table-striped table-bordered table-hover table-condensed'>
<tbody><?php
foreach (core::get_where('pbk', 'gammu', array('id' => $this->uri->segment(3)), 1)->result() as $row) {
?>
<tr><td>ID</td>
<td><?php
echo $row->ID;
?>
</td></tr>
<tr><td>GroupID</td>
<td><?php
echo $row->GroupID;
?>
</td></tr>
<tr><td>Name</td>
<td><?php
echo $row->Name;
?>
</td></tr>
<tr><td>Number</td>
<td><?php
echo $row->Number;
?>
</td></tr>
<?php
示例5: foreach
<form method='POST' action='' charset='UTF-8'>
<label>Hilangkan centang untuk nomor yang tidak ingin dikirim</label>
<hr> <?php
$query = core::get_all('pbk', 'gammu', 'Name');
?>
Total Phone Number : <?php
echo $query->num_rows();
?>
<div style='width:100%;height:300px;overflow:auto;border:1px solid #CCC;padding:10px 0px 10px 10px ;'>
<?php
foreach ($query->result() as $row) {
?>
<?php
$group = core::get_where('pbk_groups', 'gammu', array('ID' => $row->GroupID));
?>
<?php
$groups = $group->row();
?>
<label class="checkbox">
<input type='checkbox' name='SendNumber[]' value='<?php
echo $row->Number;
?>
' checked>
<?php
echo $row->Name;
?>
(<?php
echo $row->Number;
?>
示例6: base_url
?>
<a href="<?php
echo base_url('pbk_group');
?>
" class='btn'><i class='fa fa-angle-left'></i> Back to list</a>
<hr>
<!--START FORM-->
<form method='POST' charset='UTF-8' action='<?php
echo base_url('pbk_group/update') . '/' . $this->uri->segment(3);
?>
' class="form" >
<?php
$query = core::get_where('pbk_groups', 'gammu', array('id' => $this->uri->segment(3)), 1);
$row = $query->row_array();
?>
<input type='hidden' name='id' value='<?php
echo $row['ID'];
?>
' >
<!-- start Name -->
<div class='control-group <?php
echo form_error('Name') ? 'error' : '';
?>
'>
<label class='control-label' ><strong>Name</strong></label>
<div class='controls'>
<input type='text' name='Name' class='span5' value='<?php
echo $row['Name'];
示例7: base_url
echo $this->load->view('_layouts/menus');
?>
<a href='<?php
echo base_url('pbk');
?>
' class='btn'><i class='fa fa-angle-double-left'></i> Back to List</a>
<br><hr>
<!--START FORM-->
<form method='POST' charset='UTF-8' action='<?php
echo base_url('pbk/update') . '/' . $this->uri->segment(3);
?>
' class="form" >
<?php
$query = core::get_where('pbk', 'gammu', array('ID' => $this->uri->segment(3)), 1);
$row = $query->row_array();
?>
<input type='hidden' name='id' value='<?php
echo $row['ID'];
?>
' >
<!-- start GroupID -->
<div class='control-group <?php
echo form_error('GroupID') ? 'error' : '';
?>
'>
<label class='control-label' ><strong>Group</strong></label>
<div class='controls'>
<?php
$group = core::get_all('pbk_groups', 'gammu');
示例8: base_url
<div class='row-fluid'>
<div class="span12">
<?php
echo $this->load->view('_layouts/menus');
?>
<!--START FORM-->
<form method='POST' charset='UTF-8' action='<?php
echo base_url('inbox/update') . '/' . $this->uri->segment(3);
?>
' class="form form-horizontal" >
<?php
$query = core::get_where('inbox', 'gammu', array('id' => $this->uri->segment(3)), 1);
$row = $query->row_array();
?>
<input type='hidden' name='id' value='<?php
echo $row['id'];
?>
' >
<!-- start UpdatedInDB -->
<div class='control-group <?php
echo form_error('UpdatedInDB') ? 'error' : '';
?>
'>
<label class='control-label' ><strong>UpdatedInDB</strong></label>
<div class='controls'>
<input type='text' name='UpdatedInDB' class='span5' value='<?php
echo $row['UpdatedInDB'];
示例9: array
<?php
$inbox = core::get_all('inbox', 'gammu');
$inboxUnread = core::get_where('inbox', 'gammu', array('newComing' => 1));
$sending = core::get_all('sentitems', 'gammu');
$sendingError = core::get_where('sentitems', 'gammu', array('status' => 'SendingError'));
$outbox = core::get_all('outbox', 'gammu');
$phonebook = core::get_all('pbk', 'gammu');
$group = core::get_all('pbk_groups', 'gammu');
?>
<div class='well' style='margin:-10px;border:1px solid #CCC;border-radius:0px;padding:5px;background:#f9f9f9;box-shadow:0px 0px 0px #000;'>
<ul class="nav nav-list">
<li class="nav-header">Menus</li>
<li class="<?php
echo $this->uri->segment(1) == 'pbk' ? "active" : "";
?>
"><a href="<?php
echo base_url('pbk');
?>
">Phonebook
<span class="badge"><?php
echo $phonebook->num_rows();
?>
</span>
</a></li>
<li class="<?php
echo $this->uri->segment(1) == 'pbk_group' ? "active" : "";
?>
"><a href="<?php
echo base_url('pbk_group');