本文整理汇总了PHP中Clients::getClientList方法的典型用法代码示例。如果您正苦于以下问题:PHP Clients::getClientList方法的具体用法?PHP Clients::getClientList怎么用?PHP Clients::getClientList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Clients
的用法示例。
在下文中一共展示了Clients::getClientList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DB
<?php
/**
* Created by PhpStorm.
* User: geol
* Date: 6/14/15
* Time: 4:11 AM
*/
error_reporting(E_ALL);
ini_set('display_errors', true);
define('CLASS_DIR', 'classes/');
set_include_path(get_include_path() . PATH_SEPARATOR . CLASS_DIR);
spl_autoload_register();
$connect = new DB('clodo', 'user', 'password');
$db = $connect->db;
$clients = new Clients($db);
if ($_GET['action'] == 'list') {
$filter = array('name' => filter_input(INPUT_GET, 'name', FILTER_SANITIZE_MAGIC_QUOTES), 'ballance' => filter_input(INPUT_GET, 'name', FILTER_SANITIZE_NUMBER_FLOAT), 'hasPhone' => filter_input(INPUT_GET, 'hasPhone', FILTER_VALIDATE_BOOLEAN), 'registerFrom' => filter_input(INPUT_GET, 'registerFrom', FILTER_SANITIZE_MAGIC_QUOTES), 'registerTo' => filter_input(INPUT_GET, 'registerTo', FILTER_SANITIZE_MAGIC_QUOTES), 'from' => filter_input(INPUT_GET, 'from', FILTER_SANITIZE_NUMBER_FLOAT), 'to' => filter_input(INPUT_GET, 'to', FILTER_SANITIZE_NUMBER_FLOAT));
$json = json_encode($clients->getClientList($filter));
print $json;
}
if ($_GET['action'] == 'requestPhone') {
return $clients->requestPhone(filter_input(INPUT_GET, 'email', FILTER_SANITIZE_EMAIL));
}
示例2: Clients
<?php
$param = !empty($_GET['param']) ? $_GET['param'] : NULL;
$value = !empty($_GET['value']) ? $_GET['value'] : NULL;
$clients = new Clients();
if (is_null($param) || is_null($value)) {
$list = $clients->getClientList($pswd['user']);
} else {
$list = $clients->getClientListFilter($pswd['user'], $param, $value);
}
print "<h1>Klienci</h1><table><form method='GET' action='index.php'><tr><td><input type='checkbox' name='location' value='6' checked /></td><td><select name='param' /><option>Klient</option><option>eMail</option><option>Telefon</option><option>Typ</option></td><td><input type='text' name='value'></td><td><input type='submit' value='Filtruj'></td></tr></form></table><br><table><tr><th>Użytkownik:</th><th>Typ:</th><th>eMail</th><th>Telefon</th><th>Aktywny:</th></tr>";
if (!empty($list)) {
foreach ($list as $row) {
print "<tr><td>{$row['user']}</td><td>{$row['type']}</td><td>{$row['mail']}</td><td>{$row['tel']}</td><td>{$row['active']}</td><td><a href='index.php?location=11&id={$row['id']}'>Edytuj</a></td></tr>";
}
}