本文整理汇总了PHP中client::get_client_link方法的典型用法代码示例。如果您正苦于以下问题:PHP client::get_client_link方法的具体用法?PHP client::get_client_link怎么用?PHP client::get_client_link使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类client
的用法示例。
在下文中一共展示了client::get_client_link方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_list
public static function get_list($_FORM)
{
global $TPL;
$filter = clientContact::get_list_filter($_FORM);
if (is_array($filter) && count($filter)) {
$filter = " WHERE " . implode(" AND ", $filter);
}
$q = "SELECT clientContact.*, client.*\n FROM clientContact\n LEFT JOIN client ON client.clientID = clientContact.clientID\n " . $filter . " \n GROUP BY clientContact.clientContactID \n ORDER BY clientContactName,clientContact.primaryContact asc";
$db = new db_alloc();
$db->query($q);
while ($row = $db->next_record()) {
$c = new client();
$c->read_db_record($db);
$row["clientLink"] = $c->get_client_link($_FORM);
$row["clientContactEmail"] and $row["clientContactEmail"] = "<a href=\"mailto:" . page::htmlentities($row["clientContactName"] . " <" . $row["clientContactEmail"] . ">") . "\">" . page::htmlentities($row["clientContactEmail"]) . "</a>";
$rows[] = $row;
}
return $rows;
}
示例2: get_list
public static function get_list($_FORM)
{
/*
* This is the definitive method of getting a list of clients that need a sophisticated level of filtering
*
*/
global $TPL;
$filter = client::get_list_filter($_FORM);
$debug = $_FORM["debug"];
$debug and print "<pre>_FORM: " . print_r($_FORM, 1) . "</pre>";
$debug and print "<pre>filter: " . print_r($filter, 1) . "</pre>";
$_FORM["return"] or $_FORM["return"] = "html";
if (is_array($filter) && count($filter)) {
$filter = " WHERE " . implode(" AND ", $filter);
}
$cc = config::get_config_item("clientCategories");
foreach ($cc as $k => $v) {
$clientCategories[$v["value"]] = $v["label"];
}
$q = "SELECT client.*,clientContactName, clientContactEmail, clientContactPhone, clientContactMobile\n FROM client \n LEFT JOIN clientContact ON client.clientID = clientContact.clientID AND clientContact.clientContactActive = 1\n " . $filter . " \n GROUP BY client.clientID \n ORDER BY clientName,clientContact.primaryContact asc";
$debug and print "Query: " . $q;
$db = new db_alloc();
$db2 = new db_alloc();
$db->query($q);
while ($row = $db->next_record()) {
$print = true;
$c = new client();
$c->read_db_record($db);
$row["clientCategoryLabel"] = $clientCategories[$c->get_value("clientCategory")];
$row["clientLink"] = $c->get_client_link($_FORM);
$row["clientContactEmail"] and $row["clientContactEmail"] = "<a href=\"mailto:" . page::htmlentities($row["clientContactName"] . " <" . $row["clientContactEmail"] . ">") . "\">" . page::htmlentities($row["clientContactEmail"]) . "</a>";
$rows[$c->get_id()] = $row;
}
return (array) $rows;
}