Revize 1286
Přidáno uživatelem Michal Kliment před asi 13 roky(ů)
freenetis/branches/testing/application/i18n/cs_CZ/texts.php | ||
---|---|---|
'abstain' => 'Zdržet se',
|
||
'about sms' => 'Informace o SMS',
|
||
'access control list items' => 'Položky seznamu pro řízení přístupu',
|
||
'access controlo rule has been successfully updated' => 'Přístupové pravidlo bylo úspěšně aktualizováno.',
|
||
'access control groups of users' => 'Přístupové skupiny uživatelů',
|
||
'access control rule has been successfully added' => 'Přístupové pravidlo bylo úspěšně přidáno.',
|
||
'access control rule has been successfully deleted' => 'Přístupové pravidlo bylo úspěšně smazáno.',
|
||
'access control rule has been successfully updated' => 'Přístupové pravidlo bylo úspěšně aktualizováno.',
|
||
'access control rules' => 'Přístupová pravidla',
|
||
'access rights' => 'Přístupová práva',
|
||
'access to system' => 'Přístup do systému',
|
||
... | ... | |
'error - cannot add phone operator' => 'Chyba - nelze přidat telefonního operátora',
|
||
'error - cannot assign transfer' => 'Chyba - nelze přiřadit převod.',
|
||
'error - cannot complete registration' => 'Chyba - Nelze dokončit registraci',
|
||
'error - cannot delete access rule' => 'Chyba - Nelze smazat přístupové pravidlo.',
|
||
'error - cannot delete bank statement' => 'Chyba - nelze smazat bankovní výpis.',
|
||
'error - cannot discount private services' => 'Chyba - nemohu strhnout soukromé služby.',
|
||
'error - cannot load intelligent selection' => 'Chyba - nelze načíst inteligentní výběr',
|
||
... | ... | |
'received' => 'Přijatá',
|
||
'received message' => 'Přijatá zpráva',
|
||
'receiver' => 'Příjemce',
|
||
'receiver type' => 'Typ příjemce',
|
||
'recount of member fees' => 'Přepočítání členských příspěvků',
|
||
'recount of entrance fees' => 'Přepočítání vstupních příspěvků',
|
||
'redir' => 'Přesm',
|
||
... | ... | |
'send to member' => 'Pošli členovi',
|
||
'send this concept for approval' => 'Zaslat tento koncept na hlasování o schválení',
|
||
'sender' => 'Odesílatel',
|
||
'sender type' => 'Typ odesílatele',
|
||
'sent' => 'Odeslaná',
|
||
'sent e-mails' => 'Odeslané e-maily',
|
||
'sent message' => 'Odeslaná zpráva',
|
freenetis/branches/testing/application/helpers/callback.php | ||
---|---|---|
echo ' ';
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Callback function to print type of member
|
||
*
|
||
* @author Michal Kliment
|
||
* @param type $item
|
||
* @param type $name
|
||
*/
|
||
public static function member_type_field ($item, $name)
|
||
{
|
||
echo Member_Model::get_type($item->$name);
|
||
}
|
||
|
||
/**
|
||
* Activates multiple redirections. All interrupted members, all debtors
|
freenetis/branches/testing/application/models/member.php | ||
---|---|---|
{
|
||
/** Type of member: applicant */
|
||
const TYPE_APPLICANT = 1;
|
||
/** Type of member: regular */
|
||
const TYPE_REGULAR = 2;
|
||
/** Type of member: honorary */
|
||
const TYPE_HONORARY = 3;
|
||
/** Type of member: sympatizing */
|
||
const TYPE_SYMPATHIZING = 4;
|
||
/** Type of member: non */
|
||
const TYPE_NON = 5;
|
||
/** Type of member: fee-free */
|
||
const TYPE_FEE_FREE = 6;
|
||
/** Type of member: former */
|
||
const TYPE_FORMER = 15;
|
||
|
||
/** Association member ID */
|
||
const ASSOCIATION = 1;
|
||
|
||
/**
|
||
* Types of member
|
||
*
|
||
* @var array
|
||
*/
|
||
private static $types = array
|
||
(
|
||
self::TYPE_APPLICANT => 'Applicant',
|
||
self::TYPE_REGULAR => 'Regular member',
|
||
self::TYPE_HONORARY => 'Honorary member',
|
||
self::TYPE_SYMPATHIZING => 'Sympathizing member',
|
||
self::TYPE_NON => 'Non-member',
|
||
self::TYPE_FEE_FREE => 'Fee-free regular member',
|
||
self::TYPE_FORMER => 'Former member'
|
||
);
|
||
|
||
protected $has_one = array
|
||
(
|
||
... | ... | |
protected $belongs_to = array('address_point', 'user');
|
||
|
||
/**
|
||
* Returns type in string from integer
|
||
*
|
||
* @param integer|string $type
|
||
* @return string
|
||
*/
|
||
public static function get_type ($type)
|
||
{
|
||
if (isset(self::$types[$type]))
|
||
return __(self::$types[$type]);
|
||
else
|
||
return $type;
|
||
}
|
||
|
||
/**
|
||
* Gets joined values of member for members fees
|
||
*
|
||
* @param integer $member_id
|
||
... | ... | |
",array(isset($registrations[$id]), $id));
|
||
}
|
||
}
|
||
|
||
public function set_protective_period ()
|
||
{
|
||
$ip_address_model = new Ip_address_Model();
|
||
|
||
$ip_addresses = $ip_address_model
|
||
->get_ip_addresses_of_members_in_protective_period();
|
||
|
||
foreach ($ip_addresses as $ip_address)
|
||
{
|
||
$ip_address_model
|
||
->set_whitelist(
|
||
Ip_address_Model::$temporary_whitelist,
|
||
$ip_address->id
|
||
);
|
||
}
|
||
}
|
||
}
|
freenetis/branches/testing/application/models/sms_message.php | ||
---|---|---|
$limit_from = 0, $limit_results = 50, $order_by = 'id',
|
||
$order_by_direction = 'asc', $filter_values = array())
|
||
{
|
||
// order by check
|
||
if (!$this->has_column($order_by))
|
||
{
|
||
$order_by = 'id';
|
||
}
|
||
// order by direction check
|
||
if (strtolower($order_by_direction) != 'desc')
|
||
{
|
||
... | ... | |
}
|
||
// query
|
||
return $this->db->query("
|
||
SELECT sms.*, s.*, r.*
|
||
SELECT
|
||
sms.*, IFNULL(s.sender_id,0) AS sender_id, sender_name, sender_type,
|
||
r.*
|
||
FROM sms_messages sms
|
||
LEFT JOIN
|
||
(
|
||
SELECT
|
||
CONCAT(cu.country_code,c.value) AS value,
|
||
u.id AS sender_id,
|
||
CONCAT(u.surname,' ',u.name) AS sender_name
|
||
CONCAT(u.surname,' ',u.name) AS sender_name,
|
||
IFNULL(e.value, m.type) AS sender_type
|
||
FROM contacts c
|
||
JOIN contacts_countries cc ON cc.contact_id = c.id
|
||
JOIN countries cu ON cc.country_id = cu.id
|
||
JOIN users_contacts uc ON uc.contact_id = c.id
|
||
JOIN users u ON uc.user_id = u.id
|
||
JOIN members m ON u.member_id = m.id
|
||
LEFT JOIN enum_types e ON m.type = e.id AND read_only = 0
|
||
WHERE c.type = ?
|
||
) s ON sms.sender LIKE s.value
|
||
LEFT JOIN
|
||
... | ... | |
SELECT
|
||
CONCAT(cu.country_code,c.value) AS value,
|
||
u.id AS receiver_id,
|
||
CONCAT(u.surname,' ',u.name) AS receiver_name
|
||
CONCAT(u.surname,' ',u.name) AS receiver_name,
|
||
IFNULL(e.value, m.type) AS receiver_type
|
||
FROM contacts c
|
||
JOIN contacts_countries cc ON cc.contact_id = c.id
|
||
JOIN countries cu ON cc.country_id = cu.id
|
||
JOIN users_contacts uc ON uc.contact_id = c.id
|
||
JOIN users u ON uc.user_id = u.id
|
||
JOIN members m ON u.member_id = m.id
|
||
LEFT JOIN enum_types e ON m.type = e.id AND read_only = 0
|
||
WHERE c.type = ?
|
||
) r ON sms.receiver LIKE r.value
|
||
GROUP BY sms.id
|
freenetis/branches/testing/application/controllers/sms.php | ||
---|---|---|
}
|
||
|
||
// parameters control
|
||
$allowed_order_type = array('id', 'name', 'user_id', 'send_date', 'type');
|
||
$allowed_order_type = array
|
||
(
|
||
'id', 'name', 'user_id', 'send_date', 'type', 'sender_id',
|
||
'receiver_id', 'sender_type', 'receiver_type'
|
||
);
|
||
|
||
if (!in_array(strtolower($order_by), $allowed_order_type))
|
||
{
|
||
... | ... | |
->label(__('Sender'))
|
||
->callback('callback::sms_sender_field');
|
||
|
||
$grid->order_callback_field('sender_type')
|
||
->callback('callback::member_type_field');
|
||
|
||
$grid->order_callback_field('receiver_id')
|
||
->label(__('Receiver'))
|
||
->callback('callback::sms_receiver_field');
|
||
|
||
$grid->order_callback_field('receiver_type')
|
||
->callback('callback::member_type_field');
|
||
|
||
$grid->order_callback_field('send_date')
|
||
->callback('callback::datetime');
|
||
|
Také k dispozici: Unified diff
U vypisu vsech SMS zprav pridan sloupec type clena odesilatel a typ clena prijemce.