本文整理汇总了PHP中Member::count方法的典型用法代码示例。如果您正苦于以下问题:PHP Member::count方法的具体用法?PHP Member::count怎么用?PHP Member::count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Member
的用法示例。
在下文中一共展示了Member::count方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: manage
/**
* @before _secure, _vendor
*/
public function manage($param = null)
{
$this->seo(array("title" => "Manage Runner Profile", "view" => $this->getLayoutView()));
$view = $this->getActionView();
$page = RequestMethods::get("page", 1);
$limit = RequestMethods::get("limit", 10);
$where = array("organization_id = ?" => $this->member->organization_id, "designation = ?" => "runner", "live = ?" => 1);
$runners = Member::all($where, array("DISTINCT user_id"), "created", "desc", $limit, $page);
$count = Member::count($where);
$view->set("runners", $runners);
$view->set("page", $page);
$view->set("count", $count);
$view->set("limit", $limit);
}
示例2: insertMember
public function insertMember()
{
$cre = ["member" => Input::get('member'), "username" => Input::get('username'), "dob" => Input::get('dob'), "city_id" => Input::get('city_id'), "center_id" => Input::get('center_id'), "doj" => Input::get('doj'), "mobile" => Input::get('mobile'), "address" => Input::get('address'), "city" => Input::get('city'), "priv" => Input::get('priv'), "state" => Input::get('state')];
$rules = ["member" => 'required', "username" => 'required', "member" => 'required', "dob" => 'required', "doj" => 'required', "mobile" => 'required', "address" => 'required'];
$validator = Validator::make($cre, $rules);
if ($validator->passes()) {
$member = new Member();
$member->name = Input::get('member');
$member->username = Input::get('username');
$member->dob = Input::get('dob');
$member->city_id = Input::get('city_id');
$member->center_id = Input::get('center_id');
$member->doj = Input::get('doj');
$member->mobile = Input::get('mobile');
$member->address = Input::get('address');
$member->city = Input::get('city');
$member->priv = Input::get('priv');
$member->state = Input::get('state');
$member->save();
$member_info = Member::select('center.center_name', 'city.city_name', 'members.id', 'members.name', 'members.priv')->join('city', 'members.city_id', '=', 'city.id')->join('center', 'members.center_id', '=', 'center.id')->where('members.id', '=', $member->id)->first();
$count = Member::count();
$data['success'] = 'true';
$data['message'] = html_entity_decode(View::make('admin.manage.members.view', ["data" => $member_info, "count" => $count]));
} else {
$data["success"] = false;
$data["message"] = "All fields are not filled";
}
return json_encode($data);
}
示例3: header
<?php
require_once "../includes/config.php";
require_once "../includes/functions.php";
require_once "../classes/Member.php";
if ($_SESSION['user_id'] != "UIC-000") {
header("Location: ../");
exit;
}
$page = isset($_GET['page']) ? pure_it($_GET['page']) : 1;
$to = intval($page) * 6;
$from = $to - 5;
$to = makeID(--$to);
$from = makeID(--$from);
$first = 1;
$last = ceil(Member::count() / 6);
?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="">
<!--<![endif]-->
<head>
<title>UU ICT Club Members</title>
<meta charset="utf-8">
<base href="<?php
echo BASE_URL;
示例4:
<div class="columns four">
<p class="right">The main purpose of this club is to give opportunity to the students to express their latent talent.</p>
</div>
</div>
<div class="row">
<div class="columns three">
<div class="box">
<div class="title">At A Glance</div>
<div class="info">
<ul>
<li class="ataglance"><span class="bold">Founded by:</span><br/>Md. Emrul Hasan</li>
<li class="ataglance"><span class="bold">Established in:</span><br/>3rd October, 2012</li>
<li class="ataglance"><span class="bold">Number of Advisers:</span><br/>4</li>
<li class="ataglance"><span class="bold">Controled by:</span><br/>10 Panel Members</li>
<li class="ataglance" style="border:none"><span class="bold">Registered Members:</span><br/><?php
echo Member::count();
?>
</li>
</ul>
</div>
</div>
</div>
<div class="columns three">
<div id="ouractivities" class="box">
<div class="title">Our Activities</div>
<div class="info">
<ul>
<li>Quiz Contest</li>
<li>Programming Contest</li>
<li>Cultural Contest</li>
<li>Gaming Contest</li>
示例5: array
window.parent.boss.popup('Erro 42', html);
</script>
<?php
die;
}
try {
$sql = array('id_project' => $pk, 'id_admin' => $logado['id_member'], 'status' => '1');
$project = new Project();
$count = $project->count($sql);
if ($count == 1) {
$project = $project->get($sql);
$project = $project[0];
$sql = array('email' => $email);
$member = new Member();
$member->fields = array('id_member', 'name', 'email');
$count = $member->count($sql);
if ($count == 1) {
$rs = $member->get($sql);
$rs = $rs[0];
$id_project = $pk;
$id_member = $rs['id_member'];
$sql = array('id_project' => $id_project, 'id_member' => $id_member, 'status' => 1);
$member_set = new ProjectMemberSet($sql);
$countMemberSetSend = $member_set->count($sql);
$sql = array('id_project' => $id_project, 'id_member' => $id_member, 'status' => 2);
$countMemberSetRevoke = $member_set->count($sql);
if ($countMemberSetSend == 0 && $countMemberSetRevoke == 0) {
$member_set->save();
$name = explode(" ", $logado['name']);
$name = $name[0];
$title = '<b>' . ucfirst($name) . '</b> convidou você para o projeto <b>' . $project['title'] . '</b>';
示例6: explode
require_once 'init.php';
use Agil\Session\Session;
use Agil\View\View;
use Agil\Config\Config;
$logado = Session::get('logado');
if (isset($_FILES['image']) && !empty($_FILES['image'])) {
$name = md5(sha1(date("Y-m-d H:m:s")));
$file = $_FILES['image'];
$ds = Config::get('ds');
$media = Config::get('media');
$extensions = Config::get('images');
$ext = explode(".", $file['name']);
$ext = $ext[count($ext) - 1];
$sql = array("id_member" => $logado['id_member'], "status" => 1);
$member = new Member();
$row = $member->count($sql);
if ($row == 1 && in_array($ext, $extensions)) {
$user = $media . $logado['id_member'];
if (!is_dir($user)) {
$mkdir = mkdir($user, 0700);
$chmod = chmod($user, 0700);
}
$user = $media . $logado['id_member'];
$tmp = $file['tmp_name'];
$name .= "." . $ext;
$profile = $user . $ds . 'profile';
if (!is_dir($profile)) {
$mkdir = mkdir($profile, 0700);
$chmod = chmod($profile, 0700);
}
$source = $profile . $ds . $name;