當前位置: 首頁>>代碼示例>>PHP>>正文


PHP core::get_where方法代碼示例

本文整理匯總了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');
     }
 }
開發者ID:heruprasetya,項目名稱:Codeigniter-SMS-Gateway-Gammu,代碼行數:29,代碼來源:send_message.php

示例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;
     }
 }
開發者ID:heruprasetya,項目名稱:Codeigniter-SMS-Gateway-Gammu,代碼行數:10,代碼來源:ubah_username.php

示例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;
     }
 }
開發者ID:heruprasetya,項目名稱:Codeigniter-SMS-Gateway-Gammu,代碼行數:11,代碼來源:ubah_password.php

示例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 
開發者ID:heruprasetya,項目名稱:Codeigniter-SMS-Gateway-Gammu,代碼行數:31,代碼來源:content.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;
    ?>
開發者ID:heruprasetya,項目名稱:Codeigniter-SMS-Gateway-Gammu,代碼行數:31,代碼來源:content.php

示例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'];
開發者ID:heruprasetya,項目名稱:Codeigniter-SMS-Gateway-Gammu,代碼行數:31,代碼來源:content.php

示例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');
開發者ID:heruprasetya,項目名稱:Codeigniter-SMS-Gateway-Gammu,代碼行數:31,代碼來源:content.php

示例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'];
開發者ID:heruprasetya,項目名稱:Codeigniter-SMS-Gateway-Gammu,代碼行數:31,代碼來源:content.php

示例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');
開發者ID:heruprasetya,項目名稱:Codeigniter-SMS-Gateway-Gammu,代碼行數:31,代碼來源:_sidebar.php


注:本文中的core::get_where方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。