Revize 1134
Přidáno uživatelem Jiří Sviták před více než 13 roky(ů)
freenetis/branches/testing/application/models/message.php | ||
---|---|---|
if ($order_by == 'ip_address')
|
||
{
|
||
//$order_by = 'inet_aton(ip_address)';
|
||
$order_by = 'inet_aton(ip.ip_address) ASC, m.self_cancel DESC, mip.datetime ASC';
|
||
$order_by = 'inet_aton(ip.ip_address) ASC, ms.self_cancel DESC, mip.datetime ASC';
|
||
$order_by_direction = "";
|
||
}
|
||
else
|
||
... | ... | |
}
|
||
// query
|
||
return $this->db->query("
|
||
SELECT mip.ip_address_id, ip.ip_address, m.name AS message, mip.datetime, mip.comment, m.type, m.self_cancel
|
||
SELECT mip.ip_address_id, ip.ip_address, ms.name AS message,
|
||
mip.datetime, mip.comment, ms.type, ms.self_cancel,
|
||
mm.name AS member_name, mm.id AS member_id
|
||
FROM messages_ip_addresses mip
|
||
LEFT JOIN ip_addresses ip ON ip.id = mip.ip_address_id
|
||
LEFT JOIN messages m ON m.id = mip.message_id
|
||
LEFT JOIN messages ms ON ms.id = mip.message_id
|
||
LEFT JOIN ifaces i ON i.id = ip.iface_id
|
||
LEFT JOIN devices d ON d.id = i.device_id
|
||
LEFT JOIN users u ON u.id = d.user_id
|
||
LEFT JOIN members mm ON mm.id = u.member_id
|
||
ORDER BY $order_by $order_by_direction
|
||
LIMIT $limit_from, $limit_results
|
||
");
|
freenetis/branches/testing/application/controllers/redirect.php | ||
---|---|---|
));
|
||
|
||
$grid->order_callback_field('ip_address')->label(url_lang::lang('texts.IP address'))->callback('callback::ip_address_field');
|
||
$grid->order_callback_field('member_id')->label(url_lang::lang('texts.Member'))->callback('callback::member_field');
|
||
$grid->order_callback_field('message')->label(url_lang::lang('texts.Activated redirection').' '.help::hint('activated_redirection'))->callback('callback::message_field');
|
||
$grid->order_field('datetime')->label(url_lang::lang('texts.Date and time'));
|
||
$grid->order_field('comment')->label(url_lang::lang('texts.Comment'));
|
||
... | ... | |
$order_by = 'id';
|
||
if (strtolower($order_by_direction) != 'asc' && strtolower($order_by_direction) != 'desc')
|
||
$order_by_direction = 'asc';
|
||
// types of redirection
|
||
$redir_types[Member_Model::$all] = url_lang::lang('texts.All');
|
||
$redir_types[Member_Model::$all_redirected] = url_lang::lang('texts.All redirected');
|
||
$redir_types[Member_Model::$membership_interrupt] = url_lang::lang('texts.Membership interrupt');
|
||
$redir_types[Member_Model::$debtors] = url_lang::lang('texts.Debtors');
|
||
$redir_types[Member_Model::$payment_notice] = url_lang::lang('texts.Payment notice');
|
||
$redir_types[Member_Model::$optional_message] = url_lang::lang('texts.Optional message');;
|
||
// load members
|
||
$model_members = new Member_Model();
|
||
$total_members = $model_members->count_whitelisted_members();
|
freenetis/branches/testing/redirection/info.php | ||
---|---|---|
$info = mysql_fetch_array($info_result);
|
||
// text in left contact panel,
|
||
// it asssumed that after installation, there is always contact message with ID 1
|
||
$contact_query = "SELECT * FROM messages WHERE ID = 1";
|
||
$contact_query = "SELECT * FROM messages WHERE type = 1";
|
||
$contact_result = mysql_query($contact_query, $link) or die(mysql_error());
|
||
$contact_array = mysql_fetch_array($contact_result) or die(mysql_error());
|
||
$contact = $contact_array['text'];
|
freenetis/branches/testing/redirection/cancel.php | ||
---|---|---|
}
|
||
}
|
||
// message after redirection
|
||
$message_query = "SELECT * FROM messages WHERE ID = 2";
|
||
$message_query = "SELECT * FROM messages WHERE type = 2";
|
||
$message_result = mysql_query($message_query, $link) or die(mysql_error());
|
||
$message = mysql_fetch_array($message_result);
|
||
$content = $message['text'];
|
freenetis/branches/testing/redirection/index.php | ||
---|---|---|
'???' AS variable_symbol,
|
||
'???' AS comment
|
||
FROM messages ms
|
||
WHERE ms.id = 3";
|
||
WHERE ms.type = 3";
|
||
$message_result = mysql_query($message_query, $link) or die(mysql_error());
|
||
$message = mysql_fetch_array($message_result);
|
||
$content = $message['text'];
|
||
}
|
||
// text in left contact panel,
|
||
// it asssumed that after installation, there is always contact message with ID 1
|
||
$contact_query = "SELECT * FROM messages WHERE ID = 1";
|
||
$contact_query = "SELECT * FROM messages WHERE type = 1";
|
||
$contact_result = mysql_query($contact_query, $link) or die(mysql_error());
|
||
$contact_array = mysql_fetch_array($contact_result) or die(mysql_error());
|
||
$contact = $contact_array['text'];
|
Také k dispozici: Unified diff
oprava chybek